diff --git a/apis/pr-release-1-3-0/core/Accessibility/index.md b/apis/pr-release-1-3-0/core/Accessibility/index.md new file mode 100644 index 00000000..2395cb79 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Accessibility/index.md @@ -0,0 +1,840 @@ +--- +title: Accessibility + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Accessibility Module + +--- + +Version Accessibility 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [audioDescriptionSettings](#audiodescriptionsettings) + - [closedCaptions](#closedcaptions) + - [closedCaptionsSettings](#closedcaptionssettings) + - [listen](#listen) + - [once](#once) + - [voiceGuidance](#voiceguidance) + - [voiceGuidanceSettings](#voiceguidancesettings) +- [Events](#events) + - [audioDescriptionSettingsChanged](#audiodescriptionsettingschanged) + - [closedCaptionsSettingsChanged](#closedcaptionssettingschanged) + - [voiceGuidanceSettingsChanged](#voiceguidancesettingschanged) +- [Types](#types) + - [AudioDescriptionSettings](#audiodescriptionsettings-1) + +## Usage + +To use the Accessibility module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' +``` + +## Overview + +The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance. + +Apps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app. + +## Methods + +### audioDescriptionSettings + +Get the user's preferred audio description settings + +To get the value of `audioDescriptionSettings` call the method like this: + +```typescript +function audioDescriptionSettings(): Promise +``` + +Promise resolution: + +[AudioDescriptionSettings](#audiodescriptionsettings-1) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:audiodescriptions | + +#### Examples + +Getting the audio description settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let settings = await Accessibility.audioDescriptionSettings() +console.log(settings) +``` + +Value of `settings`: + +```javascript +{ + "enabled": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.audioDescriptionSettings", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function audioDescriptionSettings( + callback: (value) => AudioDescriptionSettings, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the audio description settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let listenerId = await audioDescriptionSettings((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `settings`: + +```javascript +{ + "enabled": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.onAudioDescriptionSettingsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true + } +} +``` + +
+ +--- + +### closedCaptions + +Get the user's preferred closed-captions settings + +```typescript +function closedCaptions(): Promise +``` + +Promise resolution: + +[ClosedCaptionsSettings](../Accessibility/schemas/#ClosedCaptionsSettings) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Getting the closed captions settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let closedCaptionsSettings = await Accessibility.closedCaptions() +console.log(closedCaptionsSettings) +``` + +Value of `closedCaptionsSettings`: + +```javascript +{ + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.closedCaptions", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": ["eng", "spa"] + } +} +``` + +
+ +--- + +### closedCaptionsSettings + +Get the user's preferred closed-captions settings + +To get the value of `closedCaptionsSettings` call the method like this: + +```typescript +function closedCaptionsSettings(): Promise +``` + +Promise resolution: + +[ClosedCaptionsSettings](../Accessibility/schemas/#ClosedCaptionsSettings) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Getting the closed captions settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let closedCaptionsSettings = await Accessibility.closedCaptionsSettings() +console.log(closedCaptionsSettings) +``` + +Value of `closedCaptionsSettings`: + +```javascript +{ + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.closedCaptionsSettings", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": ["eng", "spa"] + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function closedCaptionsSettings( + callback: (value) => ClosedCaptionsSettings, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the closed captions settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let listenerId = await closedCaptionsSettings((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `closedCaptionsSettings`: + +```javascript +{ + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.onClosedCaptionsSettingsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": ["eng", "spa"] + } +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### voiceGuidance + +Get the user's preferred voice guidance settings + +```typescript +function voiceGuidance(): Promise +``` + +Promise resolution: + +[VoiceGuidanceSettings](../Accessibility/schemas/#VoiceGuidanceSettings) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:voiceguidance | + +#### Examples + +Getting the voice guidance settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let settings = await Accessibility.voiceGuidance() +console.log(settings) +``` + +Value of `settings`: + +```javascript +{ + "enabled": true, + "speed": 2 +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.voiceGuidance", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true, + "speed": 2 + } +} +``` + +
+ +--- + +### voiceGuidanceSettings + +Get the user's preferred voice guidance settings + +To get the value of `voiceGuidanceSettings` call the method like this: + +```typescript +function voiceGuidanceSettings(): Promise +``` + +Promise resolution: + +[VoiceGuidanceSettings](../Accessibility/schemas/#VoiceGuidanceSettings) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:voiceguidance | + +#### Examples + +Getting the voice guidance settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let settings = await Accessibility.voiceGuidanceSettings() +console.log(settings) +``` + +Value of `settings`: + +```javascript +{ + "enabled": true, + "speed": 2 +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.voiceGuidanceSettings", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true, + "speed": 2 + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function voiceGuidanceSettings( + callback: (value) => VoiceGuidanceSettings, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the voice guidance settings + +JavaScript: + +```javascript +import { Accessibility } from '@firebolt-js/sdk' + +let listenerId = await voiceGuidanceSettings((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `settings`: + +```javascript +{ + "enabled": true, + "speed": 2 +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Accessibility.onVoiceGuidanceSettingsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enabled": true, + "speed": 2 + } +} +``` + +
+ +--- + +## Events + +### audioDescriptionSettingsChanged + +See: [audioDescriptionSettings](#audiodescriptionsettings) + +### closedCaptionsSettingsChanged + +See: [closedCaptionsSettings](#closedcaptionssettings) + +### voiceGuidanceSettingsChanged + +See: [voiceGuidanceSettings](#voiceguidancesettings) + +## Types + +### AudioDescriptionSettings + +```typescript +type AudioDescriptionSettings = { + enabled: boolean // Whether or not audio descriptions should be enabled by default +} +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Accessibility/schemas/index.md b/apis/pr-release-1-3-0/core/Accessibility/schemas/index.md new file mode 100644 index 00000000..cbbdc837 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Accessibility/schemas/index.md @@ -0,0 +1,154 @@ +--- +title: Accessibility + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Accessibility + +--- + +Version Accessibility 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [FontFamily](#fontfamily) + - [VoiceSpeed](#voicespeed) + - [VoiceGuidanceSettings](#voiceguidancesettings) + - [FontSize](#fontsize) + - [Color](#color) + - [FontEdge](#fontedge) + - [Opacity](#opacity) + - [HorizontalAlignment](#horizontalalignment) + - [VerticalAlignment](#verticalalignment) + - [ClosedCaptionsStyles](#closedcaptionsstyles) + - [ClosedCaptionsSettings](#closedcaptionssettings) + +## Overview + +undefined + +## Types + +### FontFamily + +```typescript + +``` + +--- + +### VoiceSpeed + +```typescript + +``` + +--- + +### VoiceGuidanceSettings + +```typescript +type VoiceGuidanceSettings = { + enabled: boolean // Whether or not voice guidance should be enabled by default + speed: VoiceSpeed // The speed at which voice guidance speech will be read back to the user +} +``` + +See also: + +[VoiceSpeed](#voicespeed) + +--- + +### FontSize + +```typescript + +``` + +--- + +### Color + +```typescript + +``` + +--- + +### FontEdge + +```typescript + +``` + +--- + +### Opacity + +```typescript + +``` + +--- + +### HorizontalAlignment + +```typescript + +``` + +--- + +### VerticalAlignment + +```typescript + +``` + +--- + +### ClosedCaptionsStyles + +The default styles to use when displaying closed-captions + +```typescript +type ClosedCaptionsStyles = { + fontFamily?: string + fontSize?: number + fontColor?: string + fontEdge?: string + fontEdgeColor?: string + fontOpacity?: number + backgroundColor?: string + backgroundOpacity?: number + textAlign?: string + textAlignVertical?: string + windowColor?: string + windowOpacity?: number +} +``` + +--- + +### ClosedCaptionsSettings + +```typescript +type ClosedCaptionsSettings = { + enabled: boolean // Whether or not closed-captions should be enabled by default + styles: ClosedCaptionsStyles // The default styles to use when displaying closed-captions + preferredLanguages?: string[] +} +``` + +See also: + +[ClosedCaptionsStyles](#closedcaptionsstyles) + +--- diff --git a/apis/pr-release-1-3-0/core/Account/index.md b/apis/pr-release-1-3-0/core/Account/index.md new file mode 100644 index 00000000..3bb4577a --- /dev/null +++ b/apis/pr-release-1-3-0/core/Account/index.md @@ -0,0 +1,167 @@ +--- +title: Account + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Account Module + +--- + +Version Account 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [id](#id) + - [uid](#uid) +- [Types](#types) + +## Usage + +To use the Account module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Account } from '@firebolt-js/sdk' +``` + +## Overview + +A module for querying about the device account. + +## Methods + +### id + +Get the platform back-office account identifier + +To get the value of `id` call the method like this: + +```typescript +function id(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------- | +| uses | xrn:firebolt:capability:account:id | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Account } from '@firebolt-js/sdk' + +let id = await Account.id() +console.log(id) +``` + +Value of `id`: + +```javascript +'123' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Account.id", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "123" +} +``` + +
+ +--- + +### uid + +Gets a unique id for the current app & account + +To get the value of `uid` call the method like this: + +```typescript +function uid(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:account:uid | + +#### Examples + +Getting the unique ID + +JavaScript: + +```javascript +import { Account } from '@firebolt-js/sdk' + +let uniqueId = await Account.uid() +console.log(uniqueId) +``` + +Value of `uniqueId`: + +```javascript +'ee6723b8-7ab3-462c-8d93-dbf61227998e' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Account.uid", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "ee6723b8-7ab3-462c-8d93-dbf61227998e" +} +``` + +
+ +--- + +## Types diff --git a/apis/pr-release-1-3-0/core/Advertising/index.md b/apis/pr-release-1-3-0/core/Advertising/index.md new file mode 100644 index 00000000..b7320ea0 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Advertising/index.md @@ -0,0 +1,771 @@ +--- +title: Advertising + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Advertising Module + +--- + +Version Advertising 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [advertisingId](#advertisingid) + - [appBundleId](#appbundleid) + - [config](#config) + - [deviceAttributes](#deviceattributes) + - [listen](#listen) + - [once](#once) + - [policy](#policy) +- [Events](#events) + - [policyChanged](#policychanged) +- [Types](#types) + - [AdConfigurationOptions](#adconfigurationoptions) + - [AdPolicy](#adpolicy) + - [AdvertisingIdOptions](#advertisingidoptions) + +## Usage + +To use the Advertising module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Advertising } from '@firebolt-js/sdk' +``` + +## Overview + +A module for platform provided advertising settings and functionality. + +## Methods + +### advertisingId + +Get the advertising ID + +```typescript +function advertisingId(options: AdvertisingIdOptions): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ----------------------------------------------- | -------- | --------------------- | +| `options` | [`AdvertisingIdOptions`](#advertisingidoptions) | false | AdvertisingId options | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------- | +| uses | xrn:firebolt:capability:advertising:identifier | + +#### Examples + +Getting the advertising ID + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let advertisingId = await Advertising.advertisingId(null) +console.log(advertisingId) +``` + +Value of `advertisingId`: + +```javascript +{ + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.advertisingId", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } +} +``` + +
+ +Getting the advertising ID with scope browse + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let advertisingId = await Advertising.advertisingId({ + scope: { type: 'browse', id: 'paidPlacement' }, +}) +console.log(advertisingId) +``` + +Value of `advertisingId`: + +```javascript +{ + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.advertisingId", + "params": { + "options": { + "scope": { + "type": "browse", + "id": "paidPlacement" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } +} +``` + +
+ +Getting the advertising ID with scope content + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let advertisingId = await Advertising.advertisingId({ + scope: { type: 'content', id: 'metadata:linear:station:123' }, +}) +console.log(advertisingId) +``` + +Value of `advertisingId`: + +```javascript +{ + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.advertisingId", + "params": { + "options": { + "scope": { + "type": "content", + "id": "metadata:linear:station:123" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } +} +``` + +
+ +--- + +### appBundleId + +Get the App's Bundle ID + +```typescript +function appBundleId(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------- | +| uses | xrn:firebolt:capability:advertising:configuration | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let appBundleId = await Advertising.appBundleId() +console.log(appBundleId) +``` + +Value of `appBundleId`: + +```javascript +'operator.app' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.appBundleId", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "operator.app" +} +``` + +
+ +--- + +### config + +Build configuration object for Ad Framework initialization + +```typescript +function config(options: AdConfigurationOptions): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | --------------------------------------------------- | -------- | --------------------- | +| `options` | [`AdConfigurationOptions`](#adconfigurationoptions) | true | Configuration options | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------- | +| uses | xrn:firebolt:capability:advertising:configuration | + +#### Examples + +Initializing the Ad Framework + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let adFrameworkConfig = await Advertising.config({ + environment: 'prod', + authenticationEntity: 'MVPD', +}) +console.log(adFrameworkConfig) +``` + +Value of `adFrameworkConfig`: + +```javascript +{ + "adServerUrl": "https://demo.v.fwmrm.net/ad/p/1", + "adServerUrlTemplate": "https://demo.v.fwmrm.net/ad/p/1?flag=+sltp+exvt+slcb+emcr+amcb+aeti&prof=12345:caf_allinone_profile &nw=12345&mode=live&vdur=123&caid=a110523018&asnw=372464&csid=gmott_ios_tablet_watch_live_ESPNU&ssnw=372464&vip=198.205.92.1&resp=vmap1&metr=1031&pvrn=12345&vprn=12345&vcid=1X0Ce7L3xRWlTeNhc7br8Q%3D%3D", + "adNetworkId": "519178", + "adProfileId": "12345:caf_allinone_profile", + "adSiteSectionId": "caf_allinone_profile_section", + "adOptOut": true, + "privacyData": "ew0KICAicGR0IjogImdkcDp2MSIsDQogICJ1c19wcml2YWN5IjogIjEtTi0iLA0KICAibG10IjogIjEiIA0KfQ0K", + "ifaValue": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa": "ewogICJ2YWx1ZSI6ICIwMTIzNDU2Ny04OUFCLUNERUYtR0gwMS0yMzQ1Njc4OUFCQ0QiLAogICJpZmFfdHlwZSI6ICJzc3BpZCIsCiAgImxtdCI6ICIwIgp9Cg==", + "appName": "FutureToday", + "appBundleId": "FutureToday.comcast", + "distributorAppId": "1001", + "deviceAdAttributes": "ewogICJib0F0dHJpYnV0ZXNGb3JSZXZTaGFyZUlkIjogIjEyMzQiCn0=", + "coppa": 0, + "authenticationEntity": "60f72475281cfba3852413bd53e957f6" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.config", + "params": { + "options": { + "environment": "prod", + "authenticationEntity": "MVPD" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "adServerUrl": "https://demo.v.fwmrm.net/ad/p/1", + "adServerUrlTemplate": "https://demo.v.fwmrm.net/ad/p/1?flag=+sltp+exvt+slcb+emcr+amcb+aeti&prof=12345:caf_allinone_profile &nw=12345&mode=live&vdur=123&caid=a110523018&asnw=372464&csid=gmott_ios_tablet_watch_live_ESPNU&ssnw=372464&vip=198.205.92.1&resp=vmap1&metr=1031&pvrn=12345&vprn=12345&vcid=1X0Ce7L3xRWlTeNhc7br8Q%3D%3D", + "adNetworkId": "519178", + "adProfileId": "12345:caf_allinone_profile", + "adSiteSectionId": "caf_allinone_profile_section", + "adOptOut": true, + "privacyData": "ew0KICAicGR0IjogImdkcDp2MSIsDQogICJ1c19wcml2YWN5IjogIjEtTi0iLA0KICAibG10IjogIjEiIA0KfQ0K", + "ifaValue": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa": "ewogICJ2YWx1ZSI6ICIwMTIzNDU2Ny04OUFCLUNERUYtR0gwMS0yMzQ1Njc4OUFCQ0QiLAogICJpZmFfdHlwZSI6ICJzc3BpZCIsCiAgImxtdCI6ICIwIgp9Cg==", + "appName": "FutureToday", + "appBundleId": "FutureToday.comcast", + "distributorAppId": "1001", + "deviceAdAttributes": "ewogICJib0F0dHJpYnV0ZXNGb3JSZXZTaGFyZUlkIjogIjEyMzQiCn0=", + "coppa": 0, + "authenticationEntity": "60f72475281cfba3852413bd53e957f6" + } +} +``` + +
+ +--- + +### deviceAttributes + +Get the device advertising device attributes + +```typescript +function deviceAttributes(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------- | +| uses | xrn:firebolt:capability:advertising:configuration | + +#### Examples + +Getting the device attributes + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let deviceAttributes = await Advertising.deviceAttributes() +console.log(deviceAttributes) +``` + +Value of `deviceAttributes`: + +```javascript +{ +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.deviceAttributes", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": {} +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### policy + +Get the advertising privacy and playback policy + +To get the value of `policy` call the method like this: + +```typescript +function policy(): Promise +``` + +Promise resolution: + +[AdPolicy](#adpolicy) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------------------------------------------------------- | +| uses | xrn:firebolt:capability:privacy:advertising
xrn:firebolt:capability:advertising:configuration | + +#### Examples + +Getting the advertising policy settings + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let adPolicy = await Advertising.policy() +console.log(adPolicy) +``` + +Value of `adPolicy`: + +```javascript +{ + "skipRestriction": "adsUnwatched", + "limitAdTracking": false +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.policy", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "skipRestriction": "adsUnwatched", + "limitAdTracking": false + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function policy(callback: (value) => AdPolicy): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the advertising policy settings + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/sdk' + +let listenerId = await policy((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `adPolicy`: + +```javascript +{ + "skipRestriction": "adsUnwatched", + "limitAdTracking": false +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.onPolicyChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "skipRestriction": "adsUnwatched", + "limitAdTracking": false + } +} +``` + +
+ +--- + +## Events + +### policyChanged + +See: [policy](#policy) + +## Types + +### AdConfigurationOptions + +```typescript +type AdConfigurationOptions = { + coppa?: boolean // Whether or not the app requires US COPPA compliance. + environment?: 'prod' | 'test' // Whether the app is running in a production or test mode. + authenticationEntity?: string // The authentication provider, when it is separate entity than the app provider, e.g. an MVPD. +} +``` + +--- + +### AdPolicy + +Describes various ad playback enforcement rules that the app should follow. + +```typescript +type AdPolicy = { + skipRestriction?: SkipRestriction // The advertisement skip restriction. + limitAdTracking?: boolean +} +``` + +See also: + +[SkipRestriction](../Advertising/schemas/#SkipRestriction) + +--- + +### AdvertisingIdOptions + +```typescript +type AdvertisingIdOptions = { + scope?: object // Provides the options to send scope type and id to select desired advertising id +} +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Advertising/schemas/index.md b/apis/pr-release-1-3-0/core/Advertising/schemas/index.md new file mode 100644 index 00000000..fc286b79 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Advertising/schemas/index.md @@ -0,0 +1,53 @@ +--- +title: Advertising + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Advertising + +--- + +Version Advertising 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [SkipRestriction](#skiprestriction) + +## Overview + +undefined + +## Types + +### SkipRestriction + +The advertisement skip restriction. + +Applies to fast-forward/rewind (e.g. trick mode), seeking over an entire opportunity (e.g. jump), seeking out of what's currently playing, and "Skip this ad..." features. Seeking over multiple ad opportunities only requires playback of the _last_ opportunity, not all opportunities, preceding the seek destination. + +| Value | Description | +| ------------ | ------------------------------------------------------------------------------ | +| none | No fast-forward, jump, or skip restrictions | +| adsUnwatched | Restrict fast-forward, jump, and skip for unwatched ad opportunities only. | +| adsAll | Restrict fast-forward, jump, and skip for all ad opportunities | +| all | Restrict fast-forward, jump, and skip for all ad opportunities and all content | + +Namespace: `xrn:advertising:policy:skipRestriction:` + +```typescript +SkipRestriction: { + NONE: 'none', + ADS_UNWATCHED: 'adsUnwatched', + ADS_ALL: 'adsAll', + ALL: 'all', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Authentication/index.md b/apis/pr-release-1-3-0/core/Authentication/index.md new file mode 100644 index 00000000..71e0be88 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Authentication/index.md @@ -0,0 +1,431 @@ +--- +title: Authentication + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Authentication Module + +--- + +Version Authentication 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [device](#device) + - [root](#root) + - [session](#session) + - [token](#token) +- [Types](#types) + - [TokenType](#tokentype) + +## Usage + +To use the Authentication module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Authentication } from '@firebolt-js/sdk' +``` + +## Overview + +A module for acquiring authentication tokens. + +## Methods + +### device + +Get a device token scoped to the current app. + +```typescript +function device(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------ | +| uses | xrn:firebolt:capability:token:device | + +#### Examples + +Acquire a Firebolt device identity token + +JavaScript: + +```javascript +import { Authentication } from '@firebolt-js/sdk' + +let token = await Authentication.device() +console.log(token) +``` + +Value of `token`: + +```javascript +'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Authentication.device", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" +} +``` + +
+ +--- + +### root + +Get a root device token. + +```typescript +function root(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------- | +| uses | xrn:firebolt:capability:token:root | + +#### Examples + +Acquire a Firebolt root device identity token + +JavaScript: + +```javascript +import { Authentication } from '@firebolt-js/sdk' + +let token = await Authentication.root() +console.log(token) +``` + +Value of `token`: + +```javascript +'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Authentication.root", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" +} +``` + +
+ +--- + +### session + +Get a destributor session token. + +```typescript +function session(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:token:session | + +#### Examples + +Acquire a distributor session token + +JavaScript: + +```javascript +import { Authentication } from '@firebolt-js/sdk' + +let token = await Authentication.session() +console.log(token) +``` + +Value of `token`: + +```javascript +'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Authentication.session", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" +} +``` + +
+ +--- + +### token + +Get a specific `type` of authentication token + +```typescript +function token(type: TokenType, options: object): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ------------------------- | -------- | -------------------------------------------------------------------------------- | +| `type` | [`TokenType`](#tokentype) | true | What type of token to get
values: `'platform' \| 'device' \| 'distributor'` | +| `options` | `object` | false | Additional options for acquiring the token. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:token:platform | + +#### Examples + +Acquire a Firebolt platform token + +JavaScript: + +```javascript +import { Authentication } from '@firebolt-js/sdk' + +let token = await Authentication.token('platform', null) +console.log(token) +``` + +Value of `token`: + +```javascript +{ + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "platform" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Authentication.token", + "params": { + "type": "platform" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "platform" + } +} +``` + +
+ +Acquire a Firebolt device identity token + +JavaScript: + +```javascript +import { Authentication } from '@firebolt-js/sdk' + +let token = await Authentication.token('device', null) +console.log(token) +``` + +Value of `token`: + +```javascript +{ + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "platform" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Authentication.token", + "params": { + "type": "device" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "device" + } +} +``` + +
+ +Acquire a Firebolt distributor token + +JavaScript: + +```javascript +import { Authentication } from '@firebolt-js/sdk' + +let token = await Authentication.token('distributor', { clientId: 'xyz' }) +console.log(token) +``` + +Value of `token`: + +```javascript +{ + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "platform" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Authentication.token", + "params": { + "type": "distributor", + "options": { + "clientId": "xyz" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "distributor", + "data": { + "tid": "EB00E9230AB2A35F57DB4EFDDC4908F6446D38F08F4FF0BD57FE6A61E21EEFD9", + "scope": "scope" + } + } +} +``` + +
+ +--- + +## Types + +### TokenType + +```typescript +TokenType: { + PLATFORM: 'platform', + DEVICE: 'device', + DISTRIBUTOR: 'distributor', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Capabilities/index.md b/apis/pr-release-1-3-0/core/Capabilities/index.md new file mode 100644 index 00000000..2f4d1b77 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Capabilities/index.md @@ -0,0 +1,1757 @@ +--- +title: Capabilities + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Capabilities Module + +--- + +Version Capabilities 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [available](#available) + - [granted](#granted) + - [info](#info) + - [listen](#listen) + - [once](#once) + - [permitted](#permitted) + - [request](#request) + - [supported](#supported) +- [Events](#events) + - [available](#available-1) + - [granted](#granted-1) + - [revoked](#revoked) + - [unavailable](#unavailable) +- [Types](#types) + - [CapabilityOption](#capabilityoption) + +## Usage + +To use the Capabilities module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' +``` + +## Overview + +The Capabilities module provides information about which discreet unit of functionality is enabled for the apps. + +## Methods + +### available + +Returns whether a capability is available now. + +```typescript +function available(capability: Capability): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Device Token. + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let available = await Capabilities.available( + 'xrn:firebolt:capability:token:device', +) +console.log(available) +``` + +Value of `available`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.available", + "params": { + "capability": "xrn:firebolt:capability:token:device" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Unavailable Platform token. + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let available = await Capabilities.available( + 'xrn:firebolt:capability:token:platform', +) +console.log(available) +``` + +Value of `available`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.available", + "params": { + "capability": "xrn:firebolt:capability:token:platform" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### granted + +Returns whether the current App has a user grant for passed capability and role. + +```typescript +function granted( + capability: Capability, + options: CapabilityOption, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | [`CapabilityOption`](#capabilityoption) | false | Capability options | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Default capabilities without grants. + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let granted = await Capabilities.granted( + 'xrn:firebolt:capability:input:keyboard', + null, +) +console.log(granted) +``` + +Value of `granted`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.granted", + "params": { + "capability": "xrn:firebolt:capability:input:keyboard" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Get Postal code without grants. + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let granted = await Capabilities.granted( + 'xrn:firebolt:capability:localization:postal-code', + null, +) +console.log(granted) +``` + +Value of `granted`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.granted", + "params": { + "capability": "xrn:firebolt:capability:localization:postal-code" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +Get Postal code with grants. + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let granted = await Capabilities.granted( + 'xrn:firebolt:capability:localization:postal-code', + null, +) +console.log(granted) +``` + +Value of `granted`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.granted", + "params": { + "capability": "xrn:firebolt:capability:localization:postal-code" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### info + +Returns an array of CapabilityInfo objects for the passed in capabilities. + +```typescript +function info(capabilities: Capability[]): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------------- | -------------- | -------- | ---------------------------------------------------------------------- | +| `capabilities` | `Capability[]` | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Default result + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let info = await Capabilities.info([ + 'xrn:firebolt:capability:device:model', + 'xrn:firebolt:capability:input:keyboard', + 'xrn:firebolt:capability:protocol:bluetoothle', + 'xrn:firebolt:capability:token:device', + 'xrn:firebolt:capability:token:platform', + 'xrn:firebolt:capability:protocol:moca', + 'xrn:firebolt:capability:wifi:scan', + 'xrn:firebolt:capability:localization:postal-code', + 'xrn:firebolt:capability:localization:locality', +]) +console.log(info) +``` + +Value of `info`: + +```javascript +;[ + { + capability: 'xrn:firebolt:capability:device:model', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + }, + { + capability: 'xrn:firebolt:capability:input:keyboard', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + }, + { + capability: 'xrn:firebolt:capability:protocol:bluetoothle', + supported: false, + available: false, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['unsupported'], + }, + { + capability: 'xrn:firebolt:capability:token:device', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + }, + { + capability: 'xrn:firebolt:capability:token:platform', + supported: true, + available: false, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['unavailable'], + }, + { + capability: 'xrn:firebolt:capability:protocol:moca', + supported: true, + available: false, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['disabled', 'unavailable'], + }, + { + capability: 'xrn:firebolt:capability:wifi:scan', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['unpermitted'], + }, + { + capability: 'xrn:firebolt:capability:localization:postal-code', + supported: true, + available: true, + use: { + permitted: true, + granted: null, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['ungranted'], + }, + { + capability: 'xrn:firebolt:capability:localization:postal-code', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['ungranted'], + }, + { + capability: 'xrn:firebolt:capability:localization:locality', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + details: ['grantDenied', 'ungranted'], + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.info", + "params": { + "capabilities": [ + "xrn:firebolt:capability:device:model", + "xrn:firebolt:capability:input:keyboard", + "xrn:firebolt:capability:protocol:bluetoothle", + "xrn:firebolt:capability:token:device", + "xrn:firebolt:capability:token:platform", + "xrn:firebolt:capability:protocol:moca", + "xrn:firebolt:capability:wifi:scan", + "xrn:firebolt:capability:localization:postal-code", + "xrn:firebolt:capability:localization:locality" + ] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "capability": "xrn:firebolt:capability:device:model", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:input:keyboard", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:protocol:bluetoothle", + "supported": false, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["unsupported"] + }, + { + "capability": "xrn:firebolt:capability:token:device", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["unavailable"] + }, + { + "capability": "xrn:firebolt:capability:protocol:moca", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["disabled", "unavailable"] + }, + { + "capability": "xrn:firebolt:capability:wifi:scan", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["unpermitted"] + }, + { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": null + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["ungranted"] + }, + { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["ungranted"] + }, + { + "capability": "xrn:firebolt:capability:localization:locality", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["grantDenied", "ungranted"] + } + ] +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Capabilities.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Capabilities.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Capabilities.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Capabilities.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### permitted + +Returns whether the current App has permission to the passed capability and role. + +```typescript +function permitted( + capability: Capability, + options: CapabilityOption, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | [`CapabilityOption`](#capabilityoption) | false | Capability options | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Keyboard + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let permitted = await Capabilities.permitted( + 'xrn:firebolt:capability:input:keyboard', + null, +) +console.log(permitted) +``` + +Value of `permitted`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.permitted", + "params": { + "capability": "xrn:firebolt:capability:input:keyboard" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Keyboard incorrect manage role capability + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let permitted = await Capabilities.permitted( + 'xrn:firebolt:capability:input:keyboard', + { role: 'manage' }, +) +console.log(permitted) +``` + +Value of `permitted`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.permitted", + "params": { + "capability": "xrn:firebolt:capability:input:keyboard", + "options": { + "role": "manage" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +Wifi scan not permitted capability + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let permitted = await Capabilities.permitted( + 'xrn:firebolt:capability:wifi:scan', + null, +) +console.log(permitted) +``` + +Value of `permitted`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.permitted", + "params": { + "capability": "xrn:firebolt:capability:wifi:scan" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### request + +Requests grants for all capability/role combinations in the roles array. + +```typescript +function request(grants: Permission[]): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------------- | -------- | ----------- | +| `grants` | `Permission[]` | true | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:request | + +#### Examples + +Default result + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let request = await Capabilities.request([ + { role: 'use', capability: 'xrn:firebolt:capability:commerce:purchase' }, +]) +console.log(request) +``` + +Value of `request`: + +```javascript +;[ + { + capability: 'xrn:firebolt:capability:commerce:purchase', + supported: true, + available: true, + use: { + permitted: true, + granted: true, + }, + manage: { + permitted: true, + granted: true, + }, + provide: { + permitted: true, + granted: true, + }, + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.request", + "params": { + "grants": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:commerce:purchase" + } + ] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "capability": "xrn:firebolt:capability:commerce:purchase", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + ] +} +``` + +
+ +--- + +### supported + +Returns whether the platform supports the passed capability. + +```typescript +function supported(capability: Capability): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Wifi scan supported capability + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let supported = await Capabilities.supported( + 'xrn:firebolt:capability:wifi:scan', +) +console.log(supported) +``` + +Value of `supported`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.supported", + "params": { + "capability": "xrn:firebolt:capability:wifi:scan" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +BLE protocol unsupported capability + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +let supported = await Capabilities.supported( + 'xrn:firebolt:capability:protocol:bluetoothle', +) +console.log(supported) +``` + +Value of `supported`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.supported", + "params": { + "capability": "xrn:firebolt:capability:protocol:bluetoothle" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +## Events + +### available + +```typescript +function listen('available', capability: Capability, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +[CapabilityInfo](../Capabilities/schemas/#CapabilityInfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Platform token is available + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +Capabilities.listen('available', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unpermitted" + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.onAvailable", + "params": { + "capability": "xrn:firebolt:capability:token:platform", + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["unpermitted"] + } +} +``` + +
+ +--- + +### granted + +```typescript +function listen('granted', role: Role, capability: Capability, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `role` | [`Role`](../Capabilities/schemas/#Role) | true |
values: `'use' \| 'manage' \| 'provide'` | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +[CapabilityInfo](../Capabilities/schemas/#CapabilityInfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Postal code granted + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +Capabilities.listen('granted', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.onGranted", + "params": { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code", + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } +} +``` + +
+ +--- + +### revoked + +```typescript +function listen('revoked', role: Role, capability: Capability, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `role` | [`Role`](../Capabilities/schemas/#Role) | true |
values: `'use' \| 'manage' \| 'provide'` | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +[CapabilityInfo](../Capabilities/schemas/#CapabilityInfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Postal code revoked + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +Capabilities.listen('revoked', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "grantDenied" + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.onRevoked", + "params": { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code", + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["grantDenied"] + } +} +``` + +
+ +--- + +### unavailable + +```typescript +function listen('unavailable', capability: Capability, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +[CapabilityInfo](../Capabilities/schemas/#CapabilityInfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:capabilities:info | + +#### Examples + +Platform token is unavailable. + +JavaScript: + +```javascript +import { Capabilities } from '@firebolt-js/sdk' + +Capabilities.listen('unavailable', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unavailable" + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Capabilities.onUnavailable", + "params": { + "capability": "xrn:firebolt:capability:token:platform", + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": ["unavailable"] + } +} +``` + +
+ +--- + +## Types + +### CapabilityOption + +```typescript +type CapabilityOption = { + role?: Role // Role provides access level for the app for a given capability. +} +``` + +See also: + +[Role](../Capabilities/schemas/#Role) + +--- diff --git a/apis/pr-release-1-3-0/core/Capabilities/schemas/index.md b/apis/pr-release-1-3-0/core/Capabilities/schemas/index.md new file mode 100644 index 00000000..1eac3a37 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Capabilities/schemas/index.md @@ -0,0 +1,121 @@ +--- +title: Capabilities + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Capabilities + +--- + +Version Capabilities 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [Role](#role) + - [DenyReason](#denyreason) + - [Capability](#capability) + - [CapPermissionStatus](#cappermissionstatus) + - [CapabilityInfo](#capabilityinfo) + - [Permission](#permission) + +## Overview + +undefined + +## Types + +### Role + +Role provides access level for the app for a given capability. + +```typescript +Role: { + USE: 'use', + MANAGE: 'manage', + PROVIDE: 'provide', +}, + +``` + +--- + +### DenyReason + +Reasons why a Capability might not be invokable + +```typescript +DenyReason: { + UNPERMITTED: 'unpermitted', + UNSUPPORTED: 'unsupported', + DISABLED: 'disabled', + UNAVAILABLE: 'unavailable', + GRANT_DENIED: 'grantDenied', + UNGRANTED: 'ungranted', +}, + +``` + +--- + +### Capability + +A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + +```typescript + +``` + +--- + +### CapPermissionStatus + +```typescript + +``` + +--- + +### CapabilityInfo + +```typescript +type CapabilityInfo = { + capability?: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + supported: boolean // Provides info whether the capability is supported + available: boolean // Provides info whether the capability is available + use: object + manage: object + provide: object + details?: DenyReason[] // Reasons why a Capability might not be invokable +} +``` + +See also: + +[Capability](#capability) +[DenyReason](#denyreason) + +--- + +### Permission + +A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user). + +```typescript +type Permission = { + role?: Role // Role provides access level for the app for a given capability. + capability: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. +} +``` + +See also: + +[Role](#role) +[Capability](#capability) + +--- diff --git a/apis/pr-release-1-3-0/core/Device/index.md b/apis/pr-release-1-3-0/core/Device/index.md new file mode 100644 index 00000000..95464e68 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Device/index.md @@ -0,0 +1,2010 @@ +--- +title: Device + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Device Module + +--- + +Version Device 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [audio](#audio) + - [distributor](#distributor) + - [hdcp](#hdcp) + - [hdr](#hdr) + - [id](#id) + - [listen](#listen) + - [make](#make) + - [model](#model) + - [name](#name) + - [network](#network) + - [once](#once) + - [platform](#platform) + - [screenResolution](#screenresolution) + - [sku](#sku) + - [type](#type) + - [uid](#uid) + - [version](#version) + - [videoResolution](#videoresolution) +- [Events](#events) + - [audioChanged](#audiochanged) + - [deviceNameChanged](#devicenamechanged) + - [hdcpChanged](#hdcpchanged) + - [hdrChanged](#hdrchanged) + - [nameChanged](#namechanged) + - [networkChanged](#networkchanged) + - [screenResolutionChanged](#screenresolutionchanged) + - [videoResolutionChanged](#videoresolutionchanged) +- [Types](#types) + - [NetworkState](#networkstate) + - [NetworkType](#networktype) + - [AudioProfiles](#audioprofiles) + - [Resolution](#resolution) + +## Usage + +To use the Device module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Device } from '@firebolt-js/sdk' +``` + +## Overview + +A module for querying about the device and it's capabilities. + +## Methods + +### audio + +Get the supported audio profiles + +To get the value of `audio` call the method like this: + +```typescript +function audio(): Promise +``` + +Promise resolution: + +[AudioProfiles](#audioprofiles) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the supported audio profiles + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let supportedAudioProfiles = await Device.audio() +console.log(supportedAudioProfiles) +``` + +Value of `supportedAudioProfiles`: + +```javascript +{ + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.audio", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function audio(callback: (value) => AudioProfiles): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the supported audio profiles + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await audio((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `supportedAudioProfiles`: + +```javascript +{ + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onAudioChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } +} +``` + +
+ +--- + +### distributor + +Get the distributor ID for this device + +To get the value of `distributor` call the method like this: + +```typescript +function distributor(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------ | +| uses | xrn:firebolt:capability:device:distributor | + +#### Examples + +Getting the distributor ID + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let distributorId = await Device.distributor() +console.log(distributorId) +``` + +Value of `distributorId`: + +```javascript +'Company' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.distributor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Company" +} +``` + +
+ +--- + +### hdcp + +Get the supported HDCP profiles + +To get the value of `hdcp` call the method like this: + +```typescript +function hdcp(): Promise +``` + +Promise resolution: + +[BooleanMap](../Types/schemas/#BooleanMap) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the supported HDCP profiles + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let supportedHdcpProfiles = await Device.hdcp() +console.log(supportedHdcpProfiles) +``` + +Value of `supportedHdcpProfiles`: + +```javascript +{ + "hdcp1.4": true, + "hdcp2.2": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.hdcp", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "hdcp1.4": true, + "hdcp2.2": true + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function hdcp(callback: (value) => BooleanMap): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the supported HDCP profiles + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await hdcp((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `supportedHdcpProfiles`: + +```javascript +{ + "hdcp1.4": true, + "hdcp2.2": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onHdcpChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "hdcp1.4": true, + "hdcp2.2": true + } +} +``` + +
+ +--- + +### hdr + +Get the supported HDR profiles + +To get the value of `hdr` call the method like this: + +```typescript +function hdr(): Promise +``` + +Promise resolution: + +[BooleanMap](../Types/schemas/#BooleanMap) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the supported HDR profiles + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let supportedHdrProfiles = await Device.hdr() +console.log(supportedHdrProfiles) +``` + +Value of `supportedHdrProfiles`: + +```javascript +{ + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.hdr", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function hdr(callback: (value) => BooleanMap): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the supported HDR profiles + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await hdr((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `supportedHdrProfiles`: + +```javascript +{ + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onHdrChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } +} +``` + +
+ +--- + +### id + +Get the platform back-office device identifier + +To get the value of `id` call the method like this: + +```typescript +function id(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------- | +| uses | xrn:firebolt:capability:device:id | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let id = await Device.id() +console.log(id) +``` + +Value of `id`: + +```javascript +'123' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.id", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "123" +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### make + +Get the device make + +To get the value of `make` call the method like this: + +```typescript +function make(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:make | + +#### Examples + +Getting the device make + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let make = await Device.make() +console.log(make) +``` + +Value of `make`: + +```javascript +'Arris' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.make", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Arris" +} +``` + +
+ +--- + +### model + +Get the device model + +To get the value of `model` call the method like this: + +```typescript +function model(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------ | +| uses | xrn:firebolt:capability:device:model | + +#### Examples + +Getting the device model + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let model = await Device.model() +console.log(model) +``` + +Value of `model`: + +```javascript +'xi6' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.model", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "xi6" +} +``` + +
+ +--- + +### name + +The human readable name of the device + +To get the value of `name` call the method like this: + +```typescript +function name(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:name | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let value = await Device.name() +console.log(value) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.name", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let value = await Device.name() +console.log(value) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.name", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Kitchen" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function name(callback: (value) => string): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await name((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await name((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Kitchen" +} +``` + +
+ +--- + +### network + +Get the current network status and type + +To get the value of `network` call the method like this: + +```typescript +function network(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:network:status | + +#### Examples + +Getting the network info + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let networkInfo = await Device.network() +console.log(networkInfo) +``` + +Value of `networkInfo`: + +```javascript +{ + "state": "connected", + "type": "wifi" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.network", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "connected", + "type": "wifi" + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function network(callback: (value) => object): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the network info + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await network((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `networkInfo`: + +```javascript +{ + "state": "connected", + "type": "wifi" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onNetworkChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "connected", + "type": "wifi" + } +} +``` + +
+ +--- + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### platform + +Get the platform ID for this device + +To get the value of `platform` call the method like this: + +```typescript +function platform(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the platform ID + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let platformId = await Device.platform() +console.log(platformId) +``` + +Value of `platformId`: + +```javascript +'WPE' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.platform", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "WPE" +} +``` + +
+ +--- + +### screenResolution + +Get the current screen resolution + +To get the value of `screenResolution` call the method like this: + +```typescript +function screenResolution(): Promise +``` + +Promise resolution: + +[Resolution](#resolution) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the screen resolution + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let screenResolution = await Device.screenResolution() +console.log(screenResolution) +``` + +Value of `screenResolution`: + +```javascript +;[1920, 1080] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.screenResolution", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [1920, 1080] +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function screenResolution(callback: (value) => Resolution): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the screen resolution + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await screenResolution((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `screenResolution`: + +```javascript +;[1920, 1080] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onScreenResolutionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [1920, 1080] +} +``` + +
+ +--- + +### sku + +Get the device sku + +To get the value of `sku` call the method like this: + +```typescript +function sku(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------- | +| uses | xrn:firebolt:capability:device:sku | + +#### Examples + +Getting the device sku + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let sku = await Device.sku() +console.log(sku) +``` + +Value of `sku`: + +```javascript +'AX061AEI' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.sku", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "AX061AEI" +} +``` + +
+ +--- + +### type + +Get the device type + +To get the value of `type` call the method like this: + +```typescript +function type(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the device type + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let deviceType = await Device.type() +console.log(deviceType) +``` + +Value of `deviceType`: + +```javascript +'STB' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.type", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "STB" +} +``` + +
+ +--- + +### uid + +Gets a unique id for the current app & device + +To get the value of `uid` call the method like this: + +```typescript +function uid(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------- | +| uses | xrn:firebolt:capability:device:uid | + +#### Examples + +Getting the unique ID + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let uniqueId = await Device.uid() +console.log(uniqueId) +``` + +Value of `uniqueId`: + +```javascript +'ee6723b8-7ab3-462c-8d93-dbf61227998e' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.uid", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "ee6723b8-7ab3-462c-8d93-dbf61227998e" +} +``` + +
+ +--- + +### version + +Get the SDK, OS and other version info + +To get the value of `version` call the method like this: + +```typescript +function version(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the os and sdk versions + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let versions = await Device.version() +console.log(versions) +``` + +Value of `versions`: + +```javascript +{ + "sdk": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt JS SDK v0.8.0" + }, + "api": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt API v0.8.0" + }, + "firmware": { + "major": 1, + "minor": 2, + "patch": 3, + "readable": "Device Firmware v1.2.3" + }, + "os": { + "major": 0, + "minor": 1, + "patch": 0, + "readable": "Firebolt OS v0.1.0" + }, + "debug": "Non-parsable build info for error logging only." +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.version", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "sdk": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt JS SDK v0.8.0" + }, + "api": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt API v0.8.0" + }, + "firmware": { + "major": 1, + "minor": 2, + "patch": 3, + "readable": "Device Firmware v1.2.3" + }, + "os": { + "major": 0, + "minor": 1, + "patch": 0, + "readable": "Firebolt OS v0.1.0" + }, + "debug": "Non-parsable build info for error logging only." + } +} +``` + +
+ +--- + +### videoResolution + +Get the current video resolution + +To get the value of `videoResolution` call the method like this: + +```typescript +function videoResolution(): Promise +``` + +Promise resolution: + +[Resolution](#resolution) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Getting the video resolution + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let videoResolution = await Device.videoResolution() +console.log(videoResolution) +``` + +Value of `videoResolution`: + +```javascript +;[1920, 1080] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.videoResolution", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [1920, 1080] +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function videoResolution(callback: (value) => Resolution): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the video resolution + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +let listenerId = await videoResolution((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `videoResolution`: + +```javascript +;[1920, 1080] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onVideoResolutionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [1920, 1080] +} +``` + +
+ +--- + +## Events + +### audioChanged + +See: [audio](#audio) + +### deviceNameChanged + +```typescript +function listen('deviceNameChanged', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:name | + +#### Examples + +Getting the device name + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/sdk' + +Device.listen('deviceNameChanged', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onDeviceNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +--- + +### hdcpChanged + +See: [hdcp](#hdcp) + +### hdrChanged + +See: [hdr](#hdr) + +### nameChanged + +See: [name](#name) + +### networkChanged + +See: [network](#network) + +### screenResolutionChanged + +See: [screenResolution](#screenresolution) + +### videoResolutionChanged + +See: [videoResolution](#videoresolution) + +## Types + +### NetworkState + +The type of network that is currently active + +```typescript +NetworkState: { + CONNECTED: 'connected', + DISCONNECTED: 'disconnected', +}, + +``` + +--- + +### NetworkType + +The type of network that is currently active + +```typescript +NetworkType: { + WIFI: 'wifi', + ETHERNET: 'ethernet', + HYBRID: 'hybrid', +}, + +``` + +--- + +### AudioProfiles + +```typescript +type AudioProfiles = { + STEREO?: boolean + + DOLBY_DIGITAL_5_1?: boolean + + DOLBY_DIGITAL_7_1?: boolean + + DOLBY_DIGITAL_5_1_PLUS?: boolean + + DOLBY_DIGITAL_7_1_PLUS?: boolean + + DOLBY_ATMOS?: boolean +} +``` + +See also: + +[BooleanMap](../Types/schemas/#BooleanMap) +[AudioProfile](../Types/schemas/#AudioProfile) + +--- + +### Resolution + +```typescript +type Resolution = [ + number, // undefined item + number, // undefined item +] +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Discovery/index.md b/apis/pr-release-1-3-0/core/Discovery/index.md new file mode 100644 index 00000000..72247a40 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Discovery/index.md @@ -0,0 +1,4225 @@ +--- +title: Discovery + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Discovery Module + +--- + +Version Discovery 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) + - [Localization](#localization) +- [Methods](#methods) + - [clearContentAccess](#clearcontentaccess) + - [contentAccess](#contentaccess) + - [entitlements](#entitlements) + - [entityInfo](#entityinfo) + - [launch](#launch) + - [listen](#listen) + - [once](#once) + - [policy](#policy) + - [provide](#provide) + - [purchasedContent](#purchasedcontent) + - [signIn](#signin) + - [signOut](#signout) + - [userInterest](#userinterest) + - [userInterestError](#userinteresterror) + - [userInterestResponse](#userinterestresponse) + - [watched](#watched) + - [watchNext](#watchnext) +- [Events](#events) + - [navigateTo](#navigateto) + - [policyChanged](#policychanged) + - [onRequestUserInterest](#onrequestuserinterest) +- [Provider Interfaces](#provider-interfaces) + - [UserInterestProvider](#userinterestprovider) +- [Types](#types) + - [DiscoveryPolicy](#discoverypolicy) + - [Availability](#availability) + - [UserInterestProviderParameters](#userinterestproviderparameters) + - [PurchasedContentParameters](#purchasedcontentparameters) + - [ContentAccessIdentifiers](#contentaccessidentifiers) + - [EntityInfoParameters](#entityinfoparameters) + - [EntityInfoFederatedRequest](#entityinfofederatedrequest) + - [PurchasedContentFederatedRequest](#purchasedcontentfederatedrequest) + +## Usage + +To use the Discovery module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Discovery } from '@firebolt-js/sdk' +``` + +## Overview + +Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a "Watch Next" tile that links to your app from the platform's home screen. + +Getting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer. + +Under the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on. + +The Discovery plugin is used to _send_ information to the Platform. + +### Localization + +Apps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property. + +Apps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency. + +## Methods + +### clearContentAccess + +Clear both availabilities and entitlements from the subscriber. This is equivalent of calling `Discovery.contentAccess({ availabilities: [], entitlements: []})`. This is typically called when the user signs out of an account. + +```typescript +function clearContentAccess(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:content-access | + +#### Examples + +Clear subscriber's availabilities and entitlements + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.clearContentAccess() +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.clearContentAccess", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### contentAccess + +Inform the platform of what content the user can access either by discovering it or consuming it. Availabilities determine which content is discoverable to a user, while entitlements determine if the user can currently consume that content. Content can be available but not entitled, this means that user can see the content but when they try to open it they must gain an entitlement either through purchase or subscription upgrade. In case the access changed off-device, this API should be called any time the app comes to the foreground to refresh the access. This API should also be called any time the availabilities or entitlements change within the app for any reason. Typical reasons may include the user signing into an account or upgrading a subscription. Less common cases can cause availabilities to change, such as moving to a new service location. When availabilities or entitlements are removed from the subscriber (such as when the user signs out), then an empty array should be given. To clear both, use the Discovery.clearContentAccess convenience API. + +```typescript +function contentAccess(ids: ContentAccessIdentifiers): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ----- | ------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | +| `ids` | [`ContentAccessIdentifiers`](#contentaccessidentifiers) | true | A list of identifiers that represent content that is discoverable or consumable for the subscriber | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:content-access | + +#### Examples + +Update subscriber's availabilities + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.contentAccess({ + availabilities: [ + { + type: 'channel-lineup', + id: 'partner.com/availability/123', + startTime: '2021-04-23T18:25:43.511Z', + endTime: '2021-04-23T18:25:43.511Z', + }, + { + type: 'channel-lineup', + id: 'partner.com/availability/456', + startTime: '2021-04-23T18:25:43.511Z', + endTime: '2021-04-23T18:25:43.511Z', + }, + ], +}) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.contentAccess", + "params": { + "ids": { + "availabilities": [ + { + "type": "channel-lineup", + "id": "partner.com/availability/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "type": "channel-lineup", + "id": "partner.com/availability/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Update subscriber's availabilities and entitlements + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.contentAccess({ + availabilities: [ + { + type: 'channel-lineup', + id: 'partner.com/availability/123', + startTime: '2021-04-23T18:25:43.511Z', + endTime: '2021-04-23T18:25:43.511Z', + }, + { + type: 'channel-lineup', + id: 'partner.com/availability/456', + startTime: '2021-04-23T18:25:43.511Z', + endTime: '2021-04-23T18:25:43.511Z', + }, + ], + entitlements: [ + { + entitlementId: '123', + startTime: '2025-01-01T00:00:00.000Z', + endTime: '2025-01-01T00:00:00.000Z', + }, + ], +}) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.contentAccess", + "params": { + "ids": { + "availabilities": [ + { + "type": "channel-lineup", + "id": "partner.com/availability/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "type": "channel-lineup", + "id": "partner.com/availability/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ], + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Update subscriber's entitlements + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.contentAccess({ + entitlements: [ + { + entitlementId: '123', + startTime: '2025-01-01T00:00:00.000Z', + endTime: '2025-01-01T00:00:00.000Z', + }, + ], +}) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.contentAccess", + "params": { + "ids": { + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Clear a subscriber's entitlements + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.contentAccess({ entitlements: [] }) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.contentAccess", + "params": { + "ids": { + "entitlements": [] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Clear a subscriber's availabilities + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.contentAccess({ availabilities: [] }) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.contentAccess", + "params": { + "ids": { + "availabilities": [] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### entitlements + +Inform the platform of the users latest entitlements w/in this app. + +```typescript +function entitlements(entitlements: Entitlement[]): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------------- | --------------- | -------- | ---------------------------- | +| `entitlements` | `Entitlement[]` | true | Array of entitlement objects | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:content-access | + +#### Examples + +Update user's entitlements + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entitlements([ + { + entitlementId: 'partner.com/entitlement/123', + startTime: '2021-04-23T18:25:43.511Z', + endTime: '2021-04-23T18:25:43.511Z', + }, + { + entitlementId: 'partner.com/entitlement/456', + startTime: '2021-04-23T18:25:43.511Z', + endTime: '2021-04-23T18:25:43.511Z', + }, +]) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.entitlements", + "params": { + "entitlements": [ + { + "entitlementId": "partner.com/entitlement/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "entitlementId": "partner.com/entitlement/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### entityInfo + +Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow. Includes information about the program entity and its relevant associated entities, such as extras, previews, and, in the case of TV series, seasons and episodes. + +See the `EntityInfo` and `WayToWatch` data structures below for more information. + +The app only needs to implement Pull support for `entityInfo` at this time. + +To allow the platform to pull data, use `entityInfo(callback: Function)`: + +```typescript +function entityInfo( + callback: (parameters: EntityInfoParameters) => Promise, +): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------ | +| `callback` | `Function` | Yes | A callback for the platform to pull EntityInfoResult objects | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------------ | ---------------------- | -------- | --------------------------------------------------------------------------- | +| `parameters` | `EntityInfoParameters` | Yes | An object describing the platform's query for an `EntityInfoResult` object. | + +```typescript +type EntityInfoParameters = { + entityId: string + assetId?: string +} +``` + +Callback promise resolution: + +```typescript +type EntityInfoResult = { + expires: string + entity: EntityInfo // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + related?: EntityInfo[] +} +``` + +See also: [EntityInfoResult](#entityinforesult-1) + +#### Examples + +Send entity info for a movie to the platform. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entityInfo(async (parameters) => { + console.log(parameters.entityId) + console.log(parameters.assetId) + return { + expires: '2025-01-01T00:00:00.000Z', + entity: { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'movie', + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '123', + }, + expires: '2025-01-01T00:00:00.000Z', + entitled: true, + entitledExpires: '2025-01-01T00:00:00.000Z', + offeringType: 'buy', + price: 2.99, + videoQuality: ['UHD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + subtitles: ['es'], + audioDescriptions: ['en'], + }, + ], + }, + } +}) +console.log(success) +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onPullEntityInfo", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } +} +``` + +Push Request: + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "method": "Discovery.entityInfo", + "params": { + "correlationId": "TBD", + "result": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": ["UHD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"], + "subtitles": ["es"], + "audioDescriptions": ["en"] + } + ] + } + } + } +} +``` + +
+ +Send entity info for a movie with a trailer to the platform. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entityInfo(async (parameters) => { + console.log(parameters.entityId) + console.log(parameters.assetId) + return { + expires: '2025-01-01T00:00:00.000Z', + entity: { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'movie', + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '123', + }, + expires: '2025-01-01T00:00:00.000Z', + entitled: true, + entitledExpires: '2025-01-01T00:00:00.000Z', + offeringType: 'buy', + price: 2.99, + videoQuality: ['UHD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + subtitles: ['es'], + audioDescriptions: ['en'], + }, + ], + }, + related: [ + { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'preview', + title: 'Cool Runnings Trailer', + waysToWatch: [ + { + identifiers: { + assetId: '123111', + entityId: '345', + }, + entitled: true, + videoQuality: ['HD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + ], + } +}) +console.log(success) +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onPullEntityInfo", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } +} +``` + +Push Request: + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "method": "Discovery.entityInfo", + "params": { + "correlationId": "TBD", + "result": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": ["UHD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"], + "subtitles": ["es"], + "audioDescriptions": ["en"] + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "preview", + "title": "Cool Runnings Trailer", + "waysToWatch": [ + { + "identifiers": { + "assetId": "123111", + "entityId": "345" + }, + "entitled": true, + "videoQuality": ["HD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + } + ] + } + } +} +``` + +
+ +Send entity info for a TV Series with seasons and episodes to the platform. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entityInfo(async (parameters) => { + console.log(parameters.entityId) + console.log(parameters.assetId) + return { + expires: '2025-01-01T00:00:00.000Z', + entity: { + identifiers: { + entityId: '98765', + }, + entityType: 'program', + programType: 'series', + title: 'Perfect Strangers', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1986-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + }, + related: [ + { + identifiers: { + entityId: '111', + seriesId: '98765', + }, + entityType: 'program', + programType: 'season', + seasonNumber: 1, + title: 'Perfect Strangers Season 3', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '556', + entityId: '111', + seriesId: '98765', + }, + entitled: true, + offeringType: 'free', + videoQuality: ['SD'], + audioProfile: ['stereo'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + { + identifiers: { + entityId: '111', + seriesId: '98765', + }, + entityType: 'program', + programType: 'episode', + seasonNumber: 1, + episodeNumber: 1, + title: "Knock Knock, Who's There?", + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1986-03-25T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '556', + entityId: '111', + seriesId: '98765', + }, + entitled: true, + offeringType: 'free', + videoQuality: ['SD'], + audioProfile: ['stereo'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + { + identifiers: { + entityId: '112', + seriesId: '98765', + }, + entityType: 'program', + programType: 'episode', + seasonNumber: 1, + episodeNumber: 2, + title: 'Picture This', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1986-04-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '557', + entityId: '112', + seriesId: '98765', + }, + entitled: true, + offeringType: 'free', + videoQuality: ['SD'], + audioProfile: ['stereo'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + ], + } +}) +console.log(success) +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onPullEntityInfo", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } +} +``` + +Push Request: + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "method": "Discovery.entityInfo", + "params": { + "correlationId": "TBD", + "result": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "98765" + }, + "entityType": "program", + "programType": "series", + "title": "Perfect Strangers", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "season", + "seasonNumber": 1, + "title": "Perfect Strangers Season 3", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": ["SD"], + "audioProfile": ["stereo"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + }, + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 1, + "title": "Knock Knock, Who's There?", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-03-25T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": ["SD"], + "audioProfile": ["stereo"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + }, + { + "identifiers": { + "entityId": "112", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 2, + "title": "Picture This", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-04-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "557", + "entityId": "112", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": ["SD"], + "audioProfile": ["stereo"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + } + ] + } + } +} +``` + +
+ +To push data to the platform, e.g. during app launch, use `entityInfo(result: EntityInfoResult)`: + +```typescript +function entityInfo(result: EntityInfoResult): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| -------- | ------------------ | -------- | --------------------------------------------------- | +| `result` | `EntityInfoResult` | Yes | The `EntityInfoResult` data to push to the platform | + +```typescript +type EntityInfoResult = { + expires: string + entity: EntityInfo // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + related?: EntityInfo[] +} +``` + +See also: [EntityInfo](#entityinfo-1) + +Promise resolution: + +| Type | Summary | +| --------- | -------------------------------------- | +| `boolean` | Whether or not the push was successful | + +#### Examples + +Send entity info for a movie to the platform. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entityInfo({ + expires: '2025-01-01T00:00:00.000Z', + entity: { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'movie', + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '123', + }, + expires: '2025-01-01T00:00:00.000Z', + entitled: true, + entitledExpires: '2025-01-01T00:00:00.000Z', + offeringType: 'buy', + price: 2.99, + videoQuality: ['UHD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + subtitles: ['es'], + audioDescriptions: ['en'], + }, + ], + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.entityInfo", + "params": { + "correlationId": null, + "result": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": ["UHD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"], + "subtitles": ["es"], + "audioDescriptions": ["en"] + } + ] + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Send entity info for a movie with a trailer to the platform. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entityInfo({ + expires: '2025-01-01T00:00:00.000Z', + entity: { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'movie', + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '123', + }, + expires: '2025-01-01T00:00:00.000Z', + entitled: true, + entitledExpires: '2025-01-01T00:00:00.000Z', + offeringType: 'buy', + price: 2.99, + videoQuality: ['UHD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + subtitles: ['es'], + audioDescriptions: ['en'], + }, + ], + }, + related: [ + { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'preview', + title: 'Cool Runnings Trailer', + waysToWatch: [ + { + identifiers: { + assetId: '123111', + entityId: '345', + }, + entitled: true, + videoQuality: ['HD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + ], +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.entityInfo", + "params": { + "correlationId": null, + "result": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": ["UHD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"], + "subtitles": ["es"], + "audioDescriptions": ["en"] + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "preview", + "title": "Cool Runnings Trailer", + "waysToWatch": [ + { + "identifiers": { + "assetId": "123111", + "entityId": "345" + }, + "entitled": true, + "videoQuality": ["HD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + } + ] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Send entity info for a TV Series with seasons and episodes to the platform. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.entityInfo({ + expires: '2025-01-01T00:00:00.000Z', + entity: { + identifiers: { + entityId: '98765', + }, + entityType: 'program', + programType: 'series', + title: 'Perfect Strangers', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1986-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + }, + related: [ + { + identifiers: { + entityId: '111', + seriesId: '98765', + }, + entityType: 'program', + programType: 'season', + seasonNumber: 1, + title: 'Perfect Strangers Season 3', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '556', + entityId: '111', + seriesId: '98765', + }, + entitled: true, + offeringType: 'free', + videoQuality: ['SD'], + audioProfile: ['stereo'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + { + identifiers: { + entityId: '111', + seriesId: '98765', + }, + entityType: 'program', + programType: 'episode', + seasonNumber: 1, + episodeNumber: 1, + title: "Knock Knock, Who's There?", + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1986-03-25T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '556', + entityId: '111', + seriesId: '98765', + }, + entitled: true, + offeringType: 'free', + videoQuality: ['SD'], + audioProfile: ['stereo'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + { + identifiers: { + entityId: '112', + seriesId: '98765', + }, + entityType: 'program', + programType: 'episode', + seasonNumber: 1, + episodeNumber: 2, + title: 'Picture This', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1986-04-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-TV', + rating: 'TV-PG', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '557', + entityId: '112', + seriesId: '98765', + }, + entitled: true, + offeringType: 'free', + videoQuality: ['SD'], + audioProfile: ['stereo'], + audioLanguages: ['en'], + closedCaptions: ['en'], + }, + ], + }, + ], +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.entityInfo", + "params": { + "correlationId": null, + "result": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "98765" + }, + "entityType": "program", + "programType": "series", + "title": "Perfect Strangers", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "season", + "seasonNumber": 1, + "title": "Perfect Strangers Season 3", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": ["SD"], + "audioProfile": ["stereo"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + }, + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 1, + "title": "Knock Knock, Who's There?", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-03-25T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": ["SD"], + "audioProfile": ["stereo"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + }, + { + "identifiers": { + "entityId": "112", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 2, + "title": "Picture This", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-04-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "557", + "entityId": "112", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": ["SD"], + "audioProfile": ["stereo"], + "audioLanguages": ["en"], + "closedCaptions": ["en"] + } + ] + } + ] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### launch + +Launch or foreground the specified app, and optionally instructs it to navigate to the specified user action. +For the Primary Experience, the appId can be any one of: + +- xrn:firebolt:application-type:main + +- xrn:firebolt:application-type:settings + +```typescript +function launch(appId: string, intent: NavigationIntent): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | ---------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `appId` | `string` | true | The durable app Id of the app to launch | +| `intent` | [`NavigationIntent`](../Intents/schemas/#NavigationIntent) | false | An optional `NavigationIntent` with details about what part of the app to show first, and context around how/why it was launched | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:launch | + +#### Examples + +Launch the 'Foo' app to it's home screen. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('foo', { + action: 'home', + context: { source: 'voice' }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "foo", + "intent": { + "action": "home", + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the 'Foo' app to it's own page for a specific entity. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('foo', { + action: 'entity', + data: { + entityType: 'program', + programType: 'movie', + entityId: 'example-movie-id', + }, + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "foo", + "intent": { + "action": "entity", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the 'Foo' app to a fullscreen playback experience for a specific entity. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('foo', { + action: 'playback', + data: { + entityType: 'program', + programType: 'movie', + entityId: 'example-movie-id', + }, + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "foo", + "intent": { + "action": "playback", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to a global page for a specific entity. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('xrn:firebolt:application-type:main', { + action: 'entity', + data: { + entityType: 'program', + programType: 'movie', + entityId: 'example-movie-id', + }, + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:main", + "intent": { + "action": "entity", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to a global page for the company / partner with the ID 'foo'. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('xrn:firebolt:application-type:main', { + action: 'section', + data: { + sectionName: 'company:foo', + }, + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:main", + "intent": { + "action": "section", + "data": { + "sectionName": "company:foo" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to it's home screen, as if the Home remote button was pressed. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('xrn:firebolt:application-type:main', { + action: 'home', + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:main", + "intent": { + "action": "home", + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to it's search screen. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('xrn:firebolt:application-type:main', { + action: 'search', + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:main", + "intent": { + "action": "search", + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to it's settings screen. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch( + 'xrn:firebolt:application-type:settings ', + { + action: 'section', + data: { + sectionName: 'settings', + }, + context: { + source: 'voice', + }, + }, +) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:settings ", + "intent": { + "action": "section", + "data": { + "sectionName": "settings" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to it's linear/epg guide. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('xrn:firebolt:application-type:main', { + action: 'section', + data: { + sectionName: 'guide', + }, + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:main", + "intent": { + "action": "section", + "data": { + "sectionName": "guide" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Launch the Aggregated Experience to the App Store details page for a specific app with the ID 'foo'. + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.launch('xrn:firebolt:application-type:main ', { + action: 'section', + data: { + sectionName: 'app:foo', + }, + context: { + source: 'voice', + }, +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.launch", + "params": { + "appId": "xrn:firebolt:application-type:main ", + "intent": { + "action": "section", + "data": { + "sectionName": "app:foo" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### policy + +get the discovery policy + +To get the value of `policy` call the method like this: + +```typescript +function policy(): Promise +``` + +Promise resolution: + +[DiscoveryPolicy](#discoverypolicy) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:discovery:policy | + +#### Examples + +Getting the discovery policy + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let policy = await Discovery.policy() +console.log(policy) +``` + +Value of `policy`: + +```javascript +{ + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.policy", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true + } +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function policy(callback: (value) => DiscoveryPolicy): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Getting the discovery policy + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let listenerId = await policy((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `policy`: + +```javascript +{ + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onPolicyChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true + } +} +``` + +
+ +--- + +### provide + +To provide a specific capability to the platform. See [Provider Interfaces](#provider-interfaces) for a list of interfaces available to provide in this module. + +```typescript +provide(capability: string, provider: any): void +``` + +Parameters: + +| Param | Type | Required | Summary | +| ------------ | -------- | -------- | -------------------------------------------- | +| `capability` | `string` | Yes | The capability that is being provided. | +| `provider` | `any` | Yes | An implementation of the required interface. | + +See [Provider Interfaces](#provider-interfaces) for each capabilities interface definition. + +### purchasedContent + +Return content purchased by the user, such as rentals and electronic sell through purchases. + +The app should return the user's 100 most recent purchases in `entries`. The total count of purchases must be provided in `count`. If `count` is greater than the total number of `entries`, the UI may provide a link into the app to see the complete purchase list. + +The `EntityInfo` object returned is not required to have `waysToWatch` populated, but it is recommended that it do so in case the UI wants to surface additional information on the purchases screen. + +The app should implement both Push and Pull methods for `purchasedContent`. + +The app should actively push `purchasedContent` when: + +- The app becomes Active. +- When the state of the purchasedContent set has changed. +- The app goes into Inactive or Background state, if there is a chance a change event has been missed. + +To allow the platform to pull data, use `purchasedContent(callback: Function)`: + +```typescript +function purchasedContent( + callback: ( + parameters: PurchasedContentParameters, + ) => Promise, +): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------ | +| `callback` | `Function` | Yes | A callback for the platform to pull PurchasedContentResult objects | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------------ | ---------------------------- | -------- | --------------------------------------------------------------------------------- | +| `parameters` | `PurchasedContentParameters` | Yes | An object describing the platform's query for an `PurchasedContentResult` object. | + +```typescript +type PurchasedContentParameters = { + limit: number + offeringType?: OfferingType // The offering type of the WayToWatch. + programType?: ProgramType // In the case of a program `entityType`, specifies the program type. +} +``` + +Callback promise resolution: + +```typescript +type PurchasedContentResult = { + expires: string + totalCount: number + entries: EntityInfo[] +} +``` + +See also: [PurchasedContentResult](#purchasedcontentresult-1) + +#### Examples + +Inform the platform of the user's purchased content + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.purchasedContent(async (parameters) => { + console.log(parameters.entityId) + console.log(parameters.assetId) + return { + totalCount: 10, + expires: '2025-01-01T00:00:00.000Z', + entries: [ + { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'movie', + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '123', + }, + expires: '2025-01-01T00:00:00.000Z', + entitled: true, + entitledExpires: '2025-01-01T00:00:00.000Z', + offeringType: 'buy', + price: 2.99, + videoQuality: ['UHD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + subtitles: ['es'], + audioDescriptions: ['en'], + }, + ], + }, + ], + } +}) +console.log(success) +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onPullPurchasedContent", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "xyz", + "parameters": { + "limit": 100 + } + } +} +``` + +Push Request: + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "method": "Discovery.purchasedContent", + "params": { + "correlationId": "TBD", + "result": { + "totalCount": 10, + "expires": "2025-01-01T00:00:00.000Z", + "entries": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": ["UHD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"], + "subtitles": ["es"], + "audioDescriptions": ["en"] + } + ] + } + ] + } + } +} +``` + +
+ +To push data to the platform, e.g. during app launch, use `purchasedContent(result: PurchasedContentResult)`: + +```typescript +function purchasedContent(result: PurchasedContentResult): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| -------- | ------------------------ | -------- | --------------------------------------------------------- | +| `result` | `PurchasedContentResult` | Yes | The `PurchasedContentResult` data to push to the platform | + +```typescript +type PurchasedContentResult = { + expires: string + totalCount: number + entries: EntityInfo[] +} +``` + +See also: [PurchasedContent](#purchasedcontent-1) + +Promise resolution: + +| Type | Summary | +| --------- | -------------------------------------- | +| `boolean` | Whether or not the push was successful | + +#### Examples + +Inform the platform of the user's purchased content + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.purchasedContent({ + totalCount: 10, + expires: '2025-01-01T00:00:00.000Z', + entries: [ + { + identifiers: { + entityId: '345', + }, + entityType: 'program', + programType: 'movie', + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + waysToWatch: [ + { + identifiers: { + assetId: '123', + }, + expires: '2025-01-01T00:00:00.000Z', + entitled: true, + entitledExpires: '2025-01-01T00:00:00.000Z', + offeringType: 'buy', + price: 2.99, + videoQuality: ['UHD'], + audioProfile: ['dolbyAtmos'], + audioLanguages: ['en'], + closedCaptions: ['en'], + subtitles: ['es'], + audioDescriptions: ['en'], + }, + ], + }, + ], +}) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.purchasedContent", + "params": { + "correlationId": null, + "result": { + "totalCount": 10, + "expires": "2025-01-01T00:00:00.000Z", + "entries": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": ["UHD"], + "audioProfile": ["dolbyAtmos"], + "audioLanguages": ["en"], + "closedCaptions": ["en"], + "subtitles": ["es"], + "audioDescriptions": ["en"] + } + ] + } + ] + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### signIn + +Inform the platform that your user is signed in, for increased visibility in search & discovery. Sign-in state is used separately from what content can be access through entitlements and availabilities. Sign-in state may be used when deciding whether to choose this app to handle a user intent. For instance, if the user tries to launch something generic like playing music from an artist, only a signed-in app will be chosen. If the user wants to tune to a channel, only a signed-in app will be chosen to handle that intent. While signIn can optionally include entitlements as those typically change at signIn time, it is recommended to make a separate call to Discovery.contentAccess for entitlements. signIn is not only for when a user explicitly enters login credentials. If an app does not require any credentials from the user to consume content, such as in a free app, then the app should call signIn immediately on launch. + +```typescript +function signIn(entitlements: Entitlement[]): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------- | +| `entitlements` | `Entitlement[]` | false | Optional array of Entitlements, in case of a different user account, or a long time since last sign-in. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:sign-in-status | + +#### Examples + +Send signIn metric + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.signIn(null) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.signIn", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Send signIn notification with entitlements + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.signIn([ + { + entitlementId: '123', + startTime: '2025-01-01T00:00:00.000Z', + endTime: '2025-01-01T00:00:00.000Z', + }, +]) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.signIn", + "params": { + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### signOut + +Inform the platform that your user has signed out. See `Discovery.signIn` for more details on how the sign-in state is used.signOut will NOT clear entitlements, the app should make a separate call to Discovery.clearContentAccess. Apps should also call signOut when a login token has expired and the user is now in a signed-out state. + +```typescript +function signOut(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:sign-in-status | + +#### Examples + +Send signOut notification + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.signOut() +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.signOut", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### userInterest + +Send an entity that the user has expressed interest in to the platform. + +```typescript +function userInterest( + type: InterestType, + reason: InterestReason, + entity: EntityDetails, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------------------------------------------------------- | -------- | ------------------------------------------------------ | +| `type` | [`InterestType`](../Discovery/schemas/#InterestType) | true |
values: `'interest' \| 'disinterest'` | +| `reason` | [`InterestReason`](../Discovery/schemas/#InterestReason) | true |
values: `'playlist' \| 'reaction' \| 'recording'` | +| `entity` | [`EntityDetails`](../Entity/schemas/#EntityDetails) | true | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------ | +| provides | xrn:firebolt:capability:discovery:interest | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let result = await Discovery.userInterest('interest', 'playlist', { + identifiers: { + entityId: '345', + entityType: 'program', + programType: 'movie', + }, + info: {}, +}) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.userInterest", + "params": { + "type": "interest", + "reason": "playlist", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": {} + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### userInterestError + +_This is an private RPC method._ + +Internal API for .onRequestUserInterest Provider to send back error. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `error` | `object` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------ | +| provides | xrn:firebolt:capability:discovery:interest | + +#### Examples + +Example 1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.userInterestError", + "params": { + "correlationId": "123", + "error": { + "code": 1, + "message": "Error" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### userInterestResponse + +_This is an private RPC method._ + +Internal API for .onRequestUserInterest Provider to send back response. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | --------------------------------------------------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `result` | [`EntityDetails`](../Entity/schemas/#EntityDetails) | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------ | +| provides | xrn:firebolt:capability:discovery:interest | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.userInterestResponse", + "params": { + "correlationId": "123", + "result": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### watched + +Notify the platform that content was partially or completely watched + +```typescript +function watched( + entityId: string, + progress: number, + completed: boolean, + watchedOn: string, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ----------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------- | +| `entityId` | `string` | true | The entity Id of the watched content. | +| `progress` | `number` | false | How much of the content has been watched (percentage as 0-1 for VOD, number of seconds for live)
minumum: 0 | +| `completed` | `boolean` | false | Whether or not this viewing is considered "complete," per the app's definition thereof | +| `watchedOn` | `string` | false | Date/Time the content was watched, ISO 8601 Date/Time
format: date-time | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------------- | +| uses | xrn:firebolt:capability:discovery:watched | + +#### Examples + +Notifying the platform of watched content + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.watched( + 'partner.com/entity/123', + 0.95, + true, + '2021-04-23T18:25:43.511Z', +) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.watched", + "params": { + "entityId": "partner.com/entity/123", + "progress": 0.95, + "completed": true, + "watchedOn": "2021-04-23T18:25:43.511Z" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### watchNext + +Suggest a call-to-action for this app on the platform home screen + +```typescript +function watchNext( + title: LocalizedString, + identifiers: ContentIdentifiers, + expires: string, + images: object, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | -------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------- | +| `title` | [`LocalizedString`](../Types/schemas/#LocalizedString) | true | The title of this call to action | +| `identifiers` | [`ContentIdentifiers`](../Entertainment/schemas/#ContentIdentifiers) | true | A set of content identifiers for this call to action | +| `expires` | `string` | false | When this call to action should no longer be presented to users
format: date-time | +| `images` | `object` | false | A set of images for this call to action | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------------- | +| uses | xrn:firebolt:capability:discovery:watch-next | + +#### Examples + +Suggest a watch-next tile for the home screen + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.watchNext( + 'A Cool Show', + { + entityId: 'partner.com/entity/123', + }, + '2021-04-23T18:25:43.511Z', + { + '3x4': { + 'en-US': 'https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg', + es: 'https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg', + }, + '16x9': { + en: 'https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg', + }, + }, +) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.watchNext", + "params": { + "title": "A Cool Show", + "identifiers": { + "entityId": "partner.com/entity/123" + }, + "expires": "2021-04-23T18:25:43.511Z", + "images": { + "3x4": { + "en-US": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg", + "es": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg" + }, + "16x9": { + "en": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg" + } + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Suggest a watch-next tile for the home screen + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +let success = await Discovery.watchNext( + 'A Fantastic Show', + { entityId: 'partner.com/entity/456' }, + null, + null, +) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.watchNext", + "params": { + "title": "A Fantastic Show", + "identifiers": { + "entityId": "partner.com/entity/456" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +## Events + +### navigateTo + +```typescript +function listen('navigateTo', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[NavigationIntent](../Intents/schemas/#NavigationIntent) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:discovery:navigate-to | + +#### Examples + +Listening for `navigateTo` events + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +Discovery.listen('navigateTo', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "action": "search", + "data": { + "query": "a cool show" + }, + "context": { + "campaign": "unknown", + "source": "voice" + } +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onNavigateTo", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "action": "search", + "data": { + "query": "a cool show" + }, + "context": { + "campaign": "unknown", + "source": "voice" + } + } +} +``` + +
+ +--- + +### policyChanged + +See: [policy](#policy) + +### onRequestUserInterest + +_This is an private RPC method._ + +Provide information about the entity currently displayed or selected on the screen. + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------- | -------- | ----------- | +| `listen` | `boolean` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------ | +| provides | xrn:firebolt:capability:discovery:interest | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onRequestUserInterest", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "xyz", + "parameters": { + "type": "interest", + "reason": "playlist" + } + } +} +``` + +--- + +## Provider Interfaces + +### UserInterestProvider + +The provider interface for the `xrn:firebolt:capability:discovery:interest` capability. + +```typescript +interface UserInterestProvider { + userInterest( + parameters: UserInterestProviderParameters, + session: ProviderSession, + ): Promise +} +``` + +Usage: + +```typescript +Discovery.provide('xrn:firebolt:capability:discovery:interest', provider: UserInterestProvider | object) +``` + +#### Examples + +**Register your app to provide the `xrn:firebolt:capability:discovery:interest` capability.** + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +class MyUserInterestProvider { + async userInterest(parameters, session) { + return { + identifiers: { + entityId: '345', + entityType: 'program', + programType: 'movie', + }, + info: { + title: 'Cool Runnings', + synopsis: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.', + releaseDate: '1993-01-01T00:00:00.000Z', + contentRatings: [ + { + scheme: 'US-Movie', + rating: 'PG', + }, + { + scheme: 'CA-Movie', + rating: 'G', + }, + ], + }, + } + } +} + +Discovery.provide( + 'xrn:firebolt:capability:discovery:interest', + new MyUserInterestProvider(), +) +``` + +
+ JSON-RPC + +**Register to recieve each provider API** + +Request: + +```json +{ + "id": 1, + "method": "Discovery.onRequestUserInterest", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "id": 1, + "result": { + "listening": true, + "event": "Discovery.onRequestUserInterest" + } +} +``` + +**Asynchronous event to initiate userInterest()** + +Event Response: + +```json +{ + "id": 1, + "result": { + "correlationId": undefined, + "parameters": { + "type": "interest", + "reason": "playlist" + } + } +} +``` + +**App initiated response to event** + +Request: + +```json +{ + "id": 2, + "method": "Discovery.userInterestResponse", + "params": { + "correlationId": undefined, + "result": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } +} +``` + +Response: + +```json +{ + "id": 2, + "result": true +} +``` + +
+ +## Types + +### DiscoveryPolicy + +```typescript +type DiscoveryPolicy = { + enableRecommendations: boolean // Whether or not to the user has enabled history-based recommendations + shareWatchHistory: boolean // Whether or not the user has enabled app watch history data to be shared with the platform + rememberWatchedPrograms: boolean // Whether or not the user has enabled watch history +} +``` + +--- + +### Availability + +```typescript +type Availability = { + type: 'channel-lineup' | 'program-lineup' + id: string + catalogId?: string + startTime?: string + endTime?: string +} +``` + +--- + +### UserInterestProviderParameters + +```typescript +type UserInterestProviderParameters = { + type: InterestType + reason: InterestReason +} +``` + +See also: + +[InterestType](../Discovery/schemas/#InterestType) +[InterestReason](../Discovery/schemas/#InterestReason) + +--- + +### PurchasedContentParameters + +```typescript +type PurchasedContentParameters = { + limit: number + offeringType?: OfferingType // The offering type of the WayToWatch. + programType?: ProgramType // In the case of a program `entityType`, specifies the program type. +} +``` + +See also: + +[OfferingType](../Entertainment/schemas/#OfferingType) +[ProgramType](../Entertainment/schemas/#ProgramType) + +--- + +### ContentAccessIdentifiers + +```typescript +type ContentAccessIdentifiers = { + availabilities?: Availability[] // A list of identifiers that represent what content is discoverable for the subscriber. Excluding availabilities will cause no change to the availabilities that are stored for this subscriber. Providing an empty array will clear the subscriber's availabilities + entitlements?: Entitlement[] // A list of identifiers that represent what content is consumable for the subscriber. Excluding entitlements will cause no change to the entitlements that are stored for this subscriber. Providing an empty array will clear the subscriber's entitlements +} +``` + +See also: + +[Availability](#availability) +[Entitlement](../Entertainment/schemas/#Entitlement) + +--- + +### EntityInfoParameters + +```typescript +type EntityInfoParameters = { + entityId: string + assetId?: string +} +``` + +--- + +### EntityInfoFederatedRequest + +```typescript +type EntityInfoFederatedRequest = { + parameters: EntityInfoParameters + correlationId: string +} +``` + +See also: + +[FederatedRequest](#federatedrequest) +[EntityInfoParameters](#entityinfoparameters) + +--- + +### PurchasedContentFederatedRequest + +```typescript +type PurchasedContentFederatedRequest = { + parameters: PurchasedContentParameters + correlationId: string +} +``` + +See also: + +[FederatedRequest](#federatedrequest) +[PurchasedContentParameters](#purchasedcontentparameters) + +--- diff --git a/apis/pr-release-1-3-0/core/Discovery/schemas/index.md b/apis/pr-release-1-3-0/core/Discovery/schemas/index.md new file mode 100644 index 00000000..bb06da86 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Discovery/schemas/index.md @@ -0,0 +1,88 @@ +--- +title: Discovery + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Discovery + +--- + +Version Discovery 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [InterestType](#interesttype) + - [InterestReason](#interestreason) + - [EntityInfoResult](#entityinforesult) + - [PurchasedContentResult](#purchasedcontentresult) + +## Overview + +undefined + +## Types + +### InterestType + +```typescript +InterestType: { + INTEREST: 'interest', + DISINTEREST: 'disinterest', +}, + +``` + +--- + +### InterestReason + +```typescript +InterestReason: { + PLAYLIST: 'playlist', + REACTION: 'reaction', + RECORDING: 'recording', +}, + +``` + +--- + +### EntityInfoResult + +The result for an `entityInfo()` push or pull. + +```typescript +type EntityInfoResult = { + expires: string + entity: EntityInfo // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + related?: EntityInfo[] // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. +} +``` + +See also: + +[EntityInfo](../Entertainment/schemas/#EntityInfo) + +--- + +### PurchasedContentResult + +```typescript +type PurchasedContentResult = { + expires: string + totalCount: number + entries: EntityInfo[] // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. +} +``` + +See also: + +[EntityInfo](../Entertainment/schemas/#EntityInfo) + +--- diff --git a/apis/pr-release-1-3-0/core/Entertainment/schemas/index.md b/apis/pr-release-1-3-0/core/Entertainment/schemas/index.md new file mode 100644 index 00000000..a094d743 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Entertainment/schemas/index.md @@ -0,0 +1,285 @@ +--- +title: Entertainment + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Entertainment + +--- + +Version Entertainment 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [OfferingType](#offeringtype) + - [MusicType](#musictype) + - [ProgramType](#programtype) + - [ContentRating](#contentrating) +- [United States](#united-states) +- [Canada](#canada) + - [ContentIdentifiers](#contentidentifiers) + - [Entitlement](#entitlement) + - [WayToWatch](#waytowatch) + - [EntityInfo](#entityinfo) + +## Overview + +undefined + +## Types + +### OfferingType + +The offering type of the WayToWatch. + +```typescript +OfferingType: { + FREE: 'free', + SUBSCRIBE: 'subscribe', + BUY: 'buy', + RENT: 'rent', +}, + +``` + +--- + +### MusicType + +In the case of a music `entityType`, specifies the type of music entity. + +```typescript +MusicType: { + SONG: 'song', + ALBUM: 'album', +}, + +``` + +--- + +### ProgramType + +In the case of a program `entityType`, specifies the program type. + +```typescript +ProgramType: { + MOVIE: 'movie', + EPISODE: 'episode', + SEASON: 'season', + SERIES: 'series', + OTHER: 'other', + PREVIEW: 'preview', + EXTRA: 'extra', + CONCERT: 'concert', + SPORTING_EVENT: 'sportingEvent', + ADVERTISEMENT: 'advertisement', + MUSIC_VIDEO: 'musicVideo', + MINISODE: 'minisode', +}, + +``` + +--- + +### ContentRating + +A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. + +## United States + +`US-Movie` (MPAA): + +Ratings: `NR`, `G`, `PG`, `PG13`, `R`, `NC17` + +Advisories: `AT`, `BN`, `SL`, `SS`, `N`, `V` + +`US-TV` (Vchip): + +Ratings: `TVY`, `TVY7`, `TVG`, `TVPG`, `TV14`, `TVMA` + +Advisories: `FV`, `D`, `L`, `S`, `V` + +## Canada + +`CA-Movie` (OFRB): + +Ratings: `G`, `PG`, `14A`, `18A`, `R`, `E` + +`CA-TV` (AGVOT) + +Ratings: `E`, `C`, `C8`, `G`, `PG`, `14+`, `18+` + +Advisories: `C`, `C8`, `G`, `PG`, `14+`, `18+` + +`CA-Movie-Fr` (Canadian French language movies): + +Ratings: `G`, `8+`, `13+`, `16+`, `18+` + +`CA-TV-Fr` (Canadian French language TV): + +Ratings: `G`, `8+`, `13+`, `16+`, `18+` + +```typescript +type ContentRating = { + scheme: + | 'CA-Movie' + | 'CA-TV' + | 'CA-Movie-Fr' + | 'CA-TV-Fr' + | 'US-Movie' + | 'US-TV' // The rating scheme. + rating: string // The content rating. + advisories?: string[] // Optional list of subratings or content advisories. +} +``` + +--- + +### ContentIdentifiers + +The ContentIdentifiers object is how the app identifies an entity or asset to +the Firebolt platform. These ids are used to look up metadata and deep link into +the app. + +Apps do not need to provide all ids. They only need to provide the minimum +required to target a playable stream or an entity detail screen via a deep link. +If an id isn't needed to get to those pages, it doesn't need to be included. + +```typescript +type ContentIdentifiers = { + assetId?: string // Identifies a particular playable asset. For example, the HD version of a particular movie separate from the UHD version. + entityId?: string // Identifies an entity, such as a Movie, TV Series or TV Episode. + seasonId?: string // The TV Season for a TV Episode. + seriesId?: string // The TV Series for a TV Episode or TV Season. + appContentData?: string // App-specific content identifiers. +} +``` + +--- + +### Entitlement + +```typescript +type Entitlement = { + entitlementId: string + startTime?: string + endTime?: string +} +``` + +--- + +### WayToWatch + +A WayToWatch describes a way to watch a video program. It may describe a single +streamable asset or a set of streamable assets. For example, an app provider may +describe HD, SD, and UHD assets as individual WayToWatch objects or rolled into +a single WayToWatch. + +If the WayToWatch represents a single streamable asset, the provided +ContentIdentifiers must be sufficient to play back the specific asset when sent +via a playback intent or deep link. If the WayToWatch represents multiple +streamable assets, the provided ContentIdentifiers must be sufficient to +playback one of the assets represented with no user action. In this scenario, +the app SHOULD choose the best asset for the user based on their device and +settings. The ContentIdentifiers MUST also be sufficient for navigating the user +to the appropriate entity or detail screen via an entity intent. + +The app should set the `entitled` property to indicate if the user can watch, or +not watch, the asset without making a purchase. If the entitlement is known to +expire at a certain time (e.g., a rental), the app should also provide the +`entitledExpires` property. If the entitlement is not expired, the UI will use +the `entitled` property to display watchable assets to the user, adjust how +assets are presented to the user, and how intents into the app are generated. +For example, the the Aggregated Experience could render a "Watch" button for an +entitled asset versus a "Subscribe" button for an non-entitled asset. + +The app should set the `offeringType` to define how the content may be +authorized. The UI will use this to adjust how content is presented to the user. + +A single WayToWatch cannot represent streamable assets available via multiple +purchase paths. If, for example, an asset has both Buy, Rent and Subscription +availability, the three different entitlement paths MUST be represented as +multiple WayToWatch objects. + +`price` should be populated for WayToWatch objects with `buy` or `rent` +`offeringType`. If the WayToWatch represents a set of assets with various price +points, the `price` provided must be the lowest available price. + +```typescript +type WayToWatch = { + identifiers: ContentIdentifiers // The ContentIdentifiers object is how the app identifies an entity or asset to + expires?: string // Time when the WayToWatch is no longer available. + entitled?: boolean // Specify if the user is entitled to watch the entity. + entitledExpires?: string // Time when the entity is no longer entitled. + offeringType?: OfferingType // The offering type of the WayToWatch. + hasAds?: boolean // True if the streamable asset contains ads. + price?: number // For "buy" and "rent" WayToWatch, the price to buy or rent in the user's preferred currency. + videoQuality?: 'SD' | 'HD' | 'UHD'[] // List of the video qualities available via the WayToWatch. + audioProfile: AudioProfile[] // List of the audio types available via the WayToWatch. + audioLanguages?: string[] // List of audio track languages available on the WayToWatch. The first is considered the primary language. Languages are expressed as ISO 639 1/2 codes. + closedCaptions?: string[] // List of languages for which closed captions are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. + subtitles?: string[] // List of languages for which subtitles are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. + audioDescriptions?: string[] // List of languages for which audio descriptions (DVD) as available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. +} +``` + +See also: + +[ContentIdentifiers](#contentidentifiers) +[OfferingType](#offeringtype) +[AudioProfile](../Types/schemas/#AudioProfile) + +--- + +### EntityInfo + +An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + +Additionally, EntityInfo objects must specify a properly formed +ContentIdentifiers object, `entityType`, and `title`. The app should provide +the `synopsis` property for a good user experience if the content +metadata is not available another way. + +The ContentIdentifiers must be sufficient for navigating the user to the +appropriate entity or detail screen via a `detail` intent or deep link. + +EntityInfo objects must provide at least one WayToWatch object when returned as +part of an `entityInfo` method and a streamable asset is available to the user. +It is optional for the `purchasedContent` method, but recommended because the UI +may use those data. + +```typescript +type EntityInfo = { + identifiers: ContentIdentifiers // The ContentIdentifiers object is how the app identifies an entity or asset to + title: string // Title of the entity. + entityType: 'program' | 'music' // The type of the entity, e.g. `program` or `music`. + programType?: ProgramType // In the case of a program `entityType`, specifies the program type. + musicType?: MusicType // In the case of a music `entityType`, specifies the type of music entity. + synopsis?: string // Short description of the entity. + seasonNumber?: number // For TV seasons, the season number. For TV episodes, the season that the episode belongs to. + seasonCount?: number // For TV series, seasons, and episodes, the total number of seasons. + episodeNumber?: number // For TV episodes, the episode number. + episodeCount?: number // For TV seasons and episodes, the total number of episodes in the current season. + releaseDate?: string // The date that the program or entity was released or first aired. + contentRatings?: ContentRating[] // A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. + waysToWatch?: WayToWatch[] // A WayToWatch describes a way to watch a video program. It may describe a single +} +``` + +See also: + +[ContentIdentifiers](#contentidentifiers) +[ProgramType](#programtype) +[MusicType](#musictype) +[ContentRating](#contentrating) +[WayToWatch](#waytowatch) + +--- diff --git a/apis/pr-release-1-3-0/core/Entity/schemas/index.md b/apis/pr-release-1-3-0/core/Entity/schemas/index.md new file mode 100644 index 00000000..1f1e1778 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Entity/schemas/index.md @@ -0,0 +1,287 @@ +--- +title: Entity + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Entity + +--- + +Version Entity 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [MovieEntity](#movieentity) + - [Metadata](#metadata) + - [MusicEntity](#musicentity) + - [ChannelEntity](#channelentity) + - [UntypedEntity](#untypedentity) + - [PlaylistEntity](#playlistentity) + - [TVEpisodeEntity](#tvepisodeentity) + - [TVSeasonEntity](#tvseasonentity) + - [TVSeriesEntity](#tvseriesentity) + - [AdditionalEntity](#additionalentity) + - [ProgramEntity](#programentity) + - [Entity](#entity) + - [EntityDetails](#entitydetails) + - [PlayableEntity](#playableentity) + +## Overview + +undefined + +## Types + +### MovieEntity + +A Firebolt compliant representation of a Movie entity. + +```typescript +type MovieEntity = { + entityType: 'program' + programType: 'movie' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### Metadata + +```typescript +type Metadata = { + title?: string // Title of the entity. + synopsis?: string // Short description of the entity. + seasonNumber?: number // For TV seasons, the season number. For TV episodes, the season that the episode belongs to. + seasonCount?: number // For TV series, seasons, and episodes, the total number of seasons. + episodeNumber?: number // For TV episodes, the episode number. + episodeCount?: number // For TV seasons and episodes, the total number of episodes in the current season. + releaseDate?: string // The date that the program or entity was released or first aired. + contentRatings?: ContentRating[] // A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. +} +``` + +See also: + +[ContentRating](../Entertainment/schemas/#ContentRating) + +--- + +### MusicEntity + +```typescript +type MusicEntity = { + entityType: 'music' + musicType: MusicType // In the case of a music `entityType`, specifies the type of music entity. + entityId: string +} +``` + +See also: + +[MusicType](../Entertainment/schemas/#MusicType) + +--- + +### ChannelEntity + +```typescript +type ChannelEntity = { + entityType: 'channel' + channelType: 'streaming' | 'overTheAir' + entityId: string // ID of the channel, in the target App's scope. + appContentData?: string +} +``` + +--- + +### UntypedEntity + +```typescript +type UntypedEntity = { + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### PlaylistEntity + +A Firebolt compliant representation of a Playlist entity. + +```typescript +type PlaylistEntity = { + entityType: 'playlist' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVEpisodeEntity + +A Firebolt compliant representation of a TV Episode entity. + +```typescript +type TVEpisodeEntity = { + entityType: 'program' + programType: 'episode' + entityId: string + seriesId: string + seasonId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVSeasonEntity + +A Firebolt compliant representation of a TV Season entity. + +```typescript +type TVSeasonEntity = { + entityType: 'program' + programType: 'season' + entityId: string + seriesId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVSeriesEntity + +A Firebolt compliant representation of a TV Series entity. + +```typescript +type TVSeriesEntity = { + entityType: 'program' + programType: 'series' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### AdditionalEntity + +A Firebolt compliant representation of the remaining program entity types. + +```typescript +type AdditionalEntity = { + entityType: 'program' + programType: + | 'concert' + | 'sportingEvent' + | 'preview' + | 'other' + | 'advertisement' + | 'musicVideo' + | 'minisode' + | 'extra' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### ProgramEntity + +```typescript +type ProgramEntity = + | MovieEntity + | TVEpisodeEntity + | TVSeasonEntity + | TVSeriesEntity + | AdditionalEntity +``` + +See also: + +[MovieEntity](#movieentity) +[TVEpisodeEntity](#tvepisodeentity) +[TVSeasonEntity](#tvseasonentity) +[TVSeriesEntity](#tvseriesentity) +[AdditionalEntity](#additionalentity) + +--- + +### Entity + +```typescript + +``` + +See also: + +[ProgramEntity](#programentity) +[MusicEntity](#musicentity) +[ChannelEntity](#channelentity) +[UntypedEntity](#untypedentity) +[PlaylistEntity](#playlistentity) + +--- + +### EntityDetails + +```typescript +type EntityDetails = { + identifiers: + | ProgramEntity + | MusicEntity + | ChannelEntity + | UntypedEntity + | PlaylistEntity + info?: Metadata + waysToWatch?: WayToWatch[] // A WayToWatch describes a way to watch a video program. It may describe a single +} +``` + +See also: + +[Metadata](#metadata) +[WayToWatch](../Entertainment/schemas/#WayToWatch) + +--- + +### PlayableEntity + +```typescript +type PlayableEntity = + | MovieEntity + | TVEpisodeEntity + | PlaylistEntity + | MusicEntity + | AdditionalEntity +``` + +See also: + +[MovieEntity](#movieentity) +[TVEpisodeEntity](#tvepisodeentity) +[PlaylistEntity](#playlistentity) +[MusicEntity](#musicentity) +[AdditionalEntity](#additionalentity) + +--- diff --git a/apis/pr-release-1-3-0/core/Intents/schemas/index.md b/apis/pr-release-1-3-0/core/Intents/schemas/index.md new file mode 100644 index 00000000..f847c3c4 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Intents/schemas/index.md @@ -0,0 +1,232 @@ +--- +title: Intents + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Intents + +--- + +Version Intents 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [Intent](#intent) + - [IntentProperties](#intentproperties) + - [EntityIntent](#entityintent) + - [PlaybackIntent](#playbackintent) + - [SearchIntent](#searchintent) + - [SectionIntent](#sectionintent) + - [TuneIntent](#tuneintent) + - [PlayEntityIntent](#playentityintent) + - [PlayQueryIntent](#playqueryintent) + - [HomeIntent](#homeintent) + - [LaunchIntent](#launchintent) + - [NavigationIntent](#navigationintent) + +## Overview + +undefined + +## Types + +### Intent + +A Firebolt compliant representation of a user intention. + +```typescript + +``` + +--- + +### IntentProperties + +```typescript + +``` + +--- + +### EntityIntent + +A Firebolt compliant representation of a user intention to navigate an app to a specific entity page, and bring that app to the foreground if needed. + +```typescript +type EntityIntent = { + action: 'entity' + data: + | ProgramEntity + | MusicEntity + | ChannelEntity + | UntypedEntity + | PlaylistEntity + context: object +} +``` + +--- + +### PlaybackIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed. + +```typescript +type PlaybackIntent = { + action: 'playback' + data: PlayableEntity + context: object +} +``` + +See also: + +[PlayableEntity](../Entity/schemas/#PlayableEntity) + +--- + +### SearchIntent + +A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed. + +```typescript +type SearchIntent = { + action: 'search' + data?: object + context: object +} +``` + +--- + +### SectionIntent + +A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed. + +```typescript +type SectionIntent = { + action: 'section' + data: object + context: object +} +``` + +--- + +### TuneIntent + +A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App. + +```typescript +type TuneIntent = { + action: 'tune' + data: object + context: object +} +``` + +See also: + +[ChannelEntity](../Entity/schemas/#ChannelEntity) + +--- + +### PlayEntityIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed. + +```typescript +type PlayEntityIntent = { + action: 'play-entity' + data: object + context: object +} +``` + +See also: + +[PlayableEntity](../Entity/schemas/#PlayableEntity) + +--- + +### PlayQueryIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for an abstract query to be searched for and played by the app. + +```typescript +type PlayQueryIntent = { + action: 'play-query' + data: object + context: object +} +``` + +See also: + +[ProgramType](../Entertainment/schemas/#ProgramType) +[MusicType](../Entertainment/schemas/#MusicType) + +--- + +### HomeIntent + +A Firebolt compliant representation of a user intention to navigate an app to it's home screen, and bring that app to the foreground if needed. + +```typescript +type HomeIntent = { + action: 'home' + context: object +} +``` + +--- + +### LaunchIntent + +A Firebolt compliant representation of a user intention to launch an app. + +```typescript +type LaunchIntent = { + action: 'launch' + context: object +} +``` + +--- + +### NavigationIntent + +A Firebolt compliant representation of a user intention to navigate to a specific place in an app. + +```typescript +type NavigationIntent = + | HomeIntent + | LaunchIntent + | EntityIntent + | PlaybackIntent + | SearchIntent + | SectionIntent + | TuneIntent + | PlayEntityIntent + | PlayQueryIntent +``` + +See also: + +[HomeIntent](#homeintent) +[LaunchIntent](#launchintent) +[EntityIntent](#entityintent) +[PlaybackIntent](#playbackintent) +[SearchIntent](#searchintent) +[SectionIntent](#sectionintent) +[TuneIntent](#tuneintent) +[PlayEntityIntent](#playentityintent) +[PlayQueryIntent](#playqueryintent) + +--- diff --git a/apis/pr-release-1-3-0/core/Internal/index.md b/apis/pr-release-1-3-0/core/Internal/index.md new file mode 100644 index 00000000..f0ebc9dc --- /dev/null +++ b/apis/pr-release-1-3-0/core/Internal/index.md @@ -0,0 +1,92 @@ +--- +title: Internal + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Internal Module + +--- + +Version Internal 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Methods](#methods) + - [initialize](#initialize) +- [Types](#types) + +## Overview + +Internal methods for SDK / FEE integration + +## Methods + +### initialize + +_This is an private RPC method._ + +Initialize the SDK / FEE session. + +Parameters: + +| Param | Type | Required | Description | +| --------- | ------------------------------------------------------ | -------- | -------------------------------- | +| `version` | [`SemanticVersion`](../Types/schemas/#SemanticVersion) | true | The semantic version of the SDK. | + +Result: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:initialize | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Internal.initialize", + "params": { + "version": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt SDK 1.0.0" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "version": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt FEE 1.0.0" + } + } +} +``` + +--- + +## Types diff --git a/apis/pr-release-1-3-0/core/Keyboard/index.md b/apis/pr-release-1-3-0/core/Keyboard/index.md new file mode 100644 index 00000000..d0a120c2 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Keyboard/index.md @@ -0,0 +1,318 @@ +--- +title: Keyboard + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Keyboard Module + +--- + +Version Keyboard 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [email](#email) + - [password](#password) + - [standard](#standard) +- [Types](#types) + - [EmailUsage](#emailusage) + +## Usage + +To use the Keyboard module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Keyboard } from '@firebolt-js/sdk' +``` + +## Overview + +Methods for prompting users to enter text with task-oriented UX + +## Methods + +### email + +Prompt the user for their email address with a simplified list of choices. + +```typescript +function email(type: EmailUsage, message: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | --------------------------- | -------- | --------------------------------------------------------------------------------------------- | +| `type` | [`EmailUsage`](#emailusage) | true | Why the email is being requested, e.g. sign on or sign up
values: `'signIn' \| 'signUp'` | +| `message` | `string` | false | The message to display while prompting | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Prompt the user to select or type an email address + +JavaScript: + +```javascript +import { Keyboard } from '@firebolt-js/sdk' + +let email = await Keyboard.email( + 'signIn', + 'Enter your email to sign into this app', +) +console.log(email) +``` + +Value of `email`: + +```javascript +'user@domain.com' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.email", + "params": { + "type": "signIn", + "message": "Enter your email to sign into this app" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "user@domain.com" +} +``` + +
+ +Prompt the user to type an email address to sign up + +JavaScript: + +```javascript +import { Keyboard } from '@firebolt-js/sdk' + +let email = await Keyboard.email( + 'signUp', + 'Enter your email to sign up for this app', +) +console.log(email) +``` + +Value of `email`: + +```javascript +'user@domain.com' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.email", + "params": { + "type": "signUp", + "message": "Enter your email to sign up for this app" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "user@domain.com" +} +``` + +
+ +--- + +### password + +Show the password entry keyboard, with typing obfuscated from visibility + +```typescript +function password(message: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | -------------------------------------- | +| `message` | `string` | false | The message to display while prompting | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Prompt the user to enter their password + +JavaScript: + +```javascript +import { Keyboard } from '@firebolt-js/sdk' + +let value = await Keyboard.password('Enter your password') +console.log(value) +``` + +Value of `value`: + +```javascript +'abc123' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.password", + "params": { + "message": "Enter your password" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "abc123" +} +``` + +
+ +--- + +### standard + +Show the standard platform keyboard, and return the submitted value + +```typescript +function standard(message: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | -------------------------------------- | +| `message` | `string` | true | The message to display while prompting | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Prompt the user for an arbitrary string + +JavaScript: + +```javascript +import { Keyboard } from '@firebolt-js/sdk' + +let value = await Keyboard.standard( + "Enter the name you'd like to associate with this device", +) +console.log(value) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.standard", + "params": { + "message": "Enter the name you'd like to associate with this device" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +--- + +## Types + +### EmailUsage + +```typescript +EmailUsage: { + SIGN_IN: 'signIn', + SIGN_UP: 'signUp', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Lifecycle/index.md b/apis/pr-release-1-3-0/core/Lifecycle/index.md new file mode 100644 index 00000000..66bcbc3b --- /dev/null +++ b/apis/pr-release-1-3-0/core/Lifecycle/index.md @@ -0,0 +1,899 @@ +--- +title: Lifecycle + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Lifecycle Module + +--- + +Version Lifecycle 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [close](#close) + - [finished](#finished) + - [listen](#listen) + - [once](#once) + - [ready](#ready) + - [state](#state) +- [Events](#events) + - [background](#background) + - [foreground](#foreground) + - [inactive](#inactive) + - [suspended](#suspended) + - [unloading](#unloading) +- [Types](#types) + - [LifecycleEvent](#lifecycleevent) + +## Usage + +To use the Lifecycle module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' +``` + +## Overview + +Methods and events for responding to lifecycle changes in your app + +## Methods + +### close + +Request that the platform move your app out of focus + +```typescript +function close(reason: CloseReason): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------- | +| `reason` | [`CloseReason`](../Lifecycle/schemas/#CloseReason) | true | The reason the app is requesting to be closed
values: `'remoteButton' \| 'userExit' \| 'done' \| 'error'` | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Close the app when the user presses back on the app home screen + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +let success = await Lifecycle.close('remoteButton') +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.close", + "params": { + "reason": "remoteButton" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Close the app when the user selects an exit menu item + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +let success = await Lifecycle.close('userExit') +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.close", + "params": { + "reason": "userExit" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### finished + +Notify the platform that the app is done unloading + +```typescript +function finished(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +let results = await Lifecycle.finished() +console.log(results) +``` + +Value of `results`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.finished", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Lifecycle.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Lifecycle.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Lifecycle.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Lifecycle.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### ready + +Notify the platform that the app is ready + +```typescript +function ready(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:ready | + +#### Examples + +Let the platform know that your app is ready + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +let result = await Lifecycle.ready() +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.ready", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### state + +Get the current state of the app. This function is **synchronous**. + +```typescript +function state(): Promise +``` + +Promise resolution: + +[LifecycleState](../Lifecycle/schemas/#LifecycleState) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +const state = Lifecycle.state() +console.log(state) +``` + +Value of `state`: + +```javascript +'foreground' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.state", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "foreground" +} +``` + +
+ +--- + +## Events + +### background + +```typescript +function listen('background', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[LifecycleEvent](#lifecycleevent) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +Lifecycle.listen('background', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "state": "background", + "previous": "foreground" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.onBackground", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "background", + "previous": "foreground" + } +} +``` + +
+ +--- + +### foreground + +```typescript +function listen('foreground', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[LifecycleEvent](#lifecycleevent) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +Lifecycle.listen('foreground', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "state": "foreground", + "previous": "inactive" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.onForeground", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "foreground", + "previous": "inactive" + } +} +``` + +
+ +Move to foreground via remote branded buton + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +Lifecycle.listen('foreground', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "state": "foreground", + "previous": "inactive" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.onForeground", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "foreground", + "previous": "inactive", + "source": "remote" + } +} +``` + +
+ +--- + +### inactive + +```typescript +function listen('inactive', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[LifecycleEvent](#lifecycleevent) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +Lifecycle.listen('inactive', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "state": "inactive", + "previous": "initializing" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.onInactive", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "inactive", + "previous": "initializing" + } +} +``` + +
+ +--- + +### suspended + +```typescript +function listen('suspended', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[LifecycleEvent](#lifecycleevent) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +Lifecycle.listen('suspended', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "state": "suspended", + "previous": "inactive" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.onSuspended", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "suspended", + "previous": "inactive" + } +} +``` + +
+ +--- + +### unloading + +```typescript +function listen('unloading', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[LifecycleEvent](#lifecycleevent) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Lifecycle } from '@firebolt-js/sdk' + +Lifecycle.listen('unloading', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +{ + "state": "unloading", + "previous": "inactive" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Lifecycle.onUnloading", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "state": "unloading", + "previous": "inactive" + } +} +``` + +
+ +--- + +## Types + +### LifecycleEvent + +A an object describing the previous and current states + +```typescript +type LifecycleEvent = { + state: LifecycleState // The application lifecycle state + previous: LifecycleState // The application lifecycle state + source?: 'voice' | 'remote' // The source of the lifecycle change. +} +``` + +See also: + +[LifecycleState](../Lifecycle/schemas/#LifecycleState) + +--- diff --git a/apis/pr-release-1-3-0/core/Lifecycle/schemas/index.md b/apis/pr-release-1-3-0/core/Lifecycle/schemas/index.md new file mode 100644 index 00000000..c0862892 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Lifecycle/schemas/index.md @@ -0,0 +1,61 @@ +--- +title: Lifecycle + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Lifecycle + +--- + +Version Lifecycle 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [CloseReason](#closereason) + - [LifecycleState](#lifecyclestate) + +## Overview + +undefined + +## Types + +### CloseReason + +The application close reason + +```typescript +CloseReason: { + REMOTE_BUTTON: 'remoteButton', + USER_EXIT: 'userExit', + DONE: 'done', + ERROR: 'error', +}, + +``` + +--- + +### LifecycleState + +The application lifecycle state + +```typescript +LifecycleState: { + INITIALIZING: 'initializing', + INACTIVE: 'inactive', + FOREGROUND: 'foreground', + BACKGROUND: 'background', + UNLOADING: 'unloading', + SUSPENDED: 'suspended', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Localization/index.md b/apis/pr-release-1-3-0/core/Localization/index.md new file mode 100644 index 00000000..87f8c049 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Localization/index.md @@ -0,0 +1,1623 @@ +--- +title: Localization + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Localization Module + +--- + +Version Localization 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [additionalInfo](#additionalinfo) + - [countryCode](#countrycode) + - [language](#language) + - [latlon](#latlon) + - [listen](#listen) + - [locale](#locale) + - [locality](#locality) + - [once](#once) + - [postalCode](#postalcode) + - [preferredAudioLanguages](#preferredaudiolanguages) +- [Events](#events) + - [countryCodeChanged](#countrycodechanged) + - [languageChanged](#languagechanged) + - [localeChanged](#localechanged) + - [localityChanged](#localitychanged) + - [postalCodeChanged](#postalcodechanged) + - [preferredAudioLanguagesChanged](#preferredaudiolanguageschanged) +- [Types](#types) + - [LatLon](#latlon-1) + +## Usage + +To use the Localization module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Localization } from '@firebolt-js/sdk' +``` + +## Overview + +Methods for accessessing location and language preferences + +## Methods + +### additionalInfo + +Get any platform-specific localization information, in an Map + +```typescript +function additionalInfo(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:localization:additional-info | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let info = await Localization.additionalInfo() +console.log(info) +``` + +Value of `info`: + +```javascript +{ +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.additionalInfo", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": {} +} +``` + +
+ +--- + +### countryCode + +Get the ISO 3166-1 alpha-2 code for the country device is located in + +To get the value of `countryCode` call the method like this: + +```typescript +function countryCode(): Promise +``` + +Promise resolution: + +[CountryCode](../Localization/schemas/#CountryCode) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------- | +| uses | xrn:firebolt:capability:localization:country-code | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let code = await Localization.countryCode() +console.log(code) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.countryCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let code = await Localization.countryCode() +console.log(code) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.countryCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "UK" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function countryCode(callback: (value) => CountryCode): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await countryCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onCountryCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await countryCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onCountryCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "UK" +} +``` + +
+ +--- + +### language + +Get the ISO 639 1/2 code for the preferred language + +To get the value of `language` call the method like this: + +```typescript +function language(): Promise +``` + +Promise resolution: + +[Language](../Localization/schemas/#Language) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:language | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let lang = await Localization.language() +console.log(lang) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.language", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let lang = await Localization.language() +console.log(lang) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.language", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function language(callback: (value) => Language): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await language((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLanguageChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await language((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLanguageChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es" +} +``` + +
+ +--- + +### latlon + +Get the approximate latitude and longitude coordinates of the device location + +```typescript +function latlon(): Promise +``` + +Promise resolution: + +[LatLon](#latlon-1) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:location | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let latlong = await Localization.latlon() +console.log(latlong) +``` + +Value of `latlong`: + +```javascript +;[39.9549, 75.1699] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.latlon", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [39.9549, 75.1699] +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### locale + +Get the _full_ BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale + +To get the value of `locale` call the method like this: + +```typescript +function locale(): Promise +``` + +Promise resolution: + +[Locale](../Localization/schemas/#Locale) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------- | +| uses | xrn:firebolt:capability:localization:locale | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let locale = await Localization.locale() +console.log(locale) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locale", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en-US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let locale = await Localization.locale() +console.log(locale) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locale", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es-US" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function locale(callback: (value) => Locale): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await locale((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocaleChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en-US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await locale((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocaleChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es-US" +} +``` + +
+ +--- + +### locality + +Get the locality/city the device is located in + +To get the value of `locality` call the method like this: + +```typescript +function locality(): Promise +``` + +Promise resolution: + +[Locality](../Localization/schemas/#Locality) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:locality | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let locality = await Localization.locality() +console.log(locality) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locality", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Philadelphia" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let locality = await Localization.locality() +console.log(locality) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locality", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Rockville" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function locality(callback: (value) => Locality): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await locality((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocalityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Philadelphia" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await locality((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocalityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Rockville" +} +``` + +
+ +--- + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### postalCode + +Get the postal code the device is located in + +To get the value of `postalCode` call the method like this: + +```typescript +function postalCode(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:localization:postal-code | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let postalCode = await Localization.postalCode() +console.log(postalCode) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.postalCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "19103" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let postalCode = await Localization.postalCode() +console.log(postalCode) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.postalCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "20850" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function postalCode(callback: (value) => string): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await postalCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPostalCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "19103" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await postalCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPostalCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "20850" +} +``` + +
+ +--- + +### preferredAudioLanguages + +A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device. + +To get the value of `preferredAudioLanguages` call the method like this: + +```typescript +function preferredAudioLanguages(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:language | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let languages = await Localization.preferredAudioLanguages() +console.log(languages) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.preferredAudioLanguages", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["spa", "eng"] +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let languages = await Localization.preferredAudioLanguages() +console.log(languages) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.preferredAudioLanguages", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["eng", "spa"] +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function preferredAudioLanguages( + callback: (value) => ISO639_2Language[], +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await preferredAudioLanguages((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPreferredAudioLanguagesChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["spa", "eng"] +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/sdk' + +let listenerId = await preferredAudioLanguages((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPreferredAudioLanguagesChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["eng", "spa"] +} +``` + +
+ +--- + +## Events + +### countryCodeChanged + +See: [countryCode](#countrycode) + +### languageChanged + +See: [language](#language) + +### localeChanged + +See: [locale](#locale) + +### localityChanged + +See: [locality](#locality) + +### postalCodeChanged + +See: [postalCode](#postalcode) + +### preferredAudioLanguagesChanged + +See: [preferredAudioLanguages](#preferredaudiolanguages) + +## Types + +### LatLon + +```typescript +type LatLon = [ + number, // undefined item + number, // undefined item +] +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Localization/schemas/index.md b/apis/pr-release-1-3-0/core/Localization/schemas/index.md new file mode 100644 index 00000000..2b1a5795 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Localization/schemas/index.md @@ -0,0 +1,79 @@ +--- +title: Localization + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Localization + +--- + +Version Localization 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [ISO639_2Language](#isolanguage) + - [Locality](#locality) + - [CountryCode](#countrycode) + - [Language](#language) + - [Locale](#locale) + - [TimeZone](#timezone) + +## Overview + +undefined + +## Types + +### ISO639_2Language + +```typescript + +``` + +--- + +### Locality + +```typescript + +``` + +--- + +### CountryCode + +```typescript + +``` + +--- + +### Language + +```typescript + +``` + +--- + +### Locale + +```typescript + +``` + +--- + +### TimeZone + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Metrics/index.md b/apis/pr-release-1-3-0/core/Metrics/index.md new file mode 100644 index 00000000..1521f4d3 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Metrics/index.md @@ -0,0 +1,1624 @@ +--- +title: Metrics + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Metrics Module + +--- + +Version Metrics 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [action](#action) + - [appInfo](#appinfo) + - [error](#error) + - [mediaEnded](#mediaended) + - [mediaLoadStart](#medialoadstart) + - [mediaPause](#mediapause) + - [mediaPlay](#mediaplay) + - [mediaPlaying](#mediaplaying) + - [mediaProgress](#mediaprogress) + - [mediaRateChange](#mediaratechange) + - [mediaRenditionChange](#mediarenditionchange) + - [mediaSeeked](#mediaseeked) + - [mediaSeeking](#mediaseeking) + - [mediaWaiting](#mediawaiting) + - [page](#page) + - [ready](#ready) + - [signIn](#signin) + - [signOut](#signout) + - [startContent](#startcontent) + - [stopContent](#stopcontent) +- [Types](#types) + - [ErrorType](#errortype) + - [MediaPosition](#mediaposition) + +## Usage + +To use the Metrics module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Metrics } from '@firebolt-js/sdk' +``` + +## Overview + +Methods for sending metrics + +## Methods + +### action + +Inform the platform of something not covered by other Metrics APIs. + +```typescript +function action( + category: string, + type: string, + parameters: FlatMap, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | -------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `category` | `string` | true | The category of action being logged. Must be 'user' for user-initated actions or 'app' for all other actions
values: `'user' \| 'app'` | +| `type` | `string` | true | A short, indexible identifier for the action, e.g. 'SignIn Prompt Displayed'
maxLength: 256 | +| `parameters` | [`FlatMap`](../Types/schemas/#FlatMap) | false | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send foo action + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.action('user', 'The user did foo', null) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.action", + "params": { + "category": "user", + "type": "The user did foo" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### appInfo + +Inform the platform about an app's build info. + +```typescript +function appInfo(build: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | -------------------------------- | +| `build` | `string` | true | The build / version of this app. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send appInfo metric + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let result = await Metrics.appInfo('1.2.2') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.appInfo", + "params": { + "build": "1.2.2" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### error + +Inform the platform of an error that has occured in your app. + +```typescript +function error( + type: ErrorType, + code: string, + description: string, + visible: boolean, + parameters: FlatMap, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | -------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | +| `type` | [`ErrorType`](#errortype) | true | The type of error
values: `'network' \| 'media' \| 'restriction' \| 'entitlement' \| 'other'` | +| `code` | `string` | true | an app-specific error code | +| `description` | `string` | true | A short description of the error | +| `visible` | `boolean` | true | Whether or not this error was visible to the user. | +| `parameters` | [`FlatMap`](../Types/schemas/#FlatMap) | false | Optional additional parameters to be logged with the error | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send error metric + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.error( + 'media', + 'MEDIA-STALLED', + 'playback stalled', + true, + null, +) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.error", + "params": { + "type": "media", + "code": "MEDIA-STALLED", + "description": "playback stalled", + "visible": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaEnded + +Called when playback has stopped because the end of the media was reached. + +```typescript +function mediaEnded(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send ended metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaEnded('345') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaEnded", + "params": { + "entityId": "345" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaLoadStart + +Called when setting the URL of a media asset to play, in order to infer load time. + +```typescript +function mediaLoadStart(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send loadstart metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaLoadStart('345') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaLoadStart", + "params": { + "entityId": "345" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaPause + +Called when media playback will pause due to an intentional pause operation. + +```typescript +function mediaPause(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send pause metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaPause('345') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaPause", + "params": { + "entityId": "345" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaPlay + +Called when media playback should start due to autoplay, user-initiated play, or unpausing. + +```typescript +function mediaPlay(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send play metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaPlay('345') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaPlay", + "params": { + "entityId": "345" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaPlaying + +Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interuption. + +```typescript +function mediaPlaying(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send playing metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaPlaying('345') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaPlaying", + "params": { + "entityId": "345" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaProgress + +Called every 60 seconds as media playback progresses. + +```typescript +function mediaProgress( + entityId: string, + progress: MediaPosition, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | --------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `progress` | [`MediaPosition`](#mediaposition) | true | Progress of playback, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send progress metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaProgress('345', 0.75) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaProgress", + "params": { + "entityId": "345", + "progress": 0.75 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaRateChange + +Called when the playback rate of media is changed. + +```typescript +function mediaRateChange(entityId: string, rate: number): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `rate` | `number` | true | The new playback rate. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send ratechange metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaRateChange('345', 2) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaRateChange", + "params": { + "entityId": "345", + "rate": 2 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaRenditionChange + +Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed. + +```typescript +function mediaRenditionChange( + entityId: string, + bitrate: number, + width: number, + height: number, + profile: string, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ------------------------------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `bitrate` | `number` | true | The new bitrate in kbps. | +| `width` | `number` | true | The new resolution width. | +| `height` | `number` | true | The new resolution height. | +| `profile` | `string` | false | A description of the new profile, e.g. 'HDR' etc. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send renditionchange metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaRenditionChange( + '345', + 5000, + 1920, + 1080, + 'HDR+', +) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaRenditionChange", + "params": { + "entityId": "345", + "bitrate": 5000, + "width": 1920, + "height": 1080, + "profile": "HDR+" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaSeeked + +Called when a seek is completed during media playback. + +```typescript +function mediaSeeked( + entityId: string, + position: MediaPosition, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | --------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `position` | [`MediaPosition`](#mediaposition) | true | Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send seeked metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaSeeked('345', 0.51) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaSeeked", + "params": { + "entityId": "345", + "position": 0.51 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaSeeking + +Called when a seek is initiated during media playback. + +```typescript +function mediaSeeking(entityId: string, target: MediaPosition): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | --------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `entityId` | `string` | true | The entityId of the media. | +| `target` | [`MediaPosition`](#mediaposition) | true | Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send seeking metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaSeeking('345', 0.5) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaSeeking", + "params": { + "entityId": "345", + "target": 0.5 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### mediaWaiting + +Called when media playback will halt due to a network, buffer, or other unintentional constraint. + +```typescript +function mediaWaiting(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:metrics:media | + +#### Examples + +Send waiting metric. + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.mediaWaiting('345') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.mediaWaiting", + "params": { + "entityId": "345" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### page + +Inform the platform that your user has navigated to a page or view. + +```typescript +function page(pageId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------- | -------- | ----------------------- | +| `pageId` | `string` | true | Page ID of the content. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send page metric + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.page('xyz') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.page", + "params": { + "pageId": "xyz" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Send startContent metric w/ entity + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.page('home') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.page", + "params": { + "pageId": "home" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### ready + +_This is an private RPC method._ + +Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()` + +Result: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send ready metric + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.ready", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +--- + +### signIn + +_This is an private RPC method._ + +Log a sign in event, called by Discovery.signIn(). + +Result: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send signIn metric + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.signIn", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +Send signIn metric with entitlements + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.signIn", + "params": { + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +--- + +### signOut + +_This is an private RPC method._ + +Log a sign out event, called by Discovery.signOut(). + +Result: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send signOut metric + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.signOut", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +--- + +### startContent + +Inform the platform that your user has started content. + +```typescript +function startContent(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ---------------------------------- | +| `entityId` | `string` | false | Optional entity ID of the content. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send startContent metric + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.startContent(null) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.startContent", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Send startContent metric w/ entity + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.startContent('abc') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.startContent", + "params": { + "entityId": "abc" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +### stopContent + +Inform the platform that your user has stopped content. + +```typescript +function stopContent(entityId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ---------------------------------- | +| `entityId` | `string` | false | Optional entity ID of the content. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:metrics:general | + +#### Examples + +Send stopContent metric + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.stopContent(null) +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.stopContent", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Send stopContent metric w/ entity + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/sdk' + +let success = await Metrics.stopContent('abc') +console.log(success) +``` + +Value of `success`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.stopContent", + "params": { + "entityId": "abc" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +--- + +## Types + +### ErrorType + +```typescript +ErrorType: { + NETWORK: 'network', + MEDIA: 'media', + RESTRICTION: 'restriction', + ENTITLEMENT: 'entitlement', + OTHER: 'other', +}, + +``` + +--- + +### MediaPosition + +Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration. + +```typescript +type MediaPosition = void | number | number +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Parameters/index.md b/apis/pr-release-1-3-0/core/Parameters/index.md new file mode 100644 index 00000000..4df03caf --- /dev/null +++ b/apis/pr-release-1-3-0/core/Parameters/index.md @@ -0,0 +1,153 @@ +--- +title: Parameters + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Parameters Module + +--- + +Version Parameters 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [initialization](#initialization) +- [Types](#types) + - [AppInitialization](#appinitialization) + +## Usage + +To use the Parameters module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Parameters } from '@firebolt-js/sdk' +``` + +## Overview + +Methods for getting initialization parameters for an app cold launch. + +## Methods + +### initialization + +Returns any initialization parameters for the app, e.g. initialial `NavigationIntent`. + +```typescript +function initialization(): Promise +``` + +Promise resolution: + +[AppInitialization](#appinitialization) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:lifecycle:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Parameters } from '@firebolt-js/sdk' + +let init = await Parameters.initialization() +console.log(init) +``` + +Value of `init`: + +```javascript +{ + "lmt": 0, + "us_privacy": "1-Y-", + "discovery": { + "navigateTo": { + "action": "entity", + "data": { + "entityId": "abc", + "entityType": "program", + "programType": "movie" + }, + "context": { + "source": "voice" + } + } + } +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Parameters.initialization", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "lmt": 0, + "us_privacy": "1-Y-", + "discovery": { + "navigateTo": { + "action": "entity", + "data": { + "entityId": "abc", + "entityType": "program", + "programType": "movie" + }, + "context": { + "source": "voice" + } + } + } + } +} +``` + +
+ +--- + +## Types + +### AppInitialization + +```typescript +type AppInitialization = { + us_privacy?: string // The IAB US Privacy string. + lmt?: number // The IAB limit ad tracking opt out value. + discovery?: object + secondScreen?: object +} +``` + +See also: + +[NavigationIntent](../Intents/schemas/#NavigationIntent) +[SecondScreenEvent](../SecondScreen/schemas/#SecondScreenEvent) + +--- diff --git a/apis/pr-release-1-3-0/core/Profile/index.md b/apis/pr-release-1-3-0/core/Profile/index.md new file mode 100644 index 00000000..1f1eeb63 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Profile/index.md @@ -0,0 +1,232 @@ +--- +title: Profile + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Profile Module + +--- + +Version Profile 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [approveContentRating](#approvecontentrating) + - [approvePurchase](#approvepurchase) + - [flags](#flags) +- [Types](#types) + +## Usage + +To use the Profile module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Profile } from '@firebolt-js/sdk' +``` + +## Overview + +Methods for getting information about the current user/account profile + +## Methods + +### approveContentRating + +Verifies that the current profile should have access to mature/adult content. + +```typescript +function approveContentRating(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:approve:content | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Profile } from '@firebolt-js/sdk' + +let allow = await Profile.approveContentRating() +console.log(allow) +``` + +Value of `allow`: + +```javascript +false +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Profile.approveContentRating", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### approvePurchase + +Verifies that the current profile should have access to making purchases. + +```typescript +function approvePurchase(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:approve:purchase | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Profile } from '@firebolt-js/sdk' + +let allow = await Profile.approvePurchase() +console.log(allow) +``` + +Value of `allow`: + +```javascript +false +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Profile.approvePurchase", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### flags + +Get a map of profile flags for the current session. + +```typescript +function flags(): Promise +``` + +Promise resolution: + +[FlatMap](../Types/schemas/#FlatMap) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:profile:flags | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Profile } from '@firebolt-js/sdk' + +let flags = await Profile.flags() +console.log(flags) +``` + +Value of `flags`: + +```javascript +{ + "userExperience": "1000" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Profile.flags", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "userExperience": "1000" + } +} +``` + +
+ +--- + +## Types diff --git a/apis/pr-release-1-3-0/core/SecondScreen/index.md b/apis/pr-release-1-3-0/core/SecondScreen/index.md new file mode 100644 index 00000000..6f8910f5 --- /dev/null +++ b/apis/pr-release-1-3-0/core/SecondScreen/index.md @@ -0,0 +1,572 @@ +--- +title: SecondScreen + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# SecondScreen Module + +--- + +Version SecondScreen 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [device](#device) + - [friendlyName](#friendlyname) + - [listen](#listen) + - [once](#once) + - [protocols](#protocols) +- [Events](#events) + - [closeRequest](#closerequest) + - [friendlyNameChanged](#friendlynamechanged) + - [launchRequest](#launchrequest) +- [Types](#types) + +## Usage + +To use the SecondScreen module, you can import it into your project from the Firebolt SDK: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' +``` + +## Overview + +Methods for communicating with second screen devices + +## Methods + +### device + +Get the broadcasted id for the device + +```typescript +function device(type: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | -------- | -------- | ----------------------------------------------- | +| `type` | `string` | false | The type of second screen protocol, e.g. "dial" | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:dial | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' + +let deviceId = await SecondScreen.device(null) +console.log(deviceId) +``` + +Value of `deviceId`: + +```javascript +'device-id' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecondScreen.device", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "device-id" +} +``` + +
+ +--- + +### friendlyName + +Get the broadcasted friendly name for the device + +To get the value of `friendlyName` call the method like this: + +```typescript +function friendlyName(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:dial | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' + +let friendlyName = await SecondScreen.friendlyName() +console.log(friendlyName) +``` + +Value of `friendlyName`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecondScreen.friendlyName", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function friendlyName(callback: (value) => string): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' + +let listenerId = await friendlyName((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `friendlyName`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecondScreen.onFriendlyNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `SecondScreen.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `SecondScreen.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `SecondScreen.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `SecondScreen.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### protocols + +Get the supported second screen discovery protocols + +```typescript +function protocols(): Promise +``` + +Promise resolution: + +[BooleanMap](../Types/schemas/#BooleanMap) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:info | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' + +let protocols = await SecondScreen.protocols() +console.log(protocols) +``` + +Value of `protocols`: + +```javascript +{ + "dial1.7": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecondScreen.protocols", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "dial1.7": true + } +} +``` + +
+ +--- + +## Events + +### closeRequest + +```typescript +function listen('closeRequest', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[SecondScreenEvent](../SecondScreen/schemas/#SecondScreenEvent) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:dial | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' + +SecondScreen.listen('closeRequest', (closeRequestEvent) => { + console.log(closeRequestEvent) +}) +``` + +Value of `closeRequestEvent`: + +```javascript +{ + "type": "dial", + "version": "1.7" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecondScreen.onCloseRequest", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "type": "dial", + "version": "1.7" + } +} +``` + +
+ +--- + +### friendlyNameChanged + +See: [friendlyName](#friendlyname) + +### launchRequest + +```typescript +function listen('launchRequest', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[SecondScreenEvent](../SecondScreen/schemas/#SecondScreenEvent) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:dial | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { SecondScreen } from '@firebolt-js/sdk' + +SecondScreen.listen('launchRequest', (launchRequestEvent) => { + console.log(launchRequestEvent) +}) +``` + +Value of `launchRequestEvent`: + +```javascript +{ + "type": "dial", + "version": "1.7", + "data": "{\"code\":\"AQDPQZiQcb3KQ7gY7yy5tHTMbbkGHR9Zjp-KL53H3eKBZIeAt7O9UKYPu6B21l2UZVmIqkFXDXBmXvK4g2e3EgZtjMNmKPsTltgnRl95DImtOXjSpWtTjSaOkW4w1kZKUTwLKdwVWTzBVH8ERHorvLU6vCGOVHxXt65LNwdl5HKRweShVC1V9QsyvRnQS61ov0UclmrH_xZML2Bt-Q-rZFjey5MjwupIb4x4f53XUJMhjHpDHoIUKrjpdPDQvK2a\",\"friendlyName\":\"Operator_TX061AEI\",\"UDN\":\"608fef11-2800-482a-962b-23a6690c93c1\"}" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecondScreen.onLaunchRequest", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "type": "dial", + "version": "1.7", + "data": "{\"code\":\"AQDPQZiQcb3KQ7gY7yy5tHTMbbkGHR9Zjp-KL53H3eKBZIeAt7O9UKYPu6B21l2UZVmIqkFXDXBmXvK4g2e3EgZtjMNmKPsTltgnRl95DImtOXjSpWtTjSaOkW4w1kZKUTwLKdwVWTzBVH8ERHorvLU6vCGOVHxXt65LNwdl5HKRweShVC1V9QsyvRnQS61ov0UclmrH_xZML2Bt-Q-rZFjey5MjwupIb4x4f53XUJMhjHpDHoIUKrjpdPDQvK2a\",\"friendlyName\":\"Operator_TX061AEI\",\"UDN\":\"608fef11-2800-482a-962b-23a6690c93c1\"}" + } +} +``` + +
+ +--- + +## Types diff --git a/apis/pr-release-1-3-0/core/SecondScreen/schemas/index.md b/apis/pr-release-1-3-0/core/SecondScreen/schemas/index.md new file mode 100644 index 00000000..1174abf9 --- /dev/null +++ b/apis/pr-release-1-3-0/core/SecondScreen/schemas/index.md @@ -0,0 +1,40 @@ +--- +title: SecondScreen + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# SecondScreen + +--- + +Version SecondScreen 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [SecondScreenEvent](#secondscreenevent) + +## Overview + +undefined + +## Types + +### SecondScreenEvent + +An a message notification from a second screen device + +```typescript +type SecondScreenEvent = { + type: 'dial' + version?: string + data?: string +} +``` + +--- diff --git a/apis/pr-release-1-3-0/core/SecureStorage/index.md b/apis/pr-release-1-3-0/core/SecureStorage/index.md new file mode 100644 index 00000000..c4a93118 --- /dev/null +++ b/apis/pr-release-1-3-0/core/SecureStorage/index.md @@ -0,0 +1,510 @@ +--- +title: SecureStorage + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# SecureStorage Module + +--- + +Version SecureStorage 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [clear](#clear) + - [get](#get) + - [remove](#remove) + - [set](#set) +- [Types](#types) + - [StorageScope](#storagescope) + - [StorageOptions](#storageoptions) + +## Usage + +To use the SecureStorage module, you can import it into your project from the Firebolt SDK: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' +``` + +## Overview + +A module for storing and retrieving secure data owned by the app + +## Methods + +### clear + +Clears all the secure data values + +```typescript +function clear(scope: StorageScope): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------- | -------- | --------------------------------------------------------------- | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the key/value
values: `'device' \| 'account'` | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:storage:secure | + +#### Examples + +Clears all the data values of storage + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let success = await SecureStorage.clear('account') +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.clear", + "params": { + "scope": "account" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### get + +Get stored value by key + +```typescript +function get(scope: StorageScope, key: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------- | -------- | --------------------------------------------------------------- | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the key/value
values: `'device' \| 'account'` | +| `key` | `string` | true | Key to get | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:storage:secure | + +#### Examples + +Successfully retrieve a refresh token with key authRefreshToken + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let value = await SecureStorage.get('device', 'authRefreshToken') +console.log(value) +``` + +Value of `value`: + +```javascript +'VGhpcyBub3QgYSByZWFsIHRva2VuLgo=' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.get", + "params": { + "scope": "device", + "key": "authRefreshToken" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" +} +``` + +
+ +Attempt to retrieve a key with no value set + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let value = await SecureStorage.get('account', 'authRefreshToken') +console.log(value) +``` + +Value of `value`: + +```javascript +'VGhpcyBub3QgYSByZWFsIHRva2VuLgo=' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.get", + "params": { + "scope": "account", + "key": "authRefreshToken" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### remove + +Remove a secure data value + +```typescript +function remove(scope: StorageScope, key: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------- | -------- | -------------------------------------------------------------- | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the data key
values: `'device' \| 'account'` | +| `key` | `string` | true | Key to remove | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:storage:secure | + +#### Examples + +Remove the value with key authRefreshToken for device + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let success = await SecureStorage.remove('device', 'authRefreshToken') +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.remove", + "params": { + "scope": "device", + "key": "authRefreshToken" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Remove the value with key authRefreshToken for account + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let success = await SecureStorage.remove('account', 'authRefreshToken') +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.remove", + "params": { + "scope": "account", + "key": "authRefreshToken" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### set + +Set or update a secure data value + +```typescript +function set( + scope: StorageScope, + key: string, + value: string, + options: StorageOptions, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ----------------------------------- | -------- | -------------------------------------------------------------- | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the data key
values: `'device' \| 'account'` | +| `key` | `string` | true | Key to set | +| `value` | `string` | true | Value to set | +| `options` | [`StorageOptions`](#storageoptions) | false | Optional parameters to set | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------- | +| uses | xrn:firebolt:capability:storage:secure | + +#### Examples + +Set a refresh token with name authRefreshToken with optional paramter + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let success = await SecureStorage.set( + 'device', + 'authRefreshToken', + 'VGhpcyBub3QgYSByZWFsIHRva2VuLgo=', + { ttl: 600 }, +) +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.set", + "params": { + "scope": "device", + "key": "authRefreshToken", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=", + "options": { + "ttl": 600 + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Set a refresh token with name authRefreshToken without optional parameter + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/sdk' + +let success = await SecureStorage.set( + 'account', + 'authRefreshToken', + 'VGhpcyBub3QgYSByZWFsIHRva2VuLgo=', + null, +) +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.set", + "params": { + "scope": "account", + "key": "authRefreshToken", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +## Types + +### StorageScope + +The scope of the data + +```typescript +StorageScope: { + DEVICE: 'device', + ACCOUNT: 'account', +}, + +``` + +--- + +### StorageOptions + +```typescript +type StorageOptions = { + ttl: number // Seconds from set time before the data expires and is removed +} +``` + +--- diff --git a/apis/pr-release-1-3-0/core/Types/schemas/index.md b/apis/pr-release-1-3-0/core/Types/schemas/index.md new file mode 100644 index 00000000..fc302336 --- /dev/null +++ b/apis/pr-release-1-3-0/core/Types/schemas/index.md @@ -0,0 +1,96 @@ +--- +title: Types + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +# Types + +--- + +Version Types 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [AudioProfile](#audioprofile) + - [SemanticVersion](#semanticversion) + - [BooleanMap](#booleanmap) + - [LocalizedString](#localizedstring) + - [FlatMap](#flatmap) + - [Timeout](#timeout) + +## Overview + +undefined + +## Types + +### AudioProfile + +```typescript +AudioProfile: { + STEREO: 'stereo', + DOLBY_DIGITAL_5_1: 'dolbyDigital5.1', + DOLBY_DIGITAL_7_1: 'dolbyDigital7.1', + DOLBY_DIGITAL_5_1_PLUS: 'dolbyDigital5.1+', + DOLBY_DIGITAL_7_1_PLUS: 'dolbyDigital7.1+', + DOLBY_ATMOS: 'dolbyAtmos', +}, + +``` + +--- + +### SemanticVersion + +```typescript +type SemanticVersion = { + major: number + minor: number + patch: number + readable: string +} +``` + +--- + +### BooleanMap + +```typescript +type BooleanMap = {} +``` + +--- + +### LocalizedString + +Localized string supports either a simple `string` or a Map of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed. + +```typescript +type LocalizedString = string | object +``` + +--- + +### FlatMap + +```typescript + +``` + +--- + +### Timeout + +Defines the timeout in seconds. If the threshold for timeout is passed for any operation without a result it will throw an error. + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/core/changelog.md b/apis/pr-release-1-3-0/core/changelog.md new file mode 100644 index 00000000..23b551fc --- /dev/null +++ b/apis/pr-release-1-3-0/core/changelog.md @@ -0,0 +1,229 @@ +--- +title: Change Log + +version: pr-release-1-3-0 +layout: default +sdk: core +--- +# 1.2.0 (https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + +### Bug Fixes + +* Add PlaylistEntity to EntityIntent (9769d6d (https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* Remove x-alternatives that don't exist (#278 (https://github.com/rdkcentral/firebolt-apis/issues/278)) (e38ad5a (https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version (#231 (https://github.com/rdkcentral/firebolt-apis/issues/231)) (ef3de3e (https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) + +### Features + +* [Command and Control Intents](https://github.com/rdkcentral/firebolt-apis/blob/main/requirements/specifications/intents/command-and-control.md) (#251 (https://github.com/rdkcentral/firebolt-apis/issues/251)) (c8f8dae (https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* [User Interest](https://github.com/rdkcentral/firebolt-apis/blob/main/requirements/specifications/discovery/user-interest.md) (#170 (https://github.com/rdkcentral/firebolt-apis/issues/170)) (48a1094 (https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + +# [1.1.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.0.0...v1.1.0) (2024-02-09) + +### Bug Fixes + +* Add Music to Playable entities (#225 (https://github.com/rdkcentral/firebolt-apis/issues/225)) (22c9b71 (https://github.com/rdkcentral/firebolt-apis/commit/22c9b71d3c0ee98d32585d1b365afabf8e64d6ed)) +* Modified account:uid to SHOULD (#224 (https://github.com/rdkcentral/firebolt-apis/issues/224)) (70c8b24 (https://github.com/rdkcentral/firebolt-apis/commit/70c8b24decfcbff2c32fb1b0d21290afc00a8432)) + +# [1.0.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.1...v1.0.0) (2023-11-03) + +Upgraded to 1.0 at part of RDK6 release. This API is still compatibile with 0.x versions. + +### Bug Fixes + +* Updated Discovery.launch example with xrn:firebolt: application-type (#187 (https://github.com/rdkcentral/firebolt-apis/issues/187)) (4dbbab3 (https://github.com/rdkcentral/firebolt-apis/commit/4dbbab3d9fa68c0e5185ca72fd0170bae8a30139)) + +### Features + +* Added scope parameter for advertisingId (#188 (https://github.com/rdkcentral/firebolt-apis/issues/188)) +* Play Intent (#151 (https://github.com/rdkcentral/firebolt-apis/issues/151)) (d1ddf3f (https://github.com/rdkcentral/firebolt-apis/commit/d1ddf3fb3b1f758315686ad2f6dc57c2b270f33a)) + +# [0.17.1](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.0...v0.17.1) (2023-09-15) + +### Bug Fixes + +fix: Add enumerated values for fontFamily/fontEdge (#181) + +# [0.17.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.16.0...v0.17.0) (2023-09-07) + +### Bug Fixes + +* fix: Using 3 letter ISO639 language codes ([#173](https://github.com/rdkcentral/firebolt-apis/issues/173)) + +# [0.15.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0...v0.15.0) (2023-07-31) + +### Bug Fixes + +* Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +* window fix from firebolt-openrpc 2.0.3 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) + +### Features + +* **Nullable CC Styles** Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* **Window CC Styles** Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) +* **Audio Descriptions** Audio Description and Preferred Audio Languages Settings ([#45](https://github.com/rdkcentral/firebolt-apis/issues/45)) ([58f6ea1](https://github.com/rdkcentral/firebolt-apis/commit/58f6ea1dde7a819883eb3da24f879b6a9ecc9a41)) + +# [0.14.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.13.0...v0.14.0) (2023-06-22) + +### Bug Fixes + +* **VoiceGuidance** Change voice guidance limits to 0.5 and 2 ([#137](https://github.com/rdkcentral/firebolt-apis/issues/137)) ([b8f1944](https://github.com/rdkcentral/firebolt-apis/commit/b8f19449efd808639599b162aba61c08ec089c41)) + +### Features + +* **Capabilities** Allow granted in capability.info and capability.granted to be null ([#134](https://github.com/rdkcentral/firebolt-apis/issues/134)) ([c5c31ee](https://github.com/rdkcentral/firebolt-apis/commit/c5c31ee3c744ec018a57232d2e7b1caf41158ed6)) + +# [0.13.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.12.0...v0.13.0) (2023-06-09) + +### Bug Fixes + +* Point to `firebolt-openrpc` 2.0.1 ([c57cb21](https://github.com/rdkcentral/firebolt-apis/commit/c57cb218343fd058e2e6e676d52d9d0c904ad9a8)) + +### Features + +* Add SecureStorage.clear method. ([#127](https://github.com/rdkcentral/firebolt-apis/issues/127)) ([4422c79](https://github.com/rdkcentral/firebolt-apis/commit/4422c79122fc35e7b35180254be52bf33c64ab5b)) + + +# [0.12.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.11.0...v0.12.0) (2023-05-18) + +### Bug Fixes + +* The `title` and `identifiers` parameters are now required for `Discovery.watchNext()` ([#124](https://github.com/rdkcentral/firebolt-core-sdk/issues/124)) ([96d7b2b](https://github.com/rdkcentral/firebolt-core-sdk/commit/96d7b2bb7464d6044346440d37feecba9dbc7899)) +* Fixed handling of context parameters for `Capabilities.listen()`. + +# [0.11.0](https://github.com/rdkcentral/firebolt-core-sdk/compare/v0.10.0...v0.11.0) (2023-05-01) + + +### Bug Fixes + +* Change doc examples to https ([#79](https://github.com/rdkcentral/firebolt-core-sdk/issues/79)) ([0da43e6](https://github.com/rdkcentral/firebolt-core-sdk/commit/0da43e666842bb75d20f9585c0d1f3f0236388ee)) +* Updated secure storage spec to allow null as result value ([#84](https://github.com/rdkcentral/firebolt-core-sdk/issues/84)) ([7ed1fed](https://github.com/rdkcentral/firebolt-core-sdk/commit/7ed1fed9ab9f5d84927c4e31c2816e15da0d6f44)) + + +# [0.10.0](https://github.com/rdkcentral/firebolt-core-sdk/compare/v0.9.0...v0.10.0) (2023-02-06) + + +### Bug Fixes + +* Capability module needs capability tags ([#71](https://github.com/rdkcentral/firebolt-core-sdk/issues/71)) ([6f0af1b](https://github.com/rdkcentral/firebolt-core-sdk/commit/6f0af1b9712faab137b1652ea337d5f284196ad4)) +* Change doc examples to https ([#79](https://github.com/rdkcentral/firebolt-core-sdk/issues/79)) ([c7047af](https://github.com/rdkcentral/firebolt-core-sdk/commit/c7047af9f3fa47e8cd7d252c3bbd321fa8f3d125)) +* FIRESDK-31 returned response from Lifecycle.ready method ([#81](https://github.com/rdkcentral/firebolt-core-sdk/issues/81)) ([efc740f](https://github.com/rdkcentral/firebolt-core-sdk/commit/efc740f7899897981cc840f12efe30f3e9543be4)) +* Updated openrpc version to 1.8.0-next.2 ([#85](https://github.com/rdkcentral/firebolt-core-sdk/issues/85)) ([b988c41](https://github.com/rdkcentral/firebolt-core-sdk/commit/b988c4159b154f8c041b766f794618250448bce0)) +* Updated secure storage spec to allow null as result value ([#84](https://github.com/rdkcentral/firebolt-core-sdk/issues/84)) ([4117ad7](https://github.com/rdkcentral/firebolt-core-sdk/commit/4117ad79322c8a3decd59f5ad52d5dfe6cf2f2a4)) +* Use new openrpc template code with bug fixes ([#69](https://github.com/rdkcentral/firebolt-core-sdk/issues/69)) ([9fed6fc](https://github.com/rdkcentral/firebolt-core-sdk/commit/9fed6fcb71b9914e91674f5e80f7d61673cc66fe)) +* Word publish scripts ([#78](https://github.com/rdkcentral/firebolt-core-sdk/issues/78)) ([a3846e0](https://github.com/rdkcentral/firebolt-core-sdk/commit/a3846e0db22e1221547ad97a019aba3850c51f6a)) + + +### Features + +* Add content-access api, deprecate entitlements, remove availabi… ([#83](https://github.com/rdkcentral/firebolt-core-sdk/issues/83)) ([f3c8017](https://github.com/rdkcentral/firebolt-core-sdk/commit/f3c8017eb391119e47d810426fdae4b11d8e0c38)) +* Add Secure Storage module ([#77](https://github.com/rdkcentral/firebolt-core-sdk/issues/77)) ([f62e4ae](https://github.com/rdkcentral/firebolt-core-sdk/commit/f62e4aeb9325df00c6a2484cf3aaa0b756bd8113)) +* New Capabilities API ([#63](https://github.com/rdkcentral/firebolt-core-sdk/issues/63)) ([0ba5ef5](https://github.com/rdkcentral/firebolt-core-sdk/commit/0ba5ef5e030ce740e40fd5ad30ca5cfd100cf32e)) +* Trigger ([607825b](https://github.com/rdkcentral/firebolt-core-sdk/commit/607825bd5547c74a8a7707f751446ab0e069d9f9)) +* Turn on dryRun ([dcddc60](https://github.com/rdkcentral/firebolt-core-sdk/commit/dcddc6068f91505d97457ed04eb8e2996dab9278)) + + +# 0.9.0 + +### Features + +* Adding Availabilities API ([#65](https://github.com/rdkcentral/firebolt-core-sdk/issues/65)) ([ec940dd](https://github.com/rdkcentral/firebolt-core-sdk/commit/ec940dd1a7a6865f18d64ada69793c87556a172e)) +* Tagging Capabilities ([e3b6ee2](https://github.com/rdkcentral/firebolt-core-sdk/commit/e3b6ee2475fbd9157a40bc92490c06df135ebc34)) + +### Bug Fixes + +* Don't ignore source files when publishing to npm [skip ci] ([cb26ff2](https://github.com/rdkcentral/firebolt-core-sdk/commit/cb26ff2e09416613c5557e76966eccbe0ec66d54)) +* Build SDK before npm publish ([#64](https://github.com/rdkcentral/firebolt-core-sdk/issues/64)) ([f221fa3](https://github.com/rdkcentral/firebolt-core-sdk/commit/f221fa34e24e29e86487b1ec98468b64f495d134)) +* **Lifecycle:** lifecycle state api returns correct state in all circumstances ([31e405c](https://github.com/rdkcentral/firebolt-core-sdk/commit/31e405c124d29a3e87294dc4b356ff8df9972af8)) + +# 0.8.1 + +- Added Device.version().firmware to surface the underlying hardware firmware version +- Added Device.version().api to surface the latest Firebolt API supported by this device +- Deprecated Device.version().os which does not have a formal specification. Use `firmware` instead. + +# 0.8.0 + +- Tune Intents are now supported in `navigateTo` events +- Added TypeScript declarations for Settings and Events +- Fixed/Removed test-enabling code from SDK +- Fixed bug where the SDK would initialize itself even when not being used + +# 0.7.0 + +- Removed all `bigint` types from TypeScript declarations, in favor of `number`, since bigint is not widely supported across browsers. This changes impacts: + - Device.screenResolution + - Device.videoResolution + - Discovery.purchasedContent + - Metrics.mediaProgress + - Metrics.mediaSeeking + - Metrics.mediaSeeked + - Parameters.initialization + +To upgrade to 0.7.0 simply change the type of any Firebolt Promise resolutions from `bigint` to `number`, e.g.: + +```typescript +const res:[bigint, bigint] = await Device.screenResolution() +``` + +Should become: + +```typescript +const res:[number, number] = await Device.screenResolution() +``` + +# 0.6.2 + +- Fixed incompatibility with Jest 26 due to [jest/issues/10565](https://github.com/facebook/jest/issues/10565) + + +# 0.6.1 + +- Changed Firebolt build to use `.mjs` extension +- Firebolt builds are now pure ES6 modules, not bundled with Webpack +- Added `types` path to package.json +- Fixed TypeScript declarations for `FlatMap` and `BooleanMap` +- Added TypeScript return type declarations for `listen` and `once` (all modules) +- Added TypeScript declaration for `clear` method (all modules) +- Changed `{}` return type to `void` for listener callbacks + +# 0.6.0 + +- Added support for [rdkcentral/mock-firebolt](https://github.com/rdkcentral/mock-firebolt/) via a WebSocket transport layer +- Deprecated Accessibility.closedCaptions and voiceGuidance, created properties for Accessibility.closedCaptionsSettings and voiceGuidanceSettings, which support subscribers +- Deprecated Device.listen('deviceNameChanged'), added support for subscribing to Device.name() +- Added support for subscribing to property changes: Device.audio, hdcp, hdr, name, network, screenResolution, videoResolution, Advertising.policy, Discovery.policy, Localization.language +- Added proper TypeScript declarations for Discovery.entityInfo and Discovery.purchasedContent +- Fixed race condition w/ Transport Layer initialization + +# 0.5.2 + +- Added Parameters modules +- Fixed typo in Advertising.config example result for docs/Mock +- Updated Metrics.error signature to include `type` as first parameter +- Created window.__firebolt.testHarness handshake (for Mock TL only) +- Added `LocalizedString` type for localized string dictionaries +- Updated `Discovery.watchNext` to use `LocalizedString` for `title` and each property of `images` +- Added `OfferingType` and `ProgramType` parameters to `Discovery.purchasedContent` + +# 0.5.1 + +- Cleaned up errors in various Mock responses +- Methods that call private Metrics APIs, e.g. Lifecycle.ready, now do so **after** promise resolution + +# 0.5.0 + +- Updated TS declarations (.d.ts) to detect which event is being passed to `.listen()` methods +- Updated all `listen()` and `once()` methods to return a `Promise` +- Renamed `verifyContentRating` and `verifyPurchase` to `approveContentRating` and `approvePurchase` respectively +- Added `Profile.flags()` for distributor-specific profile flags +- Added optional `source` field to all `LifecycleEvents` +- Complete rewrite of `Metrics` APIs (see docs) +- Added `policyChanged` events to `Discovery` and `Advertising` +- Fixed duplicate RPC `listen` calls when listening to an event in slightly different ways, e.g. `once()` vs `listen()` +- Added Account, Authentication, Keyboard, Profile, SecondScreen modules +- Added Federated Search APIs to Discovery +- Added TypeScript/Intellisense declarations file +- Fixed spelling error on Accessibility module name +- Moved the `coppa` parameter for `Advertising.confg()` into the `options` object, and made it optional +- Final version of `Advertising.policy().skipRestriction` semantics diff --git a/apis/pr-release-1-3-0/core/index.md b/apis/pr-release-1-3-0/core/index.md new file mode 100644 index 00000000..1c42513e --- /dev/null +++ b/apis/pr-release-1-3-0/core/index.md @@ -0,0 +1,30 @@ +--- +title: Firebolt Core SDK + +version: pr-release-1-3-0 +layout: default +sdk: core +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt Core SDK +The primary Firebolt SDK for building Firebolt compliant apps. + +## Usage +To install, run: + +``` +npm install @firebolt-js/sdk +``` + +To use the package, import one of it's modules, e.g.: + +```js +import { Lifecycle } from '@firebolt-js/sdk' +``` + +## Contributing +The Firebolt Core SDK is built using the Firebolt OpenRPC toolset: + +See [Firebolt OpenRPC](https://www.github.com/rdkcentral/firebolt-openrpc/), for more info. diff --git a/apis/pr-release-1-3-0/discovery/Accessibility/schemas/index.md b/apis/pr-release-1-3-0/discovery/Accessibility/schemas/index.md new file mode 100644 index 00000000..75e23c10 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Accessibility/schemas/index.md @@ -0,0 +1,154 @@ +--- +title: Accessibility + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Accessibility + +--- + +Version Accessibility 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [FontFamily](#fontfamily) + - [VoiceSpeed](#voicespeed) + - [VoiceGuidanceSettings](#voiceguidancesettings) + - [FontSize](#fontsize) + - [Color](#color) + - [FontEdge](#fontedge) + - [Opacity](#opacity) + - [HorizontalAlignment](#horizontalalignment) + - [VerticalAlignment](#verticalalignment) + - [ClosedCaptionsStyles](#closedcaptionsstyles) + - [ClosedCaptionsSettings](#closedcaptionssettings) + +## Overview + +undefined + +## Types + +### FontFamily + +```typescript + +``` + +--- + +### VoiceSpeed + +```typescript + +``` + +--- + +### VoiceGuidanceSettings + +```typescript +type VoiceGuidanceSettings = { + enabled: boolean // Whether or not voice guidance should be enabled by default + speed: VoiceSpeed // The speed at which voice guidance speech will be read back to the user +} +``` + +See also: + +[VoiceSpeed](#voicespeed) + +--- + +### FontSize + +```typescript + +``` + +--- + +### Color + +```typescript + +``` + +--- + +### FontEdge + +```typescript + +``` + +--- + +### Opacity + +```typescript + +``` + +--- + +### HorizontalAlignment + +```typescript + +``` + +--- + +### VerticalAlignment + +```typescript + +``` + +--- + +### ClosedCaptionsStyles + +The default styles to use when displaying closed-captions + +```typescript +type ClosedCaptionsStyles = { + fontFamily?: string + fontSize?: number + fontColor?: string + fontEdge?: string + fontEdgeColor?: string + fontOpacity?: number + backgroundColor?: string + backgroundOpacity?: number + textAlign?: string + textAlignVertical?: string + windowColor?: string + windowOpacity?: number +} +``` + +--- + +### ClosedCaptionsSettings + +```typescript +type ClosedCaptionsSettings = { + enabled: boolean // Whether or not closed-captions should be enabled by default + styles: ClosedCaptionsStyles // The default styles to use when displaying closed-captions + preferredLanguages?: string[] +} +``` + +See also: + +[ClosedCaptionsStyles](#closedcaptionsstyles) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Advertising/schemas/index.md b/apis/pr-release-1-3-0/discovery/Advertising/schemas/index.md new file mode 100644 index 00000000..8f0288e6 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Advertising/schemas/index.md @@ -0,0 +1,53 @@ +--- +title: Advertising + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Advertising + +--- + +Version Advertising 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [SkipRestriction](#skiprestriction) + +## Overview + +undefined + +## Types + +### SkipRestriction + +The advertisement skip restriction. + +Applies to fast-forward/rewind (e.g. trick mode), seeking over an entire opportunity (e.g. jump), seeking out of what's currently playing, and "Skip this ad..." features. Seeking over multiple ad opportunities only requires playback of the _last_ opportunity, not all opportunities, preceding the seek destination. + +| Value | Description | +| ------------ | ------------------------------------------------------------------------------ | +| none | No fast-forward, jump, or skip restrictions | +| adsUnwatched | Restrict fast-forward, jump, and skip for unwatched ad opportunities only. | +| adsAll | Restrict fast-forward, jump, and skip for all ad opportunities | +| all | Restrict fast-forward, jump, and skip for all ad opportunities and all content | + +Namespace: `xrn:advertising:policy:skipRestriction:` + +```typescript +SkipRestriction: { + NONE: 'none', + ADS_UNWATCHED: 'adsUnwatched', + ADS_ALL: 'adsAll', + ALL: 'all', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/discovery/Capabilities/schemas/index.md b/apis/pr-release-1-3-0/discovery/Capabilities/schemas/index.md new file mode 100644 index 00000000..f4a16ed0 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Capabilities/schemas/index.md @@ -0,0 +1,121 @@ +--- +title: Capabilities + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Capabilities + +--- + +Version Capabilities 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [Role](#role) + - [DenyReason](#denyreason) + - [Capability](#capability) + - [CapPermissionStatus](#cappermissionstatus) + - [CapabilityInfo](#capabilityinfo) + - [Permission](#permission) + +## Overview + +undefined + +## Types + +### Role + +Role provides access level for the app for a given capability. + +```typescript +Role: { + USE: 'use', + MANAGE: 'manage', + PROVIDE: 'provide', +}, + +``` + +--- + +### DenyReason + +Reasons why a Capability might not be invokable + +```typescript +DenyReason: { + UNPERMITTED: 'unpermitted', + UNSUPPORTED: 'unsupported', + DISABLED: 'disabled', + UNAVAILABLE: 'unavailable', + GRANT_DENIED: 'grantDenied', + UNGRANTED: 'ungranted', +}, + +``` + +--- + +### Capability + +A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + +```typescript + +``` + +--- + +### CapPermissionStatus + +```typescript + +``` + +--- + +### CapabilityInfo + +```typescript +type CapabilityInfo = { + capability?: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + supported: boolean // Provides info whether the capability is supported + available: boolean // Provides info whether the capability is available + use: object + manage: object + provide: object + details?: DenyReason[] // Reasons why a Capability might not be invokable +} +``` + +See also: + +[Capability](#capability) +[DenyReason](#denyreason) + +--- + +### Permission + +A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user). + +```typescript +type Permission = { + role?: Role // Role provides access level for the app for a given capability. + capability: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. +} +``` + +See also: + +[Role](#role) +[Capability](#capability) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Content/index.md b/apis/pr-release-1-3-0/discovery/Content/index.md new file mode 100644 index 00000000..79198bce --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Content/index.md @@ -0,0 +1,434 @@ +--- +title: Content + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Content Module + +--- + +Version Content 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [listen](#listen) + - [once](#once) + - [requestUserInterest](#requestuserinterest) +- [Events](#events) + - [userInterest](#userinterest) +- [Types](#types) + - [InterestResult](#interestresult) + - [InterestEvent](#interestevent) + +## Usage + +To use the Content module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Content } from '@firebolt-js/discovery-sdk' +``` + +## Overview + +undefined + +## Methods + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Content.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Content.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Content.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Content.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### requestUserInterest + +Provide information about the entity currently displayed or selected on the screen. + +```typescript +function requestUserInterest( + type: InterestType, + reason: InterestReason, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------------------------------------------------------- | -------- | ------------------------------------------------------ | +| `type` | [`InterestType`](../Discovery/schemas/#InterestType) | true |
values: `'interest' \| 'disinterest'` | +| `reason` | [`InterestReason`](../Discovery/schemas/#InterestReason) | true |
values: `'playlist' \| 'reaction' \| 'recording'` | + +Promise resolution: + +[InterestResult](#interestresult) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:interest | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Content } from '@firebolt-js/discovery-sdk' + +let interest = await Content.requestUserInterest('interest', 'playlist') +console.log(interest) +``` + +Value of `interest`: + +```javascript +{ + "appId": "cool-app", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Content.requestUserInterest", + "params": { + "type": "interest", + "reason": "playlist" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "appId": "cool-app", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } +} +``` + +
+ +--- + +## Events + +### userInterest + +```typescript +function listen('userInterest', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[InterestEvent](#interestevent) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------ | +| uses | xrn:firebolt:capability:discovery:interest | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Content } from '@firebolt-js/discovery-sdk' + +Content.listen('userInterest', (interest) => { + console.log(interest) +}) +``` + +Value of `interest`: + +```javascript +{ + "appId": "cool-app", + "type": "interest", + "reason": "playlist", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Content.onUserInterest", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "appId": "cool-app", + "type": "interest", + "reason": "playlist", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } +} +``` + +
+ +--- + +## Types + +### InterestResult + +```typescript +type InterestResult = { + appId: string + entity: EntityDetails +} +``` + +See also: + +[EntityDetails](../Entity/schemas/#EntityDetails) + +--- + +### InterestEvent + +```typescript +type InterestEvent = { + appId: string + type: InterestType + reason: InterestReason + entity: EntityDetails +} +``` + +See also: + +[InterestType](../Discovery/schemas/#InterestType) +[InterestReason](../Discovery/schemas/#InterestReason) +[EntityDetails](../Entity/schemas/#EntityDetails) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Discovery/schemas/index.md b/apis/pr-release-1-3-0/discovery/Discovery/schemas/index.md new file mode 100644 index 00000000..7c0ca933 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Discovery/schemas/index.md @@ -0,0 +1,88 @@ +--- +title: Discovery + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Discovery + +--- + +Version Discovery 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [InterestType](#interesttype) + - [InterestReason](#interestreason) + - [EntityInfoResult](#entityinforesult) + - [PurchasedContentResult](#purchasedcontentresult) + +## Overview + +undefined + +## Types + +### InterestType + +```typescript +InterestType: { + INTEREST: 'interest', + DISINTEREST: 'disinterest', +}, + +``` + +--- + +### InterestReason + +```typescript +InterestReason: { + PLAYLIST: 'playlist', + REACTION: 'reaction', + RECORDING: 'recording', +}, + +``` + +--- + +### EntityInfoResult + +The result for an `entityInfo()` push or pull. + +```typescript +type EntityInfoResult = { + expires: string + entity: EntityInfo // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + related?: EntityInfo[] // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. +} +``` + +See also: + +[EntityInfo](../Entertainment/schemas/#EntityInfo) + +--- + +### PurchasedContentResult + +```typescript +type PurchasedContentResult = { + expires: string + totalCount: number + entries: EntityInfo[] // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. +} +``` + +See also: + +[EntityInfo](../Entertainment/schemas/#EntityInfo) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Entertainment/schemas/index.md b/apis/pr-release-1-3-0/discovery/Entertainment/schemas/index.md new file mode 100644 index 00000000..4dac1aa8 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Entertainment/schemas/index.md @@ -0,0 +1,285 @@ +--- +title: Entertainment + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Entertainment + +--- + +Version Entertainment 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [OfferingType](#offeringtype) + - [MusicType](#musictype) + - [ProgramType](#programtype) + - [ContentRating](#contentrating) +- [United States](#united-states) +- [Canada](#canada) + - [ContentIdentifiers](#contentidentifiers) + - [Entitlement](#entitlement) + - [WayToWatch](#waytowatch) + - [EntityInfo](#entityinfo) + +## Overview + +undefined + +## Types + +### OfferingType + +The offering type of the WayToWatch. + +```typescript +OfferingType: { + FREE: 'free', + SUBSCRIBE: 'subscribe', + BUY: 'buy', + RENT: 'rent', +}, + +``` + +--- + +### MusicType + +In the case of a music `entityType`, specifies the type of music entity. + +```typescript +MusicType: { + SONG: 'song', + ALBUM: 'album', +}, + +``` + +--- + +### ProgramType + +In the case of a program `entityType`, specifies the program type. + +```typescript +ProgramType: { + MOVIE: 'movie', + EPISODE: 'episode', + SEASON: 'season', + SERIES: 'series', + OTHER: 'other', + PREVIEW: 'preview', + EXTRA: 'extra', + CONCERT: 'concert', + SPORTING_EVENT: 'sportingEvent', + ADVERTISEMENT: 'advertisement', + MUSIC_VIDEO: 'musicVideo', + MINISODE: 'minisode', +}, + +``` + +--- + +### ContentRating + +A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. + +## United States + +`US-Movie` (MPAA): + +Ratings: `NR`, `G`, `PG`, `PG13`, `R`, `NC17` + +Advisories: `AT`, `BN`, `SL`, `SS`, `N`, `V` + +`US-TV` (Vchip): + +Ratings: `TVY`, `TVY7`, `TVG`, `TVPG`, `TV14`, `TVMA` + +Advisories: `FV`, `D`, `L`, `S`, `V` + +## Canada + +`CA-Movie` (OFRB): + +Ratings: `G`, `PG`, `14A`, `18A`, `R`, `E` + +`CA-TV` (AGVOT) + +Ratings: `E`, `C`, `C8`, `G`, `PG`, `14+`, `18+` + +Advisories: `C`, `C8`, `G`, `PG`, `14+`, `18+` + +`CA-Movie-Fr` (Canadian French language movies): + +Ratings: `G`, `8+`, `13+`, `16+`, `18+` + +`CA-TV-Fr` (Canadian French language TV): + +Ratings: `G`, `8+`, `13+`, `16+`, `18+` + +```typescript +type ContentRating = { + scheme: + | 'CA-Movie' + | 'CA-TV' + | 'CA-Movie-Fr' + | 'CA-TV-Fr' + | 'US-Movie' + | 'US-TV' // The rating scheme. + rating: string // The content rating. + advisories?: string[] // Optional list of subratings or content advisories. +} +``` + +--- + +### ContentIdentifiers + +The ContentIdentifiers object is how the app identifies an entity or asset to +the Firebolt platform. These ids are used to look up metadata and deep link into +the app. + +Apps do not need to provide all ids. They only need to provide the minimum +required to target a playable stream or an entity detail screen via a deep link. +If an id isn't needed to get to those pages, it doesn't need to be included. + +```typescript +type ContentIdentifiers = { + assetId?: string // Identifies a particular playable asset. For example, the HD version of a particular movie separate from the UHD version. + entityId?: string // Identifies an entity, such as a Movie, TV Series or TV Episode. + seasonId?: string // The TV Season for a TV Episode. + seriesId?: string // The TV Series for a TV Episode or TV Season. + appContentData?: string // App-specific content identifiers. +} +``` + +--- + +### Entitlement + +```typescript +type Entitlement = { + entitlementId: string + startTime?: string + endTime?: string +} +``` + +--- + +### WayToWatch + +A WayToWatch describes a way to watch a video program. It may describe a single +streamable asset or a set of streamable assets. For example, an app provider may +describe HD, SD, and UHD assets as individual WayToWatch objects or rolled into +a single WayToWatch. + +If the WayToWatch represents a single streamable asset, the provided +ContentIdentifiers must be sufficient to play back the specific asset when sent +via a playback intent or deep link. If the WayToWatch represents multiple +streamable assets, the provided ContentIdentifiers must be sufficient to +playback one of the assets represented with no user action. In this scenario, +the app SHOULD choose the best asset for the user based on their device and +settings. The ContentIdentifiers MUST also be sufficient for navigating the user +to the appropriate entity or detail screen via an entity intent. + +The app should set the `entitled` property to indicate if the user can watch, or +not watch, the asset without making a purchase. If the entitlement is known to +expire at a certain time (e.g., a rental), the app should also provide the +`entitledExpires` property. If the entitlement is not expired, the UI will use +the `entitled` property to display watchable assets to the user, adjust how +assets are presented to the user, and how intents into the app are generated. +For example, the the Aggregated Experience could render a "Watch" button for an +entitled asset versus a "Subscribe" button for an non-entitled asset. + +The app should set the `offeringType` to define how the content may be +authorized. The UI will use this to adjust how content is presented to the user. + +A single WayToWatch cannot represent streamable assets available via multiple +purchase paths. If, for example, an asset has both Buy, Rent and Subscription +availability, the three different entitlement paths MUST be represented as +multiple WayToWatch objects. + +`price` should be populated for WayToWatch objects with `buy` or `rent` +`offeringType`. If the WayToWatch represents a set of assets with various price +points, the `price` provided must be the lowest available price. + +```typescript +type WayToWatch = { + identifiers: ContentIdentifiers // The ContentIdentifiers object is how the app identifies an entity or asset to + expires?: string // Time when the WayToWatch is no longer available. + entitled?: boolean // Specify if the user is entitled to watch the entity. + entitledExpires?: string // Time when the entity is no longer entitled. + offeringType?: OfferingType // The offering type of the WayToWatch. + hasAds?: boolean // True if the streamable asset contains ads. + price?: number // For "buy" and "rent" WayToWatch, the price to buy or rent in the user's preferred currency. + videoQuality?: 'SD' | 'HD' | 'UHD'[] // List of the video qualities available via the WayToWatch. + audioProfile: AudioProfile[] // List of the audio types available via the WayToWatch. + audioLanguages?: string[] // List of audio track languages available on the WayToWatch. The first is considered the primary language. Languages are expressed as ISO 639 1/2 codes. + closedCaptions?: string[] // List of languages for which closed captions are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. + subtitles?: string[] // List of languages for which subtitles are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. + audioDescriptions?: string[] // List of languages for which audio descriptions (DVD) as available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. +} +``` + +See also: + +[ContentIdentifiers](#contentidentifiers) +[OfferingType](#offeringtype) +[AudioProfile](../Types/schemas/#AudioProfile) + +--- + +### EntityInfo + +An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + +Additionally, EntityInfo objects must specify a properly formed +ContentIdentifiers object, `entityType`, and `title`. The app should provide +the `synopsis` property for a good user experience if the content +metadata is not available another way. + +The ContentIdentifiers must be sufficient for navigating the user to the +appropriate entity or detail screen via a `detail` intent or deep link. + +EntityInfo objects must provide at least one WayToWatch object when returned as +part of an `entityInfo` method and a streamable asset is available to the user. +It is optional for the `purchasedContent` method, but recommended because the UI +may use those data. + +```typescript +type EntityInfo = { + identifiers: ContentIdentifiers // The ContentIdentifiers object is how the app identifies an entity or asset to + title: string // Title of the entity. + entityType: 'program' | 'music' // The type of the entity, e.g. `program` or `music`. + programType?: ProgramType // In the case of a program `entityType`, specifies the program type. + musicType?: MusicType // In the case of a music `entityType`, specifies the type of music entity. + synopsis?: string // Short description of the entity. + seasonNumber?: number // For TV seasons, the season number. For TV episodes, the season that the episode belongs to. + seasonCount?: number // For TV series, seasons, and episodes, the total number of seasons. + episodeNumber?: number // For TV episodes, the episode number. + episodeCount?: number // For TV seasons and episodes, the total number of episodes in the current season. + releaseDate?: string // The date that the program or entity was released or first aired. + contentRatings?: ContentRating[] // A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. + waysToWatch?: WayToWatch[] // A WayToWatch describes a way to watch a video program. It may describe a single +} +``` + +See also: + +[ContentIdentifiers](#contentidentifiers) +[ProgramType](#programtype) +[MusicType](#musictype) +[ContentRating](#contentrating) +[WayToWatch](#waytowatch) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Entity/schemas/index.md b/apis/pr-release-1-3-0/discovery/Entity/schemas/index.md new file mode 100644 index 00000000..51c95c96 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Entity/schemas/index.md @@ -0,0 +1,287 @@ +--- +title: Entity + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Entity + +--- + +Version Entity 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [MovieEntity](#movieentity) + - [Metadata](#metadata) + - [MusicEntity](#musicentity) + - [ChannelEntity](#channelentity) + - [UntypedEntity](#untypedentity) + - [PlaylistEntity](#playlistentity) + - [TVEpisodeEntity](#tvepisodeentity) + - [TVSeasonEntity](#tvseasonentity) + - [TVSeriesEntity](#tvseriesentity) + - [AdditionalEntity](#additionalentity) + - [ProgramEntity](#programentity) + - [Entity](#entity) + - [EntityDetails](#entitydetails) + - [PlayableEntity](#playableentity) + +## Overview + +undefined + +## Types + +### MovieEntity + +A Firebolt compliant representation of a Movie entity. + +```typescript +type MovieEntity = { + entityType: 'program' + programType: 'movie' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### Metadata + +```typescript +type Metadata = { + title?: string // Title of the entity. + synopsis?: string // Short description of the entity. + seasonNumber?: number // For TV seasons, the season number. For TV episodes, the season that the episode belongs to. + seasonCount?: number // For TV series, seasons, and episodes, the total number of seasons. + episodeNumber?: number // For TV episodes, the episode number. + episodeCount?: number // For TV seasons and episodes, the total number of episodes in the current season. + releaseDate?: string // The date that the program or entity was released or first aired. + contentRatings?: ContentRating[] // A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. +} +``` + +See also: + +[ContentRating](../Entertainment/schemas/#ContentRating) + +--- + +### MusicEntity + +```typescript +type MusicEntity = { + entityType: 'music' + musicType: MusicType // In the case of a music `entityType`, specifies the type of music entity. + entityId: string +} +``` + +See also: + +[MusicType](../Entertainment/schemas/#MusicType) + +--- + +### ChannelEntity + +```typescript +type ChannelEntity = { + entityType: 'channel' + channelType: 'streaming' | 'overTheAir' + entityId: string // ID of the channel, in the target App's scope. + appContentData?: string +} +``` + +--- + +### UntypedEntity + +```typescript +type UntypedEntity = { + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### PlaylistEntity + +A Firebolt compliant representation of a Playlist entity. + +```typescript +type PlaylistEntity = { + entityType: 'playlist' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVEpisodeEntity + +A Firebolt compliant representation of a TV Episode entity. + +```typescript +type TVEpisodeEntity = { + entityType: 'program' + programType: 'episode' + entityId: string + seriesId: string + seasonId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVSeasonEntity + +A Firebolt compliant representation of a TV Season entity. + +```typescript +type TVSeasonEntity = { + entityType: 'program' + programType: 'season' + entityId: string + seriesId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVSeriesEntity + +A Firebolt compliant representation of a TV Series entity. + +```typescript +type TVSeriesEntity = { + entityType: 'program' + programType: 'series' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### AdditionalEntity + +A Firebolt compliant representation of the remaining program entity types. + +```typescript +type AdditionalEntity = { + entityType: 'program' + programType: + | 'concert' + | 'sportingEvent' + | 'preview' + | 'other' + | 'advertisement' + | 'musicVideo' + | 'minisode' + | 'extra' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### ProgramEntity + +```typescript +type ProgramEntity = + | MovieEntity + | TVEpisodeEntity + | TVSeasonEntity + | TVSeriesEntity + | AdditionalEntity +``` + +See also: + +[MovieEntity](#movieentity) +[TVEpisodeEntity](#tvepisodeentity) +[TVSeasonEntity](#tvseasonentity) +[TVSeriesEntity](#tvseriesentity) +[AdditionalEntity](#additionalentity) + +--- + +### Entity + +```typescript + +``` + +See also: + +[ProgramEntity](#programentity) +[MusicEntity](#musicentity) +[ChannelEntity](#channelentity) +[UntypedEntity](#untypedentity) +[PlaylistEntity](#playlistentity) + +--- + +### EntityDetails + +```typescript +type EntityDetails = { + identifiers: + | ProgramEntity + | MusicEntity + | ChannelEntity + | UntypedEntity + | PlaylistEntity + info?: Metadata + waysToWatch?: WayToWatch[] // A WayToWatch describes a way to watch a video program. It may describe a single +} +``` + +See also: + +[Metadata](#metadata) +[WayToWatch](../Entertainment/schemas/#WayToWatch) + +--- + +### PlayableEntity + +```typescript +type PlayableEntity = + | MovieEntity + | TVEpisodeEntity + | PlaylistEntity + | MusicEntity + | AdditionalEntity +``` + +See also: + +[MovieEntity](#movieentity) +[TVEpisodeEntity](#tvepisodeentity) +[PlaylistEntity](#playlistentity) +[MusicEntity](#musicentity) +[AdditionalEntity](#additionalentity) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Intents/schemas/index.md b/apis/pr-release-1-3-0/discovery/Intents/schemas/index.md new file mode 100644 index 00000000..4c7ce14b --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Intents/schemas/index.md @@ -0,0 +1,232 @@ +--- +title: Intents + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Intents + +--- + +Version Intents 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [Intent](#intent) + - [IntentProperties](#intentproperties) + - [EntityIntent](#entityintent) + - [PlaybackIntent](#playbackintent) + - [SearchIntent](#searchintent) + - [SectionIntent](#sectionintent) + - [TuneIntent](#tuneintent) + - [PlayEntityIntent](#playentityintent) + - [PlayQueryIntent](#playqueryintent) + - [HomeIntent](#homeintent) + - [LaunchIntent](#launchintent) + - [NavigationIntent](#navigationintent) + +## Overview + +undefined + +## Types + +### Intent + +A Firebolt compliant representation of a user intention. + +```typescript + +``` + +--- + +### IntentProperties + +```typescript + +``` + +--- + +### EntityIntent + +A Firebolt compliant representation of a user intention to navigate an app to a specific entity page, and bring that app to the foreground if needed. + +```typescript +type EntityIntent = { + action: 'entity' + data: + | ProgramEntity + | MusicEntity + | ChannelEntity + | UntypedEntity + | PlaylistEntity + context: object +} +``` + +--- + +### PlaybackIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed. + +```typescript +type PlaybackIntent = { + action: 'playback' + data: PlayableEntity + context: object +} +``` + +See also: + +[PlayableEntity](../Entity/schemas/#PlayableEntity) + +--- + +### SearchIntent + +A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed. + +```typescript +type SearchIntent = { + action: 'search' + data?: object + context: object +} +``` + +--- + +### SectionIntent + +A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed. + +```typescript +type SectionIntent = { + action: 'section' + data: object + context: object +} +``` + +--- + +### TuneIntent + +A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App. + +```typescript +type TuneIntent = { + action: 'tune' + data: object + context: object +} +``` + +See also: + +[ChannelEntity](../Entity/schemas/#ChannelEntity) + +--- + +### PlayEntityIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed. + +```typescript +type PlayEntityIntent = { + action: 'play-entity' + data: object + context: object +} +``` + +See also: + +[PlayableEntity](../Entity/schemas/#PlayableEntity) + +--- + +### PlayQueryIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for an abstract query to be searched for and played by the app. + +```typescript +type PlayQueryIntent = { + action: 'play-query' + data: object + context: object +} +``` + +See also: + +[ProgramType](../Entertainment/schemas/#ProgramType) +[MusicType](../Entertainment/schemas/#MusicType) + +--- + +### HomeIntent + +A Firebolt compliant representation of a user intention to navigate an app to it's home screen, and bring that app to the foreground if needed. + +```typescript +type HomeIntent = { + action: 'home' + context: object +} +``` + +--- + +### LaunchIntent + +A Firebolt compliant representation of a user intention to launch an app. + +```typescript +type LaunchIntent = { + action: 'launch' + context: object +} +``` + +--- + +### NavigationIntent + +A Firebolt compliant representation of a user intention to navigate to a specific place in an app. + +```typescript +type NavigationIntent = + | HomeIntent + | LaunchIntent + | EntityIntent + | PlaybackIntent + | SearchIntent + | SectionIntent + | TuneIntent + | PlayEntityIntent + | PlayQueryIntent +``` + +See also: + +[HomeIntent](#homeintent) +[LaunchIntent](#launchintent) +[EntityIntent](#entityintent) +[PlaybackIntent](#playbackintent) +[SearchIntent](#searchintent) +[SectionIntent](#sectionintent) +[TuneIntent](#tuneintent) +[PlayEntityIntent](#playentityintent) +[PlayQueryIntent](#playqueryintent) + +--- diff --git a/apis/pr-release-1-3-0/discovery/Lifecycle/schemas/index.md b/apis/pr-release-1-3-0/discovery/Lifecycle/schemas/index.md new file mode 100644 index 00000000..3a0a1eac --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Lifecycle/schemas/index.md @@ -0,0 +1,61 @@ +--- +title: Lifecycle + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Lifecycle + +--- + +Version Lifecycle 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [CloseReason](#closereason) + - [LifecycleState](#lifecyclestate) + +## Overview + +undefined + +## Types + +### CloseReason + +The application close reason + +```typescript +CloseReason: { + REMOTE_BUTTON: 'remoteButton', + USER_EXIT: 'userExit', + DONE: 'done', + ERROR: 'error', +}, + +``` + +--- + +### LifecycleState + +The application lifecycle state + +```typescript +LifecycleState: { + INITIALIZING: 'initializing', + INACTIVE: 'inactive', + FOREGROUND: 'foreground', + BACKGROUND: 'background', + UNLOADING: 'unloading', + SUSPENDED: 'suspended', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/discovery/Localization/schemas/index.md b/apis/pr-release-1-3-0/discovery/Localization/schemas/index.md new file mode 100644 index 00000000..dde2bc0b --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Localization/schemas/index.md @@ -0,0 +1,79 @@ +--- +title: Localization + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Localization + +--- + +Version Localization 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [ISO639_2Language](#isolanguage) + - [Locality](#locality) + - [CountryCode](#countrycode) + - [Language](#language) + - [Locale](#locale) + - [TimeZone](#timezone) + +## Overview + +undefined + +## Types + +### ISO639_2Language + +```typescript + +``` + +--- + +### Locality + +```typescript + +``` + +--- + +### CountryCode + +```typescript + +``` + +--- + +### Language + +```typescript + +``` + +--- + +### Locale + +```typescript + +``` + +--- + +### TimeZone + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/discovery/SecondScreen/schemas/index.md b/apis/pr-release-1-3-0/discovery/SecondScreen/schemas/index.md new file mode 100644 index 00000000..5255405c --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/SecondScreen/schemas/index.md @@ -0,0 +1,40 @@ +--- +title: SecondScreen + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# SecondScreen + +--- + +Version SecondScreen 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [SecondScreenEvent](#secondscreenevent) + +## Overview + +undefined + +## Types + +### SecondScreenEvent + +An a message notification from a second screen device + +```typescript +type SecondScreenEvent = { + type: 'dial' + version?: string + data?: string +} +``` + +--- diff --git a/apis/pr-release-1-3-0/discovery/Types/schemas/index.md b/apis/pr-release-1-3-0/discovery/Types/schemas/index.md new file mode 100644 index 00000000..d8962c36 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/Types/schemas/index.md @@ -0,0 +1,96 @@ +--- +title: Types + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +# Types + +--- + +Version Types 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [AudioProfile](#audioprofile) + - [SemanticVersion](#semanticversion) + - [BooleanMap](#booleanmap) + - [LocalizedString](#localizedstring) + - [FlatMap](#flatmap) + - [Timeout](#timeout) + +## Overview + +undefined + +## Types + +### AudioProfile + +```typescript +AudioProfile: { + STEREO: 'stereo', + DOLBY_DIGITAL_5_1: 'dolbyDigital5.1', + DOLBY_DIGITAL_7_1: 'dolbyDigital7.1', + DOLBY_DIGITAL_5_1_PLUS: 'dolbyDigital5.1+', + DOLBY_DIGITAL_7_1_PLUS: 'dolbyDigital7.1+', + DOLBY_ATMOS: 'dolbyAtmos', +}, + +``` + +--- + +### SemanticVersion + +```typescript +type SemanticVersion = { + major: number + minor: number + patch: number + readable: string +} +``` + +--- + +### BooleanMap + +```typescript +type BooleanMap = {} +``` + +--- + +### LocalizedString + +Localized string supports either a simple `string` or a Map of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed. + +```typescript +type LocalizedString = string | object +``` + +--- + +### FlatMap + +```typescript + +``` + +--- + +### Timeout + +Defines the timeout in seconds. If the threshold for timeout is passed for any operation without a result it will throw an error. + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/discovery/changelog.md b/apis/pr-release-1-3-0/discovery/changelog.md new file mode 100644 index 00000000..dee14d1a --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/changelog.md @@ -0,0 +1,13 @@ +--- +title: Change Log + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- +# 1.2.0 (https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + +### Features + +* Introduced Discovery SDK for first-party aggregated experiences to connect with third-party apps. +* [User Interest](https://github.com/rdkcentral/firebolt-apis/blob/main/requirements/specifications/discovery/user-interest.md) (#170 (https://github.com/rdkcentral/firebolt-apis/issues/170)) (48a1094 (https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) diff --git a/apis/pr-release-1-3-0/discovery/index.md b/apis/pr-release-1-3-0/discovery/index.md new file mode 100644 index 00000000..08d183b9 --- /dev/null +++ b/apis/pr-release-1-3-0/discovery/index.md @@ -0,0 +1,30 @@ +--- +title: Firebolt Discovery SDK + +version: pr-release-1-3-0 +layout: default +sdk: discovery +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt Discovery SDK +For building Firebolt compliant apps for discovering first-party content on Firebolt devices. + +## Usage +To install, run: + +``` +npm install @firebolt-js/discovery-sdk +``` + +To use the package, import one of it's modules, e.g.: + +```js +import { Content } from '@firebolt-js/discovery-sdk' +``` + +## Contributing +The Firebolt SDKs are built using the Firebolt OpenRPC toolset: + +See [Firebolt OpenRPC](https://www.github.com/rdkcentral/firebolt-openrpc/), for more info. diff --git a/apis/pr-release-1-3-0/index.md b/apis/pr-release-1-3-0/index.md new file mode 100644 index 00000000..1bfaf77c --- /dev/null +++ b/apis/pr-release-1-3-0/index.md @@ -0,0 +1,578 @@ +--- +title: Firebolt APIs + +layout: default +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt APIs +Firebolt APIs are defined by [OpenRPC schemas](https://spec.open-rpc.org). + +The schemas are used to generate SDK and Documentation artifacts. + +### `xrn:firebolt:capability:accessibility:audiodescriptions` + +| Uses | +| ---- | +| [Accessibility.audioDescriptionSettings](./core/Accessibility/#audiodescriptionsettings)
[Accessibility.onAudioDescriptionSettingsChanged](./core/Accessibility/#audiodescriptionsettingschanged)
[AudioDescriptions.enabled](./manage/AudioDescriptions/#enabled)
[AudioDescriptions.onEnabledChanged](./manage/AudioDescriptions/#enabledchanged) | + + + +| Manages | +| ------- | +| [AudioDescriptions.setEnabled](./manage/AudioDescriptions/#setenabled) | + + +### `xrn:firebolt:capability:accessibility:closedcaptions` + +| Uses | +| ---- | +| [Accessibility.closedCaptions](./core/Accessibility/#closedcaptions)
[Accessibility.closedCaptionsSettings](./core/Accessibility/#closedcaptionssettings)
[Accessibility.onClosedCaptionsSettingsChanged](./core/Accessibility/#closedcaptionssettingschanged)
[ClosedCaptions.enabled](./manage/ClosedCaptions/#enabled)
[ClosedCaptions.fontFamily](./manage/ClosedCaptions/#fontfamily)
[ClosedCaptions.fontSize](./manage/ClosedCaptions/#fontsize)
[ClosedCaptions.fontColor](./manage/ClosedCaptions/#fontcolor)
[ClosedCaptions.fontEdge](./manage/ClosedCaptions/#fontedge)
[ClosedCaptions.fontEdgeColor](./manage/ClosedCaptions/#fontedgecolor)
[ClosedCaptions.fontOpacity](./manage/ClosedCaptions/#fontopacity)
[ClosedCaptions.backgroundColor](./manage/ClosedCaptions/#backgroundcolor)
[ClosedCaptions.backgroundOpacity](./manage/ClosedCaptions/#backgroundopacity)
[ClosedCaptions.textAlign](./manage/ClosedCaptions/#textalign)
[ClosedCaptions.textAlignVertical](./manage/ClosedCaptions/#textalignvertical)
[ClosedCaptions.windowColor](./manage/ClosedCaptions/#windowcolor)
[ClosedCaptions.windowOpacity](./manage/ClosedCaptions/#windowopacity)
[ClosedCaptions.preferredLanguages](./manage/ClosedCaptions/#preferredlanguages)
[ClosedCaptions.onEnabledChanged](./manage/ClosedCaptions/#enabledchanged)
[ClosedCaptions.onFontFamilyChanged](./manage/ClosedCaptions/#fontfamilychanged)
[ClosedCaptions.onFontSizeChanged](./manage/ClosedCaptions/#fontsizechanged)
[ClosedCaptions.onFontColorChanged](./manage/ClosedCaptions/#fontcolorchanged)
[ClosedCaptions.onFontEdgeChanged](./manage/ClosedCaptions/#fontedgechanged)
[ClosedCaptions.onFontEdgeColorChanged](./manage/ClosedCaptions/#fontedgecolorchanged)
[ClosedCaptions.onFontOpacityChanged](./manage/ClosedCaptions/#fontopacitychanged)
[ClosedCaptions.onBackgroundColorChanged](./manage/ClosedCaptions/#backgroundcolorchanged)
[ClosedCaptions.onBackgroundOpacityChanged](./manage/ClosedCaptions/#backgroundopacitychanged)
[ClosedCaptions.onTextAlignChanged](./manage/ClosedCaptions/#textalignchanged)
[ClosedCaptions.onTextAlignVerticalChanged](./manage/ClosedCaptions/#textalignverticalchanged)
[ClosedCaptions.onWindowColorChanged](./manage/ClosedCaptions/#windowcolorchanged)
[ClosedCaptions.onWindowOpacityChanged](./manage/ClosedCaptions/#windowopacitychanged)
[ClosedCaptions.onPreferredLanguagesChanged](./manage/ClosedCaptions/#preferredlanguageschanged) | + + + +| Manages | +| ------- | +| [ClosedCaptions.setEnabled](./manage/ClosedCaptions/#setenabled)
[ClosedCaptions.setFontFamily](./manage/ClosedCaptions/#setfontfamily)
[ClosedCaptions.setFontSize](./manage/ClosedCaptions/#setfontsize)
[ClosedCaptions.setFontColor](./manage/ClosedCaptions/#setfontcolor)
[ClosedCaptions.setFontEdge](./manage/ClosedCaptions/#setfontedge)
[ClosedCaptions.setFontEdgeColor](./manage/ClosedCaptions/#setfontedgecolor)
[ClosedCaptions.setFontOpacity](./manage/ClosedCaptions/#setfontopacity)
[ClosedCaptions.setBackgroundColor](./manage/ClosedCaptions/#setbackgroundcolor)
[ClosedCaptions.setBackgroundOpacity](./manage/ClosedCaptions/#setbackgroundopacity)
[ClosedCaptions.setTextAlign](./manage/ClosedCaptions/#settextalign)
[ClosedCaptions.setTextAlignVertical](./manage/ClosedCaptions/#settextalignvertical)
[ClosedCaptions.setWindowColor](./manage/ClosedCaptions/#setwindowcolor)
[ClosedCaptions.setWindowOpacity](./manage/ClosedCaptions/#setwindowopacity)
[ClosedCaptions.setPreferredLanguages](./manage/ClosedCaptions/#setpreferredlanguages) | + + +### `xrn:firebolt:capability:accessibility:voiceguidance` + +| Uses | +| ---- | +| [Accessibility.voiceGuidance](./core/Accessibility/#voiceguidance)
[Accessibility.voiceGuidanceSettings](./core/Accessibility/#voiceguidancesettings)
[Accessibility.onVoiceGuidanceSettingsChanged](./core/Accessibility/#voiceguidancesettingschanged)
[VoiceGuidance.enabled](./manage/VoiceGuidance/#enabled)
[VoiceGuidance.speed](./manage/VoiceGuidance/#speed)
[VoiceGuidance.onEnabledChanged](./manage/VoiceGuidance/#enabledchanged)
[VoiceGuidance.onSpeedChanged](./manage/VoiceGuidance/#speedchanged) | + + + +| Manages | +| ------- | +| [VoiceGuidance.setEnabled](./manage/VoiceGuidance/#setenabled)
[VoiceGuidance.setSpeed](./manage/VoiceGuidance/#setspeed) | + + +### `xrn:firebolt:capability:account:id` + +| Uses | +| ---- | +| [Account.id](./core/Account/#id) | + + + +| Manages | +| ------- | +| [Device.provision](./manage/Device/#provision) | + + +### `xrn:firebolt:capability:account:uid` + +| Uses | +| ---- | +| [Account.uid](./core/Account/#uid) | + + +### `xrn:firebolt:capability:advertising:configuration` + +| Uses | +| ---- | +| [Advertising.config](./core/Advertising/#config)
[Advertising.policy](./core/Advertising/#policy)
[Advertising.deviceAttributes](./core/Advertising/#deviceattributes)
[Advertising.appBundleId](./core/Advertising/#appbundleid)
[Advertising.onPolicyChanged](./core/Advertising/#policychanged) | + + + +| Manages | +| ------- | +| [Advertising.skipRestriction](./manage/Advertising/#skiprestriction)
[Advertising.onSkipRestrictionChanged](./manage/Advertising/#skiprestrictionchanged)
[Advertising.setSkipRestriction](./manage/Advertising/#setskiprestriction) | + + +### `xrn:firebolt:capability:advertising:identifier` + +| Uses | +| ---- | +| [Advertising.advertisingId](./core/Advertising/#advertisingid) | + + + +| Manages | +| ------- | +| [Advertising.resetIdentifier](./manage/Advertising/#resetidentifier) | + + +### `xrn:firebolt:capability:approve:content` + +| Uses | +| ---- | +| [Profile.approveContentRating](./core/Profile/#approvecontentrating) | + + +### `xrn:firebolt:capability:approve:purchase` + +| Uses | +| ---- | +| [Profile.approvePurchase](./core/Profile/#approvepurchase) | + + +### `xrn:firebolt:capability:capabilities:info` + +| Uses | +| ---- | +| [Capabilities.supported](./core/Capabilities/#supported)
[Capabilities.available](./core/Capabilities/#available)
[Capabilities.permitted](./core/Capabilities/#permitted)
[Capabilities.granted](./core/Capabilities/#granted)
[Capabilities.info](./core/Capabilities/#info)
[Capabilities.onAvailable](./core/Capabilities/#available)
[Capabilities.onUnavailable](./core/Capabilities/#unavailable)
[Capabilities.onGranted](./core/Capabilities/#granted)
[Capabilities.onRevoked](./core/Capabilities/#revoked) | + + +### `xrn:firebolt:capability:capabilities:request` + +| Uses | +| ---- | +| [Capabilities.request](./core/Capabilities/#request) | + + +### `xrn:firebolt:capability:device:distributor` + +| Uses | +| ---- | +| [Device.distributor](./core/Device/#distributor) | + + + +| Manages | +| ------- | +| [Device.provision](./manage/Device/#provision) | + + +### `xrn:firebolt:capability:device:id` + +| Uses | +| ---- | +| [Device.id](./core/Device/#id) | + + + +| Manages | +| ------- | +| [Device.provision](./manage/Device/#provision) | + + +### `xrn:firebolt:capability:device:info` + +| Uses | +| ---- | +| [Device.platform](./core/Device/#platform)
[Device.type](./core/Device/#type)
[Device.version](./core/Device/#version)
[Device.hdcp](./core/Device/#hdcp)
[Device.hdr](./core/Device/#hdr)
[Device.audio](./core/Device/#audio)
[Device.screenResolution](./core/Device/#screenresolution)
[Device.videoResolution](./core/Device/#videoresolution)
[Device.onHdcpChanged](./core/Device/#hdcpchanged)
[Device.onHdrChanged](./core/Device/#hdrchanged)
[Device.onAudioChanged](./core/Device/#audiochanged)
[Device.onScreenResolutionChanged](./core/Device/#screenresolutionchanged)
[Device.onVideoResolutionChanged](./core/Device/#videoresolutionchanged)
[SecondScreen.protocols](./core/SecondScreen/#protocols) | + + +### `xrn:firebolt:capability:device:make` + +| Uses | +| ---- | +| [Device.make](./core/Device/#make) | + + +### `xrn:firebolt:capability:device:model` + +| Uses | +| ---- | +| [Device.model](./core/Device/#model) | + + +### `xrn:firebolt:capability:device:name` + +| Uses | +| ---- | +| [Device.name](./core/Device/#name)
[Device.onDeviceNameChanged](./core/Device/#devicenamechanged)
[Device.onNameChanged](./core/Device/#namechanged) | + + + +| Manages | +| ------- | +| [Device.setName](./manage/Device/#setname) | + + +### `xrn:firebolt:capability:device:sku` + +| Uses | +| ---- | +| [Device.sku](./core/Device/#sku) | + + +### `xrn:firebolt:capability:device:uid` + +| Uses | +| ---- | +| [Device.uid](./core/Device/#uid) | + + +### `xrn:firebolt:capability:discovery:content-access` + +| Uses | +| ---- | +| [Discovery.entitlements](./core/Discovery/#entitlements)
[Discovery.contentAccess](./core/Discovery/#contentaccess)
[Discovery.clearContentAccess](./core/Discovery/#clearcontentaccess) | + + +### `xrn:firebolt:capability:discovery:entity-info` + +| Provides | +| -------- | +| [Discovery.entityInfo](./core/Discovery/#entityinfo)
[Discovery.onPullEntityInfo](./core/Discovery/#pullentityinfo) | + + +### `xrn:firebolt:capability:discovery:interest` + +| Uses | +| ---- | +| [Content.requestUserInterest](./manage/Content/#requestuserinterest)
[Content.onUserInterest](./manage/Content/#userinterest) | + + + +| Provides | +| -------- | +| [Discovery.userInterest](./core/Discovery/#userinterest)
[Discovery.onRequestUserInterest](./core/Discovery/#requestuserinterest)
[Discovery.userInterestResponse](./core/Discovery/#userinterestresponse)
[Discovery.userInterestError](./core/Discovery/#userinteresterror) | + + +### `xrn:firebolt:capability:discovery:navigate-to` + +| Uses | +| ---- | +| [Discovery.onNavigateTo](./core/Discovery/#navigateto) | + + +### `xrn:firebolt:capability:discovery:policy` + +| Uses | +| ---- | +| [Discovery.policy](./core/Discovery/#policy)
[Discovery.onPolicyChanged](./core/Discovery/#policychanged) | + + +### `xrn:firebolt:capability:discovery:purchased-content` + +| Provides | +| -------- | +| [Discovery.purchasedContent](./core/Discovery/#purchasedcontent)
[Discovery.onPullPurchasedContent](./core/Discovery/#pullpurchasedcontent) | + + +### `xrn:firebolt:capability:discovery:sign-in-status` + +| Uses | +| ---- | +| [Discovery.signIn](./core/Discovery/#signin)
[Discovery.signOut](./core/Discovery/#signout) | + + + +| Manages | +| ------- | +| [Discovery.onSignIn](./manage/Discovery/#signin)
[Discovery.onSignOut](./manage/Discovery/#signout) | + + +### `xrn:firebolt:capability:discovery:watch-next` + +| Uses | +| ---- | +| [Discovery.watchNext](./core/Discovery/#watchnext) | + + +### `xrn:firebolt:capability:discovery:watched` + +| Uses | +| ---- | +| [Discovery.watched](./core/Discovery/#watched) | + + +### `xrn:firebolt:capability:grants:state` + +| Uses | +| ---- | +| [UserGrants.app](./manage/UserGrants/#app)
[UserGrants.device](./manage/UserGrants/#device)
[UserGrants.capability](./manage/UserGrants/#capability) | + + + +| Manages | +| ------- | +| [UserGrants.grant](./manage/UserGrants/#grant)
[UserGrants.deny](./manage/UserGrants/#deny)
[UserGrants.clear](./manage/UserGrants/#clear)
[UserGrants.request](./manage/UserGrants/#request) | + + +### `xrn:firebolt:capability:input:keyboard` + +| Uses | +| ---- | +| [Keyboard.email](./core/Keyboard/#email)
[Keyboard.password](./core/Keyboard/#password)
[Keyboard.standard](./core/Keyboard/#standard) | + + + +| Provides | +| -------- | +| [Keyboard.onRequestStandard](./manage/Keyboard/#requeststandard)
[Keyboard.onRequestPassword](./manage/Keyboard/#requestpassword)
[Keyboard.onRequestEmail](./manage/Keyboard/#requestemail)
[Keyboard.standardFocus](./manage/Keyboard/#standardfocus)
[Keyboard.passwordFocus](./manage/Keyboard/#passwordfocus)
[Keyboard.emailFocus](./manage/Keyboard/#emailfocus)
[Keyboard.standardResponse](./manage/Keyboard/#standardresponse)
[Keyboard.standardError](./manage/Keyboard/#standarderror)
[Keyboard.passwordResponse](./manage/Keyboard/#passwordresponse)
[Keyboard.passwordError](./manage/Keyboard/#passworderror)
[Keyboard.emailResponse](./manage/Keyboard/#emailresponse)
[Keyboard.emailError](./manage/Keyboard/#emailerror) | + + +### `xrn:firebolt:capability:inputs:hdmi` + +| Uses | +| ---- | +| [HDMIInput.ports](./manage/HDMIInput/#ports)
[HDMIInput.port](./manage/HDMIInput/#port)
[HDMIInput.onConnectionChanged](./manage/HDMIInput/#connectionchanged)
[HDMIInput.onSignalChanged](./manage/HDMIInput/#signalchanged)
[HDMIInput.lowLatencyMode](./manage/HDMIInput/#lowlatencymode)
[HDMIInput.onAutoLowLatencyModeSignalChanged](./manage/HDMIInput/#autolowlatencymodesignalchanged)
[HDMIInput.autoLowLatencyModeCapable](./manage/HDMIInput/#autolowlatencymodecapable)
[HDMIInput.edidVersion](./manage/HDMIInput/#edidversion)
[HDMIInput.onLowLatencyModeChanged](./manage/HDMIInput/#lowlatencymodechanged)
[HDMIInput.onAutoLowLatencyModeCapableChanged](./manage/HDMIInput/#autolowlatencymodecapablechanged)
[HDMIInput.onEdidVersionChanged](./manage/HDMIInput/#edidversionchanged) | + + + +| Manages | +| ------- | +| [HDMIInput.open](./manage/HDMIInput/#open)
[HDMIInput.close](./manage/HDMIInput/#close)
[HDMIInput.setLowLatencyMode](./manage/HDMIInput/#setlowlatencymode)
[HDMIInput.setAutoLowLatencyModeCapable](./manage/HDMIInput/#setautolowlatencymodecapable)
[HDMIInput.setEdidVersion](./manage/HDMIInput/#setedidversion) | + + +### `xrn:firebolt:capability:lifecycle:initialize` + +| Uses | +| ---- | +| [Internal.initialize](./core/Internal/#initialize) | + + +### `xrn:firebolt:capability:lifecycle:launch` + +| Uses | +| ---- | +| [Discovery.launch](./core/Discovery/#launch) | + + +### `xrn:firebolt:capability:lifecycle:ready` + +| Uses | +| ---- | +| [Lifecycle.ready](./core/Lifecycle/#ready) | + + +### `xrn:firebolt:capability:lifecycle:state` + +| Uses | +| ---- | +| [Lifecycle.close](./core/Lifecycle/#close)
[Lifecycle.finished](./core/Lifecycle/#finished)
[Lifecycle.state](./core/Lifecycle/#state)
[Lifecycle.onInactive](./core/Lifecycle/#inactive)
[Lifecycle.onForeground](./core/Lifecycle/#foreground)
[Lifecycle.onBackground](./core/Lifecycle/#background)
[Lifecycle.onSuspended](./core/Lifecycle/#suspended)
[Lifecycle.onUnloading](./core/Lifecycle/#unloading)
[Parameters.initialization](./core/Parameters/#initialization) | + + +### `xrn:firebolt:capability:localization:additional-info` + +| Uses | +| ---- | +| [Localization.additionalInfo](./core/Localization/#additionalinfo) | + + + +| Manages | +| ------- | +| [Localization.addAdditionalInfo](./manage/Localization/#addadditionalinfo)
[Localization.removeAdditionalInfo](./manage/Localization/#removeadditionalinfo) | + + +### `xrn:firebolt:capability:localization:country-code` + +| Uses | +| ---- | +| [Localization.countryCode](./core/Localization/#countrycode)
[Localization.onCountryCodeChanged](./core/Localization/#countrycodechanged) | + + + +| Manages | +| ------- | +| [Localization.setCountryCode](./manage/Localization/#setcountrycode) | + + +### `xrn:firebolt:capability:localization:language` + +| Uses | +| ---- | +| [Localization.language](./core/Localization/#language)
[Localization.preferredAudioLanguages](./core/Localization/#preferredaudiolanguages)
[Localization.onLanguageChanged](./core/Localization/#languagechanged)
[Localization.onPreferredAudioLanguagesChanged](./core/Localization/#preferredaudiolanguageschanged) | + + + +| Manages | +| ------- | +| [Localization.setLanguage](./manage/Localization/#setlanguage)
[Localization.setPreferredAudioLanguages](./manage/Localization/#setpreferredaudiolanguages) | + + +### `xrn:firebolt:capability:localization:locale` + +| Uses | +| ---- | +| [Localization.locale](./core/Localization/#locale)
[Localization.onLocaleChanged](./core/Localization/#localechanged) | + + + +| Manages | +| ------- | +| [Localization.setLocale](./manage/Localization/#setlocale) | + + +### `xrn:firebolt:capability:localization:locality` + +| Uses | +| ---- | +| [Localization.locality](./core/Localization/#locality)
[Localization.onLocalityChanged](./core/Localization/#localitychanged) | + + + +| Manages | +| ------- | +| [Localization.setLocality](./manage/Localization/#setlocality) | + + +### `xrn:firebolt:capability:localization:location` + +| Uses | +| ---- | +| [Localization.latlon](./core/Localization/#latlon) | + + +### `xrn:firebolt:capability:localization:postal-code` + +| Uses | +| ---- | +| [Localization.postalCode](./core/Localization/#postalcode)
[Localization.onPostalCodeChanged](./core/Localization/#postalcodechanged) | + + + +| Manages | +| ------- | +| [Localization.setPostalCode](./manage/Localization/#setpostalcode) | + + +### `xrn:firebolt:capability:localization:time-zone` + +| Uses | +| ---- | +| [Localization.timeZone](./manage/Localization/#timezone)
[Localization.onTimeZoneChanged](./manage/Localization/#timezonechanged) | + + + +| Manages | +| ------- | +| [Localization.setTimeZone](./manage/Localization/#settimezone) | + + +### `xrn:firebolt:capability:metrics:distributor` + +| Uses | +| ---- | +| [Metrics.event](./manage/Metrics/#event) | + + +### `xrn:firebolt:capability:metrics:general` + +| Uses | +| ---- | +| [Metrics.ready](./core/Metrics/#ready)
[Metrics.signIn](./core/Metrics/#signin)
[Metrics.signOut](./core/Metrics/#signout)
[Metrics.startContent](./core/Metrics/#startcontent)
[Metrics.stopContent](./core/Metrics/#stopcontent)
[Metrics.page](./core/Metrics/#page)
[Metrics.action](./core/Metrics/#action)
[Metrics.error](./core/Metrics/#error)
[Metrics.appInfo](./core/Metrics/#appinfo) | + + +### `xrn:firebolt:capability:metrics:media` + +| Uses | +| ---- | +| [Metrics.mediaLoadStart](./core/Metrics/#medialoadstart)
[Metrics.mediaPlay](./core/Metrics/#mediaplay)
[Metrics.mediaPlaying](./core/Metrics/#mediaplaying)
[Metrics.mediaPause](./core/Metrics/#mediapause)
[Metrics.mediaWaiting](./core/Metrics/#mediawaiting)
[Metrics.mediaProgress](./core/Metrics/#mediaprogress)
[Metrics.mediaSeeking](./core/Metrics/#mediaseeking)
[Metrics.mediaSeeked](./core/Metrics/#mediaseeked)
[Metrics.mediaRateChange](./core/Metrics/#mediaratechange)
[Metrics.mediaRenditionChange](./core/Metrics/#mediarenditionchange)
[Metrics.mediaEnded](./core/Metrics/#mediaended) | + + +### `xrn:firebolt:capability:network:status` + +| Uses | +| ---- | +| [Device.network](./core/Device/#network)
[Device.onNetworkChanged](./core/Device/#networkchanged) | + + +### `xrn:firebolt:capability:privacy:advertising` + +| Uses | +| ---- | +| [Advertising.policy](./core/Advertising/#policy)
[Advertising.onPolicyChanged](./core/Advertising/#policychanged) | + + +### `xrn:firebolt:capability:privacy:settings` + +| Uses | +| ---- | +| [Privacy.allowResumePoints](./manage/Privacy/#allowresumepoints)
[Privacy.allowUnentitledResumePoints](./manage/Privacy/#allowunentitledresumepoints)
[Privacy.allowWatchHistory](./manage/Privacy/#allowwatchhistory)
[Privacy.allowProductAnalytics](./manage/Privacy/#allowproductanalytics)
[Privacy.allowPersonalization](./manage/Privacy/#allowpersonalization)
[Privacy.allowUnentitledPersonalization](./manage/Privacy/#allowunentitledpersonalization)
[Privacy.allowRemoteDiagnostics](./manage/Privacy/#allowremotediagnostics)
[Privacy.allowPrimaryContentAdTargeting](./manage/Privacy/#allowprimarycontentadtargeting)
[Privacy.allowPrimaryBrowseAdTargeting](./manage/Privacy/#allowprimarybrowseadtargeting)
[Privacy.allowAppContentAdTargeting](./manage/Privacy/#allowappcontentadtargeting)
[Privacy.allowACRCollection](./manage/Privacy/#allowacrcollection)
[Privacy.allowCameraAnalytics](./manage/Privacy/#allowcameraanalytics)
[Privacy.settings](./manage/Privacy/#settings)
[Privacy.onAllowResumePointsChanged](./manage/Privacy/#allowresumepointschanged)
[Privacy.onAllowUnentitledResumePointsChanged](./manage/Privacy/#allowunentitledresumepointschanged)
[Privacy.onAllowWatchHistoryChanged](./manage/Privacy/#allowwatchhistorychanged)
[Privacy.onAllowProductAnalyticsChanged](./manage/Privacy/#allowproductanalyticschanged)
[Privacy.onAllowPersonalizationChanged](./manage/Privacy/#allowpersonalizationchanged)
[Privacy.onAllowUnentitledPersonalizationChanged](./manage/Privacy/#allowunentitledpersonalizationchanged)
[Privacy.onAllowRemoteDiagnosticsChanged](./manage/Privacy/#allowremotediagnosticschanged)
[Privacy.onAllowPrimaryContentAdTargetingChanged](./manage/Privacy/#allowprimarycontentadtargetingchanged)
[Privacy.onAllowPrimaryBrowseAdTargetingChanged](./manage/Privacy/#allowprimarybrowseadtargetingchanged)
[Privacy.onAllowAppContentAdTargetingChanged](./manage/Privacy/#allowappcontentadtargetingchanged)
[Privacy.onAllowACRCollectionChanged](./manage/Privacy/#allowacrcollectionchanged)
[Privacy.onAllowCameraAnalyticsChanged](./manage/Privacy/#allowcameraanalyticschanged) | + + + +| Manages | +| ------- | +| [Privacy.setAllowResumePoints](./manage/Privacy/#setallowresumepoints)
[Privacy.setAllowUnentitledResumePoints](./manage/Privacy/#setallowunentitledresumepoints)
[Privacy.setAllowWatchHistory](./manage/Privacy/#setallowwatchhistory)
[Privacy.setAllowProductAnalytics](./manage/Privacy/#setallowproductanalytics)
[Privacy.setAllowPersonalization](./manage/Privacy/#setallowpersonalization)
[Privacy.setAllowUnentitledPersonalization](./manage/Privacy/#setallowunentitledpersonalization)
[Privacy.setAllowRemoteDiagnostics](./manage/Privacy/#setallowremotediagnostics)
[Privacy.setAllowPrimaryContentAdTargeting](./manage/Privacy/#setallowprimarycontentadtargeting)
[Privacy.setAllowPrimaryBrowseAdTargeting](./manage/Privacy/#setallowprimarybrowseadtargeting)
[Privacy.setAllowAppContentAdTargeting](./manage/Privacy/#setallowappcontentadtargeting)
[Privacy.setAllowACRCollection](./manage/Privacy/#setallowacrcollection)
[Privacy.setAllowCameraAnalytics](./manage/Privacy/#setallowcameraanalytics) | + + +### `xrn:firebolt:capability:profile:flags` + +| Uses | +| ---- | +| [Profile.flags](./core/Profile/#flags) | + + +### `xrn:firebolt:capability:protocol:dial` + +| Uses | +| ---- | +| [SecondScreen.device](./core/SecondScreen/#device)
[SecondScreen.friendlyName](./core/SecondScreen/#friendlyname)
[SecondScreen.onLaunchRequest](./core/SecondScreen/#launchrequest)
[SecondScreen.onCloseRequest](./core/SecondScreen/#closerequest)
[SecondScreen.onFriendlyNameChanged](./core/SecondScreen/#friendlynamechanged) | + + +### `xrn:firebolt:capability:protocol:wifi` + +| Uses | +| ---- | +| [Wifi.scan](./manage/Wifi/#scan)
[Wifi.connect](./manage/Wifi/#connect)
[Wifi.disconnect](./manage/Wifi/#disconnect)
[Wifi.wps](./manage/Wifi/#wps) | + + +### `xrn:firebolt:capability:rpc:discover` + +| Uses | +| ---- | +| [rpc.discover](./manage/rpc/#discover) | + + +### `xrn:firebolt:capability:storage:secure` + +| Uses | +| ---- | +| [SecureStorage.get](./core/SecureStorage/#get)
[SecureStorage.set](./core/SecureStorage/#set)
[SecureStorage.remove](./core/SecureStorage/#remove)
[SecureStorage.clear](./core/SecureStorage/#clear) | + + + +| Manages | +| ------- | +| [SecureStorage.setForApp](./manage/SecureStorage/#setforapp)
[SecureStorage.removeForApp](./manage/SecureStorage/#removeforapp)
[SecureStorage.clearForApp](./manage/SecureStorage/#clearforapp) | + + +### `xrn:firebolt:capability:token:account` + +| Manages | +| ------- | +| [Account.session](./manage/Account/#session) | + + +### `xrn:firebolt:capability:token:device` + +| Uses | +| ---- | +| [Authentication.device](./core/Authentication/#device) | + + +### `xrn:firebolt:capability:token:platform` + +| Uses | +| ---- | +| [Authentication.token](./core/Authentication/#token) | + + +### `xrn:firebolt:capability:token:root` + +| Uses | +| ---- | +| [Authentication.root](./core/Authentication/#root) | + + +### `xrn:firebolt:capability:token:session` + +| Uses | +| ---- | +| [Authentication.session](./core/Authentication/#session) | + + +### `xrn:firebolt:capability:usergrant:acknowledgechallenge` + +| Provides | +| -------- | +| [AcknowledgeChallenge.onRequestChallenge](./manage/AcknowledgeChallenge/#requestchallenge)
[AcknowledgeChallenge.challengeFocus](./manage/AcknowledgeChallenge/#challengefocus)
[AcknowledgeChallenge.challengeResponse](./manage/AcknowledgeChallenge/#challengeresponse)
[AcknowledgeChallenge.challengeError](./manage/AcknowledgeChallenge/#challengeerror) | + + +### `xrn:firebolt:capability:usergrant:pinchallenge` + +| Provides | +| -------- | +| [PinChallenge.onRequestChallenge](./manage/PinChallenge/#requestchallenge)
[PinChallenge.challengeFocus](./manage/PinChallenge/#challengefocus)
[PinChallenge.challengeResponse](./manage/PinChallenge/#challengeresponse)
[PinChallenge.challengeError](./manage/PinChallenge/#challengeerror) | + + diff --git a/apis/pr-release-1-3-0/manage/Accessibility/schemas/index.md b/apis/pr-release-1-3-0/manage/Accessibility/schemas/index.md new file mode 100644 index 00000000..9dc64b1f --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Accessibility/schemas/index.md @@ -0,0 +1,154 @@ +--- +title: Accessibility + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Accessibility + +--- + +Version Accessibility 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [FontFamily](#fontfamily) + - [VoiceSpeed](#voicespeed) + - [VoiceGuidanceSettings](#voiceguidancesettings) + - [FontSize](#fontsize) + - [Color](#color) + - [FontEdge](#fontedge) + - [Opacity](#opacity) + - [HorizontalAlignment](#horizontalalignment) + - [VerticalAlignment](#verticalalignment) + - [ClosedCaptionsStyles](#closedcaptionsstyles) + - [ClosedCaptionsSettings](#closedcaptionssettings) + +## Overview + +undefined + +## Types + +### FontFamily + +```typescript + +``` + +--- + +### VoiceSpeed + +```typescript + +``` + +--- + +### VoiceGuidanceSettings + +```typescript +type VoiceGuidanceSettings = { + enabled: boolean // Whether or not voice guidance should be enabled by default + speed: VoiceSpeed // The speed at which voice guidance speech will be read back to the user +} +``` + +See also: + +[VoiceSpeed](#voicespeed) + +--- + +### FontSize + +```typescript + +``` + +--- + +### Color + +```typescript + +``` + +--- + +### FontEdge + +```typescript + +``` + +--- + +### Opacity + +```typescript + +``` + +--- + +### HorizontalAlignment + +```typescript + +``` + +--- + +### VerticalAlignment + +```typescript + +``` + +--- + +### ClosedCaptionsStyles + +The default styles to use when displaying closed-captions + +```typescript +type ClosedCaptionsStyles = { + fontFamily?: string + fontSize?: number + fontColor?: string + fontEdge?: string + fontEdgeColor?: string + fontOpacity?: number + backgroundColor?: string + backgroundOpacity?: number + textAlign?: string + textAlignVertical?: string + windowColor?: string + windowOpacity?: number +} +``` + +--- + +### ClosedCaptionsSettings + +```typescript +type ClosedCaptionsSettings = { + enabled: boolean // Whether or not closed-captions should be enabled by default + styles: ClosedCaptionsStyles // The default styles to use when displaying closed-captions + preferredLanguages?: string[] +} +``` + +See also: + +[ClosedCaptionsStyles](#closedcaptionsstyles) + +--- diff --git a/apis/pr-release-1-3-0/manage/Account/index.md b/apis/pr-release-1-3-0/manage/Account/index.md new file mode 100644 index 00000000..99d63fb0 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Account/index.md @@ -0,0 +1,135 @@ +--- +title: Account + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Account Module + +--- + +Version Account 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [session](#session) +- [Types](#types) + - [Token](#token) + - [Expiry](#expiry) + +## Usage + +To use the Account module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Account } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for querying about the device account. + +## Methods + +### session + +Used by a distributor to push Session token to firebolt. + +```typescript +function session(token: Token, expiresIn: Expiry): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ----------- | ------------------- | -------- | --------------- | +| `token` | [`Token`](#token) | true | | +| `expiresIn` | [`Expiry`](#expiry) | true |
minumum: 1 | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------- | +| manages | xrn:firebolt:capability:token:account | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Account } from '@firebolt-js/manage-sdk' + +let result = await Account.session( + 'RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==', + 84000, +) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Account.session", + "params": { + "token": "RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==", + "expiresIn": 84000 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +## Types + +### Token + +Encoded token provided by the Distributor for Device Authentication. + +```typescript + +``` + +--- + +### Expiry + +Number of secs before the token expires + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/AcknowledgeChallenge/index.md b/apis/pr-release-1-3-0/manage/AcknowledgeChallenge/index.md new file mode 100644 index 00000000..a2117d9b --- /dev/null +++ b/apis/pr-release-1-3-0/manage/AcknowledgeChallenge/index.md @@ -0,0 +1,510 @@ +--- +title: AcknowledgeChallenge + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# AcknowledgeChallenge Module + +--- + +Version AcknowledgeChallenge 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [challengeError](#challengeerror) + - [challengeFocus](#challengefocus) + - [challengeResponse](#challengeresponse) + - [provide](#provide) +- [Events](#events) + - [onRequestChallenge](#onrequestchallenge) +- [Provider Interfaces](#provider-interfaces) + - [ChallengeProvider](#challengeprovider) +- [Types](#types) + - [GrantResult](#grantresult) + - [ChallengeRequestor](#challengerequestor) + - [Challenge](#challenge) + - [ChallengeProviderRequest](#challengeproviderrequest) + +## Usage + +To use the AcknowledgeChallenge module, you can import it into your project from the Firebolt SDK: + +```javascript +import { AcknowledgeChallenge } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for registering as a provider for a user grant in which the user confirms access to a capability + +## Methods + +### challengeError + +_This is an private RPC method._ + +Internal API for Challenge Provider to send back error. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `error` | `object` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------------------ | +| provides | xrn:firebolt:capability:usergrant:acknowledgechallenge | + +#### Examples + +Example 1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AcknowledgeChallenge.challengeError", + "params": { + "correlationId": "123", + "error": { + "code": 1, + "message": "Error" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### challengeFocus + +_This is an private RPC method._ + +Internal API for Challenge Provider to request focus for UX purposes. + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------------------ | +| provides | xrn:firebolt:capability:usergrant:acknowledgechallenge | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AcknowledgeChallenge.challengeFocus", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### challengeResponse + +_This is an private RPC method._ + +Internal API for Challenge Provider to send back response. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | ----------------------------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `result` | [`GrantResult`](#grantresult) | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------------------ | +| provides | xrn:firebolt:capability:usergrant:acknowledgechallenge | + +#### Examples + +Example #1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AcknowledgeChallenge.challengeResponse", + "params": { + "correlationId": "123", + "result": { + "granted": true + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +Example #2 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AcknowledgeChallenge.challengeResponse", + "params": { + "correlationId": "123", + "result": { + "granted": false + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +Example #3 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AcknowledgeChallenge.challengeResponse", + "params": { + "correlationId": "123", + "result": { + "granted": null + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### provide + +To provide a specific capability to the platform. See [Provider Interfaces](#provider-interfaces) for a list of interfaces available to provide in this module. + +```typescript +provide(capability: string, provider: any): void +``` + +Parameters: + +| Param | Type | Required | Summary | +| ------------ | -------- | -------- | -------------------------------------------- | +| `capability` | `string` | Yes | The capability that is being provided. | +| `provider` | `any` | Yes | An implementation of the required interface. | + +See [Provider Interfaces](#provider-interfaces) for each capabilities interface definition. + +## Events + +### onRequestChallenge + +_This is an private RPC method._ + +Registers as a provider for when the user should be challenged in order to confirm access to a capability + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------- | -------- | ----------- | +| `listen` | `boolean` | true | | + +Result: + +[ChallengeProviderRequest](#challengeproviderrequest) + +Capabilities: + +| Role | Capability | +| -------- | ------------------------------------------------------ | +| provides | xrn:firebolt:capability:usergrant:acknowledgechallenge | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AcknowledgeChallenge.onRequestChallenge", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "abc", + "parameters": { + "capability": "xrn:firebolt:capability:localization::postal-code", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + } + } + } +} +``` + +--- + +## Provider Interfaces + +### ChallengeProvider + +The provider interface for the `xrn:firebolt:capability:usergrant:acknowledgechallenge` capability. + +```typescript + +``` + +Usage: + +```typescript +AcknowledgeChallenge.provide('xrn:firebolt:capability:usergrant:acknowledgechallenge', provider: ChallengeProvider | object) +``` + +#### Examples + +**Register your app to provide the `xrn:firebolt:capability:usergrant:acknowledgechallenge` capability.** + +```javascript +import { AcknowledgeChallenge } from '@firebolt-js/manage-sdk' + +class MyChallengeProvider { + async challenge(parameters, session) { + return { + granted: true, + } + } +} + +AcknowledgeChallenge.provide( + 'xrn:firebolt:capability:usergrant:acknowledgechallenge', + new MyChallengeProvider(), +) +``` + +
+ JSON-RPC + +**Register to recieve each provider API** + +Request: + +```json +{ + "id": 1, + "method": "AcknowledgeChallenge.onRequestChallenge", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "id": 1, + "result": { + "listening": true, + "event": "AcknowledgeChallenge.onRequestChallenge" + } +} +``` + +**Asynchronous event to initiate challenge()** + +Event Response: + +```json +{ + "id": 1, + "result": { + "correlationId": undefined, + "parameters": { + "capability": "xrn:firebolt:capability:localization::postal-code", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + } + } + } +} +``` + +**App initiated response to event** + +Request: + +```json +{ + "id": 2, + "method": "AcknowledgeChallenge.challengeResponse", + "params": { + "correlationId": undefined, + "result": { + "granted": true + } + } +} +``` + +Response: + +```json +{ + "id": 2, + "result": true +} +``` + +
+ +## Types + +### GrantResult + +```typescript +type GrantResult = { + granted: boolean +} +``` + +--- + +### ChallengeRequestor + +```typescript +type ChallengeRequestor = { + id: string // The id of the app that requested the challenge + name: string // The name of the app that requested the challenge +} +``` + +--- + +### Challenge + +```typescript +type Challenge = { + capability: string // The capability that is being requested by the user to approve + requestor: ChallengeRequestor // The identity of which app is requesting access to this capability +} +``` + +See also: + +[ChallengeRequestor](#challengerequestor) + +--- + +### ChallengeProviderRequest + +```typescript +type ChallengeProviderRequest = { + parameters: Challenge // The result of the provider response. + correlationId: string // The id that was passed in to the event that triggered a provider method to be called +} +``` + +See also: + +[ProviderRequest](../Types/schemas/#ProviderRequest) +[Challenge](#challenge-1) + +--- diff --git a/apis/pr-release-1-3-0/manage/Advertising/index.md b/apis/pr-release-1-3-0/manage/Advertising/index.md new file mode 100644 index 00000000..6dc9cc93 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Advertising/index.md @@ -0,0 +1,543 @@ +--- +title: Advertising + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Advertising Module + +--- + +Version Advertising 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [listen](#listen) + - [once](#once) + - [resetIdentifier](#resetidentifier) + - [skipRestriction](#skiprestriction) +- [Events](#events) + - [skipRestrictionChanged](#skiprestrictionchanged) +- [Types](#types) + +## Usage + +To use the Advertising module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for platform provided advertising settings and functionality. + +## Methods + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Advertising.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### resetIdentifier + +Resets a user's identifier in the ad platform so that the advertising id that apps get will be a new value + +```typescript +function resetIdentifier(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ---------------------------------------------- | +| manages | xrn:firebolt:capability:advertising:identifier | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let result = await Advertising.resetIdentifier() +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.resetIdentifier", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### skipRestriction + +Set the value for AdPolicy.skipRestriction + +To get the value of `skipRestriction` call the method like this: + +```typescript +function skipRestriction(): Promise +``` + +Promise resolution: + +[SkipRestriction](../Advertising/schemas/#SkipRestriction) + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------------------- | +| manages | xrn:firebolt:capability:advertising:configuration | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let result = await Advertising.skipRestriction() +console.log(result) +``` + +Value of `result`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.skipRestriction", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "none" +} +``` + +
+ +Additional Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let result = await Advertising.skipRestriction() +console.log(result) +``` + +Value of `result`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.skipRestriction", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "all" +} +``` + +
+ +--- + +To set the value of `skipRestriction` call the method like this: + +```typescript +function skipRestriction(value: SkipRestriction): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | +| `value` | [`SkipRestriction`](../Advertising/schemas/#SkipRestriction) | true |
values: `'none' \| 'adsUnwatched' \| 'adsAll' \| 'all'` | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let result = await Advertising.skipRestriction('none') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.setSkipRestriction", + "params": { + "value": "none" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Additional Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let result = await Advertising.skipRestriction('all') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.setSkipRestriction", + "params": { + "value": "all" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function skipRestriction(callback: (value) => SkipRestriction): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let listenerId = await skipRestriction((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `result`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.onSkipRestrictionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "none" +} +``` + +
+ +Additional Example + +JavaScript: + +```javascript +import { Advertising } from '@firebolt-js/manage-sdk' + +let listenerId = await skipRestriction((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `result`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Advertising.onSkipRestrictionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "all" +} +``` + +
+ +--- + +## Events + +### skipRestrictionChanged + +See: [skipRestriction](#skiprestriction) + +## Types diff --git a/apis/pr-release-1-3-0/manage/Advertising/schemas/index.md b/apis/pr-release-1-3-0/manage/Advertising/schemas/index.md new file mode 100644 index 00000000..8aad7c91 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Advertising/schemas/index.md @@ -0,0 +1,53 @@ +--- +title: Advertising + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Advertising + +--- + +Version Advertising 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [SkipRestriction](#skiprestriction) + +## Overview + +undefined + +## Types + +### SkipRestriction + +The advertisement skip restriction. + +Applies to fast-forward/rewind (e.g. trick mode), seeking over an entire opportunity (e.g. jump), seeking out of what's currently playing, and "Skip this ad..." features. Seeking over multiple ad opportunities only requires playback of the _last_ opportunity, not all opportunities, preceding the seek destination. + +| Value | Description | +| ------------ | ------------------------------------------------------------------------------ | +| none | No fast-forward, jump, or skip restrictions | +| adsUnwatched | Restrict fast-forward, jump, and skip for unwatched ad opportunities only. | +| adsAll | Restrict fast-forward, jump, and skip for all ad opportunities | +| all | Restrict fast-forward, jump, and skip for all ad opportunities and all content | + +Namespace: `xrn:advertising:policy:skipRestriction:` + +```typescript +SkipRestriction: { + NONE: 'none', + ADS_UNWATCHED: 'adsUnwatched', + ADS_ALL: 'adsAll', + ALL: 'all', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/AudioDescriptions/index.md b/apis/pr-release-1-3-0/manage/AudioDescriptions/index.md new file mode 100644 index 00000000..358bda1c --- /dev/null +++ b/apis/pr-release-1-3-0/manage/AudioDescriptions/index.md @@ -0,0 +1,478 @@ +--- +title: AudioDescriptions + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# AudioDescriptions Module + +--- + +Version AudioDescriptions 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [enabled](#enabled) + - [listen](#listen) + - [once](#once) +- [Events](#events) + - [enabledChanged](#enabledchanged) +- [Types](#types) + +## Usage + +To use the AudioDescriptions module, you can import it into your project from the Firebolt SDK: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for managing audio-description Settings. + +## Methods + +### enabled + +Whether or not audio-descriptions are enabled. + +To get the value of `enabled` call the method like this: + +```typescript +function enabled(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:audiodescriptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' + +let enabled = await AudioDescriptions.enabled() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AudioDescriptions.enabled", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' + +let enabled = await AudioDescriptions.enabled() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AudioDescriptions.enabled", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `enabled` call the method like this: + +```typescript +function enabled(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' + +let result = await AudioDescriptions.enabled(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AudioDescriptions.setEnabled", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' + +let result = await AudioDescriptions.enabled(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AudioDescriptions.setEnabled", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function enabled(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' + +let listenerId = await enabled((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AudioDescriptions.onEnabledChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { AudioDescriptions } from '@firebolt-js/manage-sdk' + +let listenerId = await enabled((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "AudioDescriptions.onEnabledChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `AudioDescriptions.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `AudioDescriptions.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `AudioDescriptions.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | --------------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `AudioDescriptions.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +## Events + +### enabledChanged + +See: [enabled](#enabled) + +## Types diff --git a/apis/pr-release-1-3-0/manage/Capabilities/schemas/index.md b/apis/pr-release-1-3-0/manage/Capabilities/schemas/index.md new file mode 100644 index 00000000..383ff982 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Capabilities/schemas/index.md @@ -0,0 +1,121 @@ +--- +title: Capabilities + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Capabilities + +--- + +Version Capabilities 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [Role](#role) + - [DenyReason](#denyreason) + - [Capability](#capability) + - [CapPermissionStatus](#cappermissionstatus) + - [CapabilityInfo](#capabilityinfo) + - [Permission](#permission) + +## Overview + +undefined + +## Types + +### Role + +Role provides access level for the app for a given capability. + +```typescript +Role: { + USE: 'use', + MANAGE: 'manage', + PROVIDE: 'provide', +}, + +``` + +--- + +### DenyReason + +Reasons why a Capability might not be invokable + +```typescript +DenyReason: { + UNPERMITTED: 'unpermitted', + UNSUPPORTED: 'unsupported', + DISABLED: 'disabled', + UNAVAILABLE: 'unavailable', + GRANT_DENIED: 'grantDenied', + UNGRANTED: 'ungranted', +}, + +``` + +--- + +### Capability + +A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + +```typescript + +``` + +--- + +### CapPermissionStatus + +```typescript + +``` + +--- + +### CapabilityInfo + +```typescript +type CapabilityInfo = { + capability?: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + supported: boolean // Provides info whether the capability is supported + available: boolean // Provides info whether the capability is available + use: object + manage: object + provide: object + details?: DenyReason[] // Reasons why a Capability might not be invokable +} +``` + +See also: + +[Capability](#capability) +[DenyReason](#denyreason) + +--- + +### Permission + +A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user). + +```typescript +type Permission = { + role?: Role // Role provides access level for the app for a given capability. + capability: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. +} +``` + +See also: + +[Role](#role) +[Capability](#capability) + +--- diff --git a/apis/pr-release-1-3-0/manage/ClosedCaptions/index.md b/apis/pr-release-1-3-0/manage/ClosedCaptions/index.md new file mode 100644 index 00000000..d3278128 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/ClosedCaptions/index.md @@ -0,0 +1,6328 @@ +--- +title: ClosedCaptions + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# ClosedCaptions Module + +--- + +Version ClosedCaptions 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [backgroundColor](#backgroundcolor) + - [backgroundOpacity](#backgroundopacity) + - [enabled](#enabled) + - [fontColor](#fontcolor) + - [fontEdge](#fontedge) + - [fontEdgeColor](#fontedgecolor) + - [fontFamily](#fontfamily) + - [fontOpacity](#fontopacity) + - [fontSize](#fontsize) + - [listen](#listen) + - [once](#once) + - [preferredLanguages](#preferredlanguages) + - [textAlign](#textalign) + - [textAlignVertical](#textalignvertical) + - [windowColor](#windowcolor) + - [windowOpacity](#windowopacity) +- [Events](#events) + - [backgroundColorChanged](#backgroundcolorchanged) + - [backgroundOpacityChanged](#backgroundopacitychanged) + - [enabledChanged](#enabledchanged) + - [fontColorChanged](#fontcolorchanged) + - [fontEdgeChanged](#fontedgechanged) + - [fontEdgeColorChanged](#fontedgecolorchanged) + - [fontFamilyChanged](#fontfamilychanged) + - [fontOpacityChanged](#fontopacitychanged) + - [fontSizeChanged](#fontsizechanged) + - [preferredLanguagesChanged](#preferredlanguageschanged) + - [textAlignChanged](#textalignchanged) + - [textAlignVerticalChanged](#textalignverticalchanged) + - [windowColorChanged](#windowcolorchanged) + - [windowOpacityChanged](#windowopacitychanged) +- [Types](#types) + +## Usage + +To use the ClosedCaptions module, you can import it into your project from the Firebolt SDK: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for managing closed-captions Settings. + +## Methods + +### backgroundColor + +The preferred background color for displaying closed-captions, . + +To get the value of `backgroundColor` call the method like this: + +```typescript +function backgroundColor(): Promise +``` + +Promise resolution: + +[Color](../Accessibility/schemas/#Color) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.backgroundColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.backgroundColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.backgroundColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.backgroundColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#ffffff" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.backgroundColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.backgroundColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `backgroundColor` call the method like this: + +```typescript +function backgroundColor(value: Color): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------ | -------- | ----------- | +| `value` | [`Color`](../Accessibility/schemas/#Color) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.backgroundColor('#000000') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setBackgroundColor", + "params": { + "value": "#000000" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.backgroundColor('#ffffff') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setBackgroundColor", + "params": { + "value": "#ffffff" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.backgroundColor(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setBackgroundColor", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function backgroundColor(callback: (value) => Color): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await backgroundColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onBackgroundColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await backgroundColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onBackgroundColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#ffffff" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await backgroundColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onBackgroundColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### backgroundOpacity + +The preferred opacity for displaying closed-captions backgrounds. + +To get the value of `backgroundOpacity` call the method like this: + +```typescript +function backgroundOpacity(): Promise +``` + +Promise resolution: + +[Opacity](../Accessibility/schemas/#Opacity) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.backgroundOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.backgroundOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 99 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.backgroundOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.backgroundOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 100 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.backgroundOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.backgroundOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `backgroundOpacity` call the method like this: + +```typescript +function backgroundOpacity(value: Opacity): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---------------------------------------------- | -------- | ----------- | +| `value` | [`Opacity`](../Accessibility/schemas/#Opacity) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.backgroundOpacity(99) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setBackgroundOpacity", + "params": { + "value": 99 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.backgroundOpacity(100) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setBackgroundOpacity", + "params": { + "value": 100 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.backgroundOpacity(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setBackgroundOpacity", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function backgroundOpacity(callback: (value) => Opacity): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await backgroundOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onBackgroundOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 99 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await backgroundOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onBackgroundOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 100 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await backgroundOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onBackgroundOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### enabled + +Whether or not closed-captions are enabled. + +To get the value of `enabled` call the method like this: + +```typescript +function enabled(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let enabled = await ClosedCaptions.enabled() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.enabled", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let enabled = await ClosedCaptions.enabled() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.enabled", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `enabled` call the method like this: + +```typescript +function enabled(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.enabled(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setEnabled", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.enabled(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setEnabled", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function enabled(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await enabled((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onEnabledChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await enabled((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onEnabledChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### fontColor + +The preferred font color for displaying closed-captions. + +To get the value of `fontColor` call the method like this: + +```typescript +function fontColor(): Promise +``` + +Promise resolution: + +[Color](../Accessibility/schemas/#Color) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.fontColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#ffffff' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#ffffff" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.fontColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#ffffff' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.fontColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#ffffff' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `fontColor` call the method like this: + +```typescript +function fontColor(value: Color): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------ | -------- | ----------- | +| `value` | [`Color`](../Accessibility/schemas/#Color) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontColor('#ffffff') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontColor", + "params": { + "value": "#ffffff" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontColor('#000000') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontColor", + "params": { + "value": "#000000" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontColor(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontColor", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function fontColor(callback: (value) => Color): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#ffffff' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#ffffff" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#ffffff' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#ffffff' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### fontEdge + +The preferred font edge style for displaying closed-captions. + +To get the value of `fontEdge` call the method like this: + +```typescript +function fontEdge(): Promise +``` + +Promise resolution: + +[FontEdge](../Accessibility/schemas/#FontEdge) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let edge = await ClosedCaptions.fontEdge() +console.log(edge) +``` + +Value of `edge`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontEdge", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "none" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let edge = await ClosedCaptions.fontEdge() +console.log(edge) +``` + +Value of `edge`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontEdge", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "uniform" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let edge = await ClosedCaptions.fontEdge() +console.log(edge) +``` + +Value of `edge`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontEdge", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `fontEdge` call the method like this: + +```typescript +function fontEdge(value: FontEdge): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------------ | -------- | ----------- | +| `value` | [`FontEdge`](../Accessibility/schemas/#FontEdge) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontEdge('none') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontEdge", + "params": { + "value": "none" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontEdge('uniform') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontEdge", + "params": { + "value": "uniform" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontEdge(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontEdge", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function fontEdge(callback: (value) => FontEdge): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontEdge((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `edge`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontEdgeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "none" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontEdge((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `edge`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontEdgeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "uniform" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontEdge((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `edge`: + +```javascript +'none' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontEdgeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### fontEdgeColor + +The preferred font edge color for displaying closed-captions. + +To get the value of `fontEdgeColor` call the method like this: + +```typescript +function fontEdgeColor(): Promise +``` + +Promise resolution: + +[Color](../Accessibility/schemas/#Color) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.fontEdgeColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontEdgeColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.fontEdgeColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontEdgeColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#ffffff" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.fontEdgeColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontEdgeColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `fontEdgeColor` call the method like this: + +```typescript +function fontEdgeColor(value: Color): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------ | -------- | ----------- | +| `value` | [`Color`](../Accessibility/schemas/#Color) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontEdgeColor('#000000') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontEdgeColor", + "params": { + "value": "#000000" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontEdgeColor('#ffffff') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontEdgeColor", + "params": { + "value": "#ffffff" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontEdgeColor(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontEdgeColor", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function fontEdgeColor(callback: (value) => Color): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontEdgeColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontEdgeColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontEdgeColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontEdgeColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#ffffff" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontEdgeColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontEdgeColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### fontFamily + +The preferred font family for displaying closed-captions. + +To get the value of `fontFamily` call the method like this: + +```typescript +function fontFamily(): Promise +``` + +Promise resolution: + +[FontFamily](../Accessibility/schemas/#FontFamily) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let family = await ClosedCaptions.fontFamily() +console.log(family) +``` + +Value of `family`: + +```javascript +'monospaced_sanserif' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontFamily", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "monospaced_sanserif" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let family = await ClosedCaptions.fontFamily() +console.log(family) +``` + +Value of `family`: + +```javascript +'monospaced_sanserif' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontFamily", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "cursive" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let family = await ClosedCaptions.fontFamily() +console.log(family) +``` + +Value of `family`: + +```javascript +'monospaced_sanserif' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontFamily", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `fontFamily` call the method like this: + +```typescript +function fontFamily(value: FontFamily): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---------------------------------------------------- | -------- | ----------- | +| `value` | [`FontFamily`](../Accessibility/schemas/#FontFamily) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontFamily('monospaced_sanserif') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontFamily", + "params": { + "value": "monospaced_sanserif" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontFamily('cursive') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontFamily", + "params": { + "value": "cursive" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontFamily(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontFamily", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function fontFamily(callback: (value) => FontFamily): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontFamily((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `family`: + +```javascript +'monospaced_sanserif' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontFamilyChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "monospaced_sanserif" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontFamily((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `family`: + +```javascript +'monospaced_sanserif' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontFamilyChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "cursive" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontFamily((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `family`: + +```javascript +'monospaced_sanserif' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontFamilyChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### fontOpacity + +The preferred opacity for displaying closed-captions characters. + +To get the value of `fontOpacity` call the method like this: + +```typescript +function fontOpacity(): Promise +``` + +Promise resolution: + +[Opacity](../Accessibility/schemas/#Opacity) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.fontOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 99 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.fontOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 100 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.fontOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `fontOpacity` call the method like this: + +```typescript +function fontOpacity(value: Opacity): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---------------------------------------------- | -------- | ----------- | +| `value` | [`Opacity`](../Accessibility/schemas/#Opacity) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontOpacity(99) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontOpacity", + "params": { + "value": 99 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontOpacity(100) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontOpacity", + "params": { + "value": 100 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontOpacity(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontOpacity", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function fontOpacity(callback: (value) => Opacity): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 99 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 100 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### fontSize + +The preferred font size for displaying closed-captions. + +To get the value of `fontSize` call the method like this: + +```typescript +function fontSize(): Promise +``` + +Promise resolution: + +[FontSize](../Accessibility/schemas/#FontSize) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let size = await ClosedCaptions.fontSize() +console.log(size) +``` + +Value of `size`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontSize", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 1 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let size = await ClosedCaptions.fontSize() +console.log(size) +``` + +Value of `size`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontSize", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 1 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let size = await ClosedCaptions.fontSize() +console.log(size) +``` + +Value of `size`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.fontSize", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `fontSize` call the method like this: + +```typescript +function fontSize(value: FontSize): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------------ | -------- | ----------- | +| `value` | [`FontSize`](../Accessibility/schemas/#FontSize) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontSize(1) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontSize", + "params": { + "value": 1 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontSize(1) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontSize", + "params": { + "value": 1 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.fontSize(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setFontSize", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function fontSize(callback: (value) => FontSize): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontSize((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `size`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontSizeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 1 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontSize((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `size`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontSizeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 1 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await fontSize((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `size`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onFontSizeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------ | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `ClosedCaptions.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------ | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `ClosedCaptions.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------ | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `ClosedCaptions.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------ | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `ClosedCaptions.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### preferredLanguages + +A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device. + +To get the value of `preferredLanguages` call the method like this: + +```typescript +function preferredLanguages(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let languages = await ClosedCaptions.preferredLanguages() +console.log(languages) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.preferredLanguages", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["spa", "eng"] +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let languages = await ClosedCaptions.preferredLanguages() +console.log(languages) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.preferredLanguages", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["eng", "spa"] +} +``` + +
+ +--- + +To set the value of `preferredLanguages` call the method like this: + +```typescript +function preferredLanguages(value: ISO639_2Language[]): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------------------- | -------- | ---------------------------------------------------------------- | +| `value` | `ISO639_2Language[]` | true | the preferred closed captions languages
pattern: ^[a-z]{3}$ | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.preferredLanguages(['spa', 'eng']) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setPreferredLanguages", + "params": { + "value": ["spa", "eng"] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.preferredLanguages(['eng', 'spa']) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setPreferredLanguages", + "params": { + "value": ["eng", "spa"] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function preferredLanguages( + callback: (value) => ISO639_2Language[], +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await preferredLanguages((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onPreferredLanguagesChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["spa", "eng"] +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await preferredLanguages((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onPreferredLanguagesChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["eng", "spa"] +} +``` + +
+ +--- + +### textAlign + +The preferred horizontal alignment for displaying closed-captions characters. + +To get the value of `textAlign` call the method like this: + +```typescript +function textAlign(): Promise +``` + +Promise resolution: + +[HorizontalAlignment](../Accessibility/schemas/#HorizontalAlignment) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let alignment = await ClosedCaptions.textAlign() +console.log(alignment) +``` + +Value of `alignment`: + +```javascript +'center' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.textAlign", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "center" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let alignment = await ClosedCaptions.textAlign() +console.log(alignment) +``` + +Value of `alignment`: + +```javascript +'center' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.textAlign", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "left" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let alignment = await ClosedCaptions.textAlign() +console.log(alignment) +``` + +Value of `alignment`: + +```javascript +'center' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.textAlign", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `textAlign` call the method like this: + +```typescript +function textAlign(value: HorizontalAlignment): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---------------------------------------------------------------------- | -------- | ----------- | +| `value` | [`HorizontalAlignment`](../Accessibility/schemas/#HorizontalAlignment) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.textAlign('center') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setTextAlign", + "params": { + "value": "center" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.textAlign('left') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setTextAlign", + "params": { + "value": "left" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.textAlign(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setTextAlign", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function textAlign(callback: (value) => HorizontalAlignment): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await textAlign((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `alignment`: + +```javascript +'center' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onTextAlignChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "center" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await textAlign((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `alignment`: + +```javascript +'center' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onTextAlignChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "left" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await textAlign((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `alignment`: + +```javascript +'center' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onTextAlignChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### textAlignVertical + +The preferred horizontal alignment for displaying closed-captions characters. + +To get the value of `textAlignVertical` call the method like this: + +```typescript +function textAlignVertical(): Promise +``` + +Promise resolution: + +[VerticalAlignment](../Accessibility/schemas/#VerticalAlignment) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let alignment = await ClosedCaptions.textAlignVertical() +console.log(alignment) +``` + +Value of `alignment`: + +```javascript +'middle' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.textAlignVertical", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "middle" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let alignment = await ClosedCaptions.textAlignVertical() +console.log(alignment) +``` + +Value of `alignment`: + +```javascript +'middle' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.textAlignVertical", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "top" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let alignment = await ClosedCaptions.textAlignVertical() +console.log(alignment) +``` + +Value of `alignment`: + +```javascript +'middle' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.textAlignVertical", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `textAlignVertical` call the method like this: + +```typescript +function textAlignVertical(value: VerticalAlignment): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------------------------------ | -------- | ----------- | +| `value` | [`VerticalAlignment`](../Accessibility/schemas/#VerticalAlignment) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.textAlignVertical('middle') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setTextAlignVertical", + "params": { + "value": "middle" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.textAlignVertical('top') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setTextAlignVertical", + "params": { + "value": "top" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.textAlignVertical(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setTextAlignVertical", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function textAlignVertical( + callback: (value) => VerticalAlignment, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await textAlignVertical((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `alignment`: + +```javascript +'middle' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onTextAlignVerticalChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "middle" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await textAlignVertical((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `alignment`: + +```javascript +'middle' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onTextAlignVerticalChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "top" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await textAlignVertical((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `alignment`: + +```javascript +'middle' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onTextAlignVerticalChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### windowColor + +The preferred window color for displaying closed-captions, . + +To get the value of `windowColor` call the method like this: + +```typescript +function windowColor(): Promise +``` + +Promise resolution: + +[Color](../Accessibility/schemas/#Color) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.windowColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.windowColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.windowColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.windowColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "white" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let color = await ClosedCaptions.windowColor() +console.log(color) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.windowColor", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `windowColor` call the method like this: + +```typescript +function windowColor(value: Color): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------ | -------- | ----------- | +| `value` | [`Color`](../Accessibility/schemas/#Color) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.windowColor('#000000') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setWindowColor", + "params": { + "value": "#000000" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.windowColor('white') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setWindowColor", + "params": { + "value": "white" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.windowColor(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setWindowColor", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function windowColor(callback: (value) => Color): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await windowColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onWindowColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "#000000" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await windowColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onWindowColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "white" +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await windowColor((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `color`: + +```javascript +'#000000' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onWindowColorChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### windowOpacity + +The preferred window opacity for displaying closed-captions backgrounds. + +To get the value of `windowOpacity` call the method like this: + +```typescript +function windowOpacity(): Promise +``` + +Promise resolution: + +[Opacity](../Accessibility/schemas/#Opacity) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:closedcaptions | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.windowOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.windowOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 99 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.windowOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.windowOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 100 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let opacity = await ClosedCaptions.windowOpacity() +console.log(opacity) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.windowOpacity", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To set the value of `windowOpacity` call the method like this: + +```typescript +function windowOpacity(value: Opacity): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---------------------------------------------- | -------- | ----------- | +| `value` | [`Opacity`](../Accessibility/schemas/#Opacity) | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.windowOpacity(99) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setWindowOpacity", + "params": { + "value": 99 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.windowOpacity(100) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setWindowOpacity", + "params": { + "value": 100 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let result = await ClosedCaptions.windowOpacity(null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.setWindowOpacity", + "params": { + "value": null + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function windowOpacity(callback: (value) => Opacity): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await windowOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onWindowOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 99 +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await windowOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onWindowOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 100 +} +``` + +
+ +Default example #3 + +JavaScript: + +```javascript +import { ClosedCaptions } from '@firebolt-js/manage-sdk' + +let listenerId = await windowOpacity((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `opacity`: + +```javascript +99 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "ClosedCaptions.onWindowOpacityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +## Events + +### backgroundColorChanged + +See: [backgroundColor](#backgroundcolor) + +### backgroundOpacityChanged + +See: [backgroundOpacity](#backgroundopacity) + +### enabledChanged + +See: [enabled](#enabled) + +### fontColorChanged + +See: [fontColor](#fontcolor) + +### fontEdgeChanged + +See: [fontEdge](#fontedge) + +### fontEdgeColorChanged + +See: [fontEdgeColor](#fontedgecolor) + +### fontFamilyChanged + +See: [fontFamily](#fontfamily) + +### fontOpacityChanged + +See: [fontOpacity](#fontopacity) + +### fontSizeChanged + +See: [fontSize](#fontsize) + +### preferredLanguagesChanged + +See: [preferredLanguages](#preferredlanguages) + +### textAlignChanged + +See: [textAlign](#textalign) + +### textAlignVerticalChanged + +See: [textAlignVertical](#textalignvertical) + +### windowColorChanged + +See: [windowColor](#windowcolor) + +### windowOpacityChanged + +See: [windowOpacity](#windowopacity) + +## Types diff --git a/apis/pr-release-1-3-0/manage/Device/index.md b/apis/pr-release-1-3-0/manage/Device/index.md new file mode 100644 index 00000000..cbde74d0 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Device/index.md @@ -0,0 +1,672 @@ +--- +title: Device + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Device Module + +--- + +Version Device 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [listen](#listen) + - [name](#name) + - [once](#once) + - [provision](#provision) +- [Events](#events) + - [deviceNameChanged](#devicenamechanged) + - [nameChanged](#namechanged) +- [Types](#types) + +## Usage + +To use the Device module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for querying about the device and it's capabilities. + +## Methods + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### name + +The human readable name of the device + +To get the value of `name` call the method like this: + +```typescript +function name(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:name | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let value = await Device.name() +console.log(value) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.name", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let value = await Device.name() +console.log(value) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.name", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Kitchen" +} +``` + +
+ +--- + +To set the value of `name` call the method like this: + +```typescript +function name(value: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ------------------------ | +| `value` | `string` | true | the device friendly-name | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let result = await Device.name('Living Room') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.setName", + "params": { + "value": "Living Room" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let result = await Device.name('Kitchen') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.setName", + "params": { + "value": "Kitchen" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function name(callback: (value) => string): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let listenerId = await name((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let listenerId = await name((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Kitchen" +} +``` + +
+ +--- + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Device.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### provision + +Used by a distributor to push provision info to firebolt. + +```typescript +function provision( + accountId: string, + deviceId: string, + distributorId: string, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------------------------------------------------------------------- | +| `accountId` | `string` | true | The id of the account that is device is attached to in the back office. | +| `deviceId` | `string` | true | The id of the device in the back office. | +| `distributorId` | `string` | false | The id of the distributor in the back office. | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ----------------------------------------------------------------------------------------------------------------------- | +| manages | xrn:firebolt:capability:account:id
xrn:firebolt:capability:device:id
xrn:firebolt:capability:device:distributor | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let result = await Device.provision('12345678910', '987654321111', null) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.provision", + "params": { + "accountId": "12345678910", + "deviceId": "987654321111" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +With distributor id + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +let result = await Device.provision( + '12345678910', + '987654321111', + 'global_partner', +) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.provision", + "params": { + "accountId": "12345678910", + "deviceId": "987654321111", + "distributorId": "global_partner" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +## Events + +### deviceNameChanged + +```typescript +function listen('deviceNameChanged', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:device:name | + +#### Examples + +Getting the device name + +JavaScript: + +```javascript +import { Device } from '@firebolt-js/manage-sdk' + +Device.listen('deviceNameChanged', (value) => { + console.log(value) +}) +``` + +Value of `value`: + +```javascript +'Living Room' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Device.onDeviceNameChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Living Room" +} +``` + +
+ +--- + +### nameChanged + +See: [name](#name) + +## Types diff --git a/apis/pr-release-1-3-0/manage/Discovery/index.md b/apis/pr-release-1-3-0/manage/Discovery/index.md new file mode 100644 index 00000000..6fd18bf4 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Discovery/index.md @@ -0,0 +1,305 @@ +--- +title: Discovery + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Discovery Module + +--- + +Version Discovery 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) + - [Localization](#localization) +- [Methods](#methods) + - [listen](#listen) + - [once](#once) +- [Events](#events) + - [signIn](#signin) + - [signOut](#signout) +- [Types](#types) + +## Usage + +To use the Discovery module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Discovery } from '@firebolt-js/manage-sdk' +``` + +## Overview + +Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a "Watch Next" tile that links to your app from the platform's home screen. + +Getting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer. + +Under the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on. + +The Discovery plugin is used to _send_ information to the Platform. + +### Localization + +Apps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property. + +Apps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency. + +## Methods + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Discovery.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +## Events + +### signIn + +```typescript +function listen('signIn', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------------------ | +| manages | xrn:firebolt:capability:discovery:sign-in-status | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/manage-sdk' + +Discovery.listen('signIn', (event) => { + console.log(event) +}) +``` + +Value of `event`: + +```javascript +{ + "appId": "firecert" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onSignIn", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "appId": "firecert" + } +} +``` + +
+ +--- + +### signOut + +```typescript +function listen('signOut', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------------------ | +| manages | xrn:firebolt:capability:discovery:sign-in-status | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Discovery } from '@firebolt-js/manage-sdk' + +Discovery.listen('signOut', (event) => { + console.log(event) +}) +``` + +Value of `event`: + +```javascript +{ + "appId": "firecert" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Discovery.onSignOut", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "appId": "firecert" + } +} +``` + +
+ +--- + +## Types diff --git a/apis/pr-release-1-3-0/manage/Discovery/schemas/index.md b/apis/pr-release-1-3-0/manage/Discovery/schemas/index.md new file mode 100644 index 00000000..3c5b4e49 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Discovery/schemas/index.md @@ -0,0 +1,88 @@ +--- +title: Discovery + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Discovery + +--- + +Version Discovery 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [InterestType](#interesttype) + - [InterestReason](#interestreason) + - [EntityInfoResult](#entityinforesult) + - [PurchasedContentResult](#purchasedcontentresult) + +## Overview + +undefined + +## Types + +### InterestType + +```typescript +InterestType: { + INTEREST: 'interest', + DISINTEREST: 'disinterest', +}, + +``` + +--- + +### InterestReason + +```typescript +InterestReason: { + PLAYLIST: 'playlist', + REACTION: 'reaction', + RECORDING: 'recording', +}, + +``` + +--- + +### EntityInfoResult + +The result for an `entityInfo()` push or pull. + +```typescript +type EntityInfoResult = { + expires: string + entity: EntityInfo // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + related?: EntityInfo[] // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. +} +``` + +See also: + +[EntityInfo](../Entertainment/schemas/#EntityInfo) + +--- + +### PurchasedContentResult + +```typescript +type PurchasedContentResult = { + expires: string + totalCount: number + entries: EntityInfo[] // An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. +} +``` + +See also: + +[EntityInfo](../Entertainment/schemas/#EntityInfo) + +--- diff --git a/apis/pr-release-1-3-0/manage/Entertainment/schemas/index.md b/apis/pr-release-1-3-0/manage/Entertainment/schemas/index.md new file mode 100644 index 00000000..eedf6872 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Entertainment/schemas/index.md @@ -0,0 +1,285 @@ +--- +title: Entertainment + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Entertainment + +--- + +Version Entertainment 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [OfferingType](#offeringtype) + - [MusicType](#musictype) + - [ProgramType](#programtype) + - [ContentRating](#contentrating) +- [United States](#united-states) +- [Canada](#canada) + - [ContentIdentifiers](#contentidentifiers) + - [Entitlement](#entitlement) + - [WayToWatch](#waytowatch) + - [EntityInfo](#entityinfo) + +## Overview + +undefined + +## Types + +### OfferingType + +The offering type of the WayToWatch. + +```typescript +OfferingType: { + FREE: 'free', + SUBSCRIBE: 'subscribe', + BUY: 'buy', + RENT: 'rent', +}, + +``` + +--- + +### MusicType + +In the case of a music `entityType`, specifies the type of music entity. + +```typescript +MusicType: { + SONG: 'song', + ALBUM: 'album', +}, + +``` + +--- + +### ProgramType + +In the case of a program `entityType`, specifies the program type. + +```typescript +ProgramType: { + MOVIE: 'movie', + EPISODE: 'episode', + SEASON: 'season', + SERIES: 'series', + OTHER: 'other', + PREVIEW: 'preview', + EXTRA: 'extra', + CONCERT: 'concert', + SPORTING_EVENT: 'sportingEvent', + ADVERTISEMENT: 'advertisement', + MUSIC_VIDEO: 'musicVideo', + MINISODE: 'minisode', +}, + +``` + +--- + +### ContentRating + +A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. + +## United States + +`US-Movie` (MPAA): + +Ratings: `NR`, `G`, `PG`, `PG13`, `R`, `NC17` + +Advisories: `AT`, `BN`, `SL`, `SS`, `N`, `V` + +`US-TV` (Vchip): + +Ratings: `TVY`, `TVY7`, `TVG`, `TVPG`, `TV14`, `TVMA` + +Advisories: `FV`, `D`, `L`, `S`, `V` + +## Canada + +`CA-Movie` (OFRB): + +Ratings: `G`, `PG`, `14A`, `18A`, `R`, `E` + +`CA-TV` (AGVOT) + +Ratings: `E`, `C`, `C8`, `G`, `PG`, `14+`, `18+` + +Advisories: `C`, `C8`, `G`, `PG`, `14+`, `18+` + +`CA-Movie-Fr` (Canadian French language movies): + +Ratings: `G`, `8+`, `13+`, `16+`, `18+` + +`CA-TV-Fr` (Canadian French language TV): + +Ratings: `G`, `8+`, `13+`, `16+`, `18+` + +```typescript +type ContentRating = { + scheme: + | 'CA-Movie' + | 'CA-TV' + | 'CA-Movie-Fr' + | 'CA-TV-Fr' + | 'US-Movie' + | 'US-TV' // The rating scheme. + rating: string // The content rating. + advisories?: string[] // Optional list of subratings or content advisories. +} +``` + +--- + +### ContentIdentifiers + +The ContentIdentifiers object is how the app identifies an entity or asset to +the Firebolt platform. These ids are used to look up metadata and deep link into +the app. + +Apps do not need to provide all ids. They only need to provide the minimum +required to target a playable stream or an entity detail screen via a deep link. +If an id isn't needed to get to those pages, it doesn't need to be included. + +```typescript +type ContentIdentifiers = { + assetId?: string // Identifies a particular playable asset. For example, the HD version of a particular movie separate from the UHD version. + entityId?: string // Identifies an entity, such as a Movie, TV Series or TV Episode. + seasonId?: string // The TV Season for a TV Episode. + seriesId?: string // The TV Series for a TV Episode or TV Season. + appContentData?: string // App-specific content identifiers. +} +``` + +--- + +### Entitlement + +```typescript +type Entitlement = { + entitlementId: string + startTime?: string + endTime?: string +} +``` + +--- + +### WayToWatch + +A WayToWatch describes a way to watch a video program. It may describe a single +streamable asset or a set of streamable assets. For example, an app provider may +describe HD, SD, and UHD assets as individual WayToWatch objects or rolled into +a single WayToWatch. + +If the WayToWatch represents a single streamable asset, the provided +ContentIdentifiers must be sufficient to play back the specific asset when sent +via a playback intent or deep link. If the WayToWatch represents multiple +streamable assets, the provided ContentIdentifiers must be sufficient to +playback one of the assets represented with no user action. In this scenario, +the app SHOULD choose the best asset for the user based on their device and +settings. The ContentIdentifiers MUST also be sufficient for navigating the user +to the appropriate entity or detail screen via an entity intent. + +The app should set the `entitled` property to indicate if the user can watch, or +not watch, the asset without making a purchase. If the entitlement is known to +expire at a certain time (e.g., a rental), the app should also provide the +`entitledExpires` property. If the entitlement is not expired, the UI will use +the `entitled` property to display watchable assets to the user, adjust how +assets are presented to the user, and how intents into the app are generated. +For example, the the Aggregated Experience could render a "Watch" button for an +entitled asset versus a "Subscribe" button for an non-entitled asset. + +The app should set the `offeringType` to define how the content may be +authorized. The UI will use this to adjust how content is presented to the user. + +A single WayToWatch cannot represent streamable assets available via multiple +purchase paths. If, for example, an asset has both Buy, Rent and Subscription +availability, the three different entitlement paths MUST be represented as +multiple WayToWatch objects. + +`price` should be populated for WayToWatch objects with `buy` or `rent` +`offeringType`. If the WayToWatch represents a set of assets with various price +points, the `price` provided must be the lowest available price. + +```typescript +type WayToWatch = { + identifiers: ContentIdentifiers // The ContentIdentifiers object is how the app identifies an entity or asset to + expires?: string // Time when the WayToWatch is no longer available. + entitled?: boolean // Specify if the user is entitled to watch the entity. + entitledExpires?: string // Time when the entity is no longer entitled. + offeringType?: OfferingType // The offering type of the WayToWatch. + hasAds?: boolean // True if the streamable asset contains ads. + price?: number // For "buy" and "rent" WayToWatch, the price to buy or rent in the user's preferred currency. + videoQuality?: 'SD' | 'HD' | 'UHD'[] // List of the video qualities available via the WayToWatch. + audioProfile: AudioProfile[] // List of the audio types available via the WayToWatch. + audioLanguages?: string[] // List of audio track languages available on the WayToWatch. The first is considered the primary language. Languages are expressed as ISO 639 1/2 codes. + closedCaptions?: string[] // List of languages for which closed captions are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. + subtitles?: string[] // List of languages for which subtitles are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. + audioDescriptions?: string[] // List of languages for which audio descriptions (DVD) as available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes. +} +``` + +See also: + +[ContentIdentifiers](#contentidentifiers) +[OfferingType](#offeringtype) +[AudioProfile](../Types/schemas/#AudioProfile) + +--- + +### EntityInfo + +An EntityInfo object represents an "entity" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type. + +Additionally, EntityInfo objects must specify a properly formed +ContentIdentifiers object, `entityType`, and `title`. The app should provide +the `synopsis` property for a good user experience if the content +metadata is not available another way. + +The ContentIdentifiers must be sufficient for navigating the user to the +appropriate entity or detail screen via a `detail` intent or deep link. + +EntityInfo objects must provide at least one WayToWatch object when returned as +part of an `entityInfo` method and a streamable asset is available to the user. +It is optional for the `purchasedContent` method, but recommended because the UI +may use those data. + +```typescript +type EntityInfo = { + identifiers: ContentIdentifiers // The ContentIdentifiers object is how the app identifies an entity or asset to + title: string // Title of the entity. + entityType: 'program' | 'music' // The type of the entity, e.g. `program` or `music`. + programType?: ProgramType // In the case of a program `entityType`, specifies the program type. + musicType?: MusicType // In the case of a music `entityType`, specifies the type of music entity. + synopsis?: string // Short description of the entity. + seasonNumber?: number // For TV seasons, the season number. For TV episodes, the season that the episode belongs to. + seasonCount?: number // For TV series, seasons, and episodes, the total number of seasons. + episodeNumber?: number // For TV episodes, the episode number. + episodeCount?: number // For TV seasons and episodes, the total number of episodes in the current season. + releaseDate?: string // The date that the program or entity was released or first aired. + contentRatings?: ContentRating[] // A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. + waysToWatch?: WayToWatch[] // A WayToWatch describes a way to watch a video program. It may describe a single +} +``` + +See also: + +[ContentIdentifiers](#contentidentifiers) +[ProgramType](#programtype) +[MusicType](#musictype) +[ContentRating](#contentrating) +[WayToWatch](#waytowatch) + +--- diff --git a/apis/pr-release-1-3-0/manage/Entity/schemas/index.md b/apis/pr-release-1-3-0/manage/Entity/schemas/index.md new file mode 100644 index 00000000..25ee6bd3 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Entity/schemas/index.md @@ -0,0 +1,287 @@ +--- +title: Entity + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Entity + +--- + +Version Entity 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [MovieEntity](#movieentity) + - [Metadata](#metadata) + - [MusicEntity](#musicentity) + - [ChannelEntity](#channelentity) + - [UntypedEntity](#untypedentity) + - [PlaylistEntity](#playlistentity) + - [TVEpisodeEntity](#tvepisodeentity) + - [TVSeasonEntity](#tvseasonentity) + - [TVSeriesEntity](#tvseriesentity) + - [AdditionalEntity](#additionalentity) + - [ProgramEntity](#programentity) + - [Entity](#entity) + - [EntityDetails](#entitydetails) + - [PlayableEntity](#playableentity) + +## Overview + +undefined + +## Types + +### MovieEntity + +A Firebolt compliant representation of a Movie entity. + +```typescript +type MovieEntity = { + entityType: 'program' + programType: 'movie' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### Metadata + +```typescript +type Metadata = { + title?: string // Title of the entity. + synopsis?: string // Short description of the entity. + seasonNumber?: number // For TV seasons, the season number. For TV episodes, the season that the episode belongs to. + seasonCount?: number // For TV series, seasons, and episodes, the total number of seasons. + episodeNumber?: number // For TV episodes, the episode number. + episodeCount?: number // For TV seasons and episodes, the total number of episodes in the current season. + releaseDate?: string // The date that the program or entity was released or first aired. + contentRatings?: ContentRating[] // A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below. +} +``` + +See also: + +[ContentRating](../Entertainment/schemas/#ContentRating) + +--- + +### MusicEntity + +```typescript +type MusicEntity = { + entityType: 'music' + musicType: MusicType // In the case of a music `entityType`, specifies the type of music entity. + entityId: string +} +``` + +See also: + +[MusicType](../Entertainment/schemas/#MusicType) + +--- + +### ChannelEntity + +```typescript +type ChannelEntity = { + entityType: 'channel' + channelType: 'streaming' | 'overTheAir' + entityId: string // ID of the channel, in the target App's scope. + appContentData?: string +} +``` + +--- + +### UntypedEntity + +```typescript +type UntypedEntity = { + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### PlaylistEntity + +A Firebolt compliant representation of a Playlist entity. + +```typescript +type PlaylistEntity = { + entityType: 'playlist' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVEpisodeEntity + +A Firebolt compliant representation of a TV Episode entity. + +```typescript +type TVEpisodeEntity = { + entityType: 'program' + programType: 'episode' + entityId: string + seriesId: string + seasonId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVSeasonEntity + +A Firebolt compliant representation of a TV Season entity. + +```typescript +type TVSeasonEntity = { + entityType: 'program' + programType: 'season' + entityId: string + seriesId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### TVSeriesEntity + +A Firebolt compliant representation of a TV Series entity. + +```typescript +type TVSeriesEntity = { + entityType: 'program' + programType: 'series' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### AdditionalEntity + +A Firebolt compliant representation of the remaining program entity types. + +```typescript +type AdditionalEntity = { + entityType: 'program' + programType: + | 'concert' + | 'sportingEvent' + | 'preview' + | 'other' + | 'advertisement' + | 'musicVideo' + | 'minisode' + | 'extra' + entityId: string + assetId?: string + appContentData?: string +} +``` + +--- + +### ProgramEntity + +```typescript +type ProgramEntity = + | MovieEntity + | TVEpisodeEntity + | TVSeasonEntity + | TVSeriesEntity + | AdditionalEntity +``` + +See also: + +[MovieEntity](#movieentity) +[TVEpisodeEntity](#tvepisodeentity) +[TVSeasonEntity](#tvseasonentity) +[TVSeriesEntity](#tvseriesentity) +[AdditionalEntity](#additionalentity) + +--- + +### Entity + +```typescript + +``` + +See also: + +[ProgramEntity](#programentity) +[MusicEntity](#musicentity) +[ChannelEntity](#channelentity) +[UntypedEntity](#untypedentity) +[PlaylistEntity](#playlistentity) + +--- + +### EntityDetails + +```typescript +type EntityDetails = { + identifiers: + | ProgramEntity + | MusicEntity + | ChannelEntity + | UntypedEntity + | PlaylistEntity + info?: Metadata + waysToWatch?: WayToWatch[] // A WayToWatch describes a way to watch a video program. It may describe a single +} +``` + +See also: + +[Metadata](#metadata) +[WayToWatch](../Entertainment/schemas/#WayToWatch) + +--- + +### PlayableEntity + +```typescript +type PlayableEntity = + | MovieEntity + | TVEpisodeEntity + | PlaylistEntity + | MusicEntity + | AdditionalEntity +``` + +See also: + +[MovieEntity](#movieentity) +[TVEpisodeEntity](#tvepisodeentity) +[PlaylistEntity](#playlistentity) +[MusicEntity](#musicentity) +[AdditionalEntity](#additionalentity) + +--- diff --git a/apis/pr-release-1-3-0/manage/HDMIInput/index.md b/apis/pr-release-1-3-0/manage/HDMIInput/index.md new file mode 100644 index 00000000..414eaa92 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/HDMIInput/index.md @@ -0,0 +1,1846 @@ +--- +title: HDMIInput + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# HDMIInput Module + +--- + +Version HDMIInput 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [autoLowLatencyModeCapable](#autolowlatencymodecapable) + - [close](#close) + - [edidVersion](#edidversion) + - [listen](#listen) + - [lowLatencyMode](#lowlatencymode) + - [once](#once) + - [open](#open) + - [port](#port) + - [ports](#ports) +- [Events](#events) + - [autoLowLatencyModeCapableChanged](#autolowlatencymodecapablechanged) + - [autoLowLatencyModeSignalChanged](#autolowlatencymodesignalchanged) + - [connectionChanged](#connectionchanged) + - [edidVersionChanged](#edidversionchanged) + - [lowLatencyModeChanged](#lowlatencymodechanged) + - [signalChanged](#signalchanged) +- [Types](#types) + - [EDIDVersion](#edidversion-1) + - [HDMISignalStatus](#hdmisignalstatus) + - [HDMIPortId](#hdmiportid) + - [SignalChangedInfo](#signalchangedinfo) + - [AutoLowLatencyModeSignalChangedInfo](#autolowlatencymodesignalchangedinfo) + - [HDMIInputPort](#hdmiinputport) + - [AutoLowLatencyModeCapableChangedInfo](#autolowlatencymodecapablechangedinfo) + - [ConnectionChangedInfo](#connectionchangedinfo) + +## Usage + +To use the HDMIInput module, you can import it into your project from the Firebolt SDK: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' +``` + +## Overview + +Methods for managing HDMI inputs on an HDMI sink device. + +## Methods + +### autoLowLatencyModeCapable + +Property for each port auto low latency mode setting. + +To get the value of `autoLowLatencyModeCapable` call the method like this: + +```typescript +function autoLowLatencyModeCapable(port: HDMIPortId): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | --------------------------- | -------- | -------------------------- | +| `port` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let enabled = await HDMIInput.autoLowLatencyModeCapable('HDMI1') +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.autoLowLatencyModeCapable", + "params": { + "port": "HDMI1" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let enabled = await HDMIInput.autoLowLatencyModeCapable('HDMI1') +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.autoLowLatencyModeCapable", + "params": { + "port": "HDMI1" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `autoLowLatencyModeCapable` call the method like this: + +```typescript +function autoLowLatencyModeCapable( + port: HDMIPortId, + value: boolean, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------------------------- | -------- | -------------------------- | +| `port` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let result = await HDMIInput.autoLowLatencyModeCapable('HDMI1', true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.setAutoLowLatencyModeCapable", + "params": { + "port": "HDMI1", + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let result = await HDMIInput.autoLowLatencyModeCapable('HDMI1', false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.setAutoLowLatencyModeCapable", + "params": { + "port": "HDMI1", + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function autoLowLatencyModeCapable( + callback: (value) => AutoLowLatencyModeCapableChangedInfo, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let listenerId = await autoLowLatencyModeCapable((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `data`: + +```javascript +{ + "port": "HDMI1", + "enabled": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onAutoLowLatencyModeCapableChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "port": "HDMI1", + "enabled": true + } +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let listenerId = await autoLowLatencyModeCapable((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `data`: + +```javascript +{ + "port": "HDMI1", + "enabled": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onAutoLowLatencyModeCapableChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "port": "HDMI1", + "enabled": false + } +} +``` + +
+ +--- + +### close + +Closes the given HDMI Port if it is the current active source for HDMI Input. If there was no active source, then there would no action taken on the device. + +```typescript +function close(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ----------------------------------- | +| manages | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example for stop + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let port = await HDMIInput.close() +console.log(port) +``` + +Value of `port`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.close", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### edidVersion + +Property for each port's active EDID version. + +To get the value of `edidVersion` call the method like this: + +```typescript +function edidVersion(port: HDMIPortId): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | --------------------------- | -------- | -------------------------- | +| `port` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +[EDIDVersion](#edidversion-1) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let edidVersion = await HDMIInput.edidVersion('HDMI1') +console.log(edidVersion) +``` + +Value of `edidVersion`: + +```javascript +'2.0' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.edidVersion", + "params": { + "port": "HDMI1" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "2.0" +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let edidVersion = await HDMIInput.edidVersion('HDMI1') +console.log(edidVersion) +``` + +Value of `edidVersion`: + +```javascript +'2.0' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.edidVersion", + "params": { + "port": "HDMI1" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "1.4" +} +``` + +
+ +--- + +To set the value of `edidVersion` call the method like this: + +```typescript +function edidVersion(port: HDMIPortId, value: EDIDVersion): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------- | -------- | ------------------------------------------ | +| `port` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | +| `value` | [`EDIDVersion`](#edidversion-1) | true |
values: `'1.4' \| '2.0' \| 'unknown'` | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let result = await HDMIInput.edidVersion('HDMI1', '2.0') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.setEdidVersion", + "params": { + "port": "HDMI1", + "value": "2.0" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let result = await HDMIInput.edidVersion('HDMI1', '1.4') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.setEdidVersion", + "params": { + "port": "HDMI1", + "value": "1.4" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function edidVersion( + port: HDMIPortId, + callback: (value) => EDIDVersion, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | --------------------------- | -------- | -------------------------- | +| `port` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let listenerId = await edidVersion((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `edidVersion`: + +```javascript +'2.0' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onEdidVersionChanged", + "params": { + "port": "HDMI1", + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "2.0" +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let listenerId = await edidVersion((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `edidVersion`: + +```javascript +'2.0' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onEdidVersionChanged", + "params": { + "port": "HDMI1", + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "1.4" +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `HDMIInput.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `HDMIInput.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### lowLatencyMode + +Property for the low latency mode setting. + +To get the value of `lowLatencyMode` call the method like this: + +```typescript +function lowLatencyMode(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let enabled = await HDMIInput.lowLatencyMode() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.lowLatencyMode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let enabled = await HDMIInput.lowLatencyMode() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.lowLatencyMode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `lowLatencyMode` call the method like this: + +```typescript +function lowLatencyMode(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let result = await HDMIInput.lowLatencyMode(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.setLowLatencyMode", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let result = await HDMIInput.lowLatencyMode(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.setLowLatencyMode", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function lowLatencyMode(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let listenerId = await lowLatencyMode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onLowLatencyModeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let listenerId = await lowLatencyMode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onLowLatencyModeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `HDMIInput.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `HDMIInput.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### open + +Opens the HDMI Port allowing it to be the active source device. Incase there is a different HDMI portId already set as the active source, this call would stop the older portId before opening the given portId. + +```typescript +function open(portId: HDMIPortId): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------------------------- | -------- | -------------------------- | +| `portId` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ----------------------------------- | +| manages | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example for open + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let port = await HDMIInput.open('HDMI1') +console.log(port) +``` + +Value of `port`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.open", + "params": { + "portId": "HDMI1" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### port + +Retrieve a specific HDMI input port. + +```typescript +function port(portId: HDMIPortId): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------------------------- | -------- | -------------------------- | +| `portId` | [`HDMIPortId`](#hdmiportid) | true |
pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +[HDMIInputPort](#hdmiinputport) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let port = await HDMIInput.port('HDMI1') +console.log(port) +``` + +Value of `port`: + +```javascript +{ + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.port", + "params": { + "portId": "HDMI1" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true + } +} +``` + +
+ +--- + +### ports + +Retrieve a list of HDMI input ports. + +```typescript +function ports(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +let ports = await HDMIInput.ports() +console.log(ports) +``` + +Value of `ports`: + +```javascript +;[ + { + port: 'HDMI1', + connected: true, + signal: 'stable', + arcCapable: true, + arcConnected: true, + edidVersion: '2.0', + autoLowLatencyModeCapable: true, + autoLowLatencyModeSignalled: true, + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.ports", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true + } + ] +} +``` + +
+ +--- + +## Events + +### autoLowLatencyModeCapableChanged + +See: [autoLowLatencyModeCapable](#autolowlatencymodecapable) + +### autoLowLatencyModeSignalChanged + +```typescript +function listen('autoLowLatencyModeSignalChanged', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[AutoLowLatencyModeSignalChangedInfo](#autolowlatencymodesignalchangedinfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +HDMIInput.listen('autoLowLatencyModeSignalChanged', (info) => { + console.log(info) +}) +``` + +Value of `info`: + +```javascript +{ + "port": "HDMI1", + "autoLowLatencyModeSignalled": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onAutoLowLatencyModeSignalChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "port": "HDMI1", + "autoLowLatencyModeSignalled": true + } +} +``` + +
+ +--- + +### connectionChanged + +```typescript +function listen('connectionChanged', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[ConnectionChangedInfo](#connectionchangedinfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +HDMIInput.listen('connectionChanged', (info) => { + console.log(info) +}) +``` + +Value of `info`: + +```javascript +{ + "port": "HDMI1", + "connected": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onConnectionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "port": "HDMI1", + "connected": true + } +} +``` + +
+ +--- + +### edidVersionChanged + +See: [edidVersion](#edidversion) + +### lowLatencyModeChanged + +See: [lowLatencyMode](#lowlatencymode) + +### signalChanged + +```typescript +function listen('signalChanged', () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Event value: + +[SignalChangedInfo](#signalchangedinfo) + +Capabilities: + +| Role | Capability | +| ---- | ----------------------------------- | +| uses | xrn:firebolt:capability:inputs:hdmi | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { HDMIInput } from '@firebolt-js/manage-sdk' + +HDMIInput.listen('signalChanged', (info) => { + console.log(info) +}) +``` + +Value of `info`: + +```javascript +{ + "port": "HDMI1", + "signal": "stable" +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "HDMIInput.onSignalChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "port": "HDMI1", + "signal": "stable" + } +} +``` + +
+ +--- + +## Types + +### EDIDVersion + +```typescript +EDIDVersion: { + V1_4: '1.4', + V2_0: '2.0', + UNKNOWN: 'unknown', +}, + +``` + +--- + +### HDMISignalStatus + +```typescript +HDMISignalStatus: { + NONE: 'none', + STABLE: 'stable', + UNSTABLE: 'unstable', + UNSUPPORTED: 'unsupported', + UNKNOWN: 'unknown', +}, + +``` + +--- + +### HDMIPortId + +```typescript + +``` + +--- + +### SignalChangedInfo + +```typescript +type SignalChangedInfo = { + port: HDMIPortId + signal: HDMISignalStatus +} +``` + +See also: + +[HDMIPortId](#hdmiportid) +[HDMISignalStatus](#hdmisignalstatus) + +--- + +### AutoLowLatencyModeSignalChangedInfo + +```typescript +type AutoLowLatencyModeSignalChangedInfo = { + port?: HDMIPortId + autoLowLatencyModeSignalled?: boolean +} +``` + +See also: + +[HDMIPortId](#hdmiportid) + +--- + +### HDMIInputPort + +```typescript +type HDMIInputPort = { + port: HDMIPortId + connected: boolean + signal: HDMISignalStatus + arcCapable: boolean + arcConnected: boolean + edidVersion: EDIDVersion + autoLowLatencyModeCapable: boolean + autoLowLatencyModeSignalled: boolean +} +``` + +See also: + +[HDMIPortId](#hdmiportid) +[HDMISignalStatus](#hdmisignalstatus) +[EDIDVersion](#edidversion-1) + +--- + +### AutoLowLatencyModeCapableChangedInfo + +```typescript +type AutoLowLatencyModeCapableChangedInfo = { + port: HDMIPortId + enabled: boolean +} +``` + +See also: + +[HDMIPortId](#hdmiportid) + +--- + +### ConnectionChangedInfo + +```typescript +type ConnectionChangedInfo = { + port?: HDMIPortId + connected?: boolean +} +``` + +See also: + +[HDMIPortId](#hdmiportid) + +--- diff --git a/apis/pr-release-1-3-0/manage/Intents/schemas/index.md b/apis/pr-release-1-3-0/manage/Intents/schemas/index.md new file mode 100644 index 00000000..2d0966b6 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Intents/schemas/index.md @@ -0,0 +1,232 @@ +--- +title: Intents + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Intents + +--- + +Version Intents 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [Intent](#intent) + - [IntentProperties](#intentproperties) + - [EntityIntent](#entityintent) + - [PlaybackIntent](#playbackintent) + - [SearchIntent](#searchintent) + - [SectionIntent](#sectionintent) + - [TuneIntent](#tuneintent) + - [PlayEntityIntent](#playentityintent) + - [PlayQueryIntent](#playqueryintent) + - [HomeIntent](#homeintent) + - [LaunchIntent](#launchintent) + - [NavigationIntent](#navigationintent) + +## Overview + +undefined + +## Types + +### Intent + +A Firebolt compliant representation of a user intention. + +```typescript + +``` + +--- + +### IntentProperties + +```typescript + +``` + +--- + +### EntityIntent + +A Firebolt compliant representation of a user intention to navigate an app to a specific entity page, and bring that app to the foreground if needed. + +```typescript +type EntityIntent = { + action: 'entity' + data: + | ProgramEntity + | MusicEntity + | ChannelEntity + | UntypedEntity + | PlaylistEntity + context: object +} +``` + +--- + +### PlaybackIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed. + +```typescript +type PlaybackIntent = { + action: 'playback' + data: PlayableEntity + context: object +} +``` + +See also: + +[PlayableEntity](../Entity/schemas/#PlayableEntity) + +--- + +### SearchIntent + +A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed. + +```typescript +type SearchIntent = { + action: 'search' + data?: object + context: object +} +``` + +--- + +### SectionIntent + +A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed. + +```typescript +type SectionIntent = { + action: 'section' + data: object + context: object +} +``` + +--- + +### TuneIntent + +A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App. + +```typescript +type TuneIntent = { + action: 'tune' + data: object + context: object +} +``` + +See also: + +[ChannelEntity](../Entity/schemas/#ChannelEntity) + +--- + +### PlayEntityIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed. + +```typescript +type PlayEntityIntent = { + action: 'play-entity' + data: object + context: object +} +``` + +See also: + +[PlayableEntity](../Entity/schemas/#PlayableEntity) + +--- + +### PlayQueryIntent + +A Firebolt compliant representation of a user intention to navigate an app to a the video player for an abstract query to be searched for and played by the app. + +```typescript +type PlayQueryIntent = { + action: 'play-query' + data: object + context: object +} +``` + +See also: + +[ProgramType](../Entertainment/schemas/#ProgramType) +[MusicType](../Entertainment/schemas/#MusicType) + +--- + +### HomeIntent + +A Firebolt compliant representation of a user intention to navigate an app to it's home screen, and bring that app to the foreground if needed. + +```typescript +type HomeIntent = { + action: 'home' + context: object +} +``` + +--- + +### LaunchIntent + +A Firebolt compliant representation of a user intention to launch an app. + +```typescript +type LaunchIntent = { + action: 'launch' + context: object +} +``` + +--- + +### NavigationIntent + +A Firebolt compliant representation of a user intention to navigate to a specific place in an app. + +```typescript +type NavigationIntent = + | HomeIntent + | LaunchIntent + | EntityIntent + | PlaybackIntent + | SearchIntent + | SectionIntent + | TuneIntent + | PlayEntityIntent + | PlayQueryIntent +``` + +See also: + +[HomeIntent](#homeintent) +[LaunchIntent](#launchintent) +[EntityIntent](#entityintent) +[PlaybackIntent](#playbackintent) +[SearchIntent](#searchintent) +[SectionIntent](#sectionintent) +[TuneIntent](#tuneintent) +[PlayEntityIntent](#playentityintent) +[PlayQueryIntent](#playqueryintent) + +--- diff --git a/apis/pr-release-1-3-0/manage/Keyboard/index.md b/apis/pr-release-1-3-0/manage/Keyboard/index.md new file mode 100644 index 00000000..85e595b8 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Keyboard/index.md @@ -0,0 +1,962 @@ +--- +title: Keyboard + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Keyboard Module + +--- + +Version Keyboard 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [emailError](#emailerror) + - [emailFocus](#emailfocus) + - [emailResponse](#emailresponse) + - [passwordError](#passworderror) + - [passwordFocus](#passwordfocus) + - [passwordResponse](#passwordresponse) + - [provide](#provide) + - [standardError](#standarderror) + - [standardFocus](#standardfocus) + - [standardResponse](#standardresponse) +- [Events](#events) + - [onRequestEmail](#onrequestemail) + - [onRequestPassword](#onrequestpassword) + - [onRequestStandard](#onrequeststandard) +- [Provider Interfaces](#provider-interfaces) + - [KeyboardInputProvider](#keyboardinputprovider) +- [Types](#types) + - [KeyboardParameters](#keyboardparameters) + - [KeyboardProviderRequest](#keyboardproviderrequest) + +## Usage + +To use the Keyboard module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Keyboard } from '@firebolt-js/manage-sdk' +``` + +## Overview + +Methods for prompting users to enter text with task-oriented UX + +## Methods + +### emailError + +_This is an private RPC method._ + +Internal API for Email Provider to send back error. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `error` | `object` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example 1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.emailError", + "params": { + "correlationId": "123", + "error": { + "code": 1, + "message": "Error" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### emailFocus + +_This is an private RPC method._ + +Internal API for Email Provider to request focus for UX purposes. + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.emailFocus", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### emailResponse + +_This is an private RPC method._ + +Internal API for Email Provider to send back response. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `result` | `string` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.emailResponse", + "params": { + "correlationId": "123", + "result": "email@address.com" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### passwordError + +_This is an private RPC method._ + +Internal API for Password Provider to send back error. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `error` | `object` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example 1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.passwordError", + "params": { + "correlationId": "123", + "error": { + "code": 1, + "message": "Error" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### passwordFocus + +_This is an private RPC method._ + +Internal API for Password Provider to request focus for UX purposes. + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.passwordFocus", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### passwordResponse + +_This is an private RPC method._ + +Internal API for Password Provider to send back response. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `result` | `string` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.passwordResponse", + "params": { + "correlationId": "123", + "result": "password" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### provide + +To provide a specific capability to the platform. See [Provider Interfaces](#provider-interfaces) for a list of interfaces available to provide in this module. + +```typescript +provide(capability: string, provider: any): void +``` + +Parameters: + +| Param | Type | Required | Summary | +| ------------ | -------- | -------- | -------------------------------------------- | +| `capability` | `string` | Yes | The capability that is being provided. | +| `provider` | `any` | Yes | An implementation of the required interface. | + +See [Provider Interfaces](#provider-interfaces) for each capabilities interface definition. + +### standardError + +_This is an private RPC method._ + +Internal API for Standard Provider to send back error. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `error` | `object` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example 1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.standardError", + "params": { + "correlationId": "123", + "error": { + "code": 1, + "message": "Error" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### standardFocus + +_This is an private RPC method._ + +Internal API for Standard Provider to request focus for UX purposes. + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.standardFocus", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### standardResponse + +_This is an private RPC method._ + +Internal API for Standard Provider to send back response. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `result` | `string` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.standardResponse", + "params": { + "correlationId": "123", + "result": "username" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +## Events + +### onRequestEmail + +_This is an private RPC method._ + +Registers as a provider for when the user should be shown a keyboard optimized for email address entry. + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------- | -------- | ----------- | +| `listen` | `boolean` | true | | + +Result: + +[KeyboardProviderRequest](#keyboardproviderrequest) + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.onRequestEmail", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } +} +``` + +--- + +### onRequestPassword + +_This is an private RPC method._ + +Registers as a provider for when the user should be shown a password keyboard, with dots for each character entered. + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------- | -------- | ----------- | +| `listen` | `boolean` | true | | + +Result: + +[KeyboardProviderRequest](#keyboardproviderrequest) + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.onRequestPassword", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } +} +``` + +--- + +### onRequestStandard + +_This is an private RPC method._ + +Registers as a provider for when the user should be shown a standard keyboard. + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------- | -------- | ----------- | +| `listen` | `boolean` | true | | + +Result: + +[KeyboardProviderRequest](#keyboardproviderrequest) + +Capabilities: + +| Role | Capability | +| -------- | -------------------------------------- | +| provides | xrn:firebolt:capability:input:keyboard | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Keyboard.onRequestStandard", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } +} +``` + +--- + +## Provider Interfaces + +### KeyboardInputProvider + +The provider interface for the `xrn:firebolt:capability:input:keyboard` capability. + +```typescript + +``` + +Usage: + +```typescript +Keyboard.provide('xrn:firebolt:capability:input:keyboard', provider: KeyboardInputProvider | object) +``` + +#### Examples + +**Register your app to provide the `xrn:firebolt:capability:input:keyboard` capability.** + +```javascript +import { Keyboard } from '@firebolt-js/manage-sdk' + +class MyKeyboardInputProvider { + async standard(parameters, session) { + return 'username' + } + + async password(parameters, session) { + return 'password' + } + + async email(parameters, session) { + return 'email@address.com' + } +} + +Keyboard.provide( + 'xrn:firebolt:capability:input:keyboard', + new MyKeyboardInputProvider(), +) +``` + +
+ JSON-RPC + +**Register to recieve each provider API** + +Request: + +```json + +{ + "id": 1, + "method": "Keyboard.onRequestStandard", + "params": { + "listen": true + } +} + +{ + "id": 2, + "method": "Keyboard.onRequestPassword", + "params": { + "listen": true + } +} + +{ + "id": 3, + "method": "Keyboard.onRequestEmail", + "params": { + "listen": true + } +} + +``` + +Response: + +```json + +{ + "id": 1, + "result": { + "listening": true, + "event": "Keyboard.onRequestStandard" + } + +} + +{ + "id": 2, + "result": { + "listening": true, + "event": "Keyboard.onRequestPassword" + } + +} + +{ + "id": 3, + "result": { + "listening": true, + "event": "Keyboard.onRequestEmail" + } + +} + +``` + +**Asynchronous event to initiate standard()** + +Event Response: + +```json +{ + "id": 1, + "result": { + "correlationId": undefined, + "parameters": { + "message": "Enter your user name." + } + } +} +``` + +**App initiated response to event** + +Request: + +```json +{ + "id": 4, + "method": "Keyboard.standardResponse", + "params": { + "correlationId": undefined, + "result": "username" + } +} +``` + +Response: + +```json +{ + "id": 4, + "result": true +} +``` + +**Asynchronous event to initiate password()** + +Event Response: + +```json +{ + "id": 2, + "result": { + "correlationId": undefined, + "parameters": { + "message": "Enter your user name." + } + } +} +``` + +**App initiated response to event** + +Request: + +```json +{ + "id": 5, + "method": "Keyboard.passwordResponse", + "params": { + "correlationId": undefined, + "result": "password" + } +} +``` + +Response: + +```json +{ + "id": 5, + "result": true +} +``` + +**Asynchronous event to initiate email()** + +Event Response: + +```json +{ + "id": 3, + "result": { + "correlationId": undefined, + "parameters": { + "message": "Enter your user name." + } + } +} +``` + +**App initiated response to event** + +Request: + +```json +{ + "id": 6, + "method": "Keyboard.emailResponse", + "params": { + "correlationId": undefined, + "result": "email@address.com" + } +} +``` + +Response: + +```json +{ + "id": 6, + "result": true +} +``` + +
+ +## Types + +### KeyboardParameters + +```typescript +type KeyboardParameters = { + message: string // The message to display to the user so the user knows what they are entering +} +``` + +--- + +### KeyboardProviderRequest + +```typescript +type KeyboardProviderRequest = { + correlationId: string // An id to correlate the provider response with this request + parameters: KeyboardParameters // The request to start a keyboard session +} +``` + +See also: + +[KeyboardParameters](#keyboardparameters) + +--- diff --git a/apis/pr-release-1-3-0/manage/Lifecycle/schemas/index.md b/apis/pr-release-1-3-0/manage/Lifecycle/schemas/index.md new file mode 100644 index 00000000..2c7fbaa9 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Lifecycle/schemas/index.md @@ -0,0 +1,61 @@ +--- +title: Lifecycle + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Lifecycle + +--- + +Version Lifecycle 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [CloseReason](#closereason) + - [LifecycleState](#lifecyclestate) + +## Overview + +undefined + +## Types + +### CloseReason + +The application close reason + +```typescript +CloseReason: { + REMOTE_BUTTON: 'remoteButton', + USER_EXIT: 'userExit', + DONE: 'done', + ERROR: 'error', +}, + +``` + +--- + +### LifecycleState + +The application lifecycle state + +```typescript +LifecycleState: { + INITIALIZING: 'initializing', + INACTIVE: 'inactive', + FOREGROUND: 'foreground', + BACKGROUND: 'background', + UNLOADING: 'unloading', + SUSPENDED: 'suspended', +}, + +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/Localization/index.md b/apis/pr-release-1-3-0/manage/Localization/index.md new file mode 100644 index 00000000..d8fa04b5 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Localization/index.md @@ -0,0 +1,2654 @@ +--- +title: Localization + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Localization Module + +--- + +Version Localization 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [addAdditionalInfo](#addadditionalinfo) + - [additionalInfo](#additionalinfo) + - [countryCode](#countrycode) + - [language](#language) + - [listen](#listen) + - [locale](#locale) + - [locality](#locality) + - [once](#once) + - [postalCode](#postalcode) + - [preferredAudioLanguages](#preferredaudiolanguages) + - [removeAdditionalInfo](#removeadditionalinfo) + - [timeZone](#timezone) +- [Events](#events) + - [countryCodeChanged](#countrycodechanged) + - [languageChanged](#languagechanged) + - [localeChanged](#localechanged) + - [localityChanged](#localitychanged) + - [postalCodeChanged](#postalcodechanged) + - [preferredAudioLanguagesChanged](#preferredaudiolanguageschanged) + - [timeZoneChanged](#timezonechanged) +- [Types](#types) + +## Usage + +To use the Localization module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' +``` + +## Overview + +Methods for accessessing location and language preferences + +## Methods + +### addAdditionalInfo + +Add any platform-specific localization information in key/value pair + +```typescript +function addAdditionalInfo(key: string, value: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------------------- | +| `key` | `string` | true | Key to add additionalInfo | +| `value` | `string` | true | Value to be set for additionalInfo | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ---------------------------------------------------- | +| manages | xrn:firebolt:capability:localization:additional-info | + +#### Examples + +Add an additionalInfo for localization + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.addAdditionalInfo('defaultKey', 'defaultValue=') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.addAdditionalInfo", + "params": { + "key": "defaultKey", + "value": "defaultValue=" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### additionalInfo + +Get any platform-specific localization information, in an Map + +```typescript +function additionalInfo(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------------- | +| uses | xrn:firebolt:capability:localization:additional-info | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let info = await Localization.additionalInfo() +console.log(info) +``` + +Value of `info`: + +```javascript +{ +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.additionalInfo", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": {} +} +``` + +
+ +--- + +### countryCode + +Get the ISO 3166-1 alpha-2 code for the country device is located in + +To get the value of `countryCode` call the method like this: + +```typescript +function countryCode(): Promise +``` + +Promise resolution: + +[CountryCode](../Localization/schemas/#CountryCode) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------- | +| uses | xrn:firebolt:capability:localization:country-code | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let code = await Localization.countryCode() +console.log(code) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.countryCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let code = await Localization.countryCode() +console.log(code) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.countryCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "UK" +} +``` + +
+ +--- + +To set the value of `countryCode` call the method like this: + +```typescript +function countryCode(value: CountryCode): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ----------------------------------------------------- | -------- | ------------------------------------------------ | +| `value` | [`CountryCode`](../Localization/schemas/#CountryCode) | true | the device country code
pattern: ^[A-Z]{2}$ | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.countryCode('US') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setCountryCode", + "params": { + "value": "US" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.countryCode('UK') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setCountryCode", + "params": { + "value": "UK" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function countryCode(callback: (value) => CountryCode): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await countryCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onCountryCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await countryCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `code`: + +```javascript +'US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onCountryCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "UK" +} +``` + +
+ +--- + +### language + +Get the ISO 639 1/2 code for the preferred language + +To get the value of `language` call the method like this: + +```typescript +function language(): Promise +``` + +Promise resolution: + +[Language](../Localization/schemas/#Language) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:language | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let lang = await Localization.language() +console.log(lang) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.language", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let lang = await Localization.language() +console.log(lang) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.language", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es" +} +``` + +
+ +--- + +To set the value of `language` call the method like this: + +```typescript +function language(value: Language): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ----------------------------------------------- | -------- | ----------------------------------------------- | +| `value` | [`Language`](../Localization/schemas/#Language) | true | the device language
pattern: ^[A-Za-z]{2}$ | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.language('en') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setLanguage", + "params": { + "value": "en" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.language('es') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setLanguage", + "params": { + "value": "es" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function language(callback: (value) => Language): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await language((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLanguageChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await language((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `lang`: + +```javascript +'en' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLanguageChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es" +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### locale + +Get the _full_ BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale + +To get the value of `locale` call the method like this: + +```typescript +function locale(): Promise +``` + +Promise resolution: + +[Locale](../Localization/schemas/#Locale) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------- | +| uses | xrn:firebolt:capability:localization:locale | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let locale = await Localization.locale() +console.log(locale) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locale", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en-US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let locale = await Localization.locale() +console.log(locale) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locale", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es-US" +} +``` + +
+ +--- + +To set the value of `locale` call the method like this: + +```typescript +function locale(value: Locale): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------------------- | -------- | ------------------------------------------------------------ | +| `value` | [`Locale`](../Localization/schemas/#Locale) | true | the device locale
pattern: ^[a-zA-Z]+([a-zA-Z0-9\-]\*)$ | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.locale('en-US') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setLocale", + "params": { + "value": "en-US" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.locale('es-US') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setLocale", + "params": { + "value": "es-US" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function locale(callback: (value) => Locale): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await locale((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocaleChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "en-US" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await locale((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locale`: + +```javascript +'en-US' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocaleChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "es-US" +} +``` + +
+ +--- + +### locality + +Get the locality/city the device is located in + +To get the value of `locality` call the method like this: + +```typescript +function locality(): Promise +``` + +Promise resolution: + +[Locality](../Localization/schemas/#Locality) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:locality | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let locality = await Localization.locality() +console.log(locality) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locality", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Philadelphia" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let locality = await Localization.locality() +console.log(locality) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.locality", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Rockville" +} +``` + +
+ +--- + +To set the value of `locality` call the method like this: + +```typescript +function locality(value: Locality): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ----------------------------------------------- | -------- | --------------- | +| `value` | [`Locality`](../Localization/schemas/#Locality) | true | the device city | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.locality('Philadelphia') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setLocality", + "params": { + "value": "Philadelphia" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.locality('Rockville') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setLocality", + "params": { + "value": "Rockville" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function locality(callback: (value) => Locality): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await locality((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocalityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Philadelphia" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await locality((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `locality`: + +```javascript +'Philadelphia' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onLocalityChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "Rockville" +} +``` + +
+ +--- + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Localization.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### postalCode + +Get the postal code the device is located in + +To get the value of `postalCode` call the method like this: + +```typescript +function postalCode(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------------ | +| uses | xrn:firebolt:capability:localization:postal-code | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let postalCode = await Localization.postalCode() +console.log(postalCode) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.postalCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "19103" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let postalCode = await Localization.postalCode() +console.log(postalCode) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.postalCode", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "20850" +} +``` + +
+ +--- + +To set the value of `postalCode` call the method like this: + +```typescript +function postalCode(value: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------- | +| `value` | `string` | true | the device postal code | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.postalCode('19103') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setPostalCode", + "params": { + "value": "19103" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.postalCode('20850') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setPostalCode", + "params": { + "value": "20850" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function postalCode(callback: (value) => string): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await postalCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPostalCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "19103" +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await postalCode((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `postalCode`: + +```javascript +'19103' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPostalCodeChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "20850" +} +``` + +
+ +--- + +### preferredAudioLanguages + +A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device. + +To get the value of `preferredAudioLanguages` call the method like this: + +```typescript +function preferredAudioLanguages(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------- | +| uses | xrn:firebolt:capability:localization:language | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let languages = await Localization.preferredAudioLanguages() +console.log(languages) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.preferredAudioLanguages", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["spa", "eng"] +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let languages = await Localization.preferredAudioLanguages() +console.log(languages) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.preferredAudioLanguages", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["eng", "spa"] +} +``` + +
+ +--- + +To set the value of `preferredAudioLanguages` call the method like this: + +```typescript +function preferredAudioLanguages(value: ISO639_2Language[]): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------------------- | -------- | ------------------------------------------------------ | +| `value` | `ISO639_2Language[]` | true | the preferred audio languages
pattern: ^[a-z]{3}$ | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.preferredAudioLanguages(['spa', 'eng']) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setPreferredAudioLanguages", + "params": { + "value": ["spa", "eng"] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.preferredAudioLanguages(['eng', 'spa']) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setPreferredAudioLanguages", + "params": { + "value": ["eng", "spa"] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function preferredAudioLanguages( + callback: (value) => ISO639_2Language[], +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await preferredAudioLanguages((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPreferredAudioLanguagesChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["spa", "eng"] +} +``` + +
+ +Default Example #2 + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await preferredAudioLanguages((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `languages`: + +```javascript +;['spa', 'eng'] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onPreferredAudioLanguagesChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": ["eng", "spa"] +} +``` + +
+ +--- + +### removeAdditionalInfo + +Remove any platform-specific localization information from map + +```typescript +function removeAdditionalInfo(key: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ----- | -------- | -------- | ---------------------------- | +| `key` | `string` | true | Key to remove additionalInfo | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ---------------------------------------------------- | +| manages | xrn:firebolt:capability:localization:additional-info | + +#### Examples + +Remove an additionalInfo for localization + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.removeAdditionalInfo('defaultKey') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.removeAdditionalInfo", + "params": { + "key": "defaultKey" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### timeZone + +Set the IANA timezone for the device + +To get the value of `timeZone` call the method like this: + +```typescript +function timeZone(): Promise +``` + +Promise resolution: + +[TimeZone](../Localization/schemas/#TimeZone) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------------- | +| uses | xrn:firebolt:capability:localization:time-zone | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.timeZone() +console.log(result) +``` + +Value of `result`: + +```javascript +'America/New_York' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.timeZone", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "America/New_York" +} +``` + +
+ +Additional Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.timeZone() +console.log(result) +``` + +Value of `result`: + +```javascript +'America/New_York' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.timeZone", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "America/Los_Angeles" +} +``` + +
+ +--- + +To set the value of `timeZone` call the method like this: + +```typescript +function timeZone(value: TimeZone): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ----------------------------------------------- | -------- | ----------------------------------- | +| `value` | [`TimeZone`](../Localization/schemas/#TimeZone) | true |
pattern: ^[-+_/ A-Za-z 0-9]\*$ | + +Promise resolution: + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.timeZone('America/New_York') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setTimeZone", + "params": { + "value": "America/New_York" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Additional Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let result = await Localization.timeZone('America/Los_Angeles') +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.setTimeZone", + "params": { + "value": "America/Los_Angeles" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function timeZone(callback: (value) => TimeZone): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await timeZone((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `result`: + +```javascript +'America/New_York' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onTimeZoneChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "America/New_York" +} +``` + +
+ +Additional Example + +JavaScript: + +```javascript +import { Localization } from '@firebolt-js/manage-sdk' + +let listenerId = await timeZone((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `result`: + +```javascript +'America/New_York' +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Localization.onTimeZoneChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "America/Los_Angeles" +} +``` + +
+ +--- + +## Events + +### countryCodeChanged + +See: [countryCode](#countrycode) + +### languageChanged + +See: [language](#language) + +### localeChanged + +See: [locale](#locale) + +### localityChanged + +See: [locality](#locality) + +### postalCodeChanged + +See: [postalCode](#postalcode) + +### preferredAudioLanguagesChanged + +See: [preferredAudioLanguages](#preferredaudiolanguages) + +### timeZoneChanged + +See: [timeZone](#timezone) + +## Types diff --git a/apis/pr-release-1-3-0/manage/Localization/schemas/index.md b/apis/pr-release-1-3-0/manage/Localization/schemas/index.md new file mode 100644 index 00000000..0a4caff1 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Localization/schemas/index.md @@ -0,0 +1,79 @@ +--- +title: Localization + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Localization + +--- + +Version Localization 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [ISO639_2Language](#isolanguage) + - [Locality](#locality) + - [CountryCode](#countrycode) + - [Language](#language) + - [Locale](#locale) + - [TimeZone](#timezone) + +## Overview + +undefined + +## Types + +### ISO639_2Language + +```typescript + +``` + +--- + +### Locality + +```typescript + +``` + +--- + +### CountryCode + +```typescript + +``` + +--- + +### Language + +```typescript + +``` + +--- + +### Locale + +```typescript + +``` + +--- + +### TimeZone + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/Metrics/index.md b/apis/pr-release-1-3-0/manage/Metrics/index.md new file mode 100644 index 00000000..be320a38 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Metrics/index.md @@ -0,0 +1,137 @@ +--- +title: Metrics + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Metrics Module + +--- + +Version Metrics 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [event](#event) +- [Types](#types) + - [EventObjectPrimitives](#eventobjectprimitives) + - [EventObject](#eventobject) + +## Usage + +To use the Metrics module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Metrics } from '@firebolt-js/manage-sdk' +``` + +## Overview + +Methods for sending metrics + +## Methods + +### event + +Inform the platform of 1st party distributor metrics. + +```typescript +function event(schema: string, data: EventObject): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | ------------------------------- | -------- | -------------------------------------------------- | +| `schema` | `string` | true | The schema URI of the metric type
format: uri | +| `data` | [`EventObject`](#eventobject-1) | true | A JSON payload conforming the the provided schema | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------- | +| uses | xrn:firebolt:capability:metrics:distributor | + +#### Examples + +Send foo event + +JavaScript: + +```javascript +import { Metrics } from '@firebolt-js/manage-sdk' + +let results = await Metrics.event('http://meta.rdkcentral.com/some/schema', { + foo: 'foo', +}) +console.log(results) +``` + +Value of `results`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Metrics.event", + "params": { + "schema": "http://meta.rdkcentral.com/some/schema", + "data": { + "foo": "foo" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +## Types + +### EventObjectPrimitives + +```typescript +type EventObjectPrimitives = string | number | number | boolean | null +``` + +--- + +### EventObject + +```typescript +type EventObject = {} +``` + +See also: + +[EventObjectPrimitives](#eventobjectprimitives) +[EventObject](#eventobject-1) + +--- diff --git a/apis/pr-release-1-3-0/manage/PinChallenge/index.md b/apis/pr-release-1-3-0/manage/PinChallenge/index.md new file mode 100644 index 00000000..dd86614e --- /dev/null +++ b/apis/pr-release-1-3-0/manage/PinChallenge/index.md @@ -0,0 +1,541 @@ +--- +title: PinChallenge + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# PinChallenge Module + +--- + +Version PinChallenge 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [challengeError](#challengeerror) + - [challengeFocus](#challengefocus) + - [challengeResponse](#challengeresponse) + - [provide](#provide) +- [Events](#events) + - [onRequestChallenge](#onrequestchallenge) +- [Provider Interfaces](#provider-interfaces) + - [ChallengeProvider](#challengeprovider) +- [Types](#types) + - [ResultReason](#resultreason) + - [ChallengeRequestor](#challengerequestor) + - [PinChallengeResult](#pinchallengeresult) + - [PinChallenge](#pinchallenge) + - [PinChallengeProviderRequest](#pinchallengeproviderrequest) + +## Usage + +To use the PinChallenge module, you can import it into your project from the Firebolt SDK: + +```javascript +import { PinChallenge } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for registering as a provider for a user grant in which the user is prompted for a pin for access to a capability + +## Methods + +### challengeError + +_This is an private RPC method._ + +Internal API for Challenge Provider to send back error. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `error` | `object` | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ---------------------------------------------- | +| provides | xrn:firebolt:capability:usergrant:pinchallenge | + +#### Examples + +Example 1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "PinChallenge.challengeError", + "params": { + "correlationId": "123", + "error": { + "code": 1, + "message": "Error" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### challengeFocus + +_This is an private RPC method._ + +Internal API for Challenge Provider to request focus for UX purposes. + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ---------------------------------------------- | +| provides | xrn:firebolt:capability:usergrant:pinchallenge | + +#### Examples + +Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "PinChallenge.challengeFocus", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### challengeResponse + +_This is an private RPC method._ + +Internal API for Challenge Provider to send back response. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | ------------------------------------------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `result` | [`PinChallengeResult`](#pinchallengeresult) | true | | + +Result: + +Capabilities: + +| Role | Capability | +| -------- | ---------------------------------------------- | +| provides | xrn:firebolt:capability:usergrant:pinchallenge | + +#### Examples + +Example #1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "PinChallenge.challengeResponse", + "params": { + "correlationId": "123", + "result": { + "granted": true, + "reason": "correctPin" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +Example #2 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "PinChallenge.challengeResponse", + "params": { + "correlationId": "123", + "result": { + "granted": false, + "reason": "exceededPinFailures" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +Example #3 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "PinChallenge.challengeResponse", + "params": { + "correlationId": "123", + "result": { + "granted": null, + "reason": "cancelled" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### provide + +To provide a specific capability to the platform. See [Provider Interfaces](#provider-interfaces) for a list of interfaces available to provide in this module. + +```typescript +provide(capability: string, provider: any): void +``` + +Parameters: + +| Param | Type | Required | Summary | +| ------------ | -------- | -------- | -------------------------------------------- | +| `capability` | `string` | Yes | The capability that is being provided. | +| `provider` | `any` | Yes | An implementation of the required interface. | + +See [Provider Interfaces](#provider-interfaces) for each capabilities interface definition. + +## Events + +### onRequestChallenge + +_This is an private RPC method._ + +Registers as a provider for when the user should be challenged in order to confirm access to a capability through a pin prompt + +Parameters: + +| Param | Type | Required | Description | +| -------- | --------- | -------- | ----------- | +| `listen` | `boolean` | true | | + +Result: + +[PinChallengeProviderRequest](#pinchallengeproviderrequest) + +Capabilities: + +| Role | Capability | +| -------- | ---------------------------------------------- | +| provides | xrn:firebolt:capability:usergrant:pinchallenge | + +#### Examples + +Default Example + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "PinChallenge.onRequestChallenge", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "correlationId": "abc", + "parameters": { + "capability": "xrn:firebolt:capability:commerce::purchase", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + }, + "pinSpace": "purchase" + } + } +} +``` + +--- + +## Provider Interfaces + +### ChallengeProvider + +The provider interface for the `xrn:firebolt:capability:usergrant:pinchallenge` capability. + +```typescript + +``` + +Usage: + +```typescript +PinChallenge.provide('xrn:firebolt:capability:usergrant:pinchallenge', provider: ChallengeProvider | object) +``` + +#### Examples + +**Register your app to provide the `xrn:firebolt:capability:usergrant:pinchallenge` capability.** + +```javascript +import { PinChallenge } from '@firebolt-js/manage-sdk' + +class MyChallengeProvider { + async challenge(parameters, session) { + return { + granted: true, + reason: 'correctPin', + } + } +} + +PinChallenge.provide( + 'xrn:firebolt:capability:usergrant:pinchallenge', + new MyChallengeProvider(), +) +``` + +
+ JSON-RPC + +**Register to recieve each provider API** + +Request: + +```json +{ + "id": 1, + "method": "PinChallenge.onRequestChallenge", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "id": 1, + "result": { + "listening": true, + "event": "PinChallenge.onRequestChallenge" + } +} +``` + +**Asynchronous event to initiate challenge()** + +Event Response: + +```json +{ + "id": 1, + "result": { + "correlationId": undefined, + "parameters": { + "capability": "xrn:firebolt:capability:commerce::purchase", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + }, + "pinSpace": "purchase" + } + } +} +``` + +**App initiated response to event** + +Request: + +```json +{ + "id": 2, + "method": "PinChallenge.challengeResponse", + "params": { + "correlationId": undefined, + "result": { + "granted": true, + "reason": "correctPin" + } + } +} +``` + +Response: + +```json +{ + "id": 2, + "result": true +} +``` + +
+ +## Types + +### ResultReason + +The reason for the result of challenging the user + +```typescript +ResultReason: { + NO_PIN_REQUIRED: 'noPinRequired', + NO_PIN_REQUIRED_WINDOW: 'noPinRequiredWindow', + EXCEEDED_PIN_FAILURES: 'exceededPinFailures', + CORRECT_PIN: 'correctPin', + CANCELLED: 'cancelled', +}, + +``` + +--- + +### ChallengeRequestor + +```typescript +type ChallengeRequestor = { + id: string // The id of the app that requested the challenge + name: string // The name of the app that requested the challenge +} +``` + +--- + +### PinChallengeResult + +```typescript +type PinChallengeResult = { + granted: boolean + reason: ResultReason // The reason for the result of challenging the user +} +``` + +See also: + +[ResultReason](#resultreason) + +--- + +### PinChallenge + +```typescript +type PinChallenge = { + pinSpace: 'purchase' | 'content' // The pin space that this challenge is for + capability?: string // The capability that is gated by a pin challenge + requestor: ChallengeRequestor // The identity of which app is requesting access to this capability +} +``` + +See also: + +[ChallengeRequestor](#challengerequestor) + +--- + +### PinChallengeProviderRequest + +```typescript +type PinChallengeProviderRequest = { + parameters: PinChallenge // The result of the provider response. + correlationId: string // The id that was passed in to the event that triggered a provider method to be called +} +``` + +See also: + +[ProviderRequest](../Types/schemas/#ProviderRequest) +[PinChallenge](#pinchallenge-1) + +--- diff --git a/apis/pr-release-1-3-0/manage/Privacy/index.md b/apis/pr-release-1-3-0/manage/Privacy/index.md new file mode 100644 index 00000000..cfc99eb9 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Privacy/index.md @@ -0,0 +1,4187 @@ +--- +title: Privacy + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Privacy Module + +--- + +Version Privacy 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [allowACRCollection](#allowacrcollection) + - [allowAppContentAdTargeting](#allowappcontentadtargeting) + - [allowCameraAnalytics](#allowcameraanalytics) + - [allowPersonalization](#allowpersonalization) + - [allowPrimaryBrowseAdTargeting](#allowprimarybrowseadtargeting) + - [allowPrimaryContentAdTargeting](#allowprimarycontentadtargeting) + - [allowProductAnalytics](#allowproductanalytics) + - [allowRemoteDiagnostics](#allowremotediagnostics) + - [allowResumePoints](#allowresumepoints) + - [allowUnentitledPersonalization](#allowunentitledpersonalization) + - [allowUnentitledResumePoints](#allowunentitledresumepoints) + - [allowWatchHistory](#allowwatchhistory) + - [listen](#listen) + - [once](#once) + - [settings](#settings) +- [Events](#events) + - [allowACRCollectionChanged](#allowacrcollectionchanged) + - [allowAppContentAdTargetingChanged](#allowappcontentadtargetingchanged) + - [allowCameraAnalyticsChanged](#allowcameraanalyticschanged) + - [allowPersonalizationChanged](#allowpersonalizationchanged) + - [allowPrimaryBrowseAdTargetingChanged](#allowprimarybrowseadtargetingchanged) + - [allowPrimaryContentAdTargetingChanged](#allowprimarycontentadtargetingchanged) + - [allowProductAnalyticsChanged](#allowproductanalyticschanged) + - [allowRemoteDiagnosticsChanged](#allowremotediagnosticschanged) + - [allowResumePointsChanged](#allowresumepointschanged) + - [allowUnentitledPersonalizationChanged](#allowunentitledpersonalizationchanged) + - [allowUnentitledResumePointsChanged](#allowunentitledresumepointschanged) + - [allowWatchHistoryChanged](#allowwatchhistorychanged) +- [Types](#types) + - [PrivacySettings](#privacysettings) + +## Usage + +To use the Privacy module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for managing device settings. + +## Methods + +### allowACRCollection + +Whether the user allows their automatic content recognition data to be collected + +To get the value of `allowACRCollection` call the method like this: + +```typescript +function allowACRCollection(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowACRCollection() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowACRCollection", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowACRCollection() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowACRCollection", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowACRCollection` call the method like this: + +```typescript +function allowACRCollection(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowACRCollection(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowACRCollection", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowACRCollection(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowACRCollection", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowACRCollection(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowACRCollection((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowACRCollectionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowACRCollection((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowACRCollectionChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowAppContentAdTargeting + +Whether the user allows ads to be targeted to the user while watching content in apps + +To get the value of `allowAppContentAdTargeting` call the method like this: + +```typescript +function allowAppContentAdTargeting(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowAppContentAdTargeting() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowAppContentAdTargeting", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowAppContentAdTargeting() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowAppContentAdTargeting", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowAppContentAdTargeting` call the method like this: + +```typescript +function allowAppContentAdTargeting(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowAppContentAdTargeting(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowAppContentAdTargeting", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowAppContentAdTargeting(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowAppContentAdTargeting", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowAppContentAdTargeting( + callback: (value) => boolean, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowAppContentAdTargeting((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowAppContentAdTargetingChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowAppContentAdTargeting((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowAppContentAdTargetingChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowCameraAnalytics + +Whether the user allows data from their camera to be used for Product Analytics + +To get the value of `allowCameraAnalytics` call the method like this: + +```typescript +function allowCameraAnalytics(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowCameraAnalytics() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowCameraAnalytics", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowCameraAnalytics() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowCameraAnalytics", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowCameraAnalytics` call the method like this: + +```typescript +function allowCameraAnalytics(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowCameraAnalytics(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowCameraAnalytics", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowCameraAnalytics(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowCameraAnalytics", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowCameraAnalytics(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowCameraAnalytics((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowCameraAnalyticsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowCameraAnalytics((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowCameraAnalyticsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowPersonalization + +Whether the user allows their usage data to be used for personalization and recommendations + +To get the value of `allowPersonalization` call the method like this: + +```typescript +function allowPersonalization(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowPersonalization() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowPersonalization", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowPersonalization() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowPersonalization", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowPersonalization` call the method like this: + +```typescript +function allowPersonalization(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowPersonalization(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowPersonalization", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowPersonalization(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowPersonalization", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowPersonalization(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowPersonalization((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowPersonalizationChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowPersonalization((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowPersonalizationChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowPrimaryBrowseAdTargeting + +Whether the user allows ads to be targeted to the user while browsing in the primary experience + +To get the value of `allowPrimaryBrowseAdTargeting` call the method like this: + +```typescript +function allowPrimaryBrowseAdTargeting(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowPrimaryBrowseAdTargeting() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowPrimaryBrowseAdTargeting", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowPrimaryBrowseAdTargeting() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowPrimaryBrowseAdTargeting", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowPrimaryBrowseAdTargeting` call the method like this: + +```typescript +function allowPrimaryBrowseAdTargeting(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowPrimaryBrowseAdTargeting(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowPrimaryBrowseAdTargeting", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowPrimaryBrowseAdTargeting(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowPrimaryBrowseAdTargeting", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowPrimaryBrowseAdTargeting( + callback: (value) => boolean, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowPrimaryBrowseAdTargeting((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowPrimaryBrowseAdTargetingChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowPrimaryBrowseAdTargeting((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowPrimaryBrowseAdTargetingChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowPrimaryContentAdTargeting + +Whether the user allows ads to be targeted to the user while watching content in the primary experience + +To get the value of `allowPrimaryContentAdTargeting` call the method like this: + +```typescript +function allowPrimaryContentAdTargeting(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowPrimaryContentAdTargeting() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowPrimaryContentAdTargeting", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowPrimaryContentAdTargeting() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowPrimaryContentAdTargeting", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowPrimaryContentAdTargeting` call the method like this: + +```typescript +function allowPrimaryContentAdTargeting(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowPrimaryContentAdTargeting(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowPrimaryContentAdTargeting", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowPrimaryContentAdTargeting(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowPrimaryContentAdTargeting", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowPrimaryContentAdTargeting( + callback: (value) => boolean, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowPrimaryContentAdTargeting((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowPrimaryContentAdTargetingChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowPrimaryContentAdTargeting((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowPrimaryContentAdTargetingChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowProductAnalytics + +Whether the user allows their usage data can be used for analytics about the product + +To get the value of `allowProductAnalytics` call the method like this: + +```typescript +function allowProductAnalytics(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowProductAnalytics() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowProductAnalytics", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowProductAnalytics() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowProductAnalytics", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowProductAnalytics` call the method like this: + +```typescript +function allowProductAnalytics(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowProductAnalytics(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowProductAnalytics", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowProductAnalytics(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowProductAnalytics", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowProductAnalytics(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowProductAnalytics((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowProductAnalyticsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowProductAnalytics((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowProductAnalyticsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowRemoteDiagnostics + +Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device + +To get the value of `allowRemoteDiagnostics` call the method like this: + +```typescript +function allowRemoteDiagnostics(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowRemoteDiagnostics() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowRemoteDiagnostics", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowRemoteDiagnostics() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowRemoteDiagnostics", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowRemoteDiagnostics` call the method like this: + +```typescript +function allowRemoteDiagnostics(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowRemoteDiagnostics(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowRemoteDiagnostics", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowRemoteDiagnostics(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowRemoteDiagnostics", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowRemoteDiagnostics(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowRemoteDiagnostics((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowRemoteDiagnosticsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowRemoteDiagnostics((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowRemoteDiagnosticsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowResumePoints + +Whether the user allows resume points for content to show in the main experience + +To get the value of `allowResumePoints` call the method like this: + +```typescript +function allowResumePoints(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowResumePoints() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowResumePoints", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowResumePoints() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowResumePoints", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowResumePoints` call the method like this: + +```typescript +function allowResumePoints(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowResumePoints(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowResumePoints", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowResumePoints(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowResumePoints", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowResumePoints(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowResumePoints((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowResumePointsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowResumePoints((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowResumePointsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowUnentitledPersonalization + +Whether the user allows their usage data to be used for personalization and recommendations for unentitled content + +To get the value of `allowUnentitledPersonalization` call the method like this: + +```typescript +function allowUnentitledPersonalization(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowUnentitledPersonalization() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowUnentitledPersonalization", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowUnentitledPersonalization() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowUnentitledPersonalization", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowUnentitledPersonalization` call the method like this: + +```typescript +function allowUnentitledPersonalization(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowUnentitledPersonalization(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowUnentitledPersonalization", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowUnentitledPersonalization(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowUnentitledPersonalization", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowUnentitledPersonalization( + callback: (value) => boolean, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowUnentitledPersonalization((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowUnentitledPersonalizationChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowUnentitledPersonalization((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowUnentitledPersonalizationChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowUnentitledResumePoints + +Whether the user allows resume points for content from unentitled providers to show in the main experience + +To get the value of `allowUnentitledResumePoints` call the method like this: + +```typescript +function allowUnentitledResumePoints(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowUnentitledResumePoints() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowUnentitledResumePoints", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowUnentitledResumePoints() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowUnentitledResumePoints", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowUnentitledResumePoints` call the method like this: + +```typescript +function allowUnentitledResumePoints(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowUnentitledResumePoints(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowUnentitledResumePoints", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowUnentitledResumePoints(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowUnentitledResumePoints", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowUnentitledResumePoints( + callback: (value) => boolean, +): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowUnentitledResumePoints((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowUnentitledResumePointsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowUnentitledResumePoints((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowUnentitledResumePointsChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### allowWatchHistory + +Whether the user allows their watch history from all sources to show in the main experience + +To get the value of `allowWatchHistory` call the method like this: + +```typescript +function allowWatchHistory(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowWatchHistory() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowWatchHistory", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let allow = await Privacy.allowWatchHistory() +console.log(allow) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.allowWatchHistory", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `allowWatchHistory` call the method like this: + +```typescript +function allowWatchHistory(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowWatchHistory(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowWatchHistory", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let result = await Privacy.allowWatchHistory(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.setAllowWatchHistory", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function allowWatchHistory(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowWatchHistory((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowWatchHistoryChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let listenerId = await allowWatchHistory((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `allow`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.onAllowWatchHistoryChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Privacy.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Privacy.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Privacy.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Privacy.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### settings + +Gets the allowed value for all privacy settings + +```typescript +function settings(): Promise +``` + +Promise resolution: + +[PrivacySettings](#privacysettings) + +Capabilities: + +| Role | Capability | +| ---- | ---------------------------------------- | +| uses | xrn:firebolt:capability:privacy:settings | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { Privacy } from '@firebolt-js/manage-sdk' + +let settings = await Privacy.settings() +console.log(settings) +``` + +Value of `settings`: + +```javascript +{ + "allowACRCollection": true, + "allowResumePoints": false, + "allowAppContentAdTargeting": false, + "allowCameraAnalytics": true, + "allowPersonalization": true, + "allowPrimaryBrowseAdTargeting": false, + "allowPrimaryContentAdTargeting": false, + "allowProductAnalytics": true, + "allowRemoteDiagnostics": true, + "allowUnentitledPersonalization": true, + "allowUnentitledResumePoints": false, + "allowWatchHistory": true +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Privacy.settings", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "allowACRCollection": true, + "allowResumePoints": false, + "allowAppContentAdTargeting": false, + "allowCameraAnalytics": true, + "allowPersonalization": true, + "allowPrimaryBrowseAdTargeting": false, + "allowPrimaryContentAdTargeting": false, + "allowProductAnalytics": true, + "allowRemoteDiagnostics": true, + "allowUnentitledPersonalization": true, + "allowUnentitledResumePoints": false, + "allowWatchHistory": true + } +} +``` + +
+ +--- + +## Events + +### allowACRCollectionChanged + +See: [allowACRCollection](#allowacrcollection) + +### allowAppContentAdTargetingChanged + +See: [allowAppContentAdTargeting](#allowappcontentadtargeting) + +### allowCameraAnalyticsChanged + +See: [allowCameraAnalytics](#allowcameraanalytics) + +### allowPersonalizationChanged + +See: [allowPersonalization](#allowpersonalization) + +### allowPrimaryBrowseAdTargetingChanged + +See: [allowPrimaryBrowseAdTargeting](#allowprimarybrowseadtargeting) + +### allowPrimaryContentAdTargetingChanged + +See: [allowPrimaryContentAdTargeting](#allowprimarycontentadtargeting) + +### allowProductAnalyticsChanged + +See: [allowProductAnalytics](#allowproductanalytics) + +### allowRemoteDiagnosticsChanged + +See: [allowRemoteDiagnostics](#allowremotediagnostics) + +### allowResumePointsChanged + +See: [allowResumePoints](#allowresumepoints) + +### allowUnentitledPersonalizationChanged + +See: [allowUnentitledPersonalization](#allowunentitledpersonalization) + +### allowUnentitledResumePointsChanged + +See: [allowUnentitledResumePoints](#allowunentitledresumepoints) + +### allowWatchHistoryChanged + +See: [allowWatchHistory](#allowwatchhistory) + +## Types + +### PrivacySettings + +```typescript +type PrivacySettings = { + allowACRCollection: boolean + allowResumePoints: boolean + allowAppContentAdTargeting: boolean + allowCameraAnalytics: boolean + allowPersonalization: boolean + allowPrimaryBrowseAdTargeting: boolean + allowPrimaryContentAdTargeting: boolean + allowProductAnalytics: boolean + allowRemoteDiagnostics: boolean + allowUnentitledPersonalization: boolean + allowUnentitledResumePoints: boolean + allowWatchHistory: boolean +} +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/SecondScreen/schemas/index.md b/apis/pr-release-1-3-0/manage/SecondScreen/schemas/index.md new file mode 100644 index 00000000..7bbdc3fd --- /dev/null +++ b/apis/pr-release-1-3-0/manage/SecondScreen/schemas/index.md @@ -0,0 +1,40 @@ +--- +title: SecondScreen + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# SecondScreen + +--- + +Version SecondScreen 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [SecondScreenEvent](#secondscreenevent) + +## Overview + +undefined + +## Types + +### SecondScreenEvent + +An a message notification from a second screen device + +```typescript +type SecondScreenEvent = { + type: 'dial' + version?: string + data?: string +} +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/SecureStorage/index.md b/apis/pr-release-1-3-0/manage/SecureStorage/index.md new file mode 100644 index 00000000..aa4777aa --- /dev/null +++ b/apis/pr-release-1-3-0/manage/SecureStorage/index.md @@ -0,0 +1,367 @@ +--- +title: SecureStorage + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# SecureStorage Module + +--- + +Version SecureStorage 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [clearForApp](#clearforapp) + - [removeForApp](#removeforapp) + - [setForApp](#setforapp) +- [Types](#types) + - [StorageScope](#storagescope) + - [StorageOptions](#storageoptions) + +## Usage + +To use the SecureStorage module, you can import it into your project from the Firebolt SDK: + +```javascript +import { SecureStorage } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for storing and retrieving secure data owned by the app + +## Methods + +### clearForApp + +Clears all the secure data values for a specific app + +```typescript +function clearForApp(appId: string, scope: StorageScope): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------- | -------- | --------------------------------------------------------------- | +| `appId` | `string` | true | appId for which values are removed | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the key/value
values: `'device' \| 'account'` | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | -------------------------------------- | +| manages | xrn:firebolt:capability:storage:secure | + +#### Examples + +Clears all the secure data values for appId foo + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/manage-sdk' + +let success = await SecureStorage.clearForApp('foo', 'account') +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.clearForApp", + "params": { + "appId": "foo", + "scope": "account" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### removeForApp + +Removes single data value for a specific app. + +```typescript +function removeForApp( + appId: string, + scope: StorageScope, + key: string, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ------------------------------- | -------- | --------------------------------------------------------------- | +| `appId` | `string` | true | appId for which values are removed | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the key/value
values: `'device' \| 'account'` | +| `key` | `string` | true | Key to remove | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | -------------------------------------- | +| manages | xrn:firebolt:capability:storage:secure | + +#### Examples + +Removes authRefreshToken for appId foo + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/manage-sdk' + +let success = await SecureStorage.removeForApp( + 'foo', + 'account', + 'authRefreshToken', +) +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.removeForApp", + "params": { + "appId": "foo", + "scope": "account", + "key": "authRefreshToken" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### setForApp + +Set or update a secure data value for a specific app. + +```typescript +function setForApp( + appId: string, + scope: StorageScope, + key: string, + value: string, + options: StorageOptions, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ----------------------------------- | -------- | -------------------------------------------------------------- | +| `appId` | `string` | true | appId for which value is being set | +| `scope` | [`StorageScope`](#storagescope) | true | The scope of the data key
values: `'device' \| 'account'` | +| `key` | `string` | true | Key to set | +| `value` | `string` | true | Value to set | +| `options` | [`StorageOptions`](#storageoptions) | false | Optional parameters to set | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | -------------------------------------- | +| manages | xrn:firebolt:capability:storage:secure | + +#### Examples + +Set a refresh token with name authRefreshToken with optional parameter for appId foo + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/manage-sdk' + +let success = await SecureStorage.setForApp( + 'foo', + 'device', + 'authRefreshToken', + 'VGhpcyBub3QgYSByZWFsIHRva2VuLgo=', + { + ttl: 600, + }, +) +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.setForApp", + "params": { + "appId": "foo", + "scope": "device", + "key": "authRefreshToken", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=", + "options": { + "ttl": 600 + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Set a refresh token with name authRefreshToken without optional parameter for appId foo + +JavaScript: + +```javascript +import { SecureStorage } from '@firebolt-js/manage-sdk' + +let success = await SecureStorage.setForApp( + 'foo', + 'account', + 'authRefreshToken', + 'VGhpcyBub3QgYSByZWFsIHRva2VuLgo=', + null, +) +console.log(success) +``` + +Value of `success`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "SecureStorage.setForApp", + "params": { + "appId": "foo", + "scope": "account", + "key": "authRefreshToken", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +## Types + +### StorageScope + +The scope of the data + +```typescript +StorageScope: { + DEVICE: 'device', + ACCOUNT: 'account', +}, + +``` + +--- + +### StorageOptions + +```typescript +type StorageOptions = { + ttl: number // Seconds from set time before the data expires and is removed +} +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/Types/schemas/index.md b/apis/pr-release-1-3-0/manage/Types/schemas/index.md new file mode 100644 index 00000000..8fcd3daa --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Types/schemas/index.md @@ -0,0 +1,96 @@ +--- +title: Types + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Types + +--- + +Version Types 0.0.0-unknown.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Types](#types) + - [AudioProfile](#audioprofile) + - [SemanticVersion](#semanticversion) + - [BooleanMap](#booleanmap) + - [LocalizedString](#localizedstring) + - [FlatMap](#flatmap) + - [Timeout](#timeout) + +## Overview + +undefined + +## Types + +### AudioProfile + +```typescript +AudioProfile: { + STEREO: 'stereo', + DOLBY_DIGITAL_5_1: 'dolbyDigital5.1', + DOLBY_DIGITAL_7_1: 'dolbyDigital7.1', + DOLBY_DIGITAL_5_1_PLUS: 'dolbyDigital5.1+', + DOLBY_DIGITAL_7_1_PLUS: 'dolbyDigital7.1+', + DOLBY_ATMOS: 'dolbyAtmos', +}, + +``` + +--- + +### SemanticVersion + +```typescript +type SemanticVersion = { + major: number + minor: number + patch: number + readable: string +} +``` + +--- + +### BooleanMap + +```typescript +type BooleanMap = {} +``` + +--- + +### LocalizedString + +Localized string supports either a simple `string` or a Map of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed. + +```typescript +type LocalizedString = string | object +``` + +--- + +### FlatMap + +```typescript + +``` + +--- + +### Timeout + +Defines the timeout in seconds. If the threshold for timeout is passed for any operation without a result it will throw an error. + +```typescript + +``` + +--- diff --git a/apis/pr-release-1-3-0/manage/UserGrants/index.md b/apis/pr-release-1-3-0/manage/UserGrants/index.md new file mode 100644 index 00000000..603d8134 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/UserGrants/index.md @@ -0,0 +1,849 @@ +--- +title: UserGrants + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# UserGrants Module + +--- + +Version UserGrants 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [app](#app) + - [capability](#capability) + - [clear](#clear) + - [deny](#deny) + - [device](#device) + - [grant](#grant) + - [request](#request) +- [Types](#types) + - [GrantState](#grantstate) + - [GrantModificationOptions](#grantmodificationoptions) + - [RequestOptions](#requestoptions) + - [AppInfo](#appinfo) + - [GrantInfo](#grantinfo) + +## Usage + +To use the UserGrants module, you can import it into your project from the Firebolt SDK: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for managing grants given by the user + +## Methods + +### app + +Get all granted and denied user grants for the given app + +```typescript +function app(appId: string): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ----------- | +| `appId` | `string` | true | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------ | +| uses | xrn:firebolt:capability:grants:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let info = await UserGrants.app('certapp') +console.log(info) +``` + +Value of `info`: + +```javascript +;[ + { + app: { + id: 'certapp', + title: 'Firebolt Certification', + }, + state: 'granted', + capability: 'xrn:firebolt:capability:data:app-usage', + role: 'use', + lifespan: 'seconds', + expires: '2022-12-14T20:20:39+00:00', + }, + { + app: { + id: 'certapp', + title: 'Firebolt Certification', + }, + state: 'denied', + capability: 'xrn:firebolt:capability:localization:postal-code', + role: 'use', + lifespan: 'appActive', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.app", + "params": { + "appId": "certapp" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:data:app-usage", + "role": "use", + "lifespan": "seconds", + "expires": "2022-12-14T20:20:39+00:00" + }, + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "denied", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "appActive" + } + ] +} +``` + +
+ +--- + +### capability + +Get all granted and denied user grants for the given capability + +```typescript +function capability(capability: Capability): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------ | +| uses | xrn:firebolt:capability:grants:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let info = await UserGrants.capability( + 'xrn:firebolt:capability:localization:postal-code', +) +console.log(info) +``` + +Value of `info`: + +```javascript +;[ + { + state: 'granted', + capability: 'xrn:firebolt:capability:localization:postal-code', + role: 'use', + lifespan: 'powerActive', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.capability", + "params": { + "capability": "xrn:firebolt:capability:localization:postal-code" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] +} +``` + +
+ +--- + +### clear + +Clears the grant for a given capability, to a specific app if appropriate. Calling this results in a persisted Denied Grant that lasts for the duration of the Grant Policy lifespan. + +```typescript +function clear( + role: Role, + capability: Capability, + options: GrantModificationOptions, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ------------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `role` | [`Role`](../Capabilities/schemas/#Role) | true |
values: `'use' \| 'manage' \| 'provide'` | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | [`GrantModificationOptions`](#grantmodificationoptions) | false | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------ | +| manages | xrn:firebolt:capability:grants:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let result = await UserGrants.clear( + 'use', + 'xrn:firebolt:capability:localization:postal-code', + { appId: 'certapp' }, +) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.clear", + "params": { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code", + "options": { + "appId": "certapp" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### deny + +Denies a given capability, to a specific app if appropriate. Calling this results in a persisted Denied Grant that lasts for the duration of the Grant Policy lifespan. + +```typescript +function deny( + role: Role, + capability: Capability, + options: GrantModificationOptions, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ------------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `role` | [`Role`](../Capabilities/schemas/#Role) | true |
values: `'use' \| 'manage' \| 'provide'` | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | [`GrantModificationOptions`](#grantmodificationoptions) | false | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------ | +| manages | xrn:firebolt:capability:grants:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let result = await UserGrants.deny( + 'use', + 'xrn:firebolt:capability:localization:postal-code', + { appId: 'certapp' }, +) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.deny", + "params": { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code", + "options": { + "appId": "certapp" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### device + +Get all granted and denied user grants for the device + +```typescript +function device(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------ | +| uses | xrn:firebolt:capability:grants:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let info = await UserGrants.device() +console.log(info) +``` + +Value of `info`: + +```javascript +;[ + { + state: 'granted', + capability: 'xrn:firebolt:capability:localization:postal-code', + role: 'use', + lifespan: 'powerActive', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.device", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] +} +``` + +
+ +--- + +### grant + +Grants a given capability to a specific app, if appropriate. Calling this results in a persisted active grant that lasts for the duration of the grant policy lifespan. + +```typescript +function grant( + role: Role, + capability: Capability, + options: GrantModificationOptions, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ------------------------------------------------------- | -------- | ---------------------------------------------------------------------- | +| `role` | [`Role`](../Capabilities/schemas/#Role) | true |
values: `'use' \| 'manage' \| 'provide'` | +| `capability` | [`Capability`](../Capabilities/schemas/#Capability) | true |
pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | [`GrantModificationOptions`](#grantmodificationoptions) | false | | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------ | +| manages | xrn:firebolt:capability:grants:state | + +#### Examples + +Default Example + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let result = await UserGrants.grant( + 'use', + 'xrn:firebolt:capability:localization:postal-code', + { appId: 'certapp' }, +) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.grant", + "params": { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code", + "options": { + "appId": "certapp" + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### request + +Requests Firebolt to carry out a set of user grants for a given application such that the user grant provider is notified or an existing user grant is reused. + +```typescript +function request( + appId: string, + permissions: Permission[], + options: RequestOptions, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | ----------------------------------- | -------- | --------------- | +| `appId` | `string` | true | | +| `permissions` | `Permission[]` | true | | +| `options` | [`RequestOptions`](#requestoptions) | false | Request options | + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ------- | ------------------------------------ | +| manages | xrn:firebolt:capability:grants:state | + +#### Examples + +Default result #1 + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let info = await UserGrants.request( + 'certapp', + [ + { + role: 'use', + capability: 'xrn:firebolt:capability:localization:postal-code', + }, + ], + null, +) +console.log(info) +``` + +Value of `info`: + +```javascript +;[ + { + app: { + id: 'certapp', + title: 'Certification App', + }, + state: 'granted', + capability: 'xrn:firebolt:capability:localization:postal-code', + role: 'use', + lifespan: 'powerActive', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.request", + "params": { + "appId": "certapp", + "permissions": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code" + } + ] + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "app": { + "id": "certapp", + "title": "Certification App" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] +} +``` + +
+ +Default result #2 + +JavaScript: + +```javascript +import { UserGrants } from '@firebolt-js/manage-sdk' + +let info = await UserGrants.request( + 'certapp', + [ + { + role: 'use', + capability: 'xrn:firebolt:capability:localization:postal-code', + }, + ], + { + force: true, + }, +) +console.log(info) +``` + +Value of `info`: + +```javascript +;[ + { + app: { + id: 'certapp', + title: 'Certification App', + }, + state: 'granted', + capability: 'xrn:firebolt:capability:localization:postal-code', + role: 'use', + lifespan: 'powerActive', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "UserGrants.request", + "params": { + "appId": "certapp", + "permissions": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code" + } + ], + "options": { + "force": true + } + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "app": { + "id": "certapp", + "title": "Certification App" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] +} +``` + +
+ +--- + +## Types + +### GrantState + +The state the grant is in + +```typescript +GrantState: { + GRANTED: 'granted', + DENIED: 'denied', +}, + +``` + +--- + +### GrantModificationOptions + +Options when modifying any grant + +```typescript +type GrantModificationOptions = { + appId?: string +} +``` + +--- + +### RequestOptions + +```typescript +type RequestOptions = { + force?: boolean // Whether to force for user grant even if the previous decision stored +} +``` + +--- + +### AppInfo + +Information about an app that a grant was for + +```typescript +type AppInfo = { + id: string + title?: string +} +``` + +--- + +### GrantInfo + +Information about a grant given by a user + +```typescript +type GrantInfo = { + app?: AppInfo // Information about an app that a grant was for + state: GrantState // The state the grant is in + capability: Capability // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform. + role: Role // Role provides access level for the app for a given capability. + lifespan: 'once' | 'forever' | 'appActive' | 'powerActive' | 'seconds' + expires?: string +} +``` + +See also: + +[AppInfo](#appinfo) +[GrantState](#grantstate) +[Capability](../Capabilities/schemas/#Capability) +[Role](../Capabilities/schemas/#Role) + +--- diff --git a/apis/pr-release-1-3-0/manage/VoiceGuidance/index.md b/apis/pr-release-1-3-0/manage/VoiceGuidance/index.md new file mode 100644 index 00000000..a69509aa --- /dev/null +++ b/apis/pr-release-1-3-0/manage/VoiceGuidance/index.md @@ -0,0 +1,807 @@ +--- +title: VoiceGuidance + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# VoiceGuidance Module + +--- + +Version VoiceGuidance 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [enabled](#enabled) + - [listen](#listen) + - [once](#once) + - [speed](#speed) +- [Events](#events) + - [enabledChanged](#enabledchanged) + - [speedChanged](#speedchanged) +- [Types](#types) + +## Usage + +To use the VoiceGuidance module, you can import it into your project from the Firebolt SDK: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for managing voice-guidance Settings. + +## Methods + +### enabled + +Whether or not voice-guidance is enabled. + +To get the value of `enabled` call the method like this: + +```typescript +function enabled(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:voiceguidance | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let enabled = await VoiceGuidance.enabled() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.enabled", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let enabled = await VoiceGuidance.enabled() +console.log(enabled) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.enabled", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +To set the value of `enabled` call the method like this: + +```typescript +function enabled(value: boolean): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let result = await VoiceGuidance.enabled(true) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.setEnabled", + "params": { + "value": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let result = await VoiceGuidance.enabled(false) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.setEnabled", + "params": { + "value": false + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function enabled(callback: (value) => boolean): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let listenerId = await enabled((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.onEnabledChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +
+ +Default example #2 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let listenerId = await enabled((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `enabled`: + +```javascript +true +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.onEnabledChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +
+ +--- + +### listen + +To listen to a specific event pass the event name as the first parameter: + +```typescript +listen(event: string, callback: (data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `VoiceGuidance.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to all events from this module pass only a callback, without specifying an event name: + +```typescript +listen(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `VoiceGuidance.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### once + +To listen to a single instance of a specific event pass the event name as the first parameter: + +```typescript +once(event: string, callback: (data: any) => void): Promise +``` + +The `once` method will only pass the next instance of this event, and then dicard the listener you provided. + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------ | +| `event` | `string` | Yes | The event to listen for, see [Events](#events). | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `VoiceGuidance.clear(id)` | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------ | ----- | -------- | ------------------------------------------------------------------------------ | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: + +```typescript +once(callback: (event: string, data: any) => void): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | +| _callback_ | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](#events). | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------------------------------------------------ | +| `event` | `string` | Yes | The event that has occured listen for, see [Events](#events). | +| `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](#events). | + +Promise resolution: + +| Type | Description | +| -------- | ----------------------------------------------------------------------------------------------------- | +| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `VoiceGuidance.clear(id)` | + +See [Listening for events](../../docs/listening-for-events/) for more information and examples. + +### speed + +The speed at which voice guidance speech will be read back to the user. + +To get the value of `speed` call the method like this: + +```typescript +function speed(): Promise +``` + +Promise resolution: + +[VoiceSpeed](../Accessibility/schemas/#VoiceSpeed) + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------------------- | +| uses | xrn:firebolt:capability:accessibility:voiceguidance | + +#### Examples + +Voice guidance speed to 1 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let speed = await VoiceGuidance.speed() +console.log(speed) +``` + +Value of `speed`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.speed", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 1 +} +``` + +
+ +Voice guidance speed to 2 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let speed = await VoiceGuidance.speed() +console.log(speed) +``` + +Value of `speed`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.speed", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 2 +} +``` + +
+ +--- + +To set the value of `speed` call the method like this: + +```typescript +function speed(value: VoiceSpeed): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | ---------------------------------------------------- | -------- | ----------------- | +| `value` | [`VoiceSpeed`](../Accessibility/schemas/#VoiceSpeed) | true |
minumum: 0.5 | +| maximum: 2 | + +Promise resolution: + +#### Examples + +Voice guidance speed to 1 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let result = await VoiceGuidance.speed(1) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.setSpeed", + "params": { + "value": 1 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +Voice guidance speed to 2 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let result = await VoiceGuidance.speed(2) +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.setSpeed", + "params": { + "value": 2 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +To subscribe to notifications when the value changes, call the method like this: + +```typescript +function speed(callback: (value) => VoiceSpeed): Promise +``` + +Promise resolution: + +``` +number +``` + +#### Examples + +Voice guidance speed to 1 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let listenerId = await speed((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `speed`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.onSpeedChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 1 +} +``` + +
+ +Voice guidance speed to 2 + +JavaScript: + +```javascript +import { VoiceGuidance } from '@firebolt-js/manage-sdk' + +let listenerId = await speed((value) => { + console.log(value) +}) +console.log(listenerId) +``` + +Value of `speed`: + +```javascript +1 +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "VoiceGuidance.onSpeedChanged", + "params": { + "listen": true + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": 2 +} +``` + +
+ +--- + +## Events + +### enabledChanged + +See: [enabled](#enabled) + +### speedChanged + +See: [speed](#speed) + +## Types diff --git a/apis/pr-release-1-3-0/manage/Wifi/index.md b/apis/pr-release-1-3-0/manage/Wifi/index.md new file mode 100644 index 00000000..4c6c0bd4 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/Wifi/index.md @@ -0,0 +1,551 @@ +--- +title: Wifi + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +# Wifi Module + +--- + +Version Wifi 1.3.0-release-1-3-0.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [connect](#connect) + - [disconnect](#disconnect) + - [scan](#scan) + - [wps](#wps) +- [Types](#types) + - [WifiSecurityMode](#wifisecuritymode) + - [WPSSecurityPin](#wpssecuritypin) + - [WifiSignalStrength](#wifisignalstrength) + - [WifiFrequency](#wififrequency) + - [AccessPoint](#accesspoint) + - [AccessPointList](#accesspointlist) + +## Usage + +To use the Wifi module, you can import it into your project from the Firebolt SDK: + +```javascript +import { Wifi } from '@firebolt-js/manage-sdk' +``` + +## Overview + +A module for providing support for Wifi. + +## Methods + +### connect + +Connect the device to the specified SSID. + +```typescript +function connect( + ssid: string, + passphrase: string, + security: WifiSecurityMode, +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | --------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ssid` | `string` | false | | +| `passphrase` | `string` | false | | +| `security` | [`WifiSecurityMode`](#wifisecuritymode) | false |
values: `'none' \| 'wep64' \| 'wep128' \| 'wpaPskTkip' \| 'wpaPskAes' \| 'wpa2PskTkip' \| 'wpa2PskAes' \| 'wpaEnterpriseTkip' \| 'wpaEnterpriseAes' \| 'wpa2EnterpriseTkip' \| 'wpa2EnterpriseAes' \| 'wpa2Psk' \| 'wpa2Enterprise' \| 'wpa3PskAes' \| 'wpa3Sae'` | + +Promise resolution: + +[AccessPoint](#accesspoint) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:wifi | + +#### Examples + +Connect to a wpa2Psk Wifi with password + +JavaScript: + +```javascript +import { Wifi } from '@firebolt-js/manage-sdk' + +let connectedWifi = await Wifi.connect('DND', 'gargoyle', 'wpa2Psk') +console.log(connectedWifi) +``` + +Value of `connectedWifi`: + +```javascript +{ + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Wifi.connect", + "params": { + "ssid": "DND", + "passphrase": "gargoyle", + "security": "wpa2Psk" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + } +} +``` + +
+ +Connect to a WPA2 PSK Wifi with password + +JavaScript: + +```javascript +import { Wifi } from '@firebolt-js/manage-sdk' + +let connectedWifi = await Wifi.connect('Guardian WIFI', '', 'none') +console.log(connectedWifi) +``` + +Value of `connectedWifi`: + +```javascript +{ + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Wifi.connect", + "params": { + "ssid": "Guardian WIFI", + "passphrase": "", + "security": "none" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "ssid": "Guardian WIFI", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } +} +``` + +
+ +--- + +### disconnect + +Disconnect the device if connected via WIFI. + +```typescript +function disconnect(): Promise +``` + +Promise resolution: + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:wifi | + +#### Examples + +Disconnect + +JavaScript: + +```javascript +import { Wifi } from '@firebolt-js/manage-sdk' + +let result = await Wifi.disconnect() +console.log(result) +``` + +Value of `result`: + +```javascript +null +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Wifi.disconnect", + "params": {} +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +
+ +--- + +### scan + +Scan available wifi networks in the location. + +```typescript +function scan(timeout: Timeout): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | -------------------------------------- | -------- | --------------- | +| `timeout` | [`Timeout`](../Types/schemas/#Timeout) | false |
minumum: 0 | +| maximum: 9999 | + +Promise resolution: + +[AccessPointList](#accesspointlist) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:wifi | + +#### Examples + +Successful Wifi List + +JavaScript: + +```javascript +import { Wifi } from '@firebolt-js/manage-sdk' + +let list = await Wifi.scan(30) +console.log(list) +``` + +Value of `list`: + +```javascript +{ + "list": [ + { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + }, + { + "ssid": "Fortnite", + "security": "WPA2_ENTERPRISE_AES", + "signalStrength": -70, + "frequency": 5 + }, + { + "ssid": "Guardian", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } + ] +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Wifi.scan", + "params": { + "timeout": 30 + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "list": [ + { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + }, + { + "ssid": "Fortnite", + "security": "WPA2_ENTERPRISE_AES", + "signalStrength": -70, + "frequency": 5 + }, + { + "ssid": "Guardian", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } + ] + } +} +``` + +
+ +--- + +### wps + +Connect to WPS + +```typescript +function wps(security: WPSSecurityPin): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | ----------------------------------- | -------- | --------------------------------------------------------- | +| `security` | [`WPSSecurityPin`](#wpssecuritypin) | false |
values: `'pushButton' \| 'pin' \| 'manufacturerPin'` | + +Promise resolution: + +[AccessPoint](#accesspoint) + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------- | +| uses | xrn:firebolt:capability:protocol:wifi | + +#### Examples + +Connect to a WPS Wifi router + +JavaScript: + +```javascript +import { Wifi } from '@firebolt-js/manage-sdk' + +let connectedWifi = await Wifi.wps('pushButton') +console.log(connectedWifi) +``` + +Value of `connectedWifi`: + +```javascript +{ + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 +} +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "Wifi.wps", + "params": { + "security": "pushButton" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + } +} +``` + +
+ +--- + +## Types + +### WifiSecurityMode + +Security Mode supported for Wifi + +```typescript +WifiSecurityMode: { + NONE: 'none', + WEP_64: 'wep64', + WEP_128: 'wep128', + WPA_PSK_TKIP: 'wpaPskTkip', + WPA_PSK_AES: 'wpaPskAes', + WPA_2PSK_TKIP: 'wpa2PskTkip', + WPA_2PSK_AES: 'wpa2PskAes', + WPA_ENTERPRISE_TKIP: 'wpaEnterpriseTkip', + WPA_ENTERPRISE_AES: 'wpaEnterpriseAes', + WPA_2ENTERPRISE_TKIP: 'wpa2EnterpriseTkip', + WPA_2ENTERPRISE_AES: 'wpa2EnterpriseAes', + WPA_2PSK: 'wpa2Psk', + WPA_2ENTERPRISE: 'wpa2Enterprise', + WPA_3PSK_AES: 'wpa3PskAes', + WPA_3SAE: 'wpa3Sae', +}, + +``` + +--- + +### WPSSecurityPin + +Security pin type for WPS(Wifi Protected Setup). + +```typescript +WPSSecurityPin: { + PUSH_BUTTON: 'pushButton', + PIN: 'pin', + MANUFACTURER_PIN: 'manufacturerPin', +}, + +``` + +--- + +### WifiSignalStrength + +Strength of Wifi signal, value is negative based on RSSI specification. + +```typescript + +``` + +--- + +### WifiFrequency + +Wifi Frequency in Ghz, example 2.4Ghz and 5Ghz. + +```typescript + +``` + +--- + +### AccessPoint + +Properties of a scanned wifi list item. + +```typescript +type AccessPoint = { + ssid?: string // Name of the wifi. + securityMode?: WifiSecurityMode // Security Mode supported for Wifi + signalStrength?: WifiSignalStrength // Strength of Wifi signal, value is negative based on RSSI specification. + frequency?: WifiFrequency // Wifi Frequency in Ghz, example 2.4Ghz and 5Ghz. +} +``` + +See also: + +[WifiSecurityMode](#wifisecuritymode) +[WifiSignalStrength](#wifisignalstrength) +[WifiFrequency](#wififrequency) + +--- + +### AccessPointList + +List of scanned Wifi networks available near the device. + +```typescript +type AccessPointList = { + list?: AccessPoint[] // Properties of a scanned wifi list item. +} +``` + +See also: + +[AccessPoint](#accesspoint) + +--- diff --git a/apis/pr-release-1-3-0/manage/changelog.md b/apis/pr-release-1-3-0/manage/changelog.md new file mode 100644 index 00000000..fc368285 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/changelog.md @@ -0,0 +1,123 @@ +--- +title: Change Log + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- +# 1.2.0 (https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + +# [1.1.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.0.0...v1.1.0) (2024-02-09) + +### Bug Fixes + + * Modified account:uid to SHOULD (#224 (https://github.com/rdkcentral/firebolt-apis/issues/224)) (70c8b24 (https://github.com/rdkcentral/firebolt-apis/commit/70c8b24decfcbff2c32fb1b0d21290afc00a8432)) + +### Features + + * HDMI Low Latency Mode (#156 (https://github.com/rdkcentral/firebolt-apis/issues/156)) (06d3624 (https://github.com/rdkcentral/firebolt-apis/commit/06d3624b69ee0529d4c1a1c78a15dbfdf54c8b16)) + +# [1.0.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.1...v1.0.0) (2023-11-03) + +Upgraded to 1.0 at part of RDK6 release. This API is still compatibile with 0.x versions. + +### Bug Fixes + + * Account.session params to be mandatory (#196 (https://github.com/rdkcentral/firebolt-apis/issues/196)) (fc5c638 (https://github.com/rdkcentral/firebolt-apis/commit/fc5c63886d9b4eb30b32c1edc75f0f6afe80a827)) + * CI looking for legacy 0.x version (923d02a (https://github.com/rdkcentral/firebolt-apis/commit/923d02ae96716a5272c5507e864f366012824642)) + * Permission schema with Capability as required (74d9de9 (https://github.com/rdkcentral/firebolt-apis/commit/74d9de9b125baffb415e11ba3888c1c464cf5b12)) + * Provider error (#202 (https://github.com/rdkcentral/firebolt-apis/issues/202)) (4666a5e (https://github.com/rdkcentral/firebolt-apis/commit/4666a5ee56846f14dd1ba79dab82891505b5a2ec)) + * schemas version upgraded to 2.0.0-next.1 (#199 (https://github.com/rdkcentral/firebolt-apis/issues/199)) (b0fb8cf (https://github.com/rdkcentral/firebolt-apis/commit/b0fb8cfbda6bbef055000dc9911f344ab9ee8771)) + * Update schemas & 1.0.0 version! (#200 (https://github.com/rdkcentral/firebolt-apis/issues/200)) (ea29f33 (https://github.com/rdkcentral/firebolt-apis/commit/ea29f3323a22ffa36904bdc6cf6e76a31fa8cb76)) + * Updated metrics:distributor capability to could (#185 (https://github.com/rdkcentral/firebolt-apis/issues/185)) (9ca2206 (https://github.com/rdkcentral/firebolt-apis/commit/9ca2206a2dca7149dcf93df3d303806d136785ed)) + +### Features + + * Added optional parameter 'force' in usergrants.request (#186 (https://github.com/rdkcentral/firebolt-apis/issues/186)) (31801ca (https://github.com/rdkcentral/firebolt-apis/commit/31801caec6bea0e8b295ea6a9ec54ca1d8e08d16)) + +# [0.17.1](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.0...v0.17.1) (2023-09-15) + +### Bug Fixes + +fix: Add enumerated values for fontFamily/fontEdge (#181) + +# [0.17.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.16.0...v0.17.0) (2023-09-07) + +### Bug Fixes + +* fix: Using 3 letter ISO639 language codes ([#173](https://github.com/rdkcentral/firebolt-apis/issues/173)) + +# [0.16.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.15.0...v0.16.0) (2023-08-14) + +### Features + +* Added Manage APIs for `windlowColor` and `windowOpacity` ([#157](https://github.com/rdkcentral/firebolt-apis/issues/157)) ([f508358](https://github.com/rdkcentral/firebolt-apis/commit/f508358aeb2f58bb3893bbfaf09e2340fcadac8f)) + +# [0.15.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0...v0.15.0) (2023-07-31) + +### Bug Fixes + +* Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +* window fix from firebolt-openrpc 2.0.3 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) + +### Features + +* **Nullable CC Styles** Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* **Window CC Styles** Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) +* **Audio Descriptions** Audio Description and Preferred Audio Languages Settings ([#45](https://github.com/rdkcentral/firebolt-apis/issues/45)) ([58f6ea1](https://github.com/rdkcentral/firebolt-apis/commit/58f6ea1dde7a819883eb3da24f879b6a9ecc9a41)) + +# [0.14.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.13.0...v0.14.0) (2023-06-22) + +### Bug Fixes + +* **Advertising:** put resetAdvertisingIdentifier back in manage sdk ([ce92ae7](https://github.com/rdkcentral/firebolt-apis/commit/ce92ae7bfff58fa1d3e4bee78c88d5edf0266473)) +* * **VoiceGuidance** Change voice guidance limits to 0.5 and 2 ([#137](https://github.com/rdkcentral/firebolt-apis/issues/137)) ([b8f1944](https://github.com/rdkcentral/firebolt-apis/commit/b8f19449efd808639599b162aba61c08ec089c41)) + +### Features + +* **Discovery** Add an event when apps call signIn or signOut ([#133](https://github.com/rdkcentral/firebolt-apis/issues/133)) ([8ba2515](https://github.com/rdkcentral/firebolt-apis/commit/8ba2515948c433ccc38662f223f5fb399cf34841)) + +# [0.13.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.12.0...v0.13.0) (2023-06-09) + +### Bug Fixes + +* Grant providers should allow null responses for deferred challenges ([#128](https://github.com/rdkcentral/firebolt-apis/issues/128)) ([0ddd11a](https://github.com/rdkcentral/firebolt-apis/commit/0ddd11af282aed85112fb739993ae58cfc1c4910)) +* Point to `firebolt-openrpc` 2.0.1 ([c57cb21](https://github.com/rdkcentral/firebolt-apis/commit/c57cb218343fd058e2e6e676d52d9d0c904ad9a8)) +* Added Changelog note about accessory removal ([02e81c0](https://github.com/rdkcentral/firebolt-apis/commit/02e81c0f0233862e2d2386989943a840eddc5b6a)) + +### Features + +* Add SecureStorage.setForApp, removeForApp, .clearForApp methods. ([#127](https://github.com/rdkcentral/firebolt-apis/issues/127)) ([4422c79](https://github.com/rdkcentral/firebolt-apis/commit/4422c79122fc35e7b35180254be52bf33c64ab5b)) + +# [0.12.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.11.0...v0.12.0) (2023-05-18) + +### Bug Fixes + +* Updated `Advertising.resetIdentifier` capability ([47e730c](https://github.com/rdkcentral/firebolt-core-sdk/commit/47e730c4572ca2b8b9fdc3b2062121ef802914aa)) +* Removed `Accessory` module, which was not finished or ready for release ([6bcbb3f](https://github.com/rdkcentral/firebolt-apis/commit/6bcbb3fa347cb412e0d973beb6ecff7fe966607a)) + +### Features + +* Add the `Advertising.skipRestriction` API and included in Manage SDK ([#122](https://github.com/rdkcentral/firebolt-core-sdk/issues/122)) ([da9d75f](https://github.com/rdkcentral/firebolt-core-sdk/commit/da9d75f8c29bf04674e3de692874888796665a9a)) + + +# [0.11.0](https://github.com/rdkcentral/firebolt-core-sdk/compare/v0.10.0...v0.11.0) (2023-05-01) + +This is the first release of the Firebolt Manage SDK, which is used by first party, or trusted, apps to manage a Firebolt device. + +### Features + +* Accessory module +* Account module +* AcknowledgeChallenge module +* Advertising module +* ClosedCaptions module +* Device module +* Keyboard module +* Localization module +* Metrics module +* PinChallenge module +* Privacy module +* UserGrants module +* VoiceGuidance module +* Wifi module diff --git a/apis/pr-release-1-3-0/manage/index.md b/apis/pr-release-1-3-0/manage/index.md new file mode 100644 index 00000000..5c13df35 --- /dev/null +++ b/apis/pr-release-1-3-0/manage/index.md @@ -0,0 +1,30 @@ +--- +title: Firebolt Manage SDK + +version: pr-release-1-3-0 +layout: default +sdk: manage +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt Manage SDK +For building Firebolt compliant apps that manage Firebolt devices. + +## Usage +To install, run: + +``` +npm install @firebolt-js/manage-sdk +``` + +To use the package, import one of it's modules, e.g.: + +```js +import { Privacy } from '@firebolt-js/manage-sdk' +``` + +## Contributing +The Firebolt SDKs are built using the Firebolt OpenRPC toolset: + +See [Firebolt OpenRPC](https://www.github.com/rdkcentral/firebolt-openrpc/), for more info. diff --git a/requirements/pr-release-1-3-0/glossary/index.md b/requirements/pr-release-1-3-0/glossary/index.md new file mode 100644 index 00000000..d78bb539 --- /dev/null +++ b/requirements/pr-release-1-3-0/glossary/index.md @@ -0,0 +1,84 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Glossary +category: requirements +--- +# Glossary + +Document Status: Working Draft + +| Contributor | Organization | +| -------------- | -------------- | +| Jeremy LaCivita | Comcast | + +## 1. Overview +This document describes various terms used as part of Firebolt APIs, e.g. method names or parameters, and how they are used by Firebolt, for consistency. + +The terms are this document are commonly used across multiple modules. However, new APIs should be deferential to all existing APIs, not just words listed here. + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Firebolt Terms](#3-firebolt-terms) + - [3.1. app](#31-app) + - [3.2. available](#32-available) + - [3.3. availability](#33-availability) + - [3.4. capability](#34-capability) + - [3.5. closed captions](#35-closed-captions) + - [3.6. content](#36-content) + - [3.7. entitlement](#37-entitlement) + - [3.8. granted](#38-granted) + - [3.9. lifecycle](#39-lifecycle) + - [3.10. media](#310-media) + - [3.11. permitted](#311-permitted) + - [3.12. policy](#312-policy) + - [3.13. user grant](#313-user-grant) + - [3.14. supported](#314-supported) + +## 3. Firebolt Terms + +### 3.1. app +noun. - A Firebolt app. Any component that calls [Firebolt APIs](https://github.com/rdkcentral/firebolt-apis), either directly, or by running inside of a container that calls Firebolt APIs, is a Firebolt app. + +### 3.2. available +adj. - Used in the context of a [capability](#34-capability) to denote that the capability *could* be leveraged now if it is [permitted](#311-permitted) and either [granted](#38-granted) or is not gated by a [user grant](#313-user-grant). Available capabilities are, by definition, [supported](#314-supported). + +### 3.3. availability +noun. - Used in the context of [content](#36-content) to denote that the content *could* be consumed if either the device has an [entitlement](#37-entitlement) to the content, or the content does not require any entitlement. + +### 3.4. capability +noun. - A discrete unit of functionality that a Firebolt device might be able to perform. It is granular enough to enable appropriate access controls across all Firebolt Apps, but useful enough to be a meaningful functional unit that an App might care about. + +### 3.5. closed captions +noun. - Closed Captions are text tracks rendered over or near [content](#36-content) with the intention of making the audio track of the content more accessible, for example to deaf or hard-of-hearing individuals. + +### 3.6. content +noun. - Content consumed on Firebolt platforms, e.g. video, games, music, etc. + +### 3.7. entitlement +noun. - Used in the context of [content](#36-content) to denote that the device or user has acquired the *right* to consume the content. Content may also have [availability](#33-availability) requirements for consumption, e.g. a user may have pre-orded a piece of content, and therefor have an entitlement to it, that becomes available in the future. + +### 3.8. granted +adj. - Used in the context of a [capability](#34-capability) to denote that the capability has been granted to an app by the user. Capabilities that are gated by [user grant](#313-user-grant) cannot be leveraged by any app w/out being granted. + +### 3.9. lifecycle +noun. - Used to describe the life, from being loaded to unloaded, of a Firebolt [app](#31-app). The app lifecycle has many states that inform the app how it is being percieved and how it should behave. + +### 3.10. media +noun. - [Content](#36-content) that that plays back over time without requiring interaction from the user, e.g. video or music. Media must have a start-time, or a duration, or both. + +### 3.11. permitted +adj. - Used in the context of a [capability](#34-capability) to denote that the capability has been permitted to an app by the distributor of the device. + +### 3.12. policy +noun. - A group of user, device, and/or distributor settings that affect a particular domain, e.g. Advertising. + +### 3.13. user grant +noun. - A secure process in which a user of a device grants an app on the device access to a capability. + +### 3.14. supported +adj. - Used in the context of a [capability](#34-capability) to denote that the capability *could* be leveraged at some point on this device, because the distributor offers it as part of this device's feature set. Leveraging a capability also requires that it is [available](#32-available), [permitted](#311-permitted), and either [granted](#38-granted) or is not gated by a [user grant](#313-user-grant). diff --git a/requirements/pr-release-1-3-0/governance/index.md b/requirements/pr-release-1-3-0/governance/index.md new file mode 100644 index 00000000..cc6902b1 --- /dev/null +++ b/requirements/pr-release-1-3-0/governance/index.md @@ -0,0 +1,232 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Requirements Governance +category: requirements +--- +# Requirements Governance +This document outlines the governance model for the Firebolt® Open-Source Project, including the structure of an Advisory Board and Working Groups, as well as the process used to codify Requirements Specifications and Architectural Decision Records. + +## 1. Overview +The Firebolt Open-Source Project is governed by an Advisory Board that creates and delegates work to Working Groups, which then create proposals for Requirements Specifications and Architectural Decision Records. + +![Governance Structure](../images/governance/structure.png) + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Goals](#3-goals) +- [4. Governance](#4-governance) + - [4.1. Scope](#41-scope) + - [4.2. Firebolt Version](#42-firebolt-version) + - [4.3. Advisory Board](#43-advisory-board) + - [4.4. Advisory Board Members](#44-advisory-board-members) + - [4.5. Working Group](#45-working-group) + - [4.6. Requirements Specification](#46-requirements-specification) + - [4.7. Architectural Decision Record](#47-architectural-decision-record) + - [4.8. Approval Stages](#48-approval-stages) + - [4.8.1. Draft](#481-draft) + - [4.8.2. Working Draft](#482-working-draft) + - [4.8.3. Candidate Specification](#483-candidate-specification) + - [4.8.4. Candidate Specification Draft](#484-candidate-specification-draft) + - [4.8.5. Proposed Specification](#485-proposed-specification) + - [4.8.6. Specification](#486-specification) + - [4.9. Requirements Repository](#49-requirements-repository) + - [4.10. Requirements Repository Branching](#410-requirements-repository-branching) + - [4.11. Sanctioned Forks](#411-sanctioned-forks) + - [4.12. Release Versions](#412-release-versions) + +## 3. Goals +The goal of the Firebolt Open-Source Project is to provide a Distributor-configurable set of integration APIs and functional requirements for those APIs so that Apps can integrate with the APIs once and run their app on every Firebolt platform (regardless of distributor) consistently. + +Specifically, Firebolt provides: + + - Write Apps once, run on all Firebolt distributors + - Discovery and launching of Apps + - Detection of, and access control for, Firebolt APIs and features + - Discovery of app content and metrics once discovered + - Platform integration APIs, (e.g. captions, media info, etc.) + - Device and account management + - Integration APIs for broader eco-system integrations +(e.g. user experience, advertising, voice, etc.) + +While enabling Distributors to: + + - Provide differentiating Discovery and Settings experiences + - Configure Firebolt features to meet their business needs + - Configure Firebolt user privacy & opt-in settings + - Decide which set of optional Firebolt features to support + - Negotiate access to features and APIs with each app + +## 4. Governance +The Firebolt Open-Source Project is governed by an Advisory Board. The purpose of the Advisory Board is to ensure that each major, minor, and patch version of the Firebolt Requirements is aligned with the goals of the Firebolt Open-Source Project. + +The Firebolt Requirements are the collection of all Requirements Specifications and all Architectural Decision Records that are ratified by the Advisory Board (and contained in this repository). + +### 4.1. Scope +This document describes the governance model for the following components: + + - Firebolt RPC APIs & SDKs + - Firebolt Media Pipeline (aka Rialto) + - Firebolt API Reference Implementation (Ripple) + +### 4.2. Firebolt Version +A Firebolt Version is a snapshot of the Firebolt Requirements that has been ratified as an official release of the requirements. Note that the requirements are decoupled from any implementation of those requirements, and iterations to the requirements will occur with input from any teams implementing them. + +Firebolt Versions **MUST** follow Semantic Versioning. + +### 4.3. Advisory Board +The Advisory Board oversees all aspects of Firebolt Requirements Governance. + +Advisory Board decisions should aim to be unanimous whenever possible, but in cases of deadlock, may be decided by simple majority. + +The Advisory Board is responsible for: + + - Prioritization of Working Groups needed + - Creation of balanced Working Groups with relevant subject matter experts + - Solicitation of peer review by SMEs that are not from the working group + - Ratification of requirements into the official Firebolt Requirements + - Determination of when to tag a new minor version release of the Firebolt Requirements + - Determination of when to tag a new major version release of the Firebolt Requirements + - Determination of when a sanctioned fork is warranted + +### 4.4. Advisory Board Members +The Firebolt Advisory Board is currently being formed and will be published soon. + +Contact the `rdkcentral/firebolt-apis` maintainer, [Jeremy LaCivita](https://github.com/jlacivita), to submit proposals to the Advisory Board. + +### 4.5. Working Group +Working Groups build consensus on requirements for Firebolt features or architectural solutions. They should ideally be three to five individuals spanning technical and product experts. Further recommendations on working group composition are left to the Advisory Board. + +As new features are prioritized, Working Groups should be formed to gather and document requirements for those features. Working groups may be self-forming or selected by the Advisory Board, but all working groups must have their membership reviewed and approved by the board to ensure that they are well balanced. + +The Advisory Board **MAY** appoint a Working Group Chair or instruct the Working Group to select a chair amongst themselves. + +The Working Group Chair is responsible for driving consensus and reporting back to the Advisory Board + +### 4.6. Requirements Specification +A Requirements Specification includes all details necessary for multiple, disassociated teams to build a consistent implementation of a feature, including API signatures, validation, and functionality, as well as functional and behavioral requirements of the feature that are not directly exposed by an API. + +Requirements and APIs may be targeted towards traditional 3rd party apps, as well as more foundational 1st party apps. + +The level of detail in an acceptable Requirements Specification should be such that any App should run consistently on any implementation of the feature that is based on the Specification. + +Requirements Specifications are written using the [IETF Best Common Practice 14](https://www.rfc-editor.org/rfc/rfc2119.txt) and should include the following at the end of the Overview: + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +Requirements Specification move through several [stages](#48-approval-stages) from being a draft, to being an official versioned requirements specification. + +### 4.7. Architectural Decision Record +An Architectural Decision Record includes all details necessary to ensure that Firebolt Requirements are fulfilled with an architecturally sound design. This is often used in cases where listing out explicit requirements, e.g. performance or operational requirements, is not possible or realistic, e.g. Requiring use of a well-known open source component to fulfill some aspect of the platform, or requiring adherence to a high level modular breakdown of concerns to keep platform maintenance manageable. + +Since ADRs included in the Firebolt Requirements **MUST** be adhered to, not every architectural decision made in order to fulfill the Firebolt Requirements needs to have a formal ADR in the Firebolt Requirements repository. It is up to the Advisory Board which ADRs warrent a formal inclusion in the Firebolt Requirements. + +ADRs move through the same [stages](#48-approval-stages) as Requirements Specifications. + +### 4.8. Approval Stages +Requirements specifications and ADRs are written by working groups and go through several stages of approval before becoming official requirements documents. + +![Approval Track](../images/governance/approval-track.png) + +#### 4.8.1. Draft +This is any first draft of a requirements specification submitted by an individual or individuals to a Working Group. + +Artifacts: + + - A markdown document, ready to be presented to the Working Group + +Note that a Draft **MUST** not be committed to any public location, e.g. the Requirements Repository, because it has not yet been reviewed by the Working Group and could mistakenly contain sensative, private information related to a specific Firebolt distributor. + +#### 4.8.2. Working Draft +A version of the requirements specification that is approved by the Working Group for feedback and review by individuals not on the Working Group. Individuals are selected for review at the discretion of the Working Group. Working drafts may or may not satisfy all requirements of the feature and should not be used for derivative works. + +Artifacts: + + - Markdown specification in a named feature branch of the Requirements Repository + - Working Group members identified + - Working Group progress is being tracked via GitHub project in the Requirements Repository + +#### 4.8.3. Candidate Specification +A version of the requirements specification that is approved by the Working Group for proof-of-concept implementations and peer-review by the larger Community. Candidate Specifications have been through significant review by the Working Group and are ready for feedback from the larger community. + +Once this is published to the peer group for review, they’ll have two weeks to add their comments, make amendments requests, etc. + +Artifacts: + + - Markdown specification in a named feature branch of the Requirements Repository + - Domain experts for peer-review identified and notified + - Repeat process for any C.S. Drafts that are formalized into the C.S. (see below) + - JSON-Schema API changes outlined by the document are in the OpenRPC schemas + +#### 4.8.4. Candidate Specification Draft +A fork of the current Candidate Specification that has changes requested, but not yet approved, by the Working Group. + +Artifacts: + + - A Pull Request into the feature branch containing in-progress changes + - Previous Candidate Specification does not include changes until approved by W.G. + +#### 4.8.5. Proposed Specification +A version of the requirements specification that is considered, by the Working Group, to be the final Candidate Specification, and has been submitted to the Advisory Board for final approval. This version may be used for experimental implementations and final peer-review by the larger community. + +Artifacts: + + - Markdown specification merged into the #proposed branch of the Requirements Repository + - A Pull Request into the #next branch of Requirements Repository + - JSON-Schema API changes outlined by the document are in the OpenRPC schemas + - Unit tests for any API changes + +#### 4.8.6. Specification +An official versioned stage of the requirements specification that is done and will not change until a future version is created. This version may be used for official production implementations. + +Artifacts: + + - Markdown specification merged into the #main branch of the Requirements Repository + - Spec Review notes and green light from implementation teams of all member organizations with a vested interest in the specification + - Status tracking link for any Open Source implementations of the spec, if appropriate + +### 4.9. Requirements Repository +A public GitHub repository used to manage the progress of a requirements specification. Requirements Specification **MUST** live in their own repository, and not along side of the code that is implementing them. + +The Requirements Repository **MUST** be located at: + +[https://github.com/rdkcentral/firebolt-apis](https://github.com/rdkcentral/firebolt-apis) + +### 4.10. Requirements Repository Branching +The Requirements Repository **MUST** have the following branches: + +| Branch | Purpose | +| ------ | ------- | +| main | For officially approved specifications that have been released under a version. | +| next | For all approved specifications, even those that have not been released under a version. | +| proposed | An experimental branch containing all proposed specifications. | + +Working Drafts and Candidate Specification Drafts **MUST** be housed in a named feature branch in the Requirements Repository (see below). + +Branches are merged based on the approval process: + +![Branching](../images/governance/branching.png) + +### 4.11. Sanctioned Forks +From time to time an organization with access to the Requirements Repository may want to spearhead a new feature without going through the formal approval process. + +In this case the member may submit a request to the Approval Board for a sanctioned fork inside the Requirements Repository, so that research and development can be done on the feature. + +The Approval Board **MAY** grant or deny the request for a sanctioned fork. + +After the R&D is complete, the forking organization **MUST** submit the resulting requirements to the formal process and work to have them approved. + +The organization requesting the fork **MUST** be willing to migrate to the approved APIs, which may be different than the API in the fork. + +The Advisory Board, and selected Working Group, **SHOULD** be willing to avoid unnecessary changes to make migration as easy as possible, without sacrificing the integrity of the Firebolt Open-Source Project’s goals. + +### 4.12. Release Versions +The Advisory Board has ownership of when to do major, minor, and patch releases of the Firebolt Requirements. + +Releases **MUST** follow Semantic Versioning. + +Approved changes are all housed in the next branch until the Advisory Board decides that the next branch warrants an officially released version of the requirements. + +If a feature that requires a major version increment, i.e. a breaking change, is proposed, the Advisory Board may decide to keep it unapproved so that any features requiring a minor version change can be pushed through the process. Management of this is the responsibility of the Advisory Board. diff --git a/requirements/pr-release-1-3-0/images/governance/approval-track.png b/requirements/pr-release-1-3-0/images/governance/approval-track.png new file mode 100644 index 00000000..69695478 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/governance/approval-track.png differ diff --git a/requirements/pr-release-1-3-0/images/governance/branching.png b/requirements/pr-release-1-3-0/images/governance/branching.png new file mode 100644 index 00000000..a61b1190 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/governance/branching.png differ diff --git a/requirements/pr-release-1-3-0/images/governance/structure.png b/requirements/pr-release-1-3-0/images/governance/structure.png new file mode 100644 index 00000000..32bb2763 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/governance/structure.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image1.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image1.png new file mode 100644 index 00000000..049fc70b Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image1.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image2.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image2.png new file mode 100644 index 00000000..7c0c10f7 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image2.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image4.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image4.png new file mode 100644 index 00000000..641c2684 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/image4.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image1.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image1.png new file mode 100644 index 00000000..c836daeb Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image1.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image2.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image2.png new file mode 100644 index 00000000..bc0c978e Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image2.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image3.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image3.png new file mode 100644 index 00000000..96d73b0a Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image3.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image4.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image4.png new file mode 100644 index 00000000..0c9246bc Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image4.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image5.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image5.png new file mode 100644 index 00000000..26c583d2 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image5.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image6.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image6.png new file mode 100644 index 00000000..4761e5ea Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image6.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image7.png b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image7.png new file mode 100644 index 00000000..0b09b1b7 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/general/capabilities/user-grants/image7.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image1.png b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image1.png new file mode 100644 index 00000000..b0171a9a Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image1.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image2.png b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image2.png new file mode 100644 index 00000000..94102a60 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image2.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image3.png b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image3.png new file mode 100644 index 00000000..c7ddb640 Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image3.png differ diff --git a/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image4.png b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image4.png new file mode 100644 index 00000000..6a15fe0c Binary files /dev/null and b/requirements/pr-release-1-3-0/images/specifications/intents/user-interest/media/image4.png differ diff --git a/requirements/pr-release-1-3-0/specifications/discovery/user-interest/index.md b/requirements/pr-release-1-3-0/specifications/discovery/user-interest/index.md new file mode 100644 index 00000000..11975c51 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/discovery/user-interest/index.md @@ -0,0 +1,369 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: User Interest +category: requirements +type: specification +--- +# User Interest + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Eugene Chung | Comcast | +| Tim Dibben | Sky | +| Mike Horwitz | Comcast | +| Jeremy LaCivita | Comcast | + +## 1. Overview + +In additional to traditional discovery APIs such as Watch History and +Watch Next, Firebolt provides a more abstract API that facilitates +impromptu content discovery connections between first-party Aggregated +Experiences and third-party Apps. + +The User Interest Capability enables Apps to provide meta-data on +content that the user has expressed an interest in to Aggregated +Experience Apps that have been given access to use this Capability. + +This allows for open ended design of Aggregated Experience App features +that present App-specific content to re-engage the user with the content +inside the originating App. + +While the functionality and UX is left to the Aggregated Experience App, +typically designed by each Firebolt Distributor, the Firebolt API +enables events to register user interest and pass entity meta-data: + +![Diagram Description automatically +generated](../../../../requirements/images/specifications/intents/user-interest/media/image1.png) + +Which generally enables Aggregated Experiences to present that entity +meta-data in some way that leads to re-launching the original App at a +later point, using a `navigateTo` notification: + +![Diagram Description automatically +generated](../../../../requirements/images/specifications/intents/user-interest/media/image2.png) + +This is just one example of what an Aggregated Experience App might do +with the User Interest API. + +Note that this API **SHOULD NOT** be used to implement Watch History or +Watch Next features. These concepts are much more fundamental to +Firebolt and have explicit APIs so that Firebolt Distributors can keep +track of which apps are using them separately. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. User Interest Flows](#3-user-interest-flows) + - [3.1. User Interest from an in-app UX](#31-user-interest-from-an-in-app-ux) + - [3.2. User Interest from a platform UX](#32-user-interest-from-a-platform-ux) + - [User Interest Errors](#user-interest-errors) + - [3.3. Upstream User Interest Intent](#33-upstream-user-interest-intent) + - [3.4. User Interest Bulk Updates](#34-user-interest-bulk-updates) +- [4. Core SDK APIs](#4-core-sdk-apis) + - [4.1. InterestType](#41-interesttype) + - [4.2. InterestReason](#42-interestreason) + - [4.3. Discovery.userInterest](#43-discoveryuserinterest) + - [4.4. Discovery Interest Provider](#44-discovery-interest-provider) + - [4.5. InterestIntent](#45-interestintent) +- [5. Discovery SDK APIs](#5-discovery-sdk-apis) + - [5.1. Interest Types](#51-interest-types) + - [5.2. Content.requestUserInterest](#52-contentrequestuserinterest) + - [5.3. Content.onUserInterest](#53-contentonuserinterest) + + +## 3. User Interest Flows +### 3.1. User Interest from an in-app UX + +Some Apps will have a built-in user interface for users to express +interest in content from the App. This could be a "Favorite" button, +an in-app "My List" button, etc. + +If the App wants to leverage any additional exposure from the device's +Aggregated Experience, it can wire up its own UI to the Firebolt User +Interest API, in addition to any in-app features that it's already +invoking. + +By calling the `Discovery.userInterest` method with the relevant entity +meta-data, the device's Aggregated Experience will be notified of the +user's interest in that entity: + +```typescript +Discovery.userInterest(type: InterestType, reason: InterestReason, entity: EntityDetails) +``` + +The `type` parameter denotes the directionality of the interest: + +- `interest` +- `disinterest` + +The `reason` parameter denotes why or how the user has expressed interest: + +| Reason | Description | +| ------ | ----------- | +| `playlist` | Interested in adding to a list | +| `reaction` | Interested in submitting a reaction, e.g. like or dislike | +| `recording` | Interest in scheduling a recording | +| `share` | Interest in sharing the content on social media | + +**NOTE**: We can remove some of these (not `playlist`) these are here for now to illustrate the purpose for the reason paramater. + +An app **MUST** `provide` the `xrn:firebolt:capability:discovery:interest` +capability in order to call `Discovery.userInterest`. + +When this method is called with a valid `EntityDetails`, the platform +**MUST** dispatch a `Content.onUserInterest` notification to all Apps +that have registered for it (typically Aggregated Experience Apps) with +information about the app, interest type, and the entity. + +The `Content.onUserInterest` event has a result type of `Interest`: + +| property | type | description | +|---------|------|-------------| +| appId | string | The id of the app that pushed the user interest. | +| type | `InterestType` | the type of interest. | +| reason | `InterestReason` | the reason for the interest | +| entity | `EntityDetails` | The entity the user expressed interest in. | + +An Aggregated Experience can register for the `Content.onUserInterest` +notification, and it will receive notifications when an `EntityDetails` is +returned from the active App after a `Discovery.userInterest` call is +fulfilled. + +An app **MUST** have permissions to `use` the +`xrn:firebolt:capability:discovery:interest` capability in order to +listen to the `Content.onUserInterest` notification. + +If the result is not a valid entity, i.e. does not match +the [EntityDetails](../../entities/) schema, then no `Content.onUserInterest` +notification will be dispatched. + +The `Discovery.userInterest` method **SHOULD NOT** be used in place of more +specific Discovery methods, e.g. `Discovery.watchNext` or +`Discovery.watched`. These methods facilitate specific UX flows that may +have separate legal opt-outs for each user. + +The `Discovery.userInterest` method **SHOULD NOT** be called unless the user +is activating a UI element in the app, or in a second screen experience +that is communicating with the app, that implies interest of some kind. + +### 3.2. User Interest from a platform UX + +Firebolt platforms may provide a platform UX, e.g. voice or and RCU, to +express user interest in content from an active App. To facilitate this +Apps will need to be told about the user's expressed interest in their +content. + +First, the Aggregated Experience (or some app with this +capability) detects that the user is interested in something. In this +picture the interest is triggered by an RCU button, but how this occurs +is outside the scope of this document. When this happens, the Aggregated +Experience app calls `Content.requestUserInterest()`, which will trigger the +platform to identify the best [Provider Candidate](../../openrpc-extensions/app-passthrough-apis#5-provider-candidates) +and call that app's `userInterest` method via the Provider RPC method: +`Discovery.onRequestUserInterest`. + +![](../../../../requirements/images/specifications/intents/user-interest/media/image3.png) + +Next, the provider app receives and responds to the request with an +EntityDetails, which is returned as the result to the pending +`Content.requestUserInterest` method: + +![](../../../../requirements/images/specifications/intents/user-interest/media/image4.png) + +Once an App's callback is invoked, that app will have `interestTimeout` +milliseconds to return a value or throw an error. Values returned after +that time **MUST** be ignored. The timeout value is stored in the +device's configuration manifest. + +To be notified when a user expresses interest in the currently displayed +content, an App **MUST** provide the +`xrn:firebolt:capability:discovery:interest` capability by enabling the +`Discovery.onRequestUserInterest` notification. + +If there is a valid entity to return, then the method registered by the +App **MUST** return the currently displayed entity meta-data. + +If there is no valid entity to return, then the method **MUST** throw an +exception. + +If the provider app returns a valid `EntityDetails` before the timeout, +then, the returned value **MUST** be used. + +If there is no app registered the an error **MUST** be returned. + +#### User Interest Errors +An app is expected return either a valid result or an appriate error. + +If neither happens before `interestTimeout` expires then the platform **MUST** return a Provider timed-out error: + +```json +{ + "id": 1, + "error": { + "code": -50400, + "message": "Provider timed-out", + "data": { + "capability": "xrn:firebolt:capability:discovery:interest", + } + } +} +``` + +If an app recieves a request for user interest when there is nothing appropriate to return, e.g. nothing selected or presented that maps to an Entity, then the app **SHOULD** return an error with a valid JSON-RPC error response, e.g.: + +```json +{ + "id": 1, + "error": { + "code": -40400, + "message": "No entities currently presented." + } +} +``` + +The platform API Gateway **MUST** append, or overwrite, the `data.capability` value to any errors returned by the app, e.g.: + +```json +{ + "id": 1, + "error": { + "code": -40400, + "message": "No entities currently presented.", + "data": { + "capability": "xrn:firebolt:capability:discovery:interest", + } + } +} +``` + +### 3.3. Upstream User Interest Intent +In some cases, e.g. a voice assistant, some upstream component will inform +the platform that the user is interested in whatever is currently being presented. + +To do this, the upstream system **MUST** send a `Interest` intent, which describes the type of and reason for the interest. + +```json +{ + "action": "interest", + "data": { + "type": "interest", + "reason": "playlist" + } +} +``` + +When a Firebolt platform receives this intent, it **SHOULD** initiate the platform's [user interest flow](#4-user-interest-from-a-platform-ux). + +### 3.4. User Interest Bulk Updates + +Sending bulk interest updates, e.g. Entities the user expressed interest +in on a different platform, is not supported. + +## 4. Core SDK APIs + +The following APIs are exposed by the Firebolt Core SDK as part of the +`Discovery` module. + +### 4.1. InterestType +This is an enum with the following values: + +- `"interest"` +- `"disinterest"` + +### 4.2. InterestReason +This is an enum with the following values: + +| Reason | Description | +| ------ | ----------- | +| `playlist` | Interested in adding to a list | +| `reaction` | Interested in submitting a reaction, e.g. like or dislike | +| `recording` | Interest in scheduling a recording | +| `share` | Interest in sharing the content on social media | + +### 4.3. Discovery.userInterest + +This is a push API that allows Apps to push entities that the user has +expressed interest in to the platform. + +To push an entity that the user is interested in pass an `EntityDetails` +object to the method: + +```typescript +Discovery.userInterest(type: InterestType, reason: InterestReason, entity: EntityDetails): Promise +``` + +### 4.4. Discovery Interest Provider +To respond to requests for the current entity, because the user has +expressed interest in some way that the platform manages, register a +provider: + +```typescript +interface IDiscoveryInterestProvider { + function userInterest(type: InterestType, reason: InterestReason): Promise +} + +Discovery.provide("xrn:firbolt:capability:discovery:interest", IDiscoveryInterestProvider) +``` + +### 4.5. InterestIntent + +An `InterestIntent` denotes that the user has expressed interest in the +currently displayed and/or selected content: + +```typescript +type InterestIntent { + action: "interest" + data: { + type: "interest" | "disinterest", + reason: "playlist" | "reaction" | "recording" + }, + context: { + source: "rcu" | "voice" + } +} +``` + +## 5. Discovery SDK APIs + +The following APIs are exposed by the Firebolt Discovery SDK as part of the +`Content` module. + +### 5.1. Interest Types +This type stores the various attributes of an Interest response or event: + +```typescript +type InterestType = "interest" | "disinterest" +type InterestReason = "playlist" | "reaction" | "recording" | "share" + +type Interest { + appId: string + entity: EntityDetails + type?: InterestType + reason?: InterestReason +} +``` + +### 5.2. Content.requestUserInterest +This method triggers the corresponding Discovery provider API for the +provider app. + +```typescript +Content.requestUserInterest(type: InterestType, reason: InterestReason): Promise +``` + +### 5.3. Content.onUserInterest + +This notification allows Aggregated Experience Apps to be informed when +a user expresses interest in some Content, and the content resolves to a +valid Entity from some App. + +`Content.listen('userInterest', Interest => void): Promise` + +The callback will be passed an `Interest` object with +the appId, type, reason, and information about the entity that the user expressed interest in. diff --git a/requirements/pr-release-1-3-0/specifications/entities/channels/index.md b/requirements/pr-release-1-3-0/specifications/entities/channels/index.md new file mode 100644 index 00000000..b55331a0 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/entities/channels/index.md @@ -0,0 +1,65 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Channel Entities +category: requirements +type: specification +--- +# Channel Entities + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| --------------- | ------------ | +| Jeremy LaCivita | Comcast | + +## 1. Overview +TBD... + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL +NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT +RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be +interpreted as described in [BCP +14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and +only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Channel Entities](#3-channel-entities) + + +## 3. Channel Entities +Every Channel Entity **MUST** be an [Entity](../index#3-entities). + +Every Channel Entity **MUST** have a `const` property named `entityType`, which +**MUST** have the value `"channel"`. + +Every Channel Entity **MUST** have a `string` property named `channelType`, +whose value **MUST** be one of: + + - `"streaming"` + - `"broadcast"` + +An example Channel Entity: + +```json +{ + "entityType": "channel", + "channelType": "streaming", + "entityId": "streaming/xyz" +} +``` + +Another example Channel Entity: + +```json +{ + "entityType": "channel", + "channelType": "broadcast", + "entityId": "broadcast/xyz" +} +``` diff --git a/requirements/pr-release-1-3-0/specifications/entities/index.md b/requirements/pr-release-1-3-0/specifications/entities/index.md new file mode 100644 index 00000000..f0cf71d9 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/entities/index.md @@ -0,0 +1,94 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Firebolt Entities +category: requirements +type: specification +--- +# Firebolt Entities + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../governance) for more info. + +## 1. Overview +Entities are object which identify a piece of content that an end-user may +consume within an app. + +Firebolt uses Entities or Entity Ids as parameters and/or results of +content-centric Firebolt APIs that an App may interact with. + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL +NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT +RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be +interpreted as described in [BCP +14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and +only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Entities](#3-entities) +- [4. Playlist Entities](#4-playlist-entities) +- [5. Entity Specifications](#5-entity-specifications) + +## 3. Entities +Every Entity **MUST** be of type `object`. + +Every Entity object **MUST** have a `string` property named `entityId`, which +identifies the entity. The scope of entity identifiers **SHOULD** be defined by +the app providing or receiving the Entity, so that the App may work across +Firebolt distrubutions without mapping IDs from a distributor space to the +App's space. + +Every Entity object **MAY** have a `string` property named `assetId`, which +disambiguates the asset from the entity, if needed. The scope of asset +identifiers **SHOULD** be defined by the app providing or receiving the Entity, +so that the App may work across Firebolt distrubutions without mapping IDs from +a distributor space to the App's space. + +Every Entity object **MAY** have a `string` property named `appContentData`, +limited to 256 characters, which provides additional information useful for +targeting that Entity, e.g. a deeplink path. + +An example Entity: + +```json +{ + "entityId": "entity/abc" +} +``` + +Another example Entity: + +```json +{ + "entityId": "entity/abc", + "assetId": "asset/123", + "appContentData": "xyz" +} +``` + +Firebolt platforms **MUST NOT** infer anything from the values of these fields, +although back-office systems operated by Firebolt distributors may. + +## 4. Playlist Entities +A playlist is a type of entity that points to a list of other entities. + +Since entity IDs are in the target app's scope, it is up to each app to know +what to do with the contents of a given playlist. + + +```json +{ + "entityType": "playlist", + "entityId": "playlist/xyz" +} +``` + +## 5. Entity Specifications + +- [Program Entities](./programs) +- [Channel Entities](./channels) +- [Music Entities](./music) \ No newline at end of file diff --git a/requirements/pr-release-1-3-0/specifications/entities/music/index.md b/requirements/pr-release-1-3-0/specifications/entities/music/index.md new file mode 100644 index 00000000..18a12b8e --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/entities/music/index.md @@ -0,0 +1,82 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Music Entities +category: requirements +type: specification +--- +# Music Entities + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| --------------- | ------------ | +| Jeremy LaCivita | Comcast | +| Liz Sheffield | Comcast | + +## 1. Overview +TBD... + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL +NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT +RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be +interpreted as described in [BCP +14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and +only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Music Entities](#3-music-entities) + - [3.1. Optional Music Entity Properties](#31-optional-music-entity-properties) + + +## 3. Music Entities +Every Music Entity **MUST** be an [Entity](../index#3-entities). + +Every Music Entity **MUST** have a `const` property named `entityType`, which +**MUST** have the value `"music"`. + +Every Music Entity **MUST** have a `string` property named `musicType`, whose +value **MUST** be one of: + + - `"song"` + - `"album"` + +An example Music Entity: + +```json +{ + "entityType": "music", + "musicType": "song", + "entityId": "song/xyz" +} +``` + +Another example Music Entity: + +```json +{ + "entityType": "music", + "musicType": "album", + "entityId": "album/xyz" +} +``` + +### 3.1. Optional Music Entity Properties +A Music Entity **MAY** have a `string` property named `albumId` if its +musicType is `song`, otherwise the entity **MUST NOT** have this property. + +An example Music Entity: + +```json +{ + "entityType": "music", + "musicType": "song", + "entityId": "song/xyz", + "albumId": "album/xyz" +} +``` diff --git a/requirements/pr-release-1-3-0/specifications/entities/programs/index.md b/requirements/pr-release-1-3-0/specifications/entities/programs/index.md new file mode 100644 index 00000000..22b8e06e --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/entities/programs/index.md @@ -0,0 +1,108 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Program Entities +category: requirements +type: specification +--- +# Program Entities + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| --------------- | ------------ | +| Seth Kelly | Comcast | +| Jeremy LaCivita | Comcast | + +## 1. Overview +TBD... + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL +NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT +RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be +interpreted as described in [BCP +14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and +only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Program Entities](#3-program-entities) + - [3.1. Optional TV Entity Properties](#31-optional-tv-entity-properties) + + +## 3. Program Entities +Every Program Entity **MUST** be an [Entity](../index#3-entities). + +Every Program Entity **MUST** have a `const` property named `entityType`, which +**MUST** have the value `"program"`. + +Every Program Entity **MUST** have a `string` property named `programType`, +whose value **MUST** be one of: + + - `"movie"` + - `"episode"` + - `"season"` + - `"series"` + - `"other"` + - `"preview"` + - `"extra"` + - `"concert"` + - `"sportingEvent"` + - `"advertisement"` + - `"musicVideo"` + - `"minisode"` + +An example Program Entity: + +```json +{ + "entityType": "program", + "programType": "movie", + "entityId": "entity/abc" +} +``` + +Another example Entity: + +```json +{ + "entityType": "program", + "programType": "episode", + "entityId": "entity/xyz" +} +``` + +### 3.1. Optional TV Entity Properties +A Program Entity **MAY** have a `string` property named `seasonId` if its +programType is `episode`, otherwise the entity **MUST NOT** have this property. + +A Program Entity **MAY** have a `string` property named `seriesId` if its +programType is either `episode` or `season`, otherwise the entity **MUST NOT** +have this property. + +An example TV Program Entity: + +```json +{ + "entityType": "program", + "programType": "episode", + "entityId": "entity/def", + "seriesId": "entity/hij", + "seasonId": "entity/klm" +} +``` + +Another example TV Program Entity: + +```json +{ + "entityType": "program", + "programType": "season", + "entityId": "entity/klm", + "seriesId": "entity/hij" +} +``` diff --git a/requirements/pr-release-1-3-0/specifications/firebolt-open-rpc.json b/requirements/pr-release-1-3-0/specifications/firebolt-open-rpc.json new file mode 100644 index 00000000..37f22a6f --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/firebolt-open-rpc.json @@ -0,0 +1,21801 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Firebolt JSON-RPC API", + "version": "1.3.0-release-1-3-0.0", + "x-module-descriptions": { + "Internal": "Internal methods for SDK / FEE integration", + "Accessibility": "The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance.\n\nApps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app.", + "Account": "A module for querying about the device account.", + "AcknowledgeChallenge": "A module for registering as a provider for a user grant in which the user confirms access to a capability", + "Advertising": "A module for platform provided advertising settings and functionality.", + "AudioDescriptions": "A module for managing audio-description Settings.", + "Authentication": "A module for acquiring authentication tokens.", + "Capabilities": "The Capabilities module provides information about which discreet unit of functionality is enabled for the apps.", + "ClosedCaptions": "A module for managing closed-captions Settings.", + "Device": "A module for querying about the device and it's capabilities.", + "Discovery": "Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a \"Watch Next\" tile that links to your app from the platform's home screen.\n\nGetting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer.\n\nUnder the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.\n\nThe Discovery plugin is used to _send_ information to the Platform.\n\n### Localization\nApps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.\n\nApps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency.", + "HDMIInput": "Methods for managing HDMI inputs on an HDMI sink device.", + "Keyboard": "Methods for prompting users to enter text with task-oriented UX", + "Lifecycle": "Methods and events for responding to lifecycle changes in your app", + "Localization": "Methods for accessessing location and language preferences", + "Metrics": "Methods for sending metrics", + "Parameters": "Methods for getting initialization parameters for an app cold launch.", + "PinChallenge": "A module for registering as a provider for a user grant in which the user is prompted for a pin for access to a capability", + "Privacy": "A module for managing device settings.", + "Profile": "Methods for getting information about the current user/account profile", + "SecondScreen": "Methods for communicating with second screen devices", + "SecureStorage": "A module for storing and retrieving secure data owned by the app", + "UserGrants": "A module for managing grants given by the user", + "VoiceGuidance": "A module for managing voice-guidance Settings.", + "Wifi": "A module for providing support for Wifi." + } + }, + "methods": [ + { + "name": "rpc.discover", + "summary": "The OpenRPC schema for this JSON-RPC API", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:rpc:discover" + ] + } + ], + "result": { + "name": "OpenRPC Schema", + "schema": { + "type": "object" + } + }, + "examples": [ + { + "name": "Default", + "params": [], + "result": { + "name": "schema", + "value": {} + } + } + ] + }, + { + "name": "Internal.initialize", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:initialize" + ] + } + ], + "summary": "Initialize the SDK / FEE session.", + "description": "A single version of the Firebolt SDK is compiled into each app. When an app starts up, the SDK **MUST** call this method as soon as possible and **before** any other JSON-RPC methods are sent.", + "params": [ + { + "name": "version", + "required": true, + "schema": { + "$ref": "#/x-schemas/Types/SemanticVersion" + }, + "summary": "The semantic version of the SDK." + } + ], + "result": { + "name": "session", + "summary": "Info about the SDK/FEE session", + "schema": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The semantic version of the FEE." + } + }, + "additionalProperties": false + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "version", + "value": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt SDK 1.0.0" + } + } + ], + "result": { + "name": "Default Result", + "value": { + "version": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt FEE 1.0.0" + } + } + } + } + ] + }, + { + "name": "Accessibility.closedCaptions", + "summary": "Get the user's preferred closed-captions settings", + "params": [], + "tags": [ + { + "name": "deprecated", + "x-alternative": "Accessibility.closedCaptionsSettings()", + "x-since": "0.6.0" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [], + "result": { + "name": "settings", + "value": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.closedCaptionsSettings", + "summary": "Get the user's preferred closed-captions settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [], + "result": { + "name": "settings", + "value": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.voiceGuidance", + "summary": "Get the user's preferred voice guidance settings", + "params": [], + "tags": [ + { + "name": "deprecated", + "x-alternative": "Accessibility.voiceGuidanceSettings()", + "x-since": "0.6.0" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "speed": 2 + } + } + } + ] + }, + { + "name": "Accessibility.voiceGuidanceSettings", + "summary": "Get the user's preferred voice guidance settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "speed": 2 + } + } + } + ] + }, + { + "name": "Accessibility.audioDescriptionSettings", + "summary": "Get the user's preferred audio description settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "result": { + "name": "settings", + "summary": "the audio description settings", + "schema": { + "$ref": "#/components/schemas/AudioDescriptionSettings" + } + }, + "examples": [ + { + "name": "Getting the audio description settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true + } + } + } + ] + }, + { + "name": "Accessibility.onClosedCaptionsSettingsChanged", + "summary": "Get the user's preferred closed-captions settings", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Accessibility.closedCaptionsSettings" + }, + { + "name": "event", + "x-alternative": "closedCaptionsSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + ] + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "settings", + "value": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.onVoiceGuidanceSettingsChanged", + "summary": "Get the user's preferred voice guidance settings", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Accessibility.voiceGuidanceSettings" + }, + { + "name": "event", + "x-alternative": "voiceGuidanceSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + ] + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "speed": 2 + } + } + } + ] + }, + { + "name": "Accessibility.onAudioDescriptionSettingsChanged", + "summary": "Get the user's preferred audio description settings", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Accessibility.audioDescriptionSettings" + }, + { + "name": "event", + "x-alternative": "audioDescriptionSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "result": { + "name": "settings", + "summary": "the audio description settings", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AudioDescriptionSettings" + } + ] + } + }, + "examples": [ + { + "name": "Getting the audio description settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "enabled": true + } + } + } + ] + }, + { + "name": "Account.id", + "summary": "Get the platform back-office account identifier", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:account:id" + ] + } + ], + "result": { + "name": "id", + "summary": "the id", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "123" + } + } + ] + }, + { + "name": "Account.uid", + "summary": "Gets a unique id for the current app & account", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:account:uid" + ] + } + ], + "result": { + "name": "uniqueId", + "summary": "a unique ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the unique ID", + "params": [], + "result": { + "name": "Default Result", + "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" + } + } + ] + }, + { + "name": "Account.session", + "summary": "Used by a distributor to push Session token to firebolt.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:token:account" + ] + } + ], + "params": [ + { + "name": "token", + "required": true, + "schema": { + "$ref": "#/components/schemas/Token" + } + }, + { + "name": "expiresIn", + "required": true, + "schema": { + "$ref": "#/components/schemas/Expiry" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "token", + "value": "RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==" + }, + { + "name": "expiresIn", + "value": 84000 + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "AcknowledgeChallenge.onRequestChallenge", + "summary": "Registers as a provider for when the user should be challenged in order to confirm access to a capability", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "$ref": "#/components/schemas/GrantResult" + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true + } + ], + "result": { + "name": "challenge", + "summary": "The request to challenge the user", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/ChallengeProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "capability": "xrn:firebolt:capability:localization::postal-code", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + } + } + } + } + } + ] + }, + { + "name": "AcknowledgeChallenge.challengeFocus", + "summary": "Internal API for Challenge Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "AcknowledgeChallenge.challengeResponse", + "summary": "Internal API for Challenge Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "$ref": "#/components/schemas/GrantResult" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true, + "x-response-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example #1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": true + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #2", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": false + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #3", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": null + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "AcknowledgeChallenge.challengeError", + "summary": "Internal API for Challenge Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true, + "x-error-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Advertising.config", + "summary": "Build configuration object for Ad Framework initialization", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [ + { + "name": "options", + "summary": "Configuration options", + "required": true, + "schema": { + "$ref": "#/components/schemas/AdConfigurationOptions" + } + } + ], + "result": { + "name": "adFrameworkConfig", + "summary": "the ad framework config", + "schema": { + "type": "object", + "description": "An opaque object represneting the AdConfiguration" + } + }, + "examples": [ + { + "name": "Initializing the Ad Framework", + "params": [ + { + "name": "options", + "value": { + "environment": "prod", + "authenticationEntity": "MVPD" + } + } + ], + "result": { + "name": "Default Result", + "value": { + "adServerUrl": "https://demo.v.fwmrm.net/ad/p/1", + "adServerUrlTemplate": "https://demo.v.fwmrm.net/ad/p/1?flag=+sltp+exvt+slcb+emcr+amcb+aeti&prof=12345:caf_allinone_profile &nw=12345&mode=live&vdur=123&caid=a110523018&asnw=372464&csid=gmott_ios_tablet_watch_live_ESPNU&ssnw=372464&vip=198.205.92.1&resp=vmap1&metr=1031&pvrn=12345&vprn=12345&vcid=1X0Ce7L3xRWlTeNhc7br8Q%3D%3D", + "adNetworkId": "519178", + "adProfileId": "12345:caf_allinone_profile", + "adSiteSectionId": "caf_allinone_profile_section", + "adOptOut": true, + "privacyData": "ew0KICAicGR0IjogImdkcDp2MSIsDQogICJ1c19wcml2YWN5IjogIjEtTi0iLA0KICAibG10IjogIjEiIA0KfQ0K", + "ifaValue": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa": "ewogICJ2YWx1ZSI6ICIwMTIzNDU2Ny04OUFCLUNERUYtR0gwMS0yMzQ1Njc4OUFCQ0QiLAogICJpZmFfdHlwZSI6ICJzc3BpZCIsCiAgImxtdCI6ICIwIgp9Cg==", + "appName": "FutureToday", + "appBundleId": "FutureToday.comcast", + "distributorAppId": "1001", + "deviceAdAttributes": "ewogICJib0F0dHJpYnV0ZXNGb3JSZXZTaGFyZUlkIjogIjEyMzQiCn0=", + "coppa": 0, + "authenticationEntity": "60f72475281cfba3852413bd53e957f6" + } + } + } + ] + }, + { + "name": "Advertising.policy", + "summary": "Get the advertising privacy and playback policy", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:advertising", + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "result": { + "name": "adPolicy", + "summary": "the ad policy", + "schema": { + "$ref": "#/components/schemas/AdPolicy" + } + }, + "examples": [ + { + "name": "Getting the advertising policy settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "skipRestriction": "adsUnwatched", + "limitAdTracking": false + } + } + } + ] + }, + { + "name": "Advertising.skipRestriction", + "summary": "Set the value for AdPolicy.skipRestriction", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "result", + "value": "none" + } + }, + { + "name": "Additional Example", + "params": [], + "result": { + "name": "result", + "value": "all" + } + } + ] + }, + { + "name": "Advertising.advertisingId", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:identifier" + ] + } + ], + "summary": "Get the advertising ID", + "params": [ + { + "name": "options", + "summary": "AdvertisingId options", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdvertisingIdOptions" + } + } + ], + "result": { + "name": "advertisingId", + "summary": "the advertising ID", + "schema": { + "type": "object", + "properties": { + "ifa": { + "type": "string" + }, + "ifa_type": { + "type": "string" + }, + "lmt": { + "type": "string" + } + }, + "required": [ + "ifa" + ] + } + }, + "examples": [ + { + "name": "Getting the advertising ID", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } + } + }, + { + "name": "Getting the advertising ID with scope browse", + "params": [ + { + "name": "options", + "value": { + "scope": { + "type": "browse", + "id": "paidPlacement" + } + } + } + ], + "result": { + "name": "Default Result", + "value": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } + } + }, + { + "name": "Getting the advertising ID with scope content", + "params": [ + { + "name": "options", + "value": { + "scope": { + "type": "content", + "id": "metadata:linear:station:123" + } + } + } + ], + "result": { + "name": "Default Result", + "value": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } + } + } + ] + }, + { + "name": "Advertising.deviceAttributes", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "summary": "Get the device advertising device attributes", + "params": [], + "result": { + "name": "deviceAttributes", + "summary": "the device attributes", + "schema": { + "type": "object" + } + }, + "examples": [ + { + "name": "Getting the device attributes", + "params": [], + "result": { + "name": "Default Result", + "value": {} + } + } + ] + }, + { + "name": "Advertising.appBundleId", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "summary": "Get the App's Bundle ID", + "params": [], + "result": { + "name": "appBundleId", + "summary": "the app bundle ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "operator.app" + } + } + ] + }, + { + "name": "Advertising.resetIdentifier", + "summary": "Resets a user's identifier in the ad platform so that the advertising id that apps get will be a new value", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:identifier" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Advertising.onSkipRestrictionChanged", + "summary": "Set the value for AdPolicy.skipRestriction", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Advertising.skipRestriction" + }, + { + "name": "event", + "x-alternative": "skipRestriction" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "result", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": "none" + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": "all" + } + } + ] + }, + { + "name": "Advertising.onPolicyChanged", + "summary": "Get the advertising privacy and playback policy", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Advertising.policy" + }, + { + "name": "event", + "x-alternative": "policy" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:advertising", + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "result": { + "name": "adPolicy", + "summary": "the ad policy", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AdPolicy" + } + ] + } + }, + "examples": [ + { + "name": "Getting the advertising policy settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "skipRestriction": "adsUnwatched", + "limitAdTracking": false + } + } + } + ] + }, + { + "name": "Advertising.setSkipRestriction", + "summary": "Set the value for AdPolicy.skipRestriction", + "tags": [ + { + "name": "setter", + "x-setter-for": "skipRestriction" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": "none" + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "value", + "value": "all" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "AudioDescriptions.enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "AudioDescriptions.onEnabledChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "AudioDescriptions.enabled" + }, + { + "name": "event", + "x-alternative": "enabled" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "AudioDescriptions.setEnabled", + "tags": [ + { + "name": "setter", + "x-setter-for": "enabled" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "Authentication.token", + "summary": "Get a specific `type` of authentication token", + "tags": [ + { + "name": "deprecated", + "x-alternative": "Authentication module has individual methods for each token type.", + "x-since": "0.9.0" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:platform" + ] + } + ], + "params": [ + { + "name": "type", + "summary": "What type of token to get", + "schema": { + "$ref": "#/components/schemas/TokenType" + }, + "required": true + }, + { + "name": "options", + "summary": "Additional options for acquiring the token.", + "schema": { + "type": "object" + }, + "required": false + } + ], + "result": { + "name": "token", + "summary": "the token value, type, and expiration", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "expires": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "examples": [ + { + "name": "Acquire a Firebolt platform token", + "params": [ + { + "name": "type", + "value": "platform" + } + ], + "result": { + "name": "token", + "value": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "platform" + } + } + }, + { + "name": "Acquire a Firebolt device identity token", + "params": [ + { + "name": "type", + "value": "device" + } + ], + "result": { + "name": "token", + "value": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "device" + } + } + }, + { + "name": "Acquire a Firebolt distributor token", + "params": [ + { + "name": "type", + "value": "distributor" + }, + { + "name": "options", + "value": { + "clientId": "xyz" + } + } + ], + "result": { + "name": "token", + "value": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "distributor", + "data": { + "tid": "EB00E9230AB2A35F57DB4EFDDC4908F6446D38F08F4FF0BD57FE6A61E21EEFD9", + "scope": "scope" + } + } + } + } + ] + }, + { + "name": "Authentication.device", + "summary": "Get a device token scoped to the current app.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:device" + ] + } + ], + "params": [], + "result": { + "name": "token", + "summary": "the token value and expiration", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Acquire a Firebolt device identity token", + "params": [], + "result": { + "name": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + ] + }, + { + "name": "Authentication.session", + "summary": "Get a destributor session token.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:session" + ] + } + ], + "params": [], + "result": { + "name": "token", + "summary": "the token value", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Acquire a distributor session token", + "params": [], + "result": { + "name": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + ] + }, + { + "name": "Authentication.root", + "summary": "Get a root device token.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:root" + ] + } + ], + "params": [], + "result": { + "name": "token", + "summary": "the token value", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Acquire a Firebolt root device identity token", + "params": [], + "result": { + "name": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + ] + }, + { + "name": "Capabilities.supported", + "summary": "Returns whether the platform supports the passed capability.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + } + ], + "result": { + "name": "supported", + "summary": "Whether or not capability is supported in device.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Wifi scan supported capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:wifi:scan" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "BLE protocol unsupported capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:protocol:bluetoothle" + } + ], + "result": { + "name": "Default Result", + "value": false + } + } + ] + }, + { + "name": "Capabilities.available", + "summary": "Returns whether a capability is available now.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + } + ], + "result": { + "name": "available", + "summary": "Whether or not capability is available now.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Device Token.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:device" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "Unavailable Platform token.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:platform" + } + ], + "result": { + "name": "Default Result", + "value": false + } + } + ] + }, + { + "name": "Capabilities.permitted", + "summary": "Returns whether the current App has permission to the passed capability and role.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "options", + "summary": "Capability options", + "schema": { + "$ref": "#/components/schemas/CapabilityOption" + } + } + ], + "result": { + "name": "permitted", + "summary": "Whether or not app is permitted for the given capability and the role", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Keyboard", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:input:keyboard" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "Keyboard incorrect manage role capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:input:keyboard" + }, + { + "name": "options", + "value": { + "role": "manage" + } + } + ], + "result": { + "name": "Default Result", + "value": false + } + }, + { + "name": "Wifi scan not permitted capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:wifi:scan" + } + ], + "result": { + "name": "Default Result", + "value": false + } + } + ] + }, + { + "name": "Capabilities.granted", + "summary": "Returns whether the current App has a user grant for passed capability and role.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "options", + "summary": "Capability options", + "schema": { + "$ref": "#/components/schemas/CapabilityOption" + } + } + ], + "result": { + "name": "granted", + "summary": "Whether or not app is granted to use the given capability and the role", + "schema": { + "oneOf": [ + { + "type": "boolean" + }, + { + "const": null + } + ] + } + }, + "examples": [ + { + "name": "Default capabilities without grants.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:input:keyboard" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "Get Postal code without grants.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + } + ], + "result": { + "name": "Default Result", + "value": false + } + }, + { + "name": "Get Postal code with grants.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Capabilities.info", + "summary": "Returns an array of CapabilityInfo objects for the passed in capabilities.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capabilities", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "minItems": 1 + } + } + ], + "result": { + "name": "info", + "summary": "Returns an array of CapabilityInfo objects for the passed in capabilities.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default result", + "params": [ + { + "name": "capabilities", + "value": [ + "xrn:firebolt:capability:device:model", + "xrn:firebolt:capability:input:keyboard", + "xrn:firebolt:capability:protocol:bluetoothle", + "xrn:firebolt:capability:token:device", + "xrn:firebolt:capability:token:platform", + "xrn:firebolt:capability:protocol:moca", + "xrn:firebolt:capability:wifi:scan", + "xrn:firebolt:capability:localization:postal-code", + "xrn:firebolt:capability:localization:locality" + ] + } + ], + "result": { + "name": "Default Result", + "value": [ + { + "capability": "xrn:firebolt:capability:device:model", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:input:keyboard", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:protocol:bluetoothle", + "supported": false, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unsupported" + ] + }, + { + "capability": "xrn:firebolt:capability:token:device", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unavailable" + ] + }, + { + "capability": "xrn:firebolt:capability:protocol:moca", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "disabled", + "unavailable" + ] + }, + { + "capability": "xrn:firebolt:capability:wifi:scan", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unpermitted" + ] + }, + { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": null + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "ungranted" + ] + }, + { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "ungranted" + ] + }, + { + "capability": "xrn:firebolt:capability:localization:locality", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "grantDenied", + "ungranted" + ] + } + ] + } + } + ] + }, + { + "name": "Capabilities.request", + "summary": "Requests grants for all capability/role combinations in the roles array.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:request" + ] + } + ], + "params": [ + { + "name": "grants", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/Permission" + }, + "minItems": 1 + } + } + ], + "result": { + "name": "request", + "summary": "Returns an array of CapabilityInfo objects for the passed in capabilities.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default result", + "params": [ + { + "name": "grants", + "value": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:commerce:purchase" + } + ] + } + ], + "result": { + "name": "Default Result", + "value": [ + { + "capability": "xrn:firebolt:capability:commerce:purchase", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + ] + } + } + ] + }, + { + "name": "Capabilities.onAvailable", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become available.", + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Platform token is available", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:platform" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default result", + "value": { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unpermitted" + ] + } + } + } + ] + }, + { + "name": "Capabilities.onUnavailable", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become unavailable.", + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Platform token is unavailable.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:platform" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unavailable" + ] + } + } + } + ] + }, + { + "name": "Capabilities.onGranted", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become granted.", + "params": [ + { + "name": "role", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + } + }, + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Postal code granted", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + } + } + ] + }, + { + "name": "Capabilities.onRevoked", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become revoked.", + "params": [ + { + "name": "role", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + } + }, + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Postal code revoked", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "grantDenied" + ] + } + } + } + ] + }, + { + "name": "ClosedCaptions.enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "Whether or not closed-captions are enabled.", + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "ClosedCaptions.fontFamily", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font family for displaying closed-captions.", + "params": [], + "result": { + "name": "family", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontFamily" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "family", + "value": "monospaced_sanserif" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "family", + "value": "cursive" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "family", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontSize", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font size for displaying closed-captions.", + "params": [], + "result": { + "name": "size", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontSize" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "size", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font color for displaying closed-captions.", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontEdge", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge style for displaying closed-captions.", + "params": [], + "result": { + "name": "edge", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontEdge" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "edge", + "value": "none" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "edge", + "value": "uniform" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "edge", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontEdgeColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge color for displaying closed-captions.", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions characters.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.backgroundColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred background color for displaying closed-captions, .", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.backgroundOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions backgrounds.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.textAlign", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [], + "result": { + "name": "alignment", + "schema": { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "alignment", + "value": "center" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "alignment", + "value": "left" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.textAlignVertical", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [], + "result": { + "name": "alignment", + "schema": { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "alignment", + "value": "middle" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "alignment", + "value": "top" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.windowColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "white" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.windowOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.preferredLanguages", + "summary": "A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device.", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred closed captions languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "ClosedCaptions.onEnabledChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.enabled" + }, + { + "name": "event", + "x-alternative": "enabled" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "Whether or not closed-captions are enabled.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "ClosedCaptions.onFontFamilyChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontFamily" + }, + { + "name": "event", + "x-alternative": "fontFamily" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font family for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "family", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/FontFamily" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "family", + "value": "monospaced_sanserif" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "family", + "value": "cursive" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "family", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontSizeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontSize" + }, + { + "name": "event", + "x-alternative": "fontSize" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font size for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "size", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/FontSize" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "size", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontColor" + }, + { + "name": "event", + "x-alternative": "fontColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font color for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontEdgeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontEdge" + }, + { + "name": "event", + "x-alternative": "fontEdge" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge style for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "edge", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/FontEdge" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edge", + "value": "none" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edge", + "value": "uniform" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edge", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontEdgeColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontEdgeColor" + }, + { + "name": "event", + "x-alternative": "fontEdgeColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge color for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontOpacityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontOpacity" + }, + { + "name": "event", + "x-alternative": "fontOpacity" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions characters.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "opacity", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onBackgroundColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.backgroundColor" + }, + { + "name": "event", + "x-alternative": "backgroundColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred background color for displaying closed-captions, .", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onBackgroundOpacityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.backgroundOpacity" + }, + { + "name": "event", + "x-alternative": "backgroundOpacity" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "opacity", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onTextAlignChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.textAlign" + }, + { + "name": "event", + "x-alternative": "textAlign" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "alignment", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "center" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "left" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onTextAlignVerticalChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.textAlignVertical" + }, + { + "name": "event", + "x-alternative": "textAlignVertical" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "alignment", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "middle" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "top" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onWindowColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.windowColor" + }, + { + "name": "event", + "x-alternative": "windowColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "white" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onWindowOpacityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.windowOpacity" + }, + { + "name": "event", + "x-alternative": "windowOpacity" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "opacity", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onPreferredLanguagesChanged", + "summary": "A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.preferredLanguages" + }, + { + "name": "event", + "x-alternative": "preferredLanguages" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred closed captions languages", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "ClosedCaptions.setEnabled", + "tags": [ + { + "name": "setter", + "x-setter-for": "enabled" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "Whether or not closed-captions are enabled.", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontFamily", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontFamily" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font family for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontFamily" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "monospaced_sanserif" + } + ], + "result": { + "name": "family", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "cursive" + } + ], + "result": { + "name": "family", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "family", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontSize", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontSize" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font size for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontSize" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 1 + } + ], + "result": { + "name": "size", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 1 + } + ], + "result": { + "name": "size", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "size", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font color for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#ffffff" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontEdge", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontEdge" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge style for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontEdge" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "none" + } + ], + "result": { + "name": "edge", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "uniform" + } + ], + "result": { + "name": "edge", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "edge", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontEdgeColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontEdgeColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge color for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "#ffffff" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontOpacity", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontOpacity" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions characters.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 99 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 100 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setBackgroundColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "backgroundColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred background color for displaying closed-captions, .", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "#ffffff" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setBackgroundOpacity", + "tags": [ + { + "name": "setter", + "x-setter-for": "backgroundOpacity" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 99 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 100 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setTextAlign", + "tags": [ + { + "name": "setter", + "x-setter-for": "textAlign" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "center" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "left" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setTextAlignVertical", + "tags": [ + { + "name": "setter", + "x-setter-for": "textAlignVertical" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "middle" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "top" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setWindowColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "windowColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "white" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setWindowOpacity", + "tags": [ + { + "name": "setter", + "x-setter-for": "windowOpacity" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 99 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 100 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setPreferredLanguages", + "summary": "A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device.", + "params": [ + { + "name": "value", + "summary": "the preferred closed captions languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "preferredLanguages" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": [ + "spa", + "eng" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "value", + "value": [ + "eng", + "spa" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Content.requestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Discovery.onRequestUserInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestReason" + } + } + ], + "result": { + "name": "interest", + "schema": { + "$ref": "#/components/schemas/InterestResult" + }, + "summary": "The EntityDetails data." + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "type", + "value": "interest" + }, + { + "name": "reason", + "value": "playlist" + } + ], + "result": { + "name": "interest", + "value": { + "appId": "cool-app", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + } + } + ] + }, + { + "name": "Content.onUserInterest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-provided-by": "Discovery.userInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "interest", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/InterestEvent" + } + ] + }, + "summary": "The EntityDetails data." + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "interest", + "value": { + "appId": "cool-app", + "type": "interest", + "reason": "playlist", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + } + } + ] + }, + { + "name": "Device.id", + "summary": "Get the platform back-office device identifier", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:id" + ] + } + ], + "result": { + "name": "id", + "summary": "the id", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "123" + } + } + ] + }, + { + "name": "Device.distributor", + "summary": "Get the distributor ID for this device", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:distributor" + ] + } + ], + "result": { + "name": "distributorId", + "summary": "the distributor ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the distributor ID", + "params": [], + "result": { + "name": "Default Result", + "value": "Company" + } + } + ] + }, + { + "name": "Device.platform", + "summary": "Get the platform ID for this device", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "platformId", + "summary": "the platform ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the platform ID", + "params": [], + "result": { + "name": "Default Result", + "value": "WPE" + } + } + ] + }, + { + "name": "Device.uid", + "summary": "Gets a unique id for the current app & device", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:uid" + ] + } + ], + "result": { + "name": "uniqueId", + "summary": "a unique ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the unique ID", + "params": [], + "result": { + "name": "Default Result", + "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" + } + } + ] + }, + { + "name": "Device.type", + "summary": "Get the device type", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "deviceType", + "summary": "the device type", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device type", + "params": [], + "result": { + "name": "Default Result", + "value": "STB" + } + } + ] + }, + { + "name": "Device.model", + "summary": "Get the device model", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:model" + ] + } + ], + "result": { + "name": "model", + "summary": "the device model", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device model", + "params": [], + "result": { + "name": "Default Result", + "value": "xi6" + } + } + ] + }, + { + "name": "Device.sku", + "summary": "Get the device sku", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:sku" + ] + } + ], + "result": { + "name": "sku", + "summary": "the device sku", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device sku", + "params": [], + "result": { + "name": "Default Result", + "value": "AX061AEI" + } + } + ] + }, + { + "name": "Device.make", + "summary": "Get the device make", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:make" + ] + } + ], + "result": { + "name": "make", + "summary": "the device make", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device make", + "params": [], + "result": { + "name": "Default Result", + "value": "Arris" + } + } + ] + }, + { + "name": "Device.version", + "summary": "Get the SDK, OS and other version info", + "params": [], + "tags": [ + { + "name": "exclude-from-sdk" + }, + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "versions", + "summary": "the versions", + "schema": { + "type": "object", + "properties": { + "sdk": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The Firebolt SDK version" + }, + "api": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The lateset Firebolt API version supported by the curent device." + }, + "firmware": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The device firmware version." + }, + "os": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "**Deprecated** Use `firmware`, instead." + }, + "debug": { + "type": "string", + "description": "Detail version as a string, for debugging purposes" + } + }, + "required": [ + "api", + "firmware", + "os" + ] + } + }, + "examples": [ + { + "name": "Getting the os and sdk versions", + "params": [], + "result": { + "name": "Default Result", + "value": { + "sdk": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt JS SDK v0.8.0" + }, + "api": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt API v0.8.0" + }, + "firmware": { + "major": 1, + "minor": 2, + "patch": 3, + "readable": "Device Firmware v1.2.3" + }, + "os": { + "major": 0, + "minor": 1, + "patch": 0, + "readable": "Firebolt OS v0.1.0" + }, + "debug": "Non-parsable build info for error logging only." + } + } + } + ] + }, + { + "name": "Device.hdcp", + "summary": "Get the supported HDCP profiles", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdcpProfiles", + "summary": "the supported HDCP profiles", + "schema": { + "$ref": "#/x-schemas/Types/BooleanMap" + } + }, + "examples": [ + { + "name": "Getting the supported HDCP profiles", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdcp1.4": true, + "hdcp2.2": true + } + } + } + ] + }, + { + "name": "Device.hdr", + "summary": "Get the supported HDR profiles", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdrProfiles", + "summary": "the supported HDR profiles", + "schema": { + "$ref": "#/x-schemas/Types/BooleanMap" + } + }, + "examples": [ + { + "name": "Getting the supported HDR profiles", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } + } + } + ] + }, + { + "name": "Device.audio", + "summary": "Get the supported audio profiles", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedAudioProfiles", + "summary": "the supported audio profiles", + "schema": { + "$ref": "#/components/schemas/AudioProfiles" + } + }, + "examples": [ + { + "name": "Getting the supported audio profiles", + "params": [], + "result": { + "name": "Default Result", + "value": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } + } + } + ] + }, + { + "name": "Device.screenResolution", + "summary": "Get the current screen resolution", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "screenResolution", + "summary": "the resolution", + "schema": { + "$ref": "#/components/schemas/Resolution" + } + }, + "examples": [ + { + "name": "Getting the screen resolution", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.videoResolution", + "summary": "Get the current video resolution", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "videoResolution", + "summary": "the resolution", + "schema": { + "$ref": "#/components/schemas/Resolution" + } + }, + "examples": [ + { + "name": "Getting the video resolution", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.name", + "summary": "The human readable name of the device", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "Living Room" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "Kitchen" + } + } + ] + }, + { + "name": "Device.onDeviceNameChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "deprecated", + "x-since": "0.6.0", + "x-alternative": "Device.name()" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "summary": "Get the human readable name of the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Getting the device name", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Living Room" + } + } + ] + }, + { + "name": "Device.network", + "summary": "Get the current network status and type", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:status" + ] + } + ], + "result": { + "name": "networkInfo", + "summary": "the status and type", + "schema": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/NetworkState" + }, + "type": { + "$ref": "#/components/schemas/NetworkType" + } + }, + "required": [ + "state", + "type" + ] + } + }, + "examples": [ + { + "name": "Getting the network info", + "params": [], + "result": { + "name": "Default Result", + "value": { + "state": "connected", + "type": "wifi" + } + } + } + ] + }, + { + "name": "Device.provision", + "summary": "Used by a distributor to push provision info to firebolt.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:account:id", + "xrn:firebolt:capability:device:id", + "xrn:firebolt:capability:device:distributor" + ] + } + ], + "params": [ + { + "name": "accountId", + "summary": "The id of the account that is device is attached to in the back office.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "summary": "The id of the device in the back office.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "distributorId", + "summary": "The id of the distributor in the back office.", + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "accountId", + "value": "12345678910" + }, + { + "name": "deviceId", + "value": "987654321111" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "With distributor id", + "params": [ + { + "name": "accountId", + "value": "12345678910" + }, + { + "name": "deviceId", + "value": "987654321111" + }, + { + "name": "distributorId", + "value": "global_partner" + } + ], + "result": { + "name": "partnerResult", + "value": null + } + } + ] + }, + { + "name": "Device.onNameChanged", + "summary": "The human readable name of the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.name" + }, + { + "name": "event", + "x-alternative": "name" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Living Room" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Kitchen" + } + } + ] + }, + { + "name": "Device.onHdcpChanged", + "summary": "Get the supported HDCP profiles", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.hdcp" + }, + { + "name": "event", + "x-alternative": "hdcp" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdcpProfiles", + "summary": "the supported HDCP profiles", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Types/BooleanMap" + } + ] + } + }, + "examples": [ + { + "name": "Getting the supported HDCP profiles", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "hdcp1.4": true, + "hdcp2.2": true + } + } + } + ] + }, + { + "name": "Device.onHdrChanged", + "summary": "Get the supported HDR profiles", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.hdr" + }, + { + "name": "event", + "x-alternative": "hdr" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdrProfiles", + "summary": "the supported HDR profiles", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Types/BooleanMap" + } + ] + } + }, + "examples": [ + { + "name": "Getting the supported HDR profiles", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } + } + } + ] + }, + { + "name": "Device.onAudioChanged", + "summary": "Get the supported audio profiles", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.audio" + }, + { + "name": "event", + "x-alternative": "audio" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedAudioProfiles", + "summary": "the supported audio profiles", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AudioProfiles" + } + ] + } + }, + "examples": [ + { + "name": "Getting the supported audio profiles", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } + } + } + ] + }, + { + "name": "Device.onScreenResolutionChanged", + "summary": "Get the current screen resolution", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.screenResolution" + }, + { + "name": "event", + "x-alternative": "screenResolution" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "screenResolution", + "summary": "the resolution", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/Resolution" + } + ] + } + }, + "examples": [ + { + "name": "Getting the screen resolution", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.onVideoResolutionChanged", + "summary": "Get the current video resolution", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.videoResolution" + }, + { + "name": "event", + "x-alternative": "videoResolution" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "videoResolution", + "summary": "the resolution", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/Resolution" + } + ] + } + }, + "examples": [ + { + "name": "Getting the video resolution", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.onNetworkChanged", + "summary": "Get the current network status and type", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.network" + }, + { + "name": "event", + "x-alternative": "network" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:status" + ] + } + ], + "result": { + "name": "networkInfo", + "summary": "the status and type", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/NetworkState" + }, + "type": { + "$ref": "#/components/schemas/NetworkType" + } + }, + "required": [ + "state", + "type" + ] + } + ] + } + }, + "examples": [ + { + "name": "Getting the network info", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "connected", + "type": "wifi" + } + } + } + ] + }, + { + "name": "Device.setName", + "summary": "The human readable name of the device", + "params": [ + { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "type": "string" + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "name" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "Living Room" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "Kitchen" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Discovery.policy", + "summary": "get the discovery policy", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:policy" + ] + } + ], + "result": { + "name": "policy", + "summary": "discovery policy opt-in/outs", + "schema": { + "$ref": "#/components/schemas/DiscoveryPolicy" + } + }, + "examples": [ + { + "name": "Getting the discovery policy", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true + } + } + } + ] + }, + { + "name": "Discovery.entityInfo", + "tags": [ + { + "name": "polymorphic-pull" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:entity-info" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow.", + "description": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow. Includes information about the program entity and its relevant associated entities, such as extras, previews, and, in the case of TV series, seasons and episodes.\n\nSee the `EntityInfo` and `WayToWatch` data structures below for more information.\n\nThe app only needs to implement Pull support for `entityInfo` at this time.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "result", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/EntityInfoResult" + }, + "summary": "The entityInfo data." + } + ], + "result": { + "name": "success", + "summary": "True if the push operation is successful", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send entity info for a movie to the platform.", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": [ + "UHD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ], + "subtitles": [ + "es" + ], + "audioDescriptions": [ + "en" + ] + } + ] + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send entity info for a movie with a trailer to the platform.", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": [ + "UHD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ], + "subtitles": [ + "es" + ], + "audioDescriptions": [ + "en" + ] + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "preview", + "title": "Cool Runnings Trailer", + "waysToWatch": [ + { + "identifiers": { + "assetId": "123111", + "entityId": "345" + }, + "entitled": true, + "videoQuality": [ + "HD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + } + ] + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send entity info for a TV Series with seasons and episodes to the platform.", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "98765" + }, + "entityType": "program", + "programType": "series", + "title": "Perfect Strangers", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "season", + "seasonNumber": 1, + "title": "Perfect Strangers Season 3", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": [ + "SD" + ], + "audioProfile": [ + "stereo" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + }, + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 1, + "title": "Knock Knock, Who's There?", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-03-25T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": [ + "SD" + ], + "audioProfile": [ + "stereo" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + }, + { + "identifiers": { + "entityId": "112", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 2, + "title": "Picture This", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-04-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "557", + "entityId": "112", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": [ + "SD" + ], + "audioProfile": [ + "stereo" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + } + ] + } + } + ], + "result": { + "name": "result", + "value": true + } + } + ] + }, + { + "name": "Discovery.purchasedContent", + "tags": [ + { + "name": "polymorphic-pull" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide a list of purchased content for the authenticated account, such as rentals and electronic sell through purchases.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "result", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/PurchasedContentResult" + }, + "summary": "The data for the purchasedContent" + } + ], + "result": { + "name": "success", + "summary": "True if the push operation is successful", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Inform the platform of the user's purchased content", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "totalCount": 10, + "expires": "2025-01-01T00:00:00.000Z", + "entries": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": [ + "UHD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ], + "subtitles": [ + "es" + ], + "audioDescriptions": [ + "en" + ] + } + ] + } + ] + } + } + ], + "result": { + "name": "success", + "value": true + } + } + ], + "description": "Return content purchased by the user, such as rentals and electronic sell through purchases.\n\nThe app should return the user's 100 most recent purchases in `entries`. The total count of purchases must be provided in `count`. If `count` is greater than the total number of `entries`, the UI may provide a link into the app to see the complete purchase list.\n\nThe `EntityInfo` object returned is not required to have `waysToWatch` populated, but it is recommended that it do so in case the UI wants to surface additional information on the purchases screen.\n\nThe app should implement both Push and Pull methods for `purchasedContent`.\n\nThe app should actively push `purchasedContent` when:\n\n* The app becomes Active.\n* When the state of the purchasedContent set has changed.\n* The app goes into Inactive or Background state, if there is a chance a change event has been missed." + }, + { + "name": "Discovery.watched", + "summary": "Notify the platform that content was partially or completely watched", + "tags": [ + { + "name": "polymorphic-reducer" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:watched" + ] + } + ], + "params": [ + { + "name": "entityId", + "required": true, + "schema": { + "type": "string" + }, + "summary": "The entity Id of the watched content." + }, + { + "name": "progress", + "summary": "How much of the content has been watched (percentage as 0-1 for VOD, number of seconds for live)", + "schema": { + "type": "number", + "minimum": 0 + } + }, + { + "name": "completed", + "summary": "Whether or not this viewing is considered \"complete,\" per the app's definition thereof", + "schema": { + "type": "boolean" + } + }, + { + "name": "watchedOn", + "summary": "Date/Time the content was watched, ISO 8601 Date/Time", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Notifying the platform of watched content", + "params": [ + { + "name": "entityId", + "value": "partner.com/entity/123" + }, + { + "name": "progress", + "value": 0.95 + }, + { + "name": "completed", + "value": true + }, + { + "name": "watchedOn", + "value": "2021-04-23T18:25:43.511Z" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.watchNext", + "summary": "Suggest a call-to-action for this app on the platform home screen", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:watch-next" + ] + } + ], + "params": [ + { + "name": "title", + "summary": "The title of this call to action", + "schema": { + "$ref": "#/x-schemas/Types/LocalizedString" + }, + "required": true + }, + { + "name": "identifiers", + "summary": "A set of content identifiers for this call to action", + "schema": { + "$ref": "#/x-schemas/Entertainment/ContentIdentifiers" + }, + "required": true + }, + { + "name": "expires", + "summary": "When this call to action should no longer be presented to users", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "images", + "summary": "A set of images for this call to action", + "schema": { + "type": "object", + "patternProperties": { + "^.*$": { + "$ref": "#/x-schemas/Types/LocalizedString" + } + } + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Suggest a watch-next tile for the home screen", + "params": [ + { + "name": "title", + "value": "A Cool Show" + }, + { + "name": "identifiers", + "value": { + "entityId": "partner.com/entity/123" + } + }, + { + "name": "expires", + "value": "2021-04-23T18:25:43.511Z" + }, + { + "name": "images", + "value": { + "3x4": { + "en-US": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg", + "es": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg" + }, + "16x9": { + "en": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Suggest a watch-next tile for the home screen", + "params": [ + { + "name": "title", + "value": "A Fantastic Show" + }, + { + "name": "identifiers", + "value": { + "entityId": "partner.com/entity/456" + } + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.entitlements", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:content-access" + ] + }, + { + "name": "deprecated", + "x-since": "0.10.0", + "x-alternative": "Discovery.contentAccess()" + } + ], + "summary": "Inform the platform of the users latest entitlements w/in this app.", + "params": [ + { + "name": "entitlements", + "summary": "Array of entitlement objects", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/Entitlement" + } + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Update user's entitlements", + "params": [ + { + "name": "entitlements", + "value": [ + { + "entitlementId": "partner.com/entitlement/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "entitlementId": "partner.com/entitlement/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ] + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.contentAccess", + "summary": "Inform the platform of what content the user can access either by discovering it or consuming it. Availabilities determine which content is discoverable to a user, while entitlements determine if the user can currently consume that content. Content can be available but not entitled, this means that user can see the content but when they try to open it they must gain an entitlement either through purchase or subscription upgrade. In case the access changed off-device, this API should be called any time the app comes to the foreground to refresh the access. This API should also be called any time the availabilities or entitlements change within the app for any reason. Typical reasons may include the user signing into an account or upgrading a subscription. Less common cases can cause availabilities to change, such as moving to a new service location. When availabilities or entitlements are removed from the subscriber (such as when the user signs out), then an empty array should be given. To clear both, use the Discovery.clearContentAccess convenience API.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:content-access" + ] + } + ], + "params": [ + { + "name": "ids", + "summary": "A list of identifiers that represent content that is discoverable or consumable for the subscriber", + "schema": { + "$ref": "#/components/schemas/ContentAccessIdentifiers" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Update subscriber's availabilities", + "params": [ + { + "name": "ids", + "value": { + "availabilities": [ + { + "type": "channel-lineup", + "id": "partner.com/availability/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "type": "channel-lineup", + "id": "partner.com/availability/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Update subscriber's availabilities and entitlements", + "params": [ + { + "name": "ids", + "value": { + "availabilities": [ + { + "type": "channel-lineup", + "id": "partner.com/availability/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "type": "channel-lineup", + "id": "partner.com/availability/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ], + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Update subscriber's entitlements", + "params": [ + { + "name": "ids", + "value": { + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Clear a subscriber's entitlements", + "params": [ + { + "name": "ids", + "value": { + "entitlements": [] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Clear a subscriber's availabilities", + "params": [ + { + "name": "ids", + "value": { + "availabilities": [] + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.clearContentAccess", + "summary": "Clear both availabilities and entitlements from the subscriber. This is equivalent of calling `Discovery.contentAccess({ availabilities: [], entitlements: []})`. This is typically called when the user signs out of an account.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:content-access" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Clear subscriber's availabilities and entitlements", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.launch", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:launch" + ] + } + ], + "summary": "Launch or foreground the specified app, and optionally instructs it to navigate to the specified user action. \n For the Primary Experience, the appId can be any one of: \n\n - xrn:firebolt:application-type:main \n\n - xrn:firebolt:application-type:settings", + "params": [ + { + "name": "appId", + "required": true, + "summary": "The durable app Id of the app to launch", + "schema": { + "type": "string" + } + }, + { + "name": "intent", + "required": false, + "summary": "An optional `NavigationIntent` with details about what part of the app to show first, and context around how/why it was launched", + "schema": { + "$ref": "#/x-schemas/Intents/NavigationIntent" + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Launch the 'Foo' app to it's home screen.", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "intent", + "value": { + "action": "home", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the 'Foo' app to it's own page for a specific entity.", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "intent", + "value": { + "action": "entity", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the 'Foo' app to a fullscreen playback experience for a specific entity.", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "intent", + "value": { + "action": "playback", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to a global page for a specific entity.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "entity", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to a global page for the company / partner with the ID 'foo'.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "company:foo" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to it's home screen, as if the Home remote button was pressed.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "home", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "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", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to it's settings screen.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:settings " + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "settings" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to it's linear/epg guide.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "guide" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to the App Store details page for a specific app with the ID 'foo'.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main " + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "app:foo" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.onNavigateTo", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:navigate-to" + ] + } + ], + "summary": "listen to `navigateTo` events", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "An object describing where in the app the user intends to navigate to", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Intents/NavigationIntent" + } + ] + } + }, + "examples": [ + { + "name": "Listening for `navigateTo` events", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "event", + "value": { + "action": "search", + "data": { + "query": "a cool show" + }, + "context": { + "campaign": "unknown", + "source": "voice" + } + } + } + } + ] + }, + { + "name": "Discovery.signIn", + "tags": [ + { + "name": "calls-metrics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Inform the platform that your user is signed in, for increased visibility in search & discovery. Sign-in state is used separately from what content can be access through entitlements and availabilities. Sign-in state may be used when deciding whether to choose this app to handle a user intent. For instance, if the user tries to launch something generic like playing music from an artist, only a signed-in app will be chosen. If the user wants to tune to a channel, only a signed-in app will be chosen to handle that intent. While signIn can optionally include entitlements as those typically change at signIn time, it is recommended to make a separate call to Discovery.contentAccess for entitlements. signIn is not only for when a user explicitly enters login credentials. If an app does not require any credentials from the user to consume content, such as in a free app, then the app should call signIn immediately on launch.", + "params": [ + { + "name": "entitlements", + "summary": "Optional array of Entitlements, in case of a different user account, or a long time since last sign-in.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/Entitlement" + } + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signIn metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send signIn notification with entitlements", + "params": [ + { + "name": "entitlements", + "value": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.signOut", + "tags": [ + { + "name": "calls-metrics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Inform the platform that your user has signed out. See `Discovery.signIn` for more details on how the sign-in state is used.signOut will NOT clear entitlements, the app should make a separate call to Discovery.clearContentAccess. Apps should also call signOut when a login token has expired and the user is now in a signed-out state.", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signOut notification", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.onSignIn", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Listen to events from all apps that call Discovery.signIn", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "event", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "properties": { + "appId": { + "type": "string" + } + }, + "required": [ + "appId" + ] + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Event", + "value": { + "appId": "firecert" + } + } + } + ] + }, + { + "name": "Discovery.onSignOut", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Listen to events from all apps that call Discovery.signOut", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "event", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "properties": { + "appId": { + "type": "string" + } + }, + "required": [ + "appId" + ] + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Event", + "value": { + "appId": "firecert" + } + } + } + ] + }, + { + "name": "Discovery.userInterest", + "summary": "Send an entity that the user has expressed interest in to the platform.", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + } + ], + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestReason" + } + }, + { + "name": "entity", + "required": true, + "schema": { + "$ref": "#/x-schemas/Entity/EntityDetails" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "type", + "value": "interest" + }, + { + "name": "reason", + "value": "playlist" + }, + { + "name": "entity", + "value": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": {} + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.onRequestUserInterest", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response-name": "entity", + "x-response": { + "$ref": "#/x-schemas/Entity/EntityDetails", + "examples": [ + { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "request", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "required": [ + "correlationId", + "parameters" + ], + "properties": { + "correlationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/UserInterestProviderParameters" + } + }, + "additionalProperties": false + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "request", + "value": { + "correlationId": "xyz", + "parameters": { + "type": "interest", + "reason": "playlist" + } + } + } + } + ] + }, + { + "name": "Discovery.onPolicyChanged", + "summary": "get the discovery policy", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Discovery.policy" + }, + { + "name": "event", + "x-alternative": "policy" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:policy" + ] + } + ], + "result": { + "name": "policy", + "summary": "discovery policy opt-in/outs", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/DiscoveryPolicy" + } + ] + } + }, + "examples": [ + { + "name": "Getting the discovery policy", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true + } + } + } + ] + }, + { + "name": "Discovery.onPullEntityInfo", + "tags": [ + { + "name": "polymorphic-pull-event" + }, + { + "name": "event", + "x-pulls-for": "entityInfo" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:entity-info" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow.", + "description": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow. Includes information about the program entity and its relevant associated entities, such as extras, previews, and, in the case of TV series, seasons and episodes.\n\nSee the `EntityInfo` and `WayToWatch` data structures below for more information.\n\nThe app only needs to implement Pull support for `entityInfo` at this time.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "request", + "summary": "A EntityInfoFederatedRequest object.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/EntityInfoFederatedRequest" + } + ] + } + }, + "examples": [ + { + "name": "Send entity info for a movie to the platform.", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + } + }, + { + "name": "Send entity info for a movie with a trailer to the platform.", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + } + }, + { + "name": "Send entity info for a TV Series with seasons and episodes to the platform.", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + } + } + ] + }, + { + "name": "Discovery.onPullPurchasedContent", + "tags": [ + { + "name": "polymorphic-pull-event" + }, + { + "name": "event", + "x-pulls-for": "purchasedContent" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide a list of purchased content for the authenticated account, such as rentals and electronic sell through purchases.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "request", + "summary": "A PurchasedContentFederatedRequest object.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/PurchasedContentFederatedRequest" + } + ] + } + }, + "examples": [ + { + "name": "Inform the platform of the user's purchased content", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "limit": 100 + } + } + } + } + ], + "description": "Return content purchased by the user, such as rentals and electronic sell through purchases.\n\nThe app should return the user's 100 most recent purchases in `entries`. The total count of purchases must be provided in `count`. If `count` is greater than the total number of `entries`, the UI may provide a link into the app to see the complete purchase list.\n\nThe `EntityInfo` object returned is not required to have `waysToWatch` populated, but it is recommended that it do so in case the UI wants to surface additional information on the purchases screen.\n\nThe app should implement both Push and Pull methods for `purchasedContent`.\n\nThe app should actively push `purchasedContent` when:\n\n* The app becomes Active.\n* When the state of the purchasedContent set has changed.\n* The app goes into Inactive or Background state, if there is a chance a change event has been missed." + }, + { + "name": "Discovery.userInterestResponse", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest", + "x-response-for": "Discovery.onRequestUserInterest" + } + ], + "summary": "Internal API for .onRequestUserInterest Provider to send back response.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "$ref": "#/x-schemas/Entity/EntityDetails", + "examples": [ + { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + ] + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.userInterestError", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest", + "x-error-for": "Discovery.onRequestUserInterest" + } + ], + "summary": "Internal API for .onRequestUserInterest Provider to send back error.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.ports", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Retrieve a list of HDMI input ports.", + "params": [], + "result": { + "name": "ports", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HDMIInputPort" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "ports", + "value": [ + { + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true + } + ] + } + } + ] + }, + { + "name": "HDMIInput.port", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Retrieve a specific HDMI input port.", + "params": [ + { + "name": "portId", + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "required": true + } + ], + "result": { + "name": "port", + "schema": { + "$ref": "#/components/schemas/HDMIInputPort" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "portId", + "value": "HDMI1" + } + ], + "result": { + "name": "ports", + "value": { + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true + } + } + } + ] + }, + { + "name": "HDMIInput.open", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Opens the HDMI Port allowing it to be the active source device. Incase there is a different HDMI portId already set as the active source, this call would stop the older portId before opening the given portId.", + "params": [ + { + "name": "portId", + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "required": true + } + ], + "result": { + "name": "port", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example for open", + "params": [ + { + "name": "portId", + "value": "HDMI1" + } + ], + "result": { + "name": "port", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.close", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Closes the given HDMI Port if it is the current active source for HDMI Input. If there was no active source, then there would no action taken on the device.", + "params": [], + "result": { + "name": "port", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example for stop", + "params": [], + "result": { + "name": "port", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.onConnectionChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Notification for when any HDMI port has a connection physically engaged or disengaged.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "info", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/ConnectionChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "info", + "value": { + "port": "HDMI1", + "connected": true + } + } + } + ] + }, + { + "name": "HDMIInput.onSignalChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Notification for when any HDMI port has it's signal status changed.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "info", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/SignalChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "info", + "value": { + "port": "HDMI1", + "signal": "stable" + } + } + } + ] + }, + { + "name": "HDMIInput.lowLatencyMode", + "summary": "Property for the low latency mode setting.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "property" + } + ], + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "HDMIInput.onAutoLowLatencyModeSignalChanged", + "summary": "Notification for changes to ALLM status of any input device.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "event" + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "info", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AutoLowLatencyModeSignalChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "info", + "value": { + "port": "HDMI1", + "autoLowLatencyModeSignalled": true + } + } + } + ] + }, + { + "name": "HDMIInput.autoLowLatencyModeCapable", + "summary": "Property for each port auto low latency mode setting.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "property", + "x-subscriber-type": "global" + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "HDMIInput.edidVersion", + "summary": "Property for each port's active EDID version.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "property" + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + } + ], + "result": { + "name": "edidVersion", + "schema": { + "$ref": "#/components/schemas/EDIDVersion" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "edidVersion", + "value": "2.0" + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "edidVersion", + "value": "1.4" + } + } + ] + }, + { + "name": "HDMIInput.onLowLatencyModeChanged", + "summary": "Property for the low latency mode setting.", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "HDMIInput.lowLatencyMode" + }, + { + "name": "event", + "x-alternative": "lowLatencyMode" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "HDMIInput.onAutoLowLatencyModeCapableChanged", + "summary": "Property for each port auto low latency mode setting.", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "HDMIInput.autoLowLatencyModeCapable" + }, + { + "name": "event", + "x-alternative": "autoLowLatencyModeCapable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "data", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AutoLowLatencyModeCapableChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "data", + "value": { + "port": "HDMI1", + "enabled": true + } + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "data", + "value": { + "port": "HDMI1", + "enabled": false + } + } + } + ] + }, + { + "name": "HDMIInput.onEdidVersionChanged", + "summary": "Property for each port's active EDID version.", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "HDMIInput.edidVersion" + }, + { + "name": "event", + "x-alternative": "edidVersion" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "edidVersion", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/EDIDVersion" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edidVersion", + "value": "2.0" + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edidVersion", + "value": "1.4" + } + } + ] + }, + { + "name": "HDMIInput.setLowLatencyMode", + "summary": "Property for the low latency mode setting.", + "tags": [ + { + "name": "setter", + "x-setter-for": "lowLatencyMode" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.setAutoLowLatencyModeCapable", + "summary": "Property for each port auto low latency mode setting.", + "tags": [ + { + "name": "setter", + "x-setter-for": "autoLowLatencyModeCapable" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + }, + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.setEdidVersion", + "summary": "Property for each port's active EDID version.", + "tags": [ + { + "name": "setter", + "x-setter-for": "edidVersion" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + }, + { + "name": "value", + "schema": { + "$ref": "#/components/schemas/EDIDVersion" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": "2.0" + } + ], + "result": { + "name": "edidVersion", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": "1.4" + } + ], + "result": { + "name": "edidVersion", + "value": null + } + } + ] + }, + { + "name": "Keyboard.email", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestEmail", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ], + "x-allow-focus": true + } + ], + "summary": "Prompt the user for their email address with a simplified list of choices.", + "params": [ + { + "name": "type", + "summary": "Why the email is being requested, e.g. sign on or sign up", + "required": true, + "schema": { + "$ref": "#/components/schemas/EmailUsage" + } + }, + { + "name": "message", + "summary": "The message to display while prompting", + "required": false, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "email", + "summary": "the selected or entered email", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Prompt the user to select or type an email address", + "params": [ + { + "name": "type", + "value": "signIn" + }, + { + "name": "message", + "value": "Enter your email to sign into this app" + } + ], + "result": { + "name": "Default Result", + "value": "user@domain.com" + } + }, + { + "name": "Prompt the user to type an email address to sign up", + "params": [ + { + "name": "type", + "value": "signUp" + }, + { + "name": "message", + "value": "Enter your email to sign up for this app" + } + ], + "result": { + "name": "Default Result", + "value": "user@domain.com" + } + } + ] + }, + { + "name": "Keyboard.password", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestPassword", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ], + "x-allow-focus": true + } + ], + "summary": "Show the password entry keyboard, with typing obfuscated from visibility", + "params": [ + { + "name": "message", + "summary": "The message to display while prompting", + "required": false, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "value", + "summary": "the selected or entered password", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Prompt the user to enter their password", + "params": [ + { + "name": "message", + "value": "Enter your password" + } + ], + "result": { + "name": "Default Result", + "value": "abc123" + } + } + ] + }, + { + "name": "Keyboard.standard", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestStandard", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ], + "x-allow-focus": true + } + ], + "summary": "Show the standard platform keyboard, and return the submitted value", + "params": [ + { + "name": "message", + "summary": "The message to display while prompting", + "required": true, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "value", + "summary": "the selected or entered text", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Prompt the user for an arbitrary string", + "params": [ + { + "name": "message", + "value": "Enter the name you'd like to associate with this device" + } + ], + "result": { + "name": "Default Result", + "value": "Living Room" + } + } + ] + }, + { + "name": "Keyboard.onRequestStandard", + "summary": "Registers as a provider for when the user should be shown a standard keyboard.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "type": "string", + "examples": [ + "username" + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true + } + ], + "result": { + "name": "sessionRequest", + "summary": "The request to start a keyboard session", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/KeyboardProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } + } + } + ] + }, + { + "name": "Keyboard.onRequestPassword", + "summary": "Registers as a provider for when the user should be shown a password keyboard, with dots for each character entered.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "type": "string", + "examples": [ + "password" + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true + } + ], + "result": { + "name": "sessionRequest", + "summary": "The request to start a keyboard session", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/KeyboardProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } + } + } + ] + }, + { + "name": "Keyboard.onRequestEmail", + "summary": "Registers as a provider for when the user should be shown a keyboard optimized for email address entry.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "type": "string", + "examples": [ + "email@address.com" + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true + } + ], + "result": { + "name": "sessionRequest", + "summary": "The request to start a keyboard session", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/KeyboardProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } + } + } + ] + }, + { + "name": "Keyboard.standardFocus", + "summary": "Internal API for Standard Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestStandard" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.passwordFocus", + "summary": "Internal API for Password Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestPassword" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.emailFocus", + "summary": "Internal API for Email Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestEmail" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.standardResponse", + "summary": "Internal API for Standard Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "type": "string", + "examples": [ + "username" + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-response-for": "onRequestStandard" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": "username" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.standardError", + "summary": "Internal API for Standard Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-error-for": "onRequestStandard" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.passwordResponse", + "summary": "Internal API for Password Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "type": "string", + "examples": [ + "password" + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-response-for": "onRequestPassword" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": "password" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.passwordError", + "summary": "Internal API for Password Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-error-for": "onRequestPassword" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.emailResponse", + "summary": "Internal API for Email Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "type": "string", + "examples": [ + "email@address.com" + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-response-for": "onRequestEmail" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": "email@address.com" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.emailError", + "summary": "Internal API for Email Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-error-for": "onRequestEmail" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.ready", + "tags": [ + { + "name": "calls-metrics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:ready" + ] + }, + { + "name": "exclude-from-sdk" + } + ], + "summary": "Notify the platform that the app is ready", + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Let the platform know that your app is ready", + "params": [], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.close", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Request that the platform move your app out of focus", + "params": [ + { + "name": "reason", + "summary": "The reason the app is requesting to be closed", + "required": true, + "schema": { + "$ref": "#/x-schemas/Lifecycle/CloseReason" + } + } + ], + "result": { + "name": "success", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Close the app when the user presses back on the app home screen", + "params": [ + { + "name": "reason", + "value": "remoteButton" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Close the app when the user selects an exit menu item", + "params": [ + { + "name": "reason", + "value": "userExit" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.finished", + "tags": [ + { + "name": "exclude-from-sdk" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Notify the platform that the app is done unloading", + "params": [], + "result": { + "name": "results", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.state", + "summary": "Get the current state of the app. This function is **synchronous**.", + "tags": [ + { + "name": "synchronous" + }, + { + "name": "exclude-from-sdk" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "params": [], + "result": { + "name": "state", + "summary": "the current state of the app.", + "schema": { + "$ref": "#/x-schemas/Lifecycle/LifecycleState" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "foreground" + } + } + ] + }, + { + "name": "Lifecycle.onInactive", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the inactive event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "inactive", + "previous": "initializing" + } + } + } + ] + }, + { + "name": "Lifecycle.onForeground", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the foreground event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "foreground", + "previous": "inactive" + } + } + }, + { + "name": "Move to foreground via remote branded buton", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "value", + "value": { + "state": "foreground", + "previous": "inactive", + "source": "remote" + } + } + } + ] + }, + { + "name": "Lifecycle.onBackground", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the background event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "background", + "previous": "foreground" + } + } + } + ] + }, + { + "name": "Lifecycle.onSuspended", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the suspended event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "suspended", + "previous": "inactive" + } + } + } + ] + }, + { + "name": "Lifecycle.onUnloading", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the unloading event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "unloading", + "previous": "inactive" + } + } + } + ] + }, + { + "name": "Localization.locality", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locality" + ] + }, + { + "name": "property" + } + ], + "summary": "Get the locality/city the device is located in", + "params": [], + "result": { + "name": "locality", + "summary": "the device city", + "schema": { + "$ref": "#/x-schemas/Localization/Locality" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "Philadelphia" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "Rockville" + } + } + ] + }, + { + "name": "Localization.postalCode", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:postal-code" + ] + } + ], + "summary": "Get the postal code the device is located in", + "params": [], + "result": { + "name": "postalCode", + "summary": "the device postal code", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "19103" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "20850" + } + } + ] + }, + { + "name": "Localization.countryCode", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Get the ISO 3166-1 alpha-2 code for the country device is located in", + "params": [], + "result": { + "name": "code", + "summary": "the device country code", + "schema": { + "$ref": "#/x-schemas/Localization/CountryCode" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "US" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "UK" + } + } + ] + }, + { + "name": "Localization.language", + "summary": "Get the ISO 639 1/2 code for the preferred language", + "params": [], + "tags": [ + { + "name": "deprecated", + "x-since": "0.17.0", + "x-alternative": "Localization.locale" + }, + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "lang", + "summary": "the device language", + "schema": { + "$ref": "#/x-schemas/Localization/Language" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "en" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "es" + } + } + ] + }, + { + "name": "Localization.preferredAudioLanguages", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred audio languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "Localization.locale", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale", + "params": [], + "result": { + "name": "locale", + "summary": "the device locale", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "en-US" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "es-US" + } + } + ] + }, + { + "name": "Localization.latlon", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:location" + ] + } + ], + "summary": "Get the approximate latitude and longitude coordinates of the device location", + "params": [], + "result": { + "name": "latlong", + "summary": "lat/long tuple", + "schema": { + "$ref": "#/components/schemas/LatLon" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 39.9549, + 75.1699 + ] + } + } + ] + }, + { + "name": "Localization.additionalInfo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:additional-info" + ] + } + ], + "summary": "Get any platform-specific localization information, in an Map", + "params": [], + "result": { + "name": "info", + "summary": "the additional info", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "maxLength": 1024 + }, + "maxProperties": 32 + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "info", + "value": {} + } + } + ] + }, + { + "name": "Localization.addAdditionalInfo", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:additional-info" + ] + } + ], + "summary": "Add any platform-specific localization information in key/value pair", + "params": [ + { + "name": "key", + "summary": "Key to add additionalInfo", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "value", + "summary": "Value to be set for additionalInfo", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Add an additionalInfo for localization", + "params": [ + { + "name": "key", + "value": "defaultKey" + }, + { + "name": "value", + "value": "defaultValue=" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Localization.removeAdditionalInfo", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:additional-info" + ] + } + ], + "summary": "Remove any platform-specific localization information from map", + "params": [ + { + "name": "key", + "summary": "Key to remove additionalInfo", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Remove an additionalInfo for localization", + "params": [ + { + "name": "key", + "value": "defaultKey" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Localization.timeZone", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:time-zone" + ] + } + ], + "summary": "Set the IANA timezone for the device", + "params": [], + "result": { + "name": "result", + "schema": { + "$ref": "#/x-schemas/Localization/TimeZone" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "America/New_York" + } + }, + { + "name": "Additional Example", + "params": [], + "result": { + "name": "Default Result", + "value": "America/Los_Angeles" + } + } + ] + }, + { + "name": "Localization.onLocalityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.locality" + }, + { + "name": "event", + "x-alternative": "locality" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locality" + ] + } + ], + "summary": "Get the locality/city the device is located in", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "locality", + "summary": "the device city", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/Locality" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Philadelphia" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Rockville" + } + } + ] + }, + { + "name": "Localization.onPostalCodeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.postalCode" + }, + { + "name": "event", + "x-alternative": "postalCode" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:postal-code" + ] + } + ], + "summary": "Get the postal code the device is located in", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "postalCode", + "summary": "the device postal code", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "19103" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "20850" + } + } + ] + }, + { + "name": "Localization.onCountryCodeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.countryCode" + }, + { + "name": "event", + "x-alternative": "countryCode" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Get the ISO 3166-1 alpha-2 code for the country device is located in", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "code", + "summary": "the device country code", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/CountryCode" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "US" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "UK" + } + } + ] + }, + { + "name": "Localization.onLanguageChanged", + "summary": "Get the ISO 639 1/2 code for the preferred language", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.language" + }, + { + "name": "event", + "x-alternative": "language" + }, + { + "name": "deprecated", + "x-since": "0.17.0", + "x-alternative": "Localization.locale" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "lang", + "summary": "the device language", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/Language" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "en" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "es" + } + } + ] + }, + { + "name": "Localization.onPreferredAudioLanguagesChanged", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.preferredAudioLanguages" + }, + { + "name": "event", + "x-alternative": "preferredAudioLanguages" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred audio languages", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "Localization.onLocaleChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.locale" + }, + { + "name": "event", + "x-alternative": "locale" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "locale", + "summary": "the device locale", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/Locale" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "en-US" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "es-US" + } + } + ] + }, + { + "name": "Localization.onTimeZoneChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.timeZone" + }, + { + "name": "event", + "x-alternative": "timeZone" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:time-zone" + ] + } + ], + "summary": "Set the IANA timezone for the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "result", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/TimeZone" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "America/New_York" + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "America/Los_Angeles" + } + } + ] + }, + { + "name": "Localization.setLocality", + "tags": [ + { + "name": "setter", + "x-setter-for": "locality" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:locality" + ] + } + ], + "summary": "Get the locality/city the device is located in", + "params": [ + { + "name": "value", + "summary": "the device city", + "schema": { + "$ref": "#/x-schemas/Localization/Locality" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "Philadelphia" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "Rockville" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setPostalCode", + "tags": [ + { + "name": "setter", + "x-setter-for": "postalCode" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:postal-code" + ] + } + ], + "summary": "Get the postal code the device is located in", + "params": [ + { + "name": "value", + "summary": "the device postal code", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "19103" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "20850" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setCountryCode", + "tags": [ + { + "name": "setter", + "x-setter-for": "countryCode" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Get the ISO 3166-1 alpha-2 code for the country device is located in", + "params": [ + { + "name": "value", + "summary": "the device country code", + "schema": { + "$ref": "#/x-schemas/Localization/CountryCode" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "US" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "UK" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setLanguage", + "summary": "Get the ISO 639 1/2 code for the preferred language", + "params": [ + { + "name": "value", + "summary": "the device language", + "schema": { + "$ref": "#/x-schemas/Localization/Language" + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "language" + }, + { + "name": "deprecated", + "x-since": "0.17.0", + "x-alternative": "Localization.locale" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "en" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "es" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setPreferredAudioLanguages", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [ + { + "name": "value", + "summary": "the preferred audio languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "preferredAudioLanguages" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": [ + "spa", + "eng" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "value", + "value": [ + "eng", + "spa" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setLocale", + "tags": [ + { + "name": "setter", + "x-setter-for": "locale" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale", + "params": [ + { + "name": "value", + "summary": "the device locale", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "en-US" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "es-US" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setTimeZone", + "tags": [ + { + "name": "setter", + "x-setter-for": "timeZone" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:time-zone" + ] + } + ], + "summary": "Set the IANA timezone for the device", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Localization/TimeZone" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": "America/New_York" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "value", + "value": "America/Los_Angeles" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Metrics.ready", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send ready metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.signIn", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign in event, called by Discovery.signIn().", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signIn metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send signIn metric with entitlements", + "params": [ + { + "name": "entitlements", + "value": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.signOut", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign out event, called by Discovery.signOut().", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signOut metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.startContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has started content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send startContent metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send startContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.stopContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has stopped content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send stopContent metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send stopContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.page", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has navigated to a page or view.", + "params": [ + { + "name": "pageId", + "summary": "Page ID of the content.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send page metric", + "params": [ + { + "name": "pageId", + "value": "xyz" + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send startContent metric w/ entity", + "params": [ + { + "name": "pageId", + "value": "home" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.action", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform of something not covered by other Metrics APIs.", + "params": [ + { + "name": "category", + "summary": "The category of action being logged. Must be 'user' for user-initated actions or 'app' for all other actions", + "schema": { + "type": "string", + "enum": [ + "user", + "app" + ] + }, + "required": true + }, + { + "name": "type", + "summary": "A short, indexible identifier for the action, e.g. 'SignIn Prompt Displayed'", + "schema": { + "type": "string", + "maxLength": 256 + }, + "required": true + }, + { + "name": "parameters", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send foo action", + "params": [ + { + "name": "category", + "value": "user" + }, + { + "name": "type", + "value": "The user did foo" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.error", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform of an error that has occured in your app.", + "params": [ + { + "name": "type", + "summary": "The type of error", + "schema": { + "$ref": "#/components/schemas/ErrorType" + }, + "required": true + }, + { + "name": "code", + "summary": "an app-specific error code", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "description", + "summary": "A short description of the error", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "visible", + "summary": "Whether or not this error was visible to the user.", + "schema": { + "type": "boolean" + }, + "required": true + }, + { + "name": "parameters", + "summary": "Optional additional parameters to be logged with the error", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send error metric", + "params": [ + { + "name": "type", + "value": "media" + }, + { + "name": "code", + "value": "MEDIA-STALLED" + }, + { + "name": "description", + "value": "playback stalled" + }, + { + "name": "visible", + "value": true + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaLoadStart", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when setting the URL of a media asset to play, in order to infer load time.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send loadstart metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPlay", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback should start due to autoplay, user-initiated play, or unpausing.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send play metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPlaying", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interuption.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send playing metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPause", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will pause due to an intentional pause operation.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send pause metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaWaiting", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will halt due to a network, buffer, or other unintentional constraint.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send waiting metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaProgress", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called every 60 seconds as media playback progresses.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "progress", + "summary": "Progress of playback, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send progress metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "progress", + "value": 0.75 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaSeeking", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is initiated during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "target", + "summary": "Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send seeking metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "target", + "value": 0.5 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaSeeked", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is completed during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "position", + "summary": "Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send seeked metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "position", + "value": 0.51 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaRateChange", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rate of media is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "rate", + "summary": "The new playback rate.", + "schema": { + "type": "number" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send ratechange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "rate", + "value": 2 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaRenditionChange", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "bitrate", + "summary": "The new bitrate in kbps.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "width", + "summary": "The new resolution width.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "height", + "summary": "The new resolution height.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "profile", + "summary": "A description of the new profile, e.g. 'HDR' etc.", + "schema": { + "type": "string" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send renditionchange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "bitrate", + "value": 5000 + }, + { + "name": "width", + "value": 1920 + }, + { + "name": "height", + "value": 1080 + }, + { + "name": "profile", + "value": "HDR+" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaEnded", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when playback has stopped because the end of the media was reached.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send ended metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.event", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:distributor" + ] + } + ], + "summary": "Inform the platform of 1st party distributor metrics.", + "params": [ + { + "name": "schema", + "summary": "The schema URI of the metric type", + "schema": { + "type": "string", + "format": "uri" + }, + "required": true + }, + { + "name": "data", + "summary": "A JSON payload conforming the the provided schema", + "schema": { + "$ref": "#/components/schemas/EventObject" + }, + "required": true + } + ], + "result": { + "name": "results", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send foo event", + "params": [ + { + "name": "schema", + "value": "http://meta.rdkcentral.com/some/schema" + }, + { + "name": "data", + "value": { + "foo": "foo" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.appInfo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform about an app's build info.", + "params": [ + { + "name": "build", + "summary": "The build / version of this app.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send appInfo metric", + "params": [ + { + "name": "build", + "value": "1.2.2" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Parameters.initialization", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Returns any initialization parameters for the app, e.g. initialial `NavigationIntent`.", + "params": [], + "result": { + "name": "init", + "summary": "The initialization parameters.", + "schema": { + "$ref": "#/components/schemas/AppInitialization" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "init", + "value": { + "lmt": 0, + "us_privacy": "1-Y-", + "discovery": { + "navigateTo": { + "action": "entity", + "data": { + "entityId": "abc", + "entityType": "program", + "programType": "movie" + }, + "context": { + "source": "voice" + } + } + } + } + } + } + ] + }, + { + "name": "PinChallenge.onRequestChallenge", + "summary": "Registers as a provider for when the user should be challenged in order to confirm access to a capability through a pin prompt", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "$ref": "#/components/schemas/PinChallengeResult", + "examples": [ + { + "granted": true, + "reason": "correctPin" + }, + { + "granted": false, + "reason": "exceededPinFailures" + }, + { + "granted": null, + "reason": "cancelled" + } + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true + } + ], + "result": { + "name": "challenge", + "summary": "The request to challenge the user", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/PinChallengeProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "capability": "xrn:firebolt:capability:commerce::purchase", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + }, + "pinSpace": "purchase" + } + } + } + } + ] + }, + { + "name": "PinChallenge.challengeFocus", + "summary": "Internal API for Challenge Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "PinChallenge.challengeResponse", + "summary": "Internal API for Challenge Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "$ref": "#/components/schemas/PinChallengeResult", + "examples": [ + { + "granted": true, + "reason": "correctPin" + }, + { + "granted": false, + "reason": "exceededPinFailures" + }, + { + "granted": null, + "reason": "cancelled" + } + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true, + "x-response-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example #1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": true, + "reason": "correctPin" + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #2", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": false, + "reason": "exceededPinFailures" + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #3", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": null, + "reason": "cancelled" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "PinChallenge.challengeError", + "summary": "Internal API for Challenge Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true, + "x-error-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Privacy.allowResumePoints", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content to show in the main experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowUnentitledResumePoints", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content from unentitled providers to show in the main experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowWatchHistory", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their watch history from all sources to show in the main experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowProductAnalytics", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data can be used for analytics about the product", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowPersonalization", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowUnentitledPersonalization", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations for unentitled content", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowRemoteDiagnostics", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowPrimaryContentAdTargeting", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in the primary experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowPrimaryBrowseAdTargeting", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while browsing in the primary experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowAppContentAdTargeting", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in apps", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowACRCollection", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their automatic content recognition data to be collected", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowCameraAnalytics", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows data from their camera to be used for Product Analytics", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.settings", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Gets the allowed value for all privacy settings", + "params": [], + "result": { + "name": "settings", + "schema": { + "$ref": "#/components/schemas/PrivacySettings" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "settings", + "value": { + "allowACRCollection": true, + "allowResumePoints": false, + "allowAppContentAdTargeting": false, + "allowCameraAnalytics": true, + "allowPersonalization": true, + "allowPrimaryBrowseAdTargeting": false, + "allowPrimaryContentAdTargeting": false, + "allowProductAnalytics": true, + "allowRemoteDiagnostics": true, + "allowUnentitledPersonalization": true, + "allowUnentitledResumePoints": false, + "allowWatchHistory": true + } + } + } + ] + }, + { + "name": "Privacy.onAllowResumePointsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowResumePoints" + }, + { + "name": "event", + "x-alternative": "allowResumePoints" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content to show in the main experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowUnentitledResumePointsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowUnentitledResumePoints" + }, + { + "name": "event", + "x-alternative": "allowUnentitledResumePoints" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content from unentitled providers to show in the main experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowWatchHistoryChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowWatchHistory" + }, + { + "name": "event", + "x-alternative": "allowWatchHistory" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their watch history from all sources to show in the main experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowProductAnalyticsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowProductAnalytics" + }, + { + "name": "event", + "x-alternative": "allowProductAnalytics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data can be used for analytics about the product", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowPersonalizationChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowPersonalization" + }, + { + "name": "event", + "x-alternative": "allowPersonalization" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowUnentitledPersonalizationChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowUnentitledPersonalization" + }, + { + "name": "event", + "x-alternative": "allowUnentitledPersonalization" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations for unentitled content", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowRemoteDiagnosticsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowRemoteDiagnostics" + }, + { + "name": "event", + "x-alternative": "allowRemoteDiagnostics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowPrimaryContentAdTargetingChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowPrimaryContentAdTargeting" + }, + { + "name": "event", + "x-alternative": "allowPrimaryContentAdTargeting" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in the primary experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowPrimaryBrowseAdTargetingChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowPrimaryBrowseAdTargeting" + }, + { + "name": "event", + "x-alternative": "allowPrimaryBrowseAdTargeting" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while browsing in the primary experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowAppContentAdTargetingChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowAppContentAdTargeting" + }, + { + "name": "event", + "x-alternative": "allowAppContentAdTargeting" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in apps", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowACRCollectionChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowACRCollection" + }, + { + "name": "event", + "x-alternative": "allowACRCollection" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their automatic content recognition data to be collected", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowCameraAnalyticsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowCameraAnalytics" + }, + { + "name": "event", + "x-alternative": "allowCameraAnalytics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows data from their camera to be used for Product Analytics", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.setAllowResumePoints", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowResumePoints" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content to show in the main experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowUnentitledResumePoints", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowUnentitledResumePoints" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content from unentitled providers to show in the main experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowWatchHistory", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowWatchHistory" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their watch history from all sources to show in the main experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowProductAnalytics", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowProductAnalytics" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data can be used for analytics about the product", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowPersonalization", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowPersonalization" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowUnentitledPersonalization", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowUnentitledPersonalization" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations for unentitled content", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowRemoteDiagnostics", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowRemoteDiagnostics" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowPrimaryContentAdTargeting", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowPrimaryContentAdTargeting" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in the primary experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowPrimaryBrowseAdTargeting", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowPrimaryBrowseAdTargeting" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while browsing in the primary experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowAppContentAdTargeting", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowAppContentAdTargeting" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in apps", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowACRCollection", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowACRCollection" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their automatic content recognition data to be collected", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowCameraAnalytics", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowCameraAnalytics" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows data from their camera to be used for Product Analytics", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Profile.approveContentRating", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:approve:content" + ] + } + ], + "summary": "Verifies that the current profile should have access to mature/adult content.", + "params": [], + "result": { + "name": "allow", + "summary": "Whether or not to allow access", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Profile.approvePurchase", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:approve:purchase" + ] + } + ], + "summary": "Verifies that the current profile should have access to making purchases.", + "params": [], + "result": { + "name": "allow", + "summary": "Whether or not to allow access", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Profile.flags", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:profile:flags" + ] + } + ], + "summary": "Get a map of profile flags for the current session.", + "params": [], + "result": { + "name": "flags", + "summary": "The profile flags.", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "flags", + "value": { + "userExperience": "1000" + } + } + } + ] + }, + { + "name": "SecondScreen.protocols", + "summary": "Get the supported second screen discovery protocols", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "params": [], + "result": { + "name": "protocols", + "summary": "the supported protocols", + "schema": { + "$ref": "#/x-schemas/Types/BooleanMap" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": { + "dial1.7": true + } + } + } + ] + }, + { + "name": "SecondScreen.device", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "summary": "Get the broadcasted id for the device", + "params": [ + { + "name": "type", + "summary": "The type of second screen protocol, e.g. \"dial\"", + "required": false, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "deviceId", + "summary": "the device id", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "device-id" + } + } + ] + }, + { + "name": "SecondScreen.friendlyName", + "summary": "Get the broadcasted friendly name for the device", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "result": { + "name": "friendlyName", + "summary": "the device friendly-name", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "friendlyName", + "value": "Living Room" + } + } + ] + }, + { + "name": "SecondScreen.onLaunchRequest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "summary": "Listen to the launchRequest event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "launchRequestEvent", + "summary": "Dispatched when a second screen device on the local network has requested this app to be launched", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/SecondScreen/SecondScreenEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "type": "dial", + "version": "1.7", + "data": "{\"code\":\"AQDPQZiQcb3KQ7gY7yy5tHTMbbkGHR9Zjp-KL53H3eKBZIeAt7O9UKYPu6B21l2UZVmIqkFXDXBmXvK4g2e3EgZtjMNmKPsTltgnRl95DImtOXjSpWtTjSaOkW4w1kZKUTwLKdwVWTzBVH8ERHorvLU6vCGOVHxXt65LNwdl5HKRweShVC1V9QsyvRnQS61ov0UclmrH_xZML2Bt-Q-rZFjey5MjwupIb4x4f53XUJMhjHpDHoIUKrjpdPDQvK2a\",\"friendlyName\":\"Operator_TX061AEI\",\"UDN\":\"608fef11-2800-482a-962b-23a6690c93c1\"}" + } + } + } + ] + }, + { + "name": "SecondScreen.onCloseRequest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "summary": "Listen to the closeRequest event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "closeRequestEvent", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/SecondScreen/SecondScreenEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "type": "dial", + "version": "1.7" + } + } + } + ] + }, + { + "name": "SecondScreen.onFriendlyNameChanged", + "summary": "Get the broadcasted friendly name for the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "SecondScreen.friendlyName" + }, + { + "name": "event", + "x-alternative": "friendlyName" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "result": { + "name": "friendlyName", + "summary": "the device friendly-name", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "friendlyName", + "value": "Living Room" + } + } + ] + }, + { + "name": "SecureStorage.get", + "summary": "Get stored value by key", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to get", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "value", + "summary": "The retrieved value, if found.", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "examples": [ + { + "name": "Successfully retrieve a refresh token with key authRefreshToken", + "params": [ + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } + }, + { + "name": "Attempt to retrieve a key with no value set", + "params": [ + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "value", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.set", + "summary": "Set or update a secure data value", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the data key", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "value", + "summary": "Value to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "options", + "summary": "Optional parameters to set", + "schema": { + "$ref": "#/components/schemas/StorageOptions" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Set a refresh token with name authRefreshToken with optional paramter", + "params": [ + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + }, + { + "name": "options", + "value": { + "ttl": 600 + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "Set a refresh token with name authRefreshToken without optional parameter", + "params": [ + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.remove", + "summary": "Remove a secure data value", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the data key", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to remove", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Remove the value with key authRefreshToken for device", + "params": [ + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "Remove the value with key authRefreshToken for account", + "params": [ + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.setForApp", + "summary": "Set or update a secure data value for a specific app.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "appId", + "summary": "appId for which value is being set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "scope", + "summary": "The scope of the data key", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "value", + "summary": "Value to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "options", + "summary": "Optional parameters to set", + "schema": { + "$ref": "#/components/schemas/StorageOptions" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Set a refresh token with name authRefreshToken with optional parameter for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + }, + { + "name": "options", + "value": { + "ttl": 600 + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "Set a refresh token with name authRefreshToken without optional parameter for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.removeForApp", + "summary": "Removes single data value for a specific app.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "appId", + "summary": "appId for which values are removed", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to remove", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Removes authRefreshToken for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.clearForApp", + "summary": "Clears all the secure data values for a specific app", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "appId", + "summary": "appId for which values are removed", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Clears all the secure data values for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "account" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.clear", + "summary": "Clears all the secure data values", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Clears all the data values of storage", + "params": [ + { + "name": "scope", + "value": "account" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.app", + "summary": "Get all granted and denied user grants for the given app", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "appId", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "info", + "summary": "The list of grants for this app", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "appId", + "value": "certapp" + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:data:app-usage", + "role": "use", + "lifespan": "seconds", + "expires": "2022-12-14T20:20:39+00:00" + }, + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "denied", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "appActive" + } + ] + } + } + ] + }, + { + "name": "UserGrants.device", + "summary": "Get all granted and denied user grants for the device", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [], + "result": { + "name": "info", + "summary": "The list of grants for the device", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "defaultResult", + "value": [ + { + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + } + ] + }, + { + "name": "UserGrants.capability", + "summary": "Get all granted and denied user grants for the given capability", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + } + ], + "result": { + "name": "info", + "summary": "The list of grants associated with the given capability", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + } + ] + }, + { + "name": "UserGrants.grant", + "summary": "Grants a given capability to a specific app, if appropriate. Calling this results in a persisted active grant that lasts for the duration of the grant policy lifespan. ", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "role", + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "required": true + }, + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + }, + { + "name": "options", + "schema": { + "$ref": "#/components/schemas/GrantModificationOptions" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "options", + "value": { + "appId": "certapp" + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.deny", + "summary": "Denies a given capability, to a specific app if appropriate. Calling this results in a persisted Denied Grant that lasts for the duration of the Grant Policy lifespan. ", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "role", + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "required": true + }, + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + }, + { + "name": "options", + "schema": { + "$ref": "#/components/schemas/GrantModificationOptions" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "options", + "value": { + "appId": "certapp" + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.clear", + "summary": "Clears the grant for a given capability, to a specific app if appropriate. Calling this results in a persisted Denied Grant that lasts for the duration of the Grant Policy lifespan. ", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "role", + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "required": true + }, + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + }, + { + "name": "options", + "schema": { + "$ref": "#/components/schemas/GrantModificationOptions" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "options", + "value": { + "appId": "certapp" + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.request", + "summary": "Requests Firebolt to carry out a set of user grants for a given application such that the user grant provider is notified or an existing user grant is reused.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "appId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "permissions", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/Permission" + }, + "minItems": 1 + }, + "required": true + }, + { + "name": "options", + "summary": "Request options", + "schema": { + "$ref": "#/components/schemas/RequestOptions" + }, + "required": false + } + ], + "result": { + "name": "info", + "summary": "The result of all grants requested by this", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default result #1", + "params": [ + { + "name": "appId", + "value": "certapp" + }, + { + "name": "permissions", + "value": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code" + } + ] + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "app": { + "id": "certapp", + "title": "Certification App" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + }, + { + "name": "Default result #2", + "params": [ + { + "name": "appId", + "value": "certapp" + }, + { + "name": "permissions", + "value": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code" + } + ] + }, + { + "name": "options", + "value": { + "force": true + } + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "app": { + "id": "certapp", + "title": "Certification App" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + } + ] + }, + { + "name": "VoiceGuidance.enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "Whether or not voice-guidance is enabled.", + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "VoiceGuidance.speed", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "The speed at which voice guidance speech will be read back to the user.", + "params": [], + "result": { + "name": "speed", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed" + } + }, + "examples": [ + { + "name": "Voice guidance speed to 1", + "params": [], + "result": { + "name": "speed", + "value": 1 + } + }, + { + "name": "Voice guidance speed to 2", + "params": [], + "result": { + "name": "speed", + "value": 2 + } + } + ] + }, + { + "name": "VoiceGuidance.onEnabledChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "VoiceGuidance.enabled" + }, + { + "name": "event", + "x-alternative": "enabled" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "Whether or not voice-guidance is enabled.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "VoiceGuidance.onSpeedChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "VoiceGuidance.speed" + }, + { + "name": "event", + "x-alternative": "speed" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "The speed at which voice guidance speech will be read back to the user.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "speed", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed" + } + ] + } + }, + "examples": [ + { + "name": "Voice guidance speed to 1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "speed", + "value": 1 + } + }, + { + "name": "Voice guidance speed to 2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "speed", + "value": 2 + } + } + ] + }, + { + "name": "VoiceGuidance.setEnabled", + "tags": [ + { + "name": "setter", + "x-setter-for": "enabled" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "Whether or not voice-guidance is enabled.", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "VoiceGuidance.setSpeed", + "tags": [ + { + "name": "setter", + "x-setter-for": "speed" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "The speed at which voice guidance speech will be read back to the user.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Voice guidance speed to 1", + "params": [ + { + "name": "value", + "value": 1 + } + ], + "result": { + "name": "speed", + "value": null + } + }, + { + "name": "Voice guidance speed to 2", + "params": [ + { + "name": "value", + "value": 2 + } + ], + "result": { + "name": "speed", + "value": null + } + } + ] + }, + { + "name": "Wifi.scan", + "summary": "Scan available wifi networks in the location.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [ + { + "name": "timeout", + "schema": { + "$ref": "#/x-schemas/Types/Timeout" + } + } + ], + "result": { + "name": "list", + "summary": "Contains a list of wifi networks available near the device.", + "schema": { + "$ref": "#/components/schemas/AccessPointList" + } + }, + "examples": [ + { + "name": "Successful Wifi List", + "params": [ + { + "name": "timeout", + "value": 30 + } + ], + "result": { + "name": "successfulWifiResultExample", + "value": { + "list": [ + { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + }, + { + "ssid": "Fortnite", + "security": "WPA2_ENTERPRISE_AES", + "signalStrength": -70, + "frequency": 5 + }, + { + "ssid": "Guardian", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } + ] + } + } + } + ] + }, + { + "name": "Wifi.connect", + "summary": "Connect the device to the specified SSID.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [ + { + "name": "ssid", + "schema": { + "type": "string" + }, + "description": "Name of Wifi SSID to connect for the device." + }, + { + "name": "passphrase", + "schema": { + "type": "string" + }, + "description": "Password or Passphrase for the wifi." + }, + { + "name": "security", + "schema": { + "$ref": "#/components/schemas/WifiSecurityMode" + } + } + ], + "result": { + "name": "connectedWifi", + "summary": "Successful Response after connecting to the Wifi.", + "schema": { + "$ref": "#/components/schemas/AccessPoint" + } + }, + "examples": [ + { + "name": "Connect to a wpa2Psk Wifi with password", + "params": [ + { + "name": "ssid", + "value": "DND" + }, + { + "name": "passphrase", + "value": "gargoyle" + }, + { + "name": "security", + "value": "wpa2Psk" + } + ], + "result": { + "name": "successfulWifiConnection", + "value": { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + } + } + }, + { + "name": "Connect to a WPA2 PSK Wifi with password", + "params": [ + { + "name": "ssid", + "value": "Guardian WIFI" + }, + { + "name": "passphrase", + "value": "" + }, + { + "name": "security", + "value": "none" + } + ], + "result": { + "name": "successfulWifiConnection", + "value": { + "ssid": "Guardian WIFI", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } + } + } + ] + }, + { + "name": "Wifi.disconnect", + "summary": "Disconnect the device if connected via WIFI.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Disconnect", + "params": [], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Wifi.wps", + "summary": "Connect to WPS", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [ + { + "name": "security", + "schema": { + "$ref": "#/components/schemas/WPSSecurityPin" + } + } + ], + "result": { + "name": "connectedWifi", + "summary": "Successful Response after connecting to the Wifi.", + "schema": { + "$ref": "#/components/schemas/AccessPoint" + } + }, + "examples": [ + { + "name": "Connect to a WPS Wifi router", + "params": [ + { + "name": "security", + "value": "pushButton" + } + ], + "result": { + "name": "successfulWifiConnection", + "value": { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + } + } + } + ] + } + ], + "components": { + "schemas": { + "AudioDescriptionSettings": { + "title": "AudioDescriptionSettings", + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not audio descriptions should be enabled by default" + } + } + }, + "Token": { + "type": "string", + "description": "Encoded token provided by the Distributor for Device Authentication." + }, + "Expiry": { + "type": "integer", + "description": "Number of secs before the token expires", + "minimum": 1 + }, + "ChallengeRequestor": { + "title": "ChallengeRequestor", + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "The id of the app that requested the challenge" + }, + "name": { + "type": "string", + "description": "The name of the app that requested the challenge" + } + } + }, + "Challenge": { + "title": "Challenge", + "type": "object", + "required": [ + "capability", + "requestor" + ], + "properties": { + "capability": { + "type": "string", + "description": "The capability that is being requested by the user to approve" + }, + "requestor": { + "description": "The identity of which app is requesting access to this capability", + "$ref": "#/components/schemas/ChallengeRequestor" + } + } + }, + "ChallengeProviderRequest": { + "title": "ChallengeProviderRequest", + "allOf": [ + { + "$ref": "#/x-schemas/Types/ProviderRequest" + }, + { + "type": "object", + "required": [ + "parameters" + ], + "properties": { + "parameters": { + "description": "The request to challenge the user", + "$ref": "#/components/schemas/Challenge" + } + } + } + ] + }, + "GrantResult": { + "title": "GrantResult", + "type": "object", + "required": [ + "granted" + ], + "properties": { + "granted": { + "oneOf": [ + { + "type": "boolean", + "description": "Whether the user approved or denied the challenge" + }, + { + "const": null + } + ] + } + }, + "examples": [ + { + "granted": true + }, + { + "granted": false + }, + { + "granted": null + } + ] + }, + "AdPolicy": { + "title": "AdPolicy", + "description": "Describes various ad playback enforcement rules that the app should follow.", + "type": "object", + "properties": { + "skipRestriction": { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + }, + "limitAdTracking": { + "type": "boolean" + } + } + }, + "AdConfigurationOptions": { + "title": "AdConfigurationOptions", + "type": "object", + "properties": { + "coppa": { + "type": "boolean", + "description": "Whether or not the app requires US COPPA compliance." + }, + "environment": { + "type": "string", + "enum": [ + "prod", + "test" + ], + "default": "prod", + "description": "Whether the app is running in a production or test mode." + }, + "authenticationEntity": { + "type": "string", + "description": "The authentication provider, when it is separate entity than the app provider, e.g. an MVPD." + } + } + }, + "AdvertisingIdOptions": { + "title": "AdvertisingIdOptions", + "type": "object", + "properties": { + "scope": { + "type": "object", + "description": "Provides the options to send scope type and id to select desired advertising id", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "browse", + "content" + ], + "default": "browse", + "description": "The scope type, which will determine where to show advertisement" + }, + "id": { + "type": "string", + "description": "A value that identifies a specific scope within the scope type" + } + } + } + } + }, + "TokenType": { + "title": "TokenType", + "type": "string", + "enum": [ + "platform", + "device", + "distributor" + ] + }, + "CapabilityOption": { + "title": "CapabilityOption", + "type": "object", + "properties": { + "role": { + "$ref": "#/x-schemas/Capabilities/Role", + "description": "Which role of the capability to check the state of, default will be 'use'", + "default": "use" + } + } + }, + "ClosedCaptionsSettingsProviderRequest": { + "title": "ClosedCaptionsSettingsProviderRequest", + "allOf": [ + { + "$ref": "#/x-schemas/Types/ProviderRequest" + }, + { + "type": "object", + "properties": { + "parameters": { + "const": null + } + } + } + ], + "examples": [ + { + "correlationId": "abc" + } + ] + }, + "InterestResult": { + "title": "InterestResult", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "entity": { + "$ref": "#/x-schemas/Entity/EntityDetails" + } + }, + "required": [ + "appId", + "entity" + ] + }, + "InterestEvent": { + "title": "InterestEvent", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "type": { + "$ref": "#/x-schemas/Discovery/InterestType" + }, + "reason": { + "$ref": "#/x-schemas/Discovery/InterestReason" + }, + "entity": { + "$ref": "#/x-schemas/Entity/EntityDetails" + } + }, + "required": [ + "appId", + "entity", + "type", + "reason" + ] + }, + "Resolution": { + "type": "array", + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "NetworkType": { + "title": "NetworkType", + "type": "string", + "enum": [ + "wifi", + "ethernet", + "hybrid" + ], + "description": "The type of network that is currently active" + }, + "NetworkState": { + "title": "NetworkState", + "type": "string", + "enum": [ + "connected", + "disconnected" + ], + "description": "The type of network that is currently active" + }, + "AudioProfiles": { + "title": "AudioProfiles", + "allOf": [ + { + "$ref": "#/x-schemas/Types/BooleanMap" + }, + { + "type": "object", + "propertyNames": { + "$ref": "#/x-schemas/Types/AudioProfile" + } + } + ] + }, + "DiscoveryPolicy": { + "title": "DiscoveryPolicy", + "type": "object", + "required": [ + "enableRecommendations", + "shareWatchHistory", + "rememberWatchedPrograms" + ], + "properties": { + "enableRecommendations": { + "type": "boolean", + "description": "Whether or not to the user has enabled history-based recommendations" + }, + "shareWatchHistory": { + "type": "boolean", + "description": "Whether or not the user has enabled app watch history data to be shared with the platform" + }, + "rememberWatchedPrograms": { + "type": "boolean", + "description": "Whether or not the user has enabled watch history" + } + } + }, + "FederatedRequest": { + "title": "FederatedRequest", + "type": "object", + "properties": { + "correlationId": { + "type": "string" + } + }, + "required": [ + "correlationId" + ], + "propertyNames": { + "enum": [ + "correlationId", + "parameters" + ] + }, + "examples": [ + { + "correlationId": "xyz" + } + ] + }, + "FederatedResponse": { + "title": "FederatedResponse", + "type": "object", + "properties": { + "correlationId": { + "type": "string" + } + }, + "required": [ + "correlationId", + "result" + ], + "propertyNames": { + "enum": [ + "correlationId", + "result" + ] + }, + "examples": [ + { + "correlationId": "xyz" + } + ] + }, + "EntityInfoFederatedRequest": { + "title": "EntityInfoFederatedRequest", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedRequest" + }, + { + "type": "object", + "properties": { + "parameters": { + "$ref": "#/components/schemas/EntityInfoParameters" + } + }, + "required": [ + "correlationId", + "parameters" + ] + } + ], + "examples": [ + { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + ] + }, + "EntityInfoParameters": { + "title": "EntityInfoParameters", + "type": "object", + "properties": { + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + } + }, + "required": [ + "entityId" + ], + "additionalProperties": false, + "examples": [ + { + "entityId": "345" + } + ] + }, + "EntityInfoFederatedResponse": { + "title": "EntityInfoFederatedResponse", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedResponse" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/x-schemas/Discovery/EntityInfoResult" + } + } + } + ] + }, + "EntityInfoResult": { + "title": "EntityInfoResult", + "description": "The result for an `entityInfo()` push or pull.", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "entity": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + }, + "related": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "entity" + ], + "additionalProperties": false + }, + "PurchasedContentFederatedRequest": { + "title": "PurchasedContentFederatedRequest", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedRequest" + }, + { + "type": "object", + "properties": { + "parameters": { + "$ref": "#/components/schemas/PurchasedContentParameters" + } + }, + "required": [ + "correlationId", + "parameters" + ] + } + ], + "examples": [ + { + "correlationId": "xyz", + "parameters": { + "limit": 100 + } + } + ] + }, + "PurchasedContentParameters": { + "title": "PurchasedContentParameters", + "type": "object", + "properties": { + "limit": { + "type": "integer", + "minimum": -1 + }, + "offeringType": { + "$ref": "#/x-schemas/Entertainment/OfferingType" + }, + "programType": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + } + }, + "required": [ + "limit" + ], + "additionalProperties": false, + "examples": [ + { + "limit": 100 + } + ] + }, + "PurchasedContentFederatedResponse": { + "title": "PurchasedContentFederatedResponse", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedResponse" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/x-schemas/Discovery/PurchasedContentResult" + } + } + } + ] + }, + "PurchasedContentResult": { + "title": "PurchasedContentResult", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "totalCount", + "entries" + ], + "additionalProperties": false + }, + "Availability": { + "title": "Availability", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "channel-lineup", + "program-lineup" + ] + }, + "id": { + "type": "string" + }, + "catalogId": { + "type": "string" + }, + "startTime": { + "type": "string", + "format": "date-time" + }, + "endTime": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "type", + "id" + ] + }, + "ContentAccessIdentifiers": { + "title": "ContentAccessIdentifiers", + "type": "object", + "properties": { + "availabilities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Availability" + }, + "description": "A list of identifiers that represent what content is discoverable for the subscriber. Excluding availabilities will cause no change to the availabilities that are stored for this subscriber. Providing an empty array will clear the subscriber's availabilities" + }, + "entitlements": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/Entitlement" + }, + "description": "A list of identifiers that represent what content is consumable for the subscriber. Excluding entitlements will cause no change to the entitlements that are stored for this subscriber. Providing an empty array will clear the subscriber's entitlements" + } + }, + "required": [] + }, + "TuneChannels": { + "title": "TuneChannels", + "description": "An enumeration of xrn values for the TuneIntent that have special meaning.", + "type": "string", + "enum": [ + "xrn:firebolt:channel:any" + ] + }, + "UserInterestProviderParameters": { + "title": "UserInterestProviderParameters", + "type": "object", + "required": [ + "type", + "reason" + ], + "properties": { + "type": { + "$ref": "#/x-schemas/Discovery/InterestType" + }, + "reason": { + "$ref": "#/x-schemas/Discovery/InterestReason" + } + } + }, + "HDMIPortId": { + "type": "string", + "pattern": "^HDMI[0-9]+$" + }, + "EDIDVersion": { + "title": "EDIDVersion", + "type": "string", + "enum": [ + "1.4", + "2.0", + "unknown" + ] + }, + "HDMIInputPort": { + "title": "HDMIInputPort", + "type": "object", + "additionalProperties": false, + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "connected": { + "type": "boolean" + }, + "signal": { + "$ref": "#/components/schemas/HDMISignalStatus" + }, + "arcCapable": { + "type": "boolean" + }, + "arcConnected": { + "type": "boolean" + }, + "edidVersion": { + "$ref": "#/components/schemas/EDIDVersion" + }, + "autoLowLatencyModeCapable": { + "type": "boolean" + }, + "autoLowLatencyModeSignalled": { + "type": "boolean" + } + }, + "if": { + "properties": { + "edidVersion": { + "type": "string", + "enum": [ + "1.4", + "unknown" + ] + } + } + }, + "then": { + "properties": { + "autoLowLatencyModeCapable": { + "const": false + }, + "autoLowLatencyModeSignalled": { + "const": false + } + } + }, + "required": [ + "port", + "connected", + "signal", + "arcCapable", + "arcConnected", + "edidVersion", + "autoLowLatencyModeCapable", + "autoLowLatencyModeSignalled" + ] + }, + "HDMISignalStatus": { + "type": "string", + "enum": [ + "none", + "stable", + "unstable", + "unsupported", + "unknown" + ] + }, + "SignalChangedInfo": { + "title": "SignalChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "signal": { + "$ref": "#/components/schemas/HDMISignalStatus" + } + }, + "required": [ + "port", + "signal" + ] + }, + "ConnectionChangedInfo": { + "title": "ConnectionChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "connected": { + "type": "boolean" + } + } + }, + "AutoLowLatencyModeSignalChangedInfo": { + "title": "AutoLowLatencyModeSignalChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "autoLowLatencyModeSignalled": { + "type": "boolean" + } + } + }, + "AutoLowLatencyModeCapableChangedInfo": { + "title": "AutoLowLatencyModeCapableChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "port", + "enabled" + ] + }, + "EmailUsage": { + "title": "EmailUsage", + "type": "string", + "enum": [ + "signIn", + "signUp" + ] + }, + "KeyboardType": { + "title": "KeyboardType", + "type": "string", + "description": "The type of keyboard to show to the user", + "enum": [ + "standard", + "email", + "password" + ] + }, + "KeyboardParameters": { + "title": "KeyboardParameters", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "The message to display to the user so the user knows what they are entering", + "type": "string" + } + }, + "examples": [ + { + "type": "standard", + "message": "Enter your user name." + } + ] + }, + "KeyboardProviderRequest": { + "title": "KeyboardProviderRequest", + "type": "object", + "required": [ + "correlationId", + "parameters" + ], + "properties": { + "correlationId": { + "type": "string", + "description": "An id to correlate the provider response with this request" + }, + "parameters": { + "description": "The request to start a keyboard session", + "$ref": "#/components/schemas/KeyboardParameters" + } + } + }, + "LifecycleEvent": { + "title": "LifecycleEvent", + "description": "A an object describing the previous and current states", + "type": "object", + "required": [ + "state", + "previous" + ], + "properties": { + "state": { + "$ref": "#/x-schemas/Lifecycle/LifecycleState", + "description": "The current lifcycle state" + }, + "previous": { + "$ref": "#/x-schemas/Lifecycle/LifecycleState", + "description": "The previous lifcycle state" + }, + "source": { + "type": "string", + "enum": [ + "voice", + "remote" + ], + "description": "The source of the lifecycle change." + } + } + }, + "LatLon": { + "type": "array", + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "MediaPosition": { + "title": "MediaPosition", + "description": "Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "oneOf": [ + { + "const": 0 + }, + { + "type": "number", + "exclusiveMinimum": 0, + "exclusiveMaximum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 86400 + } + ] + }, + "ErrorType": { + "title": "ErrorType", + "type": "string", + "enum": [ + "network", + "media", + "restriction", + "entitlement", + "other" + ] + }, + "EventObjectPrimitives": { + "title": "EventObjectPrimitives", + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "EventObject": { + "title": "EventObject", + "type": "object", + "maxProperties": 256, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/EventObjectPrimitives" + }, + { + "type": "array", + "maxItems": 256, + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/EventObjectPrimitives" + }, + { + "$ref": "#/components/schemas/EventObject" + } + ] + } + }, + { + "$ref": "#/components/schemas/EventObject" + } + ] + } + }, + "AppInitialization": { + "title": "AppInitialization", + "type": "object", + "properties": { + "us_privacy": { + "type": "string", + "description": "The IAB US Privacy string." + }, + "lmt": { + "type": "integer", + "description": "The IAB limit ad tracking opt out value." + }, + "discovery": { + "type": "object", + "properties": { + "navigateTo": { + "$ref": "#/x-schemas/Intents/NavigationIntent" + } + } + }, + "secondScreen": { + "type": "object", + "properties": { + "launchRequest": { + "$ref": "#/x-schemas/SecondScreen/SecondScreenEvent" + } + } + } + } + }, + "PinChallenge": { + "title": "PinChallenge", + "type": "object", + "required": [ + "requestor", + "pinSpace" + ], + "properties": { + "pinSpace": { + "type": "string", + "description": "The pin space that this challenge is for", + "enum": [ + "purchase", + "content" + ] + }, + "capability": { + "type": "string", + "description": "The capability that is gated by a pin challenge" + }, + "requestor": { + "description": "The identity of which app is requesting access to this capability", + "$ref": "#/components/schemas/ChallengeRequestor" + } + } + }, + "PinChallengeProviderRequest": { + "title": "PinChallengeProviderRequest", + "allOf": [ + { + "$ref": "#/x-schemas/Types/ProviderRequest" + }, + { + "type": "object", + "required": [ + "parameters" + ], + "properties": { + "parameters": { + "description": "The request to challenge the user", + "$ref": "#/components/schemas/PinChallenge" + } + } + } + ] + }, + "ResultReason": { + "title": "ResultReason", + "type": "string", + "description": "The reason for the result of challenging the user", + "enum": [ + "noPinRequired", + "noPinRequiredWindow", + "exceededPinFailures", + "correctPin", + "cancelled" + ] + }, + "PinChallengeResult": { + "title": "PinChallengeResult", + "type": "object", + "required": [ + "granted", + "reason" + ], + "properties": { + "granted": { + "oneOf": [ + { + "type": "boolean", + "description": "Whether the user succeeded in the pin challenge" + }, + { + "const": null + } + ] + }, + "reason": { + "$ref": "#/components/schemas/ResultReason", + "description": "The reason for the result " + } + } + }, + "PrivacySettings": { + "title": "PrivacySettings", + "type": "object", + "required": [ + "allowACRCollection", + "allowResumePoints", + "allowAppContentAdTargeting", + "allowCameraAnalytics", + "allowPersonalization", + "allowPrimaryBrowseAdTargeting", + "allowPrimaryContentAdTargeting", + "allowProductAnalytics", + "allowRemoteDiagnostics", + "allowUnentitledPersonalization", + "allowUnentitledResumePoints", + "allowWatchHistory" + ], + "properties": { + "allowACRCollection": { + "description": "", + "type": "boolean" + }, + "allowResumePoints": { + "description": "", + "type": "boolean" + }, + "allowAppContentAdTargeting": { + "description": "", + "type": "boolean" + }, + "allowCameraAnalytics": { + "description": "", + "type": "boolean" + }, + "allowPersonalization": { + "description": "", + "type": "boolean" + }, + "allowPrimaryBrowseAdTargeting": { + "description": "", + "type": "boolean" + }, + "allowPrimaryContentAdTargeting": { + "description": "", + "type": "boolean" + }, + "allowProductAnalytics": { + "description": "", + "type": "boolean" + }, + "allowRemoteDiagnostics": { + "description": "", + "type": "boolean" + }, + "allowUnentitledPersonalization": { + "description": "", + "type": "boolean" + }, + "allowUnentitledResumePoints": { + "description": "", + "type": "boolean" + }, + "allowWatchHistory": { + "description": "", + "type": "boolean" + } + }, + "examples": [ + { + "allowACRCollection": true, + "allowResumePoints": false, + "allowAppContentAdTargeting": false, + "allowCameraAnalytics": true, + "allowPersonalization": true, + "allowPrimaryBrowseAdTargeting": false, + "allowPrimaryContentAdTargeting": false, + "allowProductAnalytics": true, + "allowRemoteDiagnostics": true, + "allowUnentitledPersonalization": true, + "allowUnentitledResumePoints": false, + "allowWatchHistory": true + } + ] + }, + "StorageScope": { + "title": "StorageScope", + "type": "string", + "enum": [ + "device", + "account" + ], + "description": "The scope of the data" + }, + "StorageOptions": { + "title": "StorageOptions", + "type": "object", + "required": [ + "ttl" + ], + "properties": { + "ttl": { + "type": "number", + "description": "Seconds from set time before the data expires and is removed" + } + } + }, + "GrantInfo": { + "description": "Information about a grant given by a user", + "type": "object", + "properties": { + "app": { + "$ref": "#/components/schemas/AppInfo" + }, + "state": { + "$ref": "#/components/schemas/GrantState" + }, + "capability": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "role": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "lifespan": { + "type": "string", + "enum": [ + "once", + "forever", + "appActive", + "powerActive", + "seconds" + ] + }, + "expires": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "state", + "capability", + "role", + "lifespan" + ], + "examples": [ + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:data:app-usage", + "role": "use", + "lifespan": "seconds", + "expires": "2022-12-14T20:20:39+00:00" + } + ] + }, + "AppInfo": { + "description": "Information about an app that a grant was for", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "GrantState": { + "description": "The state the grant is in", + "type": "string", + "enum": [ + "granted", + "denied" + ] + }, + "GrantModificationOptions": { + "description": "Options when modifying any grant", + "type": "object", + "properties": { + "appId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [] + }, + "RequestOptions": { + "title": "RequestOptions", + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "Whether to force for user grant even if the previous decision stored" + } + } + }, + "AccessPointList": { + "title": "AccessPointList", + "type": "object", + "description": "List of scanned Wifi networks available near the device.", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccessPoint" + } + } + } + }, + "WifiSecurityMode": { + "title": "WifiSecurityMode", + "description": "Security Mode supported for Wifi", + "type": "string", + "enum": [ + "none", + "wep64", + "wep128", + "wpaPskTkip", + "wpaPskAes", + "wpa2PskTkip", + "wpa2PskAes", + "wpaEnterpriseTkip", + "wpaEnterpriseAes", + "wpa2EnterpriseTkip", + "wpa2EnterpriseAes", + "wpa2Psk", + "wpa2Enterprise", + "wpa3PskAes", + "wpa3Sae" + ] + }, + "WifiSignalStrength": { + "title": "WifiSignalStrength", + "description": "Strength of Wifi signal, value is negative based on RSSI specification.", + "type": "integer", + "default": -255, + "minimum": -255, + "maximum": 0 + }, + "WifiFrequency": { + "title": "WifiFrequency", + "description": "Wifi Frequency in Ghz, example 2.4Ghz and 5Ghz.", + "type": "number", + "default": 0, + "minimum": 0 + }, + "AccessPoint": { + "title": "AccessPoint", + "description": "Properties of a scanned wifi list item.", + "type": "object", + "properties": { + "ssid": { + "type": "string", + "description": "Name of the wifi." + }, + "securityMode": { + "$ref": "#/components/schemas/WifiSecurityMode" + }, + "signalStrength": { + "$ref": "#/components/schemas/WifiSignalStrength" + }, + "frequency": { + "$ref": "#/components/schemas/WifiFrequency" + } + } + }, + "WPSSecurityPin": { + "title": "WPSSecurityPin", + "description": "Security pin type for WPS(Wifi Protected Setup).", + "type": "string", + "enum": [ + "pushButton", + "pin", + "manufacturerPin" + ] + }, + "WifiConnectRequest": { + "title": "WifiConnectRequest", + "description": "Request object for the wifi connection.", + "type": "object", + "properties": { + "ssid": { + "schema": { + "type": "string" + } + }, + "passphrase": { + "schema": { + "type": "string" + } + }, + "securityMode": { + "schema": { + "$ref": "#/components/schemas/WifiSecurityMode" + } + }, + "timeout": { + "schema": { + "$ref": "#/x-schemas/Types/Timeout" + } + } + } + } + } + }, + "x-schemas": { + "Types": { + "uri": "https://meta.comcast.com/firebolt/types", + "SemanticVersion": { + "title": "SemanticVersion", + "type": "object", + "properties": { + "major": { + "type": "integer", + "minimum": 0 + }, + "minor": { + "type": "integer", + "minimum": 0 + }, + "patch": { + "type": "integer", + "minimum": 0 + }, + "readable": { + "type": "string" + } + }, + "required": [ + "major", + "minor", + "patch", + "readable" + ], + "additionalProperties": false + }, + "ListenResponse": { + "title": "ListenResponse", + "type": "object", + "required": [ + "event", + "listening" + ], + "properties": { + "event": { + "type": "string", + "pattern": "[a-zA-Z]+\\.on[A-Z][a-zA-Z]+" + }, + "listening": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ProviderRequest": { + "title": "ProviderRequest", + "type": "object", + "required": [ + "correlationId" + ], + "additionalProperties": false, + "properties": { + "correlationId": { + "type": "string", + "description": "The id that was passed in to the event that triggered a provider method to be called" + }, + "parameters": { + "description": "The result of the provider response.", + "type": [ + "object", + "null" + ] + } + } + }, + "AudioProfile": { + "title": "AudioProfile", + "type": "string", + "enum": [ + "stereo", + "dolbyDigital5.1", + "dolbyDigital7.1", + "dolbyDigital5.1+", + "dolbyDigital7.1+", + "dolbyAtmos" + ] + }, + "BooleanMap": { + "title": "BooleanMap", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "LocalizedString": { + "title": "LocalizedString", + "description": "Localized string supports either a simple `string` or a Map of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ], + "examples": [ + "A simple string, with no language code", + { + "en": "This is english", + "es": "esto es español" + } + ] + }, + "FlatMap": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "Timeout": { + "title": "Timeout", + "description": "Defines the timeout in seconds. If the threshold for timeout is passed for any operation without a result it will throw an error.", + "type": "integer", + "default": 0, + "minimum": 0, + "maximum": 9999 + } + }, + "Accessibility": { + "uri": "https://meta.comcast.com/firebolt/accessibility", + "ClosedCaptionsSettings": { + "title": "ClosedCaptionsSettings", + "type": "object", + "required": [ + "enabled", + "styles" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not closed-captions should be enabled by default" + }, + "styles": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsStyles" + }, + "preferredLanguages": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "enabled": true, + "styles": { + "fontFamily": "monospaced_serif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + ] + }, + "VoiceGuidanceSettings": { + "title": "VoiceGuidanceSettings", + "type": "object", + "required": [ + "enabled", + "speed" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not voice guidance should be enabled by default" + }, + "speed": { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed", + "description": "The speed at which voice guidance speech will be read back to the user" + } + }, + "examples": [ + { + "enabled": true, + "speed": 2 + } + ] + }, + "VoiceSpeed": { + "title": "VoiceSpeed", + "type": "number", + "minimum": 0.5, + "maximum": 2 + }, + "ClosedCaptionsStyles": { + "title": "ClosedCaptionsStyles", + "type": "object", + "description": "The default styles to use when displaying closed-captions", + "properties": { + "fontFamily": { + "$ref": "#/x-schemas/Accessibility/FontFamily" + }, + "fontSize": { + "$ref": "#/x-schemas/Accessibility/FontSize" + }, + "fontColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "fontEdge": { + "$ref": "#/x-schemas/Accessibility/FontEdge" + }, + "fontEdgeColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "fontOpacity": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "backgroundColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "backgroundOpacity": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "textAlign": { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + }, + "textAlignVertical": { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + }, + "windowColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "windowOpacity": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + } + }, + "FontFamily": { + "type": [ + "string", + "null" + ], + "enum": [ + "monospaced_serif", + "proportional_serif", + "monospaced_sanserif", + "proportional_sanserif", + "smallcaps", + "cursive", + "casual", + null + ] + }, + "FontSize": { + "type": [ + "number", + "null" + ], + "minimum": 0 + }, + "Color": { + "type": [ + "string", + "null" + ] + }, + "FontEdge": { + "type": [ + "string", + "null" + ], + "enum": [ + "none", + "raised", + "depressed", + "uniform", + "drop_shadow_left", + "drop_shadow_right", + null + ] + }, + "Opacity": { + "type": [ + "number", + "null" + ], + "minimum": 0, + "maximum": 100 + }, + "HorizontalAlignment": { + "type": [ + "string", + "null" + ] + }, + "VerticalAlignment": { + "type": [ + "string", + "null" + ] + } + }, + "Localization": { + "uri": "https://meta.comcast.com/firebolt/localization", + "ISO639_2Language": { + "type": "string", + "pattern": "^[a-z]{3}$" + }, + "Locality": { + "type": "string" + }, + "CountryCode": { + "type": "string", + "pattern": "^[A-Z]{2}$" + }, + "Language": { + "type": "string", + "pattern": "^[A-Za-z]{2}$" + }, + "Locale": { + "type": "string", + "pattern": "^[a-zA-Z]+([a-zA-Z0-9\\-]*)$" + }, + "TimeZone": { + "type": "string", + "pattern": "^[-+_/ A-Za-z 0-9]*$" + } + }, + "Advertising": { + "uri": "https://meta.comcast.com/firebolt/advertising", + "SkipRestriction": { + "title": "SkipRestriction", + "$comment": "xrn:advertising:policy:skipRestriction:", + "type": "string", + "enum": [ + "none", + "adsUnwatched", + "adsAll", + "all" + ], + "description": "The advertisement skip restriction.\n\nApplies to fast-forward/rewind (e.g. trick mode), seeking over an entire opportunity (e.g. jump), seeking out of what's currently playing, and \"Skip this ad...\" features. Seeking over multiple ad opportunities only requires playback of the _last_ opportunity, not all opportunities, preceding the seek destination.\n\n| Value | Description |\n|--------------|--------------------------------------------------------------------------------|\n| none |No fast-forward, jump, or skip restrictions |\n| adsUnwatched | Restrict fast-forward, jump, and skip for unwatched ad opportunities only. |\n| adsAll | Restrict fast-forward, jump, and skip for all ad opportunities |\n| all | Restrict fast-forward, jump, and skip for all ad opportunities and all content |\n\nNamespace: `xrn:advertising:policy:skipRestriction:`\n\n" + } + }, + "Capabilities": { + "uri": "https://meta.comcast.com/firebolt/capabilities", + "Capability": { + "title": "Capability", + "type": "string", + "description": "A Capability is a discrete unit of functionality that a Firebolt device might be able to perform.", + "pattern": "^xrn:firebolt:capability:([a-z0-9\\-]+)((:[a-z0-9\\-]+)?)$" + }, + "CapabilityInfo": { + "title": "CapabilityInfo", + "type": "object", + "required": [ + "supported", + "available", + "use", + "manage", + "provide" + ], + "properties": { + "capability": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "supported": { + "type": "boolean", + "description": "Provides info whether the capability is supported" + }, + "available": { + "type": "boolean", + "description": "Provides info whether the capability is available" + }, + "use": { + "$ref": "#/x-schemas/Capabilities/CapPermissionStatus" + }, + "manage": { + "$ref": "#/x-schemas/Capabilities/CapPermissionStatus" + }, + "provide": { + "$ref": "#/x-schemas/Capabilities/CapPermissionStatus" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/DenyReason" + }, + "minItems": 1, + "maxItems": 6 + } + }, + "additionalProperties": false, + "examples": [ + { + "capability": "xrn:firebolt:capability:keyboard", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + ] + }, + "Permission": { + "title": "Permission", + "description": "A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user).", + "type": "object", + "required": [ + "capability" + ], + "properties": { + "role": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "capability": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + "additionalProperties": false + }, + "Role": { + "title": "Role", + "description": "Role provides access level for the app for a given capability.", + "type": "string", + "enum": [ + "use", + "manage", + "provide" + ] + }, + "CapPermissionStatus": { + "type": "object", + "properties": { + "permitted": { + "type": "boolean", + "description": "Provides info whether the capability is permitted" + }, + "granted": { + "oneOf": [ + { + "type": "boolean", + "description": "Provides info whether the capability is granted" + }, + { + "const": null + } + ] + } + }, + "additionalProperties": false + }, + "DenyReason": { + "title": "DenyReason", + "description": "Reasons why a Capability might not be invokable", + "type": "string", + "enum": [ + "unpermitted", + "unsupported", + "disabled", + "unavailable", + "grantDenied", + "ungranted" + ] + } + }, + "Discovery": { + "uri": "https://meta.comcast.com/firebolt/discovery", + "InterestType": { + "title": "InterestType", + "type": "string", + "enum": [ + "interest", + "disinterest" + ] + }, + "InterestReason": { + "title": "InterestReason", + "type": "string", + "enum": [ + "playlist", + "reaction", + "recording" + ] + }, + "EntityInfoResult": { + "title": "EntityInfoResult", + "description": "The result for an `entityInfo()` push or pull.", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "entity": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + }, + "related": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "entity" + ], + "additionalProperties": false + }, + "PurchasedContentResult": { + "title": "PurchasedContentResult", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "totalCount", + "entries" + ], + "additionalProperties": false + } + }, + "Entity": { + "uri": "https://meta.comcast.com/firebolt/entity", + "EntityDetails": { + "title": "EntityDetails", + "type": "object", + "required": [ + "identifiers" + ], + "properties": { + "identifiers": { + "$ref": "#/x-schemas/Entity/Entity" + }, + "info": { + "$ref": "#/x-schemas/Entity/Metadata" + }, + "waysToWatch": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/WayToWatch" + }, + "description": "An array of ways a user is might watch this entity, regardless of entitlements." + } + } + }, + "Entity": { + "oneOf": [ + { + "$ref": "#/x-schemas/Entity/ProgramEntity" + }, + { + "$ref": "#/x-schemas/Entity/MusicEntity" + }, + { + "$ref": "#/x-schemas/Entity/ChannelEntity" + }, + { + "$ref": "#/x-schemas/Entity/UntypedEntity" + }, + { + "$ref": "#/x-schemas/Entity/PlaylistEntity" + } + ] + }, + "Metadata": { + "title": "Metadata", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the entity." + }, + "synopsis": { + "type": "string", + "description": "Short description of the entity." + }, + "seasonNumber": { + "type": "number", + "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." + }, + "seasonCount": { + "type": "number", + "description": "For TV series, seasons, and episodes, the total number of seasons." + }, + "episodeNumber": { + "type": "number", + "description": "For TV episodes, the episode number." + }, + "episodeCount": { + "type": "number", + "description": "For TV seasons and episodes, the total number of episodes in the current season." + }, + "releaseDate": { + "type": "string", + "format": "date-time", + "description": "The date that the program or entity was released or first aired." + }, + "contentRatings": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/ContentRating" + }, + "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." + } + } + }, + "ProgramEntity": { + "title": "ProgramEntity", + "oneOf": [ + { + "$ref": "#/x-schemas/Entity/MovieEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVSeasonEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVSeriesEntity" + }, + { + "$ref": "#/x-schemas/Entity/AdditionalEntity" + } + ] + }, + "MusicEntity": { + "title": "MusicEntity", + "type": "object", + "properties": { + "entityType": { + "const": "music" + }, + "musicType": { + "$ref": "#/x-schemas/Entertainment/MusicType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "musicType", + "entityId" + ] + }, + "ChannelEntity": { + "title": "ChannelEntity", + "type": "object", + "properties": { + "entityType": { + "const": "channel" + }, + "channelType": { + "type": "string", + "enum": [ + "streaming", + "overTheAir" + ] + }, + "entityId": { + "type": "string", + "description": "ID of the channel, in the target App's scope." + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "required": [ + "entityType", + "channelType", + "entityId" + ], + "additionalProperties": false + }, + "UntypedEntity": { + "title": "UntypedEntity", + "allOf": [ + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityId": "an-entity" + } + ] + }, + "PlaylistEntity": { + "title": "PlaylistEntity", + "description": "A Firebolt compliant representation of a Playlist entity.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "playlist" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + ] + }, + "MovieEntity": { + "title": "MovieEntity", + "description": "A Firebolt compliant representation of a Movie entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "movie" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + ] + }, + "TVEpisodeEntity": { + "title": "TVEpisodeEntity", + "description": "A Firebolt compliant representation of a TV Episode entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId", + "seasonId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "episode" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "seasonId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + } + ] + }, + "TVSeasonEntity": { + "title": "TVSeasonEntity", + "description": "A Firebolt compliant representation of a TV Season entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "season" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "season", + "entityId": "breaking-bad-season-1", + "seriesId": "breaking-bad" + } + ] + }, + "TVSeriesEntity": { + "title": "TVSeriesEntity", + "description": "A Firebolt compliant representation of a TV Series entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "series" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "series", + "entityId": "breaking-bad" + } + ] + }, + "AdditionalEntity": { + "title": "AdditionalEntity", + "description": "A Firebolt compliant representation of the remaining program entity types.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "type": "string", + "enum": [ + "concert", + "sportingEvent", + "preview", + "other", + "advertisement", + "musicVideo", + "minisode", + "extra" + ] + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "concert", + "entityId": "live-aid" + } + ] + }, + "PlayableEntity": { + "title": "PlayableEntity", + "anyOf": [ + { + "$ref": "#/x-schemas/Entity/MovieEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Entity/PlaylistEntity" + }, + { + "$ref": "#/x-schemas/Entity/MusicEntity" + }, + { + "$ref": "#/x-schemas/Entity/AdditionalEntity" + } + ] + } + }, + "Entertainment": { + "uri": "https://meta.comcast.com/firebolt/entertainment", + "WayToWatch": { + "title": "WayToWatch", + "type": "object", + "required": [ + "identifiers", + "audioProfile" + ], + "properties": { + "identifiers": { + "$ref": "#/x-schemas/Entertainment/ContentIdentifiers" + }, + "expires": { + "type": "string", + "format": "date-time", + "description": "Time when the WayToWatch is no longer available." + }, + "entitled": { + "type": "boolean", + "description": "Specify if the user is entitled to watch the entity." + }, + "entitledExpires": { + "type": "string", + "format": "date-time", + "description": "Time when the entity is no longer entitled." + }, + "offeringType": { + "$ref": "#/x-schemas/Entertainment/OfferingType" + }, + "hasAds": { + "type": "boolean", + "description": "True if the streamable asset contains ads." + }, + "price": { + "type": "number", + "description": "For \"buy\" and \"rent\" WayToWatch, the price to buy or rent in the user's preferred currency." + }, + "videoQuality": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "SD", + "HD", + "UHD" + ] + }, + "description": "List of the video qualities available via the WayToWatch." + }, + "audioProfile": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Types/AudioProfile" + }, + "description": "List of the audio types available via the WayToWatch." + }, + "audioLanguages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of audio track languages available on the WayToWatch. The first is considered the primary language. Languages are expressed as ISO 639 1/2 codes." + }, + "closedCaptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of languages for which closed captions are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." + }, + "subtitles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of languages for which subtitles are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." + }, + "audioDescriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of languages for which audio descriptions (DVD) as available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." + } + }, + "description": "A WayToWatch describes a way to watch a video program. It may describe a single\nstreamable asset or a set of streamable assets. For example, an app provider may\ndescribe HD, SD, and UHD assets as individual WayToWatch objects or rolled into\na single WayToWatch.\n\nIf the WayToWatch represents a single streamable asset, the provided\nContentIdentifiers must be sufficient to play back the specific asset when sent\nvia a playback intent or deep link. If the WayToWatch represents multiple\nstreamable assets, the provided ContentIdentifiers must be sufficient to\nplayback one of the assets represented with no user action. In this scenario,\nthe app SHOULD choose the best asset for the user based on their device and\nsettings. The ContentIdentifiers MUST also be sufficient for navigating the user\nto the appropriate entity or detail screen via an entity intent.\n\nThe app should set the `entitled` property to indicate if the user can watch, or\nnot watch, the asset without making a purchase. If the entitlement is known to\nexpire at a certain time (e.g., a rental), the app should also provide the\n`entitledExpires` property. If the entitlement is not expired, the UI will use\nthe `entitled` property to display watchable assets to the user, adjust how\nassets are presented to the user, and how intents into the app are generated.\nFor example, the the Aggregated Experience could render a \"Watch\" button for an\nentitled asset versus a \"Subscribe\" button for an non-entitled asset.\n\nThe app should set the `offeringType` to define how the content may be\nauthorized. The UI will use this to adjust how content is presented to the user.\n\nA single WayToWatch cannot represent streamable assets available via multiple\npurchase paths. If, for example, an asset has both Buy, Rent and Subscription\navailability, the three different entitlement paths MUST be represented as\nmultiple WayToWatch objects.\n\n`price` should be populated for WayToWatch objects with `buy` or `rent`\n`offeringType`. If the WayToWatch represents a set of assets with various price\npoints, the `price` provided must be the lowest available price." + }, + "OfferingType": { + "title": "OfferingType", + "type": "string", + "enum": [ + "free", + "subscribe", + "buy", + "rent" + ], + "description": "The offering type of the WayToWatch." + }, + "ContentIdentifiers": { + "title": "ContentIdentifiers", + "type": "object", + "properties": { + "assetId": { + "type": "string", + "description": "Identifies a particular playable asset. For example, the HD version of a particular movie separate from the UHD version." + }, + "entityId": { + "type": "string", + "description": "Identifies an entity, such as a Movie, TV Series or TV Episode." + }, + "seasonId": { + "type": "string", + "description": "The TV Season for a TV Episode." + }, + "seriesId": { + "type": "string", + "description": "The TV Series for a TV Episode or TV Season." + }, + "appContentData": { + "type": "string", + "description": "App-specific content identifiers.", + "maxLength": 1024 + } + }, + "description": "The ContentIdentifiers object is how the app identifies an entity or asset to\nthe Firebolt platform. These ids are used to look up metadata and deep link into\nthe app.\n\nApps do not need to provide all ids. They only need to provide the minimum\nrequired to target a playable stream or an entity detail screen via a deep link.\nIf an id isn't needed to get to those pages, it doesn't need to be included." + }, + "ContentRating": { + "title": "ContentRating", + "type": "object", + "required": [ + "scheme", + "rating" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "CA-Movie", + "CA-TV", + "CA-Movie-Fr", + "CA-TV-Fr", + "US-Movie", + "US-TV" + ], + "description": "The rating scheme." + }, + "rating": { + "type": "string", + "description": "The content rating." + }, + "advisories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional list of subratings or content advisories." + } + }, + "description": "A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below.\n\n## United States\n\n`US-Movie` (MPAA):\n\nRatings: `NR`, `G`, `PG`, `PG13`, `R`, `NC17`\n\nAdvisories: `AT`, `BN`, `SL`, `SS`, `N`, `V`\n\n`US-TV` (Vchip):\n\nRatings: `TVY`, `TVY7`, `TVG`, `TVPG`, `TV14`, `TVMA`\n\nAdvisories: `FV`, `D`, `L`, `S`, `V`\n\n## Canada\n\n`CA-Movie` (OFRB):\n\nRatings: `G`, `PG`, `14A`, `18A`, `R`, `E`\n\n`CA-TV` (AGVOT)\n\nRatings: `E`, `C`, `C8`, `G`, `PG`, `14+`, `18+`\n\nAdvisories: `C`, `C8`, `G`, `PG`, `14+`, `18+`\n\n`CA-Movie-Fr` (Canadian French language movies):\n\nRatings: `G`, `8+`, `13+`, `16+`, `18+`\n\n`CA-TV-Fr` (Canadian French language TV):\n\nRatings: `G`, `8+`, `13+`, `16+`, `18+`\n" + }, + "MusicType": { + "title": "MusicType", + "type": "string", + "description": "In the case of a music `entityType`, specifies the type of music entity.", + "enum": [ + "song", + "album" + ] + }, + "Entitlement": { + "title": "Entitlement", + "type": "object", + "properties": { + "entitlementId": { + "type": "string" + }, + "startTime": { + "type": "string", + "format": "date-time" + }, + "endTime": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "entitlementId" + ] + }, + "EntityInfo": { + "title": "EntityInfo", + "description": "An EntityInfo object represents an \"entity\" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type.\n\nAdditionally, EntityInfo objects must specify a properly formed\nContentIdentifiers object, `entityType`, and `title`. The app should provide\nthe `synopsis` property for a good user experience if the content\nmetadata is not available another way.\n\nThe ContentIdentifiers must be sufficient for navigating the user to the\nappropriate entity or detail screen via a `detail` intent or deep link.\n\nEntityInfo objects must provide at least one WayToWatch object when returned as\npart of an `entityInfo` method and a streamable asset is available to the user.\nIt is optional for the `purchasedContent` method, but recommended because the UI\nmay use those data.", + "type": "object", + "required": [ + "identifiers", + "entityType", + "title" + ], + "properties": { + "identifiers": { + "$ref": "#/x-schemas/Entertainment/ContentIdentifiers" + }, + "title": { + "type": "string", + "description": "Title of the entity." + }, + "entityType": { + "type": "string", + "enum": [ + "program", + "music" + ], + "description": "The type of the entity, e.g. `program` or `music`." + }, + "programType": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + }, + "musicType": { + "$ref": "#/x-schemas/Entertainment/MusicType" + }, + "synopsis": { + "type": "string", + "description": "Short description of the entity." + }, + "seasonNumber": { + "type": "number", + "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." + }, + "seasonCount": { + "type": "number", + "description": "For TV series, seasons, and episodes, the total number of seasons." + }, + "episodeNumber": { + "type": "number", + "description": "For TV episodes, the episode number." + }, + "episodeCount": { + "type": "number", + "description": "For TV seasons and episodes, the total number of episodes in the current season." + }, + "releaseDate": { + "type": "string", + "format": "date-time", + "description": "The date that the program or entity was released or first aired." + }, + "contentRatings": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/ContentRating" + }, + "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." + }, + "waysToWatch": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/WayToWatch" + }, + "description": "An array of ways a user is might watch this entity, regardless of entitlements." + } + }, + "if": { + "properties": { + "entityType": { + "const": "program" + } + } + }, + "then": { + "required": [ + "programType" + ], + "not": { + "required": [ + "musicType" + ] + } + }, + "else": { + "required": [ + "musicType" + ], + "not": { + "required": [ + "programType" + ] + } + } + }, + "ProgramType": { + "title": "ProgramType", + "type": "string", + "description": "In the case of a program `entityType`, specifies the program type.", + "enum": [ + "movie", + "episode", + "season", + "series", + "other", + "preview", + "extra", + "concert", + "sportingEvent", + "advertisement", + "musicVideo", + "minisode" + ] + } + }, + "Intents": { + "uri": "https://meta.comcast.com/firebolt/intents", + "NavigationIntent": { + "title": "NavigationIntent", + "description": "A Firebolt compliant representation of a user intention to navigate to a specific place in an app.", + "anyOf": [ + { + "$ref": "#/x-schemas/Intents/HomeIntent" + }, + { + "$ref": "#/x-schemas/Intents/LaunchIntent" + }, + { + "$ref": "#/x-schemas/Intents/EntityIntent" + }, + { + "$ref": "#/x-schemas/Intents/PlaybackIntent" + }, + { + "$ref": "#/x-schemas/Intents/SearchIntent" + }, + { + "$ref": "#/x-schemas/Intents/SectionIntent" + }, + { + "$ref": "#/x-schemas/Intents/TuneIntent" + }, + { + "$ref": "#/x-schemas/Intents/PlayEntityIntent" + }, + { + "$ref": "#/x-schemas/Intents/PlayQueryIntent" + } + ] + }, + "HomeIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to it's home screen, and bring that app to the foreground if needed.", + "title": "HomeIntent", + "allOf": [ + { + "title": "HomeIntent", + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "title": "HomeIntent", + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "title": "HomeIntent", + "type": "object", + "properties": { + "action": { + "const": "home" + } + }, + "not": { + "required": [ + "data" + ] + } + } + ], + "examples": [ + { + "action": "home", + "context": { + "source": "voice" + } + } + ] + }, + "LaunchIntent": { + "description": "A Firebolt compliant representation of a user intention to launch an app.", + "title": "LaunchIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "launch" + } + }, + "not": { + "required": [ + "data" + ] + } + } + ], + "examples": [ + { + "action": "launch", + "context": { + "source": "voice" + } + } + ] + }, + "EntityIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a specific entity page, and bring that app to the foreground if needed.", + "title": "EntityIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "entity" + }, + "data": { + "$ref": "#/x-schemas/Entity/Entity" + } + } + } + ], + "examples": [ + { + "action": "entity", + "context": { + "source": "voice" + }, + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + } + ] + }, + "PlaybackIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", + "title": "PlaybackIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "playback" + }, + "data": { + "$ref": "#/x-schemas/Entity/PlayableEntity" + } + } + } + ], + "examples": [ + { + "action": "playback", + "data": { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + }, + "context": { + "source": "voice" + } + } + ] + }, + "SearchIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed.", + "title": "SearchIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "search" + }, + "data": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + ], + "examples": [ + { + "action": "search", + "data": { + "query": "walter white" + }, + "context": { + "source": "voice" + } + } + ] + }, + "SectionIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed.", + "title": "SectionIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "section" + }, + "data": { + "type": "object", + "required": [ + "sectionName" + ], + "properties": { + "sectionName": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "required": [ + "data" + ] + } + ], + "examples": [ + { + "action": "section", + "data": { + "sectionName": "settings" + }, + "context": { + "source": "voice" + } + } + ] + }, + "TuneIntent": { + "description": "A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App.", + "title": "TuneIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "tune" + }, + "data": { + "type": "object", + "required": [ + "entity" + ], + "additionalProperties": false, + "properties": { + "entity": { + "$ref": "#/x-schemas/Entity/ChannelEntity" + }, + "options": { + "description": "The options property of the data property MUST have only one of the following fields.", + "type": "object", + "required": [], + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "assetId": { + "type": "string", + "description": "The ID of a specific 'listing', as scoped by the target App's ID-space, which the App should begin playback from." + }, + "restartCurrentProgram": { + "type": "boolean", + "description": "Denotes that the App should start playback at the most recent program boundary, rather than 'live.'" + }, + "time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 Date/Time where the App should begin playback from." + } + } + } + } + } + } + } + ], + "examples": [ + { + "action": "tune", + "data": { + "entity": { + "entityType": "channel", + "channelType": "streaming", + "entityId": "an-ott-channel" + }, + "options": { + "restartCurrentProgram": true + } + }, + "context": { + "source": "voice" + } + } + ] + }, + "PlayEntityIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", + "title": "PlayEntityIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "play-entity" + }, + "data": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/x-schemas/Entity/PlayableEntity" + }, + "options": { + "type": "object", + "properties": { + "playFirstId": { + "type": "string" + }, + "playFirstTrack": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": false + } + }, + "required": [ + "entity" + ], + "propertyNames": { + "enum": [ + "entity", + "options" + ] + }, + "if": { + "properties": { + "entity": { + "type": "object", + "required": [ + "entityType" + ], + "properties": { + "entityType": { + "const": "playlist" + } + } + } + } + }, + "then": { + "type": "object", + "properties": { + "options": { + "type": "object", + "maxProperties": 1 + } + } + }, + "else": { + "type": "object", + "properties": { + "options": { + "type": "object", + "maxProperties": 0 + } + } + } + } + } + } + ], + "examples": [ + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + }, + "options": { + "playFirstId": "song/xyz" + } + }, + "context": { + "source": "voice" + } + }, + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + }, + "options": { + "playFirstTrack": 3 + } + }, + "context": { + "source": "voice" + } + } + ] + }, + "PlayQueryIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for an abstract query to be searched for and played by the app.", + "title": "PlayQueryIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "play-query" + }, + "data": { + "type": "object", + "properties": { + "query": { + "type": "string" + }, + "options": { + "type": "object", + "properties": { + "programTypes": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + } + }, + "musicTypes": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/MusicType" + } + } + }, + "additionalProperties": false + } + }, + "required": [ + "query" + ], + "propertyNames": { + "enum": [ + "query", + "options" + ] + } + } + } + } + ], + "examples": [ + { + "action": "play-query", + "data": { + "query": "Ed Sheeran" + }, + "context": { + "source": "voice" + } + }, + { + "action": "play-query", + "data": { + "query": "Ed Sheeran", + "options": { + "programTypes": [ + "movie" + ] + } + }, + "context": { + "source": "voice" + } + }, + { + "action": "play-query", + "data": { + "query": "Ed Sheeran", + "options": { + "programTypes": [ + "movie" + ], + "musicTypes": [ + "song" + ] + } + }, + "context": { + "source": "voice" + } + } + ] + }, + "Intent": { + "description": "A Firebolt compliant representation of a user intention.", + "type": "object", + "required": [ + "action", + "context" + ], + "properties": { + "action": { + "type": "string" + }, + "context": { + "type": "object", + "required": [ + "source" + ], + "properties": { + "source": { + "type": "string" + } + } + } + } + }, + "IntentProperties": { + "type": "object", + "propertyNames": { + "enum": [ + "action", + "data", + "context" + ] + } + } + }, + "Lifecycle": { + "uri": "https://meta.comcast.com/firebolt/lifecycle", + "CloseReason": { + "title": "CloseReason", + "description": "The application close reason", + "type": "string", + "enum": [ + "remoteButton", + "userExit", + "done", + "error" + ] + }, + "LifecycleState": { + "title": "LifecycleState", + "description": "The application lifecycle state", + "type": "string", + "enum": [ + "initializing", + "inactive", + "foreground", + "background", + "unloading", + "suspended" + ] + } + }, + "SecondScreen": { + "uri": "https://meta.comcast.com/firebolt/secondscreen", + "SecondScreenEvent": { + "title": "SecondScreenEvent", + "description": "An a message notification from a second screen device", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "dial" + ] + }, + "version": { + "type": "string" + }, + "data": { + "type": "string" + } + } + } + } + } +} \ No newline at end of file diff --git a/requirements/pr-release-1-3-0/specifications/firebolt-specification.json b/requirements/pr-release-1-3-0/specifications/firebolt-specification.json new file mode 100644 index 00000000..1c6d6cf2 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/firebolt-specification.json @@ -0,0 +1,22728 @@ +{ + "schemaVersion": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt Version Manifest v1.0.0" + }, + "capabilities": { + "xrn:firebolt:capability:accessibility:audiodescriptions": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:accessibility:closedcaptions": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:accessibility:voiceguidance": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:account:id": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:account:uid": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:advertising:configuration": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:advertising:identifier": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:approve:content": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:approve:purchase": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:capabilities:info": { + "level": "must", + "use": { + "public": true, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:capabilities:request": { + "level": "must", + "use": { + "public": true, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:distributor": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:id": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:info": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:make": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:model": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:name": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:sku": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:device:uid": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:discovery:content-access": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:discovery:entity-info": { + "level": "must", + "use": { + "public": false, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + }, + "xrn:firebolt:capability:discovery:interest": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + }, + "xrn:firebolt:capability:discovery:navigate-to": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:discovery:policy": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:discovery:purchased-content": { + "level": "must", + "use": { + "public": false, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + }, + "xrn:firebolt:capability:discovery:sign-in-status": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:discovery:watch-next": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:discovery:watched": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:grants:state": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:input:keyboard": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + }, + "xrn:firebolt:capability:inputs:hdmi": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:lifecycle:initialize": { + "level": "must", + "use": { + "public": true, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:lifecycle:launch": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:lifecycle:ready": { + "level": "must", + "use": { + "public": true, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:lifecycle:state": { + "level": "must", + "use": { + "public": true, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": true + } + }, + "xrn:firebolt:capability:localization:additional-info": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:country-code": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:language": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:locale": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:locality": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:location": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:postal-code": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:localization:time-zone": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:metrics:distributor": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:metrics:general": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:metrics:media": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:network:status": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:privacy:advertising": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:privacy:settings": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:profile:flags": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:protocol:dial": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:protocol:wifi": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:rpc:discover": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:storage:secure": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:token:account": { + "level": "should", + "use": { + "public": false, + "negotiable": false + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:token:device": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:token:platform": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:token:root": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:token:session": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:usergrant:acknowledgechallenge": { + "level": "should", + "use": { + "public": false, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + }, + "xrn:firebolt:capability:usergrant:pinchallenge": { + "level": "should", + "use": { + "public": false, + "negotiable": false + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + } + }, + "apis": { + "1": { + "openrpc": "1.2.4", + "info": { + "title": "Firebolt JSON-RPC API", + "version": "1.3.0-release-1-3-0.0", + "x-module-descriptions": { + "Internal": "Internal methods for SDK / FEE integration", + "Accessibility": "The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance.\n\nApps **SHOULD** attempt o respect these settings, rather than manage and persist seprate settings, which would be different per-app.", + "Account": "A module for querying about the device account.", + "AcknowledgeChallenge": "A module for registering as a provider for a user grant in which the user confirms access to a capability", + "Advertising": "A module for platform provided advertising settings and functionality.", + "AudioDescriptions": "A module for managing audio-description Settings.", + "Authentication": "A module for acquiring authentication tokens.", + "Capabilities": "The Capabilities module provides information about which discreet unit of functionality is enabled for the apps.", + "ClosedCaptions": "A module for managing closed-captions Settings.", + "Device": "A module for querying about the device and it's capabilities.", + "Discovery": "Your App likely wants to integrate with the Platform's discovery capabilities. For example to add a \"Watch Next\" tile that links to your app from the platform's home screen.\n\nGetting access to this information requires to connect to lower level APIs made available by the platform. Since implementations differ between operators and platforms, the Firebolt SDK offers a Discovery module, that exposes a generic, agnostic interface to the developer.\n\nUnder the hood, an underlaying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.\n\nThe Discovery plugin is used to _send_ information to the Platform.\n\n### Localization\nApps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.\n\nApps should provide prices in the same currency presented in the app. If multiple currencies are supported in the app, the app should provide prices in the user's current default currency.", + "HDMIInput": "Methods for managing HDMI inputs on an HDMI sink device.", + "Keyboard": "Methods for prompting users to enter text with task-oriented UX", + "Lifecycle": "Methods and events for responding to lifecycle changes in your app", + "Localization": "Methods for accessessing location and language preferences", + "Metrics": "Methods for sending metrics", + "Parameters": "Methods for getting initialization parameters for an app cold launch.", + "PinChallenge": "A module for registering as a provider for a user grant in which the user is prompted for a pin for access to a capability", + "Privacy": "A module for managing device settings.", + "Profile": "Methods for getting information about the current user/account profile", + "SecondScreen": "Methods for communicating with second screen devices", + "SecureStorage": "A module for storing and retrieving secure data owned by the app", + "UserGrants": "A module for managing grants given by the user", + "VoiceGuidance": "A module for managing voice-guidance Settings.", + "Wifi": "A module for providing support for Wifi." + } + }, + "methods": [ + { + "name": "rpc.discover", + "summary": "The OpenRPC schema for this JSON-RPC API", + "params": [], + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:rpc:discover" + ] + } + ], + "result": { + "name": "OpenRPC Schema", + "schema": { + "type": "object" + } + }, + "examples": [ + { + "name": "Default", + "params": [], + "result": { + "name": "schema", + "value": {} + } + } + ] + }, + { + "name": "Internal.initialize", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:initialize" + ] + } + ], + "summary": "Initialize the SDK / FEE session.", + "description": "A single version of the Firebolt SDK is compiled into each app. When an app starts up, the SDK **MUST** call this method as soon as possible and **before** any other JSON-RPC methods are sent.", + "params": [ + { + "name": "version", + "required": true, + "schema": { + "$ref": "#/x-schemas/Types/SemanticVersion" + }, + "summary": "The semantic version of the SDK." + } + ], + "result": { + "name": "session", + "summary": "Info about the SDK/FEE session", + "schema": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The semantic version of the FEE." + } + }, + "additionalProperties": false + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "version", + "value": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt SDK 1.0.0" + } + } + ], + "result": { + "name": "Default Result", + "value": { + "version": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt FEE 1.0.0" + } + } + } + } + ] + }, + { + "name": "Accessibility.closedCaptions", + "summary": "Get the user's preferred closed-captions settings", + "params": [], + "tags": [ + { + "name": "deprecated", + "x-alternative": "Accessibility.closedCaptionsSettings()", + "x-since": "0.6.0" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [], + "result": { + "name": "settings", + "value": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.closedCaptionsSettings", + "summary": "Get the user's preferred closed-captions settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [], + "result": { + "name": "settings", + "value": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.voiceGuidance", + "summary": "Get the user's preferred voice guidance settings", + "params": [], + "tags": [ + { + "name": "deprecated", + "x-alternative": "Accessibility.voiceGuidanceSettings()", + "x-since": "0.6.0" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "speed": 2 + } + } + } + ] + }, + { + "name": "Accessibility.voiceGuidanceSettings", + "summary": "Get the user's preferred voice guidance settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "speed": 2 + } + } + } + ] + }, + { + "name": "Accessibility.audioDescriptionSettings", + "summary": "Get the user's preferred audio description settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "result": { + "name": "settings", + "summary": "the audio description settings", + "schema": { + "$ref": "#/components/schemas/AudioDescriptionSettings" + } + }, + "examples": [ + { + "name": "Getting the audio description settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true + } + } + } + ] + }, + { + "name": "Accessibility.onClosedCaptionsSettingsChanged", + "summary": "Get the user's preferred closed-captions settings", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Accessibility.closedCaptionsSettings" + }, + { + "name": "event", + "x-alternative": "closedCaptionsSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "closedCaptionsSettings", + "summary": "the closed captions settings", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsSettings" + } + ] + } + }, + "examples": [ + { + "name": "Getting the closed captions settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "settings", + "value": { + "enabled": true, + "styles": { + "fontFamily": "monospaced_sanserif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + } + } + ] + }, + { + "name": "Accessibility.onVoiceGuidanceSettingsChanged", + "summary": "Get the user's preferred voice guidance settings", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Accessibility.voiceGuidanceSettings" + }, + { + "name": "event", + "x-alternative": "voiceGuidanceSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "result": { + "name": "settings", + "summary": "the voice guidance settings", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/VoiceGuidanceSettings" + } + ] + } + }, + "examples": [ + { + "name": "Getting the voice guidance settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "enabled": true, + "speed": 2 + } + } + } + ] + }, + { + "name": "Accessibility.onAudioDescriptionSettingsChanged", + "summary": "Get the user's preferred audio description settings", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Accessibility.audioDescriptionSettings" + }, + { + "name": "event", + "x-alternative": "audioDescriptionSettings" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "result": { + "name": "settings", + "summary": "the audio description settings", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AudioDescriptionSettings" + } + ] + } + }, + "examples": [ + { + "name": "Getting the audio description settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "enabled": true + } + } + } + ] + }, + { + "name": "Account.id", + "summary": "Get the platform back-office account identifier", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:account:id" + ] + } + ], + "result": { + "name": "id", + "summary": "the id", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "123" + } + } + ] + }, + { + "name": "Account.uid", + "summary": "Gets a unique id for the current app & account", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:account:uid" + ] + } + ], + "result": { + "name": "uniqueId", + "summary": "a unique ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the unique ID", + "params": [], + "result": { + "name": "Default Result", + "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" + } + } + ] + }, + { + "name": "Account.session", + "summary": "Used by a distributor to push Session token to firebolt.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:token:account" + ] + } + ], + "params": [ + { + "name": "token", + "required": true, + "schema": { + "$ref": "#/components/schemas/Token" + } + }, + { + "name": "expiresIn", + "required": true, + "schema": { + "$ref": "#/components/schemas/Expiry" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "token", + "value": "RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==" + }, + { + "name": "expiresIn", + "value": 84000 + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "AcknowledgeChallenge.onRequestChallenge", + "summary": "Registers as a provider for when the user should be challenged in order to confirm access to a capability", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "$ref": "#/components/schemas/GrantResult" + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true + } + ], + "result": { + "name": "challenge", + "summary": "The request to challenge the user", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/ChallengeProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "capability": "xrn:firebolt:capability:localization::postal-code", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + } + } + } + } + } + ] + }, + { + "name": "AcknowledgeChallenge.challengeFocus", + "summary": "Internal API for Challenge Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "AcknowledgeChallenge.challengeResponse", + "summary": "Internal API for Challenge Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "$ref": "#/components/schemas/GrantResult" + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true, + "x-response-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example #1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": true + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #2", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": false + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #3", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": null + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "AcknowledgeChallenge.challengeError", + "summary": "Internal API for Challenge Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:acknowledgechallenge", + "x-allow-focus": true, + "x-error-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Advertising.config", + "summary": "Build configuration object for Ad Framework initialization", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [ + { + "name": "options", + "summary": "Configuration options", + "required": true, + "schema": { + "$ref": "#/components/schemas/AdConfigurationOptions" + } + } + ], + "result": { + "name": "adFrameworkConfig", + "summary": "the ad framework config", + "schema": { + "type": "object", + "description": "An opaque object represneting the AdConfiguration" + } + }, + "examples": [ + { + "name": "Initializing the Ad Framework", + "params": [ + { + "name": "options", + "value": { + "environment": "prod", + "authenticationEntity": "MVPD" + } + } + ], + "result": { + "name": "Default Result", + "value": { + "adServerUrl": "https://demo.v.fwmrm.net/ad/p/1", + "adServerUrlTemplate": "https://demo.v.fwmrm.net/ad/p/1?flag=+sltp+exvt+slcb+emcr+amcb+aeti&prof=12345:caf_allinone_profile &nw=12345&mode=live&vdur=123&caid=a110523018&asnw=372464&csid=gmott_ios_tablet_watch_live_ESPNU&ssnw=372464&vip=198.205.92.1&resp=vmap1&metr=1031&pvrn=12345&vprn=12345&vcid=1X0Ce7L3xRWlTeNhc7br8Q%3D%3D", + "adNetworkId": "519178", + "adProfileId": "12345:caf_allinone_profile", + "adSiteSectionId": "caf_allinone_profile_section", + "adOptOut": true, + "privacyData": "ew0KICAicGR0IjogImdkcDp2MSIsDQogICJ1c19wcml2YWN5IjogIjEtTi0iLA0KICAibG10IjogIjEiIA0KfQ0K", + "ifaValue": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa": "ewogICJ2YWx1ZSI6ICIwMTIzNDU2Ny04OUFCLUNERUYtR0gwMS0yMzQ1Njc4OUFCQ0QiLAogICJpZmFfdHlwZSI6ICJzc3BpZCIsCiAgImxtdCI6ICIwIgp9Cg==", + "appName": "FutureToday", + "appBundleId": "FutureToday.comcast", + "distributorAppId": "1001", + "deviceAdAttributes": "ewogICJib0F0dHJpYnV0ZXNGb3JSZXZTaGFyZUlkIjogIjEyMzQiCn0=", + "coppa": 0, + "authenticationEntity": "60f72475281cfba3852413bd53e957f6" + } + } + } + ] + }, + { + "name": "Advertising.policy", + "summary": "Get the advertising privacy and playback policy", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:advertising", + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "result": { + "name": "adPolicy", + "summary": "the ad policy", + "schema": { + "$ref": "#/components/schemas/AdPolicy" + } + }, + "examples": [ + { + "name": "Getting the advertising policy settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "skipRestriction": "adsUnwatched", + "limitAdTracking": false + } + } + } + ] + }, + { + "name": "Advertising.skipRestriction", + "summary": "Set the value for AdPolicy.skipRestriction", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "result", + "value": "none" + } + }, + { + "name": "Additional Example", + "params": [], + "result": { + "name": "result", + "value": "all" + } + } + ] + }, + { + "name": "Advertising.advertisingId", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:identifier" + ] + } + ], + "summary": "Get the advertising ID", + "params": [ + { + "name": "options", + "summary": "AdvertisingId options", + "required": false, + "schema": { + "$ref": "#/components/schemas/AdvertisingIdOptions" + } + } + ], + "result": { + "name": "advertisingId", + "summary": "the advertising ID", + "schema": { + "type": "object", + "properties": { + "ifa": { + "type": "string" + }, + "ifa_type": { + "type": "string" + }, + "lmt": { + "type": "string" + } + }, + "required": [ + "ifa" + ] + } + }, + "examples": [ + { + "name": "Getting the advertising ID", + "params": [], + "result": { + "name": "Default Result", + "value": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } + } + }, + { + "name": "Getting the advertising ID with scope browse", + "params": [ + { + "name": "options", + "value": { + "scope": { + "type": "browse", + "id": "paidPlacement" + } + } + } + ], + "result": { + "name": "Default Result", + "value": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } + } + }, + { + "name": "Getting the advertising ID with scope content", + "params": [ + { + "name": "options", + "value": { + "scope": { + "type": "content", + "id": "metadata:linear:station:123" + } + } + } + ], + "result": { + "name": "Default Result", + "value": { + "ifa": "01234567-89AB-CDEF-GH01-23456789ABCD", + "ifa_type": "idfa", + "lmt": "0" + } + } + } + ] + }, + { + "name": "Advertising.deviceAttributes", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "summary": "Get the device advertising device attributes", + "params": [], + "result": { + "name": "deviceAttributes", + "summary": "the device attributes", + "schema": { + "type": "object" + } + }, + "examples": [ + { + "name": "Getting the device attributes", + "params": [], + "result": { + "name": "Default Result", + "value": {} + } + } + ] + }, + { + "name": "Advertising.appBundleId", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "summary": "Get the App's Bundle ID", + "params": [], + "result": { + "name": "appBundleId", + "summary": "the app bundle ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "operator.app" + } + } + ] + }, + { + "name": "Advertising.resetIdentifier", + "summary": "Resets a user's identifier in the ad platform so that the advertising id that apps get will be a new value", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:identifier" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Advertising.onSkipRestrictionChanged", + "summary": "Set the value for AdPolicy.skipRestriction", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Advertising.skipRestriction" + }, + { + "name": "event", + "x-alternative": "skipRestriction" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "result", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": "none" + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": "all" + } + } + ] + }, + { + "name": "Advertising.onPolicyChanged", + "summary": "Get the advertising privacy and playback policy", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Advertising.policy" + }, + { + "name": "event", + "x-alternative": "policy" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:advertising", + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "result": { + "name": "adPolicy", + "summary": "the ad policy", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AdPolicy" + } + ] + } + }, + "examples": [ + { + "name": "Getting the advertising policy settings", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "skipRestriction": "adsUnwatched", + "limitAdTracking": false + } + } + } + ] + }, + { + "name": "Advertising.setSkipRestriction", + "summary": "Set the value for AdPolicy.skipRestriction", + "tags": [ + { + "name": "setter", + "x-setter-for": "skipRestriction" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:advertising:configuration" + ] + } + ], + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": "none" + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "value", + "value": "all" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "AudioDescriptions.enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "AudioDescriptions.onEnabledChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "AudioDescriptions.enabled" + }, + { + "name": "event", + "x-alternative": "enabled" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "AudioDescriptions.setEnabled", + "tags": [ + { + "name": "setter", + "x-setter-for": "enabled" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "Authentication.token", + "summary": "Get a specific `type` of authentication token", + "tags": [ + { + "name": "deprecated", + "x-alternative": "Authentication module has individual methods for each token type.", + "x-since": "0.9.0" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:platform" + ] + } + ], + "params": [ + { + "name": "type", + "summary": "What type of token to get", + "schema": { + "$ref": "#/components/schemas/TokenType" + }, + "required": true + }, + { + "name": "options", + "summary": "Additional options for acquiring the token.", + "schema": { + "type": "object" + }, + "required": false + } + ], + "result": { + "name": "token", + "summary": "the token value, type, and expiration", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "expires": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "examples": [ + { + "name": "Acquire a Firebolt platform token", + "params": [ + { + "name": "type", + "value": "platform" + } + ], + "result": { + "name": "token", + "value": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "platform" + } + } + }, + { + "name": "Acquire a Firebolt device identity token", + "params": [ + { + "name": "type", + "value": "device" + } + ], + "result": { + "name": "token", + "value": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "device" + } + } + }, + { + "name": "Acquire a Firebolt distributor token", + "params": [ + { + "name": "type", + "value": "distributor" + }, + { + "name": "options", + "value": { + "clientId": "xyz" + } + } + ], + "result": { + "name": "token", + "value": { + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "expires": "2022-04-23T18:25:43.511Z", + "type": "distributor", + "data": { + "tid": "EB00E9230AB2A35F57DB4EFDDC4908F6446D38F08F4FF0BD57FE6A61E21EEFD9", + "scope": "scope" + } + } + } + } + ] + }, + { + "name": "Authentication.device", + "summary": "Get a device token scoped to the current app.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:device" + ] + } + ], + "params": [], + "result": { + "name": "token", + "summary": "the token value and expiration", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Acquire a Firebolt device identity token", + "params": [], + "result": { + "name": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + ] + }, + { + "name": "Authentication.session", + "summary": "Get a destributor session token.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:session" + ] + } + ], + "params": [], + "result": { + "name": "token", + "summary": "the token value", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Acquire a distributor session token", + "params": [], + "result": { + "name": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + ] + }, + { + "name": "Authentication.root", + "summary": "Get a root device token.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:token:root" + ] + } + ], + "params": [], + "result": { + "name": "token", + "summary": "the token value", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Acquire a Firebolt root device identity token", + "params": [], + "result": { + "name": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + } + ] + }, + { + "name": "Capabilities.supported", + "summary": "Returns whether the platform supports the passed capability.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + } + ], + "result": { + "name": "supported", + "summary": "Whether or not capability is supported in device.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Wifi scan supported capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:wifi:scan" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "BLE protocol unsupported capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:protocol:bluetoothle" + } + ], + "result": { + "name": "Default Result", + "value": false + } + } + ] + }, + { + "name": "Capabilities.available", + "summary": "Returns whether a capability is available now.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + } + ], + "result": { + "name": "available", + "summary": "Whether or not capability is available now.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Device Token.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:device" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "Unavailable Platform token.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:platform" + } + ], + "result": { + "name": "Default Result", + "value": false + } + } + ] + }, + { + "name": "Capabilities.permitted", + "summary": "Returns whether the current App has permission to the passed capability and role.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "options", + "summary": "Capability options", + "schema": { + "$ref": "#/components/schemas/CapabilityOption" + } + } + ], + "result": { + "name": "permitted", + "summary": "Whether or not app is permitted for the given capability and the role", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Keyboard", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:input:keyboard" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "Keyboard incorrect manage role capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:input:keyboard" + }, + { + "name": "options", + "value": { + "role": "manage" + } + } + ], + "result": { + "name": "Default Result", + "value": false + } + }, + { + "name": "Wifi scan not permitted capability", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:wifi:scan" + } + ], + "result": { + "name": "Default Result", + "value": false + } + } + ] + }, + { + "name": "Capabilities.granted", + "summary": "Returns whether the current App has a user grant for passed capability and role.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "options", + "summary": "Capability options", + "schema": { + "$ref": "#/components/schemas/CapabilityOption" + } + } + ], + "result": { + "name": "granted", + "summary": "Whether or not app is granted to use the given capability and the role", + "schema": { + "oneOf": [ + { + "type": "boolean" + }, + { + "const": null + } + ] + } + }, + "examples": [ + { + "name": "Default capabilities without grants.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:input:keyboard" + } + ], + "result": { + "name": "Default Result", + "value": true + } + }, + { + "name": "Get Postal code without grants.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + } + ], + "result": { + "name": "Default Result", + "value": false + } + }, + { + "name": "Get Postal code with grants.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Capabilities.info", + "summary": "Returns an array of CapabilityInfo objects for the passed in capabilities.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "params": [ + { + "name": "capabilities", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "minItems": 1 + } + } + ], + "result": { + "name": "info", + "summary": "Returns an array of CapabilityInfo objects for the passed in capabilities.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default result", + "params": [ + { + "name": "capabilities", + "value": [ + "xrn:firebolt:capability:device:model", + "xrn:firebolt:capability:input:keyboard", + "xrn:firebolt:capability:protocol:bluetoothle", + "xrn:firebolt:capability:token:device", + "xrn:firebolt:capability:token:platform", + "xrn:firebolt:capability:protocol:moca", + "xrn:firebolt:capability:wifi:scan", + "xrn:firebolt:capability:localization:postal-code", + "xrn:firebolt:capability:localization:locality" + ] + } + ], + "result": { + "name": "Default Result", + "value": [ + { + "capability": "xrn:firebolt:capability:device:model", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:input:keyboard", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:protocol:bluetoothle", + "supported": false, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unsupported" + ] + }, + { + "capability": "xrn:firebolt:capability:token:device", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + }, + { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unavailable" + ] + }, + { + "capability": "xrn:firebolt:capability:protocol:moca", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "disabled", + "unavailable" + ] + }, + { + "capability": "xrn:firebolt:capability:wifi:scan", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unpermitted" + ] + }, + { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": null + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "ungranted" + ] + }, + { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "ungranted" + ] + }, + { + "capability": "xrn:firebolt:capability:localization:locality", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "grantDenied", + "ungranted" + ] + } + ] + } + } + ] + }, + { + "name": "Capabilities.request", + "summary": "Requests grants for all capability/role combinations in the roles array.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:request" + ] + } + ], + "params": [ + { + "name": "grants", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/Permission" + }, + "minItems": 1 + } + } + ], + "result": { + "name": "request", + "summary": "Returns an array of CapabilityInfo objects for the passed in capabilities.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + }, + "minItems": 1 + } + }, + "examples": [ + { + "name": "Default result", + "params": [ + { + "name": "grants", + "value": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:commerce:purchase" + } + ] + } + ], + "result": { + "name": "Default Result", + "value": [ + { + "capability": "xrn:firebolt:capability:commerce:purchase", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + ] + } + } + ] + }, + { + "name": "Capabilities.onAvailable", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become available.", + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Platform token is available", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:platform" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default result", + "value": { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unpermitted" + ] + } + } + } + ] + }, + { + "name": "Capabilities.onUnavailable", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become unavailable.", + "params": [ + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Platform token is unavailable.", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:token:platform" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "capability": "xrn:firebolt:capability:token:platform", + "supported": true, + "available": false, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "unavailable" + ] + } + } + } + ] + }, + { + "name": "Capabilities.onGranted", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become granted.", + "params": [ + { + "name": "role", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + } + }, + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Postal code granted", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + } + } + ] + }, + { + "name": "Capabilities.onRevoked", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:capabilities:info" + ] + } + ], + "summary": "Listens for all App permitted capabilities to become revoked.", + "params": [ + { + "name": "role", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + } + }, + { + "name": "capability", + "required": true, + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "Provides the capability info.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Capabilities/CapabilityInfo" + } + ] + } + }, + "examples": [ + { + "name": "Postal code revoked", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "capability": "xrn:firebolt:capability:localization:postal-code", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + }, + "details": [ + "grantDenied" + ] + } + } + } + ] + }, + { + "name": "ClosedCaptions.enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "Whether or not closed-captions are enabled.", + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "ClosedCaptions.fontFamily", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font family for displaying closed-captions.", + "params": [], + "result": { + "name": "family", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontFamily" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "family", + "value": "monospaced_sanserif" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "family", + "value": "cursive" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "family", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontSize", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font size for displaying closed-captions.", + "params": [], + "result": { + "name": "size", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontSize" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "size", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font color for displaying closed-captions.", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontEdge", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge style for displaying closed-captions.", + "params": [], + "result": { + "name": "edge", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontEdge" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "edge", + "value": "none" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "edge", + "value": "uniform" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "edge", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontEdgeColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge color for displaying closed-captions.", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.fontOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions characters.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.backgroundColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred background color for displaying closed-captions, .", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.backgroundOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions backgrounds.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.textAlign", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [], + "result": { + "name": "alignment", + "schema": { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "alignment", + "value": "center" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "alignment", + "value": "left" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.textAlignVertical", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [], + "result": { + "name": "alignment", + "schema": { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "alignment", + "value": "middle" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "alignment", + "value": "top" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.windowColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "white" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.windowOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.preferredLanguages", + "summary": "A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device.", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred closed captions languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "ClosedCaptions.onEnabledChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.enabled" + }, + { + "name": "event", + "x-alternative": "enabled" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "Whether or not closed-captions are enabled.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "ClosedCaptions.onFontFamilyChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontFamily" + }, + { + "name": "event", + "x-alternative": "fontFamily" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font family for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "family", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/FontFamily" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "family", + "value": "monospaced_sanserif" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "family", + "value": "cursive" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "family", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontSizeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontSize" + }, + { + "name": "event", + "x-alternative": "fontSize" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font size for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "size", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/FontSize" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "size", + "value": 1 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "size", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontColor" + }, + { + "name": "event", + "x-alternative": "fontColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font color for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontEdgeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontEdge" + }, + { + "name": "event", + "x-alternative": "fontEdge" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge style for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "edge", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/FontEdge" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edge", + "value": "none" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edge", + "value": "uniform" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edge", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontEdgeColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontEdgeColor" + }, + { + "name": "event", + "x-alternative": "fontEdgeColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge color for displaying closed-captions.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onFontOpacityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.fontOpacity" + }, + { + "name": "event", + "x-alternative": "fontOpacity" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions characters.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "opacity", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onBackgroundColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.backgroundColor" + }, + { + "name": "event", + "x-alternative": "backgroundColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred background color for displaying closed-captions, .", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#ffffff" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onBackgroundOpacityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.backgroundOpacity" + }, + { + "name": "event", + "x-alternative": "backgroundOpacity" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "opacity", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onTextAlignChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.textAlign" + }, + { + "name": "event", + "x-alternative": "textAlign" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "alignment", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "center" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "left" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onTextAlignVerticalChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.textAlignVertical" + }, + { + "name": "event", + "x-alternative": "textAlignVertical" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "alignment", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "middle" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": "top" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onWindowColorChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.windowColor" + }, + { + "name": "event", + "x-alternative": "windowColor" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "color", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Color" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": "white" + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onWindowOpacityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.windowOpacity" + }, + { + "name": "event", + "x-alternative": "windowOpacity" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "opacity", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.onPreferredLanguagesChanged", + "summary": "A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "ClosedCaptions.preferredLanguages" + }, + { + "name": "event", + "x-alternative": "preferredLanguages" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred closed captions languages", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "ClosedCaptions.setEnabled", + "tags": [ + { + "name": "setter", + "x-setter-for": "enabled" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "Whether or not closed-captions are enabled.", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontFamily", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontFamily" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font family for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontFamily" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "monospaced_sanserif" + } + ], + "result": { + "name": "family", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "cursive" + } + ], + "result": { + "name": "family", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "family", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontSize", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontSize" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font size for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontSize" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 1 + } + ], + "result": { + "name": "size", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 1 + } + ], + "result": { + "name": "size", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "size", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font color for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#ffffff" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontEdge", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontEdge" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge style for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/FontEdge" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "none" + } + ], + "result": { + "name": "edge", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "uniform" + } + ], + "result": { + "name": "edge", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "edge", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontEdgeColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontEdgeColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred font edge color for displaying closed-captions.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "#ffffff" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setFontOpacity", + "tags": [ + { + "name": "setter", + "x-setter-for": "fontOpacity" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions characters.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 99 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 100 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setBackgroundColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "backgroundColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred background color for displaying closed-captions, .", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "#ffffff" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setBackgroundOpacity", + "tags": [ + { + "name": "setter", + "x-setter-for": "backgroundOpacity" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 99 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 100 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setTextAlign", + "tags": [ + { + "name": "setter", + "x-setter-for": "textAlign" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "center" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "left" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setTextAlignVertical", + "tags": [ + { + "name": "setter", + "x-setter-for": "textAlignVertical" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "middle" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "top" + } + ], + "result": { + "name": "alignment", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setWindowColor", + "tags": [ + { + "name": "setter", + "x-setter-for": "windowColor" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "#000000" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "white" + } + ], + "result": { + "name": "color", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setWindowOpacity", + "tags": [ + { + "name": "setter", + "x-setter-for": "windowOpacity" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": 99 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": 100 + } + ], + "result": { + "name": "opacity", + "value": null + } + }, + { + "name": "Default example #3", + "params": [ + { + "name": "value", + "value": null + } + ], + "result": { + "name": "opacity", + "value": null + } + } + ] + }, + { + "name": "ClosedCaptions.setPreferredLanguages", + "summary": "A prioritized list of ISO 639-2/B codes for the preferred closed captions languages on this device.", + "params": [ + { + "name": "value", + "summary": "the preferred closed captions languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "preferredLanguages" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": [ + "spa", + "eng" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "value", + "value": [ + "eng", + "spa" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Content.requestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Discovery.onRequestUserInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestReason" + } + } + ], + "result": { + "name": "interest", + "schema": { + "$ref": "#/components/schemas/InterestResult" + }, + "summary": "The EntityDetails data." + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "type", + "value": "interest" + }, + { + "name": "reason", + "value": "playlist" + } + ], + "result": { + "name": "interest", + "value": { + "appId": "cool-app", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + } + } + ] + }, + { + "name": "Content.onUserInterest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-provided-by": "Discovery.userInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "interest", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/InterestEvent" + } + ] + }, + "summary": "The EntityDetails data." + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "interest", + "value": { + "appId": "cool-app", + "type": "interest", + "reason": "playlist", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + } + } + ] + }, + { + "name": "Device.id", + "summary": "Get the platform back-office device identifier", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:id" + ] + } + ], + "result": { + "name": "id", + "summary": "the id", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "123" + } + } + ] + }, + { + "name": "Device.distributor", + "summary": "Get the distributor ID for this device", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:distributor" + ] + } + ], + "result": { + "name": "distributorId", + "summary": "the distributor ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the distributor ID", + "params": [], + "result": { + "name": "Default Result", + "value": "Company" + } + } + ] + }, + { + "name": "Device.platform", + "summary": "Get the platform ID for this device", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "platformId", + "summary": "the platform ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the platform ID", + "params": [], + "result": { + "name": "Default Result", + "value": "WPE" + } + } + ] + }, + { + "name": "Device.uid", + "summary": "Gets a unique id for the current app & device", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:uid" + ] + } + ], + "result": { + "name": "uniqueId", + "summary": "a unique ID", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the unique ID", + "params": [], + "result": { + "name": "Default Result", + "value": "ee6723b8-7ab3-462c-8d93-dbf61227998e" + } + } + ] + }, + { + "name": "Device.type", + "summary": "Get the device type", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "deviceType", + "summary": "the device type", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device type", + "params": [], + "result": { + "name": "Default Result", + "value": "STB" + } + } + ] + }, + { + "name": "Device.model", + "summary": "Get the device model", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:model" + ] + } + ], + "result": { + "name": "model", + "summary": "the device model", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device model", + "params": [], + "result": { + "name": "Default Result", + "value": "xi6" + } + } + ] + }, + { + "name": "Device.sku", + "summary": "Get the device sku", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:sku" + ] + } + ], + "result": { + "name": "sku", + "summary": "the device sku", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device sku", + "params": [], + "result": { + "name": "Default Result", + "value": "AX061AEI" + } + } + ] + }, + { + "name": "Device.make", + "summary": "Get the device make", + "params": [], + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:make" + ] + } + ], + "result": { + "name": "make", + "summary": "the device make", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Getting the device make", + "params": [], + "result": { + "name": "Default Result", + "value": "Arris" + } + } + ] + }, + { + "name": "Device.version", + "summary": "Get the SDK, OS and other version info", + "params": [], + "tags": [ + { + "name": "exclude-from-sdk" + }, + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "versions", + "summary": "the versions", + "schema": { + "type": "object", + "properties": { + "sdk": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The Firebolt SDK version" + }, + "api": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The lateset Firebolt API version supported by the curent device." + }, + "firmware": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "The device firmware version." + }, + "os": { + "$ref": "#/x-schemas/Types/SemanticVersion", + "description": "**Deprecated** Use `firmware`, instead." + }, + "debug": { + "type": "string", + "description": "Detail version as a string, for debugging purposes" + } + }, + "required": [ + "api", + "firmware", + "os" + ] + } + }, + "examples": [ + { + "name": "Getting the os and sdk versions", + "params": [], + "result": { + "name": "Default Result", + "value": { + "sdk": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt JS SDK v0.8.0" + }, + "api": { + "major": 0, + "minor": 8, + "patch": 0, + "readable": "Firebolt API v0.8.0" + }, + "firmware": { + "major": 1, + "minor": 2, + "patch": 3, + "readable": "Device Firmware v1.2.3" + }, + "os": { + "major": 0, + "minor": 1, + "patch": 0, + "readable": "Firebolt OS v0.1.0" + }, + "debug": "Non-parsable build info for error logging only." + } + } + } + ] + }, + { + "name": "Device.hdcp", + "summary": "Get the supported HDCP profiles", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdcpProfiles", + "summary": "the supported HDCP profiles", + "schema": { + "$ref": "#/x-schemas/Types/BooleanMap" + } + }, + "examples": [ + { + "name": "Getting the supported HDCP profiles", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdcp1.4": true, + "hdcp2.2": true + } + } + } + ] + }, + { + "name": "Device.hdr", + "summary": "Get the supported HDR profiles", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdrProfiles", + "summary": "the supported HDR profiles", + "schema": { + "$ref": "#/x-schemas/Types/BooleanMap" + } + }, + "examples": [ + { + "name": "Getting the supported HDR profiles", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } + } + } + ] + }, + { + "name": "Device.audio", + "summary": "Get the supported audio profiles", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedAudioProfiles", + "summary": "the supported audio profiles", + "schema": { + "$ref": "#/components/schemas/AudioProfiles" + } + }, + "examples": [ + { + "name": "Getting the supported audio profiles", + "params": [], + "result": { + "name": "Default Result", + "value": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } + } + } + ] + }, + { + "name": "Device.screenResolution", + "summary": "Get the current screen resolution", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "screenResolution", + "summary": "the resolution", + "schema": { + "$ref": "#/components/schemas/Resolution" + } + }, + "examples": [ + { + "name": "Getting the screen resolution", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.videoResolution", + "summary": "Get the current video resolution", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "videoResolution", + "summary": "the resolution", + "schema": { + "$ref": "#/components/schemas/Resolution" + } + }, + "examples": [ + { + "name": "Getting the video resolution", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.name", + "summary": "The human readable name of the device", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "Living Room" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "Kitchen" + } + } + ] + }, + { + "name": "Device.onDeviceNameChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "deprecated", + "x-since": "0.6.0", + "x-alternative": "Device.name()" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "summary": "Get the human readable name of the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Getting the device name", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Living Room" + } + } + ] + }, + { + "name": "Device.network", + "summary": "Get the current network status and type", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:status" + ] + } + ], + "result": { + "name": "networkInfo", + "summary": "the status and type", + "schema": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/NetworkState" + }, + "type": { + "$ref": "#/components/schemas/NetworkType" + } + }, + "required": [ + "state", + "type" + ] + } + }, + "examples": [ + { + "name": "Getting the network info", + "params": [], + "result": { + "name": "Default Result", + "value": { + "state": "connected", + "type": "wifi" + } + } + } + ] + }, + { + "name": "Device.provision", + "summary": "Used by a distributor to push provision info to firebolt.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:account:id", + "xrn:firebolt:capability:device:id", + "xrn:firebolt:capability:device:distributor" + ] + } + ], + "params": [ + { + "name": "accountId", + "summary": "The id of the account that is device is attached to in the back office.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "summary": "The id of the device in the back office.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "distributorId", + "summary": "The id of the distributor in the back office.", + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "accountId", + "value": "12345678910" + }, + { + "name": "deviceId", + "value": "987654321111" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "With distributor id", + "params": [ + { + "name": "accountId", + "value": "12345678910" + }, + { + "name": "deviceId", + "value": "987654321111" + }, + { + "name": "distributorId", + "value": "global_partner" + } + ], + "result": { + "name": "partnerResult", + "value": null + } + } + ] + }, + { + "name": "Device.onNameChanged", + "summary": "The human readable name of the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.name" + }, + { + "name": "event", + "x-alternative": "name" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Living Room" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Kitchen" + } + } + ] + }, + { + "name": "Device.onHdcpChanged", + "summary": "Get the supported HDCP profiles", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.hdcp" + }, + { + "name": "event", + "x-alternative": "hdcp" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdcpProfiles", + "summary": "the supported HDCP profiles", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Types/BooleanMap" + } + ] + } + }, + "examples": [ + { + "name": "Getting the supported HDCP profiles", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "hdcp1.4": true, + "hdcp2.2": true + } + } + } + ] + }, + { + "name": "Device.onHdrChanged", + "summary": "Get the supported HDR profiles", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.hdr" + }, + { + "name": "event", + "x-alternative": "hdr" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedHdrProfiles", + "summary": "the supported HDR profiles", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Types/BooleanMap" + } + ] + } + }, + "examples": [ + { + "name": "Getting the supported HDR profiles", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "hdr10": true, + "hdr10Plus": true, + "dolbyVision": true, + "hlg": true + } + } + } + ] + }, + { + "name": "Device.onAudioChanged", + "summary": "Get the supported audio profiles", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.audio" + }, + { + "name": "event", + "x-alternative": "audio" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "supportedAudioProfiles", + "summary": "the supported audio profiles", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AudioProfiles" + } + ] + } + }, + "examples": [ + { + "name": "Getting the supported audio profiles", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } + } + } + ] + }, + { + "name": "Device.onScreenResolutionChanged", + "summary": "Get the current screen resolution", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.screenResolution" + }, + { + "name": "event", + "x-alternative": "screenResolution" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "screenResolution", + "summary": "the resolution", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/Resolution" + } + ] + } + }, + "examples": [ + { + "name": "Getting the screen resolution", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.onVideoResolutionChanged", + "summary": "Get the current video resolution", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.videoResolution" + }, + { + "name": "event", + "x-alternative": "videoResolution" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "result": { + "name": "videoResolution", + "summary": "the resolution", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/Resolution" + } + ] + } + }, + "examples": [ + { + "name": "Getting the video resolution", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + 1920, + 1080 + ] + } + } + ] + }, + { + "name": "Device.onNetworkChanged", + "summary": "Get the current network status and type", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Device.network" + }, + { + "name": "event", + "x-alternative": "network" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:network:status" + ] + } + ], + "result": { + "name": "networkInfo", + "summary": "the status and type", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/NetworkState" + }, + "type": { + "$ref": "#/components/schemas/NetworkType" + } + }, + "required": [ + "state", + "type" + ] + } + ] + } + }, + "examples": [ + { + "name": "Getting the network info", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "connected", + "type": "wifi" + } + } + } + ] + }, + { + "name": "Device.setName", + "summary": "The human readable name of the device", + "params": [ + { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "type": "string" + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "name" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "Living Room" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "Kitchen" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Discovery.policy", + "summary": "get the discovery policy", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:policy" + ] + } + ], + "result": { + "name": "policy", + "summary": "discovery policy opt-in/outs", + "schema": { + "$ref": "#/components/schemas/DiscoveryPolicy" + } + }, + "examples": [ + { + "name": "Getting the discovery policy", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true + } + } + } + ] + }, + { + "name": "Discovery.entityInfo", + "tags": [ + { + "name": "polymorphic-pull" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:entity-info" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow.", + "description": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow. Includes information about the program entity and its relevant associated entities, such as extras, previews, and, in the case of TV series, seasons and episodes.\n\nSee the `EntityInfo` and `WayToWatch` data structures below for more information.\n\nThe app only needs to implement Pull support for `entityInfo` at this time.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "result", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/EntityInfoResult" + }, + "summary": "The entityInfo data." + } + ], + "result": { + "name": "success", + "summary": "True if the push operation is successful", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send entity info for a movie to the platform.", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": [ + "UHD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ], + "subtitles": [ + "es" + ], + "audioDescriptions": [ + "en" + ] + } + ] + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send entity info for a movie with a trailer to the platform.", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": [ + "UHD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ], + "subtitles": [ + "es" + ], + "audioDescriptions": [ + "en" + ] + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "preview", + "title": "Cool Runnings Trailer", + "waysToWatch": [ + { + "identifiers": { + "assetId": "123111", + "entityId": "345" + }, + "entitled": true, + "videoQuality": [ + "HD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + } + ] + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send entity info for a TV Series with seasons and episodes to the platform.", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "expires": "2025-01-01T00:00:00.000Z", + "entity": { + "identifiers": { + "entityId": "98765" + }, + "entityType": "program", + "programType": "series", + "title": "Perfect Strangers", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ] + }, + "related": [ + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "season", + "seasonNumber": 1, + "title": "Perfect Strangers Season 3", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": [ + "SD" + ], + "audioProfile": [ + "stereo" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + }, + { + "identifiers": { + "entityId": "111", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 1, + "title": "Knock Knock, Who's There?", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-03-25T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "556", + "entityId": "111", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": [ + "SD" + ], + "audioProfile": [ + "stereo" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + }, + { + "identifiers": { + "entityId": "112", + "seriesId": "98765" + }, + "entityType": "program", + "programType": "episode", + "seasonNumber": 1, + "episodeNumber": 2, + "title": "Picture This", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1986-04-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-TV", + "rating": "TV-PG" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "557", + "entityId": "112", + "seriesId": "98765" + }, + "entitled": true, + "offeringType": "free", + "videoQuality": [ + "SD" + ], + "audioProfile": [ + "stereo" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ] + } + ] + } + ] + } + } + ], + "result": { + "name": "result", + "value": true + } + } + ] + }, + { + "name": "Discovery.purchasedContent", + "tags": [ + { + "name": "polymorphic-pull" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide a list of purchased content for the authenticated account, such as rentals and electronic sell through purchases.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "result", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/PurchasedContentResult" + }, + "summary": "The data for the purchasedContent" + } + ], + "result": { + "name": "success", + "summary": "True if the push operation is successful", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Inform the platform of the user's purchased content", + "params": [ + { + "name": "correlationId", + "value": null + }, + { + "name": "result", + "value": { + "totalCount": 10, + "expires": "2025-01-01T00:00:00.000Z", + "entries": [ + { + "identifiers": { + "entityId": "345" + }, + "entityType": "program", + "programType": "movie", + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ], + "waysToWatch": [ + { + "identifiers": { + "assetId": "123" + }, + "expires": "2025-01-01T00:00:00.000Z", + "entitled": true, + "entitledExpires": "2025-01-01T00:00:00.000Z", + "offeringType": "buy", + "price": 2.99, + "videoQuality": [ + "UHD" + ], + "audioProfile": [ + "dolbyAtmos" + ], + "audioLanguages": [ + "en" + ], + "closedCaptions": [ + "en" + ], + "subtitles": [ + "es" + ], + "audioDescriptions": [ + "en" + ] + } + ] + } + ] + } + } + ], + "result": { + "name": "success", + "value": true + } + } + ], + "description": "Return content purchased by the user, such as rentals and electronic sell through purchases.\n\nThe app should return the user's 100 most recent purchases in `entries`. The total count of purchases must be provided in `count`. If `count` is greater than the total number of `entries`, the UI may provide a link into the app to see the complete purchase list.\n\nThe `EntityInfo` object returned is not required to have `waysToWatch` populated, but it is recommended that it do so in case the UI wants to surface additional information on the purchases screen.\n\nThe app should implement both Push and Pull methods for `purchasedContent`.\n\nThe app should actively push `purchasedContent` when:\n\n* The app becomes Active.\n* When the state of the purchasedContent set has changed.\n* The app goes into Inactive or Background state, if there is a chance a change event has been missed." + }, + { + "name": "Discovery.watched", + "summary": "Notify the platform that content was partially or completely watched", + "tags": [ + { + "name": "polymorphic-reducer" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:watched" + ] + } + ], + "params": [ + { + "name": "entityId", + "required": true, + "schema": { + "type": "string" + }, + "summary": "The entity Id of the watched content." + }, + { + "name": "progress", + "summary": "How much of the content has been watched (percentage as 0-1 for VOD, number of seconds for live)", + "schema": { + "type": "number", + "minimum": 0 + } + }, + { + "name": "completed", + "summary": "Whether or not this viewing is considered \"complete,\" per the app's definition thereof", + "schema": { + "type": "boolean" + } + }, + { + "name": "watchedOn", + "summary": "Date/Time the content was watched, ISO 8601 Date/Time", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Notifying the platform of watched content", + "params": [ + { + "name": "entityId", + "value": "partner.com/entity/123" + }, + { + "name": "progress", + "value": 0.95 + }, + { + "name": "completed", + "value": true + }, + { + "name": "watchedOn", + "value": "2021-04-23T18:25:43.511Z" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.watchNext", + "summary": "Suggest a call-to-action for this app on the platform home screen", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:watch-next" + ] + } + ], + "params": [ + { + "name": "title", + "summary": "The title of this call to action", + "schema": { + "$ref": "#/x-schemas/Types/LocalizedString" + }, + "required": true + }, + { + "name": "identifiers", + "summary": "A set of content identifiers for this call to action", + "schema": { + "$ref": "#/x-schemas/Entertainment/ContentIdentifiers" + }, + "required": true + }, + { + "name": "expires", + "summary": "When this call to action should no longer be presented to users", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "images", + "summary": "A set of images for this call to action", + "schema": { + "type": "object", + "patternProperties": { + "^.*$": { + "$ref": "#/x-schemas/Types/LocalizedString" + } + } + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Suggest a watch-next tile for the home screen", + "params": [ + { + "name": "title", + "value": "A Cool Show" + }, + { + "name": "identifiers", + "value": { + "entityId": "partner.com/entity/123" + } + }, + { + "name": "expires", + "value": "2021-04-23T18:25:43.511Z" + }, + { + "name": "images", + "value": { + "3x4": { + "en-US": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg", + "es": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg" + }, + "16x9": { + "en": "https://i.ytimg.com/vi/4r7wHMg5Yjg/maxresdefault.jpg" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Suggest a watch-next tile for the home screen", + "params": [ + { + "name": "title", + "value": "A Fantastic Show" + }, + { + "name": "identifiers", + "value": { + "entityId": "partner.com/entity/456" + } + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.entitlements", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:content-access" + ] + }, + { + "name": "deprecated", + "x-since": "0.10.0", + "x-alternative": "Discovery.contentAccess()" + } + ], + "summary": "Inform the platform of the users latest entitlements w/in this app.", + "params": [ + { + "name": "entitlements", + "summary": "Array of entitlement objects", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/Entitlement" + } + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Update user's entitlements", + "params": [ + { + "name": "entitlements", + "value": [ + { + "entitlementId": "partner.com/entitlement/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "entitlementId": "partner.com/entitlement/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ] + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.contentAccess", + "summary": "Inform the platform of what content the user can access either by discovering it or consuming it. Availabilities determine which content is discoverable to a user, while entitlements determine if the user can currently consume that content. Content can be available but not entitled, this means that user can see the content but when they try to open it they must gain an entitlement either through purchase or subscription upgrade. In case the access changed off-device, this API should be called any time the app comes to the foreground to refresh the access. This API should also be called any time the availabilities or entitlements change within the app for any reason. Typical reasons may include the user signing into an account or upgrading a subscription. Less common cases can cause availabilities to change, such as moving to a new service location. When availabilities or entitlements are removed from the subscriber (such as when the user signs out), then an empty array should be given. To clear both, use the Discovery.clearContentAccess convenience API.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:content-access" + ] + } + ], + "params": [ + { + "name": "ids", + "summary": "A list of identifiers that represent content that is discoverable or consumable for the subscriber", + "schema": { + "$ref": "#/components/schemas/ContentAccessIdentifiers" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Update subscriber's availabilities", + "params": [ + { + "name": "ids", + "value": { + "availabilities": [ + { + "type": "channel-lineup", + "id": "partner.com/availability/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "type": "channel-lineup", + "id": "partner.com/availability/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Update subscriber's availabilities and entitlements", + "params": [ + { + "name": "ids", + "value": { + "availabilities": [ + { + "type": "channel-lineup", + "id": "partner.com/availability/123", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + }, + { + "type": "channel-lineup", + "id": "partner.com/availability/456", + "startTime": "2021-04-23T18:25:43.511Z", + "endTime": "2021-04-23T18:25:43.511Z" + } + ], + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Update subscriber's entitlements", + "params": [ + { + "name": "ids", + "value": { + "entitlements": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Clear a subscriber's entitlements", + "params": [ + { + "name": "ids", + "value": { + "entitlements": [] + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Clear a subscriber's availabilities", + "params": [ + { + "name": "ids", + "value": { + "availabilities": [] + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.clearContentAccess", + "summary": "Clear both availabilities and entitlements from the subscriber. This is equivalent of calling `Discovery.contentAccess({ availabilities: [], entitlements: []})`. This is typically called when the user signs out of an account.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:content-access" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Clear subscriber's availabilities and entitlements", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.launch", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:launch" + ] + } + ], + "summary": "Launch or foreground the specified app, and optionally instructs it to navigate to the specified user action. \n For the Primary Experience, the appId can be any one of: \n\n - xrn:firebolt:application-type:main \n\n - xrn:firebolt:application-type:settings", + "params": [ + { + "name": "appId", + "required": true, + "summary": "The durable app Id of the app to launch", + "schema": { + "type": "string" + } + }, + { + "name": "intent", + "required": false, + "summary": "An optional `NavigationIntent` with details about what part of the app to show first, and context around how/why it was launched", + "schema": { + "$ref": "#/x-schemas/Intents/NavigationIntent" + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Launch the 'Foo' app to it's home screen.", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "intent", + "value": { + "action": "home", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the 'Foo' app to it's own page for a specific entity.", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "intent", + "value": { + "action": "entity", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the 'Foo' app to a fullscreen playback experience for a specific entity.", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "intent", + "value": { + "action": "playback", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to a global page for a specific entity.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "entity", + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "example-movie-id" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to a global page for the company / partner with the ID 'foo'.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "company:foo" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to it's home screen, as if the Home remote button was pressed.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "home", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "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", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to it's settings screen.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:settings " + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "settings" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to it's linear/epg guide.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main" + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "guide" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Launch the Aggregated Experience to the App Store details page for a specific app with the ID 'foo'.", + "params": [ + { + "name": "appId", + "value": "xrn:firebolt:application-type:main " + }, + { + "name": "intent", + "value": { + "action": "section", + "data": { + "sectionName": "app:foo" + }, + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.onNavigateTo", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:navigate-to" + ] + } + ], + "summary": "listen to `navigateTo` events", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "summary": "An object describing where in the app the user intends to navigate to", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Intents/NavigationIntent" + } + ] + } + }, + "examples": [ + { + "name": "Listening for `navigateTo` events", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "event", + "value": { + "action": "search", + "data": { + "query": "a cool show" + }, + "context": { + "campaign": "unknown", + "source": "voice" + } + } + } + } + ] + }, + { + "name": "Discovery.signIn", + "tags": [ + { + "name": "calls-metrics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Inform the platform that your user is signed in, for increased visibility in search & discovery. Sign-in state is used separately from what content can be access through entitlements and availabilities. Sign-in state may be used when deciding whether to choose this app to handle a user intent. For instance, if the user tries to launch something generic like playing music from an artist, only a signed-in app will be chosen. If the user wants to tune to a channel, only a signed-in app will be chosen to handle that intent. While signIn can optionally include entitlements as those typically change at signIn time, it is recommended to make a separate call to Discovery.contentAccess for entitlements. signIn is not only for when a user explicitly enters login credentials. If an app does not require any credentials from the user to consume content, such as in a free app, then the app should call signIn immediately on launch.", + "params": [ + { + "name": "entitlements", + "summary": "Optional array of Entitlements, in case of a different user account, or a long time since last sign-in.", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/Entitlement" + } + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signIn metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send signIn notification with entitlements", + "params": [ + { + "name": "entitlements", + "value": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.signOut", + "tags": [ + { + "name": "calls-metrics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Inform the platform that your user has signed out. See `Discovery.signIn` for more details on how the sign-in state is used.signOut will NOT clear entitlements, the app should make a separate call to Discovery.clearContentAccess. Apps should also call signOut when a login token has expired and the user is now in a signed-out state.", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signOut notification", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.onSignIn", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Listen to events from all apps that call Discovery.signIn", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "event", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "properties": { + "appId": { + "type": "string" + } + }, + "required": [ + "appId" + ] + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Event", + "value": { + "appId": "firecert" + } + } + } + ] + }, + { + "name": "Discovery.onSignOut", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:discovery:sign-in-status" + ] + } + ], + "summary": "Listen to events from all apps that call Discovery.signOut", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "event", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "properties": { + "appId": { + "type": "string" + } + }, + "required": [ + "appId" + ] + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Event", + "value": { + "appId": "firecert" + } + } + } + ] + }, + { + "name": "Discovery.userInterest", + "summary": "Send an entity that the user has expressed interest in to the platform.", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + } + ], + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "#/x-schemas/Discovery/InterestReason" + } + }, + { + "name": "entity", + "required": true, + "schema": { + "$ref": "#/x-schemas/Entity/EntityDetails" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "type", + "value": "interest" + }, + { + "name": "reason", + "value": "playlist" + }, + { + "name": "entity", + "value": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": {} + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.onRequestUserInterest", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response-name": "entity", + "x-response": { + "$ref": "#/x-schemas/Entity/EntityDetails", + "examples": [ + { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "request", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "object", + "required": [ + "correlationId", + "parameters" + ], + "properties": { + "correlationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/UserInterestProviderParameters" + } + }, + "additionalProperties": false + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "request", + "value": { + "correlationId": "xyz", + "parameters": { + "type": "interest", + "reason": "playlist" + } + } + } + } + ] + }, + { + "name": "Discovery.onPolicyChanged", + "summary": "get the discovery policy", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Discovery.policy" + }, + { + "name": "event", + "x-alternative": "policy" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:policy" + ] + } + ], + "result": { + "name": "policy", + "summary": "discovery policy opt-in/outs", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/DiscoveryPolicy" + } + ] + } + }, + "examples": [ + { + "name": "Getting the discovery policy", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "enableRecommendations": true, + "shareWatchHistory": true, + "rememberWatchedPrograms": true + } + } + } + ] + }, + { + "name": "Discovery.onPullEntityInfo", + "tags": [ + { + "name": "polymorphic-pull-event" + }, + { + "name": "event", + "x-pulls-for": "entityInfo" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:entity-info" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow.", + "description": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow. Includes information about the program entity and its relevant associated entities, such as extras, previews, and, in the case of TV series, seasons and episodes.\n\nSee the `EntityInfo` and `WayToWatch` data structures below for more information.\n\nThe app only needs to implement Pull support for `entityInfo` at this time.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "request", + "summary": "A EntityInfoFederatedRequest object.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/EntityInfoFederatedRequest" + } + ] + } + }, + "examples": [ + { + "name": "Send entity info for a movie to the platform.", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + } + }, + { + "name": "Send entity info for a movie with a trailer to the platform.", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + } + }, + { + "name": "Send entity info for a TV Series with seasons and episodes to the platform.", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + } + } + ] + }, + { + "name": "Discovery.onPullPurchasedContent", + "tags": [ + { + "name": "polymorphic-pull-event" + }, + { + "name": "event", + "x-pulls-for": "purchasedContent" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + }, + { + "name": "deprecated" + } + ], + "summary": "Provide a list of purchased content for the authenticated account, such as rentals and electronic sell through purchases.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "request", + "summary": "A PurchasedContentFederatedRequest object.", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/PurchasedContentFederatedRequest" + } + ] + } + }, + "examples": [ + { + "name": "Inform the platform of the user's purchased content", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "result", + "value": { + "correlationId": "xyz", + "parameters": { + "limit": 100 + } + } + } + } + ], + "description": "Return content purchased by the user, such as rentals and electronic sell through purchases.\n\nThe app should return the user's 100 most recent purchases in `entries`. The total count of purchases must be provided in `count`. If `count` is greater than the total number of `entries`, the UI may provide a link into the app to see the complete purchase list.\n\nThe `EntityInfo` object returned is not required to have `waysToWatch` populated, but it is recommended that it do so in case the UI wants to surface additional information on the purchases screen.\n\nThe app should implement both Push and Pull methods for `purchasedContent`.\n\nThe app should actively push `purchasedContent` when:\n\n* The app becomes Active.\n* When the state of the purchasedContent set has changed.\n* The app goes into Inactive or Background state, if there is a chance a change event has been missed." + }, + { + "name": "Discovery.userInterestResponse", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest", + "x-response-for": "Discovery.onRequestUserInterest" + } + ], + "summary": "Internal API for .onRequestUserInterest Provider to send back response.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "$ref": "#/x-schemas/Entity/EntityDetails", + "examples": [ + { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + ] + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Discovery.userInterestError", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest", + "x-error-for": "Discovery.onRequestUserInterest" + } + ], + "summary": "Internal API for .onRequestUserInterest Provider to send back error.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.ports", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Retrieve a list of HDMI input ports.", + "params": [], + "result": { + "name": "ports", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HDMIInputPort" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "ports", + "value": [ + { + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true + } + ] + } + } + ] + }, + { + "name": "HDMIInput.port", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Retrieve a specific HDMI input port.", + "params": [ + { + "name": "portId", + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "required": true + } + ], + "result": { + "name": "port", + "schema": { + "$ref": "#/components/schemas/HDMIInputPort" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "portId", + "value": "HDMI1" + } + ], + "result": { + "name": "ports", + "value": { + "port": "HDMI1", + "connected": true, + "signal": "stable", + "arcCapable": true, + "arcConnected": true, + "edidVersion": "2.0", + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true + } + } + } + ] + }, + { + "name": "HDMIInput.open", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Opens the HDMI Port allowing it to be the active source device. Incase there is a different HDMI portId already set as the active source, this call would stop the older portId before opening the given portId.", + "params": [ + { + "name": "portId", + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "required": true + } + ], + "result": { + "name": "port", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example for open", + "params": [ + { + "name": "portId", + "value": "HDMI1" + } + ], + "result": { + "name": "port", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.close", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Closes the given HDMI Port if it is the current active source for HDMI Input. If there was no active source, then there would no action taken on the device.", + "params": [], + "result": { + "name": "port", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example for stop", + "params": [], + "result": { + "name": "port", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.onConnectionChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Notification for when any HDMI port has a connection physically engaged or disengaged.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "info", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/ConnectionChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "info", + "value": { + "port": "HDMI1", + "connected": true + } + } + } + ] + }, + { + "name": "HDMIInput.onSignalChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "summary": "Notification for when any HDMI port has it's signal status changed.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "info", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/SignalChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "info", + "value": { + "port": "HDMI1", + "signal": "stable" + } + } + } + ] + }, + { + "name": "HDMIInput.lowLatencyMode", + "summary": "Property for the low latency mode setting.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "property" + } + ], + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "HDMIInput.onAutoLowLatencyModeSignalChanged", + "summary": "Notification for changes to ALLM status of any input device.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "event" + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "info", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AutoLowLatencyModeSignalChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "info", + "value": { + "port": "HDMI1", + "autoLowLatencyModeSignalled": true + } + } + } + ] + }, + { + "name": "HDMIInput.autoLowLatencyModeCapable", + "summary": "Property for each port auto low latency mode setting.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "property", + "x-subscriber-type": "global" + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "HDMIInput.edidVersion", + "summary": "Property for each port's active EDID version.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + }, + { + "name": "property" + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + } + ], + "result": { + "name": "edidVersion", + "schema": { + "$ref": "#/components/schemas/EDIDVersion" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "edidVersion", + "value": "2.0" + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + } + ], + "result": { + "name": "edidVersion", + "value": "1.4" + } + } + ] + }, + { + "name": "HDMIInput.onLowLatencyModeChanged", + "summary": "Property for the low latency mode setting.", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "HDMIInput.lowLatencyMode" + }, + { + "name": "event", + "x-alternative": "lowLatencyMode" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "HDMIInput.onAutoLowLatencyModeCapableChanged", + "summary": "Property for each port auto low latency mode setting.", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "HDMIInput.autoLowLatencyModeCapable" + }, + { + "name": "event", + "x-alternative": "autoLowLatencyModeCapable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "data", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/AutoLowLatencyModeCapableChangedInfo" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "data", + "value": { + "port": "HDMI1", + "enabled": true + } + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "data", + "value": { + "port": "HDMI1", + "enabled": false + } + } + } + ] + }, + { + "name": "HDMIInput.onEdidVersionChanged", + "summary": "Property for each port's active EDID version.", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "HDMIInput.edidVersion" + }, + { + "name": "event", + "x-alternative": "edidVersion" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "edidVersion", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/EDIDVersion" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edidVersion", + "value": "2.0" + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "edidVersion", + "value": "1.4" + } + } + ] + }, + { + "name": "HDMIInput.setLowLatencyMode", + "summary": "Property for the low latency mode setting.", + "tags": [ + { + "name": "setter", + "x-setter-for": "lowLatencyMode" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.setAutoLowLatencyModeCapable", + "summary": "Property for each port auto low latency mode setting.", + "tags": [ + { + "name": "setter", + "x-setter-for": "autoLowLatencyModeCapable" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + }, + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "HDMIInput.setEdidVersion", + "summary": "Property for each port's active EDID version.", + "tags": [ + { + "name": "setter", + "x-setter-for": "edidVersion" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:inputs:hdmi" + ] + } + ], + "params": [ + { + "name": "port", + "required": true, + "schema": { + "$ref": "#/components/schemas/HDMIPortId" + } + }, + { + "name": "value", + "schema": { + "$ref": "#/components/schemas/EDIDVersion" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": "2.0" + } + ], + "result": { + "name": "edidVersion", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "port", + "value": "HDMI1" + }, + { + "name": "value", + "value": "1.4" + } + ], + "result": { + "name": "edidVersion", + "value": null + } + } + ] + }, + { + "name": "Keyboard.email", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestEmail", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ], + "x-allow-focus": true + } + ], + "summary": "Prompt the user for their email address with a simplified list of choices.", + "params": [ + { + "name": "type", + "summary": "Why the email is being requested, e.g. sign on or sign up", + "required": true, + "schema": { + "$ref": "#/components/schemas/EmailUsage" + } + }, + { + "name": "message", + "summary": "The message to display while prompting", + "required": false, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "email", + "summary": "the selected or entered email", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Prompt the user to select or type an email address", + "params": [ + { + "name": "type", + "value": "signIn" + }, + { + "name": "message", + "value": "Enter your email to sign into this app" + } + ], + "result": { + "name": "Default Result", + "value": "user@domain.com" + } + }, + { + "name": "Prompt the user to type an email address to sign up", + "params": [ + { + "name": "type", + "value": "signUp" + }, + { + "name": "message", + "value": "Enter your email to sign up for this app" + } + ], + "result": { + "name": "Default Result", + "value": "user@domain.com" + } + } + ] + }, + { + "name": "Keyboard.password", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestPassword", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ], + "x-allow-focus": true + } + ], + "summary": "Show the password entry keyboard, with typing obfuscated from visibility", + "params": [ + { + "name": "message", + "summary": "The message to display while prompting", + "required": false, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "value", + "summary": "the selected or entered password", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Prompt the user to enter their password", + "params": [ + { + "name": "message", + "value": "Enter your password" + } + ], + "result": { + "name": "Default Result", + "value": "abc123" + } + } + ] + }, + { + "name": "Keyboard.standard", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestStandard", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ], + "x-allow-focus": true + } + ], + "summary": "Show the standard platform keyboard, and return the submitted value", + "params": [ + { + "name": "message", + "summary": "The message to display while prompting", + "required": true, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "value", + "summary": "the selected or entered text", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Prompt the user for an arbitrary string", + "params": [ + { + "name": "message", + "value": "Enter the name you'd like to associate with this device" + } + ], + "result": { + "name": "Default Result", + "value": "Living Room" + } + } + ] + }, + { + "name": "Keyboard.onRequestStandard", + "summary": "Registers as a provider for when the user should be shown a standard keyboard.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "type": "string", + "examples": [ + "username" + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true + } + ], + "result": { + "name": "sessionRequest", + "summary": "The request to start a keyboard session", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/KeyboardProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } + } + } + ] + }, + { + "name": "Keyboard.onRequestPassword", + "summary": "Registers as a provider for when the user should be shown a password keyboard, with dots for each character entered.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "type": "string", + "examples": [ + "password" + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true + } + ], + "result": { + "name": "sessionRequest", + "summary": "The request to start a keyboard session", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/KeyboardProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } + } + } + ] + }, + { + "name": "Keyboard.onRequestEmail", + "summary": "Registers as a provider for when the user should be shown a keyboard optimized for email address entry.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "type": "string", + "examples": [ + "email@address.com" + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true + } + ], + "result": { + "name": "sessionRequest", + "summary": "The request to start a keyboard session", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/KeyboardProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "message": "Enter your user name." + } + } + } + } + ] + }, + { + "name": "Keyboard.standardFocus", + "summary": "Internal API for Standard Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestStandard" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.passwordFocus", + "summary": "Internal API for Password Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestPassword" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.emailFocus", + "summary": "Internal API for Email Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestEmail" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.standardResponse", + "summary": "Internal API for Standard Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "type": "string", + "examples": [ + "username" + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-response-for": "onRequestStandard" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": "username" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.standardError", + "summary": "Internal API for Standard Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-error-for": "onRequestStandard" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.passwordResponse", + "summary": "Internal API for Password Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "type": "string", + "examples": [ + "password" + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-response-for": "onRequestPassword" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": "password" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.passwordError", + "summary": "Internal API for Password Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-error-for": "onRequestPassword" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.emailResponse", + "summary": "Internal API for Email Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "type": "string", + "examples": [ + "email@address.com" + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-response-for": "onRequestEmail" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": "email@address.com" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Keyboard.emailError", + "summary": "Internal API for Email Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:input:keyboard", + "x-allow-focus": true, + "x-error-for": "onRequestEmail" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.ready", + "tags": [ + { + "name": "calls-metrics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:ready" + ] + }, + { + "name": "exclude-from-sdk" + } + ], + "summary": "Notify the platform that the app is ready", + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Let the platform know that your app is ready", + "params": [], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.close", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Request that the platform move your app out of focus", + "params": [ + { + "name": "reason", + "summary": "The reason the app is requesting to be closed", + "required": true, + "schema": { + "$ref": "#/x-schemas/Lifecycle/CloseReason" + } + } + ], + "result": { + "name": "success", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Close the app when the user presses back on the app home screen", + "params": [ + { + "name": "reason", + "value": "remoteButton" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Close the app when the user selects an exit menu item", + "params": [ + { + "name": "reason", + "value": "userExit" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.finished", + "tags": [ + { + "name": "exclude-from-sdk" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Notify the platform that the app is done unloading", + "params": [], + "result": { + "name": "results", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Lifecycle.state", + "summary": "Get the current state of the app. This function is **synchronous**.", + "tags": [ + { + "name": "synchronous" + }, + { + "name": "exclude-from-sdk" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "params": [], + "result": { + "name": "state", + "summary": "the current state of the app.", + "schema": { + "$ref": "#/x-schemas/Lifecycle/LifecycleState" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "foreground" + } + } + ] + }, + { + "name": "Lifecycle.onInactive", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the inactive event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "inactive", + "previous": "initializing" + } + } + } + ] + }, + { + "name": "Lifecycle.onForeground", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the foreground event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "foreground", + "previous": "inactive" + } + } + }, + { + "name": "Move to foreground via remote branded buton", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "value", + "value": { + "state": "foreground", + "previous": "inactive", + "source": "remote" + } + } + } + ] + }, + { + "name": "Lifecycle.onBackground", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the background event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "background", + "previous": "foreground" + } + } + } + ] + }, + { + "name": "Lifecycle.onSuspended", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the suspended event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "suspended", + "previous": "inactive" + } + } + } + ] + }, + { + "name": "Lifecycle.onUnloading", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Listen to the unloading event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "value", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/LifecycleEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "state": "unloading", + "previous": "inactive" + } + } + } + ] + }, + { + "name": "Localization.locality", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locality" + ] + }, + { + "name": "property" + } + ], + "summary": "Get the locality/city the device is located in", + "params": [], + "result": { + "name": "locality", + "summary": "the device city", + "schema": { + "$ref": "#/x-schemas/Localization/Locality" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "Philadelphia" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "Rockville" + } + } + ] + }, + { + "name": "Localization.postalCode", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:postal-code" + ] + } + ], + "summary": "Get the postal code the device is located in", + "params": [], + "result": { + "name": "postalCode", + "summary": "the device postal code", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "19103" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "20850" + } + } + ] + }, + { + "name": "Localization.countryCode", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Get the ISO 3166-1 alpha-2 code for the country device is located in", + "params": [], + "result": { + "name": "code", + "summary": "the device country code", + "schema": { + "$ref": "#/x-schemas/Localization/CountryCode" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "US" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "UK" + } + } + ] + }, + { + "name": "Localization.language", + "summary": "Get the ISO 639 1/2 code for the preferred language", + "params": [], + "tags": [ + { + "name": "deprecated", + "x-since": "0.17.0", + "x-alternative": "Localization.locale" + }, + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "lang", + "summary": "the device language", + "schema": { + "$ref": "#/x-schemas/Localization/Language" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "en" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "es" + } + } + ] + }, + { + "name": "Localization.preferredAudioLanguages", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred audio languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "Localization.locale", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale", + "params": [], + "result": { + "name": "locale", + "summary": "the device locale", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "en-US" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "es-US" + } + } + ] + }, + { + "name": "Localization.latlon", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:location" + ] + } + ], + "summary": "Get the approximate latitude and longitude coordinates of the device location", + "params": [], + "result": { + "name": "latlong", + "summary": "lat/long tuple", + "schema": { + "$ref": "#/components/schemas/LatLon" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 39.9549, + 75.1699 + ] + } + } + ] + }, + { + "name": "Localization.additionalInfo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:additional-info" + ] + } + ], + "summary": "Get any platform-specific localization information, in an Map", + "params": [], + "result": { + "name": "info", + "summary": "the additional info", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "maxLength": 1024 + }, + "maxProperties": 32 + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "info", + "value": {} + } + } + ] + }, + { + "name": "Localization.addAdditionalInfo", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:additional-info" + ] + } + ], + "summary": "Add any platform-specific localization information in key/value pair", + "params": [ + { + "name": "key", + "summary": "Key to add additionalInfo", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "value", + "summary": "Value to be set for additionalInfo", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Add an additionalInfo for localization", + "params": [ + { + "name": "key", + "value": "defaultKey" + }, + { + "name": "value", + "value": "defaultValue=" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Localization.removeAdditionalInfo", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:additional-info" + ] + } + ], + "summary": "Remove any platform-specific localization information from map", + "params": [ + { + "name": "key", + "summary": "Key to remove additionalInfo", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Remove an additionalInfo for localization", + "params": [ + { + "name": "key", + "value": "defaultKey" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Localization.timeZone", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:time-zone" + ] + } + ], + "summary": "Set the IANA timezone for the device", + "params": [], + "result": { + "name": "result", + "schema": { + "$ref": "#/x-schemas/Localization/TimeZone" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "America/New_York" + } + }, + { + "name": "Additional Example", + "params": [], + "result": { + "name": "Default Result", + "value": "America/Los_Angeles" + } + } + ] + }, + { + "name": "Localization.onLocalityChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.locality" + }, + { + "name": "event", + "x-alternative": "locality" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locality" + ] + } + ], + "summary": "Get the locality/city the device is located in", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "locality", + "summary": "the device city", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/Locality" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Philadelphia" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "Rockville" + } + } + ] + }, + { + "name": "Localization.onPostalCodeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.postalCode" + }, + { + "name": "event", + "x-alternative": "postalCode" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:postal-code" + ] + } + ], + "summary": "Get the postal code the device is located in", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "postalCode", + "summary": "the device postal code", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "19103" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "20850" + } + } + ] + }, + { + "name": "Localization.onCountryCodeChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.countryCode" + }, + { + "name": "event", + "x-alternative": "countryCode" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Get the ISO 3166-1 alpha-2 code for the country device is located in", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "code", + "summary": "the device country code", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/CountryCode" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "US" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "UK" + } + } + ] + }, + { + "name": "Localization.onLanguageChanged", + "summary": "Get the ISO 639 1/2 code for the preferred language", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.language" + }, + { + "name": "event", + "x-alternative": "language" + }, + { + "name": "deprecated", + "x-since": "0.17.0", + "x-alternative": "Localization.locale" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "lang", + "summary": "the device language", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/Language" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "en" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "es" + } + } + ] + }, + { + "name": "Localization.onPreferredAudioLanguagesChanged", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.preferredAudioLanguages" + }, + { + "name": "event", + "x-alternative": "preferredAudioLanguages" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred audio languages", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "spa", + "eng" + ] + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": [ + "eng", + "spa" + ] + } + } + ] + }, + { + "name": "Localization.onLocaleChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.locale" + }, + { + "name": "event", + "x-alternative": "locale" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "locale", + "summary": "the device locale", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/Locale" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "en-US" + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "es-US" + } + } + ] + }, + { + "name": "Localization.onTimeZoneChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Localization.timeZone" + }, + { + "name": "event", + "x-alternative": "timeZone" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:time-zone" + ] + } + ], + "summary": "Set the IANA timezone for the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "result", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Localization/TimeZone" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "America/New_York" + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": "America/Los_Angeles" + } + } + ] + }, + { + "name": "Localization.setLocality", + "tags": [ + { + "name": "setter", + "x-setter-for": "locality" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:locality" + ] + } + ], + "summary": "Get the locality/city the device is located in", + "params": [ + { + "name": "value", + "summary": "the device city", + "schema": { + "$ref": "#/x-schemas/Localization/Locality" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "Philadelphia" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "Rockville" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setPostalCode", + "tags": [ + { + "name": "setter", + "x-setter-for": "postalCode" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:postal-code" + ] + } + ], + "summary": "Get the postal code the device is located in", + "params": [ + { + "name": "value", + "summary": "the device postal code", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "19103" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "20850" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setCountryCode", + "tags": [ + { + "name": "setter", + "x-setter-for": "countryCode" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:country-code" + ] + } + ], + "summary": "Get the ISO 3166-1 alpha-2 code for the country device is located in", + "params": [ + { + "name": "value", + "summary": "the device country code", + "schema": { + "$ref": "#/x-schemas/Localization/CountryCode" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "US" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "UK" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setLanguage", + "summary": "Get the ISO 639 1/2 code for the preferred language", + "params": [ + { + "name": "value", + "summary": "the device language", + "schema": { + "$ref": "#/x-schemas/Localization/Language" + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "language" + }, + { + "name": "deprecated", + "x-since": "0.17.0", + "x-alternative": "Localization.locale" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "en" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "es" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setPreferredAudioLanguages", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [ + { + "name": "value", + "summary": "the preferred audio languages", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + }, + "required": true + } + ], + "tags": [ + { + "name": "setter", + "x-setter-for": "preferredAudioLanguages" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": [ + "spa", + "eng" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default Example #2", + "params": [ + { + "name": "value", + "value": [ + "eng", + "spa" + ] + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setLocale", + "tags": [ + { + "name": "setter", + "x-setter-for": "locale" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:locale" + ] + } + ], + "summary": "Get the *full* BCP 47 code, including script, region, variant, etc., for the preferred langauage/locale", + "params": [ + { + "name": "value", + "summary": "the device locale", + "schema": { + "$ref": "#/x-schemas/Localization/Locale" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": "en-US" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": "es-US" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Localization.setTimeZone", + "tags": [ + { + "name": "setter", + "x-setter-for": "timeZone" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:localization:time-zone" + ] + } + ], + "summary": "Set the IANA timezone for the device", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Localization/TimeZone" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "value", + "value": "America/New_York" + } + ], + "result": { + "name": "Default Result", + "value": null + } + }, + { + "name": "Additional Example", + "params": [ + { + "name": "value", + "value": "America/Los_Angeles" + } + ], + "result": { + "name": "Default Result", + "value": null + } + } + ] + }, + { + "name": "Metrics.ready", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your app is minimally usable. This method is called automatically by `Lifecycle.ready()`", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send ready metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.signIn", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign in event, called by Discovery.signIn().", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signIn metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send signIn metric with entitlements", + "params": [ + { + "name": "entitlements", + "value": [ + { + "entitlementId": "123", + "startTime": "2025-01-01T00:00:00.000Z", + "endTime": "2025-01-01T00:00:00.000Z" + } + ] + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.signOut", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Log a sign out event, called by Discovery.signOut().", + "params": [], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send signOut metric", + "params": [], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.startContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has started content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send startContent metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send startContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.stopContent", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has stopped content.", + "params": [ + { + "name": "entityId", + "summary": "Optional entity ID of the content.", + "schema": { + "type": "string" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send stopContent metric", + "params": [], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send stopContent metric w/ entity", + "params": [ + { + "name": "entityId", + "value": "abc" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.page", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform that your user has navigated to a page or view.", + "params": [ + { + "name": "pageId", + "summary": "Page ID of the content.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send page metric", + "params": [ + { + "name": "pageId", + "value": "xyz" + } + ], + "result": { + "name": "success", + "value": true + } + }, + { + "name": "Send startContent metric w/ entity", + "params": [ + { + "name": "pageId", + "value": "home" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.action", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform of something not covered by other Metrics APIs.", + "params": [ + { + "name": "category", + "summary": "The category of action being logged. Must be 'user' for user-initated actions or 'app' for all other actions", + "schema": { + "type": "string", + "enum": [ + "user", + "app" + ] + }, + "required": true + }, + { + "name": "type", + "summary": "A short, indexible identifier for the action, e.g. 'SignIn Prompt Displayed'", + "schema": { + "type": "string", + "maxLength": 256 + }, + "required": true + }, + { + "name": "parameters", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send foo action", + "params": [ + { + "name": "category", + "value": "user" + }, + { + "name": "type", + "value": "The user did foo" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.error", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform of an error that has occured in your app.", + "params": [ + { + "name": "type", + "summary": "The type of error", + "schema": { + "$ref": "#/components/schemas/ErrorType" + }, + "required": true + }, + { + "name": "code", + "summary": "an app-specific error code", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "description", + "summary": "A short description of the error", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "visible", + "summary": "Whether or not this error was visible to the user.", + "schema": { + "type": "boolean" + }, + "required": true + }, + { + "name": "parameters", + "summary": "Optional additional parameters to be logged with the error", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send error metric", + "params": [ + { + "name": "type", + "value": "media" + }, + { + "name": "code", + "value": "MEDIA-STALLED" + }, + { + "name": "description", + "value": "playback stalled" + }, + { + "name": "visible", + "value": true + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaLoadStart", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when setting the URL of a media asset to play, in order to infer load time.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send loadstart metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPlay", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback should start due to autoplay, user-initiated play, or unpausing.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send play metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPlaying", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback actually starts due to autoplay, user-initiated play, unpausing, or recovering from a buffering interuption.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send playing metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaPause", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will pause due to an intentional pause operation.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send pause metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaWaiting", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when media playback will halt due to a network, buffer, or other unintentional constraint.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send waiting metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaProgress", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called every 60 seconds as media playback progresses.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "progress", + "summary": "Progress of playback, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send progress metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "progress", + "value": 0.75 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaSeeking", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is initiated during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "target", + "summary": "Target destination of the seek, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send seeking metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "target", + "value": 0.5 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaSeeked", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when a seek is completed during media playback.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "position", + "summary": "Resulting position of the seek operation, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "schema": { + "$ref": "#/components/schemas/MediaPosition" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send seeked metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "position", + "value": 0.51 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaRateChange", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rate of media is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "rate", + "summary": "The new playback rate.", + "schema": { + "type": "number" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send ratechange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "rate", + "value": 2 + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaRenditionChange", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when the playback rendition (e.g. bitrate, dimensions, profile, etc) is changed.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "bitrate", + "summary": "The new bitrate in kbps.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "width", + "summary": "The new resolution width.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "height", + "summary": "The new resolution height.", + "schema": { + "type": "number" + }, + "required": true + }, + { + "name": "profile", + "summary": "A description of the new profile, e.g. 'HDR' etc.", + "schema": { + "type": "string" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send renditionchange metric.", + "params": [ + { + "name": "entityId", + "value": "345" + }, + { + "name": "bitrate", + "value": 5000 + }, + { + "name": "width", + "value": 1920 + }, + { + "name": "height", + "value": 1080 + }, + { + "name": "profile", + "value": "HDR+" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.mediaEnded", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:media" + ] + } + ], + "summary": "Called when playback has stopped because the end of the media was reached.", + "params": [ + { + "name": "entityId", + "summary": "The entityId of the media.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Send ended metric.", + "params": [ + { + "name": "entityId", + "value": "345" + } + ], + "result": { + "name": "success", + "value": true + } + } + ] + }, + { + "name": "Metrics.event", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:distributor" + ] + } + ], + "summary": "Inform the platform of 1st party distributor metrics.", + "params": [ + { + "name": "schema", + "summary": "The schema URI of the metric type", + "schema": { + "type": "string", + "format": "uri" + }, + "required": true + }, + { + "name": "data", + "summary": "A JSON payload conforming the the provided schema", + "schema": { + "$ref": "#/components/schemas/EventObject" + }, + "required": true + } + ], + "result": { + "name": "results", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send foo event", + "params": [ + { + "name": "schema", + "value": "http://meta.rdkcentral.com/some/schema" + }, + { + "name": "data", + "value": { + "foo": "foo" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Metrics.appInfo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:metrics:general" + ] + } + ], + "summary": "Inform the platform about an app's build info.", + "params": [ + { + "name": "build", + "summary": "The build / version of this app.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Send appInfo metric", + "params": [ + { + "name": "build", + "value": "1.2.2" + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Parameters.initialization", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:lifecycle:state" + ] + } + ], + "summary": "Returns any initialization parameters for the app, e.g. initialial `NavigationIntent`.", + "params": [], + "result": { + "name": "init", + "summary": "The initialization parameters.", + "schema": { + "$ref": "#/components/schemas/AppInitialization" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "init", + "value": { + "lmt": 0, + "us_privacy": "1-Y-", + "discovery": { + "navigateTo": { + "action": "entity", + "data": { + "entityId": "abc", + "entityType": "program", + "programType": "movie" + }, + "context": { + "source": "voice" + } + } + } + } + } + } + ] + }, + { + "name": "PinChallenge.onRequestChallenge", + "summary": "Registers as a provider for when the user should be challenged in order to confirm access to a capability through a pin prompt", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-response": { + "$ref": "#/components/schemas/PinChallengeResult", + "examples": [ + { + "granted": true, + "reason": "correctPin" + }, + { + "granted": false, + "reason": "exceededPinFailures" + }, + { + "granted": null, + "reason": "cancelled" + } + ] + }, + "x-error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + } + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true + } + ], + "result": { + "name": "challenge", + "summary": "The request to challenge the user", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/components/schemas/PinChallengeProviderRequest" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "correlationId": "abc", + "parameters": { + "capability": "xrn:firebolt:capability:commerce::purchase", + "requestor": { + "id": "ReferenceApp", + "name": "Firebolt Reference App" + }, + "pinSpace": "purchase" + } + } + } + } + ] + }, + { + "name": "PinChallenge.challengeFocus", + "summary": "Internal API for Challenge Provider to request focus for UX purposes.", + "params": [], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true, + "x-allow-focus-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example", + "params": [], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "PinChallenge.challengeResponse", + "summary": "Internal API for Challenge Provider to send back response.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "result", + "schema": { + "$ref": "#/components/schemas/PinChallengeResult", + "examples": [ + { + "granted": true, + "reason": "correctPin" + }, + { + "granted": false, + "reason": "exceededPinFailures" + }, + { + "granted": null, + "reason": "cancelled" + } + ] + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true, + "x-response-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example #1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": true, + "reason": "correctPin" + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #2", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": false, + "reason": "exceededPinFailures" + } + } + ], + "result": { + "name": "result", + "value": null + } + }, + { + "name": "Example #3", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "result", + "value": { + "granted": null, + "reason": "cancelled" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "PinChallenge.challengeError", + "summary": "Internal API for Challenge Provider to send back error.", + "params": [ + { + "name": "correlationId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "error", + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "title": "errorObjectCode", + "description": "A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api.", + "type": "integer" + }, + "message": { + "title": "errorObjectMessage", + "description": "A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.", + "type": "string" + }, + "data": { + "title": "errorObjectData", + "description": "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + } + }, + "required": true + } + ], + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:usergrant:pinchallenge", + "x-allow-focus": true, + "x-error-for": "onRequestChallenge" + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Example 1", + "params": [ + { + "name": "correlationId", + "value": "123" + }, + { + "name": "error", + "value": { + "code": 1, + "message": "Error" + } + } + ], + "result": { + "name": "result", + "value": null + } + } + ] + }, + { + "name": "Privacy.allowResumePoints", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content to show in the main experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowUnentitledResumePoints", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content from unentitled providers to show in the main experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowWatchHistory", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their watch history from all sources to show in the main experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowProductAnalytics", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data can be used for analytics about the product", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowPersonalization", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowUnentitledPersonalization", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations for unentitled content", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowRemoteDiagnostics", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowPrimaryContentAdTargeting", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in the primary experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowPrimaryBrowseAdTargeting", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while browsing in the primary experience", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowAppContentAdTargeting", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in apps", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowACRCollection", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their automatic content recognition data to be collected", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.allowCameraAnalytics", + "tags": [ + { + "name": "property", + "x-allow-value": true + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows data from their camera to be used for Product Analytics", + "params": [], + "result": { + "name": "allow", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.settings", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Gets the allowed value for all privacy settings", + "params": [], + "result": { + "name": "settings", + "schema": { + "$ref": "#/components/schemas/PrivacySettings" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "settings", + "value": { + "allowACRCollection": true, + "allowResumePoints": false, + "allowAppContentAdTargeting": false, + "allowCameraAnalytics": true, + "allowPersonalization": true, + "allowPrimaryBrowseAdTargeting": false, + "allowPrimaryContentAdTargeting": false, + "allowProductAnalytics": true, + "allowRemoteDiagnostics": true, + "allowUnentitledPersonalization": true, + "allowUnentitledResumePoints": false, + "allowWatchHistory": true + } + } + } + ] + }, + { + "name": "Privacy.onAllowResumePointsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowResumePoints" + }, + { + "name": "event", + "x-alternative": "allowResumePoints" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content to show in the main experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowUnentitledResumePointsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowUnentitledResumePoints" + }, + { + "name": "event", + "x-alternative": "allowUnentitledResumePoints" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content from unentitled providers to show in the main experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowWatchHistoryChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowWatchHistory" + }, + { + "name": "event", + "x-alternative": "allowWatchHistory" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their watch history from all sources to show in the main experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowProductAnalyticsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowProductAnalytics" + }, + { + "name": "event", + "x-alternative": "allowProductAnalytics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data can be used for analytics about the product", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowPersonalizationChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowPersonalization" + }, + { + "name": "event", + "x-alternative": "allowPersonalization" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowUnentitledPersonalizationChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowUnentitledPersonalization" + }, + { + "name": "event", + "x-alternative": "allowUnentitledPersonalization" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations for unentitled content", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowRemoteDiagnosticsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowRemoteDiagnostics" + }, + { + "name": "event", + "x-alternative": "allowRemoteDiagnostics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowPrimaryContentAdTargetingChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowPrimaryContentAdTargeting" + }, + { + "name": "event", + "x-alternative": "allowPrimaryContentAdTargeting" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in the primary experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowPrimaryBrowseAdTargetingChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowPrimaryBrowseAdTargeting" + }, + { + "name": "event", + "x-alternative": "allowPrimaryBrowseAdTargeting" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while browsing in the primary experience", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowAppContentAdTargetingChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowAppContentAdTargeting" + }, + { + "name": "event", + "x-alternative": "allowAppContentAdTargeting" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in apps", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowACRCollectionChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowACRCollection" + }, + { + "name": "event", + "x-alternative": "allowACRCollection" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their automatic content recognition data to be collected", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.onAllowCameraAnalyticsChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "Privacy.allowCameraAnalytics" + }, + { + "name": "event", + "x-alternative": "allowCameraAnalytics" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows data from their camera to be used for Product Analytics", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "allow", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Privacy.setAllowResumePoints", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowResumePoints" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content to show in the main experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowUnentitledResumePoints", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowUnentitledResumePoints" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows resume points for content from unentitled providers to show in the main experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowWatchHistory", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowWatchHistory" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their watch history from all sources to show in the main experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowProductAnalytics", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowProductAnalytics" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data can be used for analytics about the product", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowPersonalization", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowPersonalization" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowUnentitledPersonalization", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowUnentitledPersonalization" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their usage data to be used for personalization and recommendations for unentitled content", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowRemoteDiagnostics", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowRemoteDiagnostics" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their personal data to be included in diagnostic telemetry. This also allows whether device logs can be remotely accessed from the client device", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowPrimaryContentAdTargeting", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowPrimaryContentAdTargeting" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in the primary experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowPrimaryBrowseAdTargeting", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowPrimaryBrowseAdTargeting" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while browsing in the primary experience", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowAppContentAdTargeting", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowAppContentAdTargeting" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows ads to be targeted to the user while watching content in apps", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowACRCollection", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowACRCollection" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows their automatic content recognition data to be collected", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Privacy.setAllowCameraAnalytics", + "tags": [ + { + "name": "setter", + "x-setter-for": "allowCameraAnalytics" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:privacy:settings" + ] + } + ], + "summary": "Whether the user allows data from their camera to be used for Product Analytics", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "allow", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "allow", + "value": null + } + } + ] + }, + { + "name": "Profile.approveContentRating", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:approve:content" + ] + } + ], + "summary": "Verifies that the current profile should have access to mature/adult content.", + "params": [], + "result": { + "name": "allow", + "summary": "Whether or not to allow access", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Profile.approvePurchase", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:approve:purchase" + ] + } + ], + "summary": "Verifies that the current profile should have access to making purchases.", + "params": [], + "result": { + "name": "allow", + "summary": "Whether or not to allow access", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "allow", + "value": false + } + } + ] + }, + { + "name": "Profile.flags", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:profile:flags" + ] + } + ], + "summary": "Get a map of profile flags for the current session.", + "params": [], + "result": { + "name": "flags", + "summary": "The profile flags.", + "schema": { + "$ref": "#/x-schemas/Types/FlatMap" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "flags", + "value": { + "userExperience": "1000" + } + } + } + ] + }, + { + "name": "SecondScreen.protocols", + "summary": "Get the supported second screen discovery protocols", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "params": [], + "result": { + "name": "protocols", + "summary": "the supported protocols", + "schema": { + "$ref": "#/x-schemas/Types/BooleanMap" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": { + "dial1.7": true + } + } + } + ] + }, + { + "name": "SecondScreen.device", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "summary": "Get the broadcasted id for the device", + "params": [ + { + "name": "type", + "summary": "The type of second screen protocol, e.g. \"dial\"", + "required": false, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "deviceId", + "summary": "the device id", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "device-id" + } + } + ] + }, + { + "name": "SecondScreen.friendlyName", + "summary": "Get the broadcasted friendly name for the device", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "result": { + "name": "friendlyName", + "summary": "the device friendly-name", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "friendlyName", + "value": "Living Room" + } + } + ] + }, + { + "name": "SecondScreen.onLaunchRequest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "summary": "Listen to the launchRequest event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "launchRequestEvent", + "summary": "Dispatched when a second screen device on the local network has requested this app to be launched", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/SecondScreen/SecondScreenEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "type": "dial", + "version": "1.7", + "data": "{\"code\":\"AQDPQZiQcb3KQ7gY7yy5tHTMbbkGHR9Zjp-KL53H3eKBZIeAt7O9UKYPu6B21l2UZVmIqkFXDXBmXvK4g2e3EgZtjMNmKPsTltgnRl95DImtOXjSpWtTjSaOkW4w1kZKUTwLKdwVWTzBVH8ERHorvLU6vCGOVHxXt65LNwdl5HKRweShVC1V9QsyvRnQS61ov0UclmrH_xZML2Bt-Q-rZFjey5MjwupIb4x4f53XUJMhjHpDHoIUKrjpdPDQvK2a\",\"friendlyName\":\"Operator_TX061AEI\",\"UDN\":\"608fef11-2800-482a-962b-23a6690c93c1\"}" + } + } + } + ] + }, + { + "name": "SecondScreen.onCloseRequest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "summary": "Listen to the closeRequest event", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "closeRequestEvent", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/SecondScreen/SecondScreenEvent" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "Default Result", + "value": { + "type": "dial", + "version": "1.7" + } + } + } + ] + }, + { + "name": "SecondScreen.onFriendlyNameChanged", + "summary": "Get the broadcasted friendly name for the device", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "SecondScreen.friendlyName" + }, + { + "name": "event", + "x-alternative": "friendlyName" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:dial" + ] + } + ], + "result": { + "name": "friendlyName", + "summary": "the device friendly-name", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "string" + } + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "friendlyName", + "value": "Living Room" + } + } + ] + }, + { + "name": "SecureStorage.get", + "summary": "Get stored value by key", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to get", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "value", + "summary": "The retrieved value, if found.", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "examples": [ + { + "name": "Successfully retrieve a refresh token with key authRefreshToken", + "params": [ + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } + }, + { + "name": "Attempt to retrieve a key with no value set", + "params": [ + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "value", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.set", + "summary": "Set or update a secure data value", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the data key", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "value", + "summary": "Value to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "options", + "summary": "Optional parameters to set", + "schema": { + "$ref": "#/components/schemas/StorageOptions" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Set a refresh token with name authRefreshToken with optional paramter", + "params": [ + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + }, + { + "name": "options", + "value": { + "ttl": 600 + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "Set a refresh token with name authRefreshToken without optional parameter", + "params": [ + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.remove", + "summary": "Remove a secure data value", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the data key", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to remove", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Remove the value with key authRefreshToken for device", + "params": [ + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "Remove the value with key authRefreshToken for account", + "params": [ + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.setForApp", + "summary": "Set or update a secure data value for a specific app.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "appId", + "summary": "appId for which value is being set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "scope", + "summary": "The scope of the data key", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "value", + "summary": "Value to set", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "options", + "summary": "Optional parameters to set", + "schema": { + "$ref": "#/components/schemas/StorageOptions" + }, + "required": false + } + ], + "result": { + "name": "success", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Set a refresh token with name authRefreshToken with optional parameter for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "device" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + }, + { + "name": "options", + "value": { + "ttl": 600 + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + }, + { + "name": "Set a refresh token with name authRefreshToken without optional parameter for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + }, + { + "name": "value", + "value": "VGhpcyBub3QgYSByZWFsIHRva2VuLgo=" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.removeForApp", + "summary": "Removes single data value for a specific app.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "appId", + "summary": "appId for which values are removed", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + }, + { + "name": "key", + "summary": "Key to remove", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Removes authRefreshToken for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "account" + }, + { + "name": "key", + "value": "authRefreshToken" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.clearForApp", + "summary": "Clears all the secure data values for a specific app", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "appId", + "summary": "appId for which values are removed", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Clears all the secure data values for appId foo", + "params": [ + { + "name": "appId", + "value": "foo" + }, + { + "name": "scope", + "value": "account" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "SecureStorage.clear", + "summary": "Clears all the secure data values", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:storage:secure" + ] + } + ], + "params": [ + { + "name": "scope", + "summary": "The scope of the key/value", + "schema": { + "$ref": "#/components/schemas/StorageScope" + }, + "required": true + } + ], + "result": { + "name": "success", + "summary": "", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Clears all the data values of storage", + "params": [ + { + "name": "scope", + "value": "account" + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.app", + "summary": "Get all granted and denied user grants for the given app", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "appId", + "schema": { + "type": "string" + }, + "required": true + } + ], + "result": { + "name": "info", + "summary": "The list of grants for this app", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "appId", + "value": "certapp" + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:data:app-usage", + "role": "use", + "lifespan": "seconds", + "expires": "2022-12-14T20:20:39+00:00" + }, + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "denied", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "appActive" + } + ] + } + } + ] + }, + { + "name": "UserGrants.device", + "summary": "Get all granted and denied user grants for the device", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [], + "result": { + "name": "info", + "summary": "The list of grants for the device", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "defaultResult", + "value": [ + { + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + } + ] + }, + { + "name": "UserGrants.capability", + "summary": "Get all granted and denied user grants for the given capability", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + } + ], + "result": { + "name": "info", + "summary": "The list of grants associated with the given capability", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + } + ] + }, + { + "name": "UserGrants.grant", + "summary": "Grants a given capability to a specific app, if appropriate. Calling this results in a persisted active grant that lasts for the duration of the grant policy lifespan. ", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "role", + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "required": true + }, + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + }, + { + "name": "options", + "schema": { + "$ref": "#/components/schemas/GrantModificationOptions" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "options", + "value": { + "appId": "certapp" + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.deny", + "summary": "Denies a given capability, to a specific app if appropriate. Calling this results in a persisted Denied Grant that lasts for the duration of the Grant Policy lifespan. ", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "role", + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "required": true + }, + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + }, + { + "name": "options", + "schema": { + "$ref": "#/components/schemas/GrantModificationOptions" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "options", + "value": { + "appId": "certapp" + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.clear", + "summary": "Clears the grant for a given capability, to a specific app if appropriate. Calling this results in a persisted Denied Grant that lasts for the duration of the Grant Policy lifespan. ", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "role", + "schema": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "required": true + }, + { + "name": "capability", + "schema": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "required": true + }, + { + "name": "options", + "schema": { + "$ref": "#/components/schemas/GrantModificationOptions" + } + } + ], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "role", + "value": "use" + }, + { + "name": "capability", + "value": "xrn:firebolt:capability:localization:postal-code" + }, + { + "name": "options", + "value": { + "appId": "certapp" + } + } + ], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "UserGrants.request", + "summary": "Requests Firebolt to carry out a set of user grants for a given application such that the user grant provider is notified or an existing user grant is reused.", + "tags": [ + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:grants:state" + ] + } + ], + "params": [ + { + "name": "appId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "permissions", + "schema": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/Permission" + }, + "minItems": 1 + }, + "required": true + }, + { + "name": "options", + "summary": "Request options", + "schema": { + "$ref": "#/components/schemas/RequestOptions" + }, + "required": false + } + ], + "result": { + "name": "info", + "summary": "The result of all grants requested by this", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantInfo" + } + } + }, + "examples": [ + { + "name": "Default result #1", + "params": [ + { + "name": "appId", + "value": "certapp" + }, + { + "name": "permissions", + "value": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code" + } + ] + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "app": { + "id": "certapp", + "title": "Certification App" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + }, + { + "name": "Default result #2", + "params": [ + { + "name": "appId", + "value": "certapp" + }, + { + "name": "permissions", + "value": [ + { + "role": "use", + "capability": "xrn:firebolt:capability:localization:postal-code" + } + ] + }, + { + "name": "options", + "value": { + "force": true + } + } + ], + "result": { + "name": "defaultResult", + "value": [ + { + "app": { + "id": "certapp", + "title": "Certification App" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:localization:postal-code", + "role": "use", + "lifespan": "powerActive" + } + ] + } + } + ] + }, + { + "name": "VoiceGuidance.enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "Whether or not voice-guidance is enabled.", + "params": [], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "VoiceGuidance.speed", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "The speed at which voice guidance speech will be read back to the user.", + "params": [], + "result": { + "name": "speed", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed" + } + }, + "examples": [ + { + "name": "Voice guidance speed to 1", + "params": [], + "result": { + "name": "speed", + "value": 1 + } + }, + { + "name": "Voice guidance speed to 2", + "params": [], + "result": { + "name": "speed", + "value": 2 + } + } + ] + }, + { + "name": "VoiceGuidance.onEnabledChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "VoiceGuidance.enabled" + }, + { + "name": "event", + "x-alternative": "enabled" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "Whether or not voice-guidance is enabled.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "enabled", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "type": "boolean" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + }, + { + "name": "VoiceGuidance.onSpeedChanged", + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "VoiceGuidance.speed" + }, + { + "name": "event", + "x-alternative": "speed" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "The speed at which voice guidance speech will be read back to the user.", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "speed", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed" + } + ] + } + }, + "examples": [ + { + "name": "Voice guidance speed to 1", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "speed", + "value": 1 + } + }, + { + "name": "Voice guidance speed to 2", + "params": [ + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "speed", + "value": 2 + } + } + ] + }, + { + "name": "VoiceGuidance.setEnabled", + "tags": [ + { + "name": "setter", + "x-setter-for": "enabled" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "Whether or not voice-guidance is enabled.", + "params": [ + { + "name": "value", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "value", + "value": true + } + ], + "result": { + "name": "enabled", + "value": null + } + }, + { + "name": "Default example #2", + "params": [ + { + "name": "value", + "value": false + } + ], + "result": { + "name": "enabled", + "value": null + } + } + ] + }, + { + "name": "VoiceGuidance.setSpeed", + "tags": [ + { + "name": "setter", + "x-setter-for": "speed" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:accessibility:voiceguidance" + ] + } + ], + "summary": "The speed at which voice guidance speech will be read back to the user.", + "params": [ + { + "name": "value", + "schema": { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed" + }, + "required": true + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Voice guidance speed to 1", + "params": [ + { + "name": "value", + "value": 1 + } + ], + "result": { + "name": "speed", + "value": null + } + }, + { + "name": "Voice guidance speed to 2", + "params": [ + { + "name": "value", + "value": 2 + } + ], + "result": { + "name": "speed", + "value": null + } + } + ] + }, + { + "name": "Wifi.scan", + "summary": "Scan available wifi networks in the location.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [ + { + "name": "timeout", + "schema": { + "$ref": "#/x-schemas/Types/Timeout" + } + } + ], + "result": { + "name": "list", + "summary": "Contains a list of wifi networks available near the device.", + "schema": { + "$ref": "#/components/schemas/AccessPointList" + } + }, + "examples": [ + { + "name": "Successful Wifi List", + "params": [ + { + "name": "timeout", + "value": 30 + } + ], + "result": { + "name": "successfulWifiResultExample", + "value": { + "list": [ + { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + }, + { + "ssid": "Fortnite", + "security": "WPA2_ENTERPRISE_AES", + "signalStrength": -70, + "frequency": 5 + }, + { + "ssid": "Guardian", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } + ] + } + } + } + ] + }, + { + "name": "Wifi.connect", + "summary": "Connect the device to the specified SSID.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [ + { + "name": "ssid", + "schema": { + "type": "string" + }, + "description": "Name of Wifi SSID to connect for the device." + }, + { + "name": "passphrase", + "schema": { + "type": "string" + }, + "description": "Password or Passphrase for the wifi." + }, + { + "name": "security", + "schema": { + "$ref": "#/components/schemas/WifiSecurityMode" + } + } + ], + "result": { + "name": "connectedWifi", + "summary": "Successful Response after connecting to the Wifi.", + "schema": { + "$ref": "#/components/schemas/AccessPoint" + } + }, + "examples": [ + { + "name": "Connect to a wpa2Psk Wifi with password", + "params": [ + { + "name": "ssid", + "value": "DND" + }, + { + "name": "passphrase", + "value": "gargoyle" + }, + { + "name": "security", + "value": "wpa2Psk" + } + ], + "result": { + "name": "successfulWifiConnection", + "value": { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + } + } + }, + { + "name": "Connect to a WPA2 PSK Wifi with password", + "params": [ + { + "name": "ssid", + "value": "Guardian WIFI" + }, + { + "name": "passphrase", + "value": "" + }, + { + "name": "security", + "value": "none" + } + ], + "result": { + "name": "successfulWifiConnection", + "value": { + "ssid": "Guardian WIFI", + "security": "none", + "signalStrength": -70, + "frequency": 2.4 + } + } + } + ] + }, + { + "name": "Wifi.disconnect", + "summary": "Disconnect the device if connected via WIFI.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [], + "result": { + "name": "result", + "schema": { + "const": null + } + }, + "examples": [ + { + "name": "Disconnect", + "params": [], + "result": { + "name": "defaultResult", + "value": null + } + } + ] + }, + { + "name": "Wifi.wps", + "summary": "Connect to WPS", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:protocol:wifi" + ] + } + ], + "params": [ + { + "name": "security", + "schema": { + "$ref": "#/components/schemas/WPSSecurityPin" + } + } + ], + "result": { + "name": "connectedWifi", + "summary": "Successful Response after connecting to the Wifi.", + "schema": { + "$ref": "#/components/schemas/AccessPoint" + } + }, + "examples": [ + { + "name": "Connect to a WPS Wifi router", + "params": [ + { + "name": "security", + "value": "pushButton" + } + ], + "result": { + "name": "successfulWifiConnection", + "value": { + "ssid": "DND", + "security": "wpa2Psk", + "signalStrength": -70, + "frequency": 2.4 + } + } + } + ] + } + ], + "components": { + "schemas": { + "AudioDescriptionSettings": { + "title": "AudioDescriptionSettings", + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not audio descriptions should be enabled by default" + } + } + }, + "Token": { + "type": "string", + "description": "Encoded token provided by the Distributor for Device Authentication." + }, + "Expiry": { + "type": "integer", + "description": "Number of secs before the token expires", + "minimum": 1 + }, + "ChallengeRequestor": { + "title": "ChallengeRequestor", + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "The id of the app that requested the challenge" + }, + "name": { + "type": "string", + "description": "The name of the app that requested the challenge" + } + } + }, + "Challenge": { + "title": "Challenge", + "type": "object", + "required": [ + "capability", + "requestor" + ], + "properties": { + "capability": { + "type": "string", + "description": "The capability that is being requested by the user to approve" + }, + "requestor": { + "description": "The identity of which app is requesting access to this capability", + "$ref": "#/components/schemas/ChallengeRequestor" + } + } + }, + "ChallengeProviderRequest": { + "title": "ChallengeProviderRequest", + "allOf": [ + { + "$ref": "#/x-schemas/Types/ProviderRequest" + }, + { + "type": "object", + "required": [ + "parameters" + ], + "properties": { + "parameters": { + "description": "The request to challenge the user", + "$ref": "#/components/schemas/Challenge" + } + } + } + ] + }, + "GrantResult": { + "title": "GrantResult", + "type": "object", + "required": [ + "granted" + ], + "properties": { + "granted": { + "oneOf": [ + { + "type": "boolean", + "description": "Whether the user approved or denied the challenge" + }, + { + "const": null + } + ] + } + }, + "examples": [ + { + "granted": true + }, + { + "granted": false + }, + { + "granted": null + } + ] + }, + "AdPolicy": { + "title": "AdPolicy", + "description": "Describes various ad playback enforcement rules that the app should follow.", + "type": "object", + "properties": { + "skipRestriction": { + "$ref": "#/x-schemas/Advertising/SkipRestriction" + }, + "limitAdTracking": { + "type": "boolean" + } + } + }, + "AdConfigurationOptions": { + "title": "AdConfigurationOptions", + "type": "object", + "properties": { + "coppa": { + "type": "boolean", + "description": "Whether or not the app requires US COPPA compliance." + }, + "environment": { + "type": "string", + "enum": [ + "prod", + "test" + ], + "default": "prod", + "description": "Whether the app is running in a production or test mode." + }, + "authenticationEntity": { + "type": "string", + "description": "The authentication provider, when it is separate entity than the app provider, e.g. an MVPD." + } + } + }, + "AdvertisingIdOptions": { + "title": "AdvertisingIdOptions", + "type": "object", + "properties": { + "scope": { + "type": "object", + "description": "Provides the options to send scope type and id to select desired advertising id", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "browse", + "content" + ], + "default": "browse", + "description": "The scope type, which will determine where to show advertisement" + }, + "id": { + "type": "string", + "description": "A value that identifies a specific scope within the scope type" + } + } + } + } + }, + "TokenType": { + "title": "TokenType", + "type": "string", + "enum": [ + "platform", + "device", + "distributor" + ] + }, + "CapabilityOption": { + "title": "CapabilityOption", + "type": "object", + "properties": { + "role": { + "$ref": "#/x-schemas/Capabilities/Role", + "description": "Which role of the capability to check the state of, default will be 'use'", + "default": "use" + } + } + }, + "ClosedCaptionsSettingsProviderRequest": { + "title": "ClosedCaptionsSettingsProviderRequest", + "allOf": [ + { + "$ref": "#/x-schemas/Types/ProviderRequest" + }, + { + "type": "object", + "properties": { + "parameters": { + "const": null + } + } + } + ], + "examples": [ + { + "correlationId": "abc" + } + ] + }, + "InterestResult": { + "title": "InterestResult", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "entity": { + "$ref": "#/x-schemas/Entity/EntityDetails" + } + }, + "required": [ + "appId", + "entity" + ] + }, + "InterestEvent": { + "title": "InterestEvent", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "type": { + "$ref": "#/x-schemas/Discovery/InterestType" + }, + "reason": { + "$ref": "#/x-schemas/Discovery/InterestReason" + }, + "entity": { + "$ref": "#/x-schemas/Entity/EntityDetails" + } + }, + "required": [ + "appId", + "entity", + "type", + "reason" + ] + }, + "Resolution": { + "type": "array", + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "NetworkType": { + "title": "NetworkType", + "type": "string", + "enum": [ + "wifi", + "ethernet", + "hybrid" + ], + "description": "The type of network that is currently active" + }, + "NetworkState": { + "title": "NetworkState", + "type": "string", + "enum": [ + "connected", + "disconnected" + ], + "description": "The type of network that is currently active" + }, + "AudioProfiles": { + "title": "AudioProfiles", + "allOf": [ + { + "$ref": "#/x-schemas/Types/BooleanMap" + }, + { + "type": "object", + "propertyNames": { + "$ref": "#/x-schemas/Types/AudioProfile" + } + } + ] + }, + "DiscoveryPolicy": { + "title": "DiscoveryPolicy", + "type": "object", + "required": [ + "enableRecommendations", + "shareWatchHistory", + "rememberWatchedPrograms" + ], + "properties": { + "enableRecommendations": { + "type": "boolean", + "description": "Whether or not to the user has enabled history-based recommendations" + }, + "shareWatchHistory": { + "type": "boolean", + "description": "Whether or not the user has enabled app watch history data to be shared with the platform" + }, + "rememberWatchedPrograms": { + "type": "boolean", + "description": "Whether or not the user has enabled watch history" + } + } + }, + "FederatedRequest": { + "title": "FederatedRequest", + "type": "object", + "properties": { + "correlationId": { + "type": "string" + } + }, + "required": [ + "correlationId" + ], + "propertyNames": { + "enum": [ + "correlationId", + "parameters" + ] + }, + "examples": [ + { + "correlationId": "xyz" + } + ] + }, + "FederatedResponse": { + "title": "FederatedResponse", + "type": "object", + "properties": { + "correlationId": { + "type": "string" + } + }, + "required": [ + "correlationId", + "result" + ], + "propertyNames": { + "enum": [ + "correlationId", + "result" + ] + }, + "examples": [ + { + "correlationId": "xyz" + } + ] + }, + "EntityInfoFederatedRequest": { + "title": "EntityInfoFederatedRequest", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedRequest" + }, + { + "type": "object", + "properties": { + "parameters": { + "$ref": "#/components/schemas/EntityInfoParameters" + } + }, + "required": [ + "correlationId", + "parameters" + ] + } + ], + "examples": [ + { + "correlationId": "xyz", + "parameters": { + "entityId": "345" + } + } + ] + }, + "EntityInfoParameters": { + "title": "EntityInfoParameters", + "type": "object", + "properties": { + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + } + }, + "required": [ + "entityId" + ], + "additionalProperties": false, + "examples": [ + { + "entityId": "345" + } + ] + }, + "EntityInfoFederatedResponse": { + "title": "EntityInfoFederatedResponse", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedResponse" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/x-schemas/Discovery/EntityInfoResult" + } + } + } + ] + }, + "EntityInfoResult": { + "title": "EntityInfoResult", + "description": "The result for an `entityInfo()` push or pull.", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "entity": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + }, + "related": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "entity" + ], + "additionalProperties": false + }, + "PurchasedContentFederatedRequest": { + "title": "PurchasedContentFederatedRequest", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedRequest" + }, + { + "type": "object", + "properties": { + "parameters": { + "$ref": "#/components/schemas/PurchasedContentParameters" + } + }, + "required": [ + "correlationId", + "parameters" + ] + } + ], + "examples": [ + { + "correlationId": "xyz", + "parameters": { + "limit": 100 + } + } + ] + }, + "PurchasedContentParameters": { + "title": "PurchasedContentParameters", + "type": "object", + "properties": { + "limit": { + "type": "integer", + "minimum": -1 + }, + "offeringType": { + "$ref": "#/x-schemas/Entertainment/OfferingType" + }, + "programType": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + } + }, + "required": [ + "limit" + ], + "additionalProperties": false, + "examples": [ + { + "limit": 100 + } + ] + }, + "PurchasedContentFederatedResponse": { + "title": "PurchasedContentFederatedResponse", + "allOf": [ + { + "$ref": "#/components/schemas/FederatedResponse" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/x-schemas/Discovery/PurchasedContentResult" + } + } + } + ] + }, + "PurchasedContentResult": { + "title": "PurchasedContentResult", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "totalCount", + "entries" + ], + "additionalProperties": false + }, + "Availability": { + "title": "Availability", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "channel-lineup", + "program-lineup" + ] + }, + "id": { + "type": "string" + }, + "catalogId": { + "type": "string" + }, + "startTime": { + "type": "string", + "format": "date-time" + }, + "endTime": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "type", + "id" + ] + }, + "ContentAccessIdentifiers": { + "title": "ContentAccessIdentifiers", + "type": "object", + "properties": { + "availabilities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Availability" + }, + "description": "A list of identifiers that represent what content is discoverable for the subscriber. Excluding availabilities will cause no change to the availabilities that are stored for this subscriber. Providing an empty array will clear the subscriber's availabilities" + }, + "entitlements": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/Entitlement" + }, + "description": "A list of identifiers that represent what content is consumable for the subscriber. Excluding entitlements will cause no change to the entitlements that are stored for this subscriber. Providing an empty array will clear the subscriber's entitlements" + } + }, + "required": [] + }, + "TuneChannels": { + "title": "TuneChannels", + "description": "An enumeration of xrn values for the TuneIntent that have special meaning.", + "type": "string", + "enum": [ + "xrn:firebolt:channel:any" + ] + }, + "UserInterestProviderParameters": { + "title": "UserInterestProviderParameters", + "type": "object", + "required": [ + "type", + "reason" + ], + "properties": { + "type": { + "$ref": "#/x-schemas/Discovery/InterestType" + }, + "reason": { + "$ref": "#/x-schemas/Discovery/InterestReason" + } + } + }, + "HDMIPortId": { + "type": "string", + "pattern": "^HDMI[0-9]+$" + }, + "EDIDVersion": { + "title": "EDIDVersion", + "type": "string", + "enum": [ + "1.4", + "2.0", + "unknown" + ] + }, + "HDMIInputPort": { + "title": "HDMIInputPort", + "type": "object", + "additionalProperties": false, + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "connected": { + "type": "boolean" + }, + "signal": { + "$ref": "#/components/schemas/HDMISignalStatus" + }, + "arcCapable": { + "type": "boolean" + }, + "arcConnected": { + "type": "boolean" + }, + "edidVersion": { + "$ref": "#/components/schemas/EDIDVersion" + }, + "autoLowLatencyModeCapable": { + "type": "boolean" + }, + "autoLowLatencyModeSignalled": { + "type": "boolean" + } + }, + "if": { + "properties": { + "edidVersion": { + "type": "string", + "enum": [ + "1.4", + "unknown" + ] + } + } + }, + "then": { + "properties": { + "autoLowLatencyModeCapable": { + "const": false + }, + "autoLowLatencyModeSignalled": { + "const": false + } + } + }, + "required": [ + "port", + "connected", + "signal", + "arcCapable", + "arcConnected", + "edidVersion", + "autoLowLatencyModeCapable", + "autoLowLatencyModeSignalled" + ] + }, + "HDMISignalStatus": { + "type": "string", + "enum": [ + "none", + "stable", + "unstable", + "unsupported", + "unknown" + ] + }, + "SignalChangedInfo": { + "title": "SignalChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "signal": { + "$ref": "#/components/schemas/HDMISignalStatus" + } + }, + "required": [ + "port", + "signal" + ] + }, + "ConnectionChangedInfo": { + "title": "ConnectionChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "connected": { + "type": "boolean" + } + } + }, + "AutoLowLatencyModeSignalChangedInfo": { + "title": "AutoLowLatencyModeSignalChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "autoLowLatencyModeSignalled": { + "type": "boolean" + } + } + }, + "AutoLowLatencyModeCapableChangedInfo": { + "title": "AutoLowLatencyModeCapableChangedInfo", + "type": "object", + "properties": { + "port": { + "$ref": "#/components/schemas/HDMIPortId" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "port", + "enabled" + ] + }, + "EmailUsage": { + "title": "EmailUsage", + "type": "string", + "enum": [ + "signIn", + "signUp" + ] + }, + "KeyboardType": { + "title": "KeyboardType", + "type": "string", + "description": "The type of keyboard to show to the user", + "enum": [ + "standard", + "email", + "password" + ] + }, + "KeyboardParameters": { + "title": "KeyboardParameters", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "The message to display to the user so the user knows what they are entering", + "type": "string" + } + }, + "examples": [ + { + "type": "standard", + "message": "Enter your user name." + } + ] + }, + "KeyboardProviderRequest": { + "title": "KeyboardProviderRequest", + "type": "object", + "required": [ + "correlationId", + "parameters" + ], + "properties": { + "correlationId": { + "type": "string", + "description": "An id to correlate the provider response with this request" + }, + "parameters": { + "description": "The request to start a keyboard session", + "$ref": "#/components/schemas/KeyboardParameters" + } + } + }, + "LifecycleEvent": { + "title": "LifecycleEvent", + "description": "A an object describing the previous and current states", + "type": "object", + "required": [ + "state", + "previous" + ], + "properties": { + "state": { + "$ref": "#/x-schemas/Lifecycle/LifecycleState", + "description": "The current lifcycle state" + }, + "previous": { + "$ref": "#/x-schemas/Lifecycle/LifecycleState", + "description": "The previous lifcycle state" + }, + "source": { + "type": "string", + "enum": [ + "voice", + "remote" + ], + "description": "The source of the lifecycle change." + } + } + }, + "LatLon": { + "type": "array", + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "MediaPosition": { + "title": "MediaPosition", + "description": "Represents a position inside playback content, as a decimal percentage (0-0.999) for content with a known duration, or an integer number of seconds (0-86400) for content with an unknown duration.", + "oneOf": [ + { + "const": 0 + }, + { + "type": "number", + "exclusiveMinimum": 0, + "exclusiveMaximum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 86400 + } + ] + }, + "ErrorType": { + "title": "ErrorType", + "type": "string", + "enum": [ + "network", + "media", + "restriction", + "entitlement", + "other" + ] + }, + "EventObjectPrimitives": { + "title": "EventObjectPrimitives", + "anyOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "EventObject": { + "title": "EventObject", + "type": "object", + "maxProperties": 256, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/components/schemas/EventObjectPrimitives" + }, + { + "type": "array", + "maxItems": 256, + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/EventObjectPrimitives" + }, + { + "$ref": "#/components/schemas/EventObject" + } + ] + } + }, + { + "$ref": "#/components/schemas/EventObject" + } + ] + } + }, + "AppInitialization": { + "title": "AppInitialization", + "type": "object", + "properties": { + "us_privacy": { + "type": "string", + "description": "The IAB US Privacy string." + }, + "lmt": { + "type": "integer", + "description": "The IAB limit ad tracking opt out value." + }, + "discovery": { + "type": "object", + "properties": { + "navigateTo": { + "$ref": "#/x-schemas/Intents/NavigationIntent" + } + } + }, + "secondScreen": { + "type": "object", + "properties": { + "launchRequest": { + "$ref": "#/x-schemas/SecondScreen/SecondScreenEvent" + } + } + } + } + }, + "PinChallenge": { + "title": "PinChallenge", + "type": "object", + "required": [ + "requestor", + "pinSpace" + ], + "properties": { + "pinSpace": { + "type": "string", + "description": "The pin space that this challenge is for", + "enum": [ + "purchase", + "content" + ] + }, + "capability": { + "type": "string", + "description": "The capability that is gated by a pin challenge" + }, + "requestor": { + "description": "The identity of which app is requesting access to this capability", + "$ref": "#/components/schemas/ChallengeRequestor" + } + } + }, + "PinChallengeProviderRequest": { + "title": "PinChallengeProviderRequest", + "allOf": [ + { + "$ref": "#/x-schemas/Types/ProviderRequest" + }, + { + "type": "object", + "required": [ + "parameters" + ], + "properties": { + "parameters": { + "description": "The request to challenge the user", + "$ref": "#/components/schemas/PinChallenge" + } + } + } + ] + }, + "ResultReason": { + "title": "ResultReason", + "type": "string", + "description": "The reason for the result of challenging the user", + "enum": [ + "noPinRequired", + "noPinRequiredWindow", + "exceededPinFailures", + "correctPin", + "cancelled" + ] + }, + "PinChallengeResult": { + "title": "PinChallengeResult", + "type": "object", + "required": [ + "granted", + "reason" + ], + "properties": { + "granted": { + "oneOf": [ + { + "type": "boolean", + "description": "Whether the user succeeded in the pin challenge" + }, + { + "const": null + } + ] + }, + "reason": { + "$ref": "#/components/schemas/ResultReason", + "description": "The reason for the result " + } + } + }, + "PrivacySettings": { + "title": "PrivacySettings", + "type": "object", + "required": [ + "allowACRCollection", + "allowResumePoints", + "allowAppContentAdTargeting", + "allowCameraAnalytics", + "allowPersonalization", + "allowPrimaryBrowseAdTargeting", + "allowPrimaryContentAdTargeting", + "allowProductAnalytics", + "allowRemoteDiagnostics", + "allowUnentitledPersonalization", + "allowUnentitledResumePoints", + "allowWatchHistory" + ], + "properties": { + "allowACRCollection": { + "description": "", + "type": "boolean" + }, + "allowResumePoints": { + "description": "", + "type": "boolean" + }, + "allowAppContentAdTargeting": { + "description": "", + "type": "boolean" + }, + "allowCameraAnalytics": { + "description": "", + "type": "boolean" + }, + "allowPersonalization": { + "description": "", + "type": "boolean" + }, + "allowPrimaryBrowseAdTargeting": { + "description": "", + "type": "boolean" + }, + "allowPrimaryContentAdTargeting": { + "description": "", + "type": "boolean" + }, + "allowProductAnalytics": { + "description": "", + "type": "boolean" + }, + "allowRemoteDiagnostics": { + "description": "", + "type": "boolean" + }, + "allowUnentitledPersonalization": { + "description": "", + "type": "boolean" + }, + "allowUnentitledResumePoints": { + "description": "", + "type": "boolean" + }, + "allowWatchHistory": { + "description": "", + "type": "boolean" + } + }, + "examples": [ + { + "allowACRCollection": true, + "allowResumePoints": false, + "allowAppContentAdTargeting": false, + "allowCameraAnalytics": true, + "allowPersonalization": true, + "allowPrimaryBrowseAdTargeting": false, + "allowPrimaryContentAdTargeting": false, + "allowProductAnalytics": true, + "allowRemoteDiagnostics": true, + "allowUnentitledPersonalization": true, + "allowUnentitledResumePoints": false, + "allowWatchHistory": true + } + ] + }, + "StorageScope": { + "title": "StorageScope", + "type": "string", + "enum": [ + "device", + "account" + ], + "description": "The scope of the data" + }, + "StorageOptions": { + "title": "StorageOptions", + "type": "object", + "required": [ + "ttl" + ], + "properties": { + "ttl": { + "type": "number", + "description": "Seconds from set time before the data expires and is removed" + } + } + }, + "GrantInfo": { + "description": "Information about a grant given by a user", + "type": "object", + "properties": { + "app": { + "$ref": "#/components/schemas/AppInfo" + }, + "state": { + "$ref": "#/components/schemas/GrantState" + }, + "capability": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "role": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "lifespan": { + "type": "string", + "enum": [ + "once", + "forever", + "appActive", + "powerActive", + "seconds" + ] + }, + "expires": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "state", + "capability", + "role", + "lifespan" + ], + "examples": [ + { + "app": { + "id": "certapp", + "title": "Firebolt Certification" + }, + "state": "granted", + "capability": "xrn:firebolt:capability:data:app-usage", + "role": "use", + "lifespan": "seconds", + "expires": "2022-12-14T20:20:39+00:00" + } + ] + }, + "AppInfo": { + "description": "Information about an app that a grant was for", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + }, + "GrantState": { + "description": "The state the grant is in", + "type": "string", + "enum": [ + "granted", + "denied" + ] + }, + "GrantModificationOptions": { + "description": "Options when modifying any grant", + "type": "object", + "properties": { + "appId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [] + }, + "RequestOptions": { + "title": "RequestOptions", + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "Whether to force for user grant even if the previous decision stored" + } + } + }, + "AccessPointList": { + "title": "AccessPointList", + "type": "object", + "description": "List of scanned Wifi networks available near the device.", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccessPoint" + } + } + } + }, + "WifiSecurityMode": { + "title": "WifiSecurityMode", + "description": "Security Mode supported for Wifi", + "type": "string", + "enum": [ + "none", + "wep64", + "wep128", + "wpaPskTkip", + "wpaPskAes", + "wpa2PskTkip", + "wpa2PskAes", + "wpaEnterpriseTkip", + "wpaEnterpriseAes", + "wpa2EnterpriseTkip", + "wpa2EnterpriseAes", + "wpa2Psk", + "wpa2Enterprise", + "wpa3PskAes", + "wpa3Sae" + ] + }, + "WifiSignalStrength": { + "title": "WifiSignalStrength", + "description": "Strength of Wifi signal, value is negative based on RSSI specification.", + "type": "integer", + "default": -255, + "minimum": -255, + "maximum": 0 + }, + "WifiFrequency": { + "title": "WifiFrequency", + "description": "Wifi Frequency in Ghz, example 2.4Ghz and 5Ghz.", + "type": "number", + "default": 0, + "minimum": 0 + }, + "AccessPoint": { + "title": "AccessPoint", + "description": "Properties of a scanned wifi list item.", + "type": "object", + "properties": { + "ssid": { + "type": "string", + "description": "Name of the wifi." + }, + "securityMode": { + "$ref": "#/components/schemas/WifiSecurityMode" + }, + "signalStrength": { + "$ref": "#/components/schemas/WifiSignalStrength" + }, + "frequency": { + "$ref": "#/components/schemas/WifiFrequency" + } + } + }, + "WPSSecurityPin": { + "title": "WPSSecurityPin", + "description": "Security pin type for WPS(Wifi Protected Setup).", + "type": "string", + "enum": [ + "pushButton", + "pin", + "manufacturerPin" + ] + }, + "WifiConnectRequest": { + "title": "WifiConnectRequest", + "description": "Request object for the wifi connection.", + "type": "object", + "properties": { + "ssid": { + "schema": { + "type": "string" + } + }, + "passphrase": { + "schema": { + "type": "string" + } + }, + "securityMode": { + "schema": { + "$ref": "#/components/schemas/WifiSecurityMode" + } + }, + "timeout": { + "schema": { + "$ref": "#/x-schemas/Types/Timeout" + } + } + } + } + } + }, + "x-schemas": { + "Types": { + "uri": "https://meta.comcast.com/firebolt/types", + "SemanticVersion": { + "title": "SemanticVersion", + "type": "object", + "properties": { + "major": { + "type": "integer", + "minimum": 0 + }, + "minor": { + "type": "integer", + "minimum": 0 + }, + "patch": { + "type": "integer", + "minimum": 0 + }, + "readable": { + "type": "string" + } + }, + "required": [ + "major", + "minor", + "patch", + "readable" + ], + "additionalProperties": false + }, + "ListenResponse": { + "title": "ListenResponse", + "type": "object", + "required": [ + "event", + "listening" + ], + "properties": { + "event": { + "type": "string", + "pattern": "[a-zA-Z]+\\.on[A-Z][a-zA-Z]+" + }, + "listening": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ProviderRequest": { + "title": "ProviderRequest", + "type": "object", + "required": [ + "correlationId" + ], + "additionalProperties": false, + "properties": { + "correlationId": { + "type": "string", + "description": "The id that was passed in to the event that triggered a provider method to be called" + }, + "parameters": { + "description": "The result of the provider response.", + "type": [ + "object", + "null" + ] + } + } + }, + "AudioProfile": { + "title": "AudioProfile", + "type": "string", + "enum": [ + "stereo", + "dolbyDigital5.1", + "dolbyDigital7.1", + "dolbyDigital5.1+", + "dolbyDigital7.1+", + "dolbyAtmos" + ] + }, + "BooleanMap": { + "title": "BooleanMap", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "LocalizedString": { + "title": "LocalizedString", + "description": "Localized string supports either a simple `string` or a Map of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ], + "examples": [ + "A simple string, with no language code", + { + "en": "This is english", + "es": "esto es español" + } + ] + }, + "FlatMap": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "Timeout": { + "title": "Timeout", + "description": "Defines the timeout in seconds. If the threshold for timeout is passed for any operation without a result it will throw an error.", + "type": "integer", + "default": 0, + "minimum": 0, + "maximum": 9999 + } + }, + "Accessibility": { + "uri": "https://meta.comcast.com/firebolt/accessibility", + "ClosedCaptionsSettings": { + "title": "ClosedCaptionsSettings", + "type": "object", + "required": [ + "enabled", + "styles" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not closed-captions should be enabled by default" + }, + "styles": { + "$ref": "#/x-schemas/Accessibility/ClosedCaptionsStyles" + }, + "preferredLanguages": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Localization/ISO639_2Language" + } + } + }, + "examples": [ + { + "enabled": true, + "styles": { + "fontFamily": "monospaced_serif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + }, + "preferredLanguages": [ + "eng", + "spa" + ] + } + ] + }, + "VoiceGuidanceSettings": { + "title": "VoiceGuidanceSettings", + "type": "object", + "required": [ + "enabled", + "speed" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not voice guidance should be enabled by default" + }, + "speed": { + "$ref": "#/x-schemas/Accessibility/VoiceSpeed", + "description": "The speed at which voice guidance speech will be read back to the user" + } + }, + "examples": [ + { + "enabled": true, + "speed": 2 + } + ] + }, + "VoiceSpeed": { + "title": "VoiceSpeed", + "type": "number", + "minimum": 0.5, + "maximum": 2 + }, + "ClosedCaptionsStyles": { + "title": "ClosedCaptionsStyles", + "type": "object", + "description": "The default styles to use when displaying closed-captions", + "properties": { + "fontFamily": { + "$ref": "#/x-schemas/Accessibility/FontFamily" + }, + "fontSize": { + "$ref": "#/x-schemas/Accessibility/FontSize" + }, + "fontColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "fontEdge": { + "$ref": "#/x-schemas/Accessibility/FontEdge" + }, + "fontEdgeColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "fontOpacity": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "backgroundColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "backgroundOpacity": { + "$ref": "#/x-schemas/Accessibility/Opacity" + }, + "textAlign": { + "$ref": "#/x-schemas/Accessibility/HorizontalAlignment" + }, + "textAlignVertical": { + "$ref": "#/x-schemas/Accessibility/VerticalAlignment" + }, + "windowColor": { + "$ref": "#/x-schemas/Accessibility/Color" + }, + "windowOpacity": { + "$ref": "#/x-schemas/Accessibility/Opacity" + } + } + }, + "FontFamily": { + "type": [ + "string", + "null" + ], + "enum": [ + "monospaced_serif", + "proportional_serif", + "monospaced_sanserif", + "proportional_sanserif", + "smallcaps", + "cursive", + "casual", + null + ] + }, + "FontSize": { + "type": [ + "number", + "null" + ], + "minimum": 0 + }, + "Color": { + "type": [ + "string", + "null" + ] + }, + "FontEdge": { + "type": [ + "string", + "null" + ], + "enum": [ + "none", + "raised", + "depressed", + "uniform", + "drop_shadow_left", + "drop_shadow_right", + null + ] + }, + "Opacity": { + "type": [ + "number", + "null" + ], + "minimum": 0, + "maximum": 100 + }, + "HorizontalAlignment": { + "type": [ + "string", + "null" + ] + }, + "VerticalAlignment": { + "type": [ + "string", + "null" + ] + } + }, + "Localization": { + "uri": "https://meta.comcast.com/firebolt/localization", + "ISO639_2Language": { + "type": "string", + "pattern": "^[a-z]{3}$" + }, + "Locality": { + "type": "string" + }, + "CountryCode": { + "type": "string", + "pattern": "^[A-Z]{2}$" + }, + "Language": { + "type": "string", + "pattern": "^[A-Za-z]{2}$" + }, + "Locale": { + "type": "string", + "pattern": "^[a-zA-Z]+([a-zA-Z0-9\\-]*)$" + }, + "TimeZone": { + "type": "string", + "pattern": "^[-+_/ A-Za-z 0-9]*$" + } + }, + "Advertising": { + "uri": "https://meta.comcast.com/firebolt/advertising", + "SkipRestriction": { + "title": "SkipRestriction", + "$comment": "xrn:advertising:policy:skipRestriction:", + "type": "string", + "enum": [ + "none", + "adsUnwatched", + "adsAll", + "all" + ], + "description": "The advertisement skip restriction.\n\nApplies to fast-forward/rewind (e.g. trick mode), seeking over an entire opportunity (e.g. jump), seeking out of what's currently playing, and \"Skip this ad...\" features. Seeking over multiple ad opportunities only requires playback of the _last_ opportunity, not all opportunities, preceding the seek destination.\n\n| Value | Description |\n|--------------|--------------------------------------------------------------------------------|\n| none |No fast-forward, jump, or skip restrictions |\n| adsUnwatched | Restrict fast-forward, jump, and skip for unwatched ad opportunities only. |\n| adsAll | Restrict fast-forward, jump, and skip for all ad opportunities |\n| all | Restrict fast-forward, jump, and skip for all ad opportunities and all content |\n\nNamespace: `xrn:advertising:policy:skipRestriction:`\n\n" + } + }, + "Capabilities": { + "uri": "https://meta.comcast.com/firebolt/capabilities", + "Capability": { + "title": "Capability", + "type": "string", + "description": "A Capability is a discrete unit of functionality that a Firebolt device might be able to perform.", + "pattern": "^xrn:firebolt:capability:([a-z0-9\\-]+)((:[a-z0-9\\-]+)?)$" + }, + "CapabilityInfo": { + "title": "CapabilityInfo", + "type": "object", + "required": [ + "supported", + "available", + "use", + "manage", + "provide" + ], + "properties": { + "capability": { + "$ref": "#/x-schemas/Capabilities/Capability" + }, + "supported": { + "type": "boolean", + "description": "Provides info whether the capability is supported" + }, + "available": { + "type": "boolean", + "description": "Provides info whether the capability is available" + }, + "use": { + "$ref": "#/x-schemas/Capabilities/CapPermissionStatus" + }, + "manage": { + "$ref": "#/x-schemas/Capabilities/CapPermissionStatus" + }, + "provide": { + "$ref": "#/x-schemas/Capabilities/CapPermissionStatus" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Capabilities/DenyReason" + }, + "minItems": 1, + "maxItems": 6 + } + }, + "additionalProperties": false, + "examples": [ + { + "capability": "xrn:firebolt:capability:keyboard", + "supported": true, + "available": true, + "use": { + "permitted": true, + "granted": true + }, + "manage": { + "permitted": true, + "granted": true + }, + "provide": { + "permitted": true, + "granted": true + } + } + ] + }, + "Permission": { + "title": "Permission", + "description": "A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user).", + "type": "object", + "required": [ + "capability" + ], + "properties": { + "role": { + "$ref": "#/x-schemas/Capabilities/Role" + }, + "capability": { + "$ref": "#/x-schemas/Capabilities/Capability" + } + }, + "additionalProperties": false + }, + "Role": { + "title": "Role", + "description": "Role provides access level for the app for a given capability.", + "type": "string", + "enum": [ + "use", + "manage", + "provide" + ] + }, + "CapPermissionStatus": { + "type": "object", + "properties": { + "permitted": { + "type": "boolean", + "description": "Provides info whether the capability is permitted" + }, + "granted": { + "oneOf": [ + { + "type": "boolean", + "description": "Provides info whether the capability is granted" + }, + { + "const": null + } + ] + } + }, + "additionalProperties": false + }, + "DenyReason": { + "title": "DenyReason", + "description": "Reasons why a Capability might not be invokable", + "type": "string", + "enum": [ + "unpermitted", + "unsupported", + "disabled", + "unavailable", + "grantDenied", + "ungranted" + ] + } + }, + "Discovery": { + "uri": "https://meta.comcast.com/firebolt/discovery", + "InterestType": { + "title": "InterestType", + "type": "string", + "enum": [ + "interest", + "disinterest" + ] + }, + "InterestReason": { + "title": "InterestReason", + "type": "string", + "enum": [ + "playlist", + "reaction", + "recording" + ] + }, + "EntityInfoResult": { + "title": "EntityInfoResult", + "description": "The result for an `entityInfo()` push or pull.", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "entity": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + }, + "related": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "entity" + ], + "additionalProperties": false + }, + "PurchasedContentResult": { + "title": "PurchasedContentResult", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/EntityInfo" + } + } + }, + "required": [ + "expires", + "totalCount", + "entries" + ], + "additionalProperties": false + } + }, + "Entity": { + "uri": "https://meta.comcast.com/firebolt/entity", + "EntityDetails": { + "title": "EntityDetails", + "type": "object", + "required": [ + "identifiers" + ], + "properties": { + "identifiers": { + "$ref": "#/x-schemas/Entity/Entity" + }, + "info": { + "$ref": "#/x-schemas/Entity/Metadata" + }, + "waysToWatch": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/WayToWatch" + }, + "description": "An array of ways a user is might watch this entity, regardless of entitlements." + } + } + }, + "Entity": { + "oneOf": [ + { + "$ref": "#/x-schemas/Entity/ProgramEntity" + }, + { + "$ref": "#/x-schemas/Entity/MusicEntity" + }, + { + "$ref": "#/x-schemas/Entity/ChannelEntity" + }, + { + "$ref": "#/x-schemas/Entity/UntypedEntity" + }, + { + "$ref": "#/x-schemas/Entity/PlaylistEntity" + } + ] + }, + "Metadata": { + "title": "Metadata", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the entity." + }, + "synopsis": { + "type": "string", + "description": "Short description of the entity." + }, + "seasonNumber": { + "type": "number", + "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." + }, + "seasonCount": { + "type": "number", + "description": "For TV series, seasons, and episodes, the total number of seasons." + }, + "episodeNumber": { + "type": "number", + "description": "For TV episodes, the episode number." + }, + "episodeCount": { + "type": "number", + "description": "For TV seasons and episodes, the total number of episodes in the current season." + }, + "releaseDate": { + "type": "string", + "format": "date-time", + "description": "The date that the program or entity was released or first aired." + }, + "contentRatings": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/ContentRating" + }, + "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." + } + } + }, + "ProgramEntity": { + "title": "ProgramEntity", + "oneOf": [ + { + "$ref": "#/x-schemas/Entity/MovieEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVSeasonEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVSeriesEntity" + }, + { + "$ref": "#/x-schemas/Entity/AdditionalEntity" + } + ] + }, + "MusicEntity": { + "title": "MusicEntity", + "type": "object", + "properties": { + "entityType": { + "const": "music" + }, + "musicType": { + "$ref": "#/x-schemas/Entertainment/MusicType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "musicType", + "entityId" + ] + }, + "ChannelEntity": { + "title": "ChannelEntity", + "type": "object", + "properties": { + "entityType": { + "const": "channel" + }, + "channelType": { + "type": "string", + "enum": [ + "streaming", + "overTheAir" + ] + }, + "entityId": { + "type": "string", + "description": "ID of the channel, in the target App's scope." + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "required": [ + "entityType", + "channelType", + "entityId" + ], + "additionalProperties": false + }, + "UntypedEntity": { + "title": "UntypedEntity", + "allOf": [ + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityId": "an-entity" + } + ] + }, + "PlaylistEntity": { + "title": "PlaylistEntity", + "description": "A Firebolt compliant representation of a Playlist entity.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "playlist" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + ] + }, + "MovieEntity": { + "title": "MovieEntity", + "description": "A Firebolt compliant representation of a Movie entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "movie" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + ] + }, + "TVEpisodeEntity": { + "title": "TVEpisodeEntity", + "description": "A Firebolt compliant representation of a TV Episode entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId", + "seasonId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "episode" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "seasonId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + } + ] + }, + "TVSeasonEntity": { + "title": "TVSeasonEntity", + "description": "A Firebolt compliant representation of a TV Season entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "season" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "season", + "entityId": "breaking-bad-season-1", + "seriesId": "breaking-bad" + } + ] + }, + "TVSeriesEntity": { + "title": "TVSeriesEntity", + "description": "A Firebolt compliant representation of a TV Series entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "series" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "series", + "entityId": "breaking-bad" + } + ] + }, + "AdditionalEntity": { + "title": "AdditionalEntity", + "description": "A Firebolt compliant representation of the remaining program entity types.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "type": "string", + "enum": [ + "concert", + "sportingEvent", + "preview", + "other", + "advertisement", + "musicVideo", + "minisode", + "extra" + ] + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "concert", + "entityId": "live-aid" + } + ] + }, + "PlayableEntity": { + "title": "PlayableEntity", + "anyOf": [ + { + "$ref": "#/x-schemas/Entity/MovieEntity" + }, + { + "$ref": "#/x-schemas/Entity/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Entity/PlaylistEntity" + }, + { + "$ref": "#/x-schemas/Entity/MusicEntity" + }, + { + "$ref": "#/x-schemas/Entity/AdditionalEntity" + } + ] + } + }, + "Entertainment": { + "uri": "https://meta.comcast.com/firebolt/entertainment", + "WayToWatch": { + "title": "WayToWatch", + "type": "object", + "required": [ + "identifiers", + "audioProfile" + ], + "properties": { + "identifiers": { + "$ref": "#/x-schemas/Entertainment/ContentIdentifiers" + }, + "expires": { + "type": "string", + "format": "date-time", + "description": "Time when the WayToWatch is no longer available." + }, + "entitled": { + "type": "boolean", + "description": "Specify if the user is entitled to watch the entity." + }, + "entitledExpires": { + "type": "string", + "format": "date-time", + "description": "Time when the entity is no longer entitled." + }, + "offeringType": { + "$ref": "#/x-schemas/Entertainment/OfferingType" + }, + "hasAds": { + "type": "boolean", + "description": "True if the streamable asset contains ads." + }, + "price": { + "type": "number", + "description": "For \"buy\" and \"rent\" WayToWatch, the price to buy or rent in the user's preferred currency." + }, + "videoQuality": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "SD", + "HD", + "UHD" + ] + }, + "description": "List of the video qualities available via the WayToWatch." + }, + "audioProfile": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Types/AudioProfile" + }, + "description": "List of the audio types available via the WayToWatch." + }, + "audioLanguages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of audio track languages available on the WayToWatch. The first is considered the primary language. Languages are expressed as ISO 639 1/2 codes." + }, + "closedCaptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of languages for which closed captions are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." + }, + "subtitles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of languages for which subtitles are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." + }, + "audioDescriptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of languages for which audio descriptions (DVD) as available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." + } + }, + "description": "A WayToWatch describes a way to watch a video program. It may describe a single\nstreamable asset or a set of streamable assets. For example, an app provider may\ndescribe HD, SD, and UHD assets as individual WayToWatch objects or rolled into\na single WayToWatch.\n\nIf the WayToWatch represents a single streamable asset, the provided\nContentIdentifiers must be sufficient to play back the specific asset when sent\nvia a playback intent or deep link. If the WayToWatch represents multiple\nstreamable assets, the provided ContentIdentifiers must be sufficient to\nplayback one of the assets represented with no user action. In this scenario,\nthe app SHOULD choose the best asset for the user based on their device and\nsettings. The ContentIdentifiers MUST also be sufficient for navigating the user\nto the appropriate entity or detail screen via an entity intent.\n\nThe app should set the `entitled` property to indicate if the user can watch, or\nnot watch, the asset without making a purchase. If the entitlement is known to\nexpire at a certain time (e.g., a rental), the app should also provide the\n`entitledExpires` property. If the entitlement is not expired, the UI will use\nthe `entitled` property to display watchable assets to the user, adjust how\nassets are presented to the user, and how intents into the app are generated.\nFor example, the the Aggregated Experience could render a \"Watch\" button for an\nentitled asset versus a \"Subscribe\" button for an non-entitled asset.\n\nThe app should set the `offeringType` to define how the content may be\nauthorized. The UI will use this to adjust how content is presented to the user.\n\nA single WayToWatch cannot represent streamable assets available via multiple\npurchase paths. If, for example, an asset has both Buy, Rent and Subscription\navailability, the three different entitlement paths MUST be represented as\nmultiple WayToWatch objects.\n\n`price` should be populated for WayToWatch objects with `buy` or `rent`\n`offeringType`. If the WayToWatch represents a set of assets with various price\npoints, the `price` provided must be the lowest available price." + }, + "OfferingType": { + "title": "OfferingType", + "type": "string", + "enum": [ + "free", + "subscribe", + "buy", + "rent" + ], + "description": "The offering type of the WayToWatch." + }, + "ContentIdentifiers": { + "title": "ContentIdentifiers", + "type": "object", + "properties": { + "assetId": { + "type": "string", + "description": "Identifies a particular playable asset. For example, the HD version of a particular movie separate from the UHD version." + }, + "entityId": { + "type": "string", + "description": "Identifies an entity, such as a Movie, TV Series or TV Episode." + }, + "seasonId": { + "type": "string", + "description": "The TV Season for a TV Episode." + }, + "seriesId": { + "type": "string", + "description": "The TV Series for a TV Episode or TV Season." + }, + "appContentData": { + "type": "string", + "description": "App-specific content identifiers.", + "maxLength": 1024 + } + }, + "description": "The ContentIdentifiers object is how the app identifies an entity or asset to\nthe Firebolt platform. These ids are used to look up metadata and deep link into\nthe app.\n\nApps do not need to provide all ids. They only need to provide the minimum\nrequired to target a playable stream or an entity detail screen via a deep link.\nIf an id isn't needed to get to those pages, it doesn't need to be included." + }, + "ContentRating": { + "title": "ContentRating", + "type": "object", + "required": [ + "scheme", + "rating" + ], + "properties": { + "scheme": { + "type": "string", + "enum": [ + "CA-Movie", + "CA-TV", + "CA-Movie-Fr", + "CA-TV-Fr", + "US-Movie", + "US-TV" + ], + "description": "The rating scheme." + }, + "rating": { + "type": "string", + "description": "The content rating." + }, + "advisories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional list of subratings or content advisories." + } + }, + "description": "A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below.\n\n## United States\n\n`US-Movie` (MPAA):\n\nRatings: `NR`, `G`, `PG`, `PG13`, `R`, `NC17`\n\nAdvisories: `AT`, `BN`, `SL`, `SS`, `N`, `V`\n\n`US-TV` (Vchip):\n\nRatings: `TVY`, `TVY7`, `TVG`, `TVPG`, `TV14`, `TVMA`\n\nAdvisories: `FV`, `D`, `L`, `S`, `V`\n\n## Canada\n\n`CA-Movie` (OFRB):\n\nRatings: `G`, `PG`, `14A`, `18A`, `R`, `E`\n\n`CA-TV` (AGVOT)\n\nRatings: `E`, `C`, `C8`, `G`, `PG`, `14+`, `18+`\n\nAdvisories: `C`, `C8`, `G`, `PG`, `14+`, `18+`\n\n`CA-Movie-Fr` (Canadian French language movies):\n\nRatings: `G`, `8+`, `13+`, `16+`, `18+`\n\n`CA-TV-Fr` (Canadian French language TV):\n\nRatings: `G`, `8+`, `13+`, `16+`, `18+`\n" + }, + "MusicType": { + "title": "MusicType", + "type": "string", + "description": "In the case of a music `entityType`, specifies the type of music entity.", + "enum": [ + "song", + "album" + ] + }, + "Entitlement": { + "title": "Entitlement", + "type": "object", + "properties": { + "entitlementId": { + "type": "string" + }, + "startTime": { + "type": "string", + "format": "date-time" + }, + "endTime": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "entitlementId" + ] + }, + "EntityInfo": { + "title": "EntityInfo", + "description": "An EntityInfo object represents an \"entity\" on the platform. Currently, only entities of type `program` are supported. `programType` must be supplied to identify the program type.\n\nAdditionally, EntityInfo objects must specify a properly formed\nContentIdentifiers object, `entityType`, and `title`. The app should provide\nthe `synopsis` property for a good user experience if the content\nmetadata is not available another way.\n\nThe ContentIdentifiers must be sufficient for navigating the user to the\nappropriate entity or detail screen via a `detail` intent or deep link.\n\nEntityInfo objects must provide at least one WayToWatch object when returned as\npart of an `entityInfo` method and a streamable asset is available to the user.\nIt is optional for the `purchasedContent` method, but recommended because the UI\nmay use those data.", + "type": "object", + "required": [ + "identifiers", + "entityType", + "title" + ], + "properties": { + "identifiers": { + "$ref": "#/x-schemas/Entertainment/ContentIdentifiers" + }, + "title": { + "type": "string", + "description": "Title of the entity." + }, + "entityType": { + "type": "string", + "enum": [ + "program", + "music" + ], + "description": "The type of the entity, e.g. `program` or `music`." + }, + "programType": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + }, + "musicType": { + "$ref": "#/x-schemas/Entertainment/MusicType" + }, + "synopsis": { + "type": "string", + "description": "Short description of the entity." + }, + "seasonNumber": { + "type": "number", + "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." + }, + "seasonCount": { + "type": "number", + "description": "For TV series, seasons, and episodes, the total number of seasons." + }, + "episodeNumber": { + "type": "number", + "description": "For TV episodes, the episode number." + }, + "episodeCount": { + "type": "number", + "description": "For TV seasons and episodes, the total number of episodes in the current season." + }, + "releaseDate": { + "type": "string", + "format": "date-time", + "description": "The date that the program or entity was released or first aired." + }, + "contentRatings": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/ContentRating" + }, + "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." + }, + "waysToWatch": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/WayToWatch" + }, + "description": "An array of ways a user is might watch this entity, regardless of entitlements." + } + }, + "if": { + "properties": { + "entityType": { + "const": "program" + } + } + }, + "then": { + "required": [ + "programType" + ], + "not": { + "required": [ + "musicType" + ] + } + }, + "else": { + "required": [ + "musicType" + ], + "not": { + "required": [ + "programType" + ] + } + } + }, + "ProgramType": { + "title": "ProgramType", + "type": "string", + "description": "In the case of a program `entityType`, specifies the program type.", + "enum": [ + "movie", + "episode", + "season", + "series", + "other", + "preview", + "extra", + "concert", + "sportingEvent", + "advertisement", + "musicVideo", + "minisode" + ] + } + }, + "Intents": { + "uri": "https://meta.comcast.com/firebolt/intents", + "NavigationIntent": { + "title": "NavigationIntent", + "description": "A Firebolt compliant representation of a user intention to navigate to a specific place in an app.", + "anyOf": [ + { + "$ref": "#/x-schemas/Intents/HomeIntent" + }, + { + "$ref": "#/x-schemas/Intents/LaunchIntent" + }, + { + "$ref": "#/x-schemas/Intents/EntityIntent" + }, + { + "$ref": "#/x-schemas/Intents/PlaybackIntent" + }, + { + "$ref": "#/x-schemas/Intents/SearchIntent" + }, + { + "$ref": "#/x-schemas/Intents/SectionIntent" + }, + { + "$ref": "#/x-schemas/Intents/TuneIntent" + }, + { + "$ref": "#/x-schemas/Intents/PlayEntityIntent" + }, + { + "$ref": "#/x-schemas/Intents/PlayQueryIntent" + } + ] + }, + "HomeIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to it's home screen, and bring that app to the foreground if needed.", + "title": "HomeIntent", + "allOf": [ + { + "title": "HomeIntent", + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "title": "HomeIntent", + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "title": "HomeIntent", + "type": "object", + "properties": { + "action": { + "const": "home" + } + }, + "not": { + "required": [ + "data" + ] + } + } + ], + "examples": [ + { + "action": "home", + "context": { + "source": "voice" + } + } + ] + }, + "LaunchIntent": { + "description": "A Firebolt compliant representation of a user intention to launch an app.", + "title": "LaunchIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "launch" + } + }, + "not": { + "required": [ + "data" + ] + } + } + ], + "examples": [ + { + "action": "launch", + "context": { + "source": "voice" + } + } + ] + }, + "EntityIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a specific entity page, and bring that app to the foreground if needed.", + "title": "EntityIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "entity" + }, + "data": { + "$ref": "#/x-schemas/Entity/Entity" + } + } + } + ], + "examples": [ + { + "action": "entity", + "context": { + "source": "voice" + }, + "data": { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + } + ] + }, + "PlaybackIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", + "title": "PlaybackIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "playback" + }, + "data": { + "$ref": "#/x-schemas/Entity/PlayableEntity" + } + } + } + ], + "examples": [ + { + "action": "playback", + "data": { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + }, + "context": { + "source": "voice" + } + } + ] + }, + "SearchIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed.", + "title": "SearchIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "search" + }, + "data": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + ], + "examples": [ + { + "action": "search", + "data": { + "query": "walter white" + }, + "context": { + "source": "voice" + } + } + ] + }, + "SectionIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed.", + "title": "SectionIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "section" + }, + "data": { + "type": "object", + "required": [ + "sectionName" + ], + "properties": { + "sectionName": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "required": [ + "data" + ] + } + ], + "examples": [ + { + "action": "section", + "data": { + "sectionName": "settings" + }, + "context": { + "source": "voice" + } + } + ] + }, + "TuneIntent": { + "description": "A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App.", + "title": "TuneIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "tune" + }, + "data": { + "type": "object", + "required": [ + "entity" + ], + "additionalProperties": false, + "properties": { + "entity": { + "$ref": "#/x-schemas/Entity/ChannelEntity" + }, + "options": { + "description": "The options property of the data property MUST have only one of the following fields.", + "type": "object", + "required": [], + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "assetId": { + "type": "string", + "description": "The ID of a specific 'listing', as scoped by the target App's ID-space, which the App should begin playback from." + }, + "restartCurrentProgram": { + "type": "boolean", + "description": "Denotes that the App should start playback at the most recent program boundary, rather than 'live.'" + }, + "time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 Date/Time where the App should begin playback from." + } + } + } + } + } + } + } + ], + "examples": [ + { + "action": "tune", + "data": { + "entity": { + "entityType": "channel", + "channelType": "streaming", + "entityId": "an-ott-channel" + }, + "options": { + "restartCurrentProgram": true + } + }, + "context": { + "source": "voice" + } + } + ] + }, + "PlayEntityIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", + "title": "PlayEntityIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "play-entity" + }, + "data": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/x-schemas/Entity/PlayableEntity" + }, + "options": { + "type": "object", + "properties": { + "playFirstId": { + "type": "string" + }, + "playFirstTrack": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": false + } + }, + "required": [ + "entity" + ], + "propertyNames": { + "enum": [ + "entity", + "options" + ] + }, + "if": { + "properties": { + "entity": { + "type": "object", + "required": [ + "entityType" + ], + "properties": { + "entityType": { + "const": "playlist" + } + } + } + } + }, + "then": { + "type": "object", + "properties": { + "options": { + "type": "object", + "maxProperties": 1 + } + } + }, + "else": { + "type": "object", + "properties": { + "options": { + "type": "object", + "maxProperties": 0 + } + } + } + } + } + } + ], + "examples": [ + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + }, + "options": { + "playFirstId": "song/xyz" + } + }, + "context": { + "source": "voice" + } + }, + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + }, + "options": { + "playFirstTrack": 3 + } + }, + "context": { + "source": "voice" + } + } + ] + }, + "PlayQueryIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for an abstract query to be searched for and played by the app.", + "title": "PlayQueryIntent", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/Intent" + }, + { + "$ref": "#/x-schemas/Intents/IntentProperties" + }, + { + "type": "object", + "required": [ + "data" + ], + "properties": { + "action": { + "const": "play-query" + }, + "data": { + "type": "object", + "properties": { + "query": { + "type": "string" + }, + "options": { + "type": "object", + "properties": { + "programTypes": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + } + }, + "musicTypes": { + "type": "array", + "items": { + "$ref": "#/x-schemas/Entertainment/MusicType" + } + } + }, + "additionalProperties": false + } + }, + "required": [ + "query" + ], + "propertyNames": { + "enum": [ + "query", + "options" + ] + } + } + } + } + ], + "examples": [ + { + "action": "play-query", + "data": { + "query": "Ed Sheeran" + }, + "context": { + "source": "voice" + } + }, + { + "action": "play-query", + "data": { + "query": "Ed Sheeran", + "options": { + "programTypes": [ + "movie" + ] + } + }, + "context": { + "source": "voice" + } + }, + { + "action": "play-query", + "data": { + "query": "Ed Sheeran", + "options": { + "programTypes": [ + "movie" + ], + "musicTypes": [ + "song" + ] + } + }, + "context": { + "source": "voice" + } + } + ] + }, + "Intent": { + "description": "A Firebolt compliant representation of a user intention.", + "type": "object", + "required": [ + "action", + "context" + ], + "properties": { + "action": { + "type": "string" + }, + "context": { + "type": "object", + "required": [ + "source" + ], + "properties": { + "source": { + "type": "string" + } + } + } + } + }, + "IntentProperties": { + "type": "object", + "propertyNames": { + "enum": [ + "action", + "data", + "context" + ] + } + } + }, + "Lifecycle": { + "uri": "https://meta.comcast.com/firebolt/lifecycle", + "CloseReason": { + "title": "CloseReason", + "description": "The application close reason", + "type": "string", + "enum": [ + "remoteButton", + "userExit", + "done", + "error" + ] + }, + "LifecycleState": { + "title": "LifecycleState", + "description": "The application lifecycle state", + "type": "string", + "enum": [ + "initializing", + "inactive", + "foreground", + "background", + "unloading", + "suspended" + ] + } + }, + "SecondScreen": { + "uri": "https://meta.comcast.com/firebolt/secondscreen", + "SecondScreenEvent": { + "title": "SecondScreenEvent", + "description": "An a message notification from a second screen device", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "dial" + ] + }, + "version": { + "type": "string" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/requirements/pr-release-1-3-0/specifications/general/capabilities/index.md b/requirements/pr-release-1-3-0/specifications/general/capabilities/index.md new file mode 100644 index 00000000..0bb59bb2 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/general/capabilities/index.md @@ -0,0 +1,668 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Capabilities +category: requirements +type: specification +--- +# Capabilities + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Andrew Bennett | Sky | +| Tim Dibben | Sky | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Peter Yu | Comcast | + +## 1. Overview + +This document introduces Firebolt Capabilities, which enable discovery +of supported features, negotiation of App permissions, and end-user +grants for Apps to access sensitive features. + +Apps can detect if Capabilities are supported and available. If so, Apps +can **Use**, **Provide**, or **Manage** capabilities that they are given +access to. + +The most common case is for an App to `use` a Capability, the platform +to `provide` it, and the Distributor\'s Settings App to `manage` it: + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/image1.png) + +However, Apps may also provide Capabilities back to the platform: + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/image2.png) + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Introduction to Capabilities](#3-introduction-to-capabilities) + - [3.1. Capabilities](#31-capabilities) + - [3.2. Availability](#32-availability) + - [3.3. Permissions](#33-permissions) + - [3.4. Roles](#34-roles) + - [3.5. User Grants](#35-user-grants) +- [4. How Capabilities Work](#4-how-capabilities-work) + - [4.1. Supported Capabilities](#41-supported-capabilities) + - [4.2. Available Capabilities](#42-available-capabilities) + - [4.3. Permitted Capabilities](#43-permitted-capabilities) + - [4.4. User Granted Capabilities](#44-user-granted-capabilities) + - [4.5. Invoking Capabilities](#45-invoking-capabilities) +- [5. Configuring Device Capabilities](#5-configuring-device-capabilities) + - [5.1. Device Supported Capabilities](#51-device-supported-capabilities) + - [5.2. Device Grant Policy Overrides](#52-device-grant-policy-overrides) +- [6. Capability Schemas](#6-capability-schemas) + - [6.1. Firebolt Specification Manifest](#61-firebolt-specification-manifest) + - [6.2. Firebolt Device Manifest](#62-firebolt-device-manifest) +- [7. Capability to Feature Mapping](#7-capability-to-feature-mapping) + - [7.1. App installation](#71-app-installation) + - [7.2. Firebolt APIs](#72-firebolt-apis) + - [7.3. Extension APIs](#73-extension-apis) + - [7.4. Hidden Permissions](#74-hidden-permissions) +- [8. Firebolt Capability Catalog](#8-firebolt-capability-catalog) +- [9. APIs](#9-apis) + - [9.1. Core SDK APIs](#91-core-sdk-apis) + - [9.2. Manage SDK APIs](#92-manage-sdk-apis) + +## 3. Introduction to Capabilities + +This section is non-normative and defines the key concepts behind the +Firebolt Capabilities system. Each portion of this section provides a +background and conversational definitions of the terms used in the rest +of this document, and through all Firebolt Requirements Specifications. + +### 3.1. Capabilities + +A Capability is a discrete unit of functionality that a Firebolt device +might be able to perform. It is granular enough to enable appropriate +access controls across all Firebolt Apps, but useful enough to be a +meaningful functional unit that an App might care about. Bluetooth is a +good example of a Capability. + +The Firebolt Specification determines the range of possible +Capabilities. + +Firebolt platforms advertise which Capabilities are supported. The set +of capabilities supported by a device is an immutable set and will never +change at runtime. Supporting Wi-Fi and having an active Wi-Fi +connection are two different things. + +Firebolt platforms determine if an App is allowed to invoke the +different aspects of a Capability (see [Roles](#roles), below). + +Firebolt Apps list which Capabilities are required and optional for the +App to be installed. + +Firebolt Apps inspect which Capabilities are supported and active. + +Firebolt Distributors sign off on some, or all, of the App's listed +required and optional Capabilities. + +### 3.2. Availability + +A Capability may rely on intermittently available resources, for example +a network capability requires an Ethernet or Wi-Fi network connection. + +A supported capability is only considered available if those resources +could be used by the App right now (without taking into account any needed permissions or [User Grants](#user-grants)). For example, the needed +resources are not disabled, not tied up by the platform, and not experiencing +any intermittent network, hardware, or signal issues. + +A supported capability is always supported, but it may not always be +*available*. + +Availability of a capability is a global status, not a per-app status. + +If a Capability is available, then it is considered available globally. +Capabilities can not be available to one app, while simultaneously being +unavailable to another app. This is handled by permissions, or by +capability-specific error management, e.g. returning an error to an app that +attempts to use the video pipeline while in the Inactive Lifecycle state. + +### 3.3. Permissions + +A Permission is what allows an App to attempt to invoke an aspect of a +Capability. Permissions to a Capability are assigned to an App with a +[Role](#roles), by a Firebolt Distributor. + +Firebolt documents and APIs will use the term "Permission" +interchangeably with phrases like: + +- An App's Assigned Role for a Capability + +- App + Capability + Role + +- Etc. + +The Firebolt Specification determines which Capabilities require +Permissions. + +The Firebolt Specification determines which Permission requirements may +be overridden by Distributors. + +An App is considered to have Permission to a Capability if it is: + +- Listed with a Role in the App's manifest and signed by the App + provider + +- Listed and signed again by the Distributor on the App's behalf + +- Listed and signed by the App Publisher when running in self-signed developer + mode + +An App can invoke a Capability if: + +- It has permission, which includes a Role, for that capability + +- The capability is supported by the current device + +- The App is invoking aspects of the capability that it has the + appropriate Role for + +- The capability is [Available](#availability) at time of invocation + +See [Permitted Capabilities](#permitted-capabilities) for more info. + +### 3.4. Roles + +Every Firebolt Capability has exactly three roles: + +- Use + +- Manage + +- Provide + +While these roles will be defined on a case-by-case basis for each +capability, they should generally follow the guidelines set here. + +The `Use` role is for providing basic access so that an App can leverage +the standard use cases of the Capability. The `Use` role will not enable +an App to perform management tasks such as turning the Capability on and +off for the entire device. The `Use` role will not enable an App to +perform administrative tasks such as renaming HDMI inputs, etc. + +The `Manage` role is for providing access to a Capability's management +and administrative features. This role may be used to allow an App to +build a Settings UI for the Capability, for example. The `Manage` role +is not for creating tiers of permissions within a Capability, but for +separating out administrative APIs, for example turning a feature on and +off. + +Most Capabilities are provided by the platform, denoted by making the +`Provide` role `private` for that Capability. However, there are use +cases where Apps may provide Capabilities. The `Provide` role allows for +declaring that an App *implements* the Capability and can be registered +with the platform for fulfilling the Capability's features. This could +be used for functionality that needs to be customized from Distributor +to Distributor. The `Provide` role may also be used to allow Apps to +contribute to aggregated functionality, for example a federated search +feature. By providing a capability, an App is signing up to implement +any `Use` or `Manage` APIs required by that capability. + +Each role must be explicitly assigned. An App *never* inherits the +operations from one role by virtue of being granted another. Roles may +have overlapping functionality. + +A [Permission](#permissions) is the combination of a Capability w/ a +Role and determines which specific operations are permitted. + +### 3.5. User Grants + +A User Grant allows some Permissions to depend on the User of the +Firebolt Device to explicitly grant access for one or all Apps to use a +specific Capability. This an additional layer of access control on top +of Permissions. + +The Firebolt Specification determines which Permissions require User +Grants by default. + +It is not possible to require a User Grant for a Capability that is open +to all Apps. + +Distributors may override any User Grant details that are defined by the +Firebolt Specification if that User Grant Policy is set to +`overridable: true`. + +Consumers want to know that their Smart TV platform treats +security as a first-class design principal. As such, table-stakes User +Grant policies, e.g. App access to Bluetooth, may be denoted as +overridable: false in the Firebolt Specification, to remove any +possibility of a security flaw. + +An App is considered to have a User Grant to a Capability if it: + +- Has Permission to the Capability + +- The User Grant is for the same Role as the Permission above + +- The Capability is **securely** approved by the device user + +If an App invokes a Capability but does not have an active User Grant, +then the platform will block invocation, prompt the user for a grant, +and then continue with the original invocation, e.g. the App does not +have to call the originating API again (assuming the user did give their +approval). + +See [User Granted Capabilities](#user-granted-capabilities) for more +info. + +## 4. How Capabilities Work + +A given Capability may or may not be supported or available. +Additionally, a given Role may or may not be permitted or granted for a +given Capability. + +While support and availability of a Capability is static and global, the +permission and grant status may differ from App to App. + +Determining the status of a Role and Capability is fundamental to +both the Platform and the Apps that run on it. + +### 4.1. Supported Capabilities + +Once an App has been launched, it may need to check if a certain +capability is supported to present the appropriate user experience. For +example, an App may want to put Dolby Atmos badges next to its content, +but only if the platform supports Dolby Atmos. + +The Firebolt Specification determines which capabilities **MUST** be +supported by all Firebolt Devices, by listing those Capabilities in the +[Firebolt Specification Schema](#61-firebolt-specification-schema) as `level: "must"` in the Capabilities +array. + +For a capability to be supported, it **MUST** have *one* or *both* of +the following: + +> A supported capability **MUST** have the necessary hardware and +> software to invoke all required aspects of all Roles of the +> capability. +> +> **OR** +> +> A supported capability **MUST** have the necessary hardware and +> software to support a *certified*, after-market peripheral that +> provides the capability. Note that this includes peripherals that have +> not yet been connected to or installed on the device. + +However, a Firebolt device **MUST NOT** be considered to support a +capability if the capability is disabled by the static distributor +configuration. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.2. Available Capabilities + +Once an App has been launched, it may need to check if a certain +capability is available, to start the appropriate user experience. For +example, an App that uses an external camera may need to check if the +user has set up their camera before proceeding to the main user +experience. + +A Capability is available if **all** the following are true: + +> An available Capability **MUST** be supported. +> +> An available Capability **MUST** have a provider, either an App, an +> Extension SDK, or the OS itself. +> +> The provider of the Capability **MUST** consider it to be available +> +> An available Capability **MUST NOT** be currently disabled by any +> user, account, or device setting. +> +> An available Capability **MUST** be considered available by at least +> one provider of the capability. This is specified by the requirements +> for each feature. + +An available Capability **MAY** be tied to a User Grant, regardless of +whether the user has granted it yet. Secure user grants gate permission, +not availability. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.3. Permitted Capabilities + +Capabilities may be permitted to *all* Apps by the [Firebolt +Specification Schema](../../firebolt-specification.json), or to individual Apps by the Distributor-signed +App Manifest. + +An App may need to know if a Capability is permitted to it once it has +been launched. For example, it may need to check if a certain capability +is permitted, to enable the correct features for the current +distributor. For example, an App that has just been installed might not +show a Returns true for capability/role combinations that do not r +Sign-up option when running on a distributor that has not allowed it to +`use` the `commerce:subscribe` capability, and only allow existing users +to sign in. + +Determining if a Capability is permitted requires knowing which **Role** +is being leveraged. + +Permitted capabilities **MUST** be denoted as `public` in the Specification Schema](#61-firebolt-specification-schema). + +Additionally, **one** of the following **MUST** be true as well: + +> The Role **MUST** have `negotiable` set to `false` +> +> **OR** +> +> The Role **MUST** be approved for the capability by the distributor in +> the App Manifest + +A permitted Capability **MAY** be tied to a User Grant, regardless of +whether the user has granted it yet. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.4. User Granted Capabilities + +Some Capabilities may require a User Grant. It is the App's choice +whether it requests these grants at launch or allows the platform to +interrupt the App's experience when User Grant-gated Capabilities are +invoked. + +Determining if a Capability has been granted by the user requires +knowing which Role is being used. + +For a Capability to be considered granted, it **MUST** be supported. + +Additionally, a Capability + Role is granted to an App if **one** of the +following is true: + +> A granted capability **MUST** have the Role securely granted to the +> App by the user and that grant must not be expired. +> +> **OR** +> +> A granted capability **MUST** have the Role permanently granted to the +> App by the App Manifest, e.g., if the user implicitly granted these by +> virtue of an end user license agreement. + +Firebolt platforms **MUST** support acquiring a user grant *at the +moment the Capability is invoked*, without requiring any reinvocation of +the Capability. + +See [User Grants](./user-grants), for more info. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.5. Invoking Capabilities + +When invoking a Capability, there are several factors that determine +whether the calling App will be allowed. The primary factor is which +Role is being leveraged by the invocation. + +A given Capability & Role can be public or not, and it can be negotiable +or not. + +If a Role for a Capability is public and non-negotiable, then all Apps +are allowed to invoke it, without any explicit permission from the +platform distributor. This is subject to support, availability, and any +required User Grants. + +If a Role for a Capability is public and negotiable, then Apps **MUST** +be permitted by each distributor to use it on that distributor\'s +devices. + +If a Role for a Capability is private, then it **MUST NOT** be permitted +or granted to any Apps. + +A Role for a Capability **MUST NOT** be flagged as negotiable if it is +private. + +If a Capability is gated by a User Grant requirement, then any +invocation **MUST** check the grant status for the Role in question, and +potentially re-acquire a User Grant for the App to invoke it. + +The following flow diagrams show the order of operations for determining +if a Firebolt API, that depends on one or more capabilities, may be +invoked. The checks in this diagram **MUST** be executed in this order +to ensure that error codes are consistent and User Grant prompts are not +displayed to end users in situations where the API call will still not +be allowed for other reasons. + +![](../../../images/specifications/general/capabilities/image4.png) + +Note that determining user grants may involve presenting a UX to the end +user. During this time, a necessary capability may become unavailable. +Due to this, necessary Capabilities MUST be reevaluated for availability +after determining user grant status. For a more detailed flow diagram +for evaluating User Grants, see [User Grants](./user-grants). + +## 5. Configuring Device Capabilities + +The Firebolt Specification describes all the possible, non-Extension +capabilities that a particular version of Firebolt allows. Individual +Firebolt devices, however, may not support every Capability and may want +to override certain aspects of those Capabilities. + +Every Firebolt-compliant device **MUST** include an official, versioned +Firebolt JSON configuration that conforms to the Specification Schema](#61-firebolt-specification-schema), so that the implementation +knows how to configure each capability, and which aspects are +overridable. + +Additionally, every Firebolt-compliant device **MUST** have a versioned + +Firebolt Device JSON configuration that conforms to the Firebolt Device +Schema, so that the implementation knows how each capability has been +overridden by the Distributor for this device. + +See [Firebolt Device Schema](#firebolt-device-schema) for more info. + +### 5.1. Device Supported Capabilities + +Firebolt-compliant devices **MUST** list all the Capabilities they +support in the Device Capabilities configuration file\'s `supported` +array. + +The `supported` array **MUST** contain a `CapabilityConfig` for every +Firebolt Capability supported by this device. + +The `supported` array **MUST** contain an entry for every Capability +from the Specification Schema](#61-firebolt-specification-schema) that has a level of `must`. + +The `supported` array **MAY** contain entries for any `should` or +`could` Capabilities. + +The supported array **MUST NOT** contain any entries for Capabilities +not found in the Firebolt Specification Schema. + +### 5.2. Device Grant Policy Overrides + +Firebolt-compliant devices **MAY** override any `GrantPolicies` that +have `overridable` set to `true`. + +This can be used to permanently disable a User Grant + +Firebolt-compliant devices **MUST NOT** override any `GrantPolicies` +that have `overridable` set to `false`. + +`GrantOverrides` are included in the `grantOverrides` array of the +`CapabilityConfig` for the Capability in question. + +If both the Firebolt Specification Schema and the Device Schema have +different, valid overrides for the same capability + appId, then the +device config **MUST** be used by that device. + +## 6. Capability Schemas + +This section describes how Capabilities are represented in the static +Firebolt configuration for a device. + +### 6.1. Firebolt Specification Manifest + +Each version of Firebolt **MUST** have a single Firebolt Specification +Manifest that is the source-of-truth for and contains all possible +capabilities provided, used, or managed by Apps or Firebolt platforms. + ++The Firebolt Specification Manifest **MUST** list all capabilities defined by that version of Firebolt. + +The Firebolt Specification Manifest **MUST** specify whether each capability `must`, `should`, or `could` be implemented by Firebolt devices. + +The Firebolt Specification Manifest **MUST** specify whether each role, i.e. `use`, `manage`, and `provide`, is a `public` permission that apps may call. + +See [Invoking Capabilities](#46-invoking-capabilities), for more info on public and negotiable capabilities. + +The Firebolt Specification Manifest **MUST** include the entire Firebolt OpenRPC specification for all APIs in the 'apis` block. + +The Firebolt Specification Manifest **MUST** specify which major versions of the Firebolt RPC APIs are required for backwards compatibility. + +The [Firebolt Version Manifest JSON-Schema](https://github.com/rdkcentral/firebolt-configuration/blob/main/src/schemas/version-manifest/version-manifest.json) defines the JSON semantics for this file. + +The latest version of the firebolt-specification.json **MUST** be available at this URL: + +``` +http://rdkcentral.github.io/firebolt/requirements/latest/specifications/firebolt-specification.json +``` + +The version of the firebolt-specification.json associated with this document **SHOULD** be available at [../../firebolt-specification.json](../../firebolt-specification.json). + +### 6.2. Firebolt Device Manifest + +Each Firebolt device will have a static configuration for overriding +which capabilities are supported, as well as any negotiable Capability +overrides. + +The Device Manifest **MUST** specify which capabilities the device supports. + +The Device Manfiest **MUST** include every capability from the Firebolt Specification Manifest that has a `level` of `must` in its supported list. + +The Device Manifest **MUST** specify which capabilities have distributor define Grant Policy Overrides. + +The Device Manfiest **MUST NOT** have any Grant Policies that override Grant Policies from the Firebolt Specification Manifest that have `overridable` set to `false`. + +The [Firebolt Device Manifest JSON-Schema](https://github.com/rdkcentral/firebolt-configuration/blob/main/src/schemas/device-manifest/device-manifest.json) defines the JSON semantics for this file. + +## 7. Capability to Feature Mapping + +Capabilities denote functionality, and functionality can manifest in several ways. + +### 7.1. App installation + +Some Apps may not be useful, and may even prove counter to their goals, +if installed on a device without certain capabilities. For example, a +Dolby Vision demonstration App that requires it only be installed on +devices that support Dolby Vision, to avoid playing back lower quality +content that users might mistake for Dolby Vision content. + +If an App includes a capability in one of its App Manifest's `required` +Capability lists: + +- `app.capabilities.used.required` + +- `app.capabilities.managed.required` + +- `app.capabilities.provided.required` + +Then that App **MUST NOT** be installable on Firebolt devices that do +not support that capability. + +Apps that have an unsupported capability inside one of its `optional` +lists **SHOULD NOT** be prevented from installation, unless there is +some other reason outside the scope of this document. + +### 7.2. Firebolt APIs + +Some Firebolt APIs may require the use of one or more Capabilities. +These methods **MUST** have all required Capabilities listed in the method's OpenRPC schema. + +Capabilities are listed in one of three OpenRPC extensions attached to +the `'capabilities' `tag on the method: `x-uses`, `x-manages`, +`x-provides`. + +If a method lists more than one Capability for a role, then it may +specify that those capabilities are either all required, any combination +of them is required, or one and only one is required. The platform **MUST parse any `x-uses-operator` values which will have values of either `allOf`, `anyOf`, or `oneOf`. This value defaults to `allOf` if not specified. An example of +this is an API to find and pair remotes, regardless of which connection +protocol is needed. This API requires `anyOf` `bluetooth:scan`, +`rf4ce:scan`, `wifi:scan`. If one or more of these capabilities is +available (and permitted) then the API will execute using the available +and permitted protocols. The same pattern applies to `x-manages-operator`. The `x-provides` extension only supports a single capability, so this pattern does not extend to providers. + +If a method *requires* a capability, and that capability requires a user +grant that the App does not have, then the platform **MUST** block and +initiate a User Grant flow. Once granted, the platform **MUST** return +the expected value without the App having to reinvoke the API. If not +granted after the User Grant flow, the platform **MUST** return an +error. + +Capabilities that enhance an API, but are not fundamentally required, +for example a `play` API optionally uses the `'hdr:dolbyvision'` +capability, **MUST NOT** be listed in the OpenRPC schema. These are considered *optional* capabilities of the method implementation. + +If a method leverages an *optional* Capability that is unavailable or +unpermitted, it **MUST** leave out or defer the optional functionality. + +If a method leverages an *optional* Capability that requires a user +grant the App does not have, it **MUST** leave out the optional +functionality, and it **MUST NOT** request a user grant. + +### 7.3. Extension APIs + +Extension SDKs implement their methods in the cloud but rely on +Firebolt's Permissions and Capabilities model. + +Requirements for Extension SDKS are outside of the scope of this document. + +### 7.4. Hidden Permissions + +A hidden permission arises when an API requires permission to one +Capability which in turn requires another Capability gated by a +different permission. This is not supported by Firebolt, and all +permission dependencies should be validated to avoid this. + +Firebolt Capabilities **MUST NOT** have hidden permissions. + +For example: + +- API `Module.methodOne()` requires permission to `use` the + `'contrived:capability1'` Capability + +- API `Module.methodTwo()` requires permission to `use` the + `'contrived:capability2'` Capability + +- `methodOne`'s implementation calls `methodTwo` + +There is now a hidden permission: `methodOne` requires both +`capability1` and `capabilty2`. + +Note that it's fine for a method to leverage an ungated, but also +unavailable Capability, such as a DIAL API failing because the network +capability is unavailable. + +## 8. Firebolt Capability Catalog + +Firebolt Capabilities are enumeraged in the [Firebolt Specification Manifest](../../firebolt-specification.json). + +## 9. APIs +All of the APIs below have full OpenRPC schemas in the [Firebolt OpenRPC JSON document](../../../specifications/firebolt-open-rpc.json). + +### 9.1. Core SDK APIs + +Several APIs are exposed by the Firebolt Core SDK as part of the +`Capabilities` module. This module is intended for App +developers to have one place to check for all aspects of "can I do +this." Including supported, available, permitted, and granted +Capabilities. It also provides bulk operations for figuring out which +needed Capabilities are unavailable, in order to wait for them, and +which ones are ungranted, in order to request them. + +### 9.2. Manage SDK APIs + +Several APIs are exposed by the Firebolt Manage SDK as part of the +`UserGrants` module. This module is intended for +Management UIs that show a list of grants per App or Capability, and +allow users to revoke them. diff --git a/requirements/pr-release-1-3-0/specifications/general/capabilities/user-grants/index.md b/requirements/pr-release-1-3-0/specifications/general/capabilities/user-grants/index.md new file mode 100644 index 00000000..dfb5b658 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/general/capabilities/user-grants/index.md @@ -0,0 +1,601 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: User Grants +category: requirements +type: specification +--- +# User Grants + +Document status: Candidate Specification + +See [Firebolt Requirements Governance](../../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Andrew Bennet | Sky | +| Tim Dibben | Sky | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Peter Yu | Comcast | + +## 1. Overview + +This document describes the requirements for Firebolt User Grants. User +Grants enable end-user control over which Apps have access to +potentially sensitive Firebolt Capabilities. For example, a user might +want to explicitly approve of any App attempting to purchase new content +by entering an account-holder PIN on the RCU. + +User Grants are also common when two apps need to share data, for +example, Firebolt has a `Discovery.watched` method that allows apps to +inform Firebolt that a user has finished watching some content. This +method allows an app to **provide** the watch history capability and the +aggregated experience to **use** it. See Firebolt +[Capabilities](../capabilities) requirements for more info on the `use` and `provide` roles of a +capability. + +This sort of data exchange involves several parties: minimally the user, +the publisher of the OTT app, and the distributor of the Firebolt +device. Additionally, this exchange could also involve privacy laws of +the user\'s home geo-political state, local I.T. best practices around +PII, or even a particular product\'s public position on their privacy +offering to the market. Because of the importance and complexity of +personal data, Firebolt allows each distributor to configure which +Firebolt capabilities require User Grants and what policies should be +applied to acquiring those grants. + +![Diagram Description automatically +generated](../../../../images/specifications/general/capabilities/user-grants/image1.png) + +Distributors can configure what kind of user grant is required for a +particular capability, e.g. a simple acknowledgement of an \"OK\" +button, an account-owner PIN entry, an account-owner three-factor +authentication challenge, etc. + +Distributors can also configure whether certain user grants are opt-in +or opt-out, and whether explicit prompting of the user is required. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Introduction to User Grants](#3-introduction-to-user-grants) + - [3.1. Active Grant](#31-active-grant) + - [3.2. Denied Grant](#32-denied-grant) + - [3.3. Unset Grant](#33-unset-grant) + - [3.4. Granting Capability](#34-granting-capability) + - [3.5. Grant Policy](#35-grant-policy) + - [3.6. Privacy Setting](#36-privacy-setting) +- [4. User Grant Requirements](#4-user-grant-requirements) + - [4.1. Granting Capability](#41-granting-capability) + - [4.1.1. Acknowledgement](#411-acknowledgement) + - [4.1.2. Pin Challenge](#412-pin-challenge) + - [4.2. Grant Policy](#42-grant-policy) + - [4.2.1. Grant Requirements](#421-grant-requirements) + - [4.2.2. Grant Lifespan](#422-grant-lifespan) + - [4.2.3. Grant Privacy Setting](#423-grant-privacy-setting) + - [4.3. Distributor Overrides](#43-distributor-overrides) + - [4.4. Application Overrides](#44-application-overrides) +- [5. Grant Execution](#5-grant-execution) + - [5.1. Capability Check](#51-capability-check) + - [5.2. Grant Policy Resolution](#52-grant-policy-resolution) + - [5.3. Active Grant Check](#53-active-grant-check) + - [5.4. Grant Prompt and Resolution](#54-grant-prompt-and-resolution) +- [6. Schemas](#6-schemas) + - [6.1. Grant Policy](#61-grant-policy) + - [6.2. GrantRequirements](#62-grantrequirements) + - [6.3. GrantStep](#63-grantstep) + - [6.4. GrantKey](#64-grantkey) + - [6.4.1. GrantScope](#641-grantscope) + - [6.4.2. GrantLifespan](#642-grantlifespan) + - [6.4.3. PrivacySetting](#643-privacysetting) +- [7. APIs](#7-apis) + - [7.1. Manage SDK APIs](#71-manage-sdk-apis) + - [7.1.1. GrantInfo Object](#711-grantinfo-object) + - [7.1.2. App Method](#712-app-method) + - [7.1.3. Device Method](#713-device-method) + - [7.1.4. Capability Method](#714-capability-method) + - [7.1.5. Grant Method](#715-grant-method) + - [7.1.6. Deny Method](#716-deny-method) + - [7.1.7. Clear Method](#717-clear-method) + + +## 3. Introduction to User Grants + +This section defines the key concepts behind the Firebolt User Grant +system. User Grants build on top of [Firebolt +Capabilities](../capabilities). +Since Capabilities are fundamental to user grants, it is recommended to +read the Capabilities requirements first before reading this document. + +Each portion of this section provides a background and conversational +definitions of the terms used in the rest of this document, and through +other Firebolt Requirements Specifications. + +As described in the Overview, a User Grant allows an end user to +explicitly allow (or not allow) an app to use certain Firebolt +Capabilities. Firebolt Distributors need flexibility in configuring +which Capabilities require what types of user interaction, PIN vs +password, etc. + +The following concepts inform how the Firebolt User Grant APIs and +architecture are designed. + +### 3.1. Active Grant + +An **Active Grant** is a User Grant that has already been granted by the +user for a Capability to a specific app (if the Grant Policy is per-app) +or all apps. Active Grants do not need to be granted again (until they +expire) and may be revoked or expire. + +### 3.2. Denied Grant + +A **Denied Grant** is a User Grant that has already been explicitly +*denied* by the user for a Capability to a specific app (if the Grant +Policy is per-app) or all apps. Denied Grants do not need to be denied +again (until they expire) and may be revoked or expire. This serves to +allow the Grant Policy lifetime to be applied to explicit denials as +well. + +### 3.3. Unset Grant + +An **Unset Grant** is a User Grant that has no persisted state. This +could be because the user has never granted or denied it, or because it +was previously granted/denied, but has since expired. Additionally, the +user or platform may clear out an active or denied grant, which results +in this state. + +### 3.4. Granting Capability + +User grants typically require some sort of user experience. Firebolt +delegates display of these user experiences to (typically) first-party +apps, which must provide them as **Granting Capabilities**. Therefore, +it\'s quite possible that using a capability such as watch history +initiates a User Grant request which itself requires another capability, +e.g. the \"acknowledge\" capability, to fulfill the original API. + +In the following diagram, an OTT App is calling an API that would share +watch history data with the 1st party aggregated experience on the +device. This capability is configured with a [Grant +Policy](#grant-policy) (see below) that specifies use of an +Acknowledgement Challenge Capability. the \"Watch History\" capability +is what is being accessed, and the \"Acknowledgement Challenge\" +capability is how this device is configured to grant access to that +capability. Said another way, the Acknowledgement Challenge is the +*Granting Capability*. + +![Diagram Description automatically +generated](../../../../images/specifications/general/capabilities/user-grants/image2.png) + +Note that the granting capability UI is provided by another app. The +Provider APIs for each granting capability type are out of scope for +this document. + +A granting capability is generally agnostic to the original capability +that it is helping to grant and can be reused by several capabilities +via a Grant Policy. + +### 3.5. Grant Policy + +A **Grant Policy** ties a set of user grant-related configuration values +to a capability. This allows a Firebolt distributor, or the Firebolt +specification itself, to define the business policy of a particular user +grant. + +Grant Policies specify details like how long the grant lasts and what is +the scope of the grant, e.g. a single app, or all apps. + +### 3.6. Privacy Setting + +A **Privacy Setting** is a link between a Grant Policy and any Firebolt API that is tagged with the Property pattern and returns a +`boolean`. This allows User Grant state to be linked to Privacy Settings +on the device or account. + +![Diagram Description automatically +generated](../../../../images/specifications/general/capabilities/user-grants/image3.png) + +How Firebolt devices persist Privacy Settings is outside the scope of +this document. + +## 4. User Grant Requirements + +### 4.1. Granting Capability + +A granting capability **MUST** have the category portion of its +capability key set to `usergrant`. For example: + +`xrn:firebolt:capability:usergrant:acknowledge` + +In order for a granting capability to be available, it **MUST** be +provided by some app that is currently loaded. + +Each granting capability **MUST** have a schema, in the Firebolt +Specification Schema, to validate that any configuration associated with +it is valid. + +#### 4.1.1. Acknowledgement + +The Acknowledgement capability enables a user to acknowledge a user +grant by simply clicking a button. + +This capability has the following key: + +`xrn:firebolt:capability:usergrant:acknowledgechallenge` + +The configuration for this capability is always `null`, i.e., there is +no configuration. + +For more info on how an app can provide the acknowledge capability, see +Acknowledge Provider. **TODO**: add link. + +#### 4.1.2. Pin Challenge + +The Pin Challenge capability enables a user to confirm that they are the +account owner, or a delegate of, by responding to a numeric PIN +challenge. + +This capability has the following key: + +`xrn:firebolt:capability:usergrant:pinchallenge` + +For more info on how an app can provide the acknowledge capability, see +Pin Challenge Provider. **TODO**: add link. + +### 4.2. Grant Policy + +If a Capability is configured with a `GrantPolicy` then the User Grants +specified by the Grant Policy **MUST** be evaluated before a GrantPolicy +llowing access to that Capability. + +A Grant Policy **MUST** have a `scope` for the grant, which determines +whether the user will be granting the capability to the current app or +to all apps. + +A Grant Policy **MUST** have an `overridable` flag that determines if it +may be overridden downstream. For Grant Policies in the Firebolt Version +Manifest, the Device Manifest may override if `overridable` is `true`. +For Grant Policies in the Device Manifest, individual [App +Manifests](https://github.com/rdkcentral/firebolt-configuration/src/schemas/app-manifest/app/app.json) may override the grant if `overridable` is `true`. + +#### 4.2.1. Grant Requirements + +A Grant Policy **MUST** have at least one `GrantRequirements` object, +which itself has a list of zero or more [Granting +Capabilities](#granting-capability) and their configurations. If all the +granting capabilities are supported and available, then they all +**MUST** be invoked. This allows for multiple security checks, e.g. +allow watch history data to be collected if the user has opted into +usage data collection **and** they confirm via an acknowledgement +challenge UI. If one or more of the granting capabilities is not +supported or available, then the entire Grant Requirements block is not +valid for acquiring a user grant. + +A Grant Policy **MAY** have more than one `GrantRequirements` object, +which are ranked in order of preference. This allows for low-friction +but high-security methods to be preferred, e.g. allow in-app purchases +with a passive facial recognition scan, with higher-friction fallbacks +to ensure security on devices with less capabilities, e.g. allow in-app +purchases if the account owner performs a multi-factor authentication +flow. This list of `GrantRequirements` objects is stored in the Grant +Policy\'s `options` field. + +If a Grant Policy has more than one `GrantRequirements` option, then the +highest priority list with all its required capabilities supported and +available **MUST** be used. Note that the app which initiated the +original capability check **does not** need to have permission (or a +grant) to any of the granting capabilities that might be invoked. The +app is not using them, the Firebolt device is using them. + +#### 4.2.2. Grant Lifespan + +A Grant Policy **MUST** have a `lifespan`, which determines how long a +grant is valid for. + +> If the lifespan is set to `once`, then any grant resulting from this +> policy **MUST** be active for a single API transaction. +> +> If the lifespan is set to `forever`, then any grant resulting from +> this policy **MUST** be active until explicitly revoked. +> +> If the lifespan is set to `appActive`, then any grant resulting from +> this policy **MUST** be active until the app goes into one of the +> `inactive`, `suspended`, or `unloading` states. +> +> If the lifespan is set to `powerActive`, then any grant resulting from +> this policy **MUST** be active until the device power goes into any +> state other than `active`. +> +> If the lifespan is set to `seconds`, then any grant resulting from +> this policy **MUST** be active until `lifespanTtl` seconds have passed +> since the grant was issued. + +If a Grant Policy has the `lifespan` set to `seconds`, then the +`lifespanTtl` **MUST** be set to a non-zero, positive number of seconds. + +#### 4.2.3. Grant Privacy Setting + +A Grant Policy **MAY** have a `PrivacySetting` object, which +associates any Firebolt `boolean` property API with this Grant Policy. +The Privacy Setting points to the RPC name of the property\'s getter +method. + +The associated property API **MUST** have an `x-allow-value` extension +on the \"property\" tag set to true or false. + +If a Grant Policy has a Privacy Setting, then the `PrivacySetting` +**MUST** be evaluated **before** any `GrantRequirements`. + +> The Privacy Setting **MUST** have an `autoApplyPolicy` which **MUST** +> be one of the following values: +> +> `always` - Silently grant if the getter for the `property` returns the +> property\'s `x-allow-value`. Silently deny if the getter for the +> `property` returns `!x-allow-value`. +> +> `allowed` - Silently grant if the getter for the `property` returns +> the property\'s `x-allow-value`. +> +> `disallowed` - Silently deny if the getter for the `property` returns +> the property\'s `!x-allow-value`. +> +> `never` - Do not silently grant or deny based on this Grant Policy. +> +> If the Privacy Setting has `revokeGrantsOnDisallow` set to `true`, +> then **all active** user grants that resulted from this Grant Policy +> **MUST** be revoked if and when the property value specified by +> `property` ever changes to `!x-allow-value`. This enables +> distributors to decide whether changes to a Privacy Setting affects +> only new User Grants or existing, active User Grants as well. +> +> If the Privacy Setting has `updateProperty` set to `true`, then a +> successful user grant from this Grant Policy **MUST** also result in +> updating the property value specified by `property` to +> `x-allow-value`. +> +> If the Privacy Setting has `updateProperty` set to `true`, then a +> rejected **or expiring** user grant from this Grant Policy **MUST** +> also result in updating the property value specified by `property` to +> `!x-allow-value`. This is considered a \"disallow\" and +> **MUST** initiate evaluation of the `revokeGrantsOnDisallow` value. +> +> If the Grant Policy `scope` is set to `app` then the property +> specified by `property` **MUST** have a single context +> parameter of type `string` and the requesting appId **MUST** be passed +> to all get/set/subscribe calls fulfilling this section of requirements. + +### 4.3. Distributor Overrides + +Capability Grant Policies in the Firebolt Version Manifest are designed +to be overridden by Distributors to allow for different privacy use +cases across businesses and geographic regions. These overrides go in +the Device Manifest under the `grantPolicies` section of the +`capabilities` section. + +Distributor overrides **MUST** be for Grant Policies that are +`overridable`. + +See the [Firebolt Configuration Schemas +repository](https://github.com/rdkcentral/firebolt-configuration/) for +more information on the Firebolt Version Manifest and Device Manifest. + +### 4.4. Application Overrides + +Firebolt supports creating active grants via the App manifest, which +allows distributors and App publishers to decide that a particular app +will already be granted some capability. This is typically used for +first-party apps that come pre-installed but could be used for other +purposes. + +If an app has a role/capability listed in its App Manifest, then it is +considered to have an active grant for that capability if the manifest +has a valid signature. + +App Manifests overrides **MUST** be for Grant Policies that are +`overridable` and scoped to `app`. + +See the [Firebolt Configuration Schemas +repository](https://github.com/rdkcentral/firebolt-configuration/) for +more information on Firebolt App Manifests. + +## 5. Grant Execution + +When a Firebolt API is called the platform **MUST** first collate all +the device User Grant configurations that apply to every capability that +the API uses. This list **MUST** then be filtered to remove any User +Grants that have already been granted for the current capability for +this app and role. + +### 5.1. Capability Check + +First, all capabilities necessary to fulfill the API are collected. + +![](../../../../images/specifications/general/capabilities/user-grants/image4.png) + +### 5.2. Grant Policy Resolution + +Next, each capability is checked to see if there is a Firebolt, +Distributor, or App Grant Policy that applies, and that none of them are +invalid, e.g. an override that is now allowed. + +![Diagram Description automatically +generated](../../../../images/specifications/general/capabilities/user-grants/image5.png) + +### 5.3. Active Grant Check + +Then, each Grant Policy is evaluated to see if there is already an +active grant, or if it is linked to a Privacy Setting configured to skip +user-prompts. + +![Diagram Description automatically +generated](../../../../images/specifications/general/capabilities/user-grants/image6.png) + +### 5.4. Grant Prompt and Resolution + +Finally, each needed Granting Capability is invoked to present a UX to +the end user, and any linked Privacy Settings are updated as +appropriate. If all succeeds, then the API is invoked. + +![Diagram Description automatically +generated](../../../../images/specifications/general/capabilities/user-grants/image7.png) + +## 6. Schemas + +The following schemas give an overview of the schemas outlined by this +document. See the [Firebolt Configuration Schemas +repository](https://github.com/rdkcentral/firebolt-configuration/) for +the latest versions of these schemas. + +### 6.1. Grant Policy + +Grant Policies have the following properties. + +| Property | Type | Description | +|-------------|-----------------------|-------------------------------------| +| `options` | `GrantRequirements[]` | An array of GrantRequirements, any one of which could be used to Grant a requested capability/role to an App. The first one that is completely supported by the current device should be used. | +| `scope` | `string` | Whether the resulting user grant applies to all Apps or just the requesting App. | +| `lifespan` | `string` | How long the resulting user grant (or deny) will last. | +| `lifespanTtl` | `integer` | If lifespan is `'seconds'` this represents the number of seconds. | +| `privacySetting` | `PrivacySetting` | Links this Grant Policy to a privacy setting. | +| `overridable` | `boolean` | Whether a distributor may override this GrantPolicy with their own. | + +### 6.2. GrantRequirements + +A list of `GrantSteps` objects describing which capabilities and any +optional configuration needed to fulfill this grant policy. These +capabilities must be from the capability category `usergrant` which +denotes special capabilities that perform user grants, e.g. an +acknowledge challenge capability. + +| Property | Type | Description | +|-------------|-----------------|-------------------------------------------| +| `steps` | `GrantStep[]` | An array of GrantSteps, all of which need to be verified to fulfill this GrantPolicy. | + +### 6.3. GrantStep + +| Property | Type | Description | +|-------------|----------------|-------------------------------------------| +| `capability` | `string` | The Granting Capability to use for this step in the grant flow. | +| `configuration ` | `object` | The configuration for the Granting Capability, which is specific to each type. | + +### 6.4. GrantKey + +A CapabilityKey with the \ set to `usergrant`: + +`/\^xrn:firebolt:capability:usergrant:\[a-zA-Z0-9\\-\]{1,32}\$/` + +#### 6.4.1. GrantScope + +A `string` enumeration. + +| Value | Description | +|----------------|--------------------------------------------------------| +| `device` | The resulting user grant will apply to all Apps on the device. | +| `app` | The resulting user grant will apply to the requesting App only. | + +#### 6.4.2. GrantLifespan + +A `string` enumeration. + +The resulting user grant will only be valid: + +| Value | Description | +|----------------|--------------------------------------------------------| +| `once` | for a single usage, e.g. one API call. | +| `forever` | until the end of time. | +| `appActive` | until the app enters a non-Active Lifecycle state: inactive, suspended | +| `powerActive` | until the device leaves the Active power state. | +| `seconds` | until \ seconds have passed. | + +#### 6.4.3. PrivacySetting + +| Value | | Description | +|--------------------|----------|------------------------------------------| +| `property` | string | The fully qualified RPC method name of the associated property setter, e.g. `Privacy.limitAdTracking` | +| `autoApplyPolicy` | string | Set the auto grant policy to `always`, `allowed`, `disallowed`, `never` | +| `revokeGrantsOnDisallow` | boolean | Any grants made from this policy will be revoked if/when the property is ever set to the deny value | +| `updateProperty` | boolean | Whether to update the property value to match the grant. | + +## 7. APIs + +APIs for User Grants are covered in the [Capabilities Requirements +document](../capabilities). + +### 7.1. Manage SDK APIs + +These APIs are intended for trusted apps to expose a UI for end-users to +manage the grants given to the device and various apps. Permission for +these APIs should only be given to a trusted settings app performing +this function. + +#### 7.1.1. GrantInfo Object + +Object describing a persisted active or denied Grant. + +```typescript +type GrantInfo = { + appId: string, + state: "active" | "denied", + capability: string, + role: "use" | "manage" | "provide" + lifespan: "once" | "forever" | "appActive" | " powerActive" | "seconds" + expires: integer +} +``` + +#### 7.1.2. App Method + +Returns all active and denied user grants for the given App, **NOT** +including those granted to all apps via the device. + +```typescript +UserGrants.app(appId: string): GrantInfo[] +``` + +#### 7.1.3. Device Method + +Returns all active and denied user grants for the Device. + +```typescript +UserGrants.device(): GrantInfo[] +``` + +#### 7.1.4. Capability Method + +Returns all active and denied user grants for the given Capability. + +```typescript +UserGrants.capability(capability: string): GrantInfo [] +``` + +#### 7.1.5. Grant Method + +Grants a given Capability, to a specific app if appropriate. Calling +this results in a persisted Active Grant that lasts for the duration of +the Grant Policy lifespan. + + +```typescript +UserGrants.grant(role: string, capability: string, appId?:string): void +``` + +#### 7.1.6. Deny Method + +Denies a given Capability, to a specific app if appropriate. Calling +this results in a persisted Denied Grant that lasts for the duration of +the Grant Policy lifespan. + +```typescript +UserGrants.deny(role: string, capability: string, appId?: string):void +``` + +#### 7.1.7. Clear Method + +Clears any persisted active or denied grant for a Capability, for a +specific app if appropriate. This results in an Unset Grant. This method +may take a wildcard value of `'*'` for role, capability, or appId, in +order to clear grant state in bulk. + +```typescript +UserGrants.clear(role: string, capability: string, appId?:string): void +``` diff --git a/requirements/pr-release-1-3-0/specifications/general/context-parameters/index.md b/requirements/pr-release-1-3-0/specifications/general/context-parameters/index.md new file mode 100644 index 00000000..90c12e77 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/general/context-parameters/index.md @@ -0,0 +1,311 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Context Parameters +category: requirements +type: specification +--- +# Context Parameters +Document Status: Working Draft + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Jeremy LaCivita | Comcast | +| Yuri Pasquali | Sky | + +## 1. Overview + +**TODO**: This doc is old and need to be refreshed + +Context Parameters are parameters on an RPC method that provide context +for the call via a set of primitive types (string, number, integer, +boolean). This allows for sharing the context parameters across property +getters, setters, and subscribers, as well as filtering which events to +listen for by context. + +An example of a property method with context could be: + +```javascript +// get a context-driven property (context: appId=hulu) +const huluShare = await Privacy.shareWatchHistory('hulu') +``` + +```javascript +// set a context-driven property (context: appId=hulu) +Privacy.shareWatchHistory('hulu', false) +``` + +In the example above, 'hulu' is the context parameter for both the +shareWatchHistory getter and setter. + +Context parameters can also be applied to property subscribers, as well +as other, non-property events: + +```javascript +// subscribe to a context-driven property +Privacy.shareWatchHistory('hulu', (value) => { + console.log('hulu value changed to: ' + value) +}) + +Privacy.listen('shareWatchHistoryChanged', 'hulu', (value) => { + console.log('hulu value changed to: ' + value) +}) +``` + +For subscribers and events, the context parameters may be omitted, in +which case, all events will be dispatched to the listener: + +```javascript +// subscribe to a context-driven property w/out any context (get all of them) + +Privacy.shareWatchHistory((appId, value) => { + console.log(`App '${appId}' value changed to ${value}`) +}) + +Privacy.listen('shareWatchHistoryChanged', (appId, value) => { + console.log(`App '${appId}' value changed to: ${value}`) +}) +``` + +Context Parameters **MUST** be of a primitive type, to avoid complex +object-tree filtering. + +This document describes an OpenRPC pattern and JavaScript code +generation for a Firebolt method template that uses Context Parameters. + +## 2. Table of Contesnts +- [1. Overview](#1-overview) +- [2. Table of Contesnts](#2-table-of-contesnts) +- [3. Context Parameters Use Cases](#3-context-parameters-use-cases) +- [4. Context Parameters API](#4-context-parameters-api) + - [4.1. JSON-RPC API](#41-json-rpc-api) + - [4.1.1. Setter RPC generation](#411-setter-rpc-generation) + - [4.1.2. onChanged RPC generation](#412-onchanged-rpc-generation) + - [4.1.3. Temporal Set onAvailable / Unavailable RPC generation](#413-temporal-set-onavailable--unavailable-rpc-generation) + - [4.1.4. Event RPC Decoration](#414-event-rpc-decoration) + - [4.2. JavaScript API](#42-javascript-api) + - [4.2.1. Event Listener Signatures](#421-event-listener-signatures) + +## 3. Context Parameters Use Cases + +How each parameter affects it's corresponding API is out of scope for +this document. See each API spec for details on what each context +parameter does. + +Setting a context parameter to null is still setting it to a value. If a +context parameter is passed to the SDK with either a value of null or +undefined, then it **MUST** be explicitly set in the RPC request to the +value null. This is to avoid additional method signature permutations +being required for the SDK. + +An effort should be made to sort the context parameters in order of most +usefulness, since not all languages support undefined. + +## 4. Context Parameters API + +The section describes the RPC and JavaScript APIs. + +### 4.1. JSON-RPC API + +Simple getters and event listeners don't need any parameters. + +If a method is tagged as either a property (any kind) or an event, then +**all** the parameters in the RPC definition **MUST** be context +parameters. + +To facilitate this, the listen parameter that all events currently have +will be removed from the source module and inserted into the generated +RPC by the firebolt-openrpc tooling. + +If any Context Parameters have a type other than: + +- `string` +- `boolean` +- `number` +- `integer` + +Then the RPC method **MUST NOT** pass validation. This is to ensure that +implementing context parameters is not overly complicated. + +#### 4.1.1. Setter RPC generation + +When generating the setter for a property method, all the Context +Parameters **MUST** be copied to the setter. The context parameters +**MUST** be before the value parameter, which itself **MUST** be last. + +#### 4.1.2. onChanged RPC generation + +When generating the onChanged notification for a property +method, all the Context Parameters **MUST** be copied to the event +parameters. The context parameters **MUST** be before the listen +parameter, which itself **MUST** be last. + +#### 4.1.3. Temporal Set onAvailable / Unavailable RPC generation + +Generated Temporal Set events will treat the entire parameter list from +the original temporal-set method as Context Parameters and copy them to +the event parameters. The context parameters **MUST** be before the +listen parameter, which itself **MUST** be last. + +#### 4.1.4. Event RPC Decoration + +All RPC methods tagged as event **MUST** have the listen parameter, of +type boolean, automatically added when generating the final RPC. This +parameter will be added at the end of the parameters list. + +All RPC methods tagged as event that have context parameters **MUST** +have the result schema wrapped in an object. The original result schema +**MUST** be moved to a property called data. Each of the context +parameters **MUST** be copied to a property called context. + +So the following RPC event: + +```json +{ + "name": "onContextualEvent", + "tags": [ + { + "name": "event" + } + ], + "params": [ + { + "name": "a", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "b", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "c", + "required": true, + "schema": { + "type": "number" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "properties": { + "foo": { + "type": "boolean" + } + } + } + } +} +``` + +Would have its result transformed to: + +```json +{ + "name": "result", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "foo": { + "type": "boolean" + } + } + }, + "context": { + "type": "object", + "properties": { + "a": { + "type": "boolean" + }, + "b": { + "type": "string" + }, + "c": { + "type": "number" + } + }, + "required": [ + "a", "b", "c" + ] + } + } + } +} +``` + +### 4.2. JavaScript API + +TBD + +#### 4.2.1. Event Listener Signatures + +If any of the context parameters are optional, then a callback signature +must be generated for each left-to-right combination of the parameters. + +For example, the method: + +```json +{ + "name": "onFoo", + "tags": [ + { + "name": "event" + } + ], + "params": [ + { + "name": "a", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "b", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "c", + "required": false, + "schema": { + "type": "number" + } + } + ] +} +``` + +Would result in the following method signatures: + +```typescript +listen(event: 'foo', a: boolean, callback: (b: string, c: number, data: any) => {}) + +listen(event: 'foo', a: boolean, b: string, callback: (c: number, data: any) => {}) + +listen(event: 'foo', a: boolean, b: string, c: number, callback: (data: any) => {}) +``` + +Which allows parameters to be omitted, from right-to-left, and included +as part of the result, instead. + +When invoking the callback, the SDK **MUST** pass the data portion of +the result to the data parameter of the callback, and each context +property to the corresponding callback parameter. + +This pattern also applies to property subscribers. diff --git a/requirements/pr-release-1-3-0/specifications/hardware/hdmi-input/index.md b/requirements/pr-release-1-3-0/specifications/hardware/hdmi-input/index.md new file mode 100644 index 00000000..d9a7db92 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/hardware/hdmi-input/index.md @@ -0,0 +1,321 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: HDMIInput +category: requirements +type: specification +--- +# HDMIInput + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| ------------------- | -------------- | +| Jeremy LaCivita | Comcast | +| Lucien Kennedy-Lamb | Sky | + +## 1. Overview +This document describes the requirements for managing HDMI inputs on a Firebolt device. hese APIs are for managing the HMDI inputs of a device. All TVs have HDMI inputs, whereas only certain STBs have HDMI inputs. + +This document is written using the [IETF Best Common Practice 14](https://www.rfc-editor.org/rfc/rfc2119.txt), specifically: + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. All Ports](#3-all-ports) +- [4. Single Port](#4-single-port) +- [5. Port Connection Notification](#5-port-connection-notification) +- [6. Port Signal Notification](#6-port-signal-notification) +- [7. EDID Version](#7-edid-version) +- [8. Low Latency](#8-low-latency) + - [8.1. Low Latency Mode](#81-low-latency-mode) + - [8.1.1. Low Latency Mode Notification](#811-low-latency-mode-notification) + - [8.2. Auto Low Latency Mode Signalled](#82-auto-low-latency-mode-signalled) + - [8.3. Port Auto Low Latency Mode Capable](#83-port-auto-low-latency-mode-capable) + - [8.3.1. Port Auto Low Latency Mode Capable Changed Notification](#831-port-auto-low-latency-mode-capable-changed-notification) +- [9. HDMI Port managing active source](#9-hdmi-port-managing-active-source) +## 3. All Ports +The `HDMIInput` module **MUST** have a `ports` method that lists all physical HDMI input ports on the device. + +The `ports` API **MUST** return an array of `HDMIInputPort` objects. + +An example response: + +```json +[ + { + "port": "HDMI1", + "connected": true, + "signal": "unknown", + "arcCapable": true, + "arcConnected": true, + "autoLowLatencyModeCapable": true, + "autoLowLatencyModeSignalled": true, + "edidVersion": "2.0" + } +] +``` + +The `HDMIInputPort` object **MUST** have a `port` string property, which is the unique ID of that port. This is usually formatted and printed on the device near the port. + +The `port` property **MUST** match the pattern: + + ```regexp + /^HDMI[0-9]+$/ + ``` + +The `HDMIInputPort` object **MUST** have a `connected` boolean property, which is true if that port has a device connected, false otherwise. + +The `HDMIInputPort` object **MUST** have a `signal` string property, which denotes the signal validity. + +The `signal` property **MUST** be one of the following values: + +- `"unknown"` - the HDMI input port is not switched, so the signal state is unknown. +- `"none"` - no signal from the HDMI input device. +- `"stable"` - the signal is stable and should provide good audio and viddeo. +- `"unstable"` - the signal is unstable and could exhibit broken audio and video. +- `"unsupported"` - the signal is not at a supported speed/resolution. + +The `HDMIInputPort` object **MUST** have an `arcCapable` boolean property, which is true if this HDMI port supports ARC and/or eARC device connections. + +The `HDMIInputPort` object **MUST** have an `arcConnected` boolean property, which is true if the attached device supports ARC and/or eARC, regardless of whether the input port supports ARC. + +The `HDMIInputPort` object **MUST** have an `edidVersion` string property which is the selected E-EDID version "1.4" or "2.0" for the port. + +The `edidVersion` property **MUST** be one of the following values: + +- `"1.4"` +- `"2.0"` +- `"unknown"` + +If the `edidVersion` is `"2.0"` then the `HDMIInputPort` object: + +> **MUST** have an `autoLowLatencyModeCapable` boolean property, which is true if the device has ALLM support in the EDID on this HDMI input, false otherwise. +> +> **MUST** have an `autoLowLatencyModelSignalled` boolean property, which is true if the port is receiving an ALLM signal from a downstream source device, and false otherwise. + +If the `edidVersion` is `"1.4"` or `"unknown"` then the `HDMIInputPort` object: + + > **MUST** have the `autoLowLatencyModeCapable` boolean property set to `false`. + > + > **MUST** have the `autoLowLatencyModelSignaled` boolean property set to `false` + +The `"unknown"` value of the `edidVersion` property **SHOULD** be reserved for edge cases, such as a test device with a newer version of HDMI ports than the device software supports. + +The `ports` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +## 4. Single Port +The `HDMIInput` module **MUST** have a `port` method that returns info on a single HDMI port. + +The `port` API **MUST** return an `HDMIInputPort` object that corresponds to the provided `portId` parameter. + +```javascript +HDMIInput.port('HDMI1') +``` + +The `port` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +## 5. Port Connection Notification +The `HDMIInput` module **MUST** have an `onConnectionChanged` notification that fires when any HDMI port has a connection physically engaged or disengaged. + +This notification **MUST** have an object payload. + +The object payload **MUST** have a `port` string property that denotes which input port has detected a connection change. + +The `port` property **MUST** match the pattern: + + ```regexp + /^HDMI[0-9]+$/ + ``` + +The object payload **MUST** have a `connected` boolean property that denotes the updated value of the connection state. + +Example payload: + +```json + { + "port": "HDMI1", + "contected": true + } +``` + +The `onConnectionChanged` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + + +## 6. Port Signal Notification +The `HDMIInput` module **MUST** have an `onSignalChanged` notification that fires when any HDMI port signal changes status. + +This notification **MUST** have an object payload. + +The object payload **MUST** have a `port` string property that denotes which input port has detected a change to the signal validity. + +The `port` property **MUST** match the pattern: + + ```regexp + /^HDMI[0-9]+$/ + ``` + +The object payload **MUST** have a `signal` string property that denotes the updated value of the input device signal. + +The `signal` property **MUST** be one of the following values: + +- `"unknown"` - the HDMI input port is not switched, so the signal state is unknown. +- `"none"` - no signal from the HDMI input device. +- `"stable"` - the signal is stable and should provide good audio and viddeo. +- `"unstable"` - the signal is unstable and could exhibit broken audio and video. +- `"unsupported"` - the signal is not at a supported speed/resolution. + +Example payload: + +```json + { + "port": "HDMI1", + "signal": "stable" + } +``` + +The `onSignalChanged` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +## 7. EDID Version +Extended Display Identification Data enables HDMI devices to communicate which set of features are supported. + +The `HDMIInput` module **MUST** have a boolean property named `edidVersion`, with a getter, setter, and notification subscriber. + +The `edidVersion` property **MUST** have a `port` parameter to specify which port. + +The `edidVersion` property requires access to the `use` role of the `xrn:firebolt:capability:inputs:hdmi` capability. + +The `edidVersion` property **MUST** have a notification for when a port's edid value changes. + +The `edidVersion` property **MUST** have a setter that requires access to the `manage` role. + +Setting this property changes the specified port's EDID version, that is broadcast to other devices. + +Low latency mode switches the device to shorten the overall processing time of HDMI A/V signals. +Depending on the platform some video processing features may be disabled such as MPEG noise reduction. + +## 8. Low Latency +Low Latency refers to a set of functionally that combines to provide manual or automatic activation of HDMI Low Latency Mode. + +Low latency mode switches the device to shorten the overall processing time of HDMI A/V signals. + +Depending on the platform some video processing features may be disabled such as MPEG noise reduction. + +### 8.1. Low Latency Mode +The `HDMIInput` module **MUST** have a boolean property named `lowLatencyMode`, with a getter, setter, and notification subscriber. + +Enabling this property turns on the underlying low latency mode feature for the Firebolt device, which affects all HDMI ports, +but not other media sources. + +Low latency mode switches the device to shorten the overall processing time of HDMI A/V signals. +Depending on the platform some video processing features may be disabled such as MPEG noise reduction. + +The `lowLatencyMode` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +The `lowLatencyMode` API **MUST** have a corresponding setter that requires `manage` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + + +#### 8.1.1. Low Latency Mode Notification +Whenever the underlying HDMI implementation executes an LLM change (either on or off), this notification **MUST** fire: + +`HDMIInput.onLowLatencyModeChanged` + +The `onLowLatencyModeChanged` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +### 8.2. Auto Low Latency Mode Signalled +The `HDMIInput` module **MUST** have an `onAutoLowLatencyModeSignalChanged` notification that fires when the ALLM signal from the source connected to a port changes. + +This notification **MUST** have an object payload. + +The object payload **MUST** have a `port` string property that denotes which input port has detected a change to the ALLM signal. + +The `port` property **MUST** match the pattern: + + ```regexp + /^HDMI[0-9]+$/ + ``` + +The object payload **MUST** have an `autoLowLatencyMode` boolean property that denotes the updated value, true or false, of the ALLM setting. + +Example payload: + +```json + { + "port": "HDMI1", + "autoLowLatencyModeSignalled": true + } +``` + +The `onAutoLowLatencyModeSignalChanged` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +### 8.3. Port Auto Low Latency Mode Capable +The `HDMIInput` module **MUST** have a boolean property `autoLowLatencyModeCapable` which reflects the HDMI port setting for advertising ALLM support in its E-EDID. + +The `autoLowLatencyModeCapable` property takes a string context parameter, `port` to identify the HDMI port. + +The `port` parameter must match the pattern: + +```regexp + /^HDMI[0-9]+$/ + ``` + +The `autoLowLatencyModeCapable` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +Changing this property turns on/off the underlying auto low latency mode advertisement in any HDMI port E-EDID of version >= v2.0. + +To change the property: + +```javascript +function autoLowLatencyModeCapable(port: string, autoLowLatencyMode: boolean) +``` + +The `autoLowLatencyModeCapable` setter API requires `manage` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +#### 8.3.1. Port Auto Low Latency Mode Capable Changed Notification +Whenever the underlying HDMI implementation executes an ALLM support change (either on or off), this notification must fire: + +`HDMIInput.onAutoLowLatencyModeCapableChanged` + +To listen for port ALLM notifications: + +```javascript +HDMIInput.autoLowLatencyModeCapableChanged((data) => { + console.log('Port ' + data.port + ' ALLM changed to ' + data.autoLowLatencyModeCapable) +}) +``` + +`autoLowLatencyModeCapable` - whether or not ALLM is advertised as supported in the E-EDID for the port. + +`port` - the HDMI port that had an E-EDID ALLM advertisement change. + +The `onAutoLowLatencyModeCapableChanged` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + + +## 9. HDMI Port managing active source + +The `HDMIInput` module **MUST** have `open` and `close` method(s) that manages the active source of on a single HDMI port. + +The `HDMIInput.open` **MUST** include a `portId` field complying to the schema of `HDMIPortId` + +The `HdmiInput.open` and `HDMIInput.close` API(s) **MUST** return an `empty` object for a successful operation, if there was an error the response **Must** contain the details of the error. + +The `HdmiInput.open` and `HDMIInput.close` API requires `manage` access to the `xrn:firebolt:capability:inputs:hdmi` capability. + +Below is an example for opening a given HDMIPort. +```javascript +HDMIInput.open('HDMI1').then(() => { + console.log("Successfully opened HDMI1 port"); +}) +``` + +Below is an example for closing last active source. +```javascript +HDMIInput.close().then(() => { + console.log("Successfully closed HDMI1 port"); +}) +``` \ No newline at end of file diff --git a/requirements/pr-release-1-3-0/specifications/intents/command-and-control/index.md b/requirements/pr-release-1-3-0/specifications/intents/command-and-control/index.md new file mode 100644 index 00000000..671b8452 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/intents/command-and-control/index.md @@ -0,0 +1,992 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Command and Control Intents +category: requirements +type: specification +--- +# Command and Control Intents + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| ---------------- | ------------ | +| Saras Arveti | Comcast | +| Eileen Bengston | Comcast | +| Michael Driscoll | Comcast | +| Simon Grist | Sky | +| Jeremy LaCivita | Comcast | + +## 1. Overview + +This document outlines several basic Intents for controlling a Firebolt +compliant device. + +### 1.1. Message.type + +Message.type should be a useful grouping to bucket related intents +together for easier forwarding to appropriate components. + +## 2. Table of Contents +- [1. Overview](#1-overview) + - [1.1. Message.type](#11-messagetype) +- [2. Table of Contents](#2-table-of-contents) +- [3. Control Intents](#3-control-intents) + - [3.1. Power Intent](#31-power-intent) + - [3.2. Volume Intents](#32-volume-intents) + - [3.2.1. Volume Intent](#321-volume-intent) + - [3.2.2. Mute Intent](#322-mute-intent) + - [3.3. Channel Intent](#33-channel-intent) + - [3.4. Media Control Intents](#34-media-control-intents) + - [3.4.1. Pause, Play, Replay, and Stop Intents](#341-pause-play-replay-and-stop-intents) + - [3.4.2. Seek Intent](#342-seek-intent) + - [3.4.3. Fast-forward and Rewind Intents](#343-fast-forward-and-rewind-intents) + - [3.5. Accessibility Intents](#35-accessibility-intents) + - [3.5.1. Closed Captions Intent](#351-closed-captions-intent) + - [3.5.2. Voice Guidance Intent](#352-voice-guidance-intent) + - [3.5.3. Audio Descritions Intent](#353-audio-descritions-intent) + - [3.5.4. High Contrast Intent](#354-high-contrast-intent) + - [3.5.5. Screen Magnification Intent](#355-screen-magnification-intent) + - [3.6. Interaction Intents](#36-interaction-intents) + - [3.6.1. Focus Intent](#361-focus-intent) + - [3.6.2. Select Intent](#362-select-intent) + - [3.6.3. Scroll Intent](#363-scroll-intent) + - [3.6.4. Back Intent](#364-back-intent) + - [3.6.5. Exit Intent](#365-exit-intent) +- [4. Launch Intents](#4-launch-intents) + - [4.1. Content Discovery Launch Intents](#41-content-discovery-launch-intents) + - [4.2. Device Settings Launch Intent](#42-device-settings-launch-intent) + +## 3. Control Intents + +Control intents are for user intentions that will be needed regardless +of whether there are any apps installed. + +For example, these intents are all useful even if only using your TV +with a single HDMI input, and not for apps. + +### 3.1. Power Intent + +This intent allows a user to turn the device on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:power", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "power", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:power", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "power", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +Additionally, this intent allows a user to set a timer for turning off +the power, aka a "sleep timer." + +This is handled by the optional field delay, which is measured in whole +seconds: + +```json +{ + "type": "xrn:firebolt:intent:platform:power", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "power", + "data": { + "value": true | false, + "delay": 3600 + }, + "context": { + "source": "voice" + } + } +} +``` + +To cancel a sleep timer, send a new intent without a delay. + +While it may not be implemented by all platforms, this could also be +used to turn on the TV with a timer. + +### 3.2. Volume Intents + +Volume Intents control the audio level of the device. + +#### 3.2.1. Volume Intent + +This intent allows setting the volume to an absolute or relative value. + +```json +{ + "type": "xrn:firebolt:intent:platform:volume", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "volume", + "data": { + "value": 70 + }, + "context": { + "source": "VOICE" + } + } +} + +``` + +The value is an integer value from 0 to 100. + +This intent also supports relative volume changes, by providing the +optional relative field: + +```json +{ + "type": "xrn:firebolt:intent:platform:volume", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "volume", + "data": { + "value": -10, + "relative": true + }, + "context": { + "source": "VOICE" + } + } +} + +``` + +The value is a positive or negative integer that is relative to a scale +of 0-100. + +Firebolt will not support complicated relative changes, e.g. "Set the +volume to 50% *of what it currently is\...*" + +Firebolt uses a size of 0-100 for this intent. It\'s up to each voice +integration if it wants to convert "5" to "50%" before generating +the intent, but convenience transformations like this are recommended. + +Whether or not a TV uses logarithmic or linear scale is irrelevant to +the VolumeIntent schema. + +#### 3.2.2. Mute Intent + +This intent allows the user to mute or unmute the device. + +```json +{ + "type": "xrn:firebolt:intent:platform:volume", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "mute", + "data": { + "value": true | false + }, + "context": { + "source": "VOICE" + } + } +} +``` + +### 3.3. Channel Intent + +For tuning to a specific channel, either OTA or in-app, see [Tune +Intents](../tune). + +The intents in this section are for relative next/previous channel user +intentions and are a separate type of Intent. This allows each app to +decide what "channel" means. For example, an App might simply take you +to the next section/genre if it doesn\'t have linear streams in it\'s +catalog. + +The goal of the action property to is tell the client how to parse the +Intent, so overloading the tune intent with a different structure is not +desirable. + +Also, +"tune" inherently means to zero in on a specific part of a +scale, e.g. tuning a harp. + +For relative "channel surfing" we\'ll use the more content-centric +action "channel" which will also align with non-linear apps that want +to leverage the channel up/down intent. + +The Channel Intent allows a user to scan "channels" in an app (or +actual OTA channels if not in an app). + +Users can scan to the next or previous channel. For scanning to the most +recent, i.e. "Last" channel, see [Interaction +Intent +](#interaction-intents). + +```json +{ + "type": "xrn:firebolt:intent:platform:channel", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "channel", + "data": { + "value": "next" | "previous" + }, + "context": { + "source": "voice" + } + } +} + +``` + +The value property MUST always be "next" or "previous". These are +chosen over up/down since not all use cases will be numeric. + +Since this intent is always relative to the current app, there is no +need for an appId. + +If this Intent needs to be passed to the current app, it can be passed +as-is, via the Discovery. onNavigateTo API, or a simulated RCU press of +one of the channel up/down buttons. + +### 3.4. Media Control Intents + +#### 3.4.1. Pause, Play, Replay, and Stop Intents + +These intents allow the user to pause and resume playback of the current +Media: + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "pause" | "play" | "replay" | "stop", + "context": { + "source": "voice" + } + } +} +``` + +If the action is pause, then the currently playing media should be +paused, with the frames on-screen and the video decoder ready to resume. + +If the action is play, and the current media is paused, then the +currently paused media should resume. + +If the action is play, and there is something playbable selected, then +playback of the selected asset should be initiated. + +If the action is replay, then the currently paused or playing media should restart +from the beginning. This should work even if the decoder has finished, +and its resources have been released. + +If the action is stop, then the currently playing media should be +stopped, frames removed from the screen, and any decoder resources +should be released. + +#### 3.4.2. Seek Intent + +The seek intent allows users to jump to a relative or absolute position +in the currently playing media. + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "seek", + "data": { + "seconds": 3600 + }, + "context": { + "source": "voice" + } + } +} +``` + +The seconds value is a positive integer representing where to seek. + +This intent also supports relative seeking, by providing the optional +relative field: + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "seek", + "data": { + "seconds": -30, + "relative": true + }, + "context": { + "source": "voice" + } + } +} +``` + +For relative seeking, the seconds value may be a positive or negative value. + +If a relative seek intent with a seconds value of `0` is received, the platform **SHOULD** ignore it, rather than rebuffering at the current position. + +#### 3.4.3. Fast-forward and Rewind Intents + +These intents allow users to fast-forward or rewind: + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "fast-forward" | "rewind", + "data": { + "speed": 2.5 + }, + "context": { + "source": "voice" + } + } +} +``` + +Speed is a float in the range of 0 (non-includsive) to 10 (inclusive), +with values between 0 and 1 denoting slow motion. + +It is a device-level decision how to implement different speeds, however +actual fast playback (with audio) should be used where possible and +reasonable, e.g. a speed of 1.5 should actually be playing the video w/ +sync\'d audio, while a speed of 10 will likely be using iframes and not +have audio. For rewind it is not important, and likely undesirable, to +provide audio. + +If speed is not provided then the device should cycle through a range +of speeds defined by the device. This range of speeds **COULD** include +the value `1` so that users can get back to normal speed if desired. + +### 3.5. Accessibility Intents + +These intents manipulate accessibility features on the device. + +#### 3.5.1. Closed Captions Intent + +This intent allows a user to turn closed captions on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "closed-captions", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "closed-captions", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.2. Voice Guidance Intent + +This intent allows a user to turn voice guidance on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +The intent **MAY** specify `speed` `number` property that specifies a speed from 0 to 10: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "speed": 2 + }, + "context": { + "source": "voice" + } + } +} +``` + +When providing a `speed` this intent **MAY** also set the `relative` property to `true` denoting an increase or decrease in speed. The speed value may be between -5 and 5 inclusive: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "speed": -1, + "relative": true + }, + "context": { + "source": "voice" + } + } +} +``` + +Finally, the intent **MAY** specify a `verbosity` property, which **MUST** use one of the following values is provided: + +| Value | Description | +|--------|-------------| +| `low` | to select shorter response, less context, and less detail; can use abbreviations and can selectively skip words | +| `high` | to select longer response, more context, and more detail; full comprehensive readout and explicit reflection of what is seen on screen | + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "value": true, + "verbosity": "low" + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.3. Audio Descritions Intent + +This intent allows a user to turn audio descriptions of content on or off. + + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "audio-descriptions", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +This intent may specify a language: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "audio-descriptions", + "data": { + "value": true, + "language": "eng" + }, + "context": { + "source": "voice" + } + } +} +``` + +The `language` must be a three character ISO 639 1/2 code, e.g. `eng`. + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "audio-descriptions", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.4. High Contrast Intent + +This intent allows a user to turn high contrast mode on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "high-contrast", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "high-contrast", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.5. Screen Magnification Intent + +This intent allows a user to turn screen magnification on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "screen-magnification", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "screen-magnification", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +Finally, this intent may specify a magnification scale as a number: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "screen-magnification", + "data": { + "scale": 2.5 + }, + "context": { + "source": "voice" + } + } +} +``` + +Setting the scale to `1` turns off magnification. Setting the scale to a value greater than 1 turns on magnification. + +Even if a Firebolt platform does not support specifying the numeric scale, it **MUST** turn magnifacation on and off based on them. + +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 + +Interaction Intents allow for voice (or other upstream intent service) +to control an on-screen UI without need for a keyboard or remote. + +#### 3.6.1. Focus Intent + +The Focus Intent allows users to move the focus / cursor +up/down/left/right: + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "focus", + "data": { + "direction": "up" | "down" | "left" | "right" + }, + "context": { + "source": "voice" + } + } +} + +``` + +Note that this does not give focus to a particular app, which is handled +by the "launch" action. + +These Intents will generate appropriate HTML browser keyCode events to +facilitate up/down/left/right key presses. + +#### 3.6.2. Select Intent + +The select intent allows users to tell an app select, e.g., +"click" on +whatever is focused. This is a platform-level intent that effectively +sends the "Ok" or "Select" key to the current app. + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "select", + "context": { + "source": "voice" + } + } +} +``` + +#### 3.6.3. Scroll Intent + +The Scroll Intent allows users to move the current view port +up/down/left/right: + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "scroll", + "data": { + "direction": "up" | "down" | "left" | "right", + "unit": "page" | "line" | "percent" + }, + "context": { + "source": "voice" + } + } +} +``` + +Both `direction` and `unit` are required. + +These Intents will generate appropriate browser / DOM scrolling +operations that don\'t require custom APIs. + +#### 3.6.4. Back Intent + +The back intent allows users to tell an app go to "back" like a +browser. This is a platform-level intent and will initiate a browser +back flow for web apps. For native apps, this will be converted to an +app Navigation Intent by the client and surfaced through the navigateTo +API. + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "back", + "context": { + "source": "voice" + } + } +} +``` + +#### 3.6.5. Exit Intent + +The exit intent allows users to tell an app close. This is a +platform-level intent and will simply move the current app into the +inactive state. + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "exit", + "context": { + "source": "voice" + } + } +} +``` + +## 4. Launch Intents + +If a Firebolt app wants to launch the main or settings experience of the device, it can use one of the following abstract appIds with the `launch` intent. + +### 4.1. Content Discovery Launch Intents + +The following section IDs will be used, with the Firebolt application +type as the target App ID: + +`xrn:firebolt:application-type:main` + +### 4.2. Device Settings Launch Intent + +To launch the settings UI, a Launch Intent will be used, with the +Firebolt application type: + +`xrn:firebolt:application-type:settings` diff --git a/requirements/pr-release-1-3-0/specifications/intents/index.md b/requirements/pr-release-1-3-0/specifications/intents/index.md new file mode 100644 index 00000000..500b943a --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/intents/index.md @@ -0,0 +1,128 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Intents +category: requirements +type: specification +--- +# Intents + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../governance) for more info. + +| Contributor | Organization | +| --------------- | ------------ | +| Jeremy LaCivita | Comcast | +| Simon Grist | Sky | + + +## 1. Overview +Offen times an end-user has a specific intention that needs to be communicated +to an app by the platform. A common reason for this is that a platform may have +a voice interface, and an end-user has given an instruction that needs to be +carried out by a specific app, e.g. a deep link to content w/in that app. + +Other use cases include editorially placed calls to action in the main user +experience, developer tools, and app-to-app communication brokered by Firebolt +intents. + +All intents have an `action`, and `context` property, and many intents have an +additional `data` property. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Intent Action](#3-intent-action) +- [4. Intent Context](#4-intent-context) +- [5. Intent Data](#5-intent-data) +- [6. Intent Message](#6-intent-message) + - [6.1. App Intent Message](#61-app-intent-message) + - [6.2. Platform Intent Message](#62-platform-intent-message) + - [6.3. Intent Message Type](#63-intent-message-type) + - [6.4. Intent Message Metadata](#64-intent-message-metadata) +- [7. Intent Types](#7-intent-types) + +## 3. Intent Action +The intent `action` denotes what type of intent it is. + +All intents **MUST** have an `action` `string` property denoting the type of intent. + +See the various [Intent Types](#intent-types) below for values. + +## 4. Intent Context + +The intent `context` provides information on where the intent orginated from. +All intents **MUST** have a `context` property, which is an object. + +The `context` object **MUST** have a `source` string property with one of the +following values: + + | Value | Description | + |-------------|-------------------------------------------------------------------------------------| + | `voice` | This intent originated from a voice service | + | `editorial` | This intent originated from an editorial CMS | + | `api` | This intent originated from some other API on the platform, e.g. `Discovery.launch` | + +The `context` object **MAY** have a `campaign` string property, which can have +any string value. This property denotes an editorial campaign. + +## 5. Intent Data +If an intent has any additional data, it **MUST** be in the `data` property. + +## 6. Intent Message +When an intent is sent to a Firebolt device from some other system, e.g. a cloud voice service, it **MUST** be wrapped in an `IntentMessage` object so that it can be properly routed after transport. + +An intent message **MUST** have an `intent` object property that is the intent being passed. + +An example intent message: + +```json +{ + "type": "xrn:firebolt:intent:app:launch", + "appId": "Netflix", + "intent": { + "action": "launch", + "context": { + "source": "voice" + } + }, + "metadata": { + "foo": "bar" + } +} +``` + +### 6.1. App Intent Message +If an intent is targeting a specific app, then the intent message **MUST** have an `appId` string property with the appId of the targeted app. + +### 6.2. Platform Intent Message +If an intent messagage does not have an `appId` property, then it **MUST** be targeting the device itself, e.g. a `power` intent to turn off the device. + +### 6.3. Intent Message Type +An intent message **MUST** have a `type` string property for categorizing the intent. + +The type property **MUST** match the regular expression: + +```regex +^xrn:firebolt:intent:(app|platform):[a-zA-Z]+$ +``` + +App Intent Messages **MUST** have the fourth section set to `app`. + +Platform Intent Messages **MUST** have the fourth section set to `platform` + +All Intent Messages **MUST** have the fifth section set to the same value as `intent.action`. + +Platforms may use this to route different types of intents to different subsystems without having to understand the internal structure of Firebolt intent objects. + +### 6.4. Intent Message Metadata +An intent message **MAY** have a `metadata` object property for adding distributor-specific metadata for logging or analytics. The values in `metadata` **MUST NOT** impact how the device interprets the intent. + +## 7. Intent Types + +- [Play](./play) +- [Tune](./tune) +- [Basic Navigation](./navigation) + \ No newline at end of file diff --git a/requirements/pr-release-1-3-0/specifications/intents/play/index.md b/requirements/pr-release-1-3-0/specifications/intents/play/index.md new file mode 100644 index 00000000..869135ee --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/intents/play/index.md @@ -0,0 +1,274 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Play Intent +category: requirements +type: specification +--- +# Play Intent + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| --------------- | ------------ | +| Jeremy LaCivita | Comcast | +| Liz Sheffield | Comcast | +| Seth Kelly | Comcast | +| Simon Grist | Sky | + +## 1. Overview +There are many use cases where a Firebolt device will need to inform an app of +a user's intention to play something. This could originate from a voice remote, +an editorial tile, a developer tool, or any number of places. Having a standard +message to play something allows an app to integrate with this message once, +while allowing the platform to change when and where the intent comes from +w/out further work from the app. + +Apps will need to be able to play specific entities from a back-office +meta-data integration, entities from a federated meta-data integration, or +non-specific entities based on a query. + +The existing Firebolt `playback` intent does not meet these requirements. This +document outlines a more flexible `play-entity` and `play-query` intent to +replace it. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Play Entity Intent](#3-play-entity-intent) + - [3.1. Play Entity Options](#31-play-entity-options) + - [3.1.1. Play First Option](#311-play-first-option) +- [4. Play Query Intent](#4-play-query-intent) + - [4.1. Play Options for Query](#41-play-options-for-query) +- [5. Core APIs](#5-core-apis) + +## 3. Play Entity Intent +The Firebolt `navigateTo` notification **MUST** support a `play-entity` intent, +which tells an app to initiate playback of specific entity. + +The `play-entity` intent **MUST** have an `action` property, whose value is +`"play-entity"`. + +The `play-entity` intent **MUST** have a `data` object property, which is an +object conforming to the following: + +> The `data` object **MUST** have an `entity` object property. +> +> The `entity` object, **MUST** be an [Entity](../../entities/). +> +> The `data` object **MAY** have an `options` object property that conforms to +> [Play Entity Options](#31-play-entity-options). + +The `play-entity` intent **MUST** have a `context` object property that +conforms to the [Intent Context](../index#4-intent-context). + +An example play-entity intent: + +```json +{ + "action": "play-entity", + "data": { + "entity": { + "entityType": "program", + "programType": "movie", + "entityId": "movie/xyz" + } + }, + "context": { + "source": "voice" + } + } +``` + +Which would instruct an app to play the movie entity with id `movie/xyz`. + +### 3.1. Play Entity Options + +#### 3.1.1. Play First Option +For `play-entity` intents with an `entity` whose `entityType` is `"playlist"`, +e.g.: + + ```json + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + }, + "context": { + "source": "voice" + } + } +``` + +The `options` property of the intent **MAY** contain a `playFirstId` string +property, to identify an entity to play *before* starting the playlist, e.g.: + + ```json + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + }, + "options": { + "playFirstId": "song/xyz" + } + }, + "context": { + "source": "voice" + } + } +``` + +If `playFirstId` is provided, the the targeted app **MUST** attempt to play the +entity denoted by `playFirstId` first, regardless of whether it is part of the +identified playlist or not. + +If the `playFirstId` was successfully played, then the app **SHOULD** remove +the `playFirstId` entity from any later position in the playlist, if +appropriate. + +The `options` property of the intent **MAY** contain a `playFirstTrack` integer +property, to identify an entity from the playlist to play *before* the rest of +the playlist, e.g.: + + ```json + { + "action": "play-entity", + "data": { + "entity": { + "entityType": "playlist", + "entityId": "playlist/xyz" + }, + "options": { + "playFirstTrack": 3 + } + }, + "context": { + "source": "voice" + } + } +``` + +If `playFirstTrack` is provided and the playlist has at least that many items, +then the item denoted by `playFirstTrack` **MUST** be moved from it's original +position to the front of the playlist for playback. + +The options object **MUST NOT** have both a `playFirstId` and a +`playFirstTrack` property. + +## 4. Play Query Intent +The Firebolt `navigateTo` notification **MUST** support a `play-query` intent, +which tells an app to find content that matches a query and play that content. + +The `play-query` intent **MUST** have an `action` property, whose value is +`"play-query"`. + +The `play-query` intent **MUST** have `data` property, which is an object +conforming to the following: + +> The `data` object **MUST** have a `query` string property. +> +> The `data` object **MAY** have an `options` object property that conforms to +> [Play Options](#41-play-options-for-query). + +The `play-query` intent **MUST** have a `context` object property that conforms +to the [Intent Context](../index#4-intent-context). + +An example play intent: + +```json +{ + "action": "play-query", + "data": { + "query": "Ed Sheeran" + }, + "context": { + "source": "voice" + } +} +``` + +Which would instruct an app to search for content matching the query "Ed +Sheeran" and then play the results. + +### 4.1. Play Options for Query +For `play-query` intents with a `query`, e.g.: + + ```json + { + "action": "play-query", + "data": { + "query": "Ed Sheeran" + }, + "context": { + "source": "voice" + } + } +``` + +The `options` property of the intent **MAY** contain a `programTypes` +array-of-strings property, to filter which program entity typess, e.g. `[ +"movie", "episode" ]` should be included, e.g.: + + ```json + { + "action": "play-query", + "data": { + "query": "Ed Sheeran", + "options": { + "programTypes": [ + "movie" + ] + } + }, + "context": { + "source": "voice" + } + } +``` + +The `options` property of the intent **MAY** contain a `musicTypes` +array-of-strings property, to filter which music entity typess, e.g. `[ "song", +"album" ]` should be included, e.g.: + + ```json + { + "action": "play-query", + "data": { + "query": "Ed Sheeran", + "options": { + "programTypes": [ + "movie" + ], + "musicTypes": [ + "song" + ] + } + }, + "context": { + "source": "voice" + } + } +``` + +## 5. Core APIs +The Firebolt Core SDK will support listening to `play-query` and `play-entity` +intents via the `Discovery.navigateTo` notification. + +```javascript +import { Discovery } from '@firebolt-js/sdk' + +Discovery.listen('navigateTo', (intent) => { + if (intent.action === 'play-query') + // do stuff with play intent! + } +}) +``` \ No newline at end of file diff --git a/requirements/pr-release-1-3-0/specifications/intents/user-interest/index.md b/requirements/pr-release-1-3-0/specifications/intents/user-interest/index.md new file mode 100644 index 00000000..8241f062 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/intents/user-interest/index.md @@ -0,0 +1,23 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: User Interest +category: requirements +type: specification +--- +# User Interest + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Eugene Chung | Comcast | +| Tim Dibben | Sky | +| Mike Horwitz | Comcast | +| Jeremy LaCivita | Comcast | + +## 1. Overview +This document describes the intent to initiate a [User Interest](../../discovery/user-interest) flow from an upstream system, e.g. a voice assistant. diff --git a/requirements/pr-release-1-3-0/specifications/localization/language/index.md b/requirements/pr-release-1-3-0/specifications/localization/language/index.md new file mode 100644 index 00000000..46fc1b09 --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/localization/language/index.md @@ -0,0 +1,107 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Language Settings +category: requirements +type: specification +--- +# Language Settings + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Tim Dibben | Sky | + +## 1. Overview + +This document describes the requirements that Firebolt platforms must +fulfill when surfacing user language preferences. + +Exposing these settings, e.g. the main device language, or a list of +preferred audio languages, allows Apps to respect the device's current +setting so that the user has a seamless experience when switching from +app to app. + +This document covers how Firebolt platforms manage language settings and +expose to Apps. It does not cover the use cases Apps might apply these +APIs to. + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +- [1. Overview](#1-overview) +- [2. Language](#2-language) +- [3. Locale](#3-locale) +- [4. Preferred Audio Languages](#4-preferred-audio-languages) +- [5. Core SDK APIs](#5-core-sdk-apis) +- [6. Manage SDK APIs](#6-manage-sdk-apis) + +## 2. Language + +Language describes the ISO 639 1/2 code for the preferred language on +this device. All Apps **SHOULD** generally render their user experience +in this language. This is a guideline, not an absolute requirement, +since different Apps may have different target audiences with differing +languages prevalent within those audiences. + +This setting is represented by a mutable property which is a string +conforming to the ISO 639 1/2 standard, e.g. `'en'`. + +## 3. Locale + +Locale describes the *full* BCP 47 code, including script, region, +variant, etc., for the preferred language/locale on this device. Apps +**MAY** alter their user experience to match this locale to account for +local differences in the same language. + +This setting is represented by a mutable property which is a string +conforming to the full BCP 47 standard, e.g. `'en-US'`. + +## 4. Preferred Audio Languages + +The preferred audio languages setting provides a ranked list of +languages that the user prefers to be selected on this device. All +values are from the ISO 639 1/2 standard. Apps **MAY** use this list to +influence selection of an initial audio track when playing content with +multiple languages. For example, a bilingual user living in an English +speaking country may have the `language` set to `'en`\' and the +`preferredAudioLanguages` set to `['fr', 'en']`. This +enables them to typically consume content from apps whose catalogs are +mostly filmed in English, but automatically get the French language +track when watching a French movie that has both French and English +tracks. + +This setting is represented by a mutable property which is an array of +strings conforming to the ISO 639 1/2 standard, e.g. `'en'`. + +## 5. Core SDK APIs + +The following APIs are exposed by the Firebolt Core SDK as part of the +`core:localization` domain/module. + +Each of these APIs a read-only property. + +- `Localization.language():Promise` + +- `Localization.locale():Promise` + +- `Localization.preferredAudioLanguages():Promise` + +- `Localization.onLanguageChanged():Promise` + +- `Localization.onLocaleChanged():Promise` + +- `Localization.onPreferredAudioLanguagesChanged():Promise` + +## 6. Manage SDK APIs + +The following APIs are exposed by the Firebolt Manage SDK as part of the +`manage` domain. + +The Manage SDK APIs inclueare identical to the Core SDK, except that all +property APIs are mutable. diff --git a/requirements/pr-release-1-3-0/specifications/openrpc-extensions/app-passthrough-apis/index.md b/requirements/pr-release-1-3-0/specifications/openrpc-extensions/app-passthrough-apis/index.md new file mode 100644 index 00000000..d6f86a1f --- /dev/null +++ b/requirements/pr-release-1-3-0/specifications/openrpc-extensions/app-passthrough-apis/index.md @@ -0,0 +1,471 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: App Pass-through APIs +category: requirements +type: specification +--- +# App Pass-through APIs + +Document Status: Working Draft + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +|-----------------|----------------| +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Yuri Pasquali | Sky | + +## 1. Overview +This document describes how one Firebolt App can provide a capability that may be used by another Firebolt App, with the platform as a permission broker that passes the requests and responses to each app without feature-specific logic. + +This document covers the App Pass-through Firebolt OpenRPC extension as well as how Firebolt implementations should detect and execute app provided pass-through APIs. + +Some APIs require an app to fulfill the request on behalf of another app, e.g. to provide a UX or cross-app data sharing. Generally the calling app doesn't care, or have a say in, which other app provides the API, that is up to the Firebolt distributor. + +To facilitate these APIs, Firebolt denotes an OpenRPC tag with OpenRPC extensions to connect the `provide` API to the `use` API. + +This document is written using the [IETF Best Common Practice 14](https://www.rfc-editor.org/rfc/rfc2119.txt) and should include the following summary in the Overview section: + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Open RPC Extensions](#3-open-rpc-extensions) + - [3.1. Provided By Extension](#31-provided-by-extension) +- [4. Routing App pass-through APIs](#4-routing-app-pass-through-apis) + - [4.1. No available providers](#41-no-available-providers) + - [4.2. Direct pass-through](#42-direct-pass-through) + - [4.4. Pass-through notifications](#44-pass-through-notifications) +- [5. Provider Candidates](#5-provider-candidates) +- [6. Best Candidate](#6-best-candidate) +- [7. Result Transformations](#7-result-transformations) +- [8. Provider Parameter Injection](#8-provider-parameter-injection) +- [9. API Gateway](#9-api-gateway) +- [10. Example: User Interest](#10-example-user-interest) + - [10.1. User Interest Pull](#101-user-interest-pull) + - [10.2. User Interest Push](#102-user-interest-push) + +## 3. Open RPC Extensions + +### 3.1. Provided By Extension +Firebolt OpenRPC **MUST** support a `string` `x-provided-by` extension property on the `capabilities` tag that denotes a method is provided by some app on the device registering for the specified provider API, e.g.: + +```json +{ + "methods": [ + { + "name": "Keyboard.standard", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestStandard", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ] + } + ] + } + ] +} +``` + +The method denoted by `x-provided-by` is referred to as the "*provider*" or "*provider method*" for the remainder of this document. + +The method with the `x-provided-by` extension is referred to as the "*platform method*" for the remainder of this document. + +To prevent unresolvable chaining of methods the `x-provided-by` extension **MUST NOT** be used on a method with any value in the `x-provides` extension. + +To prevent compound methods a platform method **MUST** `use` a single capability or `manage` a single capability, but not both. + +The provider method **MUST** provide the same capability that the platform method either uses or manages. + +If a platform method has no provider method then it is not a valid Firebolt OpenRPC method schema, and a validation error **MUST** be generated. + +## 4. Routing App pass-through APIs +App pass-through APIs may be routed in one of several ways. + +When an app calls a platform method, i.e. one with an `x-provided-by` extension, the platform **MUST** use one of the routing methods defined in this section based on various properties of the method. + +### 4.1. No available providers +When an app calls a platform method with an `x-provided-by` extension, the platform **MUST** return an unavailable error if there is no [candidate app](#7-provider-candidates) to execute the provider method. + +```json +{ + "id": 1, + "error": { + "code": -50300, + "message": "Capability is unavailable." + } +} +``` + +Where `` is the capability XRN string, e.g. `xrn:firebolt:capabilities:example:foo`. + +### 4.2. Direct pass-through +A direct pass-through is where a single app provides a single response to a single request by another app. + +This section only applies to app provider methods that do not have an `event` tag. + +The platform method result schema **MUST** either: + +> Match the `x-response` schema on the provider method so that the result can be passed through. +> +> or +> +> Have a property that matches the `x-response-name` string and `x-response` schema on the +> provider method so that the result can be composed and passed through. + +The platform **MUST** call the provider method from the [best candidate](#8-best-candidate) app and acquire the result. + +If the platform method result schema matches the `x-response` schema on the provider method then the value **MUST** be used as-is. + +Otherwise if the platform method result schema has a property that matches the `x-response` schema on the provider method then the value **MUST** be composed into an object under the corresponding property name and the platform **MUST** apply any [result transformations](#9-result-transformations) to the composed result. + +### 4.4. Pass-through notifications +Firebolt events have a synchronous subscriber registration method, e.g. `Lifecycle.onInactive(true)`, in addition to asynchronous notifications when the event actually happens. For events powered by an app pass-through, only the asynchronous notifications are passed in by the providing app. The initial event registration is handled by the platform, and the success response is not handled by the providing app. + +This section only applies to platform methods that have an `event` tag. + +App provided event registration **MUST** not return an availability error due to a lack of providers, since one may be launched at a future point. + +To ensure that event provider methods all behave the same the provider method **MUST** have a `result` schema with `"type"` set to `"null"`, since it will not expect any data in the response from the platform after pushing the notification. + +The platform method result schema **MUST** either: + +> Match the *last* parameter schema on the provider method so that the result can be passed through. +> +> Have a property that matches the *last* parameter name and schema on the provider method so that the result can be passed through. + +Example platform method with context: +```json +{ + "name": "onFoo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capabilities:example:foo" + ], + "x-provided-by": "foo" + }, + { + "name": "event" + } + ], + "params": [ + { + "name": "context1", + "schema":{ + "type": "string" + } + }, + { + "name": "context2", + "schema": { + "type": "number" + } + } + ], + "result": { + "name": "value", + "schema": { + "type": "boolean" + } + } +} +``` + +Matching provider method: + +```json +{ + "name": "foo", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capabilities:example:foo" + } + ], + "params": [ + { + "name": "context1", + "schema":{ + "type": "string" + } + }, + { + "name": "context2", + "schema": { + "type": "number" + } + }, + { + "name": "value", + "schema": { + "type": "boolean" + } + } + ] +} +``` + +When a provider app calls a provider method mapped to an event the platform **MUST** ignore the notification if the app is not a [candidate app](#7-provider-candidates) for this capability. + +If the platform method result schema matches the *last* parameter schema on the provider method then the value **MUST** be used as-is. + +Otherwise if the platform method result schema has a property that matches the *last* parameter schema on the provider method then the value **MUST** be composed into an object under the corresponding property name and the platform **MUST** apply any [result transformations](#9-result-transformations) to the composed result. + +If the value was composed into the platform method result under a matching property, then any context parameter values from the provider method that correspond to a property name and schema in the platform method result **MUST** also be composed into the platform method result under those properties. + +Finally the platform **MUST** dispatch the notification to the app that registered for the event via the original platform method, using all but the last parameter as context. + +## 5. Provider Candidates +When a platform method with an `x-provided-by` extension is called, then +all loaded apps that have permission to provide the capability **MUST** be +considered as candidates to fulfill the method. + +## 6. Best Candidate +Any provider candidates that have not registered to provide the method in +question **MUST NOT** be considered the best candidate and removed from +consideration. + +If there is only one candidate left then it **MUST** be the best candidate. + +If there is more than one candidate left, then the candidate app that most recently had RCU input focus **MUST** be the best candidate. + +If none of the candidates have had focus yet, then the candidate app that was most recently launched **MUST** be the best candidate. + +## 7. Result Transformations +A platform method may be configured to insert the providing app id into composite values. This is not allowed in non-composite results to avoid collisions with the provder method sending an appId and Firebolt overriding it. + +If a "composite result" was used to wrap the provider method value and the platform method's schema has an `appId` `string` property at the top level then the property's value **MUST** be set to the the appId of the providing app for that result. + +## 8. Provider Parameter Injection +If the provider method has a parameter named `appId` and the platform method *does not*, then the appId of the app calling the platform method **MUST** be sent to the provider in the `appId` parameter. + +If the platform method is an `event` and the provider method has context parameters then each context parameter from the provider that has a matching context parameter in the event **MUST** have it's value passed to that parameter. + +If the platform method is an `event` with a "composite result" and the provider method has context parameters then each context parameter from the provider that has a matching property on the `result` object **MUST** have it's value copied into that property. + +## 9. API Gateway +The Firebolt API Gateway **MUST** detect app-passthrough APIs and map the `use`/`manage` APIs to the corresponding `provide` APIs by parsing the Firebolt OpenRPC Specification and following the logic outline in this document. + +## 10. Example: User Interest + +The following schemas are referenced by these examples: + +```json +{ + "components": { + "schemas": { + "InterestType": { + "type": "string", + "enum": [ + "interest", + "disinterest" + ] + }, + "InterestReason": { + "type": "string", + "enum": [ + "playlist" + ] + }, + "EntityDetailsFromApp": { + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + }, + "required": [ + "appId", + "entity" + ] + } + } + } +} +``` + +### 10.1. User Interest Pull + +Platform method: + +```json +{ + "methods": [ + { + "name": "requestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Discovery.onRequestUserInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "#/components/schemas/InterestReason" + } + } + ], + "result": { + "name": "interest", + "schema": { + "$ref": "#/components/schemas/EntityDetailsFromApp", + } + } + } + ] +} +``` + +Provider method: + +```json +{ + "methods": [ + { + "name": "onRequestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + }, + { + "name": "event", + "x-response": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + } + ], + "result": { + "name": "request", + "schema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/InterestType", + }, + "reason": { + "$ref": "#/components/schemas/InterestReason", + } + } + } + } + } + ] +} +``` + +### 10.2. User Interest Push + +Provider method: + +```json +{ + "methods": [ + { + "name": "userInterest", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + } + ], + "params": [ + { + "name": "type", + "schema": { + "$ref": "#/components/schemas/InterestType", + } + }, + { + "name": "reason", + "schema": { + "$ref": "#/components/schemas/InterestReason", + } + }, + { + "name": "entity", + "schema": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + } + ] +} +``` + +Platform Method: + +```json +{ + "methods": [ + { + "name": "onUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Discovery.userInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + }, + { + "name": "event" + } + ], + "params": [], + "result": { + "name": "interest", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/InterestType" + }, + "reason": { + "$ref": "#/components/schemas/InterestReason" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + } + + } + } + } + ] +} +``` diff --git a/requirements/pr-release-1-3-0/style-guide-and-template/index.md b/requirements/pr-release-1-3-0/style-guide-and-template/index.md new file mode 100644 index 00000000..d7429437 --- /dev/null +++ b/requirements/pr-release-1-3-0/style-guide-and-template/index.md @@ -0,0 +1,99 @@ +--- + +version: pr-release-1-3-0 +layout: default +title: Requirements Style Guide +category: requirements +--- +# Requirements Style Guide + +Document Status: Working Draft + +See [Firebolt Requirements Governance](../governance) for more info. + +**NOTE**: Update this link based on your directory depth ^^ + +| Contributor | Organization | +| -------------- | -------------- | +| TBD | TBD | + +## 1. Overview +This document is both a style guide *and* a template for Firebolt Requirements Specifications. + +The Overview section is a non-normative or informative introduction to the contents and subject matter of the document. This is included to introduce the reader to the overall problem, solution, and scope. No formal requirements will be included here, as it will often be skipped by readers that are already familiar with the document. + +Overviews can be as long or short as appropriate for the subject matter, and should have a target audience ranging from technical product managers to engineering teams that may be testing, implementing, or integrating with the functionality described in the document. + +The overview must contain the following towards the end: + +Requirements documents are written using the [IETF Best Common Practice 14](https://www.rfc-editor.org/rfc/rfc2119.txt) and should include the following summary in the Overview section: + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Specification Style Requirements](#3-specification-style-requirements) + - [3.1. General Style Requirements](#31-general-style-requirements) + - [3.2. Firebolt Style Requirements](#32-firebolt-style-requirements) + - [3.3. Firebolt Method Templates](#33-firebolt-method-templates) +- [4. Example Section](#4-example-section) + - [4.1. Example Feature](#41-example-feature) + +**NOTE**: This is a simple table of contents. It should include links to all headers in the document, except for the top-level header (i.e. `# Title`). It is recommended to use a Markdown plugin to generate this based on headers ranging from level two to level six. Delete this note from your actual spec :) + +## 3. Specification Style Requirements +Firebolt uses method templates in order to code-generate consistent APIs. For example, methods with the `"property"` tag only need to have the `getter` editorially defined. The Firebolt OpenRPC tools will auto-generate the `setter` and `subscriber` as OpenRPC methods with matching types. Additionally, the Firebolt OpenRPC tools wil then code-generate the getter, setter, and subscriber as APIs in various languages using templates. + +This enables both consistent APIs (all properties have a recongnizable pattern) and consistent SDK implementation, which reduces the code that needs to be tested. + +### 3.1. General Style Requirements +All headers **MUST** be numbered, and have the parent header as the prefix, separated with '.' + +Module and method names, as well as constants **MUST** be in monospace font, e.g. the `Foo` module **MUST** have a `bar` method that returns `true`. Specs should use JavaScript notation for any code examples if the spec is not targeting another specific language binding, e.g. a spec about Event listeners in C++ would use C++ syntax. + +String constants and values **MUST** be wrapped in quotes for clarity, e.g. `"Hello World"`. + +### 3.2. Firebolt Style Requirements +All Firebolt APIs exposed for building Firebolt Apps **MUST** be exposed as JSON-RPC methods on a WebSocket accessible to the device, typically running locally. + +Parameters and return values for all APIs **MUST** be described using JSON-Schema schemas. + +Methods **MUST** be grouped into “modules” or “packages” of functionality. + +The JSON-RPC method name of any method **MUST** follow the template: + +``` +. +``` + +e.g. + +``` +lifecycle.ready +``` + +JSON-RPC method names are case sensitive. + +Methods **MUST** have at least one capability used, managed, or provided by the method. + +Methods **MAY** require the use of more than one capability, but this means that the app must have permission to all of them. In order to enable App permissions to be evaluated in an isolated layer, separate from the method implementation itself, a Firebolt method **MUST NOT** be specified to add or remove fields based on the caller's permissions. + +The words used in method and parameter names **SHOULD** be used as consistently as possible across the Firebolt API surface. See the [Firebolt API Glossary](../glossary) for words that Firebolt uses and how they are used. + +### 3.3. Firebolt Method Templates +Methods **SHOULD** consider using the existing Firebolt method tags, in order to have a level of consistency across APIs. + +If a Firebolt method is specified such that it requires a non-existant template, then a new Requirements Specification **MUST** be written and referenced by the specification that inspired it. Method templates **MUST** be designed with re-use in mind. + +## 4. Example Section +A section describes group of closely related features. Many specifications have only one section, however, more complicated specifications may have many. The first paragraph of a section is typically a non-normative introduction to that section, and therefor does not contain any formal requirements. + +### 4.1. Example Feature +Each feature under a section will have it's own heading. Non-normative introductions to features are not typically needed, as the reader is ready to get into requirements at this point. It is recommended that all Feature headings under each Section contain only sentences or short paragraphs with formal requirements, e.g. MUST, SHOULD, MAY, MUST NOT, SHOULD NOT, etc. These sentences should be separated by blank lines for readability, e.g.: + +This requirement **MUST** be satisifed. + +This requirement **SHOULD** be satisfied. + +This requirement **MUST** be satisfied. The requirement **MUST** be satisifed in this particular way.