@signageos/front-applet 7.2.0 → 8.0.0
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/dist/bundle.js +8 -4
- package/dist/bundle.js.map +1 -1
- package/docs/fpath/index.md +316 -0
- package/docs/index.md +18 -85
- package/docs/sos/browser.md +210 -0
- package/docs/sos/command.md +68 -0
- package/docs/sos/debug.md +25 -0
- package/docs/sos/deviceInfo.md +49 -0
- package/docs/sos/display.md +21 -0
- package/docs/sos/fileSystem.md +594 -0
- package/docs/sos/hardware/barcodeScanner.md +40 -0
- package/docs/sos/hardware/index.md +64 -0
- package/docs/sos/hardware/led.md +14 -0
- package/docs/sos/index.md +82 -0
- package/docs/sos/input.md +73 -0
- package/docs/sos/monitors.md +21 -0
- package/docs/sos/native/index.md +5 -0
- package/docs/sos/native/mdc.md +240 -0
- package/docs/sos/offline/cache.md +183 -0
- package/docs/sos/offline/index.md +188 -0
- package/docs/sos/osd.md +13 -0
- package/docs/sos/proofOfPlay.md +37 -0
- package/docs/sos/stream.md +960 -0
- package/docs/sos/sync.md +298 -0
- package/docs/sos/video.md +285 -0
- package/docs/sos_management/app.md +102 -0
- package/docs/sos_management/audio.md +29 -0
- package/docs/sos_management/debug.md +33 -0
- package/docs/sos_management/firmware.md +86 -0
- package/docs/sos_management/index.md +212 -0
- package/docs/sos_management/network.md +197 -0
- package/docs/sos_management/os.md +54 -0
- package/docs/sos_management/package.md +33 -0
- package/docs/sos_management/power.md +136 -0
- package/docs/sos_management/proxy.md +41 -0
- package/docs/sos_management/remoteControl.md +72 -0
- package/docs/sos_management/screen.md +198 -0
- package/docs/sos_management/security.md +47 -0
- package/docs/sos_management/time.md +101 -0
- package/docs/sos_management/wifi.md +366 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +61 -8
- package/es6/FrontApplet/Browser/Browser.js +91 -39
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Browser/events.js +2 -2
- package/es6/FrontApplet/Browser/events.js.map +1 -1
- package/es6/FrontApplet/Command/Command.d.ts +37 -3
- package/es6/FrontApplet/Command/Command.js +49 -20
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -2
- package/es6/FrontApplet/Connect/Connect.d.ts +3 -0
- package/es6/FrontApplet/Connect/Connect.js +55 -7
- package/es6/FrontApplet/Connect/Connect.js.map +1 -1
- package/es6/FrontApplet/Connect/IConnectMessage.d.ts +1 -1
- package/es6/FrontApplet/Debug/Debug.d.ts +15 -1
- package/es6/FrontApplet/Debug/Debug.js +27 -17
- package/es6/FrontApplet/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Debug/debugDecorator.d.ts +3 -3
- package/es6/FrontApplet/Debug/debugDecorator.js +13 -7
- package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +23 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +36 -27
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js +1 -2
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +25 -3
- package/es6/FrontApplet/Display/Display.js +35 -19
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/Display/IDisplay.d.ts +3 -1
- package/es6/FrontApplet/Error/AppletCommandError.js +12 -3
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletError.js +10 -2
- package/es6/FrontApplet/Error/AppletError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletHardwareError.js +12 -3
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -2
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletResourcesError.js +12 -3
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletSecurityError.js +12 -3
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -2
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletVideoError.js +12 -3
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -1
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +4 -1
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -1
- package/es6/FrontApplet/Error/ErrorSuggestions.js +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -1
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -2
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -1
- package/es6/FrontApplet/Error/SosError.js +4 -0
- package/es6/FrontApplet/Error/SosError.js.map +1 -1
- package/es6/FrontApplet/Error/errorHelper.js +5 -6
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -1
- package/es6/FrontApplet/Exchange/Exchange.js +7 -14
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -1
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +156 -1
- package/es6/FrontApplet/FileSystem/FileSystem.js +316 -193
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +2 -0
- package/es6/FrontApplet/{Stream/streamListeners.js → FileSystem/HashAlgorithm.js} +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
- package/es6/FrontApplet/FrontApplet.d.ts +55 -4
- package/es6/FrontApplet/FrontApplet.js +124 -47
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +2 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +35 -54
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
- package/es6/FrontApplet/Hardware/Hardware.d.ts +16 -2
- package/es6/FrontApplet/Hardware/Hardware.js +31 -19
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
- package/es6/FrontApplet/Hardware/IHardware.d.ts +2 -2
- package/es6/FrontApplet/Hardware/ISerialPort.d.ts +16 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +1 -1
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -1
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +8 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +20 -18
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +1 -1
- package/es6/FrontApplet/Hardware/SerialPort.js +15 -23
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -1
- package/es6/FrontApplet/Hash/generator.js +1 -2
- package/es6/FrontApplet/Hash/generator.js.map +1 -1
- package/es6/FrontApplet/Iframe/Iframe.d.ts +9 -8
- package/es6/FrontApplet/Iframe/Iframe.js +10 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
- package/es6/FrontApplet/Input/IInput.d.ts +1 -2
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +32 -2
- package/es6/FrontApplet/Input/IKeyUpEvent.js +32 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +19 -3
- package/es6/FrontApplet/Input/Input.js +43 -22
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/es6/FrontApplet/Management/App/App.d.ts +48 -10
- package/es6/FrontApplet/Management/App/App.js +45 -30
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/App/IApp.d.ts +3 -1
- package/es6/FrontApplet/Management/Audio/Audio.d.ts +16 -0
- package/es6/FrontApplet/Management/Audio/Audio.js +30 -22
- package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +4 -0
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +15 -22
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js +4 -1
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Debug/Debug.d.ts +19 -0
- package/es6/FrontApplet/Management/Debug/Debug.js +37 -30
- package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +37 -10
- package/es6/FrontApplet/Management/Firmware/Firmware.js +34 -30
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/IFirmware.d.ts +1 -2
- package/es6/FrontApplet/Management/IManagement.d.ts +3 -1
- package/es6/FrontApplet/Management/Management.d.ts +106 -15
- package/es6/FrontApplet/Management/Management.js +191 -113
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network/INetworkInfo.d.ts +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +56 -8
- package/es6/FrontApplet/Management/Network/Network.js +85 -67
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/OS/OS.d.ts +20 -0
- package/es6/FrontApplet/Management/OS/OS.js +34 -27
- package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +20 -0
- package/es6/FrontApplet/Management/Package/Package.js +37 -22
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js +4 -1
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.d.ts +4 -0
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js +15 -22
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +64 -0
- package/es6/FrontApplet/Management/Power/Power.js +160 -115
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +21 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js +41 -35
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +43 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +63 -39
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +127 -0
- package/es6/FrontApplet/Management/Screen/Screen.js +197 -89
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Security/Security.d.ts +20 -5
- package/es6/FrontApplet/Management/Security/Security.js +33 -31
- package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +31 -5
- package/es6/FrontApplet/Management/Time/Time.js +49 -40
- package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.d.ts +18 -0
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.js +19 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +108 -7
- package/es6/FrontApplet/Management/Wifi/Wifi.js +162 -86
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +2 -2
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +8 -6
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -2
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -3
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +1 -1
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -1
- package/es6/FrontApplet/Monitors/Monitors.d.ts +9 -0
- package/es6/FrontApplet/Monitors/Monitors.js +16 -16
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +51 -2
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +79 -38
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +4 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js +12 -2
- package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
- package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
- package/es6/FrontApplet/OSD/OSD.js +15 -15
- package/es6/FrontApplet/OSD/OSD.js.map +1 -1
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +91 -2
- package/es6/FrontApplet/Offline/Cache/Cache.js +192 -130
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +17 -25
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +4 -4
- package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -1
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -1
- package/es6/FrontApplet/Offline/ISaveFile.js +5 -2
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -1
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +2 -1
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -1
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +2 -1
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -1
- package/es6/FrontApplet/Offline/Offline.d.ts +75 -4
- package/es6/FrontApplet/Offline/Offline.js +116 -56
- package/es6/FrontApplet/Offline/Offline.js.map +1 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +19 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -29
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
- package/es6/FrontApplet/Sensors/Proximity.d.ts +4 -3
- package/es6/FrontApplet/Sensors/Proximity.js +12 -4
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -1
- package/es6/FrontApplet/Sensors/Sensors.d.ts +2 -0
- package/es6/FrontApplet/Sensors/Sensors.js +9 -2
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -1
- package/es6/FrontApplet/Stream/IStream.d.ts +10 -10
- package/es6/FrontApplet/Stream/Stream.d.ts +130 -15
- package/es6/FrontApplet/Stream/Stream.js +229 -130
- package/es6/FrontApplet/Stream/Stream.js.map +1 -1
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
- package/es6/FrontApplet/Sync/Sync.d.ts +152 -6
- package/es6/FrontApplet/Sync/Sync.js +196 -112
- package/es6/FrontApplet/Sync/Sync.js.map +1 -1
- package/es6/FrontApplet/Sync/syncEvents.d.ts +3 -1
- package/es6/FrontApplet/Sync/syncMessages.js +1 -1
- package/es6/FrontApplet/Sync/syncMessages.js.map +1 -1
- package/es6/FrontApplet/Timing/Timing.d.ts +1 -0
- package/es6/FrontApplet/Timing/Timing.js +9 -2
- package/es6/FrontApplet/Timing/Timing.js.map +1 -1
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +1 -1
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +9 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +16 -18
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -1
- package/es6/FrontApplet/Touch/Touch.d.ts +3 -0
- package/es6/FrontApplet/Touch/Touch.js +13 -3
- package/es6/FrontApplet/Touch/Touch.js.map +1 -1
- package/es6/FrontApplet/Validate/Validate.js +14 -11
- package/es6/FrontApplet/Validate/Validate.js.map +1 -1
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +7 -2
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
- package/es6/FrontApplet/Video/IOptions.d.ts +8 -1
- package/es6/FrontApplet/Video/IVideo.d.ts +8 -8
- package/es6/FrontApplet/Video/IVideoEvent.js +3 -3
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
- package/es6/FrontApplet/Video/Video.d.ts +84 -12
- package/es6/FrontApplet/Video/Video.js +161 -102
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/es6/FrontApplet/createFrontApplet.js +5 -2
- package/es6/FrontApplet/createFrontApplet.js.map +1 -1
- package/es6/Monitoring/Display/handleDisplayRequests.d.ts +2 -2
- package/es6/Monitoring/Display/handleDisplayRequests.js +5 -15
- package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +10 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js +3 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js.map +1 -1
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.d.ts +2 -2
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +41 -45
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.d.ts +2 -2
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js +4 -14
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js.map +1 -1
- package/es6/Monitoring/Management/App/handleApplicationRequests.d.ts +2 -2
- package/es6/Monitoring/Management/App/handleApplicationRequests.js +9 -19
- package/es6/Monitoring/Management/App/handleApplicationRequests.js.map +1 -1
- package/es6/Monitoring/Management/Audio/handleAudioRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Audio/handleAudioRequests.js +7 -17
- package/es6/Monitoring/Management/Audio/handleAudioRequests.js.map +1 -1
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.d.ts +2 -2
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js +7 -17
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js.map +1 -1
- package/es6/Monitoring/Management/Debug/handleDebugRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Debug/handleDebugRequests.js +9 -19
- package/es6/Monitoring/Management/Debug/handleDebugRequests.js.map +1 -1
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js +11 -21
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js.map +1 -1
- package/es6/Monitoring/Management/Os/managementOsRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Os/managementOsRequests.js +9 -19
- package/es6/Monitoring/Management/Os/managementOsRequests.js.map +1 -1
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.d.ts +2 -2
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js +7 -17
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js.map +1 -1
- package/es6/Monitoring/Management/Power/handlePowerRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Power/handlePowerRequests.js +19 -29
- package/es6/Monitoring/Management/Power/handlePowerRequests.js.map +1 -1
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.d.ts +2 -2
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js +15 -25
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js.map +1 -1
- package/es6/Monitoring/Management/Screen/handleScreenRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js +19 -29
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
- package/es6/Monitoring/Management/Security/handleSecurityCommands.d.ts +2 -2
- package/es6/Monitoring/Management/Security/handleSecurityCommands.js +9 -19
- package/es6/Monitoring/Management/Security/handleSecurityCommands.js.map +1 -1
- package/es6/Monitoring/Management/Time/handleTimeCommands.d.ts +2 -2
- package/es6/Monitoring/Management/Time/handleTimeCommands.js +9 -19
- package/es6/Monitoring/Management/Time/handleTimeCommands.js.map +1 -1
- package/es6/Monitoring/Management/handleManagementRequests.d.ts +2 -2
- package/es6/Monitoring/Management/handleManagementRequests.js +23 -33
- package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
- package/es6/Monitoring/{Montoring.d.ts → Monitoring.d.ts} +1 -0
- package/es6/Monitoring/{Montoring.js → Monitoring.js} +12 -23
- package/es6/Monitoring/Monitoring.js.map +1 -0
- package/es6/Monitoring/NativeCommands/handleNativeCommands.d.ts +2 -2
- package/es6/Monitoring/NativeCommands/handleNativeCommands.js +5 -15
- package/es6/Monitoring/NativeCommands/handleNativeCommands.js.map +1 -1
- package/es6/Monitoring/OSD/handleOsdRequests.d.ts +2 -2
- package/es6/Monitoring/OSD/handleOsdRequests.js +5 -15
- package/es6/Monitoring/OSD/handleOsdRequests.js.map +1 -1
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.d.ts +2 -2
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js +23 -33
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js.map +1 -1
- package/es6/Monitoring/Video/handleVideoRequests.d.ts +2 -2
- package/es6/Monitoring/Video/handleVideoRequests.js +36 -9
- package/es6/Monitoring/Video/handleVideoRequests.js.map +1 -1
- package/es6/Monitoring/handleMonitoringRequests.d.ts +2 -2
- package/es6/Monitoring/handleMonitoringRequests.js +6 -16
- package/es6/Monitoring/handleMonitoringRequests.js.map +1 -1
- package/es6/Sensors/IButton.js +1 -1
- package/es6/Sensors/IButton.js.map +1 -1
- package/es6/Sensors/IRfidAntenna.js +1 -1
- package/es6/Sensors/IRfidAntenna.js.map +1 -1
- package/es6/Util/Console/enhancer.js +1 -2
- package/es6/Util/Console/enhancer.js.map +1 -1
- package/es6/bundle.d.ts +1 -1
- package/es6/bundle.js +6 -3
- package/es6/bundle.js.map +1 -1
- package/es6/fpath.js +34 -1
- package/es6/fpath.js.map +1 -1
- package/es6/utils/types.d.ts +1 -0
- package/es6/{FrontApplet/Input/IKeyUpEventListener.js → utils/types.js} +1 -1
- package/es6/utils/types.js.map +1 -0
- package/package.json +27 -25
- package/CHANGELOG.md +0 -484
- package/docs/applet-basics.md +0 -272
- package/docs/content/js-applet-resources.md +0 -154
- package/docs/content/js-browser.md +0 -163
- package/docs/content/js-command.md +0 -154
- package/docs/content/js-debug.md +0 -36
- package/docs/content/js-device-info.md +0 -56
- package/docs/content/js-display.md +0 -56
- package/docs/content/js-file-system.md +0 -670
- package/docs/content/js-fonts.md +0 -115
- package/docs/content/js-hardware.md +0 -55
- package/docs/content/js-iframes.md +0 -66
- package/docs/content/js-input.md +0 -71
- package/docs/content/js-offline-cache-media-files.md +0 -257
- package/docs/content/js-offline-cache-simple-data.md +0 -129
- package/docs/content/js-osd.md +0 -32
- package/docs/content/js-proof-of-play.md +0 -60
- package/docs/content/js-sensors.md +0 -70
- package/docs/content/js-serial.md +0 -165
- package/docs/content/js-sync-playback.md +0 -384
- package/docs/content/js-video-inputs-internal-ports.md +0 -131
- package/docs/content/js-video-stream.md +0 -618
- package/docs/content/js-video.md +0 -232
- package/docs/management/js-management-application.md +0 -107
- package/docs/management/js-management-audio.md +0 -44
- package/docs/management/js-management-debug.md +0 -40
- package/docs/management/js-management-firmware.md +0 -93
- package/docs/management/js-management-management.md +0 -178
- package/docs/management/js-management-monitoring-commands.md +0 -107
- package/docs/management/js-management-monitors.md +0 -55
- package/docs/management/js-management-native-commands-mdc.md +0 -90
- package/docs/management/js-management-network.md +0 -223
- package/docs/management/js-management-os.md +0 -62
- package/docs/management/js-management-package.md +0 -48
- package/docs/management/js-management-power.md +0 -175
- package/docs/management/js-management-proxy.md +0 -81
- package/docs/management/js-management-remote-control.md +0 -58
- package/docs/management/js-management-screen.md +0 -225
- package/docs/management/js-management-security.md +0 -71
- package/docs/management/js-management-time.md +0 -161
- package/docs/management/js-management-wifi.md +0 -341
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +0 -6
- package/es6/FrontApplet/Command/ICommandEventListener.js +0 -3
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +0 -1
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +0 -5
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +0 -1
- package/es6/FrontApplet/Management/Firmware/FirmwareType.d.ts +0 -4
- package/es6/FrontApplet/Management/Firmware/FirmwareType.js +0 -9
- package/es6/FrontApplet/Management/Firmware/FirmwareType.js.map +0 -1
- package/es6/FrontApplet/Stream/streamListeners.d.ts +0 -10
- package/es6/FrontApplet/Stream/streamListeners.js.map +0 -1
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +0 -5
- package/es6/FrontApplet/Video/IVideoEventListener.js +0 -3
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +0 -1
- package/es6/Monitoring/Montoring.js.map +0 -1
|
@@ -1,52 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const SecurityHelper_1 = require("../helpers/SecurityHelper");
|
|
4
|
+
/**
|
|
5
|
+
* The `sos.management.security` API groups together methods for management of a security PIN code of the device.
|
|
6
|
+
*/
|
|
13
7
|
class Security {
|
|
8
|
+
messagePrefix;
|
|
9
|
+
postMessage;
|
|
10
|
+
/** @internal */
|
|
14
11
|
constructor(messagePrefix, postMessage) {
|
|
15
12
|
this.messagePrefix = messagePrefix;
|
|
16
13
|
this.postMessage = postMessage;
|
|
17
14
|
}
|
|
18
15
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
16
|
+
* The `getPinCode()` method returns the currently set PIN code.
|
|
17
|
+
*
|
|
18
|
+
* @throws {AppletSecurityError} **41703**: Get PIN code failed because the PIN code has not been set yet.
|
|
19
|
+
*
|
|
20
|
+
* @since 4.1.0
|
|
21
21
|
*/
|
|
22
|
-
getPinCode() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type: this.getMessage('get_pin_code'),
|
|
26
|
-
});
|
|
27
|
-
return pinCode;
|
|
22
|
+
async getPinCode() {
|
|
23
|
+
const { pinCode } = await this.postMessage({
|
|
24
|
+
type: this.getMessage('get_pin_code'),
|
|
28
25
|
});
|
|
26
|
+
return pinCode;
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* The `setPinCode()` method sets the pin code.
|
|
30
|
+
*
|
|
31
|
+
* @param pinCode The PIN code to be set.
|
|
32
|
+
*
|
|
33
|
+
* @throws {AppletSecurityError} **41701**: Invalid PIN code format (has to be 4-digits string).
|
|
34
|
+
* @throws {AppletSecurityError} **41702**: PIN code 0000 is not allowed, use another PIN code.
|
|
35
|
+
*
|
|
36
|
+
* @since 4.1.0
|
|
33
37
|
*/
|
|
34
|
-
setPinCode(pinCode) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
pinCode,
|
|
40
|
-
});
|
|
38
|
+
async setPinCode(pinCode) {
|
|
39
|
+
(0, SecurityHelper_1.validatePinCode)(pinCode);
|
|
40
|
+
await this.postMessage({
|
|
41
|
+
type: this.getMessage('set_pin_code'),
|
|
42
|
+
pinCode,
|
|
41
43
|
});
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
|
-
*
|
|
46
|
+
* The `getPinCode()` method sets the PIN code to a randomly generated one.
|
|
47
|
+
*
|
|
48
|
+
* @since 4.1.0
|
|
45
49
|
*/
|
|
46
|
-
generateRandomPinCode() {
|
|
47
|
-
|
|
48
|
-
yield this.setPinCode((0, SecurityHelper_1.generateRandomPin)());
|
|
49
|
-
});
|
|
50
|
+
async generateRandomPinCode() {
|
|
51
|
+
await this.setPinCode((0, SecurityHelper_1.generateRandomPin)());
|
|
50
52
|
}
|
|
51
53
|
getMessage(name) {
|
|
52
54
|
return this.messagePrefix + '.' + name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Security.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Security/Security.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Security.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Security/Security.ts"],"names":[],"mappings":";;AACA,8DAA+E;AAG/E;;GAEG;AACH,MAAqB,QAAQ;IAGnB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;;OAMG;IACI,KAAK,CAAC,UAAU;QACtB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC1C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;SACrC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,UAAU,CAAC,OAAe;QACtC,IAAA,gCAAe,EAAC,OAAO,CAAC,CAAC;QACzB,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;YACrC,OAAO;SACP,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,qBAAqB;QACjC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAA,kCAAiB,GAAE,CAAC,CAAC;IAC5C,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAnDD,2BAmDC"}
|
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
import IPostMessage from '../../IPostMessage';
|
|
2
2
|
import ITime, { DateTime, IGetTime } from './ITime';
|
|
3
|
+
/**
|
|
4
|
+
* The `sos.management.time` API groups together methods for working with the system time.
|
|
5
|
+
*/
|
|
3
6
|
export default class Time implements ITime {
|
|
4
7
|
private messagePrefix;
|
|
5
8
|
private postMessage;
|
|
9
|
+
/** @internal */
|
|
6
10
|
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
11
|
+
/**
|
|
12
|
+
* The `get()` method returns currently set time info.
|
|
13
|
+
*
|
|
14
|
+
* @since 4.0.0
|
|
15
|
+
*/
|
|
7
16
|
get(): Promise<IGetTime>;
|
|
8
|
-
/** @deprecated
|
|
17
|
+
/** @deprecated Use `setManual(dateTime, timezone)` instead. */
|
|
9
18
|
set(currentDate: Date, timezone: string): Promise<void>;
|
|
10
|
-
/** @deprecated
|
|
19
|
+
/** @deprecated Use `setManual(dateTime, timezone)` instead. */
|
|
11
20
|
setManual(currentDate: Date, timezone: string): Promise<void>;
|
|
12
21
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
22
|
+
* The `setManual()` method sets the system time and the system timezone.
|
|
23
|
+
*
|
|
24
|
+
* :::warning
|
|
25
|
+
*
|
|
26
|
+
* This method will disable NTP server settings.
|
|
27
|
+
*
|
|
28
|
+
* :::
|
|
29
|
+
*
|
|
30
|
+
* @param dateTime The date and time to set.
|
|
31
|
+
* @param timezone The timezone to set.
|
|
32
|
+
*
|
|
33
|
+
* @since 4.0.0
|
|
16
34
|
*/
|
|
17
35
|
setManual(dateTime: DateTime, timezone: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* The `setNTP()` method sets the NTP server and the system timezone.
|
|
38
|
+
*
|
|
39
|
+
* @param ntpServer The NTP server to set.
|
|
40
|
+
* @param timezone The timezone to set.
|
|
41
|
+
*
|
|
42
|
+
* @since 4.0.0
|
|
43
|
+
*/
|
|
18
44
|
setNTP(ntpServer: string, timezone: string): Promise<void>;
|
|
19
45
|
private getMessage;
|
|
20
46
|
}
|
|
@@ -1,59 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
4
|
};
|
|
11
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Validate_1 = require("../../Validate/Validate");
|
|
6
|
+
const Validate_1 = __importDefault(require("../../Validate/Validate"));
|
|
13
7
|
const ITime_1 = require("./ITime");
|
|
8
|
+
// TODO: add warnings from the old docs, but AFAIK it's not possible to change time in the JS runtime, so the applet has to be always rebooted.
|
|
9
|
+
/**
|
|
10
|
+
* The `sos.management.time` API groups together methods for working with the system time.
|
|
11
|
+
*/
|
|
14
12
|
class Time {
|
|
13
|
+
messagePrefix;
|
|
14
|
+
postMessage;
|
|
15
|
+
/** @internal */
|
|
15
16
|
constructor(messagePrefix, postMessage) {
|
|
16
17
|
this.messagePrefix = messagePrefix;
|
|
17
18
|
this.postMessage = postMessage;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The `get()` method returns currently set time info.
|
|
22
|
+
*
|
|
23
|
+
* @since 4.0.0
|
|
24
|
+
*/
|
|
25
|
+
async get() {
|
|
26
|
+
const { currentTimeWithTimezone } = await this.postMessage({
|
|
27
|
+
type: this.getMessage('get_current_time_with_timezone'),
|
|
25
28
|
});
|
|
29
|
+
return currentTimeWithTimezone;
|
|
26
30
|
}
|
|
27
|
-
/** @deprecated
|
|
31
|
+
/** @deprecated Use `setManual(dateTime, timezone)` instead. */
|
|
28
32
|
set(currentDate, timezone) {
|
|
29
33
|
return this.setManual(currentDate, timezone);
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
35
|
+
/** @internal */
|
|
36
|
+
async setManual(...args) {
|
|
37
|
+
const [currentDate, timezone] = args;
|
|
38
|
+
if (currentDate instanceof Date) {
|
|
39
|
+
(0, Validate_1.default)({ currentDate }).required().date();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
(0, Validate_1.default)({ currentDate }).required().object(ITime_1.VDateTime);
|
|
43
|
+
}
|
|
44
|
+
(0, Validate_1.default)({ timezone }).required().string();
|
|
45
|
+
await this.postMessage({
|
|
46
|
+
type: this.getMessage('set_current_time_with_timezone'),
|
|
47
|
+
currentDate,
|
|
48
|
+
timezone,
|
|
46
49
|
});
|
|
47
50
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
/**
|
|
52
|
+
* The `setNTP()` method sets the NTP server and the system timezone.
|
|
53
|
+
*
|
|
54
|
+
* @param ntpServer The NTP server to set.
|
|
55
|
+
* @param timezone The timezone to set.
|
|
56
|
+
*
|
|
57
|
+
* @since 4.0.0
|
|
58
|
+
*/
|
|
59
|
+
async setNTP(ntpServer, timezone) {
|
|
60
|
+
(0, Validate_1.default)({ ntpServer }).required().string();
|
|
61
|
+
(0, Validate_1.default)({ timezone }).required().string();
|
|
62
|
+
await this.postMessage({
|
|
63
|
+
type: this.getMessage('set_ntp_time_with_timezone'),
|
|
64
|
+
ntpServer,
|
|
65
|
+
timezone,
|
|
57
66
|
});
|
|
58
67
|
}
|
|
59
68
|
getMessage(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Time/Time.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Time.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Time/Time.ts"],"names":[],"mappings":";;;;;AACA,uEAA+C;AAC/C,mCAA+D;AAE/D,+IAA+I;AAC/I;;GAEG;AACH,MAAqB,IAAI;IAGf;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;OAIG;IACI,KAAK,CAAC,GAAG;QACf,MAAM,EAAE,uBAAuB,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC1D,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,gCAAgC,CAAC;SACvD,CAAC,CAAC;QAEH,OAAO,uBAAuB,CAAC;IAChC,CAAC;IAED,+DAA+D;IACxD,GAAG,CAAC,WAAiB,EAAE,QAAgB;QAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAsBD,gBAAgB;IACT,KAAK,CAAC,SAAS,CAAC,GAAG,IAA+B;QACxD,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC;QAErC,IAAI,WAAW,YAAY,IAAI,EAAE,CAAC;YACjC,IAAA,kBAAQ,EAAC,EAAE,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QAC7C,CAAC;aAAM,CAAC;YACP,IAAA,kBAAQ,EAAC,EAAE,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,iBAAS,CAAC,CAAC;QACxD,CAAC;QACD,IAAA,kBAAQ,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;QAE3C,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,gCAAgC,CAAC;YACvD,WAAW;YACX,QAAQ;SACR,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,QAAgB;QACtD,IAAA,kBAAQ,EAAC,EAAE,SAAS,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;QAC5C,IAAA,kBAAQ,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;QAC3C,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC;YACnD,SAAS;YACT,QAAQ;SACR,CAAC,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AApFD,uBAoFC"}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import IMessage from '../../IMessage';
|
|
2
2
|
export declare enum WifiEvent {
|
|
3
|
+
/**
|
|
4
|
+
* Wi-Fi was set to CLIENT state.
|
|
5
|
+
*/
|
|
3
6
|
CLIENT_ENABLED = "client_enabled",
|
|
7
|
+
/**
|
|
8
|
+
* Wi-Fi is in CLIENT state and have connected to a network.
|
|
9
|
+
*/
|
|
4
10
|
CLIENT_CONNECTED = "client_connected",
|
|
11
|
+
/**
|
|
12
|
+
* Wi-Fi is in CLIENT state and failed to connect to a network.
|
|
13
|
+
*/
|
|
5
14
|
CLIENT_CONNECT_REJECTED = "client_connect_rejected",
|
|
15
|
+
/**
|
|
16
|
+
* Wi-Fi is in CLIENT state and disconnected from a network.
|
|
17
|
+
*/
|
|
6
18
|
CLIENT_DISCONNECTED = "client_disconnected",
|
|
19
|
+
/**
|
|
20
|
+
* Wi-Fi was set to AP state.
|
|
21
|
+
*/
|
|
7
22
|
AP_ENABLED = "ap_enabled",
|
|
23
|
+
/**
|
|
24
|
+
* Wi-Fi was set to DISABLED state.
|
|
25
|
+
*/
|
|
8
26
|
DISABLED = "disabled"
|
|
9
27
|
}
|
|
10
28
|
type IWifiMessage = IMessage;
|
|
@@ -3,11 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WifiEvent = void 0;
|
|
4
4
|
var WifiEvent;
|
|
5
5
|
(function (WifiEvent) {
|
|
6
|
+
/**
|
|
7
|
+
* Wi-Fi was set to CLIENT state.
|
|
8
|
+
*/
|
|
6
9
|
WifiEvent["CLIENT_ENABLED"] = "client_enabled";
|
|
10
|
+
/**
|
|
11
|
+
* Wi-Fi is in CLIENT state and have connected to a network.
|
|
12
|
+
*/
|
|
7
13
|
WifiEvent["CLIENT_CONNECTED"] = "client_connected";
|
|
14
|
+
/**
|
|
15
|
+
* Wi-Fi is in CLIENT state and failed to connect to a network.
|
|
16
|
+
*/
|
|
8
17
|
WifiEvent["CLIENT_CONNECT_REJECTED"] = "client_connect_rejected";
|
|
18
|
+
/**
|
|
19
|
+
* Wi-Fi is in CLIENT state and disconnected from a network.
|
|
20
|
+
*/
|
|
9
21
|
WifiEvent["CLIENT_DISCONNECTED"] = "client_disconnected";
|
|
22
|
+
/**
|
|
23
|
+
* Wi-Fi was set to AP state.
|
|
24
|
+
*/
|
|
10
25
|
WifiEvent["AP_ENABLED"] = "ap_enabled";
|
|
26
|
+
/**
|
|
27
|
+
* Wi-Fi was set to DISABLED state.
|
|
28
|
+
*/
|
|
11
29
|
WifiEvent["DISABLED"] = "disabled";
|
|
12
|
-
})(WifiEvent
|
|
30
|
+
})(WifiEvent || (exports.WifiEvent = WifiEvent = {}));
|
|
13
31
|
//# sourceMappingURL=IWifiEvent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IWifiEvent.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Wifi/IWifiEvent.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"IWifiEvent.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Wifi/IWifiEvent.ts"],"names":[],"mappings":";;;AAEA,IAAY,SA8BX;AA9BD,WAAY,SAAS;IACpB;;OAEG;IACH,8CAAiC,CAAA;IAEjC;;OAEG;IACH,kDAAqC,CAAA;IAErC;;OAEG;IACH,gEAAmD,CAAA;IAEnD;;OAEG;IACH,wDAA2C,CAAA;IAE3C;;OAEG;IACH,sCAAyB,CAAA;IAEzB;;OAEG;IACH,kCAAqB,CAAA;AACtB,CAAC,EA9BW,SAAS,yBAAT,SAAS,QA8BpB"}
|
|
@@ -2,33 +2,134 @@ import IPostMessage from '../../IPostMessage';
|
|
|
2
2
|
import IWifiMessage, { WifiEvent } from './IWifiEvent';
|
|
3
3
|
import { IWifiDevice } from '../Network/INetworkInfo';
|
|
4
4
|
import IWifi, { IScannedDevice, IWifiConnectOptions } from './IWifi';
|
|
5
|
+
/**
|
|
6
|
+
* The `sos.management.wifi` API groups together methods for managing WIFI.
|
|
7
|
+
*
|
|
8
|
+
* :::info
|
|
9
|
+
*
|
|
10
|
+
* Use `sos.management.supports('WIFI')` to check if the device supports managing WIFI setup.
|
|
11
|
+
*
|
|
12
|
+
* :::
|
|
13
|
+
*
|
|
14
|
+
* #### Internal state
|
|
15
|
+
*
|
|
16
|
+
* The `sos.management.wifi` API may be in 3 states:
|
|
17
|
+
*
|
|
18
|
+
* - `disabled` - Wi-Fi is disabled. This state is persistent between reboots.
|
|
19
|
+
* - `client` - Wi-Fi is in the client state, i.e. it is capable of connecting to a network, similarly to a phone or laptop. This state is persistent between reboots with all of its configuration.
|
|
20
|
+
* - `ap` - Wi-Fi is in access point state, i.e. it itself becomes a Wi-Fi network that others can connect to. This state is persistent between reboots and will be switched to DISABLED state.
|
|
21
|
+
*
|
|
22
|
+
* You can use `enableClient()`/`disableClient()` method to enable
|
|
23
|
+
* or disable the `client` state or you can use `enableAP()`/`disableAP()` to enable or disable the `ap` state. It is **not** possible to go
|
|
24
|
+
* from `client` state to `ap` state directly, the state has to be `disabled` first.
|
|
25
|
+
*/
|
|
5
26
|
export default class Wifi implements IWifi {
|
|
6
27
|
private messagePrefix;
|
|
7
28
|
private postMessage;
|
|
8
29
|
static MESSAGE_PREFIX: string;
|
|
9
30
|
private eventEmitter;
|
|
31
|
+
/** @internal */
|
|
10
32
|
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
33
|
+
/**
|
|
34
|
+
* The `isClientEnabled()` method checks whether the Wi-Fi is in `client` state.
|
|
35
|
+
*
|
|
36
|
+
* @throws If the Wi-Fi state is in the `ap` state.
|
|
37
|
+
*/
|
|
11
38
|
isClientEnabled(): Promise<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* The `enabledClient()` method switches the Wi-Fi state from `disabled` to `client` state.
|
|
41
|
+
*
|
|
42
|
+
* @throws If the Wi-Fi state is in the `ap` state.
|
|
43
|
+
*/
|
|
12
44
|
enableClient(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* The `isClientEnabled()` method checks whether the Wi-Fi is in `ap` state.
|
|
47
|
+
*/
|
|
13
48
|
isAPEnabled(): Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* The `enabledClient()` method switches the Wi-Fi state from `disabled` to `ap` state.
|
|
51
|
+
*
|
|
52
|
+
* :::info
|
|
53
|
+
*
|
|
54
|
+
* Use `sos.management.supports('WIFI_AP')` to check if the device is able to be in the `ap` mode.
|
|
55
|
+
*
|
|
56
|
+
* :::
|
|
57
|
+
*
|
|
58
|
+
* @param ssid Name of the network, max. allowed length is 32 characters.
|
|
59
|
+
* @param password Password of the device, must be between 8 and 32 characters.
|
|
60
|
+
*
|
|
61
|
+
* @throws If the Wi-Fi state is in the `client` state.
|
|
62
|
+
*/
|
|
14
63
|
enableAP(ssid: string, password: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* The `disable()` method switches the Wi-Fi state to `disabled`. All previously configured networks will be forgotten.
|
|
66
|
+
*/
|
|
15
67
|
disable(): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* The `getConnectedTo()` method returns a network the device is currently connected to.
|
|
70
|
+
*
|
|
71
|
+
* @throws If the Wi-Fi state is not in the `client` state.
|
|
72
|
+
*/
|
|
16
73
|
getConnectedTo(): Promise<IWifiDevice | null>;
|
|
17
74
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
* @param options
|
|
75
|
+
* The `connect()` method connects the device to a specified network.
|
|
76
|
+
*
|
|
77
|
+
* @throws If the Wi-Fi state is not in the `client` state.
|
|
22
78
|
*/
|
|
23
79
|
connect(ssid: string, password?: string, options?: IWifiConnectOptions): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* The `disconnect()` method disconnects the device from Wi-Fi network.
|
|
82
|
+
*
|
|
83
|
+
* @throws If the Wi-Fi state is not in the `client` state.
|
|
84
|
+
*/
|
|
24
85
|
disconnect(): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* The `getCountry()` method returns the 2-letter country code to which Wi-Fi regulations the device adheres to. Different countries may
|
|
88
|
+
* have different regulations, when it comes to the Wi-Fi networks. Under normal circumstances, everything should work with default
|
|
89
|
+
* settings. However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
90
|
+
*
|
|
91
|
+
* @throws If the Wi-Fi state is not in the `client` state.
|
|
92
|
+
*/
|
|
25
93
|
getCountry(): Promise<string | null>;
|
|
94
|
+
/**
|
|
95
|
+
* The `getCountry()` method sets the 2-letter country code for the Wi-Fi settings. Different countries may
|
|
96
|
+
* have different regulations, when it comes to the Wi-Fi networks. Under normal circumstances, everything should work with default
|
|
97
|
+
* settings. However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
98
|
+
*
|
|
99
|
+
* @param countryCode 2-letter country code from the ISO 3166 standard.
|
|
100
|
+
*
|
|
101
|
+
* @throws If the Wi-Fi state is not in the `client` state.
|
|
102
|
+
*/
|
|
26
103
|
setCountry(countryCode: string): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* The `scanDevices()` method initializes a new network scan and available networks.
|
|
106
|
+
*
|
|
107
|
+
* :::info
|
|
108
|
+
*
|
|
109
|
+
* Use `sos.management.supports('WIFI_SCAN')` to check if the device supports scanning for devices.
|
|
110
|
+
*
|
|
111
|
+
* :::
|
|
112
|
+
*
|
|
113
|
+
* @throws If the Wi-Fi state is not in the `client` state.
|
|
114
|
+
*/
|
|
27
115
|
scanDevices(): Promise<IScannedDevice[]>;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
116
|
+
/**
|
|
117
|
+
* The `on()` method sets up a listener, which is called whenever the specified event occurs.
|
|
118
|
+
*/
|
|
119
|
+
on(event: WifiEvent, listener: () => void): void;
|
|
120
|
+
/**
|
|
121
|
+
* The `on()` method sets up a **one-time** listener, which is called whenever the specified event occurs.
|
|
122
|
+
*/
|
|
123
|
+
once(event: WifiEvent, listener: () => void): void;
|
|
124
|
+
/**
|
|
125
|
+
* The `removeListener()` method removes a listener previously set up by `on()` or `once()` methods.
|
|
126
|
+
*/
|
|
127
|
+
removeListener(event: WifiEvent, listener: () => void): void;
|
|
128
|
+
/**
|
|
129
|
+
* The `removeAllListeners()` method removes all listeners for a specified event or for all events.
|
|
130
|
+
*/
|
|
31
131
|
removeAllListeners(event?: WifiEvent): void;
|
|
132
|
+
/** @internal */
|
|
32
133
|
handleMessageData(data: IWifiMessage): void;
|
|
33
134
|
private getMessage;
|
|
34
135
|
}
|