@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.
- package/CHANGELOG.md +0 -0
- package/CONTRIBUTING.md +4 -0
- package/LICENSE +202 -0
- package/NOTICE +24 -0
- package/README.md +26 -0
- package/dist/docs/Accessibility/index.md +384 -0
- package/dist/docs/Accessibility/schemas/index.md +52 -0
- package/dist/docs/Advertising/index.md +120 -0
- package/dist/docs/Device/index.md +297 -0
- package/dist/docs/Discovery/index.md +128 -0
- package/dist/docs/Display/index.md +87 -0
- package/dist/docs/Internal/index.md +68 -0
- package/dist/docs/Lifecycle2/index.md +160 -0
- package/dist/docs/Localization/index.md +314 -0
- package/dist/docs/Localization/schemas/index.md +41 -0
- package/dist/docs/Metrics/index.md +987 -0
- package/dist/docs/Network/index.md +128 -0
- package/dist/docs/Policies/schemas/index.md +25 -0
- package/dist/docs/Presentation/index.md +53 -0
- package/dist/docs/Stats/index.md +63 -0
- package/dist/docs/TextToSpeech/index.md +524 -0
- package/dist/docs/Types/schemas/index.md +37 -0
- package/dist/firebolt-core-app-open-rpc.json +1082 -0
- package/dist/firebolt-core-open-rpc.json +3773 -0
- package/dist/lib/Accessibility/defaults.mjs +61 -0
- package/dist/lib/Accessibility/index.mjs +148 -0
- package/dist/lib/Advertising/defaults.mjs +26 -0
- package/dist/lib/Advertising/index.mjs +31 -0
- package/dist/lib/Device/defaults.mjs +34 -0
- package/dist/lib/Device/index.mjs +84 -0
- package/dist/lib/Discovery/defaults.mjs +22 -0
- package/dist/lib/Discovery/index.mjs +34 -0
- package/dist/lib/Events/index.mjs +345 -0
- package/dist/lib/Gateway/AppApi.mjs +125 -0
- package/dist/lib/Gateway/Bidirectional.mjs +113 -0
- package/dist/lib/Gateway/PlatformApi.mjs +130 -0
- package/dist/lib/Gateway/index.mjs +48 -0
- package/dist/lib/Localization/defaults.mjs +44 -0
- package/dist/lib/Localization/index.mjs +123 -0
- package/dist/lib/Log/index.mjs +57 -0
- package/dist/lib/Metrics/defaults.mjs +40 -0
- package/dist/lib/Metrics/index.mjs +206 -0
- package/dist/lib/Network/defaults.mjs +24 -0
- package/dist/lib/Network/index.mjs +70 -0
- package/dist/lib/Platform/defaults.mjs +27 -0
- package/dist/lib/Platform/index.mjs +28 -0
- package/dist/lib/Prop/MockProps.mjs +28 -0
- package/dist/lib/Prop/Router.mjs +25 -0
- package/dist/lib/Prop/index.mjs +60 -0
- package/dist/lib/Settings/index.mjs +86 -0
- package/dist/lib/Transport/MockTransport.mjs +191 -0
- package/dist/lib/Transport/WebsocketTransport.mjs +55 -0
- package/dist/lib/Transport/index.mjs +81 -0
- package/dist/lib/firebolt.d.ts +795 -0
- package/dist/lib/firebolt.mjs +51 -0
- package/firebolt-js-core-client-1.0.0-next.5.tgz +0 -0
- package/package.json +54 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Network
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Network Module
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Version Network 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
|
+
- [connected](#connected)
|
|
18
|
+
- [Events](#events)
|
|
19
|
+
- [onConnectedChanged](#onconnectedchanged)
|
|
20
|
+
- [Types](#types)
|
|
21
|
+
- [Connected](#connected-1)
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
To use the Network module, you can import it into your project from the Firebolt SDK:
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
import { Network } from '@firebolt-js/core-client'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Overview
|
|
32
|
+
|
|
33
|
+
Methods for accessing network information.
|
|
34
|
+
|
|
35
|
+
## Methods
|
|
36
|
+
|
|
37
|
+
### connected
|
|
38
|
+
|
|
39
|
+
Returns whether the device currently has a usable network connection.
|
|
40
|
+
|
|
41
|
+
To get the value of `connected` call the method like this:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
function connected(): Promise<boolean>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Promise resolution:
|
|
48
|
+
|
|
49
|
+
Capabilities:
|
|
50
|
+
|
|
51
|
+
| Role | Capability |
|
|
52
|
+
| ---- | ----------------------------------------- |
|
|
53
|
+
| uses | xrn:firebolt:capability:network:connected |
|
|
54
|
+
|
|
55
|
+
#### Examples
|
|
56
|
+
|
|
57
|
+
Connected example
|
|
58
|
+
|
|
59
|
+
JavaScript:
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
import { Network } from '@firebolt-js/core-client'
|
|
63
|
+
|
|
64
|
+
let success = await Network.connected()
|
|
65
|
+
console.log(success)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Value of `success`:
|
|
69
|
+
|
|
70
|
+
```javascript
|
|
71
|
+
true
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
To subscribe to notifications when the value changes, call the method like this:
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
function connected(callback: (success) => boolean): Promise<number>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| Param | Type | Required | Description |
|
|
83
|
+
| --------- | --------- | -------- | ------------------------------------------------------------- |
|
|
84
|
+
| `success` | `boolean` | false | Whether the device currently has a usable network connection. |
|
|
85
|
+
|
|
86
|
+
Promise resolution:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
number
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### Examples
|
|
93
|
+
|
|
94
|
+
Connected example
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
import { Network } from '@firebolt-js/core-client'
|
|
98
|
+
|
|
99
|
+
let listenerId = await connected((result) => {
|
|
100
|
+
console.log(result)
|
|
101
|
+
})
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Value of `result`:
|
|
105
|
+
|
|
106
|
+
```javascript
|
|
107
|
+
true
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Events
|
|
113
|
+
|
|
114
|
+
### onConnectedChanged
|
|
115
|
+
|
|
116
|
+
See: [connected](#connected)
|
|
117
|
+
|
|
118
|
+
## Types
|
|
119
|
+
|
|
120
|
+
### Connected
|
|
121
|
+
|
|
122
|
+
Indicates whether the device currently has a usable network connection.
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
type Connected = boolean
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Policies
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Policies
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Table of Contents](#table-of-contents)
|
|
12
|
+
- [Types](#types)
|
|
13
|
+
- [AgePolicy](#agepolicy)
|
|
14
|
+
|
|
15
|
+
## Types
|
|
16
|
+
|
|
17
|
+
### AgePolicy
|
|
18
|
+
|
|
19
|
+
The policy that describes various age groups to which content is directed. See distributor documentation for further details.
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
type AgePolicy = string | 'app:adult' | 'app:child' | 'app:teen'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Presentation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Presentation Module
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Version Presentation 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
|
+
- [focused](#focused)
|
|
17
|
+
- [Events](#events)
|
|
18
|
+
- [onFocusedChanged](#onfocusedchanged)
|
|
19
|
+
- [Types](#types)
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
Methods for accessing Presentation preferences.
|
|
24
|
+
|
|
25
|
+
## Methods
|
|
26
|
+
|
|
27
|
+
### focused
|
|
28
|
+
|
|
29
|
+
_This is a private RPC method._
|
|
30
|
+
|
|
31
|
+
Whether the app is in focus, i.e. receiving key presses. Provided for those apps/runtimes that cannot use Wayland
|
|
32
|
+
|
|
33
|
+
Result:
|
|
34
|
+
|
|
35
|
+
Capabilities:
|
|
36
|
+
|
|
37
|
+
| Role | Capability |
|
|
38
|
+
| ---- | -------------------------------------------- |
|
|
39
|
+
| uses | xrn:firebolt:capability:presentation:general |
|
|
40
|
+
|
|
41
|
+
#### Examples
|
|
42
|
+
|
|
43
|
+
Default example
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Events
|
|
48
|
+
|
|
49
|
+
### onFocusedChanged
|
|
50
|
+
|
|
51
|
+
See: [focused](#focused)
|
|
52
|
+
|
|
53
|
+
## Types
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Stats
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Stats Module
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Version Stats 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
|
+
- [memoryUsage](#memoryusage)
|
|
17
|
+
- [Types](#types)
|
|
18
|
+
- [MemoryUsage](#memoryusage-1)
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
Provides methods to retrieve application-level system information.
|
|
23
|
+
|
|
24
|
+
## Methods
|
|
25
|
+
|
|
26
|
+
### memoryUsage
|
|
27
|
+
|
|
28
|
+
_This is a private RPC method._
|
|
29
|
+
|
|
30
|
+
Returns information about container memory usage, in bytes.
|
|
31
|
+
|
|
32
|
+
Result:
|
|
33
|
+
|
|
34
|
+
[MemoryUsage](#memoryusage-1)
|
|
35
|
+
|
|
36
|
+
Capabilities:
|
|
37
|
+
|
|
38
|
+
| Role | Capability |
|
|
39
|
+
| ---- | ------------------------------------- |
|
|
40
|
+
| uses | xrn:firebolt:capability:stats:general |
|
|
41
|
+
|
|
42
|
+
#### Examples
|
|
43
|
+
|
|
44
|
+
Default example
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Types
|
|
49
|
+
|
|
50
|
+
### MemoryUsage
|
|
51
|
+
|
|
52
|
+
Describes current and maximum memory usage of the container.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
type MemoryUsage = {
|
|
56
|
+
userMemoryUsed: number // User memory currently used in bytes.
|
|
57
|
+
userMemoryLimit: number // Maximum user memory available in bytes.
|
|
58
|
+
gpuMemoryUsed: number // GPU memory currently used in bytes.
|
|
59
|
+
gpuMemoryLimit: number // Maximum GPU memory available in bytes.
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|