diff --git a/apis/pr-feature-media-access/core/Accessibility/index.md b/apis/pr-feature-media-access/core/Accessibility/index.md new file mode 100644 index 000000000..a32939c32 --- /dev/null +++ b/apis/pr-feature-media-access/core/Accessibility/index.md @@ -0,0 +1,873 @@ +--- +title: Accessibility + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Accessibility Module + +--- + +Version Accessibility 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Accessibility/schemas/index.md b/apis/pr-feature-media-access/core/Accessibility/schemas/index.md new file mode 100644 index 000000000..9c6efb916 --- /dev/null +++ b/apis/pr-feature-media-access/core/Accessibility/schemas/index.md @@ -0,0 +1,150 @@ +--- +title: Accessibility + +version: pr-feature-media-access +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 +```typescript + +```` + +```` + +See also: + + + +--- + +### FontSize + + + +```typescript + +```` + +--- + +### Color + +```typescript + +``` + +--- + +### FontEdge + +```typescript + +``` + +--- + +### Opacity + +```typescript + +``` + +--- + +### HorizontalAlignment + +```typescript + +``` + +--- + +### VerticalAlignment + +```typescript + +``` + +--- + +### ClosedCaptionsStyles + +The default styles to use when displaying closed-captions + +````typescript +```typescript + +```` + +```` + + + +--- + +### ClosedCaptionsSettings + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Account/index.md b/apis/pr-feature-media-access/core/Account/index.md new file mode 100644 index 000000000..0919d311c --- /dev/null +++ b/apis/pr-feature-media-access/core/Account/index.md @@ -0,0 +1,175 @@ +--- +title: Account + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Account Module + +--- + +Version Account 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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-feature-media-access/core/Advertising/index.md b/apis/pr-feature-media-access/core/Advertising/index.md new file mode 100644 index 000000000..43309a97d --- /dev/null +++ b/apis/pr-feature-media-access/core/Advertising/index.md @@ -0,0 +1,809 @@ +--- +title: Advertising + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Advertising Module + +--- + +Version Advertising 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | --------------------- | +| `options` | `` | false | AdvertisingId options | + +Promise resolution: + +| Property | Type | Description | +| ---------- | ------ | ----------- | +| `ifa` | string | | +| `ifa_type` | string | | +| `lmt` | string | | + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | --------------------- | +| `options` | `` | true | Configuration options | + +Promise resolution: + +```typescript +| Property | Type | Description | +|----------|------|-------------| +| `${property}` | ${type} | An opaque object represneting the AdConfiguration | + +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +| Property | Type | Description | +|----------|------|-------------| +| `${property}` | ${type} | | + +``` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +```typescript + +```` + +```` + + + +--- + +### AdPolicy + +Describes various ad playback enforcement rules that the app should follow. + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### AdvertisingIdOptions + + + +```typescript +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Advertising/schemas/index.md b/apis/pr-feature-media-access/core/Advertising/schemas/index.md new file mode 100644 index 000000000..461e3e681 --- /dev/null +++ b/apis/pr-feature-media-access/core/Advertising/schemas/index.md @@ -0,0 +1,55 @@ +--- +title: Advertising + +version: pr-feature-media-access +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 Enumeration: + +| key | value | +|-----|-------| +| NONE | none | +| ADS_UNWATCHED | adsUnwatched | +| ADS_ALL | adsAll | +| ALL | all | + +``` + +--- diff --git a/apis/pr-feature-media-access/core/Authentication/index.md b/apis/pr-feature-media-access/core/Authentication/index.md new file mode 100644 index 000000000..c64a70d16 --- /dev/null +++ b/apis/pr-feature-media-access/core/Authentication/index.md @@ -0,0 +1,454 @@ +--- +title: Authentication + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Authentication Module + +--- + +Version Authentication 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | ----------------------- | ------------------------------------------- | --------------------------------------------------------------------------- | ----------- | +| `type` | `` | true | What type of token to get values: `'platform' \| 'device' \| 'distributor'` | +| `options` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | false | Additional options for acquiring the token. | + +Promise resolution: + +| Property | Type | Description | +| --------- | ------ | ----------- | +| `value` | string | | +| `expires` | string | | +| `type` | string | | + +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 Enumeration: + +| key | value | +|-----|-------| +| PLATFORM | platform | +| DEVICE | device | +| DISTRIBUTOR | distributor | + +``` + +--- diff --git a/apis/pr-feature-media-access/core/Capabilities/index.md b/apis/pr-feature-media-access/core/Capabilities/index.md new file mode 100644 index 000000000..086af866d --- /dev/null +++ b/apis/pr-feature-media-access/core/Capabilities/index.md @@ -0,0 +1,1811 @@ +--- +title: Capabilities + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Capabilities Module + +--- + +Version Capabilities 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | `` | false | Capability options | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------------- | ---- | -------- | ----------------------------------------------------------------- | +| `capabilities` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +```typescript + +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | `` | false | Capability options | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | ---- | -------- | ----------- | +| `grants` | `` | true | | + +Promise resolution: + +```typescript + +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +```typescript +boolean +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +````typescript +```typescript + +```` + +```` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, | `capability` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `role` | `` | true | values: `'use' \| 'manage' \| 'provide'` | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +````typescript +```typescript + +```` + +```` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, | `capability` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `role` | `` | true | values: `'use' \| 'manage' \| 'provide'` | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +````typescript +```typescript + +```` + +```` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, () => void): Promise +``` + +See also: [listen()](#listen), [once()](#listen), [clear()](#listen). + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Event value: + +````typescript +```typescript + +```` + +```` + +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 +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Capabilities/schemas/index.md b/apis/pr-feature-media-access/core/Capabilities/schemas/index.md new file mode 100644 index 000000000..04146c71f --- /dev/null +++ b/apis/pr-feature-media-access/core/Capabilities/schemas/index.md @@ -0,0 +1,121 @@ +--- +title: Capabilities + +version: pr-feature-media-access +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 Enumeration: + +| key | value | +|-----|-------| +| USE | use | +| MANAGE | manage | +| PROVIDE | provide | + +``` + +--- + +### DenyReason + +Reasons why a Capability might not be invokable + +```typescript +DenyReason Enumeration: + +| key | value | +|-----|-------| +| 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 +```typescript + +```` + +```` + +See also: + + + + +--- + +### Permission + +A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user). + +```typescript +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Device/index.md b/apis/pr-feature-media-access/core/Device/index.md new file mode 100644 index 000000000..6aed81d14 --- /dev/null +++ b/apis/pr-feature-media-access/core/Device/index.md @@ -0,0 +1,2101 @@ +--- +title: Device + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Device Module + +--- + +Version Device 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +| Property | Type | Description | +| -------- | ---- | ----------- | +| `state` | | | +| `type` | | | + +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) => | Property | Type | Description | +|----------|------|-------------| +| `${property}` | [${type}](${type.link}) | ${description} | +): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +| Property | Type | Description | +| ---------- | ------ | ---------------------------------------------------------------- | +| `sdk` | | The Firebolt SDK version | +| `api` | | The lateset Firebolt API version supported by the curent device. | +| `firmware` | | The device firmware version. | +| `os` | | **Deprecated** Use `firmware`, instead. | +| `debug` | string | Detail version as a string, for debugging purposes | + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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: + +```typescript +string +``` + +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 Enumeration: + +| key | value | +|-----|-------| +| CONNECTED | connected | +| DISCONNECTED | disconnected | + +``` + +--- + +### NetworkType + +The type of network that is currently active + +```typescript +NetworkType Enumeration: + +| key | value | +|-----|-------| +| WIFI | wifi | +| ETHERNET | ethernet | +| HYBRID | hybrid | + +``` + +--- + +### AudioProfiles + +````typescript +```typescript + +```` + +```` + +See also: + + + + +--- + +### Resolution + + + +```typescript +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Discovery/index.md b/apis/pr-feature-media-access/core/Discovery/index.md new file mode 100644 index 000000000..3624b290e --- /dev/null +++ b/apis/pr-feature-media-access/core/Discovery/index.md @@ -0,0 +1,3839 @@ +--- +title: Discovery + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Discovery Module + +--- + +Version Discovery 1.2.0-feature-media-access.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) + - [purchasedContent](#purchasedcontent) + - [signIn](#signin) + - [signOut](#signout) + - [watched](#watched) + - [watchNext](#watchnext) +- [Events](#events) + - [navigateTo](#navigateto) + - [policyChanged](#policychanged) +- [Types](#types) + - [DiscoveryPolicy](#discoverypolicy) + - [Availability](#availability) + - [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 +${method.signature} +``` + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ----- | ---- | -------- | -------------------------------------------------------------------------------------------------- | +| `ids` | `` | true | A list of identifiers that represent content that is discoverable or consumable for the subscriber | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------------- | ---- | -------- | ---------------------------- | +| `entitlements` | `` | true | Array of entitlement objects | + +Promise resolution: + +```typescript +boolean +``` + +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 objects | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------------ | ---------------------- | -------- | ----------------------------------------------------------- | +| `parameters` | `EntityInfoParameters` | Yes | An object describing the platform's query for an `` object. | + +````typescript +```typescript + +```` + +```` + +Callback promise resolution: + +```typescript +```typescript + +```` + +```` + + + +#### 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: )`: + +```typescript +function entityInfo(result: ): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| -------- | ---- | -------- | ----------------------------------- | +| `result` | `` | Yes | The `` data to push to the platform | + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `appId` | `string` | true | The durable app Id of the app to launch | +| `intent` | `` | 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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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) => ): 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 + } +} +``` + +
+ +--- + +### 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 objects | + +Callback parameters: + +| Param | Type | Required | Summary | +| ------------ | ---------------------------- | -------- | ----------------------------------------------------------- | +| `parameters` | `PurchasedContentParameters` | Yes | An object describing the platform's query for an `` object. | + +````typescript +```typescript + +```` + +```` + +Callback promise resolution: + +```typescript +```typescript + +```` + +```` + + + +#### 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: )`: + +```typescript +function purchasedContent(result: ): Promise +``` + +Parameters: + +| Param | Type | Required | Summary | +| -------- | ---- | -------- | ----------------------------------- | +| `result` | `` | Yes | The `` data to push to the platform | + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------------- | ---- | -------- | ------------------------------------------------------------------------------------------------------- | +| `entitlements` | `` | false | Optional array of Entitlements, in case of a different user account, or a long time since last sign-in. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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 +} +``` + +
+ +--- + +### watched + +Notify the platform that content was partially or completely watched + +```typescript +${method.signature} +``` + +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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | ----------------------- | --------------------------------------- | -------------------------------------------------------------------------------------- | ----------- | +| `title` | `` | true | The title of this call to action | +| `identifiers` | `` | 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` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | false | A set of images for this call to action | + +Promise resolution: + +```typescript +boolean +``` + +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: + +```typescript + +``` + +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) + +## Types + +### DiscoveryPolicy + +````typescript +```typescript + +```` + +```` + + + +--- + +### Availability + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### PurchasedContentParameters + + + +```typescript +```typescript + +```` + +```` + +See also: + + + + +--- + +### ContentAccessIdentifiers + + + +```typescript +```typescript + +```` + +```` + +See also: + + + + +--- + +### EntityInfoParameters + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### EntityInfoFederatedRequest + + + +```typescript +```typescript + +```` + +```` + +See also: + + + + +--- + +### PurchasedContentFederatedRequest + + + +```typescript +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Discovery/schemas/index.md b/apis/pr-feature-media-access/core/Discovery/schemas/index.md new file mode 100644 index 000000000..288a38f87 --- /dev/null +++ b/apis/pr-feature-media-access/core/Discovery/schemas/index.md @@ -0,0 +1,62 @@ +--- +title: Discovery + +version: pr-feature-media-access +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) + - [EntityInfoResult](#entityinforesult) + - [PurchasedContentResult](#purchasedcontentresult) + +## Overview + +undefined + +## Types + +### EntityInfoResult + +The result for an `entityInfo()` push or pull. + +````typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### PurchasedContentResult + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Entertainment/schemas/index.md b/apis/pr-feature-media-access/core/Entertainment/schemas/index.md new file mode 100644 index 000000000..bc8419779 --- /dev/null +++ b/apis/pr-feature-media-access/core/Entertainment/schemas/index.md @@ -0,0 +1,268 @@ +--- +title: Entertainment + +version: pr-feature-media-access +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) + - [ProgramType](#programtype) + - [MusicType](#musictype) + - [ContentIdentifiers](#contentidentifiers) + - [Entitlement](#entitlement) + - [ContentRating](#contentrating) +- [United States](#united-states) +- [Canada](#canada) + - [WayToWatch](#waytowatch) + - [EntityInfo](#entityinfo) + +## Overview + +undefined + +## Types + +### OfferingType + +The offering type of the WayToWatch. + +```typescript +OfferingType Enumeration: + +| key | value | +|-----|-------| +| FREE | free | +| SUBSCRIBE | subscribe | +| BUY | buy | +| RENT | rent | + +``` + +--- + +### ProgramType + +In the case of a program `entityType`, specifies the program type. + +```typescript +ProgramType Enumeration: + +| key | value | +|-----|-------| +| 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 | + +``` + +--- + +### MusicType + +In the case of a music `entityType`, specifies the type of music entity. + +```typescript +MusicType Enumeration: + +| key | value | +|-----|-------| +| SONG | song | +| ALBUM | album | + +``` + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### Entitlement + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + + + +--- + +### 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 +```typescript + +```` + +``` + +See also: + + + + + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Intents/schemas/index.md b/apis/pr-feature-media-access/core/Intents/schemas/index.md new file mode 100644 index 000000000..ccb54f769 --- /dev/null +++ b/apis/pr-feature-media-access/core/Intents/schemas/index.md @@ -0,0 +1,416 @@ +--- +title: Intents + +version: pr-feature-media-access +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) + - [ProgramEntity](#programentity) + - [Identifier](#identifier) + - [SearchIntent](#searchintent) + - [SectionIntent](#sectionintent) + - [ChannelEntity](#channelentity) + - [MusicEntity](#musicentity) + - [PlayQueryIntent](#playqueryintent) + - [HomeIntent](#homeintent) + - [LaunchIntent](#launchintent) + - [TVSeriesEntity](#tvseriesentity) + - [PlaylistEntity](#playlistentity) + - [TVSeasonEntity](#tvseasonentity) + - [AdditionalEntity](#additionalentity) + - [MovieEntity](#movieentity) + - [TVEpisodeEntity](#tvepisodeentity) + - [UntypedEntity](#untypedentity) + - [EntityIntent](#entityintent) + - [PlayableEntity](#playableentity) + - [TuneIntent](#tuneintent) + - [PlayEntityIntent](#playentityintent) + - [PlaybackIntent](#playbackintent) + - [NavigationIntent](#navigationintent) + +## Overview + +undefined + +## Types + +### Intent + +A Firebolt compliant representation of a user intention. + +```typescript + +``` + +--- + +### IntentProperties + +```typescript + +``` + +--- + +### ProgramEntity + +````typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### Identifier + + + +```typescript + +```` + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### ChannelEntity + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### MusicEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### LaunchIntent + +A Firebolt compliant representation of a user intention to launch an app. + +```typescript +```typescript + +```` + +```` + + + +--- + +### TVSeriesEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### PlaylistEntity + +A Firebolt compliant representation of a Playlist entity. + +```typescript +```typescript + +```` + +```` + + + +--- + +### TVSeasonEntity + +A Firebolt compliant representation of a TV Season entity. + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### AdditionalEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### MovieEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### TVEpisodeEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### UntypedEntity + + + +```typescript +```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 +```typescript + +```` + +```` + +See also: + + + + + + + + + + +--- + +### PlayableEntity + + + +```typescript + +```` + +See also: + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + +--- + +### NavigationIntent + +A Firebolt compliant representation of a user intention to navigate to a specific place in an app. + +```typescript + +```` + +See also: + +--- diff --git a/apis/pr-feature-media-access/core/Internal/index.md b/apis/pr-feature-media-access/core/Internal/index.md new file mode 100644 index 000000000..4a831633f --- /dev/null +++ b/apis/pr-feature-media-access/core/Internal/index.md @@ -0,0 +1,96 @@ +--- +title: Internal + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Internal Module + +--- + +Version Internal 1.2.0-feature-media-access.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` | `` | true | The semantic version of the SDK. | + +Result: + +| Property | Type | Description | +| --------- | ---- | -------------------------------- | +| `version` | | The semantic version of the FEE. | + +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-feature-media-access/core/Keyboard/index.md b/apis/pr-feature-media-access/core/Keyboard/index.md new file mode 100644 index 000000000..e948b970a --- /dev/null +++ b/apis/pr-feature-media-access/core/Keyboard/index.md @@ -0,0 +1,332 @@ +--- +title: Keyboard + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Keyboard Module + +--- + +Version Keyboard 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | ---------------------------------------------------------------------------------------- | +| `type` | `` | 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: + +```typescript +string +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | -------------------------------------- | +| `message` | `string` | false | The message to display while prompting | + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | -------------------------------------- | +| `message` | `string` | true | The message to display while prompting | + +Promise resolution: + +```typescript +string +``` + +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 Enumeration: + +| key | value | +|-----|-------| +| SIGN_IN | signIn | +| SIGN_UP | signUp | + +``` + +--- diff --git a/apis/pr-feature-media-access/core/Lifecycle/index.md b/apis/pr-feature-media-access/core/Lifecycle/index.md new file mode 100644 index 000000000..2c3adb450 --- /dev/null +++ b/apis/pr-feature-media-access/core/Lifecycle/index.md @@ -0,0 +1,958 @@ +--- +title: Lifecycle + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Lifecycle Module + +--- + +Version Lifecycle 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | ---- | -------- | --------------------------------------------------------------------------------------------------------- | +| `reason` | `` | true | The reason the app is requesting to be closed values: `'remoteButton' \| 'userExit' \| 'done' \| 'error'` | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +LifecycleState Enumeration: + +| key | value | +|-----|-------| +| INITIALIZING | initializing | +| INACTIVE | inactive | +| FOREGROUND | foreground | +| BACKGROUND | background | +| UNLOADING | unloading | +| SUSPENDED | suspended | + +``` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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 +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Lifecycle/schemas/index.md b/apis/pr-feature-media-access/core/Lifecycle/schemas/index.md new file mode 100644 index 000000000..411f7ab64 --- /dev/null +++ b/apis/pr-feature-media-access/core/Lifecycle/schemas/index.md @@ -0,0 +1,65 @@ +--- +title: Lifecycle + +version: pr-feature-media-access +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 Enumeration: + +| key | value | +|-----|-------| +| REMOTE_BUTTON | remoteButton | +| USER_EXIT | userExit | +| DONE | done | +| ERROR | error | + +``` + +--- + +### LifecycleState + +The application lifecycle state + +```typescript +LifecycleState Enumeration: + +| key | value | +|-----|-------| +| INITIALIZING | initializing | +| INACTIVE | inactive | +| FOREGROUND | foreground | +| BACKGROUND | background | +| UNLOADING | unloading | +| SUSPENDED | suspended | + +``` + +--- diff --git a/apis/pr-feature-media-access/core/Localization/index.md b/apis/pr-feature-media-access/core/Localization/index.md new file mode 100644 index 000000000..3fd69e5f7 --- /dev/null +++ b/apis/pr-feature-media-access/core/Localization/index.md @@ -0,0 +1,1654 @@ +--- +title: Localization + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Localization Module + +--- + +Version Localization 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +| Property | Type | Description | +|----------|------|-------------| +| `${property}` | ${type} | | + +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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) => ): 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 +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Localization/schemas/index.md b/apis/pr-feature-media-access/core/Localization/schemas/index.md new file mode 100644 index 000000000..e8a025c30 --- /dev/null +++ b/apis/pr-feature-media-access/core/Localization/schemas/index.md @@ -0,0 +1,79 @@ +--- +title: Localization + +version: pr-feature-media-access +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-feature-media-access/core/MediaAccess/index.md b/apis/pr-feature-media-access/core/MediaAccess/index.md new file mode 100644 index 000000000..2a58fa1dd --- /dev/null +++ b/apis/pr-feature-media-access/core/MediaAccess/index.md @@ -0,0 +1,1187 @@ +--- +title: MediaAccess + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# MediaAccess Module + +--- + +Version MediaAccess 1.2.0-feature-media-access.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [audio](#audio) + - [files](#files) + - [images](#images) + - [media](#media) + - [stopVolumes](#stopvolumes) + - [video](#video) + - [volumes](#volumes) +- [Events](#events) + - [onVolumeAvailable](#onvolumeavailable) + - [onVolumeUnavailable](#onvolumeunavailable) +- [Types](#types) + - [VolumeType](#volumetype) + - [Volume](#volume) + - [MediaFile](#mediafile) + +## Usage + +To use the MediaAccess module, you can import it into your project from the Firebolt SDK: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' +``` + +## Overview + +A module for access user-cultivated media files, e.g. photos on a USB drive. + +## Methods + +### audio + +Access available audio MediaFiles. + +```typescript +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | ------------------------------------------------------------- | +| `volumes` | `` | false | A set of queries used to match which volumes will be matched. | +| `files` | `` | false | A set of queries used to match which files will be matched. | + +Promise resolution: + +```typescript + +``` + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------ | +| uses | xrn:firebolt:capability:media-access:audio | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +let files = await MediaAccess.audio({}, null) +console.log(files) +``` + +Value of `files`: + +```javascript +;[ + { + uri: '/usb/my-usb-drive/song1.mp3', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'audio/mpeg', + }, + { + uri: '/local/music/song2.mp3', + volume: { + uri: '/local/music', + name: 'music', + type: 'local', + }, + type: 'audio/mpeg', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.audio", + "params": { + "volumes": {} + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + } + ] +} +``` + +
+ +--- + +### files + +Access all available MediaFiles. + +```typescript +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | ------------------------------------------------------------- | +| `volumes` | `` | false | A set of queries used to match which volumes will be matched. | +| `files` | `` | false | A set of queries used to match which files will be matched. | + +Promise resolution: + +```typescript + +``` + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------ | +| uses | xrn:firebolt:capability:media-access:files | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +let files = await MediaAccess.files({}, null) +console.log(files) +``` + +Value of `files`: + +```javascript +;[ + { + uri: '/usb/my-usb-drive/notes.txt', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'text/plain', + }, + { + uri: '/usb/my-usb-drive/song1.mp3', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'audio/mpeg', + }, + { + uri: '/local/music/song2.mp3', + volume: { + uri: '/local/music', + name: 'music', + type: 'local', + }, + type: 'audio/mpeg', + }, + { + uri: '/usb/my-usb-drive/photo1.jpg', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'image/jpg', + }, + { + uri: '/local/photos/photo1.jpg', + volume: { + uri: '/local/photos', + name: 'photos', + type: 'local', + }, + type: 'image/jpg', + }, + { + uri: '/usb/my-usb-drive/video1.mpg', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'video/mp4', + }, + { + uri: '/local/videos/video2.mpg', + volume: { + uri: '/local/videos', + name: 'videos', + type: 'local', + }, + type: 'video/mp4', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.files", + "params": { + "volumes": {} + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "uri": "/usb/my-usb-drive/notes.txt", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "text/plain" + }, + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + }, + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + }, + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] +} +``` + +
+ +--- + +### images + +Access available image MediaFiles. + +```typescript +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | ------------------------------------------------------------- | +| `volumes` | `` | false | A set of queries used to match which volumes will be matched. | +| `files` | `` | false | A set of queries used to match which files will be matched. | + +Promise resolution: + +```typescript + +``` + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------- | +| uses | xrn:firebolt:capability:media-access:images | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +let files = await MediaAccess.images({}, null) +console.log(files) +``` + +Value of `files`: + +```javascript +;[ + { + uri: '/usb/my-usb-drive/photo1.jpg', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'image/jpg', + }, + { + uri: '/local/photos/photo1.jpg', + volume: { + uri: '/local/photos', + name: 'photos', + type: 'local', + }, + type: 'image/jpg', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.images", + "params": { + "volumes": {} + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + } + ] +} +``` + +
+ +--- + +### media + +Access all available MediaFiles of either audio, video, or image types. + +```typescript +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | ------------------------------------------------------------- | +| `volumes` | `` | false | A set of queries used to match which volumes will be matched. | +| `files` | `` | false | A set of queries used to match which files will be matched. | + +Promise resolution: + +```typescript + +``` + +Capabilities: + +| Role | Capability | +| ---- | --------------------------------------- | +| uses | xrn:firebolt:capability:media-access:\* | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +let files = await MediaAccess.media({}, null) +console.log(files) +``` + +Value of `files`: + +```javascript +;[ + { + uri: '/usb/my-usb-drive/song1.mp3', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'audio/mpeg', + }, + { + uri: '/local/music/song2.mp3', + volume: { + uri: '/local/music', + name: 'music', + type: 'local', + }, + type: 'audio/mpeg', + }, + { + uri: '/usb/my-usb-drive/photo1.jpg', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'image/jpg', + }, + { + uri: '/local/photos/photo1.jpg', + volume: { + uri: '/local/photos', + name: 'photos', + type: 'local', + }, + type: 'image/jpg', + }, + { + uri: '/usb/my-usb-drive/video1.mpg', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'video/mp4', + }, + { + uri: '/local/videos/video2.mpg', + volume: { + uri: '/local/videos', + name: 'videos', + type: 'local', + }, + type: 'video/mp4', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.media", + "params": { + "volumes": {} + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + }, + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + }, + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] +} +``` + +
+ +--- + +### stopVolumes + +_This is an private RPC method._ + +Access available Volumes with MediaFiles. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | -------- | -------- | ----------- | +| `correlationId` | `string` | true | | + +Result: + +```typescript + +``` + +Capabilities: + +| Role | Capability | +| ---- | -------------------------------------------- | +| uses | xrn:firebolt:capability:media-access:volumes | + +#### Examples + +Default example #1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.stopVolumes", + "params": { + "correlationId": "xyz" + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": null +} +``` + +--- + +### video + +Access available video MediaFiles. + +```typescript +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | ---- | -------- | ------------------------------------------------------------- | +| `volumes` | `` | false | A set of queries used to match which volumes will be matched. | +| `files` | `` | false | A set of queries used to match which files will be matched. | + +Promise resolution: + +```typescript + +``` + +Capabilities: + +| Role | Capability | +| ---- | ------------------------------------------ | +| uses | xrn:firebolt:capability:media-access:video | + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +let files = await MediaAccess.video({}, null) +console.log(files) +``` + +Value of `files`: + +```javascript +;[ + { + uri: '/usb/my-usb-drive/video1.mpg', + volume: { + uri: '/usb/my-usb-drive', + name: 'My USB Drive', + type: 'usb', + }, + type: 'video/mp4', + }, + { + uri: '/local/videos/video2.mpg', + volume: { + uri: '/local/videos', + name: 'videos', + type: 'local', + }, + type: 'video/mp4', + }, +] +``` + +
+JSON-RPC: +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.video", + "params": { + "volumes": {} + } +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] +} +``` + +
+ +--- + +### volumes + +Access available Volumes with MediaFiles. + +```typescript +function volumes(| `query` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +add: (volume: ) => void, remove?: (volume: ) => void ): Process +``` + +Parameters: + +| Param | Type | Required | Summary | +| ------- | ---------- | -------- | -------------------------------------------------------------- | +| `query` | `` | true | | +| add | `function` | true | Callback to pass any `` objects to, as they become available | +| remove | `function` | false | Callback to pass any `` objects to, as they become unavailable | + +Returns: + +```typescript +interface Process { + stop(): void // Stops updating this temporal set with objects +} +``` + +Additionally, the `volumes` method may be called witha `timeout` parameter to find the first match and automatically stop scanning: + +```typescript +function volumes(| `query` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +timeout: number): Promise<> +``` + +Parameters: + +| Param | Type | Required | Summary | +| ------- | -------- | -------- | ------------------------------------- | +| `query` | `` | true | | +| timeout | `number` | true | How long to wait, in ms, for a match. | + +Promise resolution: + +```typescript + +``` + +#### Examples + +Default example #1 + +JavaScript: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +const process = MediaAccess.volumes( + {}, + (volume) => { + console.log('Added to temporal set:') + console.dir(volume) + }, + (volume) => { + console.log('Removed from temporal set:') + console.dir(volume) + }, +) + +setTimeout(() => process.stop(), 10000) +``` + +Request only the first match: + +```javascript +import { MediaAccess } from '@firebolt-js/sdk' + +const volume = await MediaAccess.volumes({}, 1000) +``` + +Value of `volume`: + +```javascript +{ + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" +} +``` + +
+JSON-RPC: +Request: + +```json +[ + { + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.volumes", + "params": { + "TBD": "TBD" + } + }, + { + "jsonrpc": "2.0", + "id": 2, + "method": "MediaAccess.onvolumeAvailable", + "params": { + "listen": true + } + }, + { + "jsonrpc": "2.0", + "id": 3, + "method": "MediaAccess.onvolumeUnavailable", + "params": { + "listen": true + } + } +] +``` + +Response: + +```json +[ + { + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + { + "uri": "/local/photos", + "name": "photos", + "type": "local" + } + ] + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": { + "listening": true + } + }, + { + "jsonrpc": "2.0", + "id": 3, + "result": { + "listening": true + } + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } + } +] +``` + +
+ +--- + +## Events + +### onVolumeAvailable + +_This is an private RPC method._ + +Access available Volumes with MediaFiles. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | --------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `query` | `` | true | | +| `listen` | `boolean` | true | | + +Result: + +````typescript +```typescript + +```` + +```` + +Capabilities: + +| Role | Capability | +| --------------------- | -------------------------- | +| uses | xrn:firebolt:capability:media-access:volumes | + + +#### Examples + + +Default example #1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.onVolumeAvailable", + "params": { + "correlationId": "xyz", + "query": {}, + "listen": true + } +} +```` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } +} +``` + +--- + +### onVolumeUnavailable + +_This is an private RPC method._ + +Access available Volumes with MediaFiles. + +Parameters: + +| Param | Type | Required | Description | +| --------------- | --------- | -------- | ----------- | +| `correlationId` | `string` | true | | +| `query` | `` | true | | +| `listen` | `boolean` | true | | + +Result: + +````typescript +```typescript + +```` + +```` + +Capabilities: + +| Role | Capability | +| --------------------- | -------------------------- | +| uses | xrn:firebolt:capability:media-access:volumes | + + +#### Examples + + +Default example #1 + +JSON-RPC: + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "MediaAccess.onVolumeUnavailable", + "params": { + "correlationId": "xyz", + "query": {}, + "listen": true + } +} +```` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } +} +``` + +--- + +## Types + +### VolumeType + +```typescript +VolumeType Enumeration: + +| key | value | +|-----|-------| +| USB | usb | +| LOCAL | local | + +``` + +--- + +### Volume + +````typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### MediaFile + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Metrics/index.md b/apis/pr-feature-media-access/core/Metrics/index.md new file mode 100644 index 000000000..a4012b3ab --- /dev/null +++ b/apis/pr-feature-media-access/core/Metrics/index.md @@ -0,0 +1,1609 @@ +--- +title: Metrics + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Metrics Module + +--- + +Version Metrics 1.2.0-feature-media-access.0 + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Usage](#usage) +- [Overview](#overview) +- [Methods](#methods) + - [action](#action) + - [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 +${method.signature} +``` + +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` | `` | false | | + +Promise resolution: + +```typescript +boolean +``` + +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 +} +``` + +
+ +--- + +### error + +Inform the platform of an error that has occured in your app. + +```typescript +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | --------- | -------- | --------------------------------------------------------------------------------------------- | +| `type` | `` | 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` | `` | false | Optional additional parameters to be logged with the error | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `progress` | `` | 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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `rate` | `number` | true | The new playback rate. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `entityId` | `string` | true | The entityId of the media. | +| `position` | `` | 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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `entityId` | `string` | true | The entityId of the media. | +| `target` | `` | 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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | -------------------------- | +| `entityId` | `string` | true | The entityId of the media. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------- | -------- | ----------------------- | +| `pageId` | `string` | true | Page ID of the content. | + +Promise resolution: + +```typescript +boolean +``` + +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: + +```typescript +boolean +``` + +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: + +```typescript +boolean +``` + +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: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ---------------------------------- | +| `entityId` | `string` | false | Optional entity ID of the content. | + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | -------- | -------- | ---------------------------------- | +| `entityId` | `string` | false | Optional entity ID of the content. | + +Promise resolution: + +```typescript +boolean +``` + +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 Enumeration: + +| key | value | +|-----|-------| +| 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 + +``` + +--- diff --git a/apis/pr-feature-media-access/core/Parameters/index.md b/apis/pr-feature-media-access/core/Parameters/index.md new file mode 100644 index 000000000..7f2b1e31a --- /dev/null +++ b/apis/pr-feature-media-access/core/Parameters/index.md @@ -0,0 +1,159 @@ +--- +title: Parameters + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Parameters Module + +--- + +Version Parameters 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Profile/index.md b/apis/pr-feature-media-access/core/Profile/index.md new file mode 100644 index 000000000..ab14e63c0 --- /dev/null +++ b/apis/pr-feature-media-access/core/Profile/index.md @@ -0,0 +1,247 @@ +--- +title: Profile + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# Profile Module + +--- + +Version Profile 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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-feature-media-access/core/SecondScreen/index.md b/apis/pr-feature-media-access/core/SecondScreen/index.md new file mode 100644 index 000000000..8be7ea127 --- /dev/null +++ b/apis/pr-feature-media-access/core/SecondScreen/index.md @@ -0,0 +1,601 @@ +--- +title: SecondScreen + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# SecondScreen Module + +--- + +Version SecondScreen 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | -------- | -------- | ----------------------------------------------- | +| `type` | `string` | false | The type of second screen protocol, e.g. "dial" | + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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-feature-media-access/core/SecondScreen/schemas/index.md b/apis/pr-feature-media-access/core/SecondScreen/schemas/index.md new file mode 100644 index 000000000..078d91ea0 --- /dev/null +++ b/apis/pr-feature-media-access/core/SecondScreen/schemas/index.md @@ -0,0 +1,42 @@ +--- +title: SecondScreen + +version: pr-feature-media-access +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 +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/SecureStorage/index.md b/apis/pr-feature-media-access/core/SecureStorage/index.md new file mode 100644 index 000000000..592c88b13 --- /dev/null +++ b/apis/pr-feature-media-access/core/SecureStorage/index.md @@ -0,0 +1,527 @@ +--- +title: SecureStorage + +version: pr-feature-media-access +layout: default +sdk: core +--- + +# SecureStorage Module + +--- + +Version SecureStorage 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ---------------------------------------------------------- | +| `scope` | `` | true | The scope of the key/value values: `'device' \| 'account'` | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------------------------------------------- | +| `scope` | `` | true | The scope of the key/value values: `'device' \| 'account'` | +| `key` | `string` | true | Key to get | + +Promise resolution: + +```typescript + +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | --------------------------------------------------------- | +| `scope` | `` | true | The scope of the data key values: `'device' \| 'account'` | +| `key` | `string` | true | Key to remove | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | --------------------------------------------------------- | +| `scope` | `` | true | The scope of the data key values: `'device' \| 'account'` | +| `key` | `string` | true | Key to set | +| `value` | `string` | true | Value to set | +| `options` | `` | false | Optional parameters to set | + +Promise resolution: + +```typescript +void +``` + +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 Enumeration: + +| key | value | +|-----|-------| +| DEVICE | device | +| ACCOUNT | account | + +``` + +--- + +### StorageOptions + +````typescript +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/core/Types/schemas/index.md b/apis/pr-feature-media-access/core/Types/schemas/index.md new file mode 100644 index 000000000..1ae702ecd --- /dev/null +++ b/apis/pr-feature-media-access/core/Types/schemas/index.md @@ -0,0 +1,105 @@ +--- +title: Types + +version: pr-feature-media-access +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) + - [BooleanMap](#booleanmap) + - [SemanticVersion](#semanticversion) + - [LocalizedString](#localizedstring) + - [FlatMap](#flatmap) + - [Timeout](#timeout) + +## Overview + +undefined + +## Types + +### AudioProfile + +```typescript +AudioProfile Enumeration: + +| key | value | +|-----|-------| +| 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 | + +``` + +--- + +### BooleanMap + +````typescript +```typescript + +```` + +```` + + + +--- + +### SemanticVersion + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### 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 + +```` + +--- + +### 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-feature-media-access/core/changelog.md b/apis/pr-feature-media-access/core/changelog.md new file mode 100644 index 000000000..440aa92c2 --- /dev/null +++ b/apis/pr-feature-media-access/core/changelog.md @@ -0,0 +1,216 @@ +--- +title: Change Log + +version: pr-feature-media-access +layout: default +sdk: core +--- +# [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-feature-media-access/core/index.md b/apis/pr-feature-media-access/core/index.md new file mode 100644 index 000000000..13a604236 --- /dev/null +++ b/apis/pr-feature-media-access/core/index.md @@ -0,0 +1,30 @@ +--- +title: Firebolt Core SDK + +version: pr-feature-media-access +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-feature-media-access/index.md b/apis/pr-feature-media-access/index.md new file mode 100644 index 000000000..8a10c5ec8 --- /dev/null +++ b/apis/pr-feature-media-access/index.md @@ -0,0 +1,607 @@ +--- +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: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:media-access:*` + +| Uses | +| ---- | +| [MediaAccess.media](./core/MediaAccess/#media) | + + +### `xrn:firebolt:capability:media-access:audio` + +| Uses | +| ---- | +| [MediaAccess.audio](./core/MediaAccess/#audio) | + + +### `xrn:firebolt:capability:media-access:files` + +| Uses | +| ---- | +| [MediaAccess.files](./core/MediaAccess/#files) | + + +### `xrn:firebolt:capability:media-access:images` + +| Uses | +| ---- | +| [MediaAccess.images](./core/MediaAccess/#images) | + + +### `xrn:firebolt:capability:media-access:video` + +| Uses | +| ---- | +| [MediaAccess.video](./core/MediaAccess/#video) | + + +### `xrn:firebolt:capability:media-access:volumes` + +| Uses | +| ---- | +| [MediaAccess.volumes](./core/MediaAccess/#volumes)
[MediaAccess.onVolumeAvailable](./core/MediaAccess/#volumeavailable)
[MediaAccess.onVolumeUnavailable](./core/MediaAccess/#volumeunavailable)
[MediaAccess.stopVolumes](./core/MediaAccess/#stopvolumes) | + + +### `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) | + + +### `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-feature-media-access/manage/Accessibility/schemas/index.md b/apis/pr-feature-media-access/manage/Accessibility/schemas/index.md new file mode 100644 index 000000000..5a1235df7 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Accessibility/schemas/index.md @@ -0,0 +1,150 @@ +--- +title: Accessibility + +version: pr-feature-media-access +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 +```typescript + +```` + +```` + +See also: + + + +--- + +### FontSize + + + +```typescript + +```` + +--- + +### Color + +```typescript + +``` + +--- + +### FontEdge + +```typescript + +``` + +--- + +### Opacity + +```typescript + +``` + +--- + +### HorizontalAlignment + +```typescript + +``` + +--- + +### VerticalAlignment + +```typescript + +``` + +--- + +### ClosedCaptionsStyles + +The default styles to use when displaying closed-captions + +````typescript +```typescript + +```` + +```` + + + +--- + +### ClosedCaptionsSettings + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Account/index.md b/apis/pr-feature-media-access/manage/Account/index.md new file mode 100644 index 000000000..051dbb32c --- /dev/null +++ b/apis/pr-feature-media-access/manage/Account/index.md @@ -0,0 +1,139 @@ +--- +title: Account + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Account Module + +--- + +Version Account 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ----------- | ---- | -------- | ----------- | +| `token` | `` | true | | +| `expiresIn` | `` | true | minumum: 1 | + +Promise resolution: + +```typescript +void +``` + +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-feature-media-access/manage/AcknowledgeChallenge/index.md b/apis/pr-feature-media-access/manage/AcknowledgeChallenge/index.md new file mode 100644 index 000000000..4e8940ab4 --- /dev/null +++ b/apis/pr-feature-media-access/manage/AcknowledgeChallenge/index.md @@ -0,0 +1,544 @@ +--- +title: AcknowledgeChallenge + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# AcknowledgeChallenge Module + +--- + +Version AcknowledgeChallenge 1.2.0-feature-media-access.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` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | true | | + +Result: + +```typescript + +``` + +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: + +```typescript + +``` + +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` | `` | true | | + +Result: + +```typescript + +``` + +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: + +````typescript +```typescript + +```` + +```` + +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 +```typescript + +```` + +```` + + + +--- + +### ChallengeRequestor + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### Challenge + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### ChallengeProviderRequest + + + +```typescript +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Advertising/index.md b/apis/pr-feature-media-access/manage/Advertising/index.md new file mode 100644 index 000000000..bab57e1ca --- /dev/null +++ b/apis/pr-feature-media-access/manage/Advertising/index.md @@ -0,0 +1,562 @@ +--- +title: Advertising + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Advertising Module + +--- + +Version Advertising 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +SkipRestriction Enumeration: + +| key | value | +|-----|-------| +| NONE | none | +| ADS_UNWATCHED | adsUnwatched | +| ADS_ALL | adsAll | +| ALL | all | + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------------------------------- | +| `value` | `` | true | values: `'none' \| 'adsUnwatched' \| 'adsAll' \| 'all'` | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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-feature-media-access/manage/Advertising/schemas/index.md b/apis/pr-feature-media-access/manage/Advertising/schemas/index.md new file mode 100644 index 000000000..5ba4d6dc7 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Advertising/schemas/index.md @@ -0,0 +1,55 @@ +--- +title: Advertising + +version: pr-feature-media-access +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 Enumeration: + +| key | value | +|-----|-------| +| NONE | none | +| ADS_UNWATCHED | adsUnwatched | +| ADS_ALL | adsAll | +| ALL | all | + +``` + +--- diff --git a/apis/pr-feature-media-access/manage/AudioDescriptions/index.md b/apis/pr-feature-media-access/manage/AudioDescriptions/index.md new file mode 100644 index 000000000..cb60f5848 --- /dev/null +++ b/apis/pr-feature-media-access/manage/AudioDescriptions/index.md @@ -0,0 +1,487 @@ +--- +title: AudioDescriptions + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# AudioDescriptions Module + +--- + +Version AudioDescriptions 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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-feature-media-access/manage/Capabilities/schemas/index.md b/apis/pr-feature-media-access/manage/Capabilities/schemas/index.md new file mode 100644 index 000000000..c23ac70bc --- /dev/null +++ b/apis/pr-feature-media-access/manage/Capabilities/schemas/index.md @@ -0,0 +1,121 @@ +--- +title: Capabilities + +version: pr-feature-media-access +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 Enumeration: + +| key | value | +|-----|-------| +| USE | use | +| MANAGE | manage | +| PROVIDE | provide | + +``` + +--- + +### DenyReason + +Reasons why a Capability might not be invokable + +```typescript +DenyReason Enumeration: + +| key | value | +|-----|-------| +| 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 +```typescript + +```` + +```` + +See also: + + + + +--- + +### Permission + +A capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user). + +```typescript +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/ClosedCaptions/index.md b/apis/pr-feature-media-access/manage/ClosedCaptions/index.md new file mode 100644 index 000000000..0e4c9436b --- /dev/null +++ b/apis/pr-feature-media-access/manage/ClosedCaptions/index.md @@ -0,0 +1,6447 @@ +--- +title: ClosedCaptions + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# ClosedCaptions Module + +--- + +Version ClosedCaptions 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +FontEdge Enumeration: + +| key | value | +|-----|-------| +| NONE | none | +| RAISED | raised | +| DEPRESSED | depressed | +| UNIFORM | uniform | +| DROP_SHADOW_LEFT | drop_shadow_left | +| DROP_SHADOW_RIGHT | drop_shadow_right | + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +FontFamily Enumeration: + +| key | value | +|-----|-------| +| MONOSPACED_SERIF | monospaced_serif | +| PROPORTIONAL_SERIF | proportional_serif | +| MONOSPACED_SANSERIF | monospaced_sanserif | +| PROPORTIONAL_SANSERIF | proportional_sanserif | +| SMALLCAPS | smallcaps | +| CURSIVE | cursive | +| CASUAL | casual | + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------------------------------------------------------- | +| `value` | `` | true | the preferred closed captions languages pattern: ^[a-z]{3}$ | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ----------- | +| `value` | `` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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-feature-media-access/manage/Device/index.md b/apis/pr-feature-media-access/manage/Device/index.md new file mode 100644 index 000000000..8077f3002 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Device/index.md @@ -0,0 +1,685 @@ +--- +title: Device + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Device Module + +--- + +Version Device 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ------------------------ | +| `value` | `string` | true | the device friendly-name | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +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: + +```typescript +void +``` + +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: + +```typescript +string +``` + +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-feature-media-access/manage/Discovery/index.md b/apis/pr-feature-media-access/manage/Discovery/index.md new file mode 100644 index 000000000..d5182ae11 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Discovery/index.md @@ -0,0 +1,313 @@ +--- +title: Discovery + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Discovery Module + +--- + +Version Discovery 1.2.0-feature-media-access.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: + +| Property | Type | Description | +| -------- | ------ | ----------- | +| `appId` | string | | + +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: + +| Property | Type | Description | +| -------- | ------ | ----------- | +| `appId` | string | | + +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-feature-media-access/manage/Discovery/schemas/index.md b/apis/pr-feature-media-access/manage/Discovery/schemas/index.md new file mode 100644 index 000000000..17fe1e51a --- /dev/null +++ b/apis/pr-feature-media-access/manage/Discovery/schemas/index.md @@ -0,0 +1,62 @@ +--- +title: Discovery + +version: pr-feature-media-access +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) + - [EntityInfoResult](#entityinforesult) + - [PurchasedContentResult](#purchasedcontentresult) + +## Overview + +undefined + +## Types + +### EntityInfoResult + +The result for an `entityInfo()` push or pull. + +````typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### PurchasedContentResult + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Entertainment/schemas/index.md b/apis/pr-feature-media-access/manage/Entertainment/schemas/index.md new file mode 100644 index 000000000..83182d91b --- /dev/null +++ b/apis/pr-feature-media-access/manage/Entertainment/schemas/index.md @@ -0,0 +1,268 @@ +--- +title: Entertainment + +version: pr-feature-media-access +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) + - [ProgramType](#programtype) + - [MusicType](#musictype) + - [ContentIdentifiers](#contentidentifiers) + - [Entitlement](#entitlement) + - [ContentRating](#contentrating) +- [United States](#united-states) +- [Canada](#canada) + - [WayToWatch](#waytowatch) + - [EntityInfo](#entityinfo) + +## Overview + +undefined + +## Types + +### OfferingType + +The offering type of the WayToWatch. + +```typescript +OfferingType Enumeration: + +| key | value | +|-----|-------| +| FREE | free | +| SUBSCRIBE | subscribe | +| BUY | buy | +| RENT | rent | + +``` + +--- + +### ProgramType + +In the case of a program `entityType`, specifies the program type. + +```typescript +ProgramType Enumeration: + +| key | value | +|-----|-------| +| 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 | + +``` + +--- + +### MusicType + +In the case of a music `entityType`, specifies the type of music entity. + +```typescript +MusicType Enumeration: + +| key | value | +|-----|-------| +| SONG | song | +| ALBUM | album | + +``` + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### Entitlement + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + + + +--- + +### 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 +```typescript + +```` + +``` + +See also: + + + + + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/HDMIInput/index.md b/apis/pr-feature-media-access/manage/HDMIInput/index.md new file mode 100644 index 000000000..d90b3d777 --- /dev/null +++ b/apis/pr-feature-media-access/manage/HDMIInput/index.md @@ -0,0 +1,1920 @@ +--- +title: HDMIInput + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# HDMIInput Module + +--- + +Version HDMIInput 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | ---- | -------- | --------------------- | +| `port` | `` | true | pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +```typescript +boolean +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, | `value` | [`boolean`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | --------------------- | +| `port` | `` | true | pattern: ^HDMI[0-9]+$ | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | ---- | -------- | --------------------- | +| `port` | `` | true | pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +```typescript +EDIDVersion Enumeration: + +| key | value | +|-----|-------| +| V1_4 | 1.4 | +| V2_0 | 2.0 | +| UNKNOWN | unknown | + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, | `value` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------------- | +| `port` | `` | true | pattern: ^HDMI[0-9]+$ | +| `value` | `` | true | values: `'1.4' \| '2.0' \| 'unknown'` | + +Promise resolution: + +```typescript + +``` + +#### 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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +, callback: (value) => ): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------ | ---- | -------- | --------------------- | +| `port` | `` | 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | ---- | -------- | --------------------- | +| `portId` | `` | true | pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | ---- | -------- | --------------------- | +| `portId` | `` | true | pattern: ^HDMI[0-9]+$ | + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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 Enumeration: + +| key | value | +|-----|-------| +| V1_4 | 1.4 | +| V2_0 | 2.0 | +| UNKNOWN | unknown | + +``` + +--- + +### HDMISignalStatus + +```typescript +HDMISignalStatus Enumeration: + +| key | value | +|-----|-------| +| NONE | none | +| STABLE | stable | +| UNSTABLE | unstable | +| UNSUPPORTED | unsupported | +| UNKNOWN | unknown | + +``` + +--- + +### HDMIPortId + +```typescript + +``` + +--- + +### SignalChangedInfo + +````typescript +```typescript + +```` + +```` + +See also: + + + + +--- + +### AutoLowLatencyModeSignalChangedInfo + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### HDMIInputPort + + + +```typescript +```typescript + +```` + +```` + +See also: + + + + + +--- + +### AutoLowLatencyModeCapableChangedInfo + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### ConnectionChangedInfo + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Intents/schemas/index.md b/apis/pr-feature-media-access/manage/Intents/schemas/index.md new file mode 100644 index 000000000..afa3b0db2 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Intents/schemas/index.md @@ -0,0 +1,416 @@ +--- +title: Intents + +version: pr-feature-media-access +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) + - [ProgramEntity](#programentity) + - [Identifier](#identifier) + - [SearchIntent](#searchintent) + - [SectionIntent](#sectionintent) + - [ChannelEntity](#channelentity) + - [MusicEntity](#musicentity) + - [PlayQueryIntent](#playqueryintent) + - [HomeIntent](#homeintent) + - [LaunchIntent](#launchintent) + - [TVSeriesEntity](#tvseriesentity) + - [PlaylistEntity](#playlistentity) + - [TVSeasonEntity](#tvseasonentity) + - [AdditionalEntity](#additionalentity) + - [MovieEntity](#movieentity) + - [TVEpisodeEntity](#tvepisodeentity) + - [UntypedEntity](#untypedentity) + - [EntityIntent](#entityintent) + - [PlayableEntity](#playableentity) + - [TuneIntent](#tuneintent) + - [PlayEntityIntent](#playentityintent) + - [PlaybackIntent](#playbackintent) + - [NavigationIntent](#navigationintent) + +## Overview + +undefined + +## Types + +### Intent + +A Firebolt compliant representation of a user intention. + +```typescript + +``` + +--- + +### IntentProperties + +```typescript + +``` + +--- + +### ProgramEntity + +````typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### Identifier + + + +```typescript + +```` + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### ChannelEntity + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### MusicEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + + +--- + +### 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 +```typescript + +```` + +```` + + + +--- + +### LaunchIntent + +A Firebolt compliant representation of a user intention to launch an app. + +```typescript +```typescript + +```` + +```` + + + +--- + +### TVSeriesEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### PlaylistEntity + +A Firebolt compliant representation of a Playlist entity. + +```typescript +```typescript + +```` + +```` + + + +--- + +### TVSeasonEntity + +A Firebolt compliant representation of a TV Season entity. + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### AdditionalEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### MovieEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### TVEpisodeEntity + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### UntypedEntity + + + +```typescript +```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 +```typescript + +```` + +```` + +See also: + + + + + + + + + + +--- + +### PlayableEntity + + + +```typescript + +```` + +See also: + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + +--- + +### 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 +```typescript + +```` + +```` + +See also: + + + +--- + +### NavigationIntent + +A Firebolt compliant representation of a user intention to navigate to a specific place in an app. + +```typescript + +```` + +See also: + +--- diff --git a/apis/pr-feature-media-access/manage/Keyboard/index.md b/apis/pr-feature-media-access/manage/Keyboard/index.md new file mode 100644 index 000000000..fca634ccd --- /dev/null +++ b/apis/pr-feature-media-access/manage/Keyboard/index.md @@ -0,0 +1,1068 @@ +--- +title: Keyboard + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Keyboard Module + +--- + +Version Keyboard 1.2.0-feature-media-access.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) + - [KeyboardResult](#keyboardresult) + - [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` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | true | | + +Result: + +```typescript + +``` + +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: + +```typescript + +``` + +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` | `` | true | | + +Result: + +```typescript + +``` + +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": { + "text": "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` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | true | | + +Result: + +```typescript + +``` + +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: + +```typescript + +``` + +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` | `` | true | | + +Result: + +```typescript + +``` + +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": { + "text": "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` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | true | | + +Result: + +```typescript + +``` + +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: + +```typescript + +``` + +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` | `` | true | | + +Result: + +```typescript + +``` + +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": { + "text": "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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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: + +````typescript +```typescript + +```` + +```` + +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 { + text: 'username', + } + } + + async password(parameters, session) { + return { + text: 'password', + } + } + + async email(parameters, session) { + return { + text: '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": { + "text": "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": { + "text": "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": { + "text": "email@address.com" + } + } +} +``` + +Response: + +```json +{ + "id": 6, + "result": true +} +``` + +
+ +## Types + +### KeyboardResult + +````typescript +```typescript + +```` + +```` + + + +--- + +### KeyboardParameters + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### KeyboardProviderRequest + + + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Lifecycle/schemas/index.md b/apis/pr-feature-media-access/manage/Lifecycle/schemas/index.md new file mode 100644 index 000000000..2c287240c --- /dev/null +++ b/apis/pr-feature-media-access/manage/Lifecycle/schemas/index.md @@ -0,0 +1,65 @@ +--- +title: Lifecycle + +version: pr-feature-media-access +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 Enumeration: + +| key | value | +|-----|-------| +| REMOTE_BUTTON | remoteButton | +| USER_EXIT | userExit | +| DONE | done | +| ERROR | error | + +``` + +--- + +### LifecycleState + +The application lifecycle state + +```typescript +LifecycleState Enumeration: + +| key | value | +|-----|-------| +| INITIALIZING | initializing | +| INACTIVE | inactive | +| FOREGROUND | foreground | +| BACKGROUND | background | +| UNLOADING | unloading | +| SUSPENDED | suspended | + +``` + +--- diff --git a/apis/pr-feature-media-access/manage/Localization/index.md b/apis/pr-feature-media-access/manage/Localization/index.md new file mode 100644 index 000000000..a9c35f2ec --- /dev/null +++ b/apis/pr-feature-media-access/manage/Localization/index.md @@ -0,0 +1,2720 @@ +--- +title: Localization + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Localization Module + +--- + +Version Localization 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------------------- | +| `key` | `string` | true | Key to add additionalInfo | +| `value` | `string` | true | Value to be set for additionalInfo | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +| Property | Type | Description | +|----------|------|-------------| +| `${property}` | ${type} | | + +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------------------- | +| `value` | `` | true | the device country code pattern: ^[A-Z]{2}$ | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------------------ | +| `value` | `` | true | the device language pattern: ^[A-Za-z]{2}$ | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------------------------------- | +| `value` | `` | true | the device locale pattern: ^[a-zA-Z]+([a-zA-Z0-9\-]\*)$ | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | --------------- | +| `value` | `` | true | the device city | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Promise resolution: + +```typescript +string +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------- | +| `value` | `string` | true | the device postal code | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------------------------- | +| `value` | `` | true | the preferred audio languages pattern: ^[a-z]{3}$ | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ----- | -------- | -------- | ---------------------------- | +| `key` | `string` | true | Key to remove additionalInfo | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | ---- | -------- | ------------------------------ | +| `value` | `` | true | pattern: ^[-+_/ A-Za-z 0-9]\*$ | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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-feature-media-access/manage/Localization/schemas/index.md b/apis/pr-feature-media-access/manage/Localization/schemas/index.md new file mode 100644 index 000000000..a72c49ca9 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Localization/schemas/index.md @@ -0,0 +1,79 @@ +--- +title: Localization + +version: pr-feature-media-access +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-feature-media-access/manage/Metrics/index.md b/apis/pr-feature-media-access/manage/Metrics/index.md new file mode 100644 index 000000000..746dbaf67 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Metrics/index.md @@ -0,0 +1,145 @@ +--- +title: Metrics + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Metrics Module + +--- + +Version Metrics 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| -------- | -------- | -------- | -------------------------------------------------- | +| `schema` | `string` | true | The schema URI of the metric type
format: uri | +| `data` | `` | true | A JSON payload conforming the the provided schema | + +Promise resolution: + +```typescript + +``` + +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 + +``` + +--- + +### EventObject + +````typescript +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/PinChallenge/index.md b/apis/pr-feature-media-access/manage/PinChallenge/index.md new file mode 100644 index 000000000..aa94ed77b --- /dev/null +++ b/apis/pr-feature-media-access/manage/PinChallenge/index.md @@ -0,0 +1,573 @@ +--- +title: PinChallenge + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# PinChallenge Module + +--- + +Version PinChallenge 1.2.0-feature-media-access.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` | [` | Property | Type | Description | +| ---------- | ------ | ------------- | +| `${property}` | [${type}](${type.link}) | ${description} | +| `](#) | true | | + +Result: + +```typescript + +``` + +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: + +```typescript + +``` + +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` | `` | true | | + +Result: + +```typescript + +``` + +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: + +````typescript +```typescript + +```` + +```` + +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 Enumeration: + +| key | value | +|-----|-------| +| NO_PIN_REQUIRED | noPinRequired | +| NO_PIN_REQUIRED_WINDOW | noPinRequiredWindow | +| EXCEEDED_PIN_FAILURES | exceededPinFailures | +| CORRECT_PIN | correctPin | +| CANCELLED | cancelled | + +``` + +--- + +### ChallengeRequestor + +````typescript +```typescript + +```` + +```` + + + +--- + +### PinChallengeResult + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### PinChallenge + + + +```typescript +```typescript + +```` + +```` + +See also: + + + +--- + +### PinChallengeProviderRequest + + + +```typescript +```typescript + +```` + +``` + +See also: + + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Privacy/index.md b/apis/pr-feature-media-access/manage/Privacy/index.md new file mode 100644 index 000000000..35924bacf --- /dev/null +++ b/apis/pr-feature-media-access/manage/Privacy/index.md @@ -0,0 +1,4295 @@ +--- +title: Privacy + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Privacy Module + +--- + +Version Privacy 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/SecondScreen/schemas/index.md b/apis/pr-feature-media-access/manage/SecondScreen/schemas/index.md new file mode 100644 index 000000000..3064c797d --- /dev/null +++ b/apis/pr-feature-media-access/manage/SecondScreen/schemas/index.md @@ -0,0 +1,42 @@ +--- +title: SecondScreen + +version: pr-feature-media-access +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 +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/SecureStorage/index.md b/apis/pr-feature-media-access/manage/SecureStorage/index.md new file mode 100644 index 000000000..cb0e9c065 --- /dev/null +++ b/apis/pr-feature-media-access/manage/SecureStorage/index.md @@ -0,0 +1,375 @@ +--- +title: SecureStorage + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# SecureStorage Module + +--- + +Version SecureStorage 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------------------------------------------- | +| `appId` | `string` | true | appId for which values are removed | +| `scope` | `` | true | The scope of the key/value values: `'device' \| 'account'` | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ---------------------------------------------------------- | +| `appId` | `string` | true | appId for which values are removed | +| `scope` | `` | true | The scope of the key/value values: `'device' \| 'account'` | +| `key` | `string` | true | Key to remove | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| --------- | -------- | -------- | --------------------------------------------------------- | +| `appId` | `string` | true | appId for which value is being set | +| `scope` | `` | true | The scope of the data key values: `'device' \| 'account'` | +| `key` | `string` | true | Key to set | +| `value` | `string` | true | Value to set | +| `options` | `` | false | Optional parameters to set | + +Promise resolution: + +```typescript +void +``` + +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 Enumeration: + +| key | value | +|-----|-------| +| DEVICE | device | +| ACCOUNT | account | + +``` + +--- + +### StorageOptions + +````typescript +```typescript + +```` + +``` + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/Types/schemas/index.md b/apis/pr-feature-media-access/manage/Types/schemas/index.md new file mode 100644 index 000000000..02f60e13d --- /dev/null +++ b/apis/pr-feature-media-access/manage/Types/schemas/index.md @@ -0,0 +1,105 @@ +--- +title: Types + +version: pr-feature-media-access +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) + - [BooleanMap](#booleanmap) + - [SemanticVersion](#semanticversion) + - [LocalizedString](#localizedstring) + - [FlatMap](#flatmap) + - [Timeout](#timeout) + +## Overview + +undefined + +## Types + +### AudioProfile + +```typescript +AudioProfile Enumeration: + +| key | value | +|-----|-------| +| 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 | + +``` + +--- + +### BooleanMap + +````typescript +```typescript + +```` + +```` + + + +--- + +### SemanticVersion + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### 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 + +```` + +--- + +### 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-feature-media-access/manage/UserGrants/index.md b/apis/pr-feature-media-access/manage/UserGrants/index.md new file mode 100644 index 000000000..72d9c3e36 --- /dev/null +++ b/apis/pr-feature-media-access/manage/UserGrants/index.md @@ -0,0 +1,870 @@ +--- +title: UserGrants + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# UserGrants Module + +--- + +Version UserGrants 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | -------- | -------- | ----------- | +| `appId` | `string` | true | | + +Promise resolution: + +```typescript + +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | + +Promise resolution: + +```typescript + +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `role` | `` | true | values: `'use' \| 'manage' \| 'provide'` | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | `` | false | | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `role` | `` | true | values: `'use' \| 'manage' \| 'provide'` | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | `` | false | | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | ---- | -------- | ----------------------------------------------------------------- | +| `role` | `` | true | values: `'use' \| 'manage' \| 'provide'` | +| `capability` | `` | true | pattern: ^xrn:firebolt:capability:([a-z0-9\-]+)((:[a-z0-9\-]+)?)$ | +| `options` | `` | false | | + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | -------- | -------- | --------------- | +| `appId` | `string` | true | | +| `permissions` | `` | true | | +| `options` | `` | false | Request options | + +Promise resolution: + +```typescript + +``` + +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 Enumeration: + +| key | value | +|-----|-------| +| GRANTED | granted | +| DENIED | denied | + +``` + +--- + +### GrantModificationOptions + +Options when modifying any grant + +````typescript +```typescript + +```` + +```` + + + +--- + +### RequestOptions + + + +```typescript +```typescript + +```` + +```` + + + +--- + +### AppInfo + +Information about an app that a grant was for + +```typescript +```typescript + +```` + +```` + + + +--- + +### GrantInfo + +Information about a grant given by a user + +```typescript +```typescript + +```` + +``` + +See also: + + + + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/VoiceGuidance/index.md b/apis/pr-feature-media-access/manage/VoiceGuidance/index.md new file mode 100644 index 000000000..bbd82ee97 --- /dev/null +++ b/apis/pr-feature-media-access/manage/VoiceGuidance/index.md @@ -0,0 +1,823 @@ +--- +title: VoiceGuidance + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# VoiceGuidance Module + +--- + +Version VoiceGuidance 1.2.0-feature-media-access.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 +${method.signature} +``` + +Promise resolution: + +```typescript +boolean +``` + +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`](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ------- | --------- | -------- | ----------- | +| `value` | `boolean` | true | | + +Promise resolution: + +```typescript + +``` + +#### 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 +${method.signature} +``` + +Promise resolution: + +```typescript + +``` + +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` | [``](${method.param.link}) | ${method.param.required} | ${method.param.summary} ${method.param.constraints} | +): Promise +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | ---- | -------- | ------------ | +| `value` | `` | true | minumum: 0.5 | +| maximum: 2 | + +Promise resolution: + +```typescript + +``` + +#### 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) => ): 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-feature-media-access/manage/Wifi/index.md b/apis/pr-feature-media-access/manage/Wifi/index.md new file mode 100644 index 000000000..1b8a6db31 --- /dev/null +++ b/apis/pr-feature-media-access/manage/Wifi/index.md @@ -0,0 +1,576 @@ +--- +title: Wifi + +version: pr-feature-media-access +layout: default +sdk: manage +--- + +# Wifi Module + +--- + +Version Wifi 1.2.0-feature-media-access.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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ssid` | `string` | false | | +| `passphrase` | `string` | false | | +| `security` | `` | false | values: `'none' \| 'wep64' \| 'wep128' \| 'wpaPskTkip' \| 'wpaPskAes' \| 'wpa2PskTkip' \| 'wpa2PskAes' \| 'wpaEnterpriseTkip' \| 'wpaEnterpriseAes' \| 'wpa2EnterpriseTkip' \| 'wpa2EnterpriseAes' \| 'wpa2Psk' \| 'wpa2Enterprise' \| 'wpa3PskAes' \| 'wpa3Sae'` | + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Promise resolution: + +```typescript +void +``` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ------------- | ---- | -------- | ----------- | +| `timeout` | `` | false | minumum: 0 | +| maximum: 9999 | + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 +${method.signature} +``` + +Parameters: + +| Param | Type | Required | Description | +| ---------- | ---- | -------- | ---------------------------------------------------- | +| `security` | `` | false | values: `'pushButton' \| 'pin' \| 'manufacturerPin'` | + +Promise resolution: + +````typescript +```typescript + +```` + +```` + +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 Enumeration: + +| key | value | +|-----|-------| +| 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 Enumeration: + +| key | value | +|-----|-------| +| 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 +```typescript + +```` + +```` + +See also: + + + + + +--- + +### AccessPointList + +List of scanned Wifi networks available near the device. + +```typescript +```typescript + +```` + +``` + +See also: + + + +--- +``` diff --git a/apis/pr-feature-media-access/manage/changelog.md b/apis/pr-feature-media-access/manage/changelog.md new file mode 100644 index 000000000..fbbcb29ad --- /dev/null +++ b/apis/pr-feature-media-access/manage/changelog.md @@ -0,0 +1,121 @@ +--- +title: Change Log + +version: pr-feature-media-access +layout: default +sdk: manage +--- +# [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-feature-media-access/manage/index.md b/apis/pr-feature-media-access/manage/index.md new file mode 100644 index 000000000..69b23495f --- /dev/null +++ b/apis/pr-feature-media-access/manage/index.md @@ -0,0 +1,30 @@ +--- +title: Firebolt Manage SDK + +version: pr-feature-media-access +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-feature-media-access/glossary/index.md b/requirements/pr-feature-media-access/glossary/index.md new file mode 100644 index 000000000..49b9d766c --- /dev/null +++ b/requirements/pr-feature-media-access/glossary/index.md @@ -0,0 +1,84 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/governance/index.md b/requirements/pr-feature-media-access/governance/index.md new file mode 100644 index 000000000..c4730054e --- /dev/null +++ b/requirements/pr-feature-media-access/governance/index.md @@ -0,0 +1,232 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/images/governance/approval-track.png b/requirements/pr-feature-media-access/images/governance/approval-track.png new file mode 100644 index 000000000..696954781 Binary files /dev/null and b/requirements/pr-feature-media-access/images/governance/approval-track.png differ diff --git a/requirements/pr-feature-media-access/images/governance/branching.png b/requirements/pr-feature-media-access/images/governance/branching.png new file mode 100644 index 000000000..a61b11909 Binary files /dev/null and b/requirements/pr-feature-media-access/images/governance/branching.png differ diff --git a/requirements/pr-feature-media-access/images/governance/structure.png b/requirements/pr-feature-media-access/images/governance/structure.png new file mode 100644 index 000000000..32bb2763a Binary files /dev/null and b/requirements/pr-feature-media-access/images/governance/structure.png differ diff --git a/requirements/pr-feature-media-access/images/specifications/media/access/media/image1.png b/requirements/pr-feature-media-access/images/specifications/media/access/media/image1.png new file mode 100644 index 000000000..9f1e850a1 Binary files /dev/null and b/requirements/pr-feature-media-access/images/specifications/media/access/media/image1.png differ diff --git a/requirements/pr-feature-media-access/specifications/entities/channels/index.md b/requirements/pr-feature-media-access/specifications/entities/channels/index.md new file mode 100644 index 000000000..d15013b47 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/entities/channels/index.md @@ -0,0 +1,65 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/specifications/entities/index.md b/requirements/pr-feature-media-access/specifications/entities/index.md new file mode 100644 index 000000000..e30455200 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/entities/index.md @@ -0,0 +1,94 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/specifications/entities/music/index.md b/requirements/pr-feature-media-access/specifications/entities/music/index.md new file mode 100644 index 000000000..b0458124e --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/entities/music/index.md @@ -0,0 +1,82 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/specifications/entities/programs/index.md b/requirements/pr-feature-media-access/specifications/entities/programs/index.md new file mode 100644 index 000000000..95e091901 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/entities/programs/index.md @@ -0,0 +1,108 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/specifications/firebolt-open-rpc.json b/requirements/pr-feature-media-access/specifications/firebolt-open-rpc.json new file mode 100644 index 000000000..0f2787cd3 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/firebolt-open-rpc.json @@ -0,0 +1,21899 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Firebolt JSON-RPC API", + "version": "1.2.0-feature-media-access.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", + "MediaAccess": "A module for access user-cultivated media files, e.g. photos on a USB drive.", + "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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" + } + ], + "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": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.purchasedContent", + "tags": [ + { + "name": "polymorphic-pull" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + } + ], + "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.onPolicyChanged", + "summary": "get the discovery policy", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "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" + } + ], + "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" + } + ], + "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": "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": "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": "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": "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-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-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-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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "text": "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": "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": "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": "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": "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": "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": "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": "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": "MediaAccess.volumes", + "tags": [ + { + "name": "temporal-set" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Volume" + } + } + ], + "result": { + "name": "volumes", + "schema": { + "type": "array", + "items": { + "title": "Volume", + "$ref": "#/components/schemas/Volume" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "query", + "value": {} + } + ], + "result": { + "name": "volumes", + "value": [ + { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + { + "uri": "/local/photos", + "name": "photos", + "type": "local" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.audio", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:audio" + ] + } + ], + "summary": "Access available audio MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.video", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:video" + ] + } + ], + "summary": "Access available video MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.images", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:images" + ] + } + ], + "summary": "Access available image MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.media", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:*" + ] + } + ], + "summary": "Access all available MediaFiles of either audio, video, or image types.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + }, + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + }, + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.files", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:files" + ] + } + ], + "summary": "Access all available MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/notes.txt", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "text/plain" + }, + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + }, + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + }, + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.onVolumeAvailable", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-temporal-for": "volumes" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "volumes", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "title": "Volume", + "$ref": "#/components/schemas/Volume" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "correlationId", + "value": "xyz" + }, + { + "name": "query", + "value": {} + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "volumes", + "value": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } + } + } + ] + }, + { + "name": "MediaAccess.onVolumeUnavailable", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-temporal-for": "volumes" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "volumes", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "title": "Volume", + "$ref": "#/components/schemas/Volume" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "correlationId", + "value": "xyz" + }, + { + "name": "query", + "value": {} + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "volumes", + "value": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } + } + } + ] + }, + { + "name": "MediaAccess.stopVolumes", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "correlationId", + "value": "xyz" + } + ], + "result": { + "name": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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" + } + ] + }, + "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" + ] + }, + "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" + } + } + }, + "KeyboardResult": { + "title": "KeyboardResult", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string", + "description": "The text the user entered into the keyboard" + }, + "canceled": { + "type": "boolean", + "description": "Whether the user canceled entering text before they were finished typing on the keyboard" + } + } + }, + "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 + }, + "Volume": { + "title": "Volume", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/VolumeType" + } + } + }, + "VolumeType": { + "title": "VolumeType", + "type": "string", + "enum": [ + "usb", + "local" + ] + }, + "MediaFile": { + "title": "MediaFile", + "type": "object", + "properties": { + "volume": { + "$ref": "#/components/schemas/Volume" + }, + "uri": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "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" + ] + } + } + }, + "BooleanMap": { + "title": "BooleanMap", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "AudioProfile": { + "title": "AudioProfile", + "type": "string", + "enum": [ + "stereo", + "dolbyDigital5.1", + "dolbyDigital7.1", + "dolbyDigital5.1+", + "dolbyDigital7.1+", + "dolbyAtmos" + ] + }, + "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", + "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 + } + }, + "Entertainment": { + "uri": "https://meta.comcast.com/firebolt/entertainment", + "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." + }, + "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", + "programType", + "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" + ] + } + } + }, + "OfferingType": { + "title": "OfferingType", + "type": "string", + "enum": [ + "free", + "subscribe", + "buy", + "rent" + ], + "description": "The offering type of the WayToWatch." + }, + "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" + ] + }, + "MusicType": { + "title": "MusicType", + "type": "string", + "description": "In the case of a music `entityType`, specifies the type of music entity.", + "enum": [ + "song", + "album" + ] + }, + "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" + }, + "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." + } + }, + "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" + } + } + } + ], + "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" + } + } + } + ], + "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": { + "anyOf": [ + { + "$ref": "#/x-schemas/Intents/MovieEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVSeriesEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVSeasonEntity" + }, + { + "$ref": "#/x-schemas/Intents/MusicEntity" + }, + { + "$ref": "#/x-schemas/Intents/PlaylistEntity" + }, + { + "$ref": "#/x-schemas/Intents/AdditionalEntity" + }, + { + "$ref": "#/x-schemas/Intents/UntypedEntity" + } + ] + } + } + } + ], + "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/Intents/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 + } + } + } + ], + "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/Intents/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/Intents/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": { + "maxProperties": 1 + } + } + }, + "else": { + "type": "object", + "properties": { + "options": { + "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" + ] + } + }, + "MovieEntity": { + "title": "MovieEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of a Movie entity.", + "title": "MovieEntity", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "movie" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + ] + }, + "TVEpisodeEntity": { + "title": "TVEpisodeEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of a TV Episode entity.", + "title": "TVEpisodeEntity", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId", + "seasonId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "episode" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "seriesId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "seasonId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + } + ] + }, + "TVSeriesEntity": { + "title": "TVSeriesEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of a TV Series entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "series" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "series", + "entityId": "breaking-bad" + } + ] + }, + "TVSeasonEntity": { + "title": "TVSeasonEntity", + "description": "A Firebolt compliant representation of a TV Season entity.", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "season" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "seriesId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "season", + "entityId": "breaking-bad-season-1", + "seriesId": "breaking-bad" + } + ] + }, + "MusicEntity": { + "title": "MusicEntity", + "type": "object", + "properties": { + "entityType": { + "const": "music" + }, + "musicType": { + "$ref": "#/x-schemas/Entertainment/MusicType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "musicType", + "entityId" + ] + }, + "PlaylistEntity": { + "title": "PlaylistEntity", + "description": "A Firebolt compliant representation of a Playlist entity.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "playlist" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + ] + }, + "AdditionalEntity": { + "title": "AdditionalEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "type": "string", + "enum": [ + "concert", + "sportingEvent", + "preview", + "other", + "advertisement", + "musicVideo", + "minisode", + "extra" + ] + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "concert", + "entityId": "live-aid" + } + ] + }, + "UntypedEntity": { + "title": "UntypedEntity", + "allOf": [ + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityId": "an-entity" + } + ] + }, + "PlayableEntity": { + "title": "PlayableEntity", + "anyOf": [ + { + "$ref": "#/x-schemas/Intents/MovieEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Intents/PlaylistEntity" + }, + { + "$ref": "#/x-schemas/Intents/MusicEntity" + }, + { + "$ref": "#/x-schemas/Intents/AdditionalEntity" + } + ] + }, + "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 + }, + "ProgramEntity": { + "title": "ProgramEntity", + "type": "object", + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "programType", + "entityId" + ] + }, + "Identifier": { + "type": "string" + } + }, + "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-feature-media-access/specifications/firebolt-specification.json b/requirements/pr-feature-media-access/specifications/firebolt-specification.json new file mode 100644 index 000000000..115473e54 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/firebolt-specification.json @@ -0,0 +1,22901 @@ +{ + "schemaVersion": { + "major": 1, + "minor": 0, + "patch": 0, + "readable": "Firebolt Version Manifest v1.0.0" + }, + "capabilities": { + "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: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:advertising:configuration": { + "level": "could", + "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:advertising:identifier": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "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:input:keyboard": { + "level": "should", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": true, + "negotiable": true + } + }, + "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: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: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:privacy:settings": { + "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 + } + }, + "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:privacy:advertising": { + "level": "could", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "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:storage:secure": { + "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: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: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: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: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:inputs:hdmi": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": true, + "negotiable": true + }, + "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: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:media-access:*": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:media-access:audio": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:media-access:files": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:media-access:images": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:media-access:video": { + "level": "must", + "use": { + "public": true, + "negotiable": true + }, + "manage": { + "public": false, + "negotiable": false + }, + "provide": { + "public": false, + "negotiable": false + } + }, + "xrn:firebolt:capability:media-access:volumes": { + "level": "must", + "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:profile:flags": { + "level": "must", + "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 + } + } + }, + "apis": { + "1": { + "openrpc": "1.2.4", + "info": { + "title": "Firebolt JSON-RPC API", + "version": "1.2.0-feature-media-access.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", + "MediaAccess": "A module for access user-cultivated media files, e.g. photos on a USB drive.", + "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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" + } + ], + "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": "success", + "value": true + } + } + ] + }, + { + "name": "Discovery.purchasedContent", + "tags": [ + { + "name": "polymorphic-pull" + }, + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + } + ], + "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.onPolicyChanged", + "summary": "get the discovery policy", + "params": [ + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "tags": [ + { + "name": "subscriber", + "x-subscriber-for": "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" + } + ], + "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" + } + ], + "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": "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": "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": "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": "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-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-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-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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "text": "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": { + "$ref": "#/components/schemas/KeyboardResult", + "examples": [ + { + "text": "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": { + "text": "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": "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": "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": "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": "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": "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": "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": "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": "MediaAccess.volumes", + "tags": [ + { + "name": "temporal-set" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Volume" + } + } + ], + "result": { + "name": "volumes", + "schema": { + "type": "array", + "items": { + "title": "Volume", + "$ref": "#/components/schemas/Volume" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "query", + "value": {} + } + ], + "result": { + "name": "volumes", + "value": [ + { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + { + "uri": "/local/photos", + "name": "photos", + "type": "local" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.audio", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:audio" + ] + } + ], + "summary": "Access available audio MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.video", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:video" + ] + } + ], + "summary": "Access available video MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.images", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:images" + ] + } + ], + "summary": "Access available image MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.media", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:*" + ] + } + ], + "summary": "Access all available MediaFiles of either audio, video, or image types.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + }, + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + }, + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.files", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:files" + ] + } + ], + "summary": "Access all available MediaFiles.", + "params": [ + { + "name": "volumes", + "summary": "A set of queries used to match which volumes will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "files", + "summary": "A set of queries used to match which files will be matched.", + "required": false, + "schema": { + "$ref": "#/components/schemas/MediaFile" + } + } + ], + "result": { + "name": "files", + "summary": "A set of MediaFiles that matched the query.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaFile" + } + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "volumes", + "value": {} + } + ], + "result": { + "name": "files", + "value": [ + { + "uri": "/usb/my-usb-drive/notes.txt", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "text/plain" + }, + { + "uri": "/usb/my-usb-drive/song1.mp3", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "audio/mpeg" + }, + { + "uri": "/local/music/song2.mp3", + "volume": { + "uri": "/local/music", + "name": "music", + "type": "local" + }, + "type": "audio/mpeg" + }, + { + "uri": "/usb/my-usb-drive/photo1.jpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "image/jpg" + }, + { + "uri": "/local/photos/photo1.jpg", + "volume": { + "uri": "/local/photos", + "name": "photos", + "type": "local" + }, + "type": "image/jpg" + }, + { + "uri": "/usb/my-usb-drive/video1.mpg", + "volume": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + }, + "type": "video/mp4" + }, + { + "uri": "/local/videos/video2.mpg", + "volume": { + "uri": "/local/videos", + "name": "videos", + "type": "local" + }, + "type": "video/mp4" + } + ] + } + } + ] + }, + { + "name": "MediaAccess.onVolumeAvailable", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-temporal-for": "volumes" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "volumes", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "title": "Volume", + "$ref": "#/components/schemas/Volume" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "correlationId", + "value": "xyz" + }, + { + "name": "query", + "value": {} + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "volumes", + "value": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } + } + } + ] + }, + { + "name": "MediaAccess.onVolumeUnavailable", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "event", + "x-temporal-for": "volumes" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/Volume" + } + }, + { + "name": "listen", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "result": { + "name": "volumes", + "schema": { + "anyOf": [ + { + "$ref": "#/x-schemas/Types/ListenResponse" + }, + { + "title": "Volume", + "$ref": "#/components/schemas/Volume" + } + ] + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "correlationId", + "value": "xyz" + }, + { + "name": "query", + "value": {} + }, + { + "name": "listen", + "value": true + } + ], + "result": { + "name": "volumes", + "value": { + "uri": "/usb/my-usb-drive", + "name": "My USB Drive", + "type": "usb" + } + } + } + ] + }, + { + "name": "MediaAccess.stopVolumes", + "tags": [ + { + "name": "rpc-only" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-access:volumes" + ] + } + ], + "summary": "Access available Volumes with MediaFiles.", + "params": [ + { + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + { + "name": "correlationId", + "value": "xyz" + } + ], + "result": { + "name": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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": "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" + } + ] + }, + "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" + ] + }, + "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" + } + } + }, + "KeyboardResult": { + "title": "KeyboardResult", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string", + "description": "The text the user entered into the keyboard" + }, + "canceled": { + "type": "boolean", + "description": "Whether the user canceled entering text before they were finished typing on the keyboard" + } + } + }, + "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 + }, + "Volume": { + "title": "Volume", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/VolumeType" + } + } + }, + "VolumeType": { + "title": "VolumeType", + "type": "string", + "enum": [ + "usb", + "local" + ] + }, + "MediaFile": { + "title": "MediaFile", + "type": "object", + "properties": { + "volume": { + "$ref": "#/components/schemas/Volume" + }, + "uri": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "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" + ] + } + } + }, + "BooleanMap": { + "title": "BooleanMap", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "AudioProfile": { + "title": "AudioProfile", + "type": "string", + "enum": [ + "stereo", + "dolbyDigital5.1", + "dolbyDigital7.1", + "dolbyDigital5.1+", + "dolbyDigital7.1+", + "dolbyAtmos" + ] + }, + "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", + "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 + } + }, + "Entertainment": { + "uri": "https://meta.comcast.com/firebolt/entertainment", + "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." + }, + "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", + "programType", + "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" + ] + } + } + }, + "OfferingType": { + "title": "OfferingType", + "type": "string", + "enum": [ + "free", + "subscribe", + "buy", + "rent" + ], + "description": "The offering type of the WayToWatch." + }, + "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" + ] + }, + "MusicType": { + "title": "MusicType", + "type": "string", + "description": "In the case of a music `entityType`, specifies the type of music entity.", + "enum": [ + "song", + "album" + ] + }, + "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" + }, + "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." + } + }, + "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" + } + } + } + ], + "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" + } + } + } + ], + "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": { + "anyOf": [ + { + "$ref": "#/x-schemas/Intents/MovieEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVSeriesEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVSeasonEntity" + }, + { + "$ref": "#/x-schemas/Intents/MusicEntity" + }, + { + "$ref": "#/x-schemas/Intents/PlaylistEntity" + }, + { + "$ref": "#/x-schemas/Intents/AdditionalEntity" + }, + { + "$ref": "#/x-schemas/Intents/UntypedEntity" + } + ] + } + } + } + ], + "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/Intents/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 + } + } + } + ], + "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/Intents/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/Intents/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": { + "maxProperties": 1 + } + } + }, + "else": { + "type": "object", + "properties": { + "options": { + "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" + ] + } + }, + "MovieEntity": { + "title": "MovieEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of a Movie entity.", + "title": "MovieEntity", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "movie" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + ] + }, + "TVEpisodeEntity": { + "title": "TVEpisodeEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of a TV Episode entity.", + "title": "TVEpisodeEntity", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId", + "seasonId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "episode" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "seriesId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "seasonId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + } + ] + }, + "TVSeriesEntity": { + "title": "TVSeriesEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of a TV Series entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "series" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "series", + "entityId": "breaking-bad" + } + ] + }, + "TVSeasonEntity": { + "title": "TVSeasonEntity", + "description": "A Firebolt compliant representation of a TV Season entity.", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "season" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "seriesId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "season", + "entityId": "breaking-bad-season-1", + "seriesId": "breaking-bad" + } + ] + }, + "MusicEntity": { + "title": "MusicEntity", + "type": "object", + "properties": { + "entityType": { + "const": "music" + }, + "musicType": { + "$ref": "#/x-schemas/Entertainment/MusicType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "musicType", + "entityId" + ] + }, + "PlaylistEntity": { + "title": "PlaylistEntity", + "description": "A Firebolt compliant representation of a Playlist entity.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "playlist" + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + ] + }, + "AdditionalEntity": { + "title": "AdditionalEntity", + "allOf": [ + { + "$ref": "#/x-schemas/Intents/ProgramEntity" + }, + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "type": "string", + "enum": [ + "concert", + "sportingEvent", + "preview", + "other", + "advertisement", + "musicVideo", + "minisode", + "extra" + ] + }, + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityType": "program", + "programType": "concert", + "entityId": "live-aid" + } + ] + }, + "UntypedEntity": { + "title": "UntypedEntity", + "allOf": [ + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "assetId": { + "$ref": "#/x-schemas/Intents/Identifier" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityId": "an-entity" + } + ] + }, + "PlayableEntity": { + "title": "PlayableEntity", + "anyOf": [ + { + "$ref": "#/x-schemas/Intents/MovieEntity" + }, + { + "$ref": "#/x-schemas/Intents/TVEpisodeEntity" + }, + { + "$ref": "#/x-schemas/Intents/PlaylistEntity" + }, + { + "$ref": "#/x-schemas/Intents/MusicEntity" + }, + { + "$ref": "#/x-schemas/Intents/AdditionalEntity" + } + ] + }, + "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 + }, + "ProgramEntity": { + "title": "ProgramEntity", + "type": "object", + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "$ref": "#/x-schemas/Entertainment/ProgramType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "programType", + "entityId" + ] + }, + "Identifier": { + "type": "string" + } + }, + "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-feature-media-access/specifications/hardware/hdmi-input/index.md b/requirements/pr-feature-media-access/specifications/hardware/hdmi-input/index.md new file mode 100644 index 000000000..f5de5cf53 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/hardware/hdmi-input/index.md @@ -0,0 +1,321 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/specifications/intents/index.md b/requirements/pr-feature-media-access/specifications/intents/index.md new file mode 100644 index 000000000..4100cfce1 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/intents/index.md @@ -0,0 +1,72 @@ +--- + +version: pr-feature-media-access +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 | + +## 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) +- [Intent Types](#intent-types) + +## 3. Intent Action +The intent `action` denotes what type of intent it is. + +All intents **MUST** have a `string` attribute 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. + +## Intent Types + +- [Play](./play) +- [Tune](./tune) +- [Basic Navigation](./navigation) + \ No newline at end of file diff --git a/requirements/pr-feature-media-access/specifications/intents/play/index.md b/requirements/pr-feature-media-access/specifications/intents/play/index.md new file mode 100644 index 000000000..28410aa23 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/intents/play/index.md @@ -0,0 +1,274 @@ +--- + +version: pr-feature-media-access +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-feature-media-access/specifications/media/media-access/index.md b/requirements/pr-feature-media-access/specifications/media/media-access/index.md new file mode 100644 index 000000000..353a0b230 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/media/media-access/index.md @@ -0,0 +1,252 @@ +--- + +version: pr-feature-media-access +layout: default +title: Media Access +category: requirements +type: specification +--- +# Media Access + +Document Status: Working Draft + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Anthony Borzotta | Comcast | +| Jeremy LaCivita | Comcast | + +## 1. Overview + +Some apps will need to make use of files stored on the device, e.g. on +internal storage or a USB Mass Storage device. + +Giving such apps full access to the filesystem to facilitate access to +the user's personally cultivated media is providing far too much +information for such a simple use case. On the other hand, providing a +platform file picker UI might not enable the richness of experience that +app developers need. + +The apps that would use this feature are primarily interested in user +cultivated media files, and where they came from, e.g., USB or a cloud +photo storage provider, etc., is of secondary or no importance. This API +is intended to expose user cultivated media in a convenient, file-system +agnostic, storage-agnostic way. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Media Access](#3-media-access) + - [3.1. Listing Media Files](#31-listing-media-files) + - [3.2. Volume Availability](#32-volume-availability) + - [3.3. Accessing Files](#33-accessing-files) + - [3.4. Core APIs](#34-core-apis) + - [3.4.1. Volumes](#341-volumes) + - [3.4.2. Files](#342-files) + - [3.5. Schemas](#35-schemas) + - [3.5.1. MediaFile](#351-mediafile) + - [3.5.2. Volume](#352-volume) + - [3.5.3. VolumeType](#353-volumetype) + +## 3. Media Access + +The Firebolt `MediaAccess` module consists of APIs to list and read +various types of `MediaFile`. It also contains APIs for detecting when +new media file `Volumes` are available. + +### 3.1. Listing Media Files + +The `MediaAccess` module **MUST** have a `files` API used to return a +list of `MediaFile` objects from a specific directory. + +The `files` APIs **MUST** support a required `path` parameter of type +`string`. + +The `path` parameter may denote a Volume mount-point or a directory at +any level below one of the available volumes. + +The `files` API **MUST** return all files and directories inside the +provided `path`. + +The `files` API **MUST NOT** be recursive. + +If the `path` is not a valid directory, the `files` API **MUST** return +an `Invalid path` error. + +If the `path` is a directory that cannot be accessed due to OS +permissions, then the `files` API **MUST** also return the same `Invalid path` +error. + +Each `MediaFile` includes the full URI, relative to the Volume, so +that Apps may present them in a manner that matches the directory +structure on the `Volume`, e.g.: + +```json +{ + "path": "/Volumes/USB-Drive/mp3s/mysong.mp3", + "url": "https://127.0.0.1:1001/MediaAccess/USBMassStorage/Volumes/USB-Drive/mp3s/mysong.mp3", + "isDir": false, + "type": "application/mp3" +} +``` + +Apps **MUST** use the `path` property for display purposes and the `url` +property for fetching purposes. This allows the underlying HTTP +implementation to change w/out apps breaking. + +In order to call the `MediaAccess.files()` API an app **MUST** have +permission to use the `xrn:firebolt:capability:media-access:files` +capability. + +### 3.2. Volume Availability + +Apps that consume user cultivated media will likely want to know when +volumes become available or unavailable. + +This is accomplished with a temporal-set API called `volumes()`. + +The volumes API **MUST** support a context parameter of type for the +Volume Type, e.g. `usb`. + +See [Temporal Sets](../../openrpc-extensions/temporal-set) for more info. + +### 3.3. Accessing Files + +**TODO**: this is still in review +**TODO**: Add some details on the HTTP Server thunder plugin + +In order to do something with the file, apps will need access to the +file contents. + +Firebolt platforms **MUST** provide a local `https` server for apps to +request MediaFiles. + +The server **MUST** be reachable via the IP address 127.0.0.1 + +The server **MUST** only be accessible via `https` and have a valid, +self-signed certificate trusted by the browser. + +**NOTE: does using an IP address mean we can't use SSL? Do we need a +fake domain name? Do we even need SSL if the host is 127.0.0.1?** + +Each App that uses the MediaAccess APIs **MUST** be assigned a unique +port number for accessing the http URLs for those files. This allows any +security measures to be opaque to the calling app. + +App containers **MUST** be limited to only access one of the available +Media Access ports. + +The port numbers `1000` to `1999` on the local device **MUST** be reserved +for HTTP Media Access URLs. + +**TODO**: ^^ do these ports make sense? + + +HTTP URLs for file access **MUST** follow the template: + +``` +https://127.0.0.1:/MediaAccess// +``` + +The `` for `usb` is `USBMassStorage`. + +For example: + +``` +https://127.0.0.1:1001/MediaAccess/USBMassStorage/Volumes/USB-Drive/mp3s/mysong.mp3 +``` + +![Diagram Description automatically +generated](../../../images/specifications/media/access/media/image1.png) + +### 3.4. Core APIs + +The following APIs are added to the Core SDK. + +#### 3.4.1. Volumes + +The `volumes` method can be called in one of four ways. + +```typescript +function volumes(): Promise +``` + + +The get the currently cached list of Volumes w/out scanning call the +method with just a `query` parameter: + +```typescript +function volumes(query: Volume): Promise +``` + +This returns the Volumes that the device is aware or, that match the +query, without checking if there are any new volumes. + +To find the first volume that matches a query, pass in a `query` and a +`timeout`, in milliseconds, representing how long the app is willing to +wait. + +```typescript +function volumes(query: Volume, timeout: number): Promise\ +``` + +This returns a `Volume` object if a match is found before the `timeout`. + +To initiate a live temporal set that updates continuously, call the +method with a `query`, an `add` callback and a `remove` callback: + +```typescript +function volumes(query: Volume, add: (item: Volume) => void, remove: +(item: Volume) => void): VolumeProcess +``` + +This will initiate an open-ended scan for volumes matching the query and +call the callbacks when a device becomes available or unavailable. + +This method returns a `VolumeProcess` object, synchronously, that +contains a single `stop()` method for cancelling the temporal-set +session. + +#### 3.4.2. Files + +These APIs return all the files that match the associated capability, +and the Volume query parameter: + +```typescript +function files(path: string):Promise +``` + +### 3.5. Schemas + +The following Schemas are used by this API. + +#### 3.5.1. MediaFile + +This is the primary object return by the various APIs. + +| Property | Type | Description | +|----------|---------|----------------------------------------------| +| path | string | The Unix path to the file, starting with the volume, e.g. `/Volumes/USB-Drive/mp3s/mysong.mp3` | +| uri | string | The http URL to request the file contents, e.g. `https://127.0.0.1:1001/MediaAccess/USBMassStorage/Volumes/USB-Drive/mp3s/mysong.mp3` | +| isDir | boolean | Whether the MediaFile is a directory | +| type | string | The mime-type of the file | + +If a file is a directory then `isDir` **MUST** be true. + +#### 3.5.2. Volume + +This provides information about a Volume, e.g. a Device, that stores +MediaFiles. + +| Property | Type | Description | +|----------|------------|------------------------------------------------------------------------------| +| type | VolumeType | The type of volume, e.g. USB | +| path | string | The Unix path to the root of the volume's storage, e.g. `/Volumes/USB-Drive` | +| name | string | The display name of the volume, e.g. `My Cool USB Drive" | + +#### 3.5.3. VolumeType + +An enumeration of strings representing possible Volume types: + +- `'usb'` diff --git a/requirements/pr-feature-media-access/specifications/openrpc-extensions/response-method/index.md b/requirements/pr-feature-media-access/specifications/openrpc-extensions/response-method/index.md new file mode 100644 index 000000000..798bd9771 --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/openrpc-extensions/response-method/index.md @@ -0,0 +1,206 @@ +--- + +version: pr-feature-media-access +layout: default +title: Response Method Binding +category: requirements +type: specification +--- +# Response Method Binding + +Document Status: Working Draft + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Sathish Kirupakaran | Comcast | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | + +## 1. Overview + +A Response Method is an RPC method that is attached to an RPC result by +the SDK for convenience. This allows for results that represent their +own focused APIs. For example: + +```javascript +const pet = House.getPet() + +pet.walk() +``` + +In the example above, pet.walk() is an RPC method that takes a pet +object as a parameter. Calling pet.walk() via the Response Method syntax +allows contextual APIs to be called with simpler method signatures. +These methods may or may not be hidden via the rpc-only tag to avoid +Apps calling them without valid parameters, if desired. + +This document describes an OpenRPC pattern and JavaScript code +generation for a Firebolt method template that returns results that +contain these type of methods. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Response Methods Use Cases](#3-response-methods-use-cases) + - [3.1. Array Example](#31-array-example) +- [4. Response Methods API](#4-response-methods-api) + - [4.1. JSON-RPC API](#41-json-rpc-api) + - [4.2. JavaScript API](#42-javascript-api) + +## 3. Response Methods Use Cases + +Response methods may be added to any top-level object result or to all +top-level objects in an array result. The example above covers top-level +objects and an array example is in the following section. + +Response Methods **MUST** be at the top level of the response object or +at the top level of all of the objects in the response array. Response +Methods are not supported in nested objects. Response Methods are not +supported as the result of an RPC method itself, i.e., an RPC method +cannot just return a Response Method without an object wrapper. + +Response Methods **MUST** point to an RPC method with a compatible +signature (see below). + +### 3.1. Array Example + +```javascript +const pets = House.getPets() + +pets.forEach( pet => pet.walk() ) +``` + +In this example, each pet in the getPets() array has the walk method. + +## 4. Response Methods API + +The section describes the RPC and JavaScript APIs. + +### 4.1. JSON-RPC API + +For a method response to contain Response Methods, it **MUST** use the +x-method extension attribute on a property. + +```json +{ + "name": "getPet", + "params": [ + ], + "result": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "walk": { + "type": "null", + "x-method": "House.walkPet", + "x-this-param": "pet" + } + } + } + } +} +``` + +When the x-method attribute is used within an OpenRPC method result +schema, the result schema **MUST** be an object or an array. For objects +the attribute **MUST** be on one of the top-level properties. For arrays +the attribute **MUST** be on one of the top level properties of the +items schema. + +Properties flagged with the x-method attribute MUST be of type: "null" +and have no other attributes except for title, description, and +\$comment. This is to avoid duplication / contradiction of the +referenced RPC method. + +The x-method value **MUST** be an OpenRPC method within the current +module, and be fully qualified, in case this requirement is ever +relaxed, e.g. House.walkPet, not just walkPet. + +When the x-method attribute is used, the following optional extension +attributes may be used as well: + +| Extension attribute | Type | Description | +|------------------|-------------|-----------------------------------------| +| x-this-param | string | Parameter name to assign the value of the object to when calling the x-method RPC method | +| x-additional-params | array | Ordered mapping of parameter names for additional parameters. *Can we just grab from the method?* | + +Method results that have properties containing the x-method attribute +will have JavaScript bindings created to insert the methods when using +the SDK. No RPC methods are generated automatically. the RPC method +targeted by x-method **MUST** exist in the module source. + +### 4.2. JavaScript API + +Using the simple example from above: + +```javascript +const pet = House.getPet() + +pet.walk() +``` + +The first line would result in the following RPC call: + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "house.getPet", + "params": [] +} +``` + +And the response might look like: + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "name": "Fido", + "type": "dog" + ] +} +``` + +At this point, the SDK would decorate the response to include the walk() +method, something like: + +```javascript +json.result['walk'] = (pet) => { + return Transport.send('house', 'walkPet', { pet }) +} +``` + +Note that the Response Method, walk(), also returns a Promise, since it +calls another Firebolt RPC method. + +Response Methods MUST support additional parameters as well. For +example, if the walkPet() method had a required parameter called +distance, in addition to pet, then the generated method would look +something like: + +```javascript +json.result['walk'] = (pet, distance) => { + return Transport.send('house', 'walkPet', { pet, distance }) +} +``` + +The order of the parameters in the House.walkPet method **MUST** be +respected when generating Response Methods. If walkPet had pet as the +second parameter, then pet.walk() would be generated like this: + + +```javascript +json.result['walk'] = (distance, pet) => { + return Transport.send('house', 'walkPet', { pet, distance }) +} +``` + +When a Response Method is called, it simply calls the RPC method w/ the +main object as the parameter denoted by x-this-param. diff --git a/requirements/pr-feature-media-access/specifications/openrpc-extensions/temporal-set/index.md b/requirements/pr-feature-media-access/specifications/openrpc-extensions/temporal-set/index.md new file mode 100644 index 000000000..d69ce37ad --- /dev/null +++ b/requirements/pr-feature-media-access/specifications/openrpc-extensions/temporal-set/index.md @@ -0,0 +1,382 @@ +--- + +version: pr-feature-media-access +layout: default +title: Temporal Set RPC Method +category: requirements +type: specification +--- +# Temporal Set RPC Method + +Document status: Proposed Spec + +See [Firebolt Requirements Governance](../../../governance) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Mike Fine | Comcast | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | + +## 1. Overview + +A Temporal Set is an Array-like data structure that only contains unique +items, i.e., a \"set,\" and has its contents change over an indefinite +length of time, i.e., \"temporal.\" + +This document describes an OpenRPC pattern and JavaScript code +generation for a Firebolt method template that returns this type of +object. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Temporal Set Requirements](#3-temporal-set-requirements) + - [3.1. Live-list of matches](#31-live-list-of-matches) + - [3.2. First match](#32-first-match) + - [3.3. Background scan](#33-background-scan) +- [4. Temporal Set API](#4-temporal-set-api) + - [4.1. JSON-RPC API](#41-json-rpc-api) + - [4.1.1. onItemAvailable](#411-onitemavailable) + - [4.1.2. onItemUnavailable](#412-onitemunavailable) + - [4.1.3. stopMethodName](#413-stopmethodname) + - [4.2. JavaScript API](#42-javascript-api) + +## 3. Temporal Set Requirements + +There are many common use cases that involve finding a specific service +or device, where the items be found could show up at any point in an +unknown future. This could be things like WiFi networks, Bluetooth +accessories, or DNS-SD-based developer tools. + +Apps tend to fall into a handful of use cases which Firebolt APIs should +strive to enable. + +In the following use cases, the terms \"matching\" and \"item\" are used +to describe the \"things\" being found, e.g. WiFi access points, +Bluetooth devices with the headset profile, etc. How this matching +occurs is outside the scope of this document. + +### 3.1. Live-list of matches + +Displaying a list of all matching items and keeping it up to date for an +indefinite time is probably the most common use case for this type of +API. A frequent example of this is a WiFi picker UX. + +To make this UX as simple to implement as possible, the Temporal Set API +**MUST** ensure: + +> Duplicate matched items **MUST NOT** be passed to the App +> +> AND +> +> The app **MUST** be informed when matched items become unavailable or +> are no longer part of the temporal set +> +> AND +> +> The app **MUST** be informed when matched items become available or +> are now part of the temporal set +> +> AND +> +> The app **MUST** be able to communicate that it no longer cares about +> this temporal set + +### 3.2. First match + +Finding a specific item, with no UX needed is another common use case. A +common example is pairing a known device with specific details that will +likely result in one match, e.g., a previously paired remote, or a +remote with a specific make/model. + +To make this user journey as simple to implement as possible, the +Temporal Set API **MUST** ensure: + +> There is a way to call the API that uses the same semantics, e.g., +> method name, and a simpler method signature to denote the \"first +> match\" use case. + +### 3.3. Background scan + +Scanning for matches in the background is another use-case that could +come up. An example of this is to scan for a previously paired phone and +wake up the TV when the phone\'s Bluetooth signal is in proximity. + +This use case can likely be fulfilled by an API that serves the previous +use cases but is listed here for completeness. + +## 4. Temporal Set API + +The section describes the RPC and JavaScript APIs. + +### 4.1. JSON-RPC API + +For a method to leverage the Temporal Set template, it MUST use thetemporal-set tag. + + +```json +{ + "name": "", + "tags": [ + { + "name": "temporal-set" + } + ], + "params": [ + { + "name": "query", + "schema": { + "type": "string" + } + } + ], + "result": { + "schema": { + "type": "array", + "items": { + "title": "Item", + "type": number + } + } + } +} +``` + +When this tag is used on an OpenRPC method schema, the result schema +**MUST** be an `array`, and the `items` schema defines the schema for an +individual matched item. + +The `query` param here is an example. The method may contain any +primitive (string, number, integer, boolean) parameters, or no +parameters. See [Context +Parameters](https://comcastcorp.sharepoint.com/:w:/r/sites/hqppa/Shared%20Documents/Global%20App%20Platform/Firebolt/Requirements/General/APIs/Context%20Parameters.docx?d=w84c3615b348241a4818d65985303e430&csf=1&web=1&e=DIFLdd) +for more info. + +The `title` attribute on `result.schema items` **MUST** be present +and denotes the type of items being matched, e.g., \"BluetoothDevice.\" +The title **MAY** be inside of a schema linked via a `$ref`. if it is +not directly on `result.items`. + +When this method is called, all matching items that the platform +currently knows about **MUST** be returned without waiting for +additional matches. + +Methods with this tag will have three OpenRPC methods generated by the +Firebolt tooling. + +#### 4.1.1. onItemAvailable + +This is an OpenRPC event with the name including the title of the +original `result.items`. This event fires whenever an *additional,* +matching item is found that was not returned in the original method +array result. It is up to the Firebolt implementation to filter results, +not the SDK. + +The `correlationId` parameter maps this listener back to the original +temporal-set API call that started the temporal set scan. The `listen` +parameter is the standard event listener parameter. + +```json +{ + "name": "onAvailable", + "tags": [ + { + "name": "event", + "x-temporal-set": "" + } + ], + "params": { + { + "name": "correlationId", + "schema": { + "type": ["number", "string"] + } + }, + { + "name": "listen", + "schema": { + "type": "boolean" + } + } + }, + "result": { + "anyOf": [ + { + "schema": + }, + { + "$ref": "http://meta.comcast.com/firebolt/types/#/defintions/ListenReponse" + ] + } +} +``` + +#### 4.1.2. onItemUnavailable + +This is an OpenRPC event with the name matching the title of the +original `result.items`. This event fires whenever an item is no longer +\"found.\" Items dispatched from this event should be items that the app +has received either via the initial method call or an `onItemAvailable` +event. + +```json +{ + "name": "onUnavailable", + ... +} +``` + +Aside from the `name`, all other aspects of this schema match theonItemAvailable schema. + +#### 4.1.3. stopMethodName + +This is an OpenRPC method that cancels the current temporal set session. + +```json +{ + "name": "stop", + "params": [ + { + " correlationId ": { + "type": ["string", "number"] + } + } + ], + "result": { + "type": "void" + } +} +``` + +Calling this method ends the session, and no further events with the +current `correlationId` should be dispatched. The `correlationId` is the +id value from the original method call. + +Methods may have different additional requirements of what this means. +Discussion of those is out of scope for this document. + +### 4.2. JavaScript API + +The JavaScript API will leverage the RPC API in two different ways, +depending on whether the app wants the first match, or a live temporal +set. + +For the first match, the app would do something like: + +```javascript +Module.find("Firebolt Tool", 10000).then(result => { + console.log("Here's the result") + console.dir(result) +}) +``` + +The last parameter is an optional timeout value. All context parameters +**MUST** be passed before the timeout. + +This code would result in the following RPC calls: + +```json +[ + { + "id": 1, + "jsonrpc": "2.0", + "method": "module.find", + "params": { + "query": "Firebolt Tool" + } + }, + { + "id": 2, + "jsonrpc": "2.0", + "method": "module.onItemAvailable", + "params": { + "listen": true, + "correlationId": 1 + } + } +] +``` + +Note that these two calls are batched into a single request to avoid +latency race conditions. + +If a match is found, then the responses might look like: + +```json +[ + { + "id": 1, + "jsonrpc": "2.0", + "result": [ + "Here's a match!" + ] + }, + { + "id": 2, + "jsonrpc": "2.0", + "result": { + "listening": true + } + } +] +``` + +At this point, the SDK would resolve the promise with the *first* +result, and turn off the listener: + +```json + { + "id": 2, + "jsonrpc": "2.0", + "method": "module.onItemAvailable", + "params": { + "listen": false, + "correlationId": 1 + } + } +``` + +If no item was available immediately, then the SDK would wait for anonItemAvailble event, and then turn off the listener. + +For first-match use cases, once the listener is turned off, the SDK MUST +call the `stop` API immediately. + +Alternately, if the app calls the stop method before any result is +returned, then the listener would be turned off and thestop RPC API would be called: + +```json + { + "id": 3, + "jsonrpc": "2.0", + "method": "module.stopFind", + "params": { + "correlationId": 1 + } + } +``` + +The JavaScript code for doing a live temporal set would look like this: + +```javascript +Module.find("Firebolt Tool", + result => { + console.log(\'this item shows up\') + console.dir(result) + }, + result => { + console.log(\'this item goes away\') + console.dir(result) + } +).then( process => { + setTimeout( () => { process.stop() }, 10000) +}) +``` + +The RPC calls for this flow are similar, with the following additions: + +- the `onItemUnavailble` event is turned on + +- the first callback is called once for *each* item found + +- the second callback is called once for each item removed diff --git a/requirements/pr-feature-media-access/style-guide-and-template/index.md b/requirements/pr-feature-media-access/style-guide-and-template/index.md new file mode 100644 index 000000000..a964db231 --- /dev/null +++ b/requirements/pr-feature-media-access/style-guide-and-template/index.md @@ -0,0 +1,99 @@ +--- + +version: pr-feature-media-access +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.