@signageos/front-applet 7.2.0 → 8.0.1

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 (421) hide show
  1. package/dist/bundle.js +8 -4
  2. package/dist/bundle.js.map +1 -1
  3. package/docs/fpath/index.md +316 -0
  4. package/docs/index.md +19 -85
  5. package/docs/sos/browser.md +210 -0
  6. package/docs/sos/command.md +68 -0
  7. package/docs/sos/debug.md +25 -0
  8. package/docs/sos/deviceInfo.md +49 -0
  9. package/docs/sos/display.md +21 -0
  10. package/docs/sos/fileSystem.md +594 -0
  11. package/docs/sos/hardware/barcodeScanner.md +40 -0
  12. package/docs/sos/hardware/index.md +64 -0
  13. package/docs/sos/hardware/led.md +14 -0
  14. package/docs/sos/index.md +82 -0
  15. package/docs/sos/input.md +73 -0
  16. package/docs/sos/monitors.md +21 -0
  17. package/docs/sos/native/index.md +5 -0
  18. package/docs/sos/native/mdc.md +240 -0
  19. package/docs/sos/offline/cache.md +183 -0
  20. package/docs/sos/offline/index.md +188 -0
  21. package/docs/sos/osd.md +13 -0
  22. package/docs/sos/proofOfPlay.md +37 -0
  23. package/docs/sos/stream.md +960 -0
  24. package/docs/sos/sync.md +298 -0
  25. package/docs/sos/video.md +285 -0
  26. package/docs/sos_management/app.md +102 -0
  27. package/docs/sos_management/audio.md +29 -0
  28. package/docs/sos_management/debug.md +33 -0
  29. package/docs/sos_management/firmware.md +86 -0
  30. package/docs/sos_management/index.md +212 -0
  31. package/docs/sos_management/network.md +197 -0
  32. package/docs/sos_management/os.md +54 -0
  33. package/docs/sos_management/package.md +33 -0
  34. package/docs/sos_management/power.md +136 -0
  35. package/docs/sos_management/proxy.md +41 -0
  36. package/docs/sos_management/remoteControl.md +72 -0
  37. package/docs/sos_management/screen.md +198 -0
  38. package/docs/sos_management/security.md +47 -0
  39. package/docs/sos_management/time.md +101 -0
  40. package/docs/sos_management/wifi.md +366 -0
  41. package/es6/FrontApplet/Browser/Browser.d.ts +61 -8
  42. package/es6/FrontApplet/Browser/Browser.js +91 -39
  43. package/es6/FrontApplet/Browser/Browser.js.map +1 -1
  44. package/es6/FrontApplet/Browser/events.js +2 -2
  45. package/es6/FrontApplet/Browser/events.js.map +1 -1
  46. package/es6/FrontApplet/Command/Command.d.ts +37 -3
  47. package/es6/FrontApplet/Command/Command.js +49 -20
  48. package/es6/FrontApplet/Command/Command.js.map +1 -1
  49. package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -2
  50. package/es6/FrontApplet/Connect/Connect.d.ts +3 -0
  51. package/es6/FrontApplet/Connect/Connect.js +55 -7
  52. package/es6/FrontApplet/Connect/Connect.js.map +1 -1
  53. package/es6/FrontApplet/Connect/IConnectMessage.d.ts +1 -1
  54. package/es6/FrontApplet/Debug/Debug.d.ts +15 -1
  55. package/es6/FrontApplet/Debug/Debug.js +27 -17
  56. package/es6/FrontApplet/Debug/Debug.js.map +1 -1
  57. package/es6/FrontApplet/Debug/debugDecorator.d.ts +3 -3
  58. package/es6/FrontApplet/Debug/debugDecorator.js +13 -7
  59. package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
  60. package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +23 -0
  61. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +36 -27
  62. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  63. package/es6/FrontApplet/Dimensions/coordinationsHelper.js +1 -2
  64. package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
  65. package/es6/FrontApplet/Display/Display.d.ts +25 -3
  66. package/es6/FrontApplet/Display/Display.js +35 -19
  67. package/es6/FrontApplet/Display/Display.js.map +1 -1
  68. package/es6/FrontApplet/Display/IDisplay.d.ts +3 -1
  69. package/es6/FrontApplet/Error/AppletCommandError.js +12 -3
  70. package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -1
  71. package/es6/FrontApplet/Error/AppletError.js +10 -2
  72. package/es6/FrontApplet/Error/AppletError.js.map +1 -1
  73. package/es6/FrontApplet/Error/AppletHardwareError.js +12 -3
  74. package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -1
  75. package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -2
  76. package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -1
  77. package/es6/FrontApplet/Error/AppletResourcesError.js +12 -3
  78. package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -1
  79. package/es6/FrontApplet/Error/AppletSecurityError.js +12 -3
  80. package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -1
  81. package/es6/FrontApplet/Error/AppletStreamError.js +10 -2
  82. package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -1
  83. package/es6/FrontApplet/Error/AppletVideoError.js +12 -3
  84. package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -1
  85. package/es6/FrontApplet/Error/ErrorCodesMessages.js +4 -1
  86. package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -1
  87. package/es6/FrontApplet/Error/ErrorSuggestions.js +1 -0
  88. package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -1
  89. package/es6/FrontApplet/Error/FileNotFoundError.js +10 -2
  90. package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -1
  91. package/es6/FrontApplet/Error/SosError.js +4 -0
  92. package/es6/FrontApplet/Error/SosError.js.map +1 -1
  93. package/es6/FrontApplet/Error/errorHelper.js +5 -6
  94. package/es6/FrontApplet/Error/errorHelper.js.map +1 -1
  95. package/es6/FrontApplet/Exchange/Exchange.js +7 -14
  96. package/es6/FrontApplet/Exchange/Exchange.js.map +1 -1
  97. package/es6/FrontApplet/FileSystem/FileSystem.d.ts +156 -1
  98. package/es6/FrontApplet/FileSystem/FileSystem.js +316 -193
  99. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
  100. package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +2 -0
  101. package/es6/FrontApplet/{Stream/streamListeners.js → FileSystem/HashAlgorithm.js} +1 -1
  102. package/es6/FrontApplet/FileSystem/HashAlgorithm.js.map +1 -0
  103. package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
  104. package/es6/FrontApplet/FrontApplet.d.ts +55 -4
  105. package/es6/FrontApplet/FrontApplet.js +124 -47
  106. package/es6/FrontApplet/FrontApplet.js.map +1 -1
  107. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +2 -0
  108. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +35 -54
  109. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
  110. package/es6/FrontApplet/Hardware/Hardware.d.ts +16 -2
  111. package/es6/FrontApplet/Hardware/Hardware.js +31 -19
  112. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
  113. package/es6/FrontApplet/Hardware/IHardware.d.ts +2 -2
  114. package/es6/FrontApplet/Hardware/ISerialPort.d.ts +16 -0
  115. package/es6/FrontApplet/Hardware/ISerialPortOptions.js +1 -1
  116. package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -1
  117. package/es6/FrontApplet/Hardware/Led/Led.d.ts +8 -0
  118. package/es6/FrontApplet/Hardware/Led/Led.js +20 -18
  119. package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
  120. package/es6/FrontApplet/Hardware/SerialPort.d.ts +1 -1
  121. package/es6/FrontApplet/Hardware/SerialPort.js +15 -23
  122. package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -1
  123. package/es6/FrontApplet/Hash/generator.js +1 -2
  124. package/es6/FrontApplet/Hash/generator.js.map +1 -1
  125. package/es6/FrontApplet/Iframe/Iframe.d.ts +9 -8
  126. package/es6/FrontApplet/Iframe/Iframe.js +10 -0
  127. package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
  128. package/es6/FrontApplet/Input/IInput.d.ts +1 -2
  129. package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +32 -2
  130. package/es6/FrontApplet/Input/IKeyUpEvent.js +32 -0
  131. package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
  132. package/es6/FrontApplet/Input/Input.d.ts +19 -3
  133. package/es6/FrontApplet/Input/Input.js +43 -22
  134. package/es6/FrontApplet/Input/Input.js.map +1 -1
  135. package/es6/FrontApplet/Management/App/App.d.ts +48 -10
  136. package/es6/FrontApplet/Management/App/App.js +45 -30
  137. package/es6/FrontApplet/Management/App/App.js.map +1 -1
  138. package/es6/FrontApplet/Management/App/IApp.d.ts +3 -1
  139. package/es6/FrontApplet/Management/Audio/Audio.d.ts +16 -0
  140. package/es6/FrontApplet/Management/Audio/Audio.js +30 -22
  141. package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
  142. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +4 -0
  143. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +15 -22
  144. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
  145. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js +4 -1
  146. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js.map +1 -1
  147. package/es6/FrontApplet/Management/Debug/Debug.d.ts +19 -0
  148. package/es6/FrontApplet/Management/Debug/Debug.js +37 -30
  149. package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
  150. package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +37 -10
  151. package/es6/FrontApplet/Management/Firmware/Firmware.js +34 -30
  152. package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
  153. package/es6/FrontApplet/Management/Firmware/IFirmware.d.ts +1 -2
  154. package/es6/FrontApplet/Management/IManagement.d.ts +3 -1
  155. package/es6/FrontApplet/Management/Management.d.ts +106 -15
  156. package/es6/FrontApplet/Management/Management.js +191 -113
  157. package/es6/FrontApplet/Management/Management.js.map +1 -1
  158. package/es6/FrontApplet/Management/Network/INetworkInfo.d.ts +1 -1
  159. package/es6/FrontApplet/Management/Network/Network.d.ts +56 -8
  160. package/es6/FrontApplet/Management/Network/Network.js +85 -67
  161. package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
  162. package/es6/FrontApplet/Management/OS/OS.d.ts +20 -0
  163. package/es6/FrontApplet/Management/OS/OS.js +34 -27
  164. package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
  165. package/es6/FrontApplet/Management/Package/Package.d.ts +20 -0
  166. package/es6/FrontApplet/Management/Package/Package.js +37 -22
  167. package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
  168. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js +4 -1
  169. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js.map +1 -1
  170. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.d.ts +4 -0
  171. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js +15 -22
  172. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js.map +1 -1
  173. package/es6/FrontApplet/Management/Power/Power.d.ts +64 -0
  174. package/es6/FrontApplet/Management/Power/Power.js +160 -115
  175. package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
  176. package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +21 -0
  177. package/es6/FrontApplet/Management/Proxy/Proxy.js +41 -35
  178. package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
  179. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +43 -0
  180. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +63 -39
  181. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
  182. package/es6/FrontApplet/Management/Screen/Screen.d.ts +127 -0
  183. package/es6/FrontApplet/Management/Screen/Screen.js +197 -89
  184. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  185. package/es6/FrontApplet/Management/Security/Security.d.ts +20 -5
  186. package/es6/FrontApplet/Management/Security/Security.js +33 -31
  187. package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
  188. package/es6/FrontApplet/Management/Time/Time.d.ts +31 -5
  189. package/es6/FrontApplet/Management/Time/Time.js +49 -40
  190. package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
  191. package/es6/FrontApplet/Management/Wifi/IWifiEvent.d.ts +18 -0
  192. package/es6/FrontApplet/Management/Wifi/IWifiEvent.js +19 -1
  193. package/es6/FrontApplet/Management/Wifi/IWifiEvent.js.map +1 -1
  194. package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +108 -7
  195. package/es6/FrontApplet/Management/Wifi/Wifi.js +162 -86
  196. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  197. package/es6/FrontApplet/Management/helpers/DeviceHelper.js +2 -2
  198. package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -1
  199. package/es6/FrontApplet/Management/helpers/SecurityHelper.js +8 -6
  200. package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -1
  201. package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -2
  202. package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
  203. package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -3
  204. package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -1
  205. package/es6/FrontApplet/Management/helpers/VideoHelper.js +1 -1
  206. package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -1
  207. package/es6/FrontApplet/Monitors/Monitors.d.ts +9 -0
  208. package/es6/FrontApplet/Monitors/Monitors.js +16 -16
  209. package/es6/FrontApplet/Monitors/Monitors.js.map +1 -1
  210. package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js +1 -1
  211. package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js.map +1 -1
  212. package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +51 -2
  213. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +79 -38
  214. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
  215. package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +4 -0
  216. package/es6/FrontApplet/NativeCommands/NativeCommands.js +12 -2
  217. package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
  218. package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
  219. package/es6/FrontApplet/OSD/OSD.js +15 -15
  220. package/es6/FrontApplet/OSD/OSD.js.map +1 -1
  221. package/es6/FrontApplet/Offline/Cache/Cache.d.ts +91 -2
  222. package/es6/FrontApplet/Offline/Cache/Cache.js +192 -130
  223. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
  224. package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
  225. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +17 -25
  226. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
  227. package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +4 -4
  228. package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -1
  229. package/es6/FrontApplet/Offline/IAddFont.js.map +1 -1
  230. package/es6/FrontApplet/Offline/ISaveFile.js +5 -2
  231. package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -1
  232. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +2 -1
  233. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -1
  234. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +2 -1
  235. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -1
  236. package/es6/FrontApplet/Offline/Offline.d.ts +75 -4
  237. package/es6/FrontApplet/Offline/Offline.js +116 -56
  238. package/es6/FrontApplet/Offline/Offline.js.map +1 -1
  239. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +19 -1
  240. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -29
  241. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
  242. package/es6/FrontApplet/Sensors/Proximity.d.ts +4 -3
  243. package/es6/FrontApplet/Sensors/Proximity.js +12 -4
  244. package/es6/FrontApplet/Sensors/Proximity.js.map +1 -1
  245. package/es6/FrontApplet/Sensors/Sensors.d.ts +2 -0
  246. package/es6/FrontApplet/Sensors/Sensors.js +9 -2
  247. package/es6/FrontApplet/Sensors/Sensors.js.map +1 -1
  248. package/es6/FrontApplet/Stream/IStream.d.ts +10 -10
  249. package/es6/FrontApplet/Stream/Stream.d.ts +130 -15
  250. package/es6/FrontApplet/Stream/Stream.js +229 -130
  251. package/es6/FrontApplet/Stream/Stream.js.map +1 -1
  252. package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
  253. package/es6/FrontApplet/Sync/Sync.d.ts +152 -6
  254. package/es6/FrontApplet/Sync/Sync.js +196 -112
  255. package/es6/FrontApplet/Sync/Sync.js.map +1 -1
  256. package/es6/FrontApplet/Sync/syncEvents.d.ts +3 -1
  257. package/es6/FrontApplet/Sync/syncMessages.js +1 -1
  258. package/es6/FrontApplet/Sync/syncMessages.js.map +1 -1
  259. package/es6/FrontApplet/Timing/Timing.d.ts +1 -0
  260. package/es6/FrontApplet/Timing/Timing.js +9 -2
  261. package/es6/FrontApplet/Timing/Timing.js.map +1 -1
  262. package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +1 -1
  263. package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +9 -0
  264. package/es6/FrontApplet/Timing/Triggers/Triggers.js +16 -18
  265. package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -1
  266. package/es6/FrontApplet/Touch/Touch.d.ts +3 -0
  267. package/es6/FrontApplet/Touch/Touch.js +13 -3
  268. package/es6/FrontApplet/Touch/Touch.js.map +1 -1
  269. package/es6/FrontApplet/Validate/Validate.js +14 -11
  270. package/es6/FrontApplet/Validate/Validate.js.map +1 -1
  271. package/es6/FrontApplet/Validate/ValidateObjectInterface.js +7 -2
  272. package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
  273. package/es6/FrontApplet/Video/IOptions.d.ts +8 -1
  274. package/es6/FrontApplet/Video/IVideo.d.ts +8 -8
  275. package/es6/FrontApplet/Video/IVideoEvent.js +3 -3
  276. package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
  277. package/es6/FrontApplet/Video/Video.d.ts +84 -12
  278. package/es6/FrontApplet/Video/Video.js +161 -102
  279. package/es6/FrontApplet/Video/Video.js.map +1 -1
  280. package/es6/FrontApplet/createFrontApplet.js +5 -2
  281. package/es6/FrontApplet/createFrontApplet.js.map +1 -1
  282. package/es6/Monitoring/Display/handleDisplayRequests.d.ts +2 -2
  283. package/es6/Monitoring/Display/handleDisplayRequests.js +5 -15
  284. package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
  285. package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +10 -1
  286. package/es6/Monitoring/FileSystem/fileSystemCommands.js +3 -1
  287. package/es6/Monitoring/FileSystem/fileSystemCommands.js.map +1 -1
  288. package/es6/Monitoring/FileSystem/handleFileSystemRequests.d.ts +2 -2
  289. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +41 -45
  290. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
  291. package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.d.ts +2 -2
  292. package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js +4 -14
  293. package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js.map +1 -1
  294. package/es6/Monitoring/Management/App/handleApplicationRequests.d.ts +2 -2
  295. package/es6/Monitoring/Management/App/handleApplicationRequests.js +9 -19
  296. package/es6/Monitoring/Management/App/handleApplicationRequests.js.map +1 -1
  297. package/es6/Monitoring/Management/Audio/handleAudioRequests.d.ts +2 -2
  298. package/es6/Monitoring/Management/Audio/handleAudioRequests.js +7 -17
  299. package/es6/Monitoring/Management/Audio/handleAudioRequests.js.map +1 -1
  300. package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.d.ts +2 -2
  301. package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js +7 -17
  302. package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js.map +1 -1
  303. package/es6/Monitoring/Management/Debug/handleDebugRequests.d.ts +2 -2
  304. package/es6/Monitoring/Management/Debug/handleDebugRequests.js +9 -19
  305. package/es6/Monitoring/Management/Debug/handleDebugRequests.js.map +1 -1
  306. package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.d.ts +2 -2
  307. package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js +11 -21
  308. package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js.map +1 -1
  309. package/es6/Monitoring/Management/Os/managementOsRequests.d.ts +2 -2
  310. package/es6/Monitoring/Management/Os/managementOsRequests.js +9 -19
  311. package/es6/Monitoring/Management/Os/managementOsRequests.js.map +1 -1
  312. package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.d.ts +2 -2
  313. package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js +7 -17
  314. package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js.map +1 -1
  315. package/es6/Monitoring/Management/Power/handlePowerRequests.d.ts +2 -2
  316. package/es6/Monitoring/Management/Power/handlePowerRequests.js +19 -29
  317. package/es6/Monitoring/Management/Power/handlePowerRequests.js.map +1 -1
  318. package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.d.ts +2 -2
  319. package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js +15 -25
  320. package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js.map +1 -1
  321. package/es6/Monitoring/Management/Screen/handleScreenRequests.d.ts +2 -2
  322. package/es6/Monitoring/Management/Screen/handleScreenRequests.js +19 -29
  323. package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
  324. package/es6/Monitoring/Management/Security/handleSecurityCommands.d.ts +2 -2
  325. package/es6/Monitoring/Management/Security/handleSecurityCommands.js +9 -19
  326. package/es6/Monitoring/Management/Security/handleSecurityCommands.js.map +1 -1
  327. package/es6/Monitoring/Management/Time/handleTimeCommands.d.ts +2 -2
  328. package/es6/Monitoring/Management/Time/handleTimeCommands.js +9 -19
  329. package/es6/Monitoring/Management/Time/handleTimeCommands.js.map +1 -1
  330. package/es6/Monitoring/Management/handleManagementRequests.d.ts +2 -2
  331. package/es6/Monitoring/Management/handleManagementRequests.js +23 -33
  332. package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
  333. package/es6/Monitoring/{Montoring.d.ts → Monitoring.d.ts} +1 -0
  334. package/es6/Monitoring/{Montoring.js → Monitoring.js} +12 -23
  335. package/es6/Monitoring/Monitoring.js.map +1 -0
  336. package/es6/Monitoring/NativeCommands/handleNativeCommands.d.ts +2 -2
  337. package/es6/Monitoring/NativeCommands/handleNativeCommands.js +5 -15
  338. package/es6/Monitoring/NativeCommands/handleNativeCommands.js.map +1 -1
  339. package/es6/Monitoring/OSD/handleOsdRequests.d.ts +2 -2
  340. package/es6/Monitoring/OSD/handleOsdRequests.js +5 -15
  341. package/es6/Monitoring/OSD/handleOsdRequests.js.map +1 -1
  342. package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.d.ts +2 -2
  343. package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js +23 -33
  344. package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js.map +1 -1
  345. package/es6/Monitoring/Video/handleVideoRequests.d.ts +2 -2
  346. package/es6/Monitoring/Video/handleVideoRequests.js +36 -9
  347. package/es6/Monitoring/Video/handleVideoRequests.js.map +1 -1
  348. package/es6/Monitoring/handleMonitoringRequests.d.ts +2 -2
  349. package/es6/Monitoring/handleMonitoringRequests.js +6 -16
  350. package/es6/Monitoring/handleMonitoringRequests.js.map +1 -1
  351. package/es6/Sensors/IButton.js +1 -1
  352. package/es6/Sensors/IButton.js.map +1 -1
  353. package/es6/Sensors/IRfidAntenna.js +1 -1
  354. package/es6/Sensors/IRfidAntenna.js.map +1 -1
  355. package/es6/Util/Console/enhancer.js +1 -2
  356. package/es6/Util/Console/enhancer.js.map +1 -1
  357. package/es6/bundle.d.ts +1 -1
  358. package/es6/bundle.js +6 -3
  359. package/es6/bundle.js.map +1 -1
  360. package/es6/fpath.js +34 -1
  361. package/es6/fpath.js.map +1 -1
  362. package/es6/utils/types.d.ts +1 -0
  363. package/es6/{FrontApplet/Input/IKeyUpEventListener.js → utils/types.js} +1 -1
  364. package/es6/utils/types.js.map +1 -0
  365. package/package.json +27 -25
  366. package/CHANGELOG.md +0 -484
  367. package/docs/README.md +0 -5
  368. package/docs/applet-basics.md +0 -272
  369. package/docs/content/js-applet-resources.md +0 -154
  370. package/docs/content/js-browser.md +0 -163
  371. package/docs/content/js-command.md +0 -154
  372. package/docs/content/js-debug.md +0 -36
  373. package/docs/content/js-device-info.md +0 -56
  374. package/docs/content/js-display.md +0 -56
  375. package/docs/content/js-file-system.md +0 -670
  376. package/docs/content/js-fonts.md +0 -115
  377. package/docs/content/js-hardware.md +0 -55
  378. package/docs/content/js-iframes.md +0 -66
  379. package/docs/content/js-input.md +0 -71
  380. package/docs/content/js-offline-cache-media-files.md +0 -257
  381. package/docs/content/js-offline-cache-simple-data.md +0 -129
  382. package/docs/content/js-osd.md +0 -32
  383. package/docs/content/js-proof-of-play.md +0 -60
  384. package/docs/content/js-sensors.md +0 -70
  385. package/docs/content/js-serial.md +0 -165
  386. package/docs/content/js-sync-playback.md +0 -384
  387. package/docs/content/js-video-inputs-internal-ports.md +0 -131
  388. package/docs/content/js-video-stream.md +0 -618
  389. package/docs/content/js-video.md +0 -232
  390. package/docs/management/js-management-application.md +0 -107
  391. package/docs/management/js-management-audio.md +0 -44
  392. package/docs/management/js-management-debug.md +0 -40
  393. package/docs/management/js-management-firmware.md +0 -93
  394. package/docs/management/js-management-management.md +0 -178
  395. package/docs/management/js-management-monitoring-commands.md +0 -107
  396. package/docs/management/js-management-monitors.md +0 -55
  397. package/docs/management/js-management-native-commands-mdc.md +0 -90
  398. package/docs/management/js-management-network.md +0 -223
  399. package/docs/management/js-management-os.md +0 -62
  400. package/docs/management/js-management-package.md +0 -48
  401. package/docs/management/js-management-power.md +0 -175
  402. package/docs/management/js-management-proxy.md +0 -81
  403. package/docs/management/js-management-remote-control.md +0 -58
  404. package/docs/management/js-management-screen.md +0 -225
  405. package/docs/management/js-management-security.md +0 -71
  406. package/docs/management/js-management-time.md +0 -161
  407. package/docs/management/js-management-wifi.md +0 -341
  408. package/es6/FrontApplet/Command/ICommandEventListener.d.ts +0 -6
  409. package/es6/FrontApplet/Command/ICommandEventListener.js +0 -3
  410. package/es6/FrontApplet/Command/ICommandEventListener.js.map +0 -1
  411. package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +0 -5
  412. package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +0 -1
  413. package/es6/FrontApplet/Management/Firmware/FirmwareType.d.ts +0 -4
  414. package/es6/FrontApplet/Management/Firmware/FirmwareType.js +0 -9
  415. package/es6/FrontApplet/Management/Firmware/FirmwareType.js.map +0 -1
  416. package/es6/FrontApplet/Stream/streamListeners.d.ts +0 -10
  417. package/es6/FrontApplet/Stream/streamListeners.js.map +0 -1
  418. package/es6/FrontApplet/Video/IVideoEventListener.d.ts +0 -5
  419. package/es6/FrontApplet/Video/IVideoEventListener.js +0 -3
  420. package/es6/FrontApplet/Video/IVideoEventListener.js.map +0 -1
  421. package/es6/Monitoring/Montoring.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ # debug
2
+
3
+ The `sos.debug` API groups together methods for checking the state of remote debug mode.
4
+
5
+ ## Methods
6
+
7
+ ### isRemoteDebugEnabled()
8
+
9
+ The `isRemoteDebugEnabled()` method returns the state of the [Device debug](https://docs.signageos.io/hc/en-us/articles/4416366711442-Device-debug).
10
+
11
+ ```ts expandable
12
+ isRemoteDebugEnabled(): Promise<boolean>;
13
+ ```
14
+
15
+ <Separator />
16
+
17
+ ### onRemoteDebugChanged()
18
+
19
+ The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the [Device debug](https://docs.signageos.io/hc/en-us/articles/4416366711442-Device-debug) is changed.
20
+
21
+ ```ts expandable
22
+ onRemoteDebugChanged(listener: (data: {
23
+ enabled: boolean;
24
+ }) => void): void;
25
+ ```
@@ -0,0 +1,49 @@
1
+ # deviceInfo
2
+
3
+ The `sos.deviceInfo` API groups together methods for retrieving information about the device set in the CloudControl, such as location or
4
+ tags.
5
+
6
+ ## Methods
7
+
8
+ ### getDeviceName()
9
+
10
+ The `getDeviceName()` method returns a name of the device. Name is requested from server on application start, automatically
11
+ updated when changed and persisted in local storage.
12
+
13
+ ```ts expandable
14
+ getDeviceName(): Promise<string>;
15
+ ```
16
+
17
+ <Separator />
18
+
19
+ ### getLocation()
20
+
21
+ The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
22
+ updated when changed and persisted in local storage.
23
+
24
+ ```ts expandable
25
+ getLocation(): Promise<IDeviceLocation | null>;
26
+ // show-more
27
+ interface IDeviceLocation {
28
+ name: string;
29
+ customId?: string;
30
+ description?: string;
31
+ }
32
+
33
+ ```
34
+
35
+ <Separator />
36
+
37
+ ### getOrganizationTags()
38
+
39
+ The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
40
+ updated when changed and persisted in local storage.
41
+
42
+ ```ts expandable
43
+ getOrganizationTags(): Promise<IOrganizationTag[]>;
44
+ // show-more
45
+ interface IOrganizationTag {
46
+ name: string;
47
+ }
48
+
49
+ ```
@@ -0,0 +1,21 @@
1
+ # display
2
+
3
+ The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
4
+ features it supports.
5
+
6
+ ## Methods
7
+
8
+ ### supports()
9
+
10
+ The `supports()` method determines whether a queried capability is supported.
11
+
12
+ - 'FILE_SYSTEM_INTERNAL_STORAGE' -
13
+
14
+ ```ts expandable
15
+ supports(capability: DisplayCapability): Promise<boolean>;
16
+ // show-more
17
+ type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_STORAGE' | 'FILE_SYSTEM_FILE_CHECKSUM' | 'FILE_SYSTEM_LINK' | 'TIMERS_PROPRIETARY' | 'VIDEO_4K' | 'SERIAL' | 'BARCODE_SCANNER' | 'FRONT_OSD' | 'FILE_SYSTEM_CREATE_ARCHIVE' | 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' | 'BROWSER' | 'PROXIMITY_SENSOR' | AnyString;
18
+
19
+ type AnyString = string & {};
20
+
21
+ ```
@@ -0,0 +1,594 @@
1
+ # fileSystem
2
+
3
+ The `sos.fileSystem` API groups together methods for low-level access to the file system. The File System API supports both internal and
4
+ external storage.
5
+
6
+ :::warning
7
+
8
+ File System directory structure is **PERSISTENT** and is **NOT** automatically deleted through `Applet Reload` power action!
9
+ Applet Reload only deletes `/data` directory which is reserved for simplified [Offline Cache API](./offline). Use
10
+ `deleteFile()` to clear the device storage file system.
11
+
12
+ :::
13
+
14
+ ## Methods
15
+
16
+ ### appendFile()
17
+
18
+ The `writeFile()` method appends string content to the file specified by `filePath`. If the file does exist, it is created. If the directory
19
+ does not exist, an error is thrown.
20
+
21
+ ```ts expandable
22
+ appendFile(filePath: IFilePath, contents: string): Promise<void>;
23
+ // show-more
24
+ interface IFilePath {
25
+ storageUnit: IStorageUnit;
26
+ filePath: string;
27
+ }
28
+
29
+ interface IStorageUnit {
30
+ type: string;
31
+ capacity: number;
32
+ freeSpace: number;
33
+ usableSpace: number;
34
+ removable: boolean;
35
+ }
36
+
37
+ ```
38
+
39
+ #### Possible errors
40
+
41
+ The method throws an error if the parent directory does not exist or the `filePath` is a directory.
42
+
43
+ <Separator />
44
+
45
+ ### copyFile()
46
+
47
+ The `copyFile()` method creates a copy of file at `sourceFilePath` to `destinationFilePath`.
48
+
49
+ ```ts expandable
50
+ copyFile(sourceFilePath: IFilePath, destinationFilePath: IFilePath, options?: ICopyFileOptions): Promise<void>;
51
+ // show-more
52
+ interface IFilePath {
53
+ storageUnit: IStorageUnit;
54
+ filePath: string;
55
+ }
56
+
57
+ interface IStorageUnit {
58
+ type: string;
59
+ capacity: number;
60
+ freeSpace: number;
61
+ usableSpace: number;
62
+ removable: boolean;
63
+ }
64
+
65
+ interface ICopyFileOptions {
66
+ overwrite?: boolean;
67
+ }
68
+
69
+ ```
70
+
71
+ #### Params
72
+
73
+ | Name | Type | Description |
74
+ |----------------------------------|-----------|------------------------------------------------------------------------------------------------|
75
+ | `options.overwrite` *(optional)* | `boolean` | If not set or set to `false`, an error will be thrown if `destinationFilePath` already exists. |
76
+
77
+ #### Possible errors
78
+
79
+ The method throws an error if the source file does not exists or parent of the destination file path does not exists. It also throws if the
80
+ `options.overwrite` is not set and the destination file path already exists.
81
+
82
+ <Separator />
83
+
84
+ ### createArchive()
85
+
86
+ The `createArchive()` method creates an arch file at `archiveFilePath` from `archiveEntries` files.
87
+
88
+ :::warning
89
+
90
+ This function is available only on Tizen devices.
91
+
92
+ :::
93
+
94
+ ```ts expandable
95
+ createArchive(archiveFilePath: IFilePath, archiveEntries: IFilePath[]): Promise<void>;
96
+ // show-more
97
+ interface IFilePath {
98
+ storageUnit: IStorageUnit;
99
+ filePath: string;
100
+ }
101
+
102
+ interface IStorageUnit {
103
+ type: string;
104
+ capacity: number;
105
+ freeSpace: number;
106
+ usableSpace: number;
107
+ removable: boolean;
108
+ }
109
+
110
+ ```
111
+
112
+ <Separator />
113
+
114
+ ### createDirectory()
115
+
116
+ The `createDirectory()` method create a new directory at specified path.
117
+
118
+ ```ts expandable
119
+ createDirectory(directoryPath: IFilePath): Promise<void>;
120
+ // show-more
121
+ interface IFilePath {
122
+ storageUnit: IStorageUnit;
123
+ filePath: string;
124
+ }
125
+
126
+ interface IStorageUnit {
127
+ type: string;
128
+ capacity: number;
129
+ freeSpace: number;
130
+ usableSpace: number;
131
+ removable: boolean;
132
+ }
133
+
134
+ ```
135
+
136
+ #### Possible errors
137
+
138
+ The method throws an error if the directory already exists or its parent directory does not exist.
139
+
140
+ <Separator />
141
+
142
+ ### deleteFile()
143
+
144
+ The `deleteFile()` method deletes the file specified by `filePath`. To remove a directory set `recursive` to `true`.
145
+
146
+ ```ts expandable
147
+ deleteFile(filePath: IFilePath, recursive: boolean): Promise<void>;
148
+ // show-more
149
+ interface IFilePath {
150
+ storageUnit: IStorageUnit;
151
+ filePath: string;
152
+ }
153
+
154
+ interface IStorageUnit {
155
+ type: string;
156
+ capacity: number;
157
+ freeSpace: number;
158
+ usableSpace: number;
159
+ removable: boolean;
160
+ }
161
+
162
+ ```
163
+
164
+ #### Possible errors
165
+
166
+ The method throws an error if the file does not exists or if `recursive` is set to false and the file path is a directory.
167
+
168
+ <Separator />
169
+
170
+ ### downloadFile()
171
+
172
+ The `downloadFile()` method download a file from `sourceUri` and saves it to the specified path. If the file already exists it is
173
+ overwritten. Optionally, headers for the download request may be specified. A HEAD request is always sent first to get `content-length`
174
+ of the downloaded file.
175
+
176
+ :::warning
177
+ - For every download request, our app makes HEAD request for `content-length` header on that downloaded file.
178
+ - Windows platform can download only files smaller then 4GB.
179
+ :::
180
+
181
+ #### Encoding
182
+
183
+ All downloads respect a standard of `Encoding` with optional compression of files. See [Mozilla standard Accept Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) and [Content Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding).
184
+
185
+ Download file method is always sending optional following headers:
186
+ ```
187
+ Accept-Encoding: gzip
188
+ Accept-Encoding: compress
189
+ Accept-Encoding: deflate
190
+ Accept-Encoding: br
191
+ Accept-Encoding: identity
192
+ Accept-Encoding: *
193
+ ```
194
+
195
+ If the server understands the `Encoding` standard, it compresses files using `gzip` algorithm before the files are sent to the client. If so, the response will contain the following headers:
196
+ ```
197
+ Content-Encoding: gzip
198
+ Content-Encoding: compress
199
+ Content-Encoding: deflate
200
+ Content-Encoding: br
201
+ ```
202
+ So the data communication is compressed under the hood. The client will automatically decompress data before it's saved to a specified location path. So from JS API point of view, there is no requirement to decompress data by itself.
203
+
204
+ The standard is supported on all following platforms:
205
+
206
+ - WebOS 3+
207
+ - Tizen 2.4+
208
+ - Brightsign
209
+ - Raspberry Pi
210
+ - Windows
211
+
212
+ ```ts expandable
213
+ downloadFile(filePath: IFilePath, sourceUri: string, headers?: IHeaders): Promise<void>;
214
+ // show-more
215
+ interface IFilePath {
216
+ storageUnit: IStorageUnit;
217
+ filePath: string;
218
+ }
219
+
220
+ interface IStorageUnit {
221
+ type: string;
222
+ capacity: number;
223
+ freeSpace: number;
224
+ usableSpace: number;
225
+ removable: boolean;
226
+ }
227
+
228
+ interface IHeaders {
229
+ [key: string]: string;
230
+ }
231
+
232
+ ```
233
+
234
+ #### Possible errors
235
+
236
+ The method throws an error if the network request fails, parent directory does not exist, or the file path is a directory.
237
+
238
+ <Separator />
239
+
240
+ ### exists()
241
+
242
+ The `exists()` method checks whether a file or directory exists.
243
+
244
+ ```ts expandable
245
+ exists(filePath: IFilePath): Promise<boolean>;
246
+ // show-more
247
+ interface IFilePath {
248
+ storageUnit: IStorageUnit;
249
+ filePath: string;
250
+ }
251
+
252
+ interface IStorageUnit {
253
+ type: string;
254
+ capacity: number;
255
+ freeSpace: number;
256
+ usableSpace: number;
257
+ removable: boolean;
258
+ }
259
+
260
+ ```
261
+
262
+ <Separator />
263
+
264
+ ### extractFile()
265
+
266
+ The `decompressFile()` method decompresses the file at `archiveFilePath` into a new file specified by `destinationDirectoryPath`.
267
+
268
+ ```ts expandable
269
+ extractFile(archiveFilePath: IFilePath, destinationDirectoryPath: IFilePath, method: string): Promise<void>;
270
+ // show-more
271
+ interface IFilePath {
272
+ storageUnit: IStorageUnit;
273
+ filePath: string;
274
+ }
275
+
276
+ interface IStorageUnit {
277
+ type: string;
278
+ capacity: number;
279
+ freeSpace: number;
280
+ usableSpace: number;
281
+ removable: boolean;
282
+ }
283
+
284
+ ```
285
+
286
+ #### Possible errors
287
+
288
+ The method throws an error if the archive file path does not exist, it is not a valid archive file or the destination directory does not exist.
289
+
290
+ <Separator />
291
+
292
+ ### getFile()
293
+
294
+ The `getFile()` method returns runtime information about a file path, such as local url, last modified date or size.
295
+
296
+ ```ts expandable
297
+ getFile(filePath: IFilePath): Promise<IFile | null>;
298
+ // show-more
299
+ interface IFilePath {
300
+ storageUnit: IStorageUnit;
301
+ filePath: string;
302
+ }
303
+
304
+ interface IStorageUnit {
305
+ type: string;
306
+ capacity: number;
307
+ freeSpace: number;
308
+ usableSpace: number;
309
+ removable: boolean;
310
+ }
311
+
312
+ interface IFile extends IFilePath {
313
+ localUri: string;
314
+ imageThumbnailUriTemplate?: string;
315
+ videoThumbnailUriTemplate?: string;
316
+ createdAt?: number;
317
+ lastModifiedAt?: number;
318
+ sizeBytes?: number;
319
+ mimeType?: string;
320
+ }
321
+
322
+ ```
323
+
324
+ <Separator />
325
+
326
+ ### getFileChecksum()
327
+
328
+ The `getChecksumFile()` method computes a checksum of the file specified by `filePath`.
329
+
330
+ ```ts expandable
331
+ getFileChecksum(filePath: IFilePath, hashType: HashAlgorithm): Promise<string>;
332
+ // show-more
333
+ interface IFilePath {
334
+ storageUnit: IStorageUnit;
335
+ filePath: string;
336
+ }
337
+
338
+ interface IStorageUnit {
339
+ type: string;
340
+ capacity: number;
341
+ freeSpace: number;
342
+ usableSpace: number;
343
+ removable: boolean;
344
+ }
345
+
346
+ type HashAlgorithm = 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512' | 'crc32' | AnyString;
347
+
348
+ type AnyString = string & {};
349
+
350
+ ```
351
+
352
+ #### Possible errors
353
+
354
+ The method throws an error if the file does not exist or it is a directory.
355
+
356
+ <Separator />
357
+
358
+ ### isDirectory()
359
+
360
+ The `isDirectory()` method checks whether the file path points to a directory.
361
+
362
+ ```ts expandable
363
+ isDirectory(filePath: IFilePath): Promise<boolean>;
364
+ // show-more
365
+ interface IFilePath {
366
+ storageUnit: IStorageUnit;
367
+ filePath: string;
368
+ }
369
+
370
+ interface IStorageUnit {
371
+ type: string;
372
+ capacity: number;
373
+ freeSpace: number;
374
+ usableSpace: number;
375
+ removable: boolean;
376
+ }
377
+
378
+ ```
379
+
380
+ #### Possible errors
381
+
382
+ The method throws an error if the file path does not exist.
383
+
384
+ <Separator />
385
+
386
+ ### link()
387
+
388
+ The `link()` method creates a symbolic link to `sourceFilePath` (existing path) from `destinationFilePath` (new path).
389
+
390
+ ```ts expandable
391
+ link(sourceFilePath: IFilePath, destinationFilePath: IFilePath): Promise<void>;
392
+ // show-more
393
+ interface IFilePath {
394
+ storageUnit: IStorageUnit;
395
+ filePath: string;
396
+ }
397
+
398
+ interface IStorageUnit {
399
+ type: string;
400
+ capacity: number;
401
+ freeSpace: number;
402
+ usableSpace: number;
403
+ removable: boolean;
404
+ }
405
+
406
+ ```
407
+
408
+ <Separator />
409
+
410
+ ### listFiles()
411
+
412
+ The `listFiles()` method lists all files and directories in the specified path (nested files are not included).
413
+
414
+ ```ts expandable
415
+ listFiles(directoryPath: IFilePath): Promise<IFilePath[]>;
416
+ // show-more
417
+ interface IFilePath {
418
+ storageUnit: IStorageUnit;
419
+ filePath: string;
420
+ }
421
+
422
+ interface IStorageUnit {
423
+ type: string;
424
+ capacity: number;
425
+ freeSpace: number;
426
+ usableSpace: number;
427
+ removable: boolean;
428
+ }
429
+
430
+ ```
431
+
432
+ #### Possible errors
433
+
434
+ The method throws an error if the path does not exist or it is a file.
435
+
436
+ <Separator />
437
+
438
+ ### listInternalStorageUnits()
439
+
440
+ A shorthand method for listing only the internal storage units (i.e. those with the `removable: false`). The capacity values are in bytes.
441
+
442
+ ```ts expandable
443
+ listInternalStorageUnits(): Promise<IStorageUnit[]>;
444
+ // show-more
445
+ interface IStorageUnit {
446
+ type: string;
447
+ capacity: number;
448
+ freeSpace: number;
449
+ usableSpace: number;
450
+ removable: boolean;
451
+ }
452
+
453
+ ```
454
+
455
+ <Separator />
456
+
457
+ ### listStorageUnits()
458
+
459
+ The `listStorageUnits()` method lists all available storage units. All devices always have one internal storage device (with
460
+ `removable: false`) and zero or more external devices. The capacity values are in bytes.
461
+
462
+ ```ts expandable
463
+ listStorageUnits(): Promise<IStorageUnit[]>;
464
+ // show-more
465
+ interface IStorageUnit {
466
+ type: string;
467
+ capacity: number;
468
+ freeSpace: number;
469
+ usableSpace: number;
470
+ removable: boolean;
471
+ }
472
+
473
+ ```
474
+
475
+ <Separator />
476
+
477
+ ### moveFile()
478
+
479
+ The `moveFile()` method moves a file from `sourceFilePath` to `destinationFilePath`.
480
+
481
+ ```ts expandable
482
+ moveFile(sourceFilePath: IFilePath, destinationFilePath: IFilePath, options?: IMoveFileOptions): Promise<void>;
483
+ // show-more
484
+ interface IFilePath {
485
+ storageUnit: IStorageUnit;
486
+ filePath: string;
487
+ }
488
+
489
+ interface IStorageUnit {
490
+ type: string;
491
+ capacity: number;
492
+ freeSpace: number;
493
+ usableSpace: number;
494
+ removable: boolean;
495
+ }
496
+
497
+ interface IMoveFileOptions {
498
+ overwrite?: boolean;
499
+ }
500
+
501
+ ```
502
+
503
+ #### Possible errors
504
+
505
+ The method throws an error if the source file does not exists or parent of the destination file path does not exists. It also throws if the
506
+ `options.overwrite` is not set and the destination file path already exists.
507
+
508
+ <Separator />
509
+
510
+ ### onStorageUnitsChanged()
511
+
512
+ The `onStorageUnitsChanged()` method sets up a listener, which is called whenever the list of storage units changes.
513
+
514
+ ```ts expandable
515
+ onStorageUnitsChanged(listener: () => void): void;
516
+ ```
517
+
518
+ <Separator />
519
+
520
+ ### readFile()
521
+
522
+ The `readFile()` method returns content of the file specified by `filePath`. The file has to be a text file, otherwise the content will be
523
+ mangled.
524
+
525
+ ```ts expandable
526
+ readFile(filePath: IFilePath): Promise<string>;
527
+ // show-more
528
+ interface IFilePath {
529
+ storageUnit: IStorageUnit;
530
+ filePath: string;
531
+ }
532
+
533
+ interface IStorageUnit {
534
+ type: string;
535
+ capacity: number;
536
+ freeSpace: number;
537
+ usableSpace: number;
538
+ removable: boolean;
539
+ }
540
+
541
+ ```
542
+
543
+ #### Possible errors
544
+
545
+ The method throws an error if the file does not exist.
546
+
547
+ <Separator />
548
+
549
+ ### removeAllListeners()
550
+
551
+ The `removeAllListeners()` method removes all listeners, previously added by `removeAllListeners()`
552
+
553
+ ```ts expandable
554
+ removeAllListeners(): void;
555
+ ```
556
+
557
+ <Separator />
558
+
559
+ ### removeStorageUnitsChangedListener()
560
+
561
+ The `removeStorageUnitsChangedListener()` method removes a listener, previously added by `onStorageUnitsChanged()`
562
+
563
+ ```ts expandable
564
+ removeStorageUnitsChangedListener(listener: () => void): void;
565
+ ```
566
+
567
+ <Separator />
568
+
569
+ ### writeFile()
570
+
571
+ The `writeFile()` method writes string content to the file specified by `filePath`. If the file does exist, it is created. If the directory
572
+ does not exist, an error is thrown.
573
+
574
+ ```ts expandable
575
+ writeFile(filePath: IFilePath, contents: string): Promise<void>;
576
+ // show-more
577
+ interface IFilePath {
578
+ storageUnit: IStorageUnit;
579
+ filePath: string;
580
+ }
581
+
582
+ interface IStorageUnit {
583
+ type: string;
584
+ capacity: number;
585
+ freeSpace: number;
586
+ usableSpace: number;
587
+ removable: boolean;
588
+ }
589
+
590
+ ```
591
+
592
+ #### Possible errors
593
+
594
+ The method throws an error if the parent directory does not exist or the `filePath` is a directory.