Privacy Module


Version Privacy 1.2.0

Table of Contents

Usage

To use the Privacy module, you can import it into your project from the Firebolt SDK:

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:

function allowACRCollection(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowACRCollection()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowACRCollection",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowACRCollection()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowACRCollection",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowACRCollection call the method like this:

function allowACRCollection(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowACRCollection(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowACRCollection",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowACRCollection(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowACRCollection",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowACRCollection(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowACRCollection((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowACRCollectionChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowACRCollection((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowACRCollectionChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowAppContentAdTargeting(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowAppContentAdTargeting()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowAppContentAdTargeting",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowAppContentAdTargeting()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowAppContentAdTargeting",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowAppContentAdTargeting call the method like this:

function allowAppContentAdTargeting(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowAppContentAdTargeting(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowAppContentAdTargeting",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowAppContentAdTargeting(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowAppContentAdTargeting",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowAppContentAdTargeting(
  callback: (value) => boolean,
): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowAppContentAdTargeting((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowAppContentAdTargetingChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowAppContentAdTargeting((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowAppContentAdTargetingChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowCameraAnalytics(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowCameraAnalytics()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowCameraAnalytics",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowCameraAnalytics()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowCameraAnalytics",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowCameraAnalytics call the method like this:

function allowCameraAnalytics(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowCameraAnalytics(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowCameraAnalytics",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowCameraAnalytics(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowCameraAnalytics",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowCameraAnalytics(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowCameraAnalytics((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowCameraAnalyticsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowCameraAnalytics((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowCameraAnalyticsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowPersonalization(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowPersonalization()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowPersonalization",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowPersonalization()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowPersonalization",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowPersonalization call the method like this:

function allowPersonalization(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowPersonalization(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowPersonalization",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowPersonalization(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowPersonalization",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowPersonalization(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowPersonalization((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowPersonalizationChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowPersonalization((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowPersonalizationChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowPrimaryBrowseAdTargeting(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowPrimaryBrowseAdTargeting()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowPrimaryBrowseAdTargeting",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowPrimaryBrowseAdTargeting()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowPrimaryBrowseAdTargeting",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowPrimaryBrowseAdTargeting call the method like this:

function allowPrimaryBrowseAdTargeting(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowPrimaryBrowseAdTargeting(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowPrimaryBrowseAdTargeting",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowPrimaryBrowseAdTargeting(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowPrimaryBrowseAdTargeting",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowPrimaryBrowseAdTargeting(
  callback: (value) => boolean,
): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowPrimaryBrowseAdTargeting((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowPrimaryBrowseAdTargetingChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowPrimaryBrowseAdTargeting((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowPrimaryBrowseAdTargetingChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowPrimaryContentAdTargeting(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowPrimaryContentAdTargeting()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowPrimaryContentAdTargeting",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowPrimaryContentAdTargeting()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowPrimaryContentAdTargeting",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowPrimaryContentAdTargeting call the method like this:

function allowPrimaryContentAdTargeting(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowPrimaryContentAdTargeting(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowPrimaryContentAdTargeting",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowPrimaryContentAdTargeting(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowPrimaryContentAdTargeting",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowPrimaryContentAdTargeting(
  callback: (value) => boolean,
): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowPrimaryContentAdTargeting((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowPrimaryContentAdTargetingChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowPrimaryContentAdTargeting((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowPrimaryContentAdTargetingChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowProductAnalytics(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowProductAnalytics()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowProductAnalytics",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowProductAnalytics()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowProductAnalytics",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowProductAnalytics call the method like this:

function allowProductAnalytics(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowProductAnalytics(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowProductAnalytics",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowProductAnalytics(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowProductAnalytics",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowProductAnalytics(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowProductAnalytics((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowProductAnalyticsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowProductAnalytics((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowProductAnalyticsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowRemoteDiagnostics(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowRemoteDiagnostics()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowRemoteDiagnostics",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowRemoteDiagnostics()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowRemoteDiagnostics",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowRemoteDiagnostics call the method like this:

function allowRemoteDiagnostics(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowRemoteDiagnostics(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowRemoteDiagnostics",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowRemoteDiagnostics(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowRemoteDiagnostics",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowRemoteDiagnostics(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowRemoteDiagnostics((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowRemoteDiagnosticsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowRemoteDiagnostics((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowRemoteDiagnosticsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowResumePoints(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowResumePoints()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowResumePoints",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowResumePoints()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowResumePoints",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowResumePoints call the method like this:

function allowResumePoints(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowResumePoints(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowResumePoints",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowResumePoints(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowResumePoints",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowResumePoints(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowResumePoints((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowResumePointsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowResumePoints((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowResumePointsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowUnentitledPersonalization(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowUnentitledPersonalization()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowUnentitledPersonalization",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowUnentitledPersonalization()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowUnentitledPersonalization",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowUnentitledPersonalization call the method like this:

function allowUnentitledPersonalization(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowUnentitledPersonalization(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowUnentitledPersonalization",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowUnentitledPersonalization(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowUnentitledPersonalization",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowUnentitledPersonalization(
  callback: (value) => boolean,
): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowUnentitledPersonalization((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowUnentitledPersonalizationChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowUnentitledPersonalization((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowUnentitledPersonalizationChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowUnentitledResumePoints(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowUnentitledResumePoints()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowUnentitledResumePoints",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowUnentitledResumePoints()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowUnentitledResumePoints",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowUnentitledResumePoints call the method like this:

function allowUnentitledResumePoints(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowUnentitledResumePoints(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowUnentitledResumePoints",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowUnentitledResumePoints(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowUnentitledResumePoints",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowUnentitledResumePoints(
  callback: (value) => boolean,
): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowUnentitledResumePoints((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowUnentitledResumePointsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowUnentitledResumePoints((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowUnentitledResumePointsChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "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:

function allowWatchHistory(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowWatchHistory()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowWatchHistory",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let allow = await Privacy.allowWatchHistory()
console.log(allow)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.allowWatchHistory",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of allowWatchHistory call the method like this:

function allowWatchHistory(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowWatchHistory(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowWatchHistory",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let result = await Privacy.allowWatchHistory(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.setAllowWatchHistory",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function allowWatchHistory(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default example #1

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowWatchHistory((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowWatchHistoryChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default example #2

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let listenerId = await allowWatchHistory((value) => {
  console.log(value)
})
console.log(listenerId)

Value of allow:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.onAllowWatchHistoryChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

listen

To listen to a specific event pass the event name as the first parameter:

listen(event: string, callback: (data: any) => void): Promise<number>

Parameters:

Param Type Required Summary
event string Yes The event to listen for, see 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.

To listen to all events from this module pass only a callback, without specifying an event name:

listen(callback: (event: string, data: any) => void): Promise<number>

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.

Callback parameters:

Param Type Required Summary
event string Yes The event that has occured listen for, see Events.
data any Yes The event data, which depends on which event is firing, see 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 for more information and examples.

once

To listen to a single instance of a specific event pass the event name as the first parameter:

once(event: string, callback: (data: any) => void): Promise<number>

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.
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.

To listen to the next instance only of any events from this module pass only a callback, without specifying an event name:

once(callback: (event: string, data: any) => void): Promise<number>

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.

Callback parameters:

Param Type Required Summary
event string Yes The event that has occured listen for, see Events.
data any Yes The event data, which depends on which event is firing, see 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 for more information and examples.

settings

Gets the allowed value for all privacy settings

function settings(): Promise<PrivacySettings>

Promise resolution:

PrivacySettings

Capabilities:

Role Capability
uses xrn:firebolt:capability:privacy:settings

Examples

Default Example

JavaScript:

import { Privacy } from '@firebolt-js/manage-sdk'

let settings = await Privacy.settings()
console.log(settings)

Value of settings:

{
	"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:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "Privacy.settings",
  "params": {}
}

Response:

{
  "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

allowAppContentAdTargetingChanged

See: allowAppContentAdTargeting

allowCameraAnalyticsChanged

See: allowCameraAnalytics

allowPersonalizationChanged

See: allowPersonalization

allowPrimaryBrowseAdTargetingChanged

See: allowPrimaryBrowseAdTargeting

allowPrimaryContentAdTargetingChanged

See: allowPrimaryContentAdTargeting

allowProductAnalyticsChanged

See: allowProductAnalytics

allowRemoteDiagnosticsChanged

See: allowRemoteDiagnostics

allowResumePointsChanged

See: allowResumePoints

allowUnentitledPersonalizationChanged

See: allowUnentitledPersonalization

allowUnentitledResumePointsChanged

See: allowUnentitledResumePoints

allowWatchHistoryChanged

See: allowWatchHistory

Types

PrivacySettings

type PrivacySettings = {
  allowACRCollection: boolean
  allowResumePoints: boolean
  allowAppContentAdTargeting: boolean
  allowCameraAnalytics: boolean
  allowPersonalization: boolean
  allowPrimaryBrowseAdTargeting: boolean
  allowPrimaryContentAdTargeting: boolean
  allowProductAnalytics: boolean
  allowRemoteDiagnostics: boolean
  allowUnentitledPersonalization: boolean
  allowUnentitledResumePoints: boolean
  allowWatchHistory: boolean
}