@ovok/native 1.16.1-rc.6 → 1.16.1-rc.7
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/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +12 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +39 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +36 -10
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +69 -25
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +48 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +113 -24
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +32 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +73 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +130 -30
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +75 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +67 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +57 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js +46 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js +27 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +3 -5
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +17 -8
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +47 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/device-waveform.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js +15 -8
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/commonjs/modules/data-sync/constants.js +4 -1
- package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js +6 -9
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +1 -0
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js +47 -0
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +6 -3
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +25 -4
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +43 -86
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +6 -5
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js +6 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js +64 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js +20 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js +21 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js +59 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +20 -11
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/connections.js +45 -2
- package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/readings.js +10 -2
- package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js +37 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +39 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +36 -10
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +68 -25
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +48 -3
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +113 -24
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +28 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +69 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +129 -30
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +72 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +109 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +64 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js +51 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +53 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js +42 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js +22 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +3 -6
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +17 -8
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +44 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-waveform.js +4 -0
- package/lib/module/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/module/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/module/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js +16 -9
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js +2 -2
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/module/modules/data-sync/constants.js +4 -1
- package/lib/module/modules/data-sync/constants.js.map +1 -1
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js +7 -10
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +1 -0
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js +43 -0
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +6 -3
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/default-health-coding.js +25 -4
- package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +44 -87
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +5 -4
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-units.js +6 -1
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js +59 -0
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js +16 -0
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js +17 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js +52 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-series.js +19 -10
- package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/connections.js +45 -2
- package/lib/module/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/readings.js +10 -2
- package/lib/module/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/module/modules/next/bluetooth/runtime.js +37 -1
- package/lib/module/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +24 -4
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +42 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +24 -4
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +42 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/package.json +8 -3
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
/* eslint-disable max-lines */
|
|
4
4
|
import { MeasurementTypeKey } from "@ovok/core/next";
|
|
5
5
|
import { CaseType } from "../../../types/case-type.js";
|
|
6
|
+
import { bytesToHex } from "../../../utils/bytes-to-hex.js";
|
|
6
7
|
import { createFrameValidator } from "../../../utils/create-frame-validator.js";
|
|
7
8
|
import { parseMeasurement } from "../../../utils/parse-measurement.js";
|
|
8
9
|
import { discardedReadingError, rejectCustomReading } from "../../../utils/reject-custom-reading.js";
|
|
9
10
|
import { decodeBP2File } from "../bp2/bp2.files.js";
|
|
10
11
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
11
12
|
import { LepuCommandBuilder } from "../lepu/lepu.command-builder.js";
|
|
13
|
+
import { LepuDeliveredFiles } from "../lepu/lepu.delivered-files.js";
|
|
12
14
|
import { LepuEcgTransferSequencer } from "../lepu/lepu.ecg-transfer.js";
|
|
15
|
+
import { withLepuEncryption } from "../lepu/lepu.encryption-handshake.js";
|
|
13
16
|
import { LepuFrameReader } from "../lepu/lepu.frame-reader.js";
|
|
17
|
+
import { PulseWaveChunks, pulseWaveResult } from "../lepu/lepu.pulse-wave-chunks.js";
|
|
18
|
+
import { LepuRecorder } from "../lepu/lepu.recorder.js";
|
|
19
|
+
import { LepuSession } from "../lepu/lepu.session.js";
|
|
14
20
|
import { TmbCommandSequencer } from "../tmb/tmb.command-sequencer.js";
|
|
15
21
|
import { TmbFrameReader } from "../tmb/tmb.frame-reader.js";
|
|
16
22
|
import { decodeViatomBp3File } from "../viatom/viatom.bp3-files.js";
|
|
@@ -29,12 +35,14 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
29
35
|
reportedHistoryIds = new Set();
|
|
30
36
|
validators = new Map();
|
|
31
37
|
sessionAggregates = new Map();
|
|
38
|
+
lepuSession = new LepuSession();
|
|
32
39
|
constructor(device, params, definition) {
|
|
33
40
|
super(device, {
|
|
34
41
|
...params,
|
|
35
42
|
oneReadingPerConnection: params.oneReadingPerConnection ?? definition.oneReadingPerConnection
|
|
36
43
|
});
|
|
37
44
|
this.definition = definition;
|
|
45
|
+
this.onFinishedSeries = params.onFinishedSeries;
|
|
38
46
|
this.frameHandler = definition.createFrameHandler?.();
|
|
39
47
|
this.sessionPolicy = definition.sessionPolicy;
|
|
40
48
|
this.deviceData.clockSync = definition.clockSync;
|
|
@@ -48,7 +56,7 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
48
56
|
if (definition.preferredMtu !== undefined) {
|
|
49
57
|
this.preferredMtu = definition.preferredMtu;
|
|
50
58
|
}
|
|
51
|
-
this.declareLepuProtocol(definition, params
|
|
59
|
+
this.declareLepuProtocol(definition, params);
|
|
52
60
|
this.declareTmbProtocol(definition, params.clockSync);
|
|
53
61
|
this.declareSequencerFactory(definition, params);
|
|
54
62
|
definition.frames.forEach((frame, uuid) => {
|
|
@@ -88,16 +96,19 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
88
96
|
* what decides anything may be sent at all. A declaration that had the reader without the
|
|
89
97
|
* gate would poll hardware it had not identified, which is the case the gate exists for.
|
|
90
98
|
*/
|
|
91
|
-
declareLepuProtocol(definition,
|
|
99
|
+
declareLepuProtocol(definition, {
|
|
100
|
+
clockSync,
|
|
101
|
+
recordCursorStorage
|
|
102
|
+
}) {
|
|
92
103
|
const lepu = definition.lepu;
|
|
93
104
|
if (!lepu) {
|
|
94
105
|
return;
|
|
95
106
|
}
|
|
96
|
-
this.frameReader = new LepuFrameReader(lepu.startBytes);
|
|
107
|
+
this.frameReader = new LepuFrameReader(lepu.startBytes, this.lepuSession);
|
|
97
108
|
this.createCommandSequencer = () => {
|
|
98
109
|
if (lepu.fileTransfer !== undefined) {
|
|
99
110
|
this.reportedHistoryIds.clear();
|
|
100
|
-
return new LepuEcgTransferSequencer({
|
|
111
|
+
return this.withEncryption(lepu, new LepuEcgTransferSequencer({
|
|
101
112
|
write: {
|
|
102
113
|
serviceUuid: lepu.write.serviceUuid,
|
|
103
114
|
characteristicUuid: lepu.write.characteristicUuid
|
|
@@ -111,14 +122,14 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
111
122
|
onRefused: this.onIdentityRefused,
|
|
112
123
|
onFile: lepu.fileTransfer === "ecg" ? this.reportViatomEcgFile : lepu.fileTransfer === "bp2" ? this.reportViatomBp2File : this.reportViatomBp3File,
|
|
113
124
|
skipFiles: lepu.fileTransfer === "bp3" ? undefined : this.deliveredFileNames,
|
|
125
|
+
deliveredFiles: lepu.fileTransfer === "bp3" ? undefined : new LepuDeliveredFiles(recordCursorStorage, this.device.id),
|
|
114
126
|
acceptFile: lepu.fileTransfer === "ecg" ? name => lepu.ecgFileDecoder !== undefined && /^R/i.test(name) : lepu.fileTransfer === "bp3" ? name => /^bp\.list$/i.test(name) : undefined,
|
|
115
|
-
pollCommand: lepu.
|
|
116
|
-
pollIntervalMs: lepu.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}] : undefined,
|
|
127
|
+
pollCommand: lepu.pollCommand,
|
|
128
|
+
pollIntervalMs: lepu.pollIntervalMs,
|
|
129
|
+
shouldStartTransfer: lepu.fileTransfer === "ecg" ? this.watchRecording(lepu) : undefined,
|
|
130
|
+
takeRequestedCommand: this.takeStopRequest,
|
|
131
|
+
takeHistorySync: this.takeHistorySync,
|
|
132
|
+
pollsOnAnswer: () => this.recorder?.isRecording() ?? false,
|
|
122
133
|
onError: reason => this.onError?.(new Error(`Viatom ECG: ${reason}`)),
|
|
123
134
|
onProgress: progress => this.onConnectionEvent?.({
|
|
124
135
|
deviceData: this.deviceData,
|
|
@@ -128,16 +139,93 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
128
139
|
total: progress.totalBytes
|
|
129
140
|
}
|
|
130
141
|
})
|
|
131
|
-
});
|
|
142
|
+
}));
|
|
132
143
|
}
|
|
133
|
-
return createLepuSequencer(lepu, {
|
|
144
|
+
return this.withEncryption(lepu, createLepuSequencer(lepu, {
|
|
134
145
|
onIdentified: this.onIdentified,
|
|
135
|
-
onRefused: this.onIdentityRefused
|
|
136
|
-
|
|
146
|
+
onRefused: this.onIdentityRefused,
|
|
147
|
+
onPulseWave: this.startPulseWave(lepu)
|
|
148
|
+
}, clockSync, this.device.manufacturerData ?? undefined));
|
|
137
149
|
};
|
|
138
150
|
}
|
|
139
|
-
|
|
140
|
-
|
|
151
|
+
|
|
152
|
+
/** The standard family runs the vendor's encryption handshake first when it advertises one. */
|
|
153
|
+
withEncryption = (lepu, sequencer) => lepu.protocol === undefined ? withLepuEncryption(sequencer, {
|
|
154
|
+
write: {
|
|
155
|
+
serviceUuid: lepu.write.serviceUuid,
|
|
156
|
+
characteristicUuid: lepu.write.characteristicUuid
|
|
157
|
+
},
|
|
158
|
+
session: this.lepuSession,
|
|
159
|
+
manufacturerData: this.device.manufacturerData ?? undefined,
|
|
160
|
+
startByte: lepu.startBytes[0],
|
|
161
|
+
onRefused: this.onIdentityRefused
|
|
162
|
+
}) : sequencer;
|
|
163
|
+
|
|
164
|
+
/** A Lepu device that polls live keeps its stored files until asked; without polling it reads them on connect. */
|
|
165
|
+
get readsHistoryOnRequest() {
|
|
166
|
+
const lepu = this.definition.lepu;
|
|
167
|
+
return lepu?.fileTransfer !== undefined && lepu.pollCommand !== undefined;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** Stops the open recording; the device stores it when it is long enough, and the files are then read. */
|
|
171
|
+
stopRecording = async () => {
|
|
172
|
+
const stopCommand = this.definition.lepu?.recordingStatus?.stopCommand;
|
|
173
|
+
if (stopCommand === undefined || !this.recorder?.isOpen()) {
|
|
174
|
+
throw new Error(`Custom device "${this.definition.id}" has no open recording to stop.`);
|
|
175
|
+
}
|
|
176
|
+
this.requestedStop = stopCommand;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** ECG files are read again only on the poll answer that says a record was just saved. */
|
|
180
|
+
watchRecording = lepu => {
|
|
181
|
+
this.requestedStop = undefined;
|
|
182
|
+
this.recorder = lepu.recordingStatus ? new LepuRecorder(lepu.recordingStatus, {
|
|
183
|
+
onRecordingChanged: this.reportRecording,
|
|
184
|
+
onSamples: (samples, at) => this.reportSamples(lepu, samples, at),
|
|
185
|
+
onChunk: chunk => this.onResult?.(chunk)
|
|
186
|
+
}) : undefined;
|
|
187
|
+
return this.recorder?.observe ?? (() => false);
|
|
188
|
+
};
|
|
189
|
+
reportSamples = (lepu, samples, at) => {
|
|
190
|
+
const waveform = lepu.recordingStatus?.waveform;
|
|
191
|
+
if (waveform) {
|
|
192
|
+
this.onWaveform?.({
|
|
193
|
+
deviceData: this.deviceData,
|
|
194
|
+
samples,
|
|
195
|
+
sampleRateHz: waveform.sampleRateHz,
|
|
196
|
+
millivoltsPerCount: waveform.millivoltsPerCount,
|
|
197
|
+
at
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/** A pulse wave is recorded only for a kind kept as a series, which is how it is handed over. */
|
|
203
|
+
startPulseWave = lepu => {
|
|
204
|
+
const keepsSeries = this.policyFor(MeasurementTypeKey.bloodOxygenPulseRate) === "series";
|
|
205
|
+
this.pulseWave?.flush();
|
|
206
|
+
this.pulseWave = lepu.pulseWave === true && keepsSeries ? new PulseWaveChunks(this.reportPulseWave) : undefined;
|
|
207
|
+
const chunks = this.pulseWave;
|
|
208
|
+
return chunks && (wave => chunks.append(wave, new Date()));
|
|
209
|
+
};
|
|
210
|
+
reportPulseWave = series => this.onFinishedSeries?.(pulseWaveResult(this.deviceData, series));
|
|
211
|
+
handleConnectionEnd() {
|
|
212
|
+
this.pulseWave?.flush();
|
|
213
|
+
}
|
|
214
|
+
takeStopRequest = () => {
|
|
215
|
+
const stop = this.requestedStop;
|
|
216
|
+
this.requestedStop = undefined;
|
|
217
|
+
return stop;
|
|
218
|
+
};
|
|
219
|
+
reportRecording = recording => this.onConnectionEvent?.({
|
|
220
|
+
deviceData: this.deviceData,
|
|
221
|
+
kind: "recording",
|
|
222
|
+
...(recording ? {
|
|
223
|
+
recording
|
|
224
|
+
} : {})
|
|
225
|
+
});
|
|
226
|
+
reportViatomEcgFile = (file, delivered) => {
|
|
227
|
+
const decoded = decodeViatomEcgRecording(file.bytes);
|
|
228
|
+
this.deliveredFileNames.add(file.name);
|
|
141
229
|
if (decoded.samples.length === 0) {
|
|
142
230
|
this.onError?.(new Error(`Viatom ECG: file "${file.name}" does not decode to its recorded length.`));
|
|
143
231
|
return;
|
|
@@ -149,16 +237,16 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
149
237
|
duration: decoded.duration,
|
|
150
238
|
recordedAt: recordedAtFromViatomFileName(file.name),
|
|
151
239
|
recordingId: file.name
|
|
152
|
-
});
|
|
240
|
+
}, delivered);
|
|
153
241
|
};
|
|
154
|
-
reportViatomBp2File = file => {
|
|
155
|
-
const decoded = decodeBP2File(file.name, file.
|
|
242
|
+
reportViatomBp2File = (file, delivered) => {
|
|
243
|
+
const decoded = decodeBP2File(file.name, bytesToHex(Array.from(file.bytes)));
|
|
156
244
|
if (decoded) {
|
|
157
|
-
this.reportHistoryOnce(decoded);
|
|
245
|
+
this.reportHistoryOnce(decoded, delivered);
|
|
158
246
|
}
|
|
159
247
|
};
|
|
160
248
|
reportViatomBp3File = file => {
|
|
161
|
-
decodeViatomBp3File(file.name, file.
|
|
249
|
+
decodeViatomBp3File(file.name, bytesToHex(Array.from(file.bytes)))?.forEach(decoded => {
|
|
162
250
|
if (!this.deliveredFileNames.has(decoded.recordingId)) {
|
|
163
251
|
this.reportHistoryOnce(decoded);
|
|
164
252
|
}
|
|
@@ -166,7 +254,7 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
166
254
|
};
|
|
167
255
|
|
|
168
256
|
/** Reports a decoded history file unless this connection already reported it. */
|
|
169
|
-
reportHistoryOnce = decoded => {
|
|
257
|
+
reportHistoryOnce = (decoded, delivered) => {
|
|
170
258
|
if (this.reportedHistoryIds.has(decoded.recordingId)) {
|
|
171
259
|
return;
|
|
172
260
|
}
|
|
@@ -174,7 +262,7 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
174
262
|
this.onResult?.({
|
|
175
263
|
...decoded,
|
|
176
264
|
caseType: CaseType.RESULT
|
|
177
|
-
});
|
|
265
|
+
}, delivered);
|
|
178
266
|
};
|
|
179
267
|
onIdentified = info => recordLepuIdentity(this.deviceData, info);
|
|
180
268
|
onIdentityRefused = reason => {
|
|
@@ -265,6 +353,7 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
265
353
|
|
|
266
354
|
/** Emits a completed session before the state machine returns to CONNECTED. */
|
|
267
355
|
handleMeasurementEnd() {
|
|
356
|
+
this.recorder?.flush();
|
|
268
357
|
const policy = this.sessionPolicy;
|
|
269
358
|
if (!policy) {
|
|
270
359
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","decodeBP2File","BTManagedDevice","LepuCommandBuilder","LepuEcgTransferSequencer","LepuFrameReader","TmbCommandSequencer","TmbFrameReader","decodeViatomBp3File","decodeViatomEcgRecording","recordedAtFromViatomFileName","createLepuSequencer","recordLepuIdentity","selectLepu","CustomDevice","reportedHistoryIds","Set","validators","Map","sessionAggregates","constructor","device","params","definition","oneReadingPerConnection","frameHandler","createFrameHandler","sessionPolicy","deviceData","clockSync","deliveredFileNames","deliveredEcgFileNames","selectedLepu","lepu","manufacturerData","undefined","mainServices","manufacturerDataProtocol","filter","service","uuid","write","serviceUuid","frameReader","stuckDataTimeout","reportsBondedEvent","syncsCurrentTime","preferredMtu","declareLepuProtocol","declareTmbProtocol","declareSequencerFactory","frames","forEach","frame","set","create","createCommandSequencer","deviceId","id","recordCursorStorage","tmb","protocol","startBytes","fileTransfer","clear","characteristicUuid","builder","rejectEncryptionAtBytes","expectedDeviceTypes","onIdentified","onRefused","onIdentityRefused","onFile","reportViatomEcgFile","reportViatomBp2File","reportViatomBp3File","skipFiles","acceptFile","name","ecgFileDecoder","test","pollCommand","pollIntervalMs","afterTransfer","build","onError","reason","Error","onProgress","progress","onConnectionEvent","kind","current","receivedBytes","total","totalBytes","file","decoded","content","samples","length","onResult","measurementTypeKey","ecg","caseType","RESULT","diagramPoints","duration","recordedAt","recordingId","reportHistoryOnce","has","add","info","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","parsingCase","requiresStream","isMeasuring","OTHER","handleFrame","parsedData","handlerOnly","captureSessionSample","STREAM","shouldReportDependentResult","reportFrame","error","_data","handleSuccessResult","successResult","collectedValues","emit","reading","handleMeasurementEnd","policy","aggregates","values","sessionStartedAt","aggregate","count","minSamples","summary","sample","Object","fromEntries","sums","entries","map","sessionAverage","decorateReading","value","decimals","fields","Math","trunc","Number","toFixed","measurements","frameRecordedAt","Date","measurement","createMeasurement","rejection","measurementRejection","policyFor","key","existing","readingFields","fieldNames","recordOffset","decorate","repeated","repeatedRecords","report","records","floor","from","recordBytes","record","discard","reportMeasurement","parsedFields","find","message"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;AAAA;AACA,SAASA,kBAAkB,QAAQ,iBAAiB;AAGpD,SAASC,QAAQ,QAAQ,6BAA0B;AAcnD,SAASC,oBAAoB,QAAQ,0CAAuC;AAC5E,SAASC,gBAAgB,QAAQ,qCAAkC;AACnE,SACEC,qBAAqB,EACrBC,mBAAmB,QACd,yCAAsC;AAC7C,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,eAAe,QAAQ,yBAAsB;AACtD,SAASC,kBAAkB,QAAQ,iCAA8B;AAEjE,SAASC,wBAAwB,QAAQ,8BAA2B;AAEpE,SAASC,eAAe,QAAQ,8BAA2B;AAC3D,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,mBAAmB,QAAQ,+BAA4B;AAChE,SACEC,wBAAwB,EACxBC,4BAA4B,QACvB,+BAA4B;AAEnC,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,UAAU,QACL,4BAAyB;AAWhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASZ,eAAe,CAAiB;EAOxDa,kBAAkB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC7BC,UAAU,GAAG,IAAIC,GAAG,CAAsC,CAAC;EAE3DC,iBAAiB,GAAG,IAAID,GAAG,CAA2B,CAAC;EAGxEE,WAAWA,CACTC,MAAc,EACdC,MAA0C,EAC1CC,UAAkC,EAClC;IACA,KAAK,CAACF,MAAM,EAAE;MACZ,GAAGC,MAAM;MACTE,uBAAuB,EACrBF,MAAM,CAACE,uBAAuB,IAAID,UAAU,CAACC;IACjD,CAAC,CAAC;IAEF,IAAI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C;IAEjE,IAAIE,SAAS,EAAE;MACb,IAAI,CAACiB,OAAO,CAACjB,SAAS,EAAE9B,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAACD,IAAI,CAAC,IAAI,CAACkB,eAAe,CAACjB,OAAO,EAAEtF,KAAK,EAAE2H,YAAY,CAAC,CAAC;EAC/D;EAEQR,iBAAiBA,CACvBzC,UAAwB,EACxBwC,WAA6B,EACf;IACd,MAAM5B,OAAO,GAAG;MACdnC,QAAQ,EAAEuB,UAAU,CAACvB,QAAQ;MAC7BF,kBAAkB,EAAEiE,WAAW,CAACjE;IAClC,CAAiB;IAEjB,MAAMwE,aAAa,GAAGnC,OAAiD;IACvE,MAAMiD,YAAY,GAAG7D,UAAoD;IAEzEwC,WAAW,CAACQ,UAAU,CAAC3H,OAAO,CAAE0B,IAAI,IAAK;MACvCgG,aAAa,CAAChG,IAAI,CAAC,GAAG8G,YAAY,CAAC9G,IAAI,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO6D,OAAO;EAChB;EAEQ+B,oBAAoBA,CAC1B/B,OAAqB,EACrB4B,WAA6B,EACT;IACpB,OAAOA,WAAW,CAACQ,UAAU,CAC1BrB,GAAG,CAAE5E,IAAI,IACR9E,mBAAmB,CACjB,IAAI,CAACuB,UAAU,CAACwI,MAAM,EACtBQ,WAAW,CAACjE,kBAAkB,EAC9BxB,IAAI,EACH6D,OAAO,CAA4C7D,IAAI,CAC1D,CACF,CAAC,CACA+G,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAK3J,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","bytesToHex","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","decodeBP2File","BTManagedDevice","LepuCommandBuilder","LepuDeliveredFiles","LepuEcgTransferSequencer","withLepuEncryption","LepuFrameReader","PulseWaveChunks","pulseWaveResult","LepuRecorder","LepuSession","TmbCommandSequencer","TmbFrameReader","decodeViatomBp3File","decodeViatomEcgRecording","recordedAtFromViatomFileName","createLepuSequencer","recordLepuIdentity","selectLepu","CustomDevice","reportedHistoryIds","Set","validators","Map","sessionAggregates","lepuSession","constructor","device","params","definition","oneReadingPerConnection","onFinishedSeries","frameHandler","createFrameHandler","sessionPolicy","deviceData","clockSync","deliveredFileNames","deliveredEcgFileNames","selectedLepu","lepu","manufacturerData","undefined","mainServices","manufacturerDataProtocol","filter","service","uuid","write","serviceUuid","frameReader","stuckDataTimeout","reportsBondedEvent","syncsCurrentTime","preferredMtu","declareLepuProtocol","declareTmbProtocol","declareSequencerFactory","frames","forEach","frame","set","create","createCommandSequencer","deviceId","id","recordCursorStorage","tmb","protocol","startBytes","fileTransfer","clear","withEncryption","characteristicUuid","builder","rejectEncryptionAtBytes","expectedDeviceTypes","onIdentified","onRefused","onIdentityRefused","onFile","reportViatomEcgFile","reportViatomBp2File","reportViatomBp3File","skipFiles","deliveredFiles","acceptFile","name","ecgFileDecoder","test","pollCommand","pollIntervalMs","shouldStartTransfer","watchRecording","takeRequestedCommand","takeStopRequest","takeHistorySync","pollsOnAnswer","recorder","isRecording","onError","reason","Error","onProgress","progress","onConnectionEvent","kind","current","receivedBytes","total","totalBytes","onPulseWave","startPulseWave","sequencer","session","startByte","readsHistoryOnRequest","stopRecording","stopCommand","recordingStatus","isOpen","requestedStop","onRecordingChanged","reportRecording","onSamples","samples","at","reportSamples","onChunk","chunk","onResult","observe","waveform","onWaveform","sampleRateHz","millivoltsPerCount","keepsSeries","policyFor","bloodOxygenPulseRate","pulseWave","flush","reportPulseWave","chunks","wave","append","Date","series","handleConnectionEnd","stop","recording","file","delivered","decoded","bytes","add","length","measurementTypeKey","ecg","caseType","RESULT","diagramPoints","duration","recordedAt","recordingId","Array","from","reportHistoryOnce","has","info","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","parsingCase","requiresStream","isMeasuring","OTHER","handleFrame","parsedData","handlerOnly","captureSessionSample","STREAM","shouldReportDependentResult","reportFrame","error","_data","handleSuccessResult","successResult","collectedValues","emit","reading","handleMeasurementEnd","policy","aggregates","values","sessionStartedAt","aggregate","count","minSamples","summary","sample","Object","fromEntries","sums","entries","map","sessionAverage","decorateReading","value","decimals","fields","Math","trunc","Number","toFixed","measurements","frameRecordedAt","measurement","createMeasurement","rejection","measurementRejection","key","existing","readingFields","fieldNames","recordOffset","decorate","repeated","repeatedRecords","report","records","floor","recordBytes","record","discard","reportMeasurement","parsedFields","find","message"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;AAAA;AACA,SAASA,kBAAkB,QAAQ,iBAAiB;AAGpD,SAASC,QAAQ,QAAQ,6BAA0B;AAkBnD,SAASC,UAAU,QAAQ,gCAA6B;AACxD,SAASC,oBAAoB,QAAQ,0CAAuC;AAC5E,SAASC,gBAAgB,QAAQ,qCAAkC;AACnE,SACEC,qBAAqB,EACrBC,mBAAmB,QACd,yCAAsC;AAC7C,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,eAAe,QAAQ,yBAAsB;AACtD,SAASC,kBAAkB,QAAQ,iCAA8B;AACjE,SAASC,kBAAkB,QAAQ,iCAA8B;AAEjE,SAASC,wBAAwB,QAAQ,8BAA2B;AACpE,SAASC,kBAAkB,QAAQ,sCAAmC;AAEtE,SAASC,eAAe,QAAQ,8BAA2B;AAG3D,SAASC,eAAe,EAAEC,eAAe,QAAQ,mCAAgC;AACjF,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,WAAW,QAAQ,yBAAsB;AAClD,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,mBAAmB,QAAQ,+BAA4B;AAChE,SACEC,wBAAwB,EACxBC,4BAA4B,QACvB,+BAA4B;AAEnC,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,UAAU,QACL,4BAAyB;AAWhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OA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3G,IAAI,CAC1D,CACF,CAAC,CACA0J,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAKxM,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
|
|
@@ -4,8 +4,12 @@ import { base64ToHex } from "../../../utils/base-64-to-hex.js";
|
|
|
4
4
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
5
5
|
const PROTOCOL_MASK = 0x0f;
|
|
6
6
|
const ENCRYPTION_MASK = 0xf0;
|
|
7
|
+
const ENCRYPTION_OPTIONAL = 0x10;
|
|
7
8
|
const ENCRYPTION_REQUIRED = 0x20;
|
|
8
9
|
const VIATOM_OXYGEN_V2_BYTES = [3, 4];
|
|
10
|
+
const LEPU_FLAG_BYTES = [4, 3];
|
|
11
|
+
const LEPU_PROTOCOLS = [1, 2];
|
|
12
|
+
const ENCRYPTION_LEVELS = [ENCRYPTION_OPTIONAL, ENCRYPTION_REQUIRED];
|
|
9
13
|
const manufacturerBytes = manufacturerData => {
|
|
10
14
|
if (!manufacturerData) {
|
|
11
15
|
return [];
|
|
@@ -21,7 +25,19 @@ const manufacturerByte = (manufacturerData, index) => manufacturerBytes(manufact
|
|
|
21
25
|
/** Returns true when the advertised byte says that only encrypted traffic is accepted. */
|
|
22
26
|
const advertisementRequiresEncryption = (manufacturerData, byteIndexes = []) => byteIndexes.some(index => ((manufacturerByte(manufacturerData, index) ?? 0) & ENCRYPTION_MASK) === ENCRYPTION_REQUIRED);
|
|
23
27
|
|
|
28
|
+
/**
|
|
29
|
+
* True when the advertisement offers or requires the encryption handshake.
|
|
30
|
+
*
|
|
31
|
+
* Byte 4 describes the second service and wins when it names a protocol; otherwise byte 3
|
|
32
|
+
* does. A level of 1 (optional) or 2 (required) is a handshake for the vendor's own client.
|
|
33
|
+
*/
|
|
34
|
+
const advertisesLepuEncryption = manufacturerData => {
|
|
35
|
+
const bytes = manufacturerBytes(manufacturerData);
|
|
36
|
+
const flag = LEPU_FLAG_BYTES.map(index => bytes[index] ?? 0).find(value => LEPU_PROTOCOLS.includes(value & PROTOCOL_MASK));
|
|
37
|
+
return flag !== undefined && ENCRYPTION_LEVELS.includes(flag & ENCRYPTION_MASK);
|
|
38
|
+
};
|
|
39
|
+
|
|
24
40
|
/** The vendor uses the low nibble of byte 3 or 4 to select the OxyII service. */
|
|
25
41
|
const viatomOxygenUsesV2 = manufacturerData => VIATOM_OXYGEN_V2_BYTES.some(index => ((manufacturerByte(manufacturerData, index) ?? 0) & PROTOCOL_MASK) === 2);
|
|
26
|
-
export { advertisementRequiresEncryption, manufacturerBytes, viatomOxygenUsesV2 };
|
|
42
|
+
export { advertisementRequiresEncryption, advertisesLepuEncryption, manufacturerBytes, viatomOxygenUsesV2 };
|
|
27
43
|
//# sourceMappingURL=lepu.advertisement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["base64ToHex","hexToByte","PROTOCOL_MASK","ENCRYPTION_MASK","ENCRYPTION_REQUIRED","VIATOM_OXYGEN_V2_BYTES","manufacturerBytes","manufacturerData","map","manufacturerByte","index","advertisementRequiresEncryption","byteIndexes","some","viatomOxygenUsesV2"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,mBAAmB,GAAG,IAAI;AAChC,MAAMC,sBAAsB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAU;
|
|
1
|
+
{"version":3,"names":["base64ToHex","hexToByte","PROTOCOL_MASK","ENCRYPTION_MASK","ENCRYPTION_OPTIONAL","ENCRYPTION_REQUIRED","VIATOM_OXYGEN_V2_BYTES","LEPU_FLAG_BYTES","LEPU_PROTOCOLS","ENCRYPTION_LEVELS","manufacturerBytes","manufacturerData","map","manufacturerByte","index","advertisementRequiresEncryption","byteIndexes","some","advertisesLepuEncryption","bytes","flag","find","value","includes","undefined","viatomOxygenUsesV2"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,mBAAmB,GAAG,IAAI;AAChC,MAAMC,mBAAmB,GAAG,IAAI;AAChC,MAAMC,sBAAsB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAU;AAC9C,MAAMC,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,CAAU;AACvC,MAAMC,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAC7B,MAAMC,iBAAiB,GAAG,CAACL,mBAAmB,EAAEC,mBAAmB,CAAC;AAEpE,MAAMK,iBAAiB,GAAIC,gBAAyB,IAAe;EACjE,IAAI,CAACA,gBAAgB,EAAE;IACrB,OAAO,EAAE;EACX;EAEA,IAAI;IACF,OAAOX,WAAW,CAACW,gBAAgB,CAAC,CAACC,GAAG,CAACX,SAAS,CAAC;EACrD,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC;AAED,MAAMY,gBAAgB,GAAGA,CACvBF,gBAAoC,EACpCG,KAAa,KACUJ,iBAAiB,CAACC,gBAAgB,CAAC,CAACG,KAAK,CAAC;;AAEnE;AACA,MAAMC,+BAA+B,GAAGA,CACtCJ,gBAAoC,EACpCK,WAA8B,GAAG,EAAE,KAEnCA,WAAW,CAACC,IAAI,CACbH,KAAK,IACJ,CAAC,CAACD,gBAAgB,CAACF,gBAAgB,EAAEG,KAAK,CAAC,IAAI,CAAC,IAAIX,eAAe,MACnEE,mBACJ,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAMa,wBAAwB,GAAIP,gBAAyB,IAAc;EACvE,MAAMQ,KAAK,GAAGT,iBAAiB,CAACC,gBAAgB,CAAC;EAEjD,MAAMS,IAAI,GAAGb,eAAe,CAACK,GAAG,CAAEE,KAAK,IAAKK,KAAK,CAACL,KAAK,CAAC,IAAI,CAAC,CAAC,CAACO,IAAI,CAChEC,KAAK,IAAKd,cAAc,CAACe,QAAQ,CAACD,KAAK,GAAGpB,aAAa,CAC1D,CAAC;EAED,OAAOkB,IAAI,KAAKI,SAAS,IAAIf,iBAAiB,CAACc,QAAQ,CAACH,IAAI,GAAGjB,eAAe,CAAC;AACjF,CAAC;;AAED;AACA,MAAMsB,kBAAkB,GAAId,gBAAyB,IACnDL,sBAAsB,CAACW,IAAI,CACxBH,KAAK,IACJ,CAAC,CAACD,gBAAgB,CAACF,gBAAgB,EAAEG,KAAK,CAAC,IAAI,CAAC,IAAIZ,aAAa,MAAM,CAC3E,CAAC;AAEH,SACEa,+BAA+B,EAC/BG,wBAAwB,EACxBR,iBAAiB,EACjBe,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** How long a connect-time command may go unanswered before it is sent again. */
|
|
4
|
+
const LEPU_CONNECT_REPLY_TIMEOUT_MS = 1_000;
|
|
5
|
+
|
|
6
|
+
/** A device just woken can drop its first command, so each connect step gets one more try. */
|
|
7
|
+
const LEPU_CONNECT_ATTEMPTS = 2;
|
|
8
|
+
|
|
9
|
+
/** Counts the tries of one connect-time command. */
|
|
10
|
+
class LepuConnectRetry {
|
|
11
|
+
attempts = 0;
|
|
12
|
+
|
|
13
|
+
/** Marks the first send of the command. */
|
|
14
|
+
started = () => {
|
|
15
|
+
this.attempts = 1;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** Whether the command may be sent again; counts that send when it may. */
|
|
19
|
+
mayRetry = () => {
|
|
20
|
+
if (this.attempts >= LEPU_CONNECT_ATTEMPTS) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
this.attempts++;
|
|
24
|
+
return true;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export { LEPU_CONNECT_REPLY_TIMEOUT_MS, LepuConnectRetry };
|
|
28
|
+
//# sourceMappingURL=lepu.connect-retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LEPU_CONNECT_REPLY_TIMEOUT_MS","LEPU_CONNECT_ATTEMPTS","LepuConnectRetry","attempts","started","mayRetry"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.connect-retry.ts"],"mappings":";;AAAA;AACA,MAAMA,6BAA6B,GAAG,KAAK;;AAE3C;AACA,MAAMC,qBAAqB,GAAG,CAAC;;AAE/B;AACA,MAAMC,gBAAgB,CAAC;EACbC,QAAQ,GAAG,CAAC;;EAEpB;EACOC,OAAO,GAAGA,CAAA,KAAY;IAC3B,IAAI,CAACD,QAAQ,GAAG,CAAC;EACnB,CAAC;;EAED;EACOE,QAAQ,GAAGA,CAAA,KAAe;IAC/B,IAAI,IAAI,CAACF,QAAQ,IAAIF,qBAAqB,EAAE;MAC1C,OAAO,KAAK;IACd;IAEA,IAAI,CAACE,QAAQ,EAAE;IAEf,OAAO,IAAI;EACb,CAAC;AACH;AAEA,SAASH,6BAA6B,EAAEE,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { sentryLogger } from "../../../../helpers/utils/sentry-logger.js";
|
|
4
|
+
import { toBluetoothError } from "../../../types/bluetooth-error.js";
|
|
5
|
+
const KEY_PREFIX = "@ovok/native/lepu-delivered-files";
|
|
6
|
+
const parseNames = stored => {
|
|
7
|
+
try {
|
|
8
|
+
const parsed = JSON.parse(stored ?? "[]");
|
|
9
|
+
return Array.isArray(parsed) ? parsed.filter(name => typeof name === "string") : [];
|
|
10
|
+
} catch {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The names of a device's stored files whose readings the app took (queued or saved), kept in
|
|
17
|
+
* `storage` so a later connection skips them, as the vendor app skips the files it saved. Without
|
|
18
|
+
* storage it forgets on disconnect.
|
|
19
|
+
*/
|
|
20
|
+
class LepuDeliveredFiles {
|
|
21
|
+
names = new Set();
|
|
22
|
+
constructor(storage, deviceId) {
|
|
23
|
+
this.storage = storage;
|
|
24
|
+
this.key = `${KEY_PREFIX}/${deviceId}`;
|
|
25
|
+
this.writes = this.load();
|
|
26
|
+
}
|
|
27
|
+
has = name => this.names.has(name);
|
|
28
|
+
|
|
29
|
+
/** Remembers a file whose reading the app took. */
|
|
30
|
+
add = name => {
|
|
31
|
+
this.names.add(name);
|
|
32
|
+
this.persist();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Forgets the files the device no longer lists, so no more names are kept than it holds. */
|
|
36
|
+
keepListed = listed => {
|
|
37
|
+
const kept = [...this.names].filter(name => listed.includes(name));
|
|
38
|
+
if (kept.length < this.names.size) {
|
|
39
|
+
this.names = new Set(kept);
|
|
40
|
+
this.persist();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
load = async () => {
|
|
44
|
+
try {
|
|
45
|
+
const stored = parseNames(await this.storage?.getItem(this.key));
|
|
46
|
+
this.names = new Set([...stored, ...this.names]);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
sentryLogger("error", "LEPU_DELIVERED_FILES: Could not read the stored names", {
|
|
49
|
+
errorCode: toBluetoothError(error).code
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Writes in order, each after the stored names were read, so none overwrites names not read yet. */
|
|
55
|
+
persist = () => {
|
|
56
|
+
this.writes = this.writes.then(this.store);
|
|
57
|
+
};
|
|
58
|
+
store = async () => {
|
|
59
|
+
try {
|
|
60
|
+
await this.storage?.setItem(this.key, JSON.stringify([...this.names]));
|
|
61
|
+
} catch (error) {
|
|
62
|
+
sentryLogger("error", "LEPU_DELIVERED_FILES: Could not store the names", {
|
|
63
|
+
errorCode: toBluetoothError(error).code
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export { LepuDeliveredFiles };
|
|
69
|
+
//# sourceMappingURL=lepu.delivered-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["sentryLogger","toBluetoothError","KEY_PREFIX","parseNames","stored","parsed","JSON","parse","Array","isArray","filter","name","LepuDeliveredFiles","names","Set","constructor","storage","deviceId","key","writes","load","has","add","persist","keepListed","listed","kept","includes","length","size","getItem","error","errorCode","code","then","store","setItem","stringify"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.delivered-files.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4CAAyC;AAEtE,SAASC,gBAAgB,QAAQ,mCAAgC;AAEjE,MAAMC,UAAU,GAAG,mCAAmC;AAEtD,MAAMC,UAAU,GAAIC,MAAiC,IAAe;EAClE,IAAI;IACF,MAAMC,MAAe,GAAGC,IAAI,CAACC,KAAK,CAACH,MAAM,IAAI,IAAI,CAAC;IAElD,OAAOI,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,GACxBA,MAAM,CAACK,MAAM,CAAEC,IAAI,IAAqB,OAAOA,IAAI,KAAK,QAAQ,CAAC,GACjE,EAAE;EACR,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAAC;EACfC,KAAK,GAAG,IAAIC,GAAG,CAAS,CAAC;EAI1BC,WAAWA,CACCC,OAA0C,EAC3DC,QAAgB,EAChB;IAAA,KAFiBD,OAA0C,GAA1CA,OAA0C;IAG3D,IAAI,CAACE,GAAG,GAAG,GAAGhB,UAAU,IAAIe,QAAQ,EAAE;IACtC,IAAI,CAACE,MAAM,GAAG,IAAI,CAACC,IAAI,CAAC,CAAC;EAC3B;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