@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_measurementFeedback","_caseType","_frameReadStatus","_frameParser","_measurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","FrameParser","measurementState","MeasurementStateMachine","onStatusChanged","onStreamStart","onMeasurementEnd","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","commandTimeout","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","armStuckTimeout","armCommandTimeout","startCommandTimeout","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","FrameReadStatus","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","validatePackage","progress","commandProgress","commands","nextCommand","sendCommands","data","parse","sentryLogger","frameLength","dependentData","parsingCase","caseType","CaseType","DEPENDENT","handleDependentResult","isMeasuring","measuring","advance","onError","Error","MeasurementFeedbackKey","CORRUPT_FRAME","cause","message","setTimeout","STUCK","cancelConnection","duration","commandTimeoutMs","onCommandTimeout","terminal","COMMAND_TIMEOUT","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,gBAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AAjBA;;AA2DO,MAAMM,eAAe,CAAwB;EAClD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,OAAO,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAK7CC,WAAWA,CACQC,MAAc,EAC/BC,YAA2C,EAC1BC,wBAAgC,EAChCC,SAAoC,EACpCC,WAAyB,EAC1C;IAAA,KALiBJ,MAAc,GAAdA,MAAc;IAAA,KAEdE,wBAAgC,GAAhCA,wBAAgC;IAAA,KAChCC,SAAoC,GAApCA,SAAoC;IAAA,KACpCC,WAAyB,GAAzBA,WAAyB;IAE1C,IAAI,CAACC,WAAW,GAAG,IAAIC,wBAAW,CAACL,YAAY,CAAC;IAChD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,OAAO,CAACgC,GAAG,CAAC,IAAI,CAAChB,WAAW,EAAE,EAAE,CAAC;IACtC,IAAI,CAACmC,WAAW,CAACtB,MAAM,EAAEJ,IAAI,CAAC;EAChC,CAAC;;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACU0B,WAAW,GAAGA,CAACD,KAAwB,EAAEzB,IAAY,KAAK;IAChE,MAAM8B,QAAQ,GAAG,IAAI,CAACjD,SAAS,CAACkD,eAAe,GAAGN,KAAK,CAAC,IAAI,UAAU;IACtE,MAAMO,QAAQ,GAAG,IAAI,CAACnD,SAAS,CAACoD,WAAW,GAAGR,KAAK,EAAEzB,IAAI,CAAC;IAE1D,IAAI8B,QAAQ,KAAK,UAAU,EAAE;MAC3BnC,YAAY,CAAC,IAAI,CAACG,cAAc,CAAC;MACjC,IAAI,CAACA,cAAc,GAAGD,SAAS;IACjC,CAAC,MAAM,IAAIiC,QAAQ,KAAK,SAAS,EAAE;MACjC,IAAI,CAACjB,mBAAmB,CAAC,CAAC;IAC5B;IAEA,IAAImB,QAAQ,IAAIA,QAAQ,CAACjB,MAAM,GAAG,CAAC,EAAE;MACnC,IAAI,CAAClC,SAAS,CAACqD,YAAY,GAAGF,QAAQ,CAAC;MACvC,IAAI,CAACnB,mBAAmB,CAAC,CAAC;IAC5B;EACF,CAAC;EAEOW,WAAW,GAAGA,CAACxB,IAAY,EAAEyB,KAAe,KAAK;IACvD,MAAMU,IAAI,GAAG,IAAI,CAACpD,WAAW,CAACqD,KAAK,CAACpC,IAAI,EAAEyB,KAAK,CAAC;IAEhD,IAAI,CAACU,IAAI,EAAE;MACT,IAAAE,0BAAY,EAAC,
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_measurementFeedback","_caseType","_frameReadStatus","_frameParser","_measurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","FrameParser","measurementState","MeasurementStateMachine","onStatusChanged","onStreamStart","onMeasurementEnd","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","commandTimeout","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","armStuckTimeout","armCommandTimeout","startCommandTimeout","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","FrameReadStatus","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","validatePackage","progress","commandProgress","commands","nextCommand","sendCommands","data","parse","sentryLogger","frameLength","dependentData","parsingCase","caseType","CaseType","DEPENDENT","handleDependentResult","isMeasuring","measuring","advance","onError","Error","MeasurementFeedbackKey","CORRUPT_FRAME","cause","message","setTimeout","STUCK","cancelConnection","duration","commandTimeoutMs","onCommandTimeout","terminal","COMMAND_TIMEOUT","reason","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,gBAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AAjBA;;AA2DO,MAAMM,eAAe,CAAwB;EAClD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,OAAO,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAK7CC,WAAWA,CACQC,MAAc,EAC/BC,YAA2C,EAC1BC,wBAAgC,EAChCC,SAAoC,EACpCC,WAAyB,EAC1C;IAAA,KALiBJ,MAAc,GAAdA,MAAc;IAAA,KAEdE,wBAAgC,GAAhCA,wBAAgC;IAAA,KAChCC,SAAoC,GAApCA,SAAoC;IAAA,KACpCC,WAAyB,GAAzBA,WAAyB;IAE1C,IAAI,CAACC,WAAW,GAAG,IAAIC,wBAAW,CAACL,YAAY,CAAC;IAChD,IAAI,CAACM,gBAAgB,GAAG,IAAIC,gDAAuB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Ac,GAAGD,SAAS;MAE/B,MAAMmB,MAAM,GAAG,IAAI,CAACnC,SAAS,CAAC8E,gBAAgB,GAAG,CAAC;MAElD,IAAI3C,MAAM,EAAEgB,QAAQ,IAAIhB,MAAM,CAACgB,QAAQ,CAACjB,MAAM,GAAG,CAAC,EAAE;QAClD,IAAI,CAAClC,SAAS,CAACqD,YAAY,GAAGlB,MAAM,CAACgB,QAAQ,CAAC;QAC9C,IAAI,CAACnB,mBAAmB,CAAC,CAAC;QAE1B;MACF;MAEA,IAAIG,MAAM,EAAE4C,QAAQ,EAAE;QACpB,IAAI,CAAC/E,SAAS,CAACmE,OAAO,GACpB,IAAIC,KAAK,CAACC,2CAAsB,CAACW,eAAe,CAClD,CAAC;QACD,IAAI,CAACL,gBAAgB,CAACN,2CAAsB,CAACW,eAAe,CAAC;MAC/D;IACF,CAAC,EAAEJ,QAAQ,CAAC;EACd,CAAC;;EAED;EACQD,gBAAgB,GAAIM,MAA8B,IAAK;IAC7D,IAAAzB,0BAAY,EAAC,SAAS,EAAE,uCAAuC,EAAE;MAAEyB;IAAO,CAAC,CAAC;IAC5E,KAAK,IAAI,CAACpF,MAAM,CAAC8E,gBAAgB,GAAG,CAAC;EACvC,CAAC;AACH;AAACO,OAAA,CAAAzF,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -35,6 +35,7 @@ class BTManagedDevice {
|
|
|
35
35
|
|
|
36
36
|
resultReportedThisConnection = false;
|
|
37
37
|
historyTransferActive = false;
|
|
38
|
+
historySyncRequested = false;
|
|
38
39
|
bondedEventReported = false;
|
|
39
40
|
reportedMeasurementKinds = new Set();
|
|
40
41
|
reportedDailyTotals = new Set();
|
|
@@ -115,16 +116,52 @@ class BTManagedDevice {
|
|
|
115
116
|
/** Flushes protocol-level session state before a connection is torn down. */
|
|
116
117
|
handleMeasurementEnd() {}
|
|
117
118
|
|
|
119
|
+
/** Hands over what the connection recorded across its sessions, before it is torn down. */
|
|
120
|
+
handleConnectionEnd() {}
|
|
121
|
+
|
|
122
|
+
/** Stops a recording the device holds open; only recorders that report one support it. */
|
|
123
|
+
stopRecording = async () => {
|
|
124
|
+
throw new Error(`${this.deviceData.name} does not record on the device.`);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Whether the records the device stored are read only on `syncHistory`. Such a device goes live
|
|
129
|
+
* as soon as it connects; any other reads its stored records each time it connects.
|
|
130
|
+
*/
|
|
131
|
+
get readsHistoryOnRequest() {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** Reads the records the device stored: over the open connection, or once it next connects. */
|
|
136
|
+
syncHistory = async () => {
|
|
137
|
+
if (!this.readsHistoryOnRequest) {
|
|
138
|
+
throw new Error(`${this.deviceData.name} reads its stored records each time it connects.`);
|
|
139
|
+
}
|
|
140
|
+
this.historySyncRequested = true;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** True once per `syncHistory` request, for the command sequencer that reads the records. */
|
|
144
|
+
takeHistorySync = () => {
|
|
145
|
+
const requested = this.historySyncRequested;
|
|
146
|
+
this.historySyncRequested = false;
|
|
147
|
+
return requested;
|
|
148
|
+
};
|
|
149
|
+
|
|
118
150
|
/** Called with a normalised error; cleared by `destroy`. */
|
|
119
151
|
|
|
120
152
|
/** Called when the connection status changes. */
|
|
121
153
|
|
|
122
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Called with each measurement that passes the result policy; cleared by `destroy`. `delivered` is
|
|
156
|
+
* called once the app took it: the promise its result callback returned resolved.
|
|
157
|
+
*/
|
|
123
158
|
|
|
124
159
|
/** Called when the device disconnects. */
|
|
125
160
|
|
|
126
161
|
/** Called for connection lifecycle events such as connected, bonded or history download. */
|
|
127
162
|
|
|
163
|
+
/** Called with the ECG samples of each realtime answer while a recorder records; for display only. */
|
|
164
|
+
|
|
128
165
|
/** How results of this kind are reported. */
|
|
129
166
|
policyFor = measurementTypeKey => this.resultPolicy?.byMeasurement?.[measurementTypeKey] ?? this.resultPolicy?.default ?? "all";
|
|
130
167
|
|
|
@@ -138,6 +175,7 @@ class BTManagedDevice {
|
|
|
138
175
|
onResult: onResultCallback,
|
|
139
176
|
onSeriesValue: onSeriesValueCallback,
|
|
140
177
|
onConnectionEvent: onConnectionEventCallback,
|
|
178
|
+
onWaveform: onWaveformCallback,
|
|
141
179
|
onDeviceDisconnected: onDeviceDisconnectedCallback,
|
|
142
180
|
oneReadingPerConnection,
|
|
143
181
|
resultPolicy,
|
|
@@ -198,7 +236,7 @@ class BTManagedDevice {
|
|
|
198
236
|
this.onResult = ({
|
|
199
237
|
caseType: _,
|
|
200
238
|
...data
|
|
201
|
-
}) => {
|
|
239
|
+
}, delivered) => {
|
|
202
240
|
const measurementTypeKey = data.measurementTypeKey;
|
|
203
241
|
const acceptedMemorySlots = this.resultPolicy?.acceptedMemorySlots;
|
|
204
242
|
if (acceptedMemorySlots && !(0, _deviceUser.isFromAcceptedMemorySlot)(data, acceptedMemorySlots)) {
|
|
@@ -273,16 +311,23 @@ class BTManagedDevice {
|
|
|
273
311
|
enumerable: true,
|
|
274
312
|
writable: false
|
|
275
313
|
});
|
|
276
|
-
onResultCallback?.(result);
|
|
314
|
+
const taken = onResultCallback?.(result);
|
|
315
|
+
if (taken instanceof Promise) {
|
|
316
|
+
void taken.then(delivered, () => (0, _sentryLogger.sentryLogger)("warning", "BT_MANAGER: The app did not take a reading", {
|
|
317
|
+
measurementTypeKey
|
|
318
|
+
}));
|
|
319
|
+
}
|
|
277
320
|
};
|
|
278
321
|
this.onDeviceDisconnected = onDeviceDisconnectedCallback;
|
|
279
322
|
this.onConnectionEvent = onConnectionEventCallback;
|
|
323
|
+
this.onWaveform = onWaveformCallback;
|
|
280
324
|
}
|
|
281
325
|
|
|
282
326
|
/** Stops the connection and data processing and clears the callbacks. */
|
|
283
327
|
destroy = () => {
|
|
284
328
|
this.destroyed = true;
|
|
285
329
|
this.handleMeasurementEnd();
|
|
330
|
+
this.handleConnectionEnd();
|
|
286
331
|
(0, _sentryLogger.sentryLogger)("info", "BT_MANAGER: Destroying device");
|
|
287
332
|
this.connectionHandler?.destroy();
|
|
288
333
|
this.dataProcessor?.destroy();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_telemetry","_dailyTotalDay","_builtInMeasurementTypes","_deviceVariants","_bluetoothError","_clockSync","_deviceStatus","_deviceUser","_errorCallbackPayload","_resultIdentity","_supportedMeasurementTypeKeys","_btConnectionHandler","_btDataProcessor","_pollingCommandSequencer","BTManagedDevice","connected","destroyed","resultReportedThisConnection","historyTransferActive","bondedEventReported","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","getSupportedMeasurementTypeKeys","declared","supportedMeasurementTypeKeys","mainServices","length","BUILT_IN_MEASUREMENT_TYPES","deviceData","name","reportsBondedEvent","syncsCurrentTime","handleSuccessResult","_successResult","_collectedValues","handleMeasurementEnd","policyFor","measurementTypeKey","resultPolicy","byMeasurement","default","reportResult","result","onResult","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResultCallback","onSeriesValue","onSeriesValueCallback","onConnectionEvent","onConnectionEventCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","clockSync","policyPicksDelivery","undefined","clockSyncOptions","sentryLogger","id","localName","manufacturerData","sn","measurementTypes","clockSyncCapabilityForDevice","variant","findDeviceVariant","String","manufacturer","model","status","addOvokSpanEvent","error","normalized","toBluetoothError","errorCode","code","errorCallbackPayload","caseType","_","data","acceptedMemorySlots","isFromAcceptedMemorySlot","policy","has","add","day","dailyTotalDay","Date","now","key","recordOvokMetric","kind","progress","current","Object","defineProperty","value","createStableResultId","enumerable","writable","createLegacyResultId","destroy","connectionHandler","dataProcessor","disconnect","cancelConnection","currentTimeSync","isClockSyncEnabled","connectInternal","clear","sequencer","createCommandSequencer","pollingSequencerFor","isHistoryTransfer","BTConnectionHandler","onStatusChanged","DeviceStatus","CONNECTED","bind","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","onServicesDiscovered","uuids","initialCommands","onCommandSent","armStuckTimeout","armCommandTimeout","isNormalDisconnect","preferredMtu","BTDataProcessor","stuckDataTimeout","onStreamStart","onMeasurementEnd","validatePackage","parsedData","collectedValues","nextCommand","frame","sendCommands","commands","commandTimeoutMs","onCommandTimeout","commandProgress","handleDependentResult","frameReader","connect","Promise","reject","Error","connectionPromise","resolve","finally","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAYA,IAAAO,aAAA,GAAAP,OAAA;AAQA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,qBAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAV,OAAA;AACA,IAAAW,6BAAA,GAAAX,OAAA;AAEA,IAAAY,oBAAA,GAAAZ,OAAA;AACA,IAAAa,gBAAA,GAAAb,OAAA;AACA,IAAAc,wBAAA,GAAAd,OAAA;AAtCA;;AAwCA;AACA;AACA;AACA;AACO,MAAee,eAAe,CAErC;EACE;;EAKQC,SAAS,GAAG,KAAK;EACjBC,SAAS,GAAG,KAAK;;EAOzB;;EAGQC,4BAA4B,GAAG,KAAK;EACpCC,qBAAqB,GAAG,KAAK;EAC7BC,mBAAmB,GAAG,KAAK;EAC3BC,wBAAwB,GAAG,IAAIC,GAAG,CAAqB,CAAC;EACxDC,mBAAmB,GAAG,IAAID,GAAG,CAAS,CAAC;EACvCE,kBAAkB,GAAG,CAAC;;EAE9B;;EAGA;AACF;AACA;;EAGE;AACF;AACA;AACA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ACC,iBAAiB,EAAE;MAC1B,OAAO,IAAI,CAACA,iBAAiB;IAC/B;IAEA,IAAI,IAAI,CAACtJ,SAAS,EAAE;MAClB,OAAOmJ,OAAO,CAACI,OAAO,CAAC,CAAC;IAC1B;IAEA,IAAI,CAACD,iBAAiB,GAAG,IAAI,CAACjD,eAAe,CAAC,CAAC,CAACmD,OAAO,CAAC,MAAM;MAC5D,IAAI,CAACF,iBAAiB,GAAGtG,SAAS;IACpC,CAAC,CAAC;IAEF,OAAO,IAAI,CAACsG,iBAAiB;EAC/B,CAAC;AACH;AAACG,OAAA,CAAA1J,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_telemetry","_dailyTotalDay","_builtInMeasurementTypes","_deviceVariants","_bluetoothError","_clockSync","_deviceStatus","_deviceUser","_errorCallbackPayload","_resultIdentity","_supportedMeasurementTypeKeys","_btConnectionHandler","_btDataProcessor","_pollingCommandSequencer","BTManagedDevice","connected","destroyed","resultReportedThisConnection","historyTransferActive","historySyncRequested","bondedEventReported","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","getSupportedMeasurementTypeKeys","declared","supportedMeasurementTypeKeys","mainServices","length","BUILT_IN_MEASUREMENT_TYPES","deviceData","name","reportsBondedEvent","syncsCurrentTime","handleSuccessResult","_successResult","_collectedValues","handleMeasurementEnd","handleConnectionEnd","stopRecording","Error","readsHistoryOnRequest","syncHistory","takeHistorySync","requested","policyFor","measurementTypeKey","resultPolicy","byMeasurement","default","reportResult","result","onResult","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResultCallback","onSeriesValue","onSeriesValueCallback","onConnectionEvent","onConnectionEventCallback","onWaveform","onWaveformCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","clockSync","policyPicksDelivery","undefined","clockSyncOptions","sentryLogger","id","localName","manufacturerData","sn","measurementTypes","clockSyncCapabilityForDevice","variant","findDeviceVariant","String","manufacturer","model","status","addOvokSpanEvent","error","normalized","toBluetoothError","errorCode","code","errorCallbackPayload","caseType","_","data","delivered","acceptedMemorySlots","isFromAcceptedMemorySlot","policy","has","add","day","dailyTotalDay","Date","now","key","recordOvokMetric","kind","progress","current","Object","defineProperty","value","createStableResultId","enumerable","writable","createLegacyResultId","taken","Promise","then","destroy","connectionHandler","dataProcessor","disconnect","cancelConnection","currentTimeSync","isClockSyncEnabled","connectInternal","clear","sequencer","createCommandSequencer","pollingSequencerFor","isHistoryTransfer","BTConnectionHandler","onStatusChanged","DeviceStatus","CONNECTED","bind","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","onServicesDiscovered","uuids","initialCommands","onCommandSent","armStuckTimeout","armCommandTimeout","isNormalDisconnect","preferredMtu","BTDataProcessor","stuckDataTimeout","onStreamStart","onMeasurementEnd","validatePackage","parsedData","collectedValues","nextCommand","frame","sendCommands","commands","commandTimeoutMs","onCommandTimeout","commandProgress","handleDependentResult","frameReader","connect","reject","connectionPromise","resolve","finally","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAYA,IAAAO,aAAA,GAAAP,OAAA;AASA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,qBAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAV,OAAA;AACA,IAAAW,6BAAA,GAAAX,OAAA;AAEA,IAAAY,oBAAA,GAAAZ,OAAA;AACA,IAAAa,gBAAA,GAAAb,OAAA;AACA,IAAAc,wBAAA,GAAAd,OAAA;AAvCA;;AAy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ACpC,IAAI,IAAI,CAAC/J,SAAS,EAAE;MAClB,OAAOyG,OAAO,CAACuD,MAAM,CAAC,IAAIvI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjF;IAEA,IAAI,IAAI,CAACwI,iBAAiB,EAAE;MAC1B,OAAO,IAAI,CAACA,iBAAiB;IAC/B;IAEA,IAAI,IAAI,CAAClK,SAAS,EAAE;MAClB,OAAO0G,OAAO,CAACyD,OAAO,CAAC,CAAC;IAC1B;IAEA,IAAI,CAACD,iBAAiB,GAAG,IAAI,CAAC/C,eAAe,CAAC,CAAC,CAACiD,OAAO,CAAC,MAAM;MAC5D,IAAI,CAACF,iBAAiB,GAAGxG,SAAS;IACpC,CAAC,CAAC;IAEF,OAAO,IAAI,CAACwG,iBAAiB;EAC/B,CAAC;AACH;AAACG,OAAA,CAAAtK,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.readThermometerText = exports.readKfb06Glucose = exports.readCgh25Glucose = exports.readBpResult = exports.readBpRecord = void 0;
|
|
7
7
|
var _frameBytes = require("../../../utils/frame-bytes.js");
|
|
8
|
+
var _tenthsMmolToMgPerDl = require("../../../utils/tenths-mmol-to-mg-per-dl.js");
|
|
8
9
|
/* eslint-disable import/group-exports */
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -49,15 +50,9 @@ const readBpRecord = body => {
|
|
|
49
50
|
recordedAt
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
-
/** One mmol/L of glucose (180.16 g/mol) is 18.016 mg/dL, as in the SIG glucose profile. */
|
|
54
53
|
exports.readBpRecord = readBpRecord;
|
|
55
|
-
const MG_PER_DL_PER_MMOL_PER_L = 18.016;
|
|
56
|
-
|
|
57
|
-
/** Tenths of a mmol/L, rounded to whole mg/dL. */
|
|
58
|
-
const mgPerDl = tenthsMmol => Math.round(tenthsMmol / 10 * MG_PER_DL_PER_MMOL_PER_L);
|
|
59
54
|
const glucose = (tenthsMmol, recordedAt) => recordedAt && tenthsMmol > 0 && tenthsMmol < 0xffff ? {
|
|
60
|
-
bloodGlucose:
|
|
55
|
+
bloodGlucose: (0, _tenthsMmolToMgPerDl.tenthsMmolToMgPerDl)(tenthsMmol),
|
|
61
56
|
recordedAt
|
|
62
57
|
} : undefined;
|
|
63
58
|
const KFB06_GLUCOSE_TYPE = 9;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_frameBytes","require","fromBcd","value","undefined","localTime","fields","some","field","year","month","day","hour","minute","second","map","index","time","Date","getMonth","getDate","getHours","getMinutes","getSeconds","readPressures","bytes","length","heartRate","systolic","diastolic","flag","irregularHeartbeat","readBpResult","body","exports","readBpRecord","recordedAt","slice","pressures","
|
|
1
|
+
{"version":3,"names":["_frameBytes","require","_tenthsMmolToMgPerDl","fromBcd","value","undefined","localTime","fields","some","field","year","month","day","hour","minute","second","map","index","time","Date","getMonth","getDate","getHours","getMinutes","getSeconds","readPressures","bytes","length","heartRate","systolic","diastolic","flag","irregularHeartbeat","readBpResult","body","exports","readBpRecord","recordedAt","slice","pressures","glucose","tenthsMmol","bloodGlucose","tenthsMmolToMgPerDl","KFB06_GLUCOSE_TYPE","readKfb06Glucose","readCgh25Glucose","THERMOMETER_TEXT","readThermometerText","frame","text","exec","String","fromCharCode","frameBytes","type","test","hundredths","Number","parseInt"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/cofoe/cofoe.records.ts"],"mappings":";;;;;;AAEA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAHA;;AAKA;AACA;AACA;AACA;AACA,MAAME,OAAO,GAAIC,KAAa,IAC3BA,KAAK,IAAI,CAAC,GAAI,CAAC,IAAI,CAACA,KAAK,GAAG,IAAI,IAAI,CAAC,GAAGC,SAAS,GAAG,CAACD,KAAK,IAAI,CAAC,IAAI,EAAE,IAAIA,K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List":[]}
|
|
@@ -63,7 +63,10 @@ const createLepuSequencer = (lepu, report, clockSync, manufacturerData) => {
|
|
|
63
63
|
manufacturerData,
|
|
64
64
|
rejectEncryptionAtBytes: selected.rejectEncryptionAtBytes,
|
|
65
65
|
onIdentified: report.onIdentified,
|
|
66
|
-
onRefused: report.onRefused
|
|
66
|
+
onRefused: report.onRefused,
|
|
67
|
+
...(selected.pulseWave === true && report.onPulseWave ? {
|
|
68
|
+
onPulseWave: report.onPulseWave
|
|
69
|
+
} : {})
|
|
67
70
|
});
|
|
68
71
|
};
|
|
69
72
|
exports.createLepuSequencer = createLepuSequencer;
|
|
@@ -83,7 +86,8 @@ const selectLepu = (lepu, manufacturerData) => {
|
|
|
83
86
|
},
|
|
84
87
|
pollCommand: 0x02,
|
|
85
88
|
writeWithoutResponse: true,
|
|
86
|
-
setClockBeforeInfo: false
|
|
89
|
+
setClockBeforeInfo: false,
|
|
90
|
+
pulseWave: false
|
|
87
91
|
};
|
|
88
92
|
};
|
|
89
93
|
exports.selectLepu = selectLepu;
|
package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_lepuAdvertisement","_lepuCommandBuilder","_lepuIdentityGate","_lepuTransports","DEFAULT_START_BYTE","recordLepuIdentity","deviceData","info","sn","serialNumber","sentryLogger","deviceType","protocolMaxLength","exports","createLepuSequencer","lepu","report","clockSync","manufacturerData","selected","selectLepu","LepuIdentityGate","write","serviceUuid","characteristicUuid","builder","LepuCommandBuilder","requestStartByte","startBytes","fixedSequence","protocol","writeWithoutResponse","setClockBeforeInfo","clockSyncProtocol","expectedDeviceTypes","pollCommand","undefined","pollIntervalMs","rejectEncryptionAtBytes","onIdentified","onRefused","manufacturerDataProtocol","viatomOxygenUsesV2","transport","lepuTransports","aw1","writeUuid"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_lepuAdvertisement","_lepuCommandBuilder","_lepuIdentityGate","_lepuTransports","DEFAULT_START_BYTE","recordLepuIdentity","deviceData","info","sn","serialNumber","sentryLogger","deviceType","protocolMaxLength","exports","createLepuSequencer","lepu","report","clockSync","manufacturerData","selected","selectLepu","LepuIdentityGate","write","serviceUuid","characteristicUuid","builder","LepuCommandBuilder","requestStartByte","startBytes","fixedSequence","protocol","writeWithoutResponse","setClockBeforeInfo","clockSyncProtocol","expectedDeviceTypes","pollCommand","undefined","pollIntervalMs","rejectEncryptionAtBytes","onIdentified","onRefused","pulseWave","onPulseWave","manufacturerDataProtocol","viatomOxygenUsesV2","transport","lepuTransports","aw1","writeUuid"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAIA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,eAAA,GAAAJ,OAAA;AAEA;AACA,MAAMK,kBAAkB,GAAG,IAAI;AAU/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAGA,CACzBC,UAAsB,EACtBC,IAAoB,KACX;EACTD,UAAU,CAACE,EAAE,GAAGD,IAAI,CAACE,YAAY;EAEjC,IAAAC,0BAAY,EAAC,MAAM,EAAE,sCAAsC,EAAE;IAC3DC,UAAU,EAAEJ,IAAI,CAACI,UAAU;IAC3BC,iBAAiB,EAAEL,IAAI,CAACK;EAC1B,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVAC,OAAA,CAAAR,kBAAA,GAAAA,kBAAA;AAWA,MAAMS,mBAAmB,GAAGA,CAC1BC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AAM,CAAC0B;IAAY,CAAC,GACnC,CAAC,CAAC;EACR,CAAC,CAAC;AACJ,CAAC;AAAC7B,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEF,MAAMM,UAAU,GAAGA,CACjBL,IAAoB,EACpBG,gBAAyB,KACN;EACnB,IACEH,IAAI,CAAC4B,wBAAwB,KAAK,eAAe,IACjD,CAAC,IAAAC,qCAAkB,EAAC1B,gBAAgB,CAAC,EACrC;IACA,OAAOH,IAAI;EACb;EAEA,MAAM8B,SAAS,GAAGC,8BAAc,CAACC,GAAG;EAEpC,OAAO;IACL,GAAGhC,IAAI;IACPe,QAAQ,EAAE,IAAI;IACdF,UAAU,EAAE,CAAC,IAAI,CAAC;IAClBD,gBAAgB,EAAE,IAAI;IACtBL,KAAK,EAAE;MACLC,WAAW,EAAEsB,SAAS,CAACtB,WAAW;MAClCC,kBAAkB,EAAEqB,SAAS,CAACG;IAChC,CAAC;IACDb,WAAW,EAAE,IAAI;IACjBJ,oBAAoB,EAAE,IAAI;IAC1BC,kBAAkB,EAAE,KAAK;IACzBS,SAAS,EAAE;EACb,CAAC;AACH,CAAC;AAAC5B,OAAA,CAAAO,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -6,14 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.CustomDevice = void 0;
|
|
7
7
|
var _next = require("@ovok/core/next");
|
|
8
8
|
var _caseType = require("../../../types/case-type.js");
|
|
9
|
+
var _bytesToHex = require("../../../utils/bytes-to-hex.js");
|
|
9
10
|
var _createFrameValidator = require("../../../utils/create-frame-validator.js");
|
|
10
11
|
var _parseMeasurement = require("../../../utils/parse-measurement.js");
|
|
11
12
|
var _rejectCustomReading = require("../../../utils/reject-custom-reading.js");
|
|
12
13
|
var _bp2Files = require("../bp2/bp2.files.js");
|
|
13
14
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
14
15
|
var _lepuCommandBuilder = require("../lepu/lepu.command-builder.js");
|
|
16
|
+
var _lepuDeliveredFiles = require("../lepu/lepu.delivered-files.js");
|
|
15
17
|
var _lepuEcgTransfer = require("../lepu/lepu.ecg-transfer.js");
|
|
18
|
+
var _lepuEncryptionHandshake = require("../lepu/lepu.encryption-handshake.js");
|
|
16
19
|
var _lepuFrameReader = require("../lepu/lepu.frame-reader.js");
|
|
20
|
+
var _lepuPulseWaveChunks = require("../lepu/lepu.pulse-wave-chunks.js");
|
|
21
|
+
var _lepuRecorder = require("../lepu/lepu.recorder.js");
|
|
22
|
+
var _lepuSession = require("../lepu/lepu.session.js");
|
|
17
23
|
var _tmbCommandSequencer = require("../tmb/tmb.command-sequencer.js");
|
|
18
24
|
var _tmbFrameReader = require("../tmb/tmb.frame-reader.js");
|
|
19
25
|
var _viatomBp3Files = require("../viatom/viatom.bp3-files.js");
|
|
@@ -34,12 +40,14 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
34
40
|
reportedHistoryIds = new Set();
|
|
35
41
|
validators = new Map();
|
|
36
42
|
sessionAggregates = new Map();
|
|
43
|
+
lepuSession = new _lepuSession.LepuSession();
|
|
37
44
|
constructor(device, params, definition) {
|
|
38
45
|
super(device, {
|
|
39
46
|
...params,
|
|
40
47
|
oneReadingPerConnection: params.oneReadingPerConnection ?? definition.oneReadingPerConnection
|
|
41
48
|
});
|
|
42
49
|
this.definition = definition;
|
|
50
|
+
this.onFinishedSeries = params.onFinishedSeries;
|
|
43
51
|
this.frameHandler = definition.createFrameHandler?.();
|
|
44
52
|
this.sessionPolicy = definition.sessionPolicy;
|
|
45
53
|
this.deviceData.clockSync = definition.clockSync;
|
|
@@ -53,7 +61,7 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
53
61
|
if (definition.preferredMtu !== undefined) {
|
|
54
62
|
this.preferredMtu = definition.preferredMtu;
|
|
55
63
|
}
|
|
56
|
-
this.declareLepuProtocol(definition, params
|
|
64
|
+
this.declareLepuProtocol(definition, params);
|
|
57
65
|
this.declareTmbProtocol(definition, params.clockSync);
|
|
58
66
|
this.declareSequencerFactory(definition, params);
|
|
59
67
|
definition.frames.forEach((frame, uuid) => {
|
|
@@ -93,16 +101,19 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
93
101
|
* what decides anything may be sent at all. A declaration that had the reader without the
|
|
94
102
|
* gate would poll hardware it had not identified, which is the case the gate exists for.
|
|
95
103
|
*/
|
|
96
|
-
declareLepuProtocol(definition,
|
|
104
|
+
declareLepuProtocol(definition, {
|
|
105
|
+
clockSync,
|
|
106
|
+
recordCursorStorage
|
|
107
|
+
}) {
|
|
97
108
|
const lepu = definition.lepu;
|
|
98
109
|
if (!lepu) {
|
|
99
110
|
return;
|
|
100
111
|
}
|
|
101
|
-
this.frameReader = new _lepuFrameReader.LepuFrameReader(lepu.startBytes);
|
|
112
|
+
this.frameReader = new _lepuFrameReader.LepuFrameReader(lepu.startBytes, this.lepuSession);
|
|
102
113
|
this.createCommandSequencer = () => {
|
|
103
114
|
if (lepu.fileTransfer !== undefined) {
|
|
104
115
|
this.reportedHistoryIds.clear();
|
|
105
|
-
return new _lepuEcgTransfer.LepuEcgTransferSequencer({
|
|
116
|
+
return this.withEncryption(lepu, new _lepuEcgTransfer.LepuEcgTransferSequencer({
|
|
106
117
|
write: {
|
|
107
118
|
serviceUuid: lepu.write.serviceUuid,
|
|
108
119
|
characteristicUuid: lepu.write.characteristicUuid
|
|
@@ -116,14 +127,14 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
116
127
|
onRefused: this.onIdentityRefused,
|
|
117
128
|
onFile: lepu.fileTransfer === "ecg" ? this.reportViatomEcgFile : lepu.fileTransfer === "bp2" ? this.reportViatomBp2File : this.reportViatomBp3File,
|
|
118
129
|
skipFiles: lepu.fileTransfer === "bp3" ? undefined : this.deliveredFileNames,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
deliveredFiles: lepu.fileTransfer === "bp3" ? undefined : new _lepuDeliveredFiles.LepuDeliveredFiles(recordCursorStorage, this.device.id),
|
|
131
|
+
acceptFile: lepu.fileTransfer === "ecg" ? name => lepu.ecgFileDecoder !== undefined && /^R/i.test(name) : lepu.fileTransfer === "bp3" ? name => /^bp\.list$/i.test(name) : undefined,
|
|
132
|
+
pollCommand: lepu.pollCommand,
|
|
133
|
+
pollIntervalMs: lepu.pollIntervalMs,
|
|
134
|
+
shouldStartTransfer: lepu.fileTransfer === "ecg" ? this.watchRecording(lepu) : undefined,
|
|
135
|
+
takeRequestedCommand: this.takeStopRequest,
|
|
136
|
+
takeHistorySync: this.takeHistorySync,
|
|
137
|
+
pollsOnAnswer: () => this.recorder?.isRecording() ?? false,
|
|
127
138
|
onError: reason => this.onError?.(new Error(`Viatom ECG: ${reason}`)),
|
|
128
139
|
onProgress: progress => this.onConnectionEvent?.({
|
|
129
140
|
deviceData: this.deviceData,
|
|
@@ -133,18 +144,95 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
133
144
|
total: progress.totalBytes
|
|
134
145
|
}
|
|
135
146
|
})
|
|
136
|
-
});
|
|
147
|
+
}));
|
|
137
148
|
}
|
|
138
|
-
return (0, _customLepuSequencer.createLepuSequencer)(lepu, {
|
|
149
|
+
return this.withEncryption(lepu, (0, _customLepuSequencer.createLepuSequencer)(lepu, {
|
|
139
150
|
onIdentified: this.onIdentified,
|
|
140
|
-
onRefused: this.onIdentityRefused
|
|
141
|
-
|
|
151
|
+
onRefused: this.onIdentityRefused,
|
|
152
|
+
onPulseWave: this.startPulseWave(lepu)
|
|
153
|
+
}, clockSync, this.device.manufacturerData ?? undefined));
|
|
142
154
|
};
|
|
143
155
|
}
|
|
144
|
-
|
|
145
|
-
|
|
156
|
+
|
|
157
|
+
/** The standard family runs the vendor's encryption handshake first when it advertises one. */
|
|
158
|
+
withEncryption = (lepu, sequencer) => lepu.protocol === undefined ? (0, _lepuEncryptionHandshake.withLepuEncryption)(sequencer, {
|
|
159
|
+
write: {
|
|
160
|
+
serviceUuid: lepu.write.serviceUuid,
|
|
161
|
+
characteristicUuid: lepu.write.characteristicUuid
|
|
162
|
+
},
|
|
163
|
+
session: this.lepuSession,
|
|
164
|
+
manufacturerData: this.device.manufacturerData ?? undefined,
|
|
165
|
+
startByte: lepu.startBytes[0],
|
|
166
|
+
onRefused: this.onIdentityRefused
|
|
167
|
+
}) : sequencer;
|
|
168
|
+
|
|
169
|
+
/** A Lepu device that polls live keeps its stored files until asked; without polling it reads them on connect. */
|
|
170
|
+
get readsHistoryOnRequest() {
|
|
171
|
+
const lepu = this.definition.lepu;
|
|
172
|
+
return lepu?.fileTransfer !== undefined && lepu.pollCommand !== undefined;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Stops the open recording; the device stores it when it is long enough, and the files are then read. */
|
|
176
|
+
stopRecording = async () => {
|
|
177
|
+
const stopCommand = this.definition.lepu?.recordingStatus?.stopCommand;
|
|
178
|
+
if (stopCommand === undefined || !this.recorder?.isOpen()) {
|
|
179
|
+
throw new Error(`Custom device "${this.definition.id}" has no open recording to stop.`);
|
|
180
|
+
}
|
|
181
|
+
this.requestedStop = stopCommand;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/** ECG files are read again only on the poll answer that says a record was just saved. */
|
|
185
|
+
watchRecording = lepu => {
|
|
186
|
+
this.requestedStop = undefined;
|
|
187
|
+
this.recorder = lepu.recordingStatus ? new _lepuRecorder.LepuRecorder(lepu.recordingStatus, {
|
|
188
|
+
onRecordingChanged: this.reportRecording,
|
|
189
|
+
onSamples: (samples, at) => this.reportSamples(lepu, samples, at),
|
|
190
|
+
onChunk: chunk => this.onResult?.(chunk)
|
|
191
|
+
}) : undefined;
|
|
192
|
+
return this.recorder?.observe ?? (() => false);
|
|
193
|
+
};
|
|
194
|
+
reportSamples = (lepu, samples, at) => {
|
|
195
|
+
const waveform = lepu.recordingStatus?.waveform;
|
|
196
|
+
if (waveform) {
|
|
197
|
+
this.onWaveform?.({
|
|
198
|
+
deviceData: this.deviceData,
|
|
199
|
+
samples,
|
|
200
|
+
sampleRateHz: waveform.sampleRateHz,
|
|
201
|
+
millivoltsPerCount: waveform.millivoltsPerCount,
|
|
202
|
+
at
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/** A pulse wave is recorded only for a kind kept as a series, which is how it is handed over. */
|
|
208
|
+
startPulseWave = lepu => {
|
|
209
|
+
const keepsSeries = this.policyFor(_next.MeasurementTypeKey.bloodOxygenPulseRate) === "series";
|
|
210
|
+
this.pulseWave?.flush();
|
|
211
|
+
this.pulseWave = lepu.pulseWave === true && keepsSeries ? new _lepuPulseWaveChunks.PulseWaveChunks(this.reportPulseWave) : undefined;
|
|
212
|
+
const chunks = this.pulseWave;
|
|
213
|
+
return chunks && (wave => chunks.append(wave, new Date()));
|
|
214
|
+
};
|
|
215
|
+
reportPulseWave = series => this.onFinishedSeries?.((0, _lepuPulseWaveChunks.pulseWaveResult)(this.deviceData, series));
|
|
216
|
+
handleConnectionEnd() {
|
|
217
|
+
this.pulseWave?.flush();
|
|
218
|
+
}
|
|
219
|
+
takeStopRequest = () => {
|
|
220
|
+
const stop = this.requestedStop;
|
|
221
|
+
this.requestedStop = undefined;
|
|
222
|
+
return stop;
|
|
223
|
+
};
|
|
224
|
+
reportRecording = recording => this.onConnectionEvent?.({
|
|
225
|
+
deviceData: this.deviceData,
|
|
226
|
+
kind: "recording",
|
|
227
|
+
...(recording ? {
|
|
228
|
+
recording
|
|
229
|
+
} : {})
|
|
230
|
+
});
|
|
231
|
+
reportViatomEcgFile = (file, delivered) => {
|
|
232
|
+
const decoded = (0, _viatomEcgFiles.decodeViatomEcgRecording)(file.bytes);
|
|
233
|
+
this.deliveredFileNames.add(file.name);
|
|
146
234
|
if (decoded.samples.length === 0) {
|
|
147
|
-
this.onError?.(new Error(`Viatom ECG: file "${file.name}"
|
|
235
|
+
this.onError?.(new Error(`Viatom ECG: file "${file.name}" does not decode to its recorded length.`));
|
|
148
236
|
return;
|
|
149
237
|
}
|
|
150
238
|
this.onResult?.({
|
|
@@ -154,16 +242,16 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
154
242
|
duration: decoded.duration,
|
|
155
243
|
recordedAt: (0, _viatomEcgFiles.recordedAtFromViatomFileName)(file.name),
|
|
156
244
|
recordingId: file.name
|
|
157
|
-
});
|
|
245
|
+
}, delivered);
|
|
158
246
|
};
|
|
159
|
-
reportViatomBp2File = file => {
|
|
160
|
-
const decoded = (0, _bp2Files.decodeBP2File)(file.name, file.
|
|
247
|
+
reportViatomBp2File = (file, delivered) => {
|
|
248
|
+
const decoded = (0, _bp2Files.decodeBP2File)(file.name, (0, _bytesToHex.bytesToHex)(Array.from(file.bytes)));
|
|
161
249
|
if (decoded) {
|
|
162
|
-
this.reportHistoryOnce(decoded);
|
|
250
|
+
this.reportHistoryOnce(decoded, delivered);
|
|
163
251
|
}
|
|
164
252
|
};
|
|
165
253
|
reportViatomBp3File = file => {
|
|
166
|
-
(0, _viatomBp3Files.decodeViatomBp3File)(file.name, file.
|
|
254
|
+
(0, _viatomBp3Files.decodeViatomBp3File)(file.name, (0, _bytesToHex.bytesToHex)(Array.from(file.bytes)))?.forEach(decoded => {
|
|
167
255
|
if (!this.deliveredFileNames.has(decoded.recordingId)) {
|
|
168
256
|
this.reportHistoryOnce(decoded);
|
|
169
257
|
}
|
|
@@ -171,7 +259,7 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
171
259
|
};
|
|
172
260
|
|
|
173
261
|
/** Reports a decoded history file unless this connection already reported it. */
|
|
174
|
-
reportHistoryOnce = decoded => {
|
|
262
|
+
reportHistoryOnce = (decoded, delivered) => {
|
|
175
263
|
if (this.reportedHistoryIds.has(decoded.recordingId)) {
|
|
176
264
|
return;
|
|
177
265
|
}
|
|
@@ -179,7 +267,7 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
179
267
|
this.onResult?.({
|
|
180
268
|
...decoded,
|
|
181
269
|
caseType: _caseType.CaseType.RESULT
|
|
182
|
-
});
|
|
270
|
+
}, delivered);
|
|
183
271
|
};
|
|
184
272
|
onIdentified = info => (0, _customLepuSequencer.recordLepuIdentity)(this.deviceData, info);
|
|
185
273
|
onIdentityRefused = reason => {
|
|
@@ -270,6 +358,7 @@ class CustomDevice extends _btManagedDevice.BTManagedDevice {
|
|
|
270
358
|
|
|
271
359
|
/** Emits a completed session before the state machine returns to CONNECTED. */
|
|
272
360
|
handleMeasurementEnd() {
|
|
361
|
+
this.recorder?.flush();
|
|
273
362
|
const policy = this.sessionPolicy;
|
|
274
363
|
if (!policy) {
|
|
275
364
|
return;
|