@firebolt-js/core-client 1.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/CONTRIBUTING.md +4 -0
  3. package/LICENSE +202 -0
  4. package/NOTICE +24 -0
  5. package/README.md +26 -0
  6. package/dist/docs/Accessibility/index.md +384 -0
  7. package/dist/docs/Accessibility/schemas/index.md +52 -0
  8. package/dist/docs/Advertising/index.md +120 -0
  9. package/dist/docs/Device/index.md +297 -0
  10. package/dist/docs/Discovery/index.md +128 -0
  11. package/dist/docs/Display/index.md +87 -0
  12. package/dist/docs/Internal/index.md +68 -0
  13. package/dist/docs/Lifecycle2/index.md +160 -0
  14. package/dist/docs/Localization/index.md +314 -0
  15. package/dist/docs/Localization/schemas/index.md +41 -0
  16. package/dist/docs/Metrics/index.md +987 -0
  17. package/dist/docs/Network/index.md +128 -0
  18. package/dist/docs/Policies/schemas/index.md +25 -0
  19. package/dist/docs/Presentation/index.md +53 -0
  20. package/dist/docs/Stats/index.md +63 -0
  21. package/dist/docs/TextToSpeech/index.md +524 -0
  22. package/dist/docs/Types/schemas/index.md +37 -0
  23. package/dist/firebolt-core-app-open-rpc.json +1082 -0
  24. package/dist/firebolt-core-open-rpc.json +3773 -0
  25. package/dist/lib/Accessibility/defaults.mjs +61 -0
  26. package/dist/lib/Accessibility/index.mjs +148 -0
  27. package/dist/lib/Advertising/defaults.mjs +26 -0
  28. package/dist/lib/Advertising/index.mjs +31 -0
  29. package/dist/lib/Device/defaults.mjs +34 -0
  30. package/dist/lib/Device/index.mjs +84 -0
  31. package/dist/lib/Discovery/defaults.mjs +22 -0
  32. package/dist/lib/Discovery/index.mjs +34 -0
  33. package/dist/lib/Events/index.mjs +345 -0
  34. package/dist/lib/Gateway/AppApi.mjs +125 -0
  35. package/dist/lib/Gateway/Bidirectional.mjs +113 -0
  36. package/dist/lib/Gateway/PlatformApi.mjs +130 -0
  37. package/dist/lib/Gateway/index.mjs +48 -0
  38. package/dist/lib/Localization/defaults.mjs +44 -0
  39. package/dist/lib/Localization/index.mjs +123 -0
  40. package/dist/lib/Log/index.mjs +57 -0
  41. package/dist/lib/Metrics/defaults.mjs +40 -0
  42. package/dist/lib/Metrics/index.mjs +206 -0
  43. package/dist/lib/Network/defaults.mjs +24 -0
  44. package/dist/lib/Network/index.mjs +70 -0
  45. package/dist/lib/Platform/defaults.mjs +27 -0
  46. package/dist/lib/Platform/index.mjs +28 -0
  47. package/dist/lib/Prop/MockProps.mjs +28 -0
  48. package/dist/lib/Prop/Router.mjs +25 -0
  49. package/dist/lib/Prop/index.mjs +60 -0
  50. package/dist/lib/Settings/index.mjs +86 -0
  51. package/dist/lib/Transport/MockTransport.mjs +191 -0
  52. package/dist/lib/Transport/WebsocketTransport.mjs +55 -0
  53. package/dist/lib/Transport/index.mjs +81 -0
  54. package/dist/lib/firebolt.d.ts +795 -0
  55. package/dist/lib/firebolt.mjs +51 -0
  56. package/firebolt-js-core-client-1.0.0-next.5.tgz +0 -0
  57. package/package.json +54 -0
@@ -0,0 +1,120 @@
1
+ ---
2
+ title: Advertising
3
+ ---
4
+
5
+ # Advertising Module
6
+
7
+ ---
8
+
9
+ Version Advertising 1.0.0-next.5
10
+
11
+ ## Table of Contents
12
+
13
+ - [Table of Contents](#table-of-contents)
14
+ - [Usage](#usage)
15
+ - [Overview](#overview)
16
+ - [Methods](#methods)
17
+ - [advertisingId](#advertisingid)
18
+ - [Types](#types)
19
+ - [AdvertisingIdResult](#advertisingidresult)
20
+
21
+ ## Usage
22
+
23
+ To use the Advertising module, you can import it into your project from the Firebolt SDK:
24
+
25
+ ```javascript
26
+ import { Advertising } from '@firebolt-js/core-client'
27
+ ```
28
+
29
+ ## Overview
30
+
31
+ A module for platform provided advertising settings and functionality.
32
+
33
+ ## Methods
34
+
35
+ ### advertisingId
36
+
37
+ Returns the IFA.
38
+
39
+ ```typescript
40
+ function advertisingId(): Promise<AdvertisingIdResult>
41
+ ```
42
+
43
+ Promise resolution:
44
+
45
+ [AdvertisingIdResult](#advertisingidresult)
46
+
47
+ Capabilities:
48
+
49
+ | Role | Capability |
50
+ | ---- | ---------------------------------------------- |
51
+ | uses | xrn:firebolt:capability:advertising:identifier |
52
+
53
+ #### Examples
54
+
55
+ Getting the advertising ID
56
+
57
+ JavaScript:
58
+
59
+ ```javascript
60
+ import { Advertising } from '@firebolt-js/core-client'
61
+
62
+ let advertisingId = await Advertising.advertisingId()
63
+ console.log(advertisingId)
64
+ ```
65
+
66
+ Value of `advertisingId`:
67
+
68
+ ```javascript
69
+ {"ifa":"bd87dd10-8d1d-4b93-b1a6-a8e5d410e400","ifa_type":"sspid","lmt":"0"}
70
+ ```
71
+
72
+ Getting the advertising ID with scope browse
73
+
74
+ JavaScript:
75
+
76
+ ```javascript
77
+ import { Advertising } from '@firebolt-js/core-client'
78
+
79
+ let advertisingId = await Advertising.advertisingId()
80
+ console.log(advertisingId)
81
+ ```
82
+
83
+ Value of `advertisingId`:
84
+
85
+ ```javascript
86
+ {"ifa":"bd87dd10-8d1d-4b93-b1a6-a8e5d410e400","ifa_type":"sspid","lmt":"0"}
87
+ ```
88
+
89
+ Getting the advertising ID with scope content
90
+
91
+ JavaScript:
92
+
93
+ ```javascript
94
+ import { Advertising } from '@firebolt-js/core-client'
95
+
96
+ let advertisingId = await Advertising.advertisingId()
97
+ console.log(advertisingId)
98
+ ```
99
+
100
+ Value of `advertisingId`:
101
+
102
+ ```javascript
103
+ {"ifa":"bd87dd10-8d1d-4b93-b1a6-a8e5d410e400","ifa_type":"sspid","lmt":"0"}
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Types
109
+
110
+ ### AdvertisingIdResult
111
+
112
+ ```typescript
113
+ type AdvertisingIdResult = {
114
+ ifa: string // UUID conforming to IAB standard
115
+ ifa_type: 'dpid' | 'sspid' | 'sessionid' // Source of the IFA as defined by IAB
116
+ lmt: '0' | '1' // Boolean that if set to 1, user has requested ad tracking and measurement is disabled
117
+ }
118
+ ```
119
+
120
+ ---
@@ -0,0 +1,297 @@
1
+ ---
2
+ title: Device
3
+ ---
4
+
5
+ # Device Module
6
+
7
+ ---
8
+
9
+ Version Device 1.0.0-next.5
10
+
11
+ ## Table of Contents
12
+
13
+ - [Table of Contents](#table-of-contents)
14
+ - [Usage](#usage)
15
+ - [Overview](#overview)
16
+ - [Methods](#methods)
17
+ - [chipsetId](#chipsetid)
18
+ - [deviceClass](#deviceclass)
19
+ - [hdr](#hdr)
20
+ - [timeInActiveState](#timeinactivestate)
21
+ - [uid](#uid)
22
+ - [uptime](#uptime)
23
+ - [Events](#events)
24
+ - [onHdrChanged](#onhdrchanged)
25
+ - [Types](#types)
26
+ - [DeviceClass](#deviceclass-1)
27
+ - [HDRFormatMap](#hdrformatmap)
28
+
29
+ ## Usage
30
+
31
+ To use the Device module, you can import it into your project from the Firebolt SDK:
32
+
33
+ ```javascript
34
+ import { Device } from '@firebolt-js/core-client'
35
+ ```
36
+
37
+ ## Overview
38
+
39
+ A module for querying about the device and it's capabilities.
40
+
41
+ ## Methods
42
+
43
+ ### chipsetId
44
+
45
+ _This is a private RPC method._
46
+
47
+ Returns chipset ID as a printable string, e.g. BCM72180
48
+
49
+ Result:
50
+
51
+ Capabilities:
52
+
53
+ | Role | Capability |
54
+ | ---- | ----------------------------------- |
55
+ | uses | xrn:firebolt:capability:device:info |
56
+
57
+ #### Examples
58
+
59
+ Getting the device chipset ID
60
+
61
+ ---
62
+
63
+ ### deviceClass
64
+
65
+ Returns the class of the device
66
+
67
+ ```typescript
68
+ function deviceClass(): Promise<DeviceClass>
69
+ ```
70
+
71
+ Promise resolution:
72
+
73
+ [DeviceClass](#deviceclass-1)
74
+
75
+ Capabilities:
76
+
77
+ | Role | Capability |
78
+ | ---- | ------------------------------------------- |
79
+ | uses | xrn:firebolt:capability:device:device-class |
80
+
81
+ #### Examples
82
+
83
+ Getting the device class
84
+
85
+ JavaScript:
86
+
87
+ ```javascript
88
+ import { Device } from '@firebolt-js/core-client'
89
+
90
+ let deviceClass = await Device.deviceClass()
91
+ console.log(deviceClass)
92
+ ```
93
+
94
+ Value of `deviceClass`:
95
+
96
+ ```javascript
97
+ 'ott'
98
+ ```
99
+
100
+ ---
101
+
102
+ ### hdr
103
+
104
+ Returns the HDR standards that are supported by the attached TV or the integral display
105
+
106
+ To get the value of `hdr` call the method like this:
107
+
108
+ ```typescript
109
+ function hdr(): Promise<HDRFormatMap>
110
+ ```
111
+
112
+ Promise resolution:
113
+
114
+ [HDRFormatMap](#hdrformatmap)
115
+
116
+ Capabilities:
117
+
118
+ | Role | Capability |
119
+ | ---- | ----------------------------------- |
120
+ | uses | xrn:firebolt:capability:device:info |
121
+
122
+ #### Examples
123
+
124
+ Getting the negotiated HDR formats
125
+
126
+ JavaScript:
127
+
128
+ ```javascript
129
+ import { Device } from '@firebolt-js/core-client'
130
+
131
+ let negotiatedHdrFormats = await Device.hdr()
132
+ console.log(negotiatedHdrFormats)
133
+ ```
134
+
135
+ Value of `negotiatedHdrFormats`:
136
+
137
+ ```javascript
138
+ {"hdr10":true,"hdr10Plus":true,"dolbyVision":true,"hlg":true}
139
+ ```
140
+
141
+ ---
142
+
143
+ To subscribe to notifications when the value changes, call the method like this:
144
+
145
+ ```typescript
146
+ function hdr(callback: (negotiatedHdrFormats) => HDRFormatMap): Promise<number>
147
+ ```
148
+
149
+ | Param | Type | Required | Description |
150
+ | ---------------------- | ------------------------------- | -------- | -------------------------- |
151
+ | `negotiatedHdrFormats` | [`HDRFormatMap`](#hdrformatmap) | false | the negotiated HDR formats |
152
+
153
+ Promise resolution:
154
+
155
+ ```
156
+ number
157
+ ```
158
+
159
+ #### Examples
160
+
161
+ Getting the negotiated HDR formats
162
+
163
+ ```typescript
164
+ import { Device } from '@firebolt-js/core-client'
165
+
166
+ let listenerId = await hdr((result) => {
167
+ console.log(result)
168
+ })
169
+ ```
170
+
171
+ Value of `result`:
172
+
173
+ ```javascript
174
+ {
175
+ "hdr10": true,
176
+ "hdr10Plus": true,
177
+ "dolbyVision": true,
178
+ "hlg": true
179
+ }
180
+ ```
181
+
182
+ ---
183
+
184
+ ### timeInActiveState
185
+
186
+ _This is a private RPC method._
187
+
188
+ Returns the number of seconds since the device transitioned to the ON power state
189
+
190
+ Result:
191
+
192
+ Capabilities:
193
+
194
+ | Role | Capability |
195
+ | ---- | ----------------------------------- |
196
+ | uses | xrn:firebolt:capability:device:info |
197
+
198
+ #### Examples
199
+
200
+ Getting the number of seconds since the device transitioned to the ON power state
201
+
202
+ ---
203
+
204
+ ### uid
205
+
206
+ Returns a persistent unique UUID for the current app and device. The UUID is reset when the app or device is reset
207
+
208
+ ```typescript
209
+ function uid(): Promise<string>
210
+ ```
211
+
212
+ Promise resolution:
213
+
214
+ Capabilities:
215
+
216
+ | Role | Capability |
217
+ | ---- | ---------------------------------- |
218
+ | uses | xrn:firebolt:capability:device:uid |
219
+
220
+ #### Examples
221
+
222
+ Getting the unique UUID
223
+
224
+ JavaScript:
225
+
226
+ ```javascript
227
+ import { Device } from '@firebolt-js/core-client'
228
+
229
+ let uniqueId = await Device.uid()
230
+ console.log(uniqueId)
231
+ ```
232
+
233
+ Value of `uniqueId`:
234
+
235
+ ```javascript
236
+ 'ee6723b8-7ab3-462c-8d93-dbf61227998e'
237
+ ```
238
+
239
+ ---
240
+
241
+ ### uptime
242
+
243
+ _This is a private RPC method._
244
+
245
+ Returns the number of seconds since most recent device boot, including any time spent during deep sleep
246
+
247
+ Result:
248
+
249
+ Capabilities:
250
+
251
+ | Role | Capability |
252
+ | ---- | ----------------------------------- |
253
+ | uses | xrn:firebolt:capability:device:info |
254
+
255
+ #### Examples
256
+
257
+ Getting the device uptime
258
+
259
+ ---
260
+
261
+ ## Events
262
+
263
+ ### onHdrChanged
264
+
265
+ See: [hdr](#hdr)
266
+
267
+ ## Types
268
+
269
+ ### DeviceClass
270
+
271
+ The type of device
272
+
273
+ ```typescript
274
+ DeviceClass: {
275
+ OTT: 'ott',
276
+ STB: 'stb',
277
+ TV: 'tv',
278
+ },
279
+
280
+ ```
281
+
282
+ ---
283
+
284
+ ### HDRFormatMap
285
+
286
+ The type of HDR format
287
+
288
+ ```typescript
289
+ type HDRFormatMap = {
290
+ hdr10: boolean
291
+ hdr10Plus: boolean
292
+ dolbyVision: boolean
293
+ hlg: boolean
294
+ }
295
+ ```
296
+
297
+ ---
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: Discovery
3
+ ---
4
+
5
+ # Discovery Module
6
+
7
+ ---
8
+
9
+ Version Discovery 1.0.0-next.5
10
+
11
+ ## Table of Contents
12
+
13
+ - [Table of Contents](#table-of-contents)
14
+ - [Usage](#usage)
15
+ - [Overview](#overview)
16
+ - [Localization](#localization)
17
+ - [Methods](#methods)
18
+ - [watched](#watched)
19
+ - [Types](#types)
20
+
21
+ ## Usage
22
+
23
+ To use the Discovery module, you can import it into your project from the Firebolt SDK:
24
+
25
+ ```javascript
26
+ import { Discovery } from '@firebolt-js/core-client'
27
+ ```
28
+
29
+ ## Overview
30
+
31
+ 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.
32
+
33
+ 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.
34
+
35
+ Under the hood, an underlying transport layer will then take care of calling the right APIs for the actual platform implementation that your App is running on.
36
+
37
+ The Discovery plugin is used to _send_ information to the Platform.
38
+
39
+ ### Localization
40
+
41
+ Apps should provide all user-facing strings in the device's language, as specified by the Firebolt `Localization.language` property.
42
+
43
+ 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.
44
+
45
+ ## Methods
46
+
47
+ ### watched
48
+
49
+ Notify the platform that content was partially or completely watched
50
+
51
+ ```typescript
52
+ function watched(
53
+ entityId: string,
54
+ progress: number,
55
+ completed: boolean,
56
+ watchedOn: string,
57
+ agePolicy: AgePolicy,
58
+ ): Promise<boolean>
59
+ ```
60
+
61
+ Parameters:
62
+
63
+ | Param | Type | Required | Description |
64
+ | ----------- | --------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
65
+ | `entityId` | `string` | true | The entity Id of the watched content. |
66
+ | `progress` | `number` | false | How much of the content has been watched (percentage as (0-0.999) for VOD, number of seconds for live) <br/>minumum: 0 |
67
+ | `completed` | `boolean` | false | Whether or not this viewing is considered "complete," per the app's definition thereof |
68
+ | `watchedOn` | `string` | false | Date/Time the content was watched, ISO 8601 Date/Time <br/>format: date-time |
69
+ | `agePolicy` | [`AgePolicy`](../Policies/schemas/#AgePolicy) | false | |
70
+
71
+ Promise resolution:
72
+
73
+ Capabilities:
74
+
75
+ | Role | Capability |
76
+ | ---- | ----------------------------------------- |
77
+ | uses | xrn:firebolt:capability:discovery:watched |
78
+
79
+ #### Examples
80
+
81
+ Notify the platform of watched content
82
+
83
+ JavaScript:
84
+
85
+ ```javascript
86
+ import { Discovery } from '@firebolt-js/core-client'
87
+
88
+ let success = await Discovery.watched(
89
+ 'partner.com/entity/123',
90
+ 0.95,
91
+ true,
92
+ '2021-04-23T18:25:43.511Z',
93
+ )
94
+ console.log(success)
95
+ ```
96
+
97
+ Value of `success`:
98
+
99
+ ```javascript
100
+ true
101
+ ```
102
+
103
+ Notify the platform that child-directed content was watched
104
+
105
+ JavaScript:
106
+
107
+ ```javascript
108
+ import { Discovery } from '@firebolt-js/core-client'
109
+
110
+ let success = await Discovery.watched(
111
+ 'partner.com/entity/123',
112
+ 0.95,
113
+ true,
114
+ '2021-04-23T18:25:43.511Z',
115
+ 'app:child',
116
+ )
117
+ console.log(success)
118
+ ```
119
+
120
+ Value of `success`:
121
+
122
+ ```javascript
123
+ true
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Types
@@ -0,0 +1,87 @@
1
+ ---
2
+ title: Display
3
+ ---
4
+
5
+ # Display Module
6
+
7
+ ---
8
+
9
+ Version Display 1.0.0-next.5
10
+
11
+ ## Table of Contents
12
+
13
+ - [Table of Contents](#table-of-contents)
14
+ - [Overview](#overview)
15
+ - [Methods](#methods)
16
+ - [edid](#edid)
17
+ - [maxResolution](#maxresolution)
18
+ - [size](#size)
19
+ - [Types](#types)
20
+
21
+ ## Overview
22
+
23
+ A module for querying about the display
24
+
25
+ ## Methods
26
+
27
+ ### edid
28
+
29
+ _This is a private RPC method._
30
+
31
+ Returns the EDID (and extensions) of the connected or integral display, as a Base64 encoded string
32
+
33
+ Result:
34
+
35
+ Capabilities:
36
+
37
+ | Role | Capability |
38
+ | ---- | ------------------------------------ |
39
+ | uses | xrn:firebolt:capability:display:info |
40
+
41
+ #### Examples
42
+
43
+ Getting the display EDID
44
+
45
+ ---
46
+
47
+ ### maxResolution
48
+
49
+ _This is a private RPC method._
50
+
51
+ Returns the physical/native resolution of the connected or integral display, in pixels. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI
52
+
53
+ Result:
54
+
55
+ Capabilities:
56
+
57
+ | Role | Capability |
58
+ | ---- | ------------------------------------ |
59
+ | uses | xrn:firebolt:capability:display:info |
60
+
61
+ #### Examples
62
+
63
+ Getting the display size
64
+
65
+ ---
66
+
67
+ ### size
68
+
69
+ _This is a private RPC method._
70
+
71
+ Returns the physical dimensions of the connected or integral display, in centimeters. Returns 0, 0 on a OTT/STB device when a display is not connected over HDMI
72
+
73
+ Result:
74
+
75
+ Capabilities:
76
+
77
+ | Role | Capability |
78
+ | ---- | ------------------------------------ |
79
+ | uses | xrn:firebolt:capability:display:info |
80
+
81
+ #### Examples
82
+
83
+ Getting the display size
84
+
85
+ ---
86
+
87
+ ## Types
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: Internal
3
+ ---
4
+
5
+ # Internal Module
6
+
7
+ ---
8
+
9
+ Version Internal 1.0.0-next.5
10
+
11
+ ## Table of Contents
12
+
13
+ - [Table of Contents](#table-of-contents)
14
+ - [Overview](#overview)
15
+ - [Methods](#methods)
16
+ - [initialize](#initialize)
17
+ - [Types](#types)
18
+ - [InitializeResult](#initializeresult)
19
+
20
+ ## Overview
21
+
22
+ Internal methods for SDK / FEE integration
23
+
24
+ ## Methods
25
+
26
+ ### initialize
27
+
28
+ _This is a private RPC method._
29
+
30
+ Initialize the SDK / FEE session.
31
+
32
+ Parameters:
33
+
34
+ | Param | Type | Required | Description |
35
+ | --------- | ------------------------------------------------------ | -------- | -------------------------------- |
36
+ | `version` | [`SemanticVersion`](../Types/schemas/#SemanticVersion) | true | The semantic version of the SDK. |
37
+
38
+ Result:
39
+
40
+ [InitializeResult](#initializeresult)
41
+
42
+ Capabilities:
43
+
44
+ | Role | Capability |
45
+ | ---- | -------------------------------------------- |
46
+ | uses | xrn:firebolt:capability:lifecycle:initialize |
47
+
48
+ #### Examples
49
+
50
+ Default Example
51
+
52
+ ---
53
+
54
+ ## Types
55
+
56
+ ### InitializeResult
57
+
58
+ ```typescript
59
+ type InitializeResult = {
60
+ version: SemanticVersion // The semantic version of the FEE.
61
+ }
62
+ ```
63
+
64
+ See also:
65
+
66
+ [Types.SemanticVersion](../Types/schemas/#SemanticVersion)
67
+
68
+ ---