@ovok/native 1.16.1-rc.5 → 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/auth/google-return-page/index.js +24 -0
- package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +21 -10
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
- package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
- 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 +42 -2
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
- 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 +78 -19
- 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 +11 -3
- 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/cofoe/cofoe.records.js +2 -7
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.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 +115 -26
- 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 +75 -20
- 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 +21 -12
- 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/devices/viatom/viatom.wbp02.protocol.js +3 -7
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.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/calculate-crc-16-modbus.js +23 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.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/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- 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 +8 -7
- 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 +14 -6
- 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 +68 -0
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
- 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 +11 -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/auth/google-return-page/index.js +21 -0
- package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/module/modules/auth/index.js +2 -1
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +1 -1
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/index.js +2 -0
- package/lib/module/modules/auth/sign-in/index.js.map +1 -1
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
- 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 +42 -2
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
- 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 +77 -19
- 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 +11 -3
- 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/cofoe/cofoe.records.js +2 -7
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.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 +115 -26
- 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 +75 -21
- 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 +21 -12
- 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/devices/viatom/viatom.wbp02.protocol.js +3 -7
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.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/calculate-crc-16-modbus.js +18 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.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/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- 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 +8 -7
- 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 +14 -6
- 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 +65 -0
- package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
- 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 +11 -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/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- 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/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
- 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 +29 -3
- 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-data-processor.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.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/cofoe/cofoe.records.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 +6 -1
- 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 +9 -3
- 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/devices/viatom/viatom.wbp02.protocol.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 +47 -3
- 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/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.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/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- 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/types/health-sync-props.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.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 +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- 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/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- 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/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
- 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 +29 -3
- 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-data-processor.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.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/cofoe/cofoe.records.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 +6 -1
- 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 +9 -3
- 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/devices/viatom/viatom.wbp02.protocol.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 +47 -3
- 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/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.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/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- 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/types/health-sync-props.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.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 +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- 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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
import { le32FromHex } from "../../../utils/le-32-from-hex.js";
|
|
5
|
+
const LOW_NIBBLE = 0x0f;
|
|
6
|
+
const CLOSED = "closed";
|
|
7
|
+
/** Follows a recorder's open recording through its poll answers. */
|
|
8
|
+
class LepuRecordingWatch {
|
|
9
|
+
seconds = 0;
|
|
10
|
+
constructor(status, onRecordingChanged) {
|
|
11
|
+
this.status = status;
|
|
12
|
+
this.onRecordingChanged = onRecordingChanged;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Reads one poll answer; true when it is the first in the saved state, so the files are read. */
|
|
16
|
+
observe = pollAnswer => {
|
|
17
|
+
const previous = this.state;
|
|
18
|
+
this.state = hexToByte(pollAnswer[this.status.byteIndex] ?? "00") & LOW_NIBBLE;
|
|
19
|
+
this.seconds = le32FromHex(pollAnswer, this.status.secondsByteIndex);
|
|
20
|
+
this.leadOffSince = this.isLeadOff() ? this.leadOffSince ?? new Date() : undefined;
|
|
21
|
+
this.report(this.recordingIn());
|
|
22
|
+
return this.state === this.status.savedState && previous !== this.status.savedState;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** Whether a recording is open, so that stopping it means something. */
|
|
26
|
+
isOpen = () => this.isRecording() || this.isLeadOff();
|
|
27
|
+
|
|
28
|
+
/** Whether the electrodes have contact and samples are being recorded. */
|
|
29
|
+
isRecording = () => this.state === this.status.recordingState;
|
|
30
|
+
|
|
31
|
+
/** Seconds recorded, as of the last answer. */
|
|
32
|
+
recordedSeconds = () => this.seconds;
|
|
33
|
+
recordingIn = () => this.isOpen() ? {
|
|
34
|
+
seconds: this.seconds,
|
|
35
|
+
...(this.leadOffSince ? {
|
|
36
|
+
leadOffSince: this.leadOffSince
|
|
37
|
+
} : {}),
|
|
38
|
+
storesOnStop: this.seconds >= this.status.minimumStoredSeconds
|
|
39
|
+
} : undefined;
|
|
40
|
+
isLeadOff = () => this.state === this.status.leadOffState;
|
|
41
|
+
|
|
42
|
+
/** Reports a change in what the app would act on, not every tick of the seconds. */
|
|
43
|
+
report = recording => {
|
|
44
|
+
const key = recording ? `${recording.leadOffSince !== undefined}:${recording.storesOnStop}` : CLOSED;
|
|
45
|
+
const changed = key !== (this.reported ?? CLOSED);
|
|
46
|
+
this.reported = key;
|
|
47
|
+
if (changed) {
|
|
48
|
+
this.onRecordingChanged(recording);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export { LepuRecordingWatch };
|
|
53
|
+
//# sourceMappingURL=lepu.recording-watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","le32FromHex","LOW_NIBBLE","CLOSED","LepuRecordingWatch","seconds","constructor","status","onRecordingChanged","observe","pollAnswer","previous","state","byteIndex","secondsByteIndex","leadOffSince","isLeadOff","Date","undefined","report","recordingIn","savedState","isOpen","isRecording","recordingState","recordedSeconds","storesOnStop","minimumStoredSeconds","leadOffState","recording","key","changed","reported"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.recording-watch.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AACtD,SAASC,WAAW,QAAQ,kCAA+B;AAE3D,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,MAAM,GAAG,QAAQ;AAMvB;AACA,MAAMC,kBAAkB,CAAC;EAEfC,OAAO,GAAG,CAAC;EAIZC,WAAWA,CACCC,MAAuB,EACvBC,kBAA8D,EAC/E;IAAA,KAFiBD,MAAuB,GAAvBA,MAAuB;IAAA,KACvBC,kBAA8D,GAA9DA,kBAA8D;EAC9E;;EAEH;EACOC,OAAO,GAAIC,UAA6B,IAAc;IAC3D,MAAMC,QAAQ,GAAG,IAAI,CAACC,KAAK;IAE3B,IAAI,CAACA,KAAK,GAAGZ,SAAS,CAACU,UAAU,CAAC,IAAI,CAACH,MAAM,CAACM,SAAS,CAAC,IAAI,IAAI,CAAC,GAAGX,UAAU;IAC9E,IAAI,CAACG,OAAO,GAAGJ,WAAW,CAACS,UAAU,EAAE,IAAI,CAACH,MAAM,CAACO,gBAAgB,CAAC;IACpE,IAAI,CAACC,YA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AGF,GAAG;IAEnB,IAAIC,OAAO,EAAE;MACX,IAAI,CAACvB,kBAAkB,CAACqB,SAAS,CAAC;IACpC;EACF,CAAC;AACH;AAEA,SAASzB,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { byteToHex } from "../../../utils/bytes-to-hex.js";
|
|
4
|
+
import { calculateCrc8 } from "../../../utils/calculate-crc-8.js";
|
|
5
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
6
|
+
import { decryptLepuPayload, encryptLepuPayload } from "../viatom/viatom-lepu-crypto.js";
|
|
7
|
+
import { lepuPayloadOf } from "./lepu.frame.js";
|
|
8
|
+
const PAYLOAD_LENGTH_INDEX = 5;
|
|
9
|
+
const BITS_PER_BYTE = 8;
|
|
10
|
+
const BYTE_MASK = 0xff;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* One connection's AES key, from the moment the device hands it over in the handshake.
|
|
14
|
+
*
|
|
15
|
+
* Requests leave encrypted and replies reach every parser in plain text. Without a key, and
|
|
16
|
+
* for an empty payload, frames pass through unchanged, as the vendor's own client does.
|
|
17
|
+
*/
|
|
18
|
+
class LepuSession {
|
|
19
|
+
begin = key => {
|
|
20
|
+
this.key = [...key];
|
|
21
|
+
};
|
|
22
|
+
end = () => {
|
|
23
|
+
this.key = undefined;
|
|
24
|
+
};
|
|
25
|
+
encryptFrame = frame => this.withPayload(frame, encryptLepuPayload) ?? [...frame];
|
|
26
|
+
|
|
27
|
+
/** The frame in plain text, or `undefined` when its payload does not decrypt. */
|
|
28
|
+
decryptFrame = frame => this.withPayload(frame, decryptLepuPayload);
|
|
29
|
+
withPayload = (frame, transform) => {
|
|
30
|
+
const payload = lepuPayloadOf(frame).map(hexToByte);
|
|
31
|
+
if (!this.key || payload.length === 0) {
|
|
32
|
+
return [...frame];
|
|
33
|
+
}
|
|
34
|
+
const transformed = transform(payload, this.key);
|
|
35
|
+
return transformed && rebuildFrame(frame, transformed);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The same header with a new payload, its length and its checksum. */
|
|
40
|
+
const rebuildFrame = (frame, payload) => {
|
|
41
|
+
const body = [...frame.slice(0, PAYLOAD_LENGTH_INDEX), byteToHex(payload.length & BYTE_MASK), byteToHex(payload.length >> BITS_PER_BYTE), ...payload.map(byteToHex)];
|
|
42
|
+
return [...body, byteToHex(calculateCrc8(body, body.length))];
|
|
43
|
+
};
|
|
44
|
+
export { LepuSession };
|
|
45
|
+
//# sourceMappingURL=lepu.session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["byteToHex","calculateCrc8","hexToByte","decryptLepuPayload","encryptLepuPayload","lepuPayloadOf","PAYLOAD_LENGTH_INDEX","BITS_PER_BYTE","BYTE_MASK","LepuSession","begin","key","end","undefined","encryptFrame","frame","withPayload","decryptFrame","transform","payload","map","length","transformed","rebuildFrame","body","slice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.session.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,gCAA6B;AACvD,SAASC,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SACEC,kBAAkB,EAClBC,kBAAkB,QACb,iCAA8B;AAErC,SAASC,aAAa,QAAQ,iBAAc;AAE5C,MAAMC,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,SAAS,GAAG,IAAI;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,CAAC;EAGTC,KAAK,GAAIC,GAAsB,IAAW;IAC/C,IAAI,CAACA,GAAG,GAAG,CAAC,GAAGA,GAAG,CAAC;EACrB,CAAC;EAEMC,GAAG,GAAGA,CAAA,KAAY;IACvB,IAAI,CAACD,GAAG,GAAGE,SAAS;EACtB,CAAC;EAEMC,YAAY,GAAIC,KAAwB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device holds, read only when asked.
|
|
6
|
+
*
|
|
7
|
+
* On connect their names are only listed, so a later `readNew` fetches what the device stored
|
|
8
|
+
* since; `readAll` is the app's explicit history sync. A file read once on a connection is not
|
|
9
|
+
* read again on it, and one whose reading the app took is not read again at all.
|
|
10
|
+
*/
|
|
11
|
+
class LepuStoredFiles {
|
|
12
|
+
listedOnConnect = new Set();
|
|
13
|
+
read = new Set();
|
|
14
|
+
constructor(params) {
|
|
15
|
+
this.params = params;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Lists the files without opening any. */
|
|
19
|
+
listExisting = afterTransfer => this.transfer(afterTransfer, () => false, names => names.forEach(name => this.listedOnConnect.add(name)));
|
|
20
|
+
|
|
21
|
+
/** Reads the files stored since the connection listed them. */
|
|
22
|
+
readNew = afterTransfer => this.transfer(afterTransfer, name => !this.listedOnConnect.has(name) && this.isUnread(name));
|
|
23
|
+
|
|
24
|
+
/** Reads every stored file not read yet. */
|
|
25
|
+
readAll = afterTransfer => this.transfer(afterTransfer, this.isUnread);
|
|
26
|
+
isUnread = name => !this.read.has(name) && !this.params.deliveredFiles?.has(name) && (this.params.acceptFile?.(name) ?? true);
|
|
27
|
+
transfer = (afterTransfer, acceptFile, onFileList) => new LepuFileTransfer({
|
|
28
|
+
...this.params,
|
|
29
|
+
acceptFile,
|
|
30
|
+
afterTransfer,
|
|
31
|
+
onFileList: names => {
|
|
32
|
+
this.params.deliveredFiles?.keepListed(names);
|
|
33
|
+
onFileList?.(names);
|
|
34
|
+
},
|
|
35
|
+
onFile: file => {
|
|
36
|
+
this.read.add(file.name);
|
|
37
|
+
this.params.onFile(file, () => this.params.deliveredFiles?.add(file.name));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export { LepuStoredFiles };
|
|
42
|
+
//# sourceMappingURL=lepu.stored-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LepuFileTransfer","LepuStoredFiles","listedOnConnect","Set","read","constructor","params","listExisting","afterTransfer","transfer","names","forEach","name","add","readNew","has","isUnread","readAll","deliveredFiles","acceptFile","onFileList","keepListed","onFile","file"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.stored-files.ts"],"mappings":";;AAGA,SAAmBA,gBAAgB,QAAgC,yBAAsB;AAgBzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAAC;EACHC,eAAe,GAAG,IAAIC,GAAG,CAAS,CAAC;EACnCC,IAAI,GAAG,IAAID,GAAG,CAAS,CAAC;EAElCE,WAAWA,CAAkBC,MAA6B,EAAE;IAAA,KAA/BA,MAA6B,GAA7BA,MAA6B;EAAG;;EAEpE;EACOC,YAAY,GAAIC,aAA4B,IACjD,IAAI,CAACC,QAAQ,CAACD,aAAa,EAAE,MAAM,KAAK,EAAGE,KAAK,IAC9CA,KAAK,CAACC,OAAO,CAAEC,IAAI,IAAK,IAAI,CAACV,eAAe,CAACW,GAAG,CAACD,IAAI,CAAC,CACxD,CAAC;;EAEH;EACOE,OAAO,GAAIN,aAA4B,IAC5C,IAAI,CAACC,QAAQ,CACXD,aAAa,EACZI,IAAI,IAAK,CAAC,IAAI,CAACV,eAAe,CAACa,GAAG,CAACH,IAAI,CAAC,IAAI,IAAI,CAACI,QAAQ,CAACJ,IAAI,CACjE,CAAC;;EAEH;EACOK,OAAO,GAAIT,aAA4B,IAC5C,IAAI,CAACC,QAAQ,CAACD,aAAa,EAAE,IAAI,CAACQ,QAAQ,CAAC;EAErCA,QAAQ,GAAIJ,IAAY,IAC9B,CAAC,IAAI,CAACR,IAAI,CAACW,GAAG,CAACH,IAAI,CAAC,IACpB,CAAC,IAAI,CAACN,MAAM,CAACY,cAAc,EAAEH,GAAG,CAACH,IAAI,CAAC,KACrC,IAAI,CAACN,MAAM,CAACa,UAAU,GAAGP,IAAI,CAAC,IAAI,IAAI,CAAC;EAElCH,QAAQ,GAAGA,CACjBD,aAA4B,EAC5BW,UAAqC,EACrCC,UAA+C,KAE/C,IAAIpB,gBAAgB,CAAC;IACnB,GAAG,IAAI,CAACM,MAAM;IACda,UAAU;IACVX,aAAa;IACbY,UAAU,EAAGV,KAAK,IAAK;MACrB,IAAI,CAACJ,MAAM,CAACY,cAAc,EAAEG,UAAU,CAACX,KAAK,CAAC;MAC7CU,UAAU,GAAGV,KAAK,CAAC;IACrB,CAAC;IACDY,MAAM,EAAGC,IAAI,IAAK;MAChB,IAAI,CAACnB,IAAI,CAACS,GAAG,CAACU,IAAI,CAACX,IAAI,CAAC;MACxB,IAAI,CAACN,MAAM,CAACgB,MAAM,CAACC,IAAI,EAAE,MAAM,IAAI,CAACjB,MAAM,CAACY,cAAc,EAAEL,GAAG,CAACU,IAAI,CAACX,IAAI,CAAC,CAAC;IAC5E;EACF,CAAC,CAAC;AACN;AAEA,SAASX,eAAe","ignoreList":[]}
|
|
@@ -24,10 +24,10 @@ import { CHECKME_NOTIFY, CHECKME_SERVICE, CHECKME_WRITE } from "../checkme/check
|
|
|
24
24
|
* - **The payload layout.** Every product decodes differently, and a guessed offset yields
|
|
25
25
|
* a plausible wrong reading rather than an error. Declared cases are the caller's.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* A product whose advertisement offers or requires encryption gets the vendor's handshake on
|
|
28
|
+
* the standard protocol first (`withLepuEncryption`); the rest speak it in cleartext, as the
|
|
29
|
+
* BP2 does in production. The oxygen protocol has no handshake, so its declarations refuse an
|
|
30
|
+
* advertisement that requires one (`rejectEncryptionAtBytes`).
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -207,12 +207,18 @@ const lepuDevice = params => {
|
|
|
207
207
|
...(params.pollIntervalMs === undefined ? {} : {
|
|
208
208
|
pollIntervalMs: params.pollIntervalMs
|
|
209
209
|
}),
|
|
210
|
+
...(params.recordingStatus === undefined ? {} : {
|
|
211
|
+
recordingStatus: params.recordingStatus
|
|
212
|
+
}),
|
|
210
213
|
...(params.writeWithoutResponse === undefined ? {} : {
|
|
211
214
|
writeWithoutResponse: params.writeWithoutResponse
|
|
212
215
|
}),
|
|
213
216
|
...(params.setClockBeforeInfo === undefined ? {} : {
|
|
214
217
|
setClockBeforeInfo: params.setClockBeforeInfo
|
|
215
218
|
}),
|
|
219
|
+
...(params.pulseWave === undefined ? {} : {
|
|
220
|
+
pulseWave: params.pulseWave
|
|
221
|
+
}),
|
|
216
222
|
...(params.clockSyncProtocol === undefined ? {} : {
|
|
217
223
|
clockSyncProtocol: params.clockSyncProtocol
|
|
218
224
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PREFERRED_MTU","defineCustomDevice","CHECKME_NOTIFY","CHECKME_SERVICE","CHECKME_WRITE","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","monitor","each","uuid","frame","minLengthBytes","caseSelectorBytes","undefined","cases","services","v2","id","nameMatch","matchByService","stuckDataTimeoutMs","clockSync","sessionPolicy","lepu","startBytes","manufacturerDataProtocol","requestStartByte","rejectEncryptionAtBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","pollIntervalMs","writeWithoutResponse","setClockBeforeInfo","clockSyncProtocol","map","service","decorateReading","createFrameHandler"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;AAAA;;AAEA,SAASA,aAAa,QAAQ,qCAAkC;
|
|
1
|
+
{"version":3,"names":["PREFERRED_MTU","defineCustomDevice","CHECKME_NOTIFY","CHECKME_SERVICE","CHECKME_WRITE","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","monitor","each","uuid","frame","minLengthBytes","caseSelectorBytes","undefined","cases","services","v2","id","nameMatch","matchByService","stuckDataTimeoutMs","clockSync","sessionPolicy","lepu","startBytes","manufacturerDataProtocol","requestStartByte","rejectEncryptionAtBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","pollIntervalMs","recordingStatus","writeWithoutResponse","setClockBeforeInfo","pulseWave","clockSyncProtocol","map","service","decorateReading","createFrameHandler"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;AAAA;;AAEA,SAASA,aAAa,QAAQ,qCAAkC;AAUhE,SAASC,kBAAkB,QAAQ,sCAAmC;AACtE,SACEC,cAAc,EACdC,eAAe,EACfC,aAAa,QACR,gCAA6B;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGF,eAAe;AACxC,MAAMG,cAAc,GAAGF,aAAa;AACpC,MAAMG,eAAe,GAAGL,cAAc;;AAEtC;AACA,MAAMM,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AACxD,MAAMC,UAAU,GAAG,sCAAsC;;AAEzD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AG,CAAEC,OAAO,KAAM;MACnC,GAAGA,OAAO;MACVlC,OAAO,EAAEkC,OAAO,CAAClC,OAAO,CAACiC,GAAG,CAAEhC,IAAI,KAAM;QACtC,GAAGA,IAAI;QACPI,iBAAiB,EAAEJ,IAAI,CAACI,iBAAiB,IAAI,CAACX,YAAY;MAC5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD;IACE,IAAIE,MAAM,CAACuC,eAAe,KAAK7B,SAAS,GACpC,CAAC,CAAC,GACF;MAAE6B,eAAe,EAAEvC,MAAM,CAACuC;IAAgB,CAAC,CAAC;IAChD,IAAIvC,MAAM,CAACwC,kBAAkB,KAAK9B,SAAS,GACvC,CAAC,CAAC,GACF;MAAE8B,kBAAkB,EAAExC,MAAM,CAACwC;IAAmB,CAAC;EACvD,CACF,CAAC;AACH,CAAC;AAED,SAASzC,UAAU,EAAEX,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { i16FromHex } from "../../../utils/i-16-from-hex.js";
|
|
4
|
+
import { le16FromHex } from "../../../utils/le-16-from-hex.js";
|
|
5
|
+
const SAMPLE_BYTES = 2;
|
|
6
|
+
const COUNT_BYTES = 2;
|
|
7
|
+
const CHECKSUM_BYTES = 1;
|
|
8
|
+
|
|
9
|
+
/** The raw sample counts a poll answer carries, never more than the frame holds. */
|
|
10
|
+
const waveformSamples = (pollAnswer, waveform) => {
|
|
11
|
+
const first = waveform.countByteIndex + COUNT_BYTES;
|
|
12
|
+
const declared = le16FromHex(pollAnswer, waveform.countByteIndex);
|
|
13
|
+
const available = Math.floor((pollAnswer.length - CHECKSUM_BYTES - first) / SAMPLE_BYTES);
|
|
14
|
+
return Array.from({
|
|
15
|
+
length: Math.max(0, Math.min(declared, available))
|
|
16
|
+
}, (_, index) => i16FromHex(pollAnswer, first + index * SAMPLE_BYTES));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** One count in millivolts; the no-signal marker reads as 0. */
|
|
20
|
+
const millivoltsOf = (count, waveform) => count === waveform.noSignalCount ? 0 : count * waveform.millivoltsPerCount;
|
|
21
|
+
export { millivoltsOf, waveformSamples };
|
|
22
|
+
//# sourceMappingURL=lepu.waveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["i16FromHex","le16FromHex","SAMPLE_BYTES","COUNT_BYTES","CHECKSUM_BYTES","waveformSamples","pollAnswer","waveform","first","countByteIndex","declared","available","Math","floor","length","Array","from","max","min","_","index","millivoltsOf","count","noSignalCount","millivoltsPerCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.waveform.ts"],"mappings":";;AACA,SAASA,UAAU,QAAQ,iCAA8B;AACzD,SAASC,WAAW,QAAQ,kCAA+B;AAI3D,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,cAAc,GAAG,CAAC;;AAExB;AACA,MAAMC,eAAe,GAAGA,CAACC,UAA6B,EAAEC,QAAkB,KAAe;EACvF,MAAMC,KAAK,GAAGD,QAAQ,CAACE,cAAc,GAAGN,WAAW;EACnD,MAAMO,QAAQ,GAAGT,WAAW,CAACK,UAAU,EAAEC,QAAQ,CAACE,cAAc,CAAC;EACjE,MAAME,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAC,CAACP,UAAU,CAACQ,MAAM,GAAGV,cAAc,GAAGI,KAAK,IAAIN,YAAY,CAAC;EAEzF,OAAOa,KAAK,CAACC,IAAI,CAAC;IAAEF,MAAM,EAAEF,IAAI,CAACK,GAAG,CAAC,CAAC,EAAEL,IAAI,CAACM,GAAG,CAACR,QAAQ,EAAEC,SAAS,CAAC;EAAE,CAAC,EAAE,CAACQ,CAAC,EAAEC,KAAK,KACjFpB,UAAU,CAACM,UAAU,EAAEE,KAAK,GAAGY,KAAK,GAAGlB,YAAY,CAAC,CAAC;AACzD,CAAC;;AAED;AACA,MAAMmB,YAAY,GAAGA,CAACC,KAAa,EAAEf,QAAkB,KACrDe,KAAK,KAAKf,QAAQ,CAACgB,aAAa,GAAG,CAAC,GAAGD,KAAK,GAAGf,QAAQ,CAACiB,kBAAkB;AAE5E,SAASH,YAAY,EAAEhB,eAAe","ignoreList":[]}
|
|
@@ -66,7 +66,6 @@ const viatomBpMonitor = (advertisedName, params) => {
|
|
|
66
66
|
clockSync: "supported",
|
|
67
67
|
clockSyncProtocol: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
|
|
68
68
|
fileTransfer: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
|
|
69
|
-
rejectEncryptionAtBytes: [4],
|
|
70
69
|
pollCommand: RT_DATA,
|
|
71
70
|
pollIntervalMs: 200,
|
|
72
71
|
minLengthBytes: MIN_LENGTH_BYTES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["le32FromHex","defineCustomDevice","recordedAtFromLocalSeconds","lepuNameMatch","lepuDevice","createTmbBloodPressureFrameHandler","createViatomFrameHandler","BP2_CASES","BP2_ECG_CASES","BP3_CASES","BP3_ECG_CASES","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","id","toLowerCase","replace","nameMatch","clockSync","clockSyncProtocol","fileTransfer","
|
|
1
|
+
{"version":3,"names":["le32FromHex","defineCustomDevice","recordedAtFromLocalSeconds","lepuNameMatch","lepuDevice","createTmbBloodPressureFrameHandler","createViatomFrameHandler","BP2_CASES","BP2_ECG_CASES","BP3_CASES","BP3_ECG_CASES","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","id","toLowerCase","replace","nameMatch","clockSync","clockSyncProtocol","fileTransfer","pollCommand","pollIntervalMs","minLengthBytes","caseSelectorBytes","cases","map","each","decorateReading","createFrameHandler","expectedDeviceTypes","bp2aMonitor","bp2tMonitor","bp2wMonitor","bp2vMonitor","lpBp2wMonitor","TMB_SERVICE","TMB_WRITE","TMB_ACK","TMB_NOTIFY","TMB_INDICATE","tmbBpMonitor","stuckDataTimeoutMs","preferredMtu","tmb","serviceUuid","writeUuid","ackUuid","services","uuid","monitor","selector","kind","TMB_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;AAAA;;AAMA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,kBAAkB,QAAQ,sCAAmC;AACtE,SAASC,0BAA0B,QAAQ,qBAAkB;AAC7D,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;AACpD,SAASC,kCAAkC,QAAQ,0BAAuB;AAE1E,SAASC,wBAAwB,QAAQ,4BAAyB;AAClE,SACEC,SAAS,EACTC,aAAa,EACbC,SAAS,EACTC,aAAa,QACR,8BAA2B;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,iBAAiB,GAAG,EAAE;AAE5B,MAAMC,kBAA0C,GAAGA,CAACC,OAAO,EAAEC,KAAK,KAAK;EACrE,MAAMC,UAAU,GAAGC,MAAM,CAACC,QAAQ,CAACH,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MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,CACR;;AAED;AACA,MAAM0C,eAAkC,GAAG,CACzC,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,CACX;AAED,SACEtB,WAAW,EACXG,WAAW,EACXF,WAAW,EACXC,WAAW,EACXtB,eAAe,EACfwB,aAAa,EACbkB,eAAe,EACfZ,YAAY,EACZlC,eAAe","ignoreList":[]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
-
|
|
5
3
|
/** ECG sample rate in hertz. */
|
|
6
4
|
const VIATOM_ECG_SAMPLE_RATE_HZ = 125;
|
|
7
5
|
|
|
@@ -23,28 +21,84 @@ const recordedAtFromViatomFileName = name => {
|
|
|
23
21
|
}
|
|
24
22
|
return validDate(2000 + Number(digits.slice(0, 2)), Number(digits.slice(2, 4)), Number(digits.slice(4, 6)), Number(digits.slice(6, 8)), Number(digits.slice(8, 10)), Number(digits.slice(10, 12)));
|
|
25
23
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
|
|
25
|
+
/** The file version and reserved bytes that precede the waveform. */
|
|
26
|
+
const FILE_HEAD_BYTES = 10;
|
|
27
|
+
|
|
28
|
+
/** The bytes after the waveform, opened by the recording time in seconds. */
|
|
29
|
+
const FILE_TAIL_BYTES = 20;
|
|
30
|
+
|
|
31
|
+
/** The count Viatom stores where the recorder had no signal. */
|
|
32
|
+
const NO_SIGNAL_COUNT = 0x7fff;
|
|
33
|
+
|
|
34
|
+
/** A large step's extra byte counts on from the largest one-byte step. */
|
|
35
|
+
const LARGE_STEP_BASE = 127;
|
|
36
|
+
|
|
37
|
+
/** How far the decoded length may stray from the recorded time before a file is refused. */
|
|
38
|
+
const RECORDED_TIME_TOLERANCE_SECONDS = 1;
|
|
39
|
+
|
|
40
|
+
/** A decoded ER1/ER2 recording. */
|
|
41
|
+
|
|
42
|
+
const emptyRecording = () => ({
|
|
43
|
+
samples: [],
|
|
44
|
+
duration: 0
|
|
45
|
+
});
|
|
46
|
+
const toInt8 = byte => byte << 24 >> 24;
|
|
47
|
+
const toInt16 = value => value << 16 >> 16;
|
|
48
|
+
const ONE_BYTE_STEP = {
|
|
49
|
+
width: 1,
|
|
50
|
+
next: (current, bytes, at) => current + toInt8(bytes[at] ?? 0)
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** Marker bytes that escape the one-byte step. */
|
|
54
|
+
const ESCAPED_STEPS = new Map([[0x80, {
|
|
55
|
+
width: 3,
|
|
56
|
+
next: (_current, bytes, at) => (bytes[at + 1] ?? 0) | (bytes[at + 2] ?? 0) << 8
|
|
57
|
+
}], [0x7f, {
|
|
58
|
+
width: 2,
|
|
59
|
+
next: (current, bytes, at) => current + (bytes[at + 1] ?? 0) + LARGE_STEP_BASE
|
|
60
|
+
}], [0x81, {
|
|
61
|
+
width: 2,
|
|
62
|
+
next: (current, bytes, at) => current - (bytes[at + 1] ?? 0) - LARGE_STEP_BASE
|
|
63
|
+
}]]);
|
|
64
|
+
|
|
65
|
+
/** Expands Viatom's delta-compressed waveform into signed counts. */
|
|
66
|
+
const decompressWaveform = bytes => {
|
|
67
|
+
const counts = [];
|
|
68
|
+
let current = 0;
|
|
69
|
+
let at = 0;
|
|
70
|
+
while (at < bytes.length) {
|
|
71
|
+
const step = ESCAPED_STEPS.get(bytes[at] ?? 0) ?? ONE_BYTE_STEP;
|
|
72
|
+
if (at + step.width > bytes.length) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
current = toInt16(step.next(current, bytes, at));
|
|
76
|
+
counts.push(current);
|
|
77
|
+
at += step.width;
|
|
78
|
+
}
|
|
79
|
+
return counts;
|
|
80
|
+
};
|
|
81
|
+
const readUInt32LittleEndian = (bytes, from) => ((bytes[from] ?? 0) | (bytes[from + 1] ?? 0) << 8 | (bytes[from + 2] ?? 0) << 16 | (bytes[from + 3] ?? 0) << 24) >>> 0;
|
|
82
|
+
const matchesRecordedTime = (sampleCount, seconds) => seconds > 0 && Math.abs(sampleCount - seconds * VIATOM_ECG_SAMPLE_RATE_HZ) <= RECORDED_TIME_TOLERANCE_SECONDS * VIATOM_ECG_SAMPLE_RATE_HZ;
|
|
83
|
+
const toMillivolts = count => count === NO_SIGNAL_COUNT ? 0 : count * VIATOM_ECG_MILLIVOLTS_PER_COUNT;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Decodes an ER1/ER2 recording. A file whose waveform does not last as long as its tail
|
|
87
|
+
* records is returned empty, because that file is in a format this decoder does not read.
|
|
88
|
+
*/
|
|
89
|
+
const decodeViatomEcgRecording = bytes => {
|
|
90
|
+
if (bytes.length <= FILE_HEAD_BYTES + FILE_TAIL_BYTES) {
|
|
91
|
+
return emptyRecording();
|
|
35
92
|
}
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const signed = raw & 0x8000 ? raw - 0x10000 : raw;
|
|
42
|
-
samples.push(raw === 0x7fff ? 0 : signed * VIATOM_ECG_MILLIVOLTS_PER_COUNT);
|
|
93
|
+
const tailStart = bytes.length - FILE_TAIL_BYTES;
|
|
94
|
+
const duration = readUInt32LittleEndian(bytes, tailStart);
|
|
95
|
+
const counts = decompressWaveform(bytes.subarray(FILE_HEAD_BYTES, tailStart));
|
|
96
|
+
if (!matchesRecordedTime(counts.length, duration)) {
|
|
97
|
+
return emptyRecording();
|
|
43
98
|
}
|
|
44
|
-
const recordedSeconds = readUInt32LittleEndian(content, content.length - 20);
|
|
45
99
|
return {
|
|
46
|
-
samples,
|
|
47
|
-
duration
|
|
100
|
+
samples: counts.map(toMillivolts),
|
|
101
|
+
duration
|
|
48
102
|
};
|
|
49
103
|
};
|
|
50
104
|
export { decodeViatomEcgRecording, recordedAtFromViatomFileName, VIATOM_ECG_MILLIVOLTS_PER_COUNT, VIATOM_ECG_SAMPLE_RATE_HZ };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["VIATOM_ECG_SAMPLE_RATE_HZ","VIATOM_ECG_MILLIVOLTS_PER_COUNT","validDate","year","month","day","hour","minute","second","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","undefined","recordedAtFromViatomFileName","name","digits","match","length","Number","slice","FILE_HEAD_BYTES","FILE_TAIL_BYTES","NO_SIGNAL_COUNT","LARGE_STEP_BASE","RECORDED_TIME_TOLERANCE_SECONDS","emptyRecording","samples","duration","toInt8","byte","toInt16","value","ONE_BYTE_STEP","width","next","current","bytes","at","ESCAPED_STEPS","Map","_current","decompressWaveform","counts","step","get","push","readUInt32LittleEndian","from","matchesRecordedTime","sampleCount","seconds","Math","abs","toMillivolts","count","decodeViatomEcgRecording","tailStart","subarray","map"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;AAAA;AACA,MAAMA,yBAAyB,GAAG,GAAG;;AAErC;AACA,MAAMC,+BAA+B,GAAG,QAAQ;AAEhD,MAAMC,SAAS,GAAGA,CAChBC,IAAY,EACZC,KAAa,EACbC,GAAW,EACXC,IAAY,EACZC,MAAc,EACdC,MAAc,KACO;EACrB,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACP,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAEC,GAAG,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAE,CAAC,CAAC;EAEpE,OAAOC,IAAI,CAACE,WAAW,CAAC,CAAC,KAAKR,IAAI,IAChCM,IAAI,CAACG,QAAQ,CAAC,CAAC,KAAKR,KAAK,GAAG,CAAC,IAC7BK,IAAI,CAACI,OAAO,CAAC,C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,CAAC,KAAK,EAAG,MAChC,CAAC;AAEH,MAAMC,mBAAmB,GAAGA,CAACC,WAAmB,EAAEC,OAAe,KAC/DA,OAAO,GAAG,CAAC,IACXC,IAAI,CAACC,GAAG,CAACH,WAAW,GAAGC,OAAO,GAAGvD,yBAAyB,CAAC,IACzD6B,+BAA+B,GAAG7B,yBAAyB;AAE/D,MAAM0D,YAAY,GAAIC,KAAa,IACjCA,KAAK,KAAKhC,eAAe,GAAG,CAAC,GAAGgC,KAAK,GAAG1D,+BAA+B;;AAEzE;AACA;AACA;AACA;AACA,MAAM2D,wBAAwB,GAAInB,KAAiB,IAAyB;EAC1E,IAAIA,KAAK,CAACnB,MAAM,IAAIG,eAAe,GAAGC,eAAe,EAAE;IACrD,OAAOI,cAAc,CAAC,CAAC;EACzB;EAEA,MAAM+B,SAAS,GAAGpB,KAAK,CAACnB,MAAM,GAAGI,eAAe;EAChD,MAAMM,QAAQ,GAAGmB,sBAAsB,CAACV,KAAK,EAAEoB,SAAS,CAAC;EACzD,MAAMd,MAAM,GAAGD,kBAAkB,CAACL,KAAK,CAACqB,QAAQ,CAACrC,eAAe,EAAEoC,SAAS,CAAC,CAAC;EAE7E,IAAI,CAACR,mBAAmB,CAACN,MAAM,CAACzB,MAAM,EAAEU,QAAQ,CAAC,EAAE;IACjD,OAAOF,cAAc,CAAC,CAAC;EACzB;EAEA,OAAO;IAAEC,OAAO,EAAEgB,MAAM,CAACgB,GAAG,CAACL,YAAY,CAAC;IAAE1B;EAAS,CAAC;AACxD,CAAC;AAID,SACE4B,wBAAwB,EACxB1C,4BAA4B,EAC5BjB,+BAA+B,EAC/BD,yBAAyB","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { MeasurementTypeKey } from "@ovok/core/next";
|
|
4
4
|
import { lepuNameMatch } from "../lepu/lepu.name-match.js";
|
|
5
5
|
import { lepuDevice } from "../lepu/lepu.transports.js";
|
|
6
|
+
import { RECORDING_STATE, RUN_STATUS_BYTE, viatomRecordingStatus } from "./viatom.ecg-recording-status.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* The Viatom ECG recorders - ER1, ER2 and ER3.
|
|
@@ -38,16 +39,18 @@ const RT_DATA = 0x03;
|
|
|
38
39
|
/** The ER3 answers its realtime data on a different opcode from the rest of the range. */
|
|
39
40
|
const ER3_RT_DATA = 0x06;
|
|
40
41
|
const HEART_RATE_UNIT = "bpm";
|
|
42
|
+
|
|
43
|
+
/** The vendor's own client polls realtime at this pace. */
|
|
44
|
+
const POLL_INTERVAL_MS = 500;
|
|
41
45
|
/** ER1, ER2 and ER3 share one parameter block: the heart rate opens it. */
|
|
42
46
|
const ER_HEART_RATE_BYTES = [7, 8];
|
|
43
47
|
/**
|
|
44
|
-
* Declares one recorder, reporting the heart rate from its realtime frame.
|
|
48
|
+
* Declares one recorder, reporting the heart rate from its realtime frame while it records.
|
|
45
49
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* status byte, which a declaration cannot select on, so a recorder left connected and unworn
|
|
49
|
-
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
50
|
+
* Every other run status - idle, preparing, saving, lead off - leaves the device connected
|
|
51
|
+
* rather than measuring, so an unworn recorder is never shown as taking a reading.
|
|
50
52
|
*/
|
|
53
|
+
const byteHex = value => value.toString(16).padStart(2, "0");
|
|
51
54
|
const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
52
55
|
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
53
56
|
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
@@ -58,10 +61,12 @@ const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
|
58
61
|
emit: "none"
|
|
59
62
|
},
|
|
60
63
|
pollCommand: profile.pollCommand,
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
pollIntervalMs: POLL_INTERVAL_MS,
|
|
65
|
+
recordingStatus: viatomRecordingStatus(advertisedName),
|
|
66
|
+
minLengthBytes: RUN_STATUS_BYTE + 1,
|
|
67
|
+
caseSelectorBytes: [1, RUN_STATUS_BYTE],
|
|
63
68
|
cases: [{
|
|
64
|
-
selector: profile.pollCommand
|
|
69
|
+
selector: `${byteHex(profile.pollCommand)}?${RECORDING_STATE}`,
|
|
65
70
|
kind: "result",
|
|
66
71
|
measurementTypeKey: MeasurementTypeKey.heartRate,
|
|
67
72
|
description: "Realtime parameters and waveform",
|
|
@@ -72,6 +77,10 @@ const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
|
72
77
|
encoding: "uint",
|
|
73
78
|
unit: HEART_RATE_UNIT
|
|
74
79
|
}]
|
|
80
|
+
}, {
|
|
81
|
+
selector: `${byteHex(profile.pollCommand)}??`,
|
|
82
|
+
kind: "idle",
|
|
83
|
+
description: "Realtime frame while not recording"
|
|
75
84
|
}],
|
|
76
85
|
...(params.expectedDeviceTypes ? {
|
|
77
86
|
expectedDeviceTypes: params.expectedDeviceTypes
|
|
@@ -79,8 +88,8 @@ const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
|
79
88
|
...(profile.fileTransfer === undefined ? {} : {
|
|
80
89
|
fileTransfer: profile.fileTransfer
|
|
81
90
|
}),
|
|
82
|
-
...(
|
|
83
|
-
ecgFileDecoder: "
|
|
91
|
+
...(DECODED_ECG_MODEL_NAMES.has(advertisedName) ? {
|
|
92
|
+
ecgFileDecoder: "viatom-compressed"
|
|
84
93
|
} : {})
|
|
85
94
|
});
|
|
86
95
|
|
|
@@ -119,8 +128,8 @@ const ER1_MODEL_NAMES = ["ER1", "ER1-H", "ER1-L", "ER1-S", "ER1-SP", "ER1-W", "E
|
|
|
119
128
|
/** The names the ER2 recorders advertise, all of them on the small-MTU link. */
|
|
120
129
|
const ER2_MODEL_NAMES = ["ER2", "ER2-S", "HHM2", "HHM3", "LP ER2", "DuoEK", "CMTouch", "EM-B", "EM-W"];
|
|
121
130
|
|
|
122
|
-
/**
|
|
123
|
-
const
|
|
131
|
+
/** The recorders whose stored recordings are decoded; the rest report live heart rate. */
|
|
132
|
+
const DECODED_ECG_MODEL_NAMES = new Set(["ER1-L", "ER1-S", "ER1-W"]);
|
|
124
133
|
|
|
125
134
|
/** The ER3 family is identified separately from the ER1/ER2 opcode family. */
|
|
126
135
|
const ER3_MODEL_NAMES = ["ER3", "M5", "M12"];
|
package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","ER_HEART_RATE_BYTES","declareRecorder","advertisedName","profile","params","id","toLowerCase","replace","nameMatch","transport","clockSync","sessionPolicy","minSamples","emit","pollCommand","
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RECORDING_STATE","RUN_STATUS_BYTE","viatomRecordingStatus","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","POLL_INTERVAL_MS","ER_HEART_RATE_BYTES","byteHex","value","toString","padStart","declareRecorder","advertisedName","profile","params","id","toLowerCase","replace","nameMatch","transport","clockSync","sessionPolicy","minSamples","emit","pollCommand","pollIntervalMs","recordingStatus","minLengthBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","heartRate","description","fields","name","byteIndexes","heartRateBytes","byteOrder","encoding","unit","expectedDeviceTypes","fileTransfer","undefined","DECODED_ECG_MODEL_NAMES","has","ecgFileDecoder","er1Recorder","er2Recorder","er3Recorder","ER1_MODEL_NAMES","ER2_MODEL_NAMES","Set","ER3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAGpD,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAA2B,4BAAyB;AAEvE,SACEC,eAAe,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uB,KAEvBH,eAAe,CACbC,cAAc,EACd;EACEY,WAAW,EAAEtB,OAAO;EACpBoC,cAAc,EAAEhC,mBAAmB;EACnCa,SAAS,EAAE,kBAAkB;EAC7BwB,YAAY,EAAE;AAChB,CAAC,EACD7B,MACF,CAAC;;AAEH;AACA,MAAMoC,WAAW,GAAGA,CAClBtC,cAAsB,EACtBE,MAAuB,KAEvBH,eAAe,CACbC,cAAc,EACd;EACEY,WAAW,EAAErB,WAAW;EACxBmC,cAAc,EAAEhC,mBAAmB;EACnCa,SAAS,EAAE,UAAU;EACrBwB,YAAY,EAAE;AAChB,CAAC,EACD7B,MACF,CAAC;;AAEH;AACA,MAAMqC,eAAkC,GAAG,CACzC,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,WAAW,CACZ;;AAED;AACA,MAAMC,eAAkC,GAAG,CACzC,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAM,EACN,MAAM,CACP;;AAED;AACA,MAAMP,uBAAuB,GAAG,IAAIQ,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;;AAEpE;AACA,MAAMC,eAAkC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;AAE/D,SACEN,WAAW,EACXG,eAAe,EACfF,WAAW,EACXG,eAAe,EACfE,eAAe,EACfJ,WAAW","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { VIATOM_ECG_MILLIVOLTS_PER_COUNT } from "./viatom.ecg-files.js";
|
|
4
|
+
|
|
5
|
+
/** The run status, with the current state in its low nibble. */
|
|
6
|
+
const RUN_STATUS_BYTE = 15;
|
|
7
|
+
const RECORDING_STATE = 2;
|
|
8
|
+
const LEAD_OFF_STATE = 7;
|
|
9
|
+
const SAVED_STATE = 4;
|
|
10
|
+
|
|
11
|
+
/** The seconds recorded so far, u32 little-endian, right before the run status. */
|
|
12
|
+
const RECORD_SECONDS_BYTE = 11;
|
|
13
|
+
|
|
14
|
+
/** After the 18-byte parameter block: the sample count, then int16 samples. */
|
|
15
|
+
const WAVEFORM_COUNT_BYTE = 25;
|
|
16
|
+
const SAMPLES_PER_SECOND = 125;
|
|
17
|
+
const NO_SIGNAL_COUNT = 0x7fff;
|
|
18
|
+
|
|
19
|
+
/** Ends a recording and stores it when it is long enough. */
|
|
20
|
+
const STOP_MEASUREMENT = 0x05;
|
|
21
|
+
|
|
22
|
+
/** The holter patches keep only recordings of 5 minutes or more; the rest keep 30 s or more. */
|
|
23
|
+
const HOLTER_MODEL_NAMES = new Set(["ER1-W", "ER1-L", "Cardio AI"]);
|
|
24
|
+
const HOLTER_MINIMUM_STORED_SECONDS = 300;
|
|
25
|
+
const MINIMUM_STORED_SECONDS = 30;
|
|
26
|
+
|
|
27
|
+
/** How an ER recorder reports its open recording in the realtime answer. */
|
|
28
|
+
const viatomRecordingStatus = advertisedName => ({
|
|
29
|
+
byteIndex: RUN_STATUS_BYTE,
|
|
30
|
+
secondsByteIndex: RECORD_SECONDS_BYTE,
|
|
31
|
+
recordingState: RECORDING_STATE,
|
|
32
|
+
leadOffState: LEAD_OFF_STATE,
|
|
33
|
+
savedState: SAVED_STATE,
|
|
34
|
+
minimumStoredSeconds: HOLTER_MODEL_NAMES.has(advertisedName) ? HOLTER_MINIMUM_STORED_SECONDS : MINIMUM_STORED_SECONDS,
|
|
35
|
+
stopCommand: STOP_MEASUREMENT,
|
|
36
|
+
waveform: {
|
|
37
|
+
countByteIndex: WAVEFORM_COUNT_BYTE,
|
|
38
|
+
sampleRateHz: SAMPLES_PER_SECOND,
|
|
39
|
+
millivoltsPerCount: VIATOM_ECG_MILLIVOLTS_PER_COUNT,
|
|
40
|
+
noSignalCount: NO_SIGNAL_COUNT
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export { RECORDING_STATE, RUN_STATUS_BYTE, viatomRecordingStatus };
|
|
44
|
+
//# sourceMappingURL=viatom.ecg-recording-status.js.map
|
package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VIATOM_ECG_MILLIVOLTS_PER_COUNT","RUN_STATUS_BYTE","RECORDING_STATE","LEAD_OFF_STATE","SAVED_STATE","RECORD_SECONDS_BYTE","WAVEFORM_COUNT_BYTE","SAMPLES_PER_SECOND","NO_SIGNAL_COUNT","STOP_MEASUREMENT","HOLTER_MODEL_NAMES","Set","HOLTER_MINIMUM_STORED_SECONDS","MINIMUM_STORED_SECONDS","viatomRecordingStatus","advertisedName","byteIndex","secondsByteIndex","recordingState","leadOffState","savedState","minimumStoredSeconds","has","stopCommand","waveform","countByteIndex","sampleRateHz","millivoltsPerCount","noSignalCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.ts"],"mappings":";;AAEA,SAASA,+BAA+B,QAAQ,uBAAoB;;AAEpE;AACA,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,eAAe,GAAG,CAAC;AACzB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,WAAW,GAAG,CAAC;;AAErB;AACA,MAAMC,mBAAmB,GAAG,EAAE;;AAE9B;AACA,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,kBAAkB,GAAG,GAAG;AAC9B,MAAMC,eAAe,GAAG,MAAM;;AAE9B;AACA,MAAMC,gBAAgB,GAAG,IAAI;;AAE7B;AACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AACnE,MAAMC,6BAA6B,GAAG,GAAG;AACzC,MAAMC,sBAAsB,GAAG,EAAE;;AAEjC;AACA,MAAMC,qBAAqB,GACzBC,cAAsB,KAC8B;EACpDC,SAAS,EAAEf,eAAe;EAC1BgB,gBAAgB,EAAEZ,mBAAmB;EACrCa,cAAc,EAAEhB,eAAe;EAC/BiB,YAAY,EAAEhB,cAAc;EAC5BiB,UAAU,EAAEhB,WAAW;EACvBiB,oBAAoB,EAAEX,kBAAkB,CAACY,GAAG,CAACP,cAAc,CAAC,GACxDH,6BAA6B,GAC7BC,sBAAsB;EAC1BU,WAAW,EAAEd,gBAAgB;EAC7Be,QAAQ,EAAE;IACRC,cAAc,EAAEnB,mBAAmB;IACnCoB,YAAY,EAAEnB,kBAAkB;IAChCoB,kBAAkB,EAAE3B,+BAA+B;IACnD4B,aAAa,EAAEpB;EACjB;AACF,CAAC,CAAC;AAEF,SAASN,eAAe,EAAED,eAAe,EAAEa,qBAAqB","ignoreList":[]}
|