@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,61 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+ import MockProps from '../Prop/MockProps.mjs'
19
+
20
+ export default {
21
+ audioDescription: function (params) {
22
+ return MockProps.mock(
23
+ 'Accessibility',
24
+ 'audioDescription',
25
+ params,
26
+ undefined,
27
+ 0,
28
+ true,
29
+ )
30
+ },
31
+ closedCaptionsSettings: function (params) {
32
+ return MockProps.mock(
33
+ 'Accessibility',
34
+ 'closedCaptionsSettings',
35
+ params,
36
+ undefined,
37
+ 0,
38
+ { enabled: true, preferredLanguages: ['eng', 'spa'] },
39
+ )
40
+ },
41
+ highContrastUI: function (params) {
42
+ return MockProps.mock(
43
+ 'Accessibility',
44
+ 'highContrastUI',
45
+ params,
46
+ undefined,
47
+ 0,
48
+ true,
49
+ )
50
+ },
51
+ voiceGuidanceSettings: function (params) {
52
+ return MockProps.mock(
53
+ 'Accessibility',
54
+ 'voiceGuidanceSettings',
55
+ params,
56
+ undefined,
57
+ 0,
58
+ { enabled: true, rate: 0.8, navigationHints: true },
59
+ )
60
+ },
61
+ }
@@ -0,0 +1,148 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+
19
+ import Gateway from '../Gateway/index.mjs'
20
+ import Events from '../Events/index.mjs'
21
+ import { registerEvents } from '../Events/index.mjs'
22
+ import Prop from '../Prop/index.mjs'
23
+
24
+ registerEvents('Accessibility', [
25
+ 'onAudioDescriptionChanged',
26
+ 'onClosedCaptionsSettingsChanged',
27
+ 'onHighContrastUIChanged',
28
+ 'onVoiceGuidanceSettingsChanged',
29
+ ])
30
+
31
+ // onAudioDescriptionChanged is accessed via listen('onAudioDescriptionChanged, ...)
32
+
33
+ // onClosedCaptionsSettingsChanged is accessed via listen('onClosedCaptionsSettingsChanged, ...)
34
+
35
+ // onHighContrastUIChanged is accessed via listen('onHighContrastUIChanged, ...)
36
+
37
+ // onVoiceGuidanceSettingsChanged is accessed via listen('onVoiceGuidanceSettingsChanged, ...)
38
+
39
+ // Methods
40
+ function audioDescription() {
41
+ let callbackOrValue = arguments[0]
42
+ let params = {}
43
+
44
+ // If there is only one parameter, it must be the callback.
45
+ if (arguments.length === 1 && typeof arguments[0] === 'function') {
46
+ callbackOrValue = arguments[0]
47
+ params = {}
48
+ }
49
+
50
+ return Prop.prop(
51
+ 'Accessibility',
52
+ 'audioDescription',
53
+ params,
54
+ callbackOrValue,
55
+ false,
56
+ true,
57
+ 0,
58
+ )
59
+ }
60
+ function clear(...args) {
61
+ return Events.clear('Accessibility', ...args)
62
+ }
63
+
64
+ function closedCaptionsSettings() {
65
+ let callbackOrValue = arguments[0]
66
+ let params = {}
67
+
68
+ // If there is only one parameter, it must be the callback.
69
+ if (arguments.length === 1 && typeof arguments[0] === 'function') {
70
+ callbackOrValue = arguments[0]
71
+ params = {}
72
+ }
73
+
74
+ return Prop.prop(
75
+ 'Accessibility',
76
+ 'closedCaptionsSettings',
77
+ params,
78
+ callbackOrValue,
79
+ false,
80
+ true,
81
+ 0,
82
+ )
83
+ }
84
+ function highContrastUI() {
85
+ let callbackOrValue = arguments[0]
86
+ let params = {}
87
+
88
+ // If there is only one parameter, it must be the callback.
89
+ if (arguments.length === 1 && typeof arguments[0] === 'function') {
90
+ callbackOrValue = arguments[0]
91
+ params = {}
92
+ }
93
+
94
+ return Prop.prop(
95
+ 'Accessibility',
96
+ 'highContrastUI',
97
+ params,
98
+ callbackOrValue,
99
+ false,
100
+ true,
101
+ 0,
102
+ )
103
+ }
104
+ function listen(...args) {
105
+ return Events.listen('Accessibility', ...args)
106
+ }
107
+
108
+ function once(...args) {
109
+ return Events.once('Accessibility', ...args)
110
+ }
111
+
112
+ function voiceGuidanceSettings() {
113
+ let callbackOrValue = arguments[0]
114
+ let params = {}
115
+
116
+ // If there is only one parameter, it must be the callback.
117
+ if (arguments.length === 1 && typeof arguments[0] === 'function') {
118
+ callbackOrValue = arguments[0]
119
+ params = {}
120
+ }
121
+
122
+ return Prop.prop(
123
+ 'Accessibility',
124
+ 'voiceGuidanceSettings',
125
+ params,
126
+ callbackOrValue,
127
+ false,
128
+ true,
129
+ 0,
130
+ )
131
+ }
132
+
133
+ export default {
134
+ Events: {
135
+ ON_AUDIO_DESCRIPTION_CHANGED: 'onAudioDescriptionChanged',
136
+ ON_CLOSED_CAPTIONS_SETTINGS_CHANGED: 'onClosedCaptionsSettingsChanged',
137
+ ON_HIGH_CONTRAST_UICHANGED: 'onHighContrastUIChanged',
138
+ ON_VOICE_GUIDANCE_SETTINGS_CHANGED: 'onVoiceGuidanceSettingsChanged',
139
+ },
140
+
141
+ audioDescription,
142
+ clear,
143
+ closedCaptionsSettings,
144
+ highContrastUI,
145
+ listen,
146
+ once,
147
+ voiceGuidanceSettings,
148
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+ import MockProps from '../Prop/MockProps.mjs'
19
+
20
+ export default {
21
+ advertisingId: {
22
+ ifa: 'bd87dd10-8d1d-4b93-b1a6-a8e5d410e400',
23
+ ifa_type: 'sspid',
24
+ lmt: '0',
25
+ },
26
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+
19
+ import Gateway from '../Gateway/index.mjs'
20
+
21
+ // Methods
22
+
23
+ function advertisingId() {
24
+ let params = {}
25
+
26
+ return Gateway.request('Advertising.advertisingId', params)
27
+ }
28
+
29
+ export default {
30
+ advertisingId,
31
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+ import MockProps from '../Prop/MockProps.mjs'
19
+
20
+ export default {
21
+ uid: 'ee6723b8-7ab3-462c-8d93-dbf61227998e',
22
+ deviceClass: 'ott',
23
+ uptime: 123456,
24
+ timeInActiveState: 654321,
25
+ chipsetId: 'BCM72180',
26
+ hdr: function (params) {
27
+ return MockProps.mock('Device', 'hdr', params, undefined, 0, {
28
+ hdr10: true,
29
+ hdr10Plus: true,
30
+ dolbyVision: true,
31
+ hlg: true,
32
+ })
33
+ },
34
+ }
@@ -0,0 +1,84 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+
19
+ import Gateway from '../Gateway/index.mjs'
20
+ import Events from '../Events/index.mjs'
21
+ import { registerEvents } from '../Events/index.mjs'
22
+ import Prop from '../Prop/index.mjs'
23
+
24
+ registerEvents('Device', ['onHdrChanged'])
25
+
26
+ // onHdrChanged is accessed via listen('onHdrChanged, ...)
27
+
28
+ // Methods
29
+ function clear(...args) {
30
+ return Events.clear('Device', ...args)
31
+ }
32
+
33
+ function deviceClass() {
34
+ let params = {}
35
+
36
+ return Gateway.request('Device.deviceClass', params)
37
+ }
38
+ function hdr() {
39
+ let callbackOrValue = arguments[0]
40
+ let params = {}
41
+
42
+ // If there is only one parameter, it must be the callback.
43
+ if (arguments.length === 1 && typeof arguments[0] === 'function') {
44
+ callbackOrValue = arguments[0]
45
+ params = {}
46
+ }
47
+
48
+ return Prop.prop('Device', 'hdr', params, callbackOrValue, false, true, 0)
49
+ }
50
+ function listen(...args) {
51
+ return Events.listen('Device', ...args)
52
+ }
53
+
54
+ function once(...args) {
55
+ return Events.once('Device', ...args)
56
+ }
57
+
58
+ function uid() {
59
+ let params = {}
60
+
61
+ return Gateway.request('Device.uid', params)
62
+ }
63
+
64
+ export default {
65
+ Events: {
66
+ ON_HDR_CHANGED: 'onHdrChanged',
67
+ },
68
+
69
+ /**
70
+ * The type of device
71
+ */
72
+ DeviceClass: {
73
+ OTT: 'ott',
74
+ STB: 'stb',
75
+ TV: 'tv',
76
+ },
77
+
78
+ clear,
79
+ deviceClass,
80
+ hdr,
81
+ listen,
82
+ once,
83
+ uid,
84
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+ import MockProps from '../Prop/MockProps.mjs'
19
+
20
+ export default {
21
+ watched: true,
22
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright 2021 Comcast Cable Communications Management, LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+
19
+ import Gateway from '../Gateway/index.mjs'
20
+
21
+ // Methods
22
+
23
+ function watched(entityId, progress, completed, watchedOn, agePolicy) {
24
+ let params = { entityId, progress, completed, watchedOn, agePolicy }
25
+
26
+ // remove the null params if they are optional
27
+ params = Gateway.removeNullOptionalParams(params, 4)
28
+
29
+ return Gateway.request('Discovery.watched', params)
30
+ }
31
+
32
+ export default {
33
+ watched,
34
+ }