@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
package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_next","require","_caseType","_clockSync","_tenthsMmolToMgPerDl","_telebgmProtocol","MG_PER_DL_UNITS","CONTROL_SOLUTION","RECORD_BYTES","RESULT_TYPE_INDEX","recordTime","year","month","day","hours","minutes","timezone","fields","time","Date","UTC","parts","getClockParts","undefined","readRecord","payload","reportsMmol","length","value","recordedAt","bloodGlucose","tenthsMmolToMgPerDl","TeleBgmSequencer","withoutResponse","finished","constructor","params","initialCommands","writesWithoutResponse","request","TELEBGM_COMMAND","serial","isHistoryTransfer","isNormalDisconnect","nextCommand","frame","command","unframe","testStatus","acknowledge","softwareVersion","units","setClock","history","setTime","report","transferEnd","historyEnd","reading","clockSync","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","isClockSyncEnabled","seconds","now","telebgmFrame","TELEBGM_PARAMETER","write","ack","serviceUuid","TELEBGM_SERVICE","characteristicUuid","TELEBGM_WRITE","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAQA,IAAAG,oBAAA,GAAAH,OAAA;AAEA,IAAAI,gBAAA,GAAAJ,OAAA;AASA;AACA,MAAMK,eAAe,GAAG,IAAI;;AAE5B;AACA,MAAMC,gBAAgB,GAAG,IAAI;;AAE7B;AACA,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,iBAAiB,GAAG,CAAC;AAU3B;AACA,MAAMC,UAAU,GAAGA,CACjB,CAACC,IAAI,EAAEC,KAAK,EAAEC,GAAG,EAAEC,KAAK,EAAEC,OAAO,CAAoB,EACrDC,QAA2B,GAAG,OAAO,KAChB;EACrB,MAAMC,MAAM,GAAG,CAAC,IAAI,IAAIN,IAAI,IAAI,CAAC,CAAC,EAAE,CAACC,KAAK,IAAI,CAAC,IAAI,CAAC,EAAEC,GAAG,IAAI,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEC,OAAO,IAAI,CAAC,CAAU;EAClG,MAAMG,IAAI,GAAGF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IAAI,CAACA,OAAO,CAAC,IAAAuB,6BAAY,EAACvB,OAAO,EAAEwB,kCAAiB,CAAC/B,OAAO,CAAC,CAAC;EAExDU,WAAW,GAAIH,OAAe,IACpC,IAAI,CAACA,OAAO,CAAC,IAAAuB,6BAAY,EAACvB,OAAO,EAAEwB,kCAAiB,CAACE,GAAG,CAAC,CAAC;EAEpD1B,OAAO,GAAID,KAAe,KAAqB;IACrD4B,WAAW,EAAEC,gCAAe;IAC5BC,kBAAkB,EAAEC,8BAAa;IACjC/B,KAAK;IACL,IAAI,IAAI,CAACZ,eAAe,GAAG;MAAEA,eAAe,EAAE;IAAK,CAAC,GAAG,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAAC4C,OAAA,CAAA7C,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -12,11 +12,15 @@ var _preferredMtu = require("../../../constants/preferred-mtu.js");
|
|
|
12
12
|
var _bloodPressureStates = require("../../../types/blood-pressure-states.js");
|
|
13
13
|
var _caseType = require("../../../types/case-type.js");
|
|
14
14
|
var _deviceStatus = require("../../../types/device-status.js");
|
|
15
|
+
var _bytesToHex = require("../../../utils/bytes-to-hex.js");
|
|
15
16
|
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
16
17
|
var _i16FromHex = require("../../../utils/i-16-from-hex.js");
|
|
17
18
|
var _le16FromHex = require("../../../utils/le-16-from-hex.js");
|
|
18
19
|
var _le32FromHex = require("../../../utils/le-32-from-hex.js");
|
|
19
20
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
21
|
+
var _lepuDeliveredFiles = require("../lepu/lepu.delivered-files.js");
|
|
22
|
+
var _lepuEncryptionHandshake = require("../lepu/lepu.encryption-handshake.js");
|
|
23
|
+
var _lepuSession = require("../lepu/lepu.session.js");
|
|
20
24
|
var _bp2Files = require("./bp2.files.js");
|
|
21
25
|
var _bp2FrameReader = require("./bp2.frame-reader.js");
|
|
22
26
|
var _bp2HistorySequencer = require("./bp2.history-sequencer.js");
|
|
@@ -29,8 +33,12 @@ var _bp2MainServices = require("./bp2.main-services.js");
|
|
|
29
33
|
*/
|
|
30
34
|
/** BP2 ECG waveform resolution from the device protocol. */
|
|
31
35
|
const BP2_ECG_MILLIVOLTS_PER_COUNT = exports.BP2_ECG_MILLIVOLTS_PER_COUNT = 0.003098;
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
|
|
37
|
+
/** The realtime ECG stream's rate. */
|
|
38
|
+
const BP2_LIVE_ECG_SAMPLES_PER_SECOND = 250;
|
|
39
|
+
|
|
40
|
+
/** Stored ECG files hold the waveform at half the realtime rate. */
|
|
41
|
+
const BP2_FILE_ECG_SAMPLES_PER_SECOND = 125;
|
|
34
42
|
const BP2_ECG_NO_VALUE = 0x7fff;
|
|
35
43
|
const BP2_BP_NO_VALUE = 0xffff;
|
|
36
44
|
const BP2_PULSE_NO_VALUES = new Set([0xff, 0x1ff, BP2_BP_NO_VALUE]);
|
|
@@ -40,6 +48,7 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
40
48
|
duration = 0;
|
|
41
49
|
historyMode = false;
|
|
42
50
|
historyRequested = false;
|
|
51
|
+
measuredThisConnection = false;
|
|
43
52
|
pendingResults = new Map();
|
|
44
53
|
reportedFileNames = new Set();
|
|
45
54
|
mainServices = _bp2MainServices.bp2MainServices;
|
|
@@ -47,9 +56,14 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
47
56
|
constructor(device, params) {
|
|
48
57
|
super(device, params);
|
|
49
58
|
this.clockSync = params.clockSync;
|
|
59
|
+
this.recordCursorStorage = params.recordCursorStorage;
|
|
50
60
|
this.deliveredFileNames = new Set([...(params.deliveredEcgFileNames ?? []), ...(params.deliveredFileNames ?? [])]);
|
|
51
61
|
}
|
|
62
|
+
get readsHistoryOnRequest() {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
52
65
|
onStreamStart = () => {
|
|
66
|
+
this.measuredThisConnection = true;
|
|
53
67
|
this.collectedValues = [];
|
|
54
68
|
this.diagramPoints = [];
|
|
55
69
|
this.duration = 0;
|
|
@@ -58,16 +72,18 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
58
72
|
createCommandSequencer = () => {
|
|
59
73
|
this.historyMode = true;
|
|
60
74
|
this.historyRequested = false;
|
|
75
|
+
this.measuredThisConnection = false;
|
|
61
76
|
this.lastLiveResultSignature = undefined;
|
|
62
77
|
this.pendingResults.clear();
|
|
63
78
|
this.reportedFileNames.clear();
|
|
64
79
|
const service = _bp2MainServices.bp2MainServices[0];
|
|
65
80
|
const write = service.writeUuid;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
const commandTarget = {
|
|
82
|
+
serviceUuid: service.uuid,
|
|
83
|
+
characteristicUuid: write.uuid
|
|
84
|
+
};
|
|
85
|
+
const history = new _bp2HistorySequencer.BP2HistorySequencer({
|
|
86
|
+
write: commandTarget,
|
|
71
87
|
onFile: this.handleHistoryFile,
|
|
72
88
|
onError: this.handleHistoryError,
|
|
73
89
|
onTransferFinished: this.reportPendingResults,
|
|
@@ -77,10 +93,19 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
77
93
|
},
|
|
78
94
|
onOrphanStreamEnd: () => undefined,
|
|
79
95
|
skipFiles: this.deliveredFileNames,
|
|
80
|
-
|
|
96
|
+
deliveredFiles: new _lepuDeliveredFiles.LepuDeliveredFiles(this.recordCursorStorage, this.device.id),
|
|
97
|
+
clockSync: this.clockSync,
|
|
98
|
+
takeHistorySync: this.takeHistorySync
|
|
99
|
+
});
|
|
100
|
+
return (0, _lepuEncryptionHandshake.withLepuEncryption)(history, {
|
|
101
|
+
write: commandTarget,
|
|
102
|
+
session: this.lepuSession,
|
|
103
|
+
manufacturerData: this.device.manufacturerData ?? undefined,
|
|
104
|
+
onRefused: this.handleHistoryError
|
|
81
105
|
});
|
|
82
106
|
};
|
|
83
|
-
|
|
107
|
+
lepuSession = new _lepuSession.LepuSession();
|
|
108
|
+
frameReader = new _bp2FrameReader.BP2FrameReader(this.lepuSession);
|
|
84
109
|
preferredMtu = _preferredMtu.PREFERRED_MTU;
|
|
85
110
|
handleSuccessResult(successResult, collectedValues) {
|
|
86
111
|
this.collectedValues = collectedValues;
|
|
@@ -88,6 +113,11 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
88
113
|
this.onError?.(new Error(`Measurement type is undefined for case ${successResult.caseType}`));
|
|
89
114
|
return;
|
|
90
115
|
}
|
|
116
|
+
|
|
117
|
+
// A result already on screen when the app connected comes with the history sync, as in the vendor app.
|
|
118
|
+
if (successResult.caseType === _caseType.CaseType.RESULT && !this.measuredThisConnection) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
91
121
|
if (successResult.measurementTypeKey === _next.MeasurementTypeKey.ecg) {
|
|
92
122
|
return this.handleEcgResult(successResult);
|
|
93
123
|
}
|
|
@@ -101,7 +131,7 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
101
131
|
successResult.diagramPoints = this.diagramPoints;
|
|
102
132
|
successResult.duration = this.duration;
|
|
103
133
|
this.addDeviceTimestamp(successResult);
|
|
104
|
-
const error = this.checkIfHasErrorForEcg(successResult);
|
|
134
|
+
const error = this.checkIfHasErrorForEcg(successResult, BP2_LIVE_ECG_SAMPLES_PER_SECOND);
|
|
105
135
|
if (error) {
|
|
106
136
|
this.onError?.(error);
|
|
107
137
|
return;
|
|
@@ -205,11 +235,11 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
205
235
|
this.historyRequested = true;
|
|
206
236
|
};
|
|
207
237
|
signatureFor = result => result.measurementTypeKey === _next.MeasurementTypeKey.bloodPressure ? [result.measurementTypeKey, result.systolic, result.diastolic, result.heartRate, result.status].join("|") : [result.measurementTypeKey, result.heartRate, result.diagnosticResult, result.duration, result.diagramPoints?.join(",")].join("|");
|
|
208
|
-
handleHistoryFile = file => {
|
|
238
|
+
handleHistoryFile = (file, delivered) => {
|
|
209
239
|
if (this.reportedFileNames.has(file.name)) {
|
|
210
240
|
return;
|
|
211
241
|
}
|
|
212
|
-
const decoded = (0, _bp2Files.decodeBP2File)(file.name, file.
|
|
242
|
+
const decoded = (0, _bp2Files.decodeBP2File)(file.name, (0, _bytesToHex.bytesToHex)(Array.from(file.bytes)));
|
|
213
243
|
if (!decoded) {
|
|
214
244
|
return;
|
|
215
245
|
}
|
|
@@ -219,7 +249,7 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
219
249
|
...decoded,
|
|
220
250
|
caseType: _caseType.CaseType.RESULT
|
|
221
251
|
};
|
|
222
|
-
const error = result.measurementTypeKey === _next.MeasurementTypeKey.bloodPressure ? this.checkIfHasErrorForBloodPressure(result) : this.checkIfHasErrorForEcg(result);
|
|
252
|
+
const error = result.measurementTypeKey === _next.MeasurementTypeKey.bloodPressure ? this.checkIfHasErrorForBloodPressure(result) : this.checkIfHasErrorForEcg(result, BP2_FILE_ECG_SAMPLES_PER_SECOND);
|
|
223
253
|
if (error) {
|
|
224
254
|
this.onError?.(error);
|
|
225
255
|
return;
|
|
@@ -227,7 +257,7 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
227
257
|
if (pending && this.matchesPendingResult(pending, decoded)) {
|
|
228
258
|
this.pendingResults.delete(result.measurementTypeKey);
|
|
229
259
|
}
|
|
230
|
-
this.onResult?.(result);
|
|
260
|
+
this.onResult?.(result, delivered);
|
|
231
261
|
};
|
|
232
262
|
matchesPendingResult = (pending, decoded) => {
|
|
233
263
|
if (decoded.measurementTypeKey === _next.MeasurementTypeKey.bloodPressure) {
|
|
@@ -247,7 +277,7 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
247
277
|
this.pendingResults.forEach(result => this.onResult?.(result));
|
|
248
278
|
this.pendingResults.clear();
|
|
249
279
|
};
|
|
250
|
-
checkIfHasErrorForEcg(successResult) {
|
|
280
|
+
checkIfHasErrorForEcg(successResult, samplesPerSecond) {
|
|
251
281
|
const ecgMeasurement = successResult;
|
|
252
282
|
if (ecgMeasurement.diagnosticResult === _next.EcgDiagnosticFlag.POOR_WAVEFORM) {
|
|
253
283
|
return _measurementFeedback.MeasurementFeedbackKey.POOR_WAVEFORM;
|
|
@@ -272,8 +302,9 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
272
302
|
return _measurementFeedback.MeasurementFeedbackKey.INSUFFICIENT_DATA_LENGTH;
|
|
273
303
|
}
|
|
274
304
|
if (ecgMeasurement.duration > 0) {
|
|
275
|
-
const expectedSamples = ecgMeasurement.duration *
|
|
276
|
-
|
|
305
|
+
const expectedSamples = ecgMeasurement.duration * samplesPerSecond;
|
|
306
|
+
const toleranceSamples = samplesPerSecond;
|
|
307
|
+
if (ecgMeasurement.diagramPoints.length < expectedSamples - toleranceSamples || ecgMeasurement.diagramPoints.length > expectedSamples + toleranceSamples) {
|
|
277
308
|
return _measurementFeedback.MeasurementFeedbackKey.INSUFFICIENT_DATA_LENGTH;
|
|
278
309
|
}
|
|
279
310
|
} else if (ecgMeasurement.diagramPoints.length < 3500) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_next","require","_sentryLogger","_bloodPressureTranslatedExceptionMap","_measurementFeedback","_preferredMtu","_bloodPressureStates","_caseType","_deviceStatus","_hexToByte","_i16FromHex","_le16FromHex","_le32FromHex","_btManagedDevice","_bp2Files","_bp2FrameReader","_bp2HistorySequencer","_bp2MainServices","BP2_ECG_MILLIVOLTS_PER_COUNT","exports","BP2_ECG_SAMPLES_PER_SECOND","BP2_ECG_SAMPLE_TOLERANCE","BP2_ECG_NO_VALUE","BP2_BP_NO_VALUE","BP2_PULSE_NO_VALUES","Set","BP2Device","BTManagedDevice","collectedValues","diagramPoints","duration","historyMode","historyRequested","pendingResults","Map","reportedFileNames","mainServices","bp2MainServices","stuckDataTimeout","constructor","device","params","clockSync","deliveredFileNames","deliveredEcgFileNames","onStreamStart","lastLiveResultSignature","undefined","createCommandSequencer","clear","service","write","writeUuid","BP2HistorySequencer","serviceUuid","uuid","characteristicUuid","onFile","handleHistoryFile","onError","handleHistoryError","onTransferFinished","reportPendingResults","shouldStartTransfer","onTransferRequested","onOrphanStreamEnd","skipFiles","frameReader","BP2FrameReader","preferredMtu","PREFERRED_MTU","handleSuccessResult","successResult","measurementTypeKey","caseType","Error","MeasurementTypeKey","ecg","handleEcgResult","bloodPressure","handleBloodPressureResult","CaseType","RESULT","addDeviceTimestamp","error","checkIfHasErrorForEcg","queueHistoryResult","onResult","handleEcgStream","lenL","hexToByte","lenH","dataLen","dataStart","dataEnd","data","slice","le32FromHex","sentryLogger","onDeviceStatusChanged","DeviceStatus","MEASURING","samplingNum","le16FromHex","samplesStart","i","byteIndexInData","sampleVal","i16FromHex","push","checkIfHasErrorForBloodPressure","result","recordedAt","length","recordedAtFromLocalSeconds","bpMeasurement","status","diastolic","systolic","heartRate","MeasurementFeedbackKey","DEVICE_ERROR","BloodPressureStates","REGULAR","errorString","bloodPressureTranslatedExceptionMap","get","DEVICE_INTERRUPTED","has","signature","signatureFor","set","join","diagnosticResult","file","name","decoded","decodeBP2File","content","pending","add","matchesPendingResult","delete","pendingBloodPressure","decodedBloodPressure","pendingEcg","decodedEcg","reason","forEach","ecgMeasurement","EcgDiagnosticFlag","POOR_WAVEFORM","LEAD_OFF","INSUFFICIENT_DATA_LENGTH","expectedSamples"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.device.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AASA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,oCAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AAIA,IAAAQ,UAAA,GAAAR,OAAA;AACA,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OhC,2CAAsB,CAACgC,QAAQ;IACxC;;IAEA;IACA,IACEH,cAAc,CAAChB,gBAAgB,KAAKtF,SAAS,IAC7CsG,cAAc,CAAC9B,SAAS,KAAKxE,SAAS,IACtCsG,cAAc,CAACxH,aAAa,KAAKkB,SAAS,EAC1C;MACA,OAAOyE,2CAAsB,CAACC,YAAY;IAC5C;;IAEA;IACA,IAAI4B,cAAc,CAAC9B,SAAS,KAAK,CAAC,EAAE;MAClC,OAAOC,2CAAsB,CAACO,kBAAkB;IAClD;IAEA,IAAIsB,cAAc,CAACvH,QAAQ,KAAKiB,SAAS,IAAIsG,cAAc,CAACvH,QAAQ,GAAG,EAAE,EAAE;MACzE,OAAO0F,2CAAsB,CAACiC,wBAAwB;IACxD;IAEA,IAAIJ,cAAc,CAACxH,aAAa,CAACoF,MAAM,KAAK,CAAC,EAAE;MAC7C,OAAOO,2CAAsB,CAACiC,wBAAwB;IACxD;IAEA,IAAIJ,cAAc,CAACvH,QAAQ,GAAG,CAAC,EAAE;MAC/B,MAAM4H,eAAe,GACnBL,cAAc,CAACvH,QAAQ,GAAGV,0BAA0B;MAEtD,IACEiI,cAAc,CAACxH,aAAa,CAACoF,MAAM,GACjCyC,eAAe,GAAGrI,wBAAwB,IAC5CgI,cAAc,CAACxH,aAAa,CAACoF,MAAM,GACjCyC,eAAe,GAAGrI,wBAAwB,EAC5C;QACA,OAAOmG,2CAAsB,CAACiC,wBAAwB;MACxD;IACF,CAAC,MAAM,IAAIJ,cAAc,CAACxH,aAAa,CAACoF,MAAM,GAAG,IAAI,EAAE;MACrD,OAAOO,2CAAsB,CAACiC,wBAAwB;IACxD;IAEA,OAAO1G,SAAS;EAClB;AACF;AAAC5B,OAAA,CAAAO,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_next","require","_sentryLogger","_bloodPressureTranslatedExceptionMap","_measurementFeedback","_preferredMtu","_bloodPressureStates","_caseType","_deviceStatus","_bytesToHex","_hexToByte","_i16FromHex","_le16FromHex","_le32FromHex","_btManagedDevice","_lepuDeliveredFiles","_lepuEncryptionHandshake","_lepuSession","_bp2Files","_bp2FrameReader","_bp2HistorySequencer","_bp2MainServices","BP2_ECG_MILLIVOLTS_PER_COUNT","exports","BP2_LIVE_ECG_SAMPLES_PER_SECOND","BP2_FILE_ECG_SAMPLES_PER_SECOND","BP2_ECG_NO_VALUE","BP2_BP_NO_VALUE","BP2_PULSE_NO_VALUES","Set","BP2Device","BTManagedDevice","collectedValues","diagramPoints","duration","historyMode","historyRequested","measuredThisConnection","pendingResults","Map","reportedFileNames","mainServices","bp2MainServices","stuckDataTimeout","constructor","device","params","clockSync","recordCursorStorage","deliveredFileNames","deliveredEcgFileNames","readsHistoryOnRequest","onStreamStart","lastLiveResultSignature","undefined","createCommandSequencer","clear","service","write","writeUuid","commandTarget","serviceUuid","uuid","characteristicUuid","history","BP2HistorySequencer","onFile","handleHistoryFile","onError","handleHistoryError","onTransferFinished","reportPendingResults","shouldStartTransfer","onTransferRequested","onOrphanStreamEnd","skipFiles","deliveredFiles","LepuDeliveredFiles","id","takeHistorySync","withLepuEncryption","session","lepuSession","manufacturerData","onRefused","LepuSession","frameReader","BP2FrameReader","preferredMtu","PREFERRED_MTU","handleSuccessResult","successResult","measurementTypeKey","caseType","Error","CaseType","RESULT","MeasurementTypeKey","ecg","handleEcgResult","bloodPressure","handleBloodPressureResult","addDeviceTimestamp","error","checkIfHasErrorForEcg","queueHistoryResult","onResult","handleEcgStream","lenL","hexToByte","lenH","dataLen","dataStart","dataEnd","data","slice","le32FromHex","sentryLogger","onDeviceStatusChanged","DeviceStatus","MEASURING","samplingNum","le16FromHex","samplesStart","i","byteIndexInData","sampleVal","i16FromHex","push","checkIfHasErrorForBloodPressure","result","recordedAt","length","recordedAtFromLocalSeconds","bpMeasurement","status","diastolic","systolic","heartRate","MeasurementFeedbackKey","DEVICE_ERROR","BloodPressureStates","REGULAR","errorString","bloodPressureTranslatedExceptionMap","get","DEVICE_INTERRUPTED","has","signature","signatureFor","set","join","diagnosticResult","file","delivered","name","decoded","decodeBP2File","bytesToHex","Array","from","bytes","pending","add","matchesPendingResult","delete","pendingBloodPressure","decodedBloodPressure","pendingEcg","decodedEcg","reason","forEach","samplesPerSecond","ecgMeasurement","EcgDiagnosticFlag","POOR_WAVEFORM","LEAD_OFF","INSUFFICIENT_DATA_LENGTH","expectedSamples","toleranceSamples"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.device.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AASA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,oCAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AAIA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,gBAAA,GAAAb,OAAA;AACA,IAAAc,mBAAA,GAAAd,OAAA;AACA,IAAAe,wBAAA,GAAAf,OAAA;AAEA,IAAAgB,YAAA,GAAAhB,OAAA;AAEA,IAAAiB,SAAA,GAAAjB,OAAA;AACA,IAAAkB,eAAA,GAAAlB,OAAA;AACA,IAAAmB,oBAAA,GAAAnB,OAAA;AACA,IAAAoB,gBAAA,GAAApB,OAAA;AAtCA;;AAwCA;AACA;AACA;AACA;AACA;AACA,MAAMqB,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,QAAQ;;AAE7C;AACA,MAAME,+BAA+B,GAAG,GAAG;;AAE3C;AACA,MAAMC,+BAA+B,GAAG,GAAG;AAC3C,MAAMC,gBAAgB,GAAG,MAAM;AAC/B,MA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gB,GAAGP,gBAAgB;MAEzC,IACEC,cAAc,CAAC5I,aAAa,CAACmG,MAAM,GAAG8C,eAAe,GAAGC,gBAAgB,IACxEN,cAAc,CAAC5I,aAAa,CAACmG,MAAM,GAAG8C,eAAe,GAAGC,gBAAgB,EACxE;QACA,OAAOxC,2CAAsB,CAACsC,wBAAwB;MACxD;IACF,CAAC,MAAM,IAAIJ,cAAc,CAAC5I,aAAa,CAACmG,MAAM,GAAG,IAAI,EAAE;MACrD,OAAOO,2CAAsB,CAACsC,wBAAwB;IACxD;IAEA,OAAO3H,SAAS;EAClB;AACF;AAAC/B,OAAA,CAAAO,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -15,8 +15,8 @@ const BP2_START_BYTES = ["a5"];
|
|
|
15
15
|
* thing that makes it a BP2 is which start byte it accepts.
|
|
16
16
|
*/
|
|
17
17
|
class BP2FrameReader extends _lepuFrameReader.LepuFrameReader {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(BP2_START_BYTES);
|
|
18
|
+
constructor(session) {
|
|
19
|
+
super(BP2_START_BYTES, session);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.BP2FrameReader = BP2FrameReader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lepuFrameReader","require","BP2_START_BYTES","BP2FrameReader","LepuFrameReader","constructor","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_lepuFrameReader","require","BP2_START_BYTES","BP2FrameReader","LepuFrameReader","constructor","session","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAGA;AACA,MAAMC,eAAe,GAAG,CAAC,IAAI,CAAC;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAc,SAASC,gCAAe,CAAC;EAC3CC,WAAWA,CAACC,OAAqB,EAAE;IACxC,KAAK,CAACJ,eAAe,EAAEI,OAAO,CAAC;EACjC;AACF;AAACC,OAAA,CAAAJ,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -9,35 +9,83 @@ var _clockSync = require("../../../types/clock-sync.js");
|
|
|
9
9
|
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
10
10
|
var _lepuCommandBuilder = require("../lepu/lepu.command-builder.js");
|
|
11
11
|
var _lepuCommands = require("../lepu/lepu.commands.js");
|
|
12
|
+
var _lepuConnectRetry = require("../lepu/lepu.connect-retry.js");
|
|
12
13
|
var _lepuEcgTransfer = require("../lepu/lepu.ecg-transfer.js");
|
|
13
|
-
var _lepuFileTransfer = require("../lepu/lepu.file-transfer.js");
|
|
14
14
|
var _lepuFrame = require("../lepu/lepu.frame.js");
|
|
15
15
|
var _lepuResponseType = require("../lepu/lepu.response-type.js");
|
|
16
|
+
var _lepuStoredFiles = require("../lepu/lepu.stored-files.js");
|
|
17
|
+
/* eslint-disable max-lines */
|
|
18
|
+
|
|
16
19
|
const BP2_REALTIME_COMMAND = exports.BP2_REALTIME_COMMAND = 0x08;
|
|
17
20
|
const BP2_RESULT_STATES = new Set(["05", "07", "11"]);
|
|
18
21
|
const BP2_ECG_STATE = "06";
|
|
19
22
|
const BP2_IDLE_STATES = new Set(["00", "01", "03"]);
|
|
20
|
-
const
|
|
21
|
-
|
|
23
|
+
const BP2_MEASURING_STATES = new Set(["04", "06", "0f", "10"]);
|
|
24
|
+
|
|
25
|
+
/** The pace of Viatom's own BP2 client, which the device keeps up with while it measures. */
|
|
26
|
+
const BP2_POLL_INTERVAL_MS = 500;
|
|
27
|
+
|
|
28
|
+
/** How long a queued realtime poll may go unanswered before it is sent again. */
|
|
29
|
+
const BP2_POLL_ANSWER_TIMEOUT_MS = BP2_POLL_INTERVAL_MS + 1_000;
|
|
30
|
+
/**
|
|
31
|
+
* Sets a BP2's clock, then polls it live. Its stored files are only listed on connect: they are
|
|
32
|
+
* read when the app asks (`takeHistorySync`, held while the BP2 measures), and the file of a
|
|
33
|
+
* result taken while connected is read once the BP2 stores it.
|
|
34
|
+
*/
|
|
22
35
|
class BP2HistorySequencer {
|
|
23
36
|
builder = new _lepuCommandBuilder.LepuCommandBuilder();
|
|
24
37
|
lastRunStatusFrameCount = 0;
|
|
25
38
|
realtimeEcgActive = false;
|
|
26
39
|
phase = "files";
|
|
40
|
+
clockRetry = new _lepuConnectRetry.LepuConnectRetry();
|
|
27
41
|
constructor(params) {
|
|
28
42
|
this.params = params;
|
|
43
|
+
this.storedFiles = new _lepuStoredFiles.LepuStoredFiles({
|
|
44
|
+
write: params.write,
|
|
45
|
+
builder: this.builder,
|
|
46
|
+
onFile: params.onFile,
|
|
47
|
+
onError: params.onError,
|
|
48
|
+
skipFiles: params.skipFiles,
|
|
49
|
+
deliveredFiles: params.deliveredFiles
|
|
50
|
+
});
|
|
29
51
|
}
|
|
30
52
|
initialCommands = () => {
|
|
31
53
|
if ((0, _clockSync.isClockSyncEnabled)(this.params.clockSync)) {
|
|
32
54
|
this.phase = "clock";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
frame: this.builder.build(_lepuCommands.LepuCommand.SET_TIME, (0, _lepuEcgTransfer.clockPayload)(this.params.clockSync))
|
|
36
|
-
}];
|
|
55
|
+
this.clockRetry.started();
|
|
56
|
+
return [this.setTimeCommand()];
|
|
37
57
|
}
|
|
38
|
-
return this.
|
|
58
|
+
return this.startFiles();
|
|
39
59
|
};
|
|
40
60
|
isHistoryTransfer = () => true;
|
|
61
|
+
commandTimeoutMs = () => {
|
|
62
|
+
if (this.phase === "clock") {
|
|
63
|
+
return _lepuConnectRetry.LEPU_CONNECT_REPLY_TIMEOUT_MS;
|
|
64
|
+
}
|
|
65
|
+
return this.isPolling() ? BP2_POLL_ANSWER_TIMEOUT_MS : undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A BP2 just switched on can drop its first command, and one starting a measurement can
|
|
70
|
+
* drop a poll, so a missing answer is asked for again. The clock is optional: when it is
|
|
71
|
+
* still unanswered, the BP2 is polled without it.
|
|
72
|
+
*/
|
|
73
|
+
onCommandTimeout = () => {
|
|
74
|
+
if (this.phase === "clock") {
|
|
75
|
+
return {
|
|
76
|
+
commands: this.clockRetry.mayRetry() ? [this.setTimeCommand()] : this.startFiles()
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return this.isPolling() ? {
|
|
80
|
+
commands: [this.pollCommand()]
|
|
81
|
+
} : {};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** Only the awaited answer settles a command; any other frame leaves its timeout running. */
|
|
85
|
+
commandProgress = frame => {
|
|
86
|
+
const awaited = this.awaitedCommand();
|
|
87
|
+
return awaited === undefined || (0, _lepuFrame.lepuCommandOf)(frame) === awaited ? "complete" : "ignored";
|
|
88
|
+
};
|
|
41
89
|
nextCommand = frame => {
|
|
42
90
|
if (this.phase === "clock") {
|
|
43
91
|
if ((0, _lepuFrame.lepuCommandOf)(frame) !== _lepuCommands.LepuCommand.SET_TIME) {
|
|
@@ -46,7 +94,7 @@ class BP2HistorySequencer {
|
|
|
46
94
|
if (!(0, _lepuResponseType.isLepuSuccess)(frame)) {
|
|
47
95
|
this.params.onError(`the device refused SET_TIME: ${(0, _lepuResponseType.describeLepuResponseType)(frame)}`);
|
|
48
96
|
}
|
|
49
|
-
return this.
|
|
97
|
+
return this.startFiles();
|
|
50
98
|
}
|
|
51
99
|
if (this.transfer) {
|
|
52
100
|
return this.transfer.nextCommand(frame);
|
|
@@ -62,22 +110,19 @@ class BP2HistorySequencer {
|
|
|
62
110
|
}
|
|
63
111
|
if (this.params.shouldStartTransfer() || endedWithoutResult) {
|
|
64
112
|
this.params.onTransferRequested();
|
|
65
|
-
return this.startTransfer(isResult ? 3_000 : undefined);
|
|
113
|
+
return this.startTransfer(this.storedFiles.readNew, isResult ? 3_000 : undefined);
|
|
114
|
+
}
|
|
115
|
+
if (this.isRestingFrame(frame) && this.params.takeHistorySync()) {
|
|
116
|
+
return this.startTransfer(this.storedFiles.readAll);
|
|
66
117
|
}
|
|
67
118
|
|
|
68
119
|
// The BP2 answers each realtime poll once; the answer is another poll, or the next result is never seen.
|
|
69
120
|
return (0, _lepuFrame.lepuCommandOf)(frame) === BP2_REALTIME_COMMAND ? [this.pollCommand()] : undefined;
|
|
70
121
|
};
|
|
71
|
-
|
|
122
|
+
startFiles = () => this.startTransfer(this.params.takeHistorySync() ? this.storedFiles.readAll : this.storedFiles.listExisting);
|
|
123
|
+
startTransfer = (files, delayBeforeWriteMs) => {
|
|
72
124
|
this.phase = "files";
|
|
73
|
-
this.transfer =
|
|
74
|
-
write: this.params.write,
|
|
75
|
-
builder: this.builder,
|
|
76
|
-
onFile: this.params.onFile,
|
|
77
|
-
onError: this.params.onError,
|
|
78
|
-
skipFiles: this.params.skipFiles,
|
|
79
|
-
afterTransfer: this.finishTransfer
|
|
80
|
-
});
|
|
125
|
+
this.transfer = files(this.finishTransfer);
|
|
81
126
|
return this.transfer.initialCommands(delayBeforeWriteMs);
|
|
82
127
|
};
|
|
83
128
|
finishTransfer = () => {
|
|
@@ -85,12 +130,26 @@ class BP2HistorySequencer {
|
|
|
85
130
|
this.params.onTransferFinished();
|
|
86
131
|
return [this.pollCommand()];
|
|
87
132
|
};
|
|
133
|
+
awaitedCommand = () => {
|
|
134
|
+
if (this.phase === "clock") {
|
|
135
|
+
return _lepuCommands.LepuCommand.SET_TIME;
|
|
136
|
+
}
|
|
137
|
+
return this.isPolling() ? BP2_REALTIME_COMMAND : undefined;
|
|
138
|
+
};
|
|
139
|
+
setTimeCommand = () => ({
|
|
140
|
+
...this.params.write,
|
|
141
|
+
frame: this.builder.build(_lepuCommands.LepuCommand.SET_TIME, (0, _lepuEcgTransfer.clockPayload)(this.params.clockSync))
|
|
142
|
+
});
|
|
143
|
+
isPolling = () => this.phase === "files" && this.transfer === undefined;
|
|
88
144
|
pollCommand = () => ({
|
|
89
145
|
...this.params.write,
|
|
90
146
|
frame: this.builder.build(BP2_REALTIME_COMMAND),
|
|
91
147
|
delayBeforeWriteMs: BP2_POLL_INTERVAL_MS
|
|
92
148
|
});
|
|
93
149
|
isResultFrame = frame => (0, _hexToByte.hexToByte)(frame[1] ?? "0") === BP2_REALTIME_COMMAND && BP2_RESULT_STATES.has((frame[7] ?? "").toLowerCase());
|
|
150
|
+
|
|
151
|
+
/** A realtime answer from a BP2 not measuring, so reading its files interrupts nothing. */
|
|
152
|
+
isRestingFrame = frame => (0, _hexToByte.hexToByte)(frame[1] ?? "0") === BP2_REALTIME_COMMAND && !BP2_MEASURING_STATES.has((frame[7] ?? "").toLowerCase());
|
|
94
153
|
isIdleFrame = frame => (0, _hexToByte.hexToByte)(frame[1] ?? "0") === BP2_REALTIME_COMMAND && BP2_IDLE_STATES.has((frame[7] ?? "").toLowerCase());
|
|
95
154
|
logRunStatus = frame => {
|
|
96
155
|
if ((0, _hexToByte.hexToByte)(frame[1] ?? "0") !== BP2_REALTIME_COMMAND) {
|
package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_clockSync","_hexToByte","_lepuCommandBuilder","_lepuCommands","
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_clockSync","_hexToByte","_lepuCommandBuilder","_lepuCommands","_lepuConnectRetry","_lepuEcgTransfer","_lepuFrame","_lepuResponseType","_lepuStoredFiles","BP2_REALTIME_COMMAND","exports","BP2_RESULT_STATES","Set","BP2_ECG_STATE","BP2_IDLE_STATES","BP2_MEASURING_STATES","BP2_POLL_INTERVAL_MS","BP2_POLL_ANSWER_TIMEOUT_MS","BP2HistorySequencer","builder","LepuCommandBuilder","lastRunStatusFrameCount","realtimeEcgActive","phase","clockRetry","LepuConnectRetry","constructor","params","storedFiles","LepuStoredFiles","write","onFile","onError","skipFiles","deliveredFiles","initialCommands","isClockSyncEnabled","clockSync","started","setTimeCommand","startFiles","isHistoryTransfer","commandTimeoutMs","LEPU_CONNECT_REPLY_TIMEOUT_MS","isPolling","undefined","onCommandTimeout","commands","mayRetry","pollCommand","commandProgress","frame","awaited","awaitedCommand","lepuCommandOf","nextCommand","LepuCommand","SET_TIME","isLepuSuccess","describeLepuResponseType","transfer","logRunStatus","isResult","isResultFrame","endedWithoutResult","isIdleFrame","onOrphanStreamEnd","shouldStartTransfer","onTransferRequested","startTransfer","readNew","isRestingFrame","takeHistorySync","readAll","listExisting","files","delayBeforeWriteMs","finishTransfer","onTransferFinished","build","clockPayload","hexToByte","has","toLowerCase","runStatus","lastRunStatus","sentryLogger"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.history-sequencer.ts"],"mappings":";;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AASA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAKA,IAAAM,gBAAA,GAAAN,OAAA;AAEA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AAIA,IAAAS,gBAAA,GAAAT,OAAA;AA1BA;;AA4BA,MAAMU,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAI;AACjC,MAAME,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACrD,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,eAAe,GAAG,IAAIF,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACnD,MAAMG,oBAAoB,GAAG,IAAIH,GAAG,CAAC,CAAC,IAAI,EAAE,I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D,uBAAuB,GAAG,CAAC;EAClC,CAAC;AACH;AAACX,OAAA,CAAAQ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -28,6 +28,7 @@ const ATT_WRITE_HEADER_BYTES = 3;
|
|
|
28
28
|
class BTCommandWriter {
|
|
29
29
|
pendingWrites = Promise.resolve();
|
|
30
30
|
mtu = DEFAULT_ATT_MTU;
|
|
31
|
+
writeOnlyWithoutResponse = new Map();
|
|
31
32
|
constructor(device, onError, isNormalDisconnect, retryAfterPairing = _btPairingRetry.runOnce) {
|
|
32
33
|
this.device = device;
|
|
33
34
|
this.onError = onError;
|
|
@@ -101,16 +102,43 @@ class BTCommandWriter {
|
|
|
101
102
|
* Writes one chunk the way the characteristic accepts writes.
|
|
102
103
|
*
|
|
103
104
|
* A with-response write to a characteristic that only supports write-without-response
|
|
104
|
-
* fails outright,
|
|
105
|
+
* fails outright, and some devices drop the link on it. A command can say which it is;
|
|
106
|
+
* otherwise the characteristic's own properties decide.
|
|
105
107
|
*/
|
|
106
108
|
writeTo = async (command, value) => {
|
|
107
|
-
if (command.withoutResponse) {
|
|
109
|
+
if (command.withoutResponse || (await this.acceptsOnlyWithoutResponse(command))) {
|
|
108
110
|
await this.device.writeCharacteristicWithoutResponseForService(command.serviceUuid, command.characteristicUuid, value);
|
|
109
111
|
return;
|
|
110
112
|
}
|
|
111
113
|
await this.device.writeCharacteristicWithResponseForService(command.serviceUuid, command.characteristicUuid, value);
|
|
112
114
|
};
|
|
113
115
|
|
|
116
|
+
/** Reads once per characteristic whether it refuses with-response writes. */
|
|
117
|
+
acceptsOnlyWithoutResponse = command => {
|
|
118
|
+
const key = `${command.serviceUuid}|${command.characteristicUuid}`.toLowerCase();
|
|
119
|
+
const known = this.writeOnlyWithoutResponse.get(key);
|
|
120
|
+
if (known) {
|
|
121
|
+
return known;
|
|
122
|
+
}
|
|
123
|
+
const lookup = this.readAcceptsOnlyWithoutResponse(command);
|
|
124
|
+
this.writeOnlyWithoutResponse.set(key, lookup);
|
|
125
|
+
return lookup;
|
|
126
|
+
};
|
|
127
|
+
readAcceptsOnlyWithoutResponse = async ({
|
|
128
|
+
serviceUuid,
|
|
129
|
+
characteristicUuid
|
|
130
|
+
}) => {
|
|
131
|
+
try {
|
|
132
|
+
const characteristics = await this.device.characteristicsForService(serviceUuid);
|
|
133
|
+
const characteristic = characteristics.find(({
|
|
134
|
+
uuid
|
|
135
|
+
}) => uuid.toLowerCase() === characteristicUuid.toLowerCase());
|
|
136
|
+
return Boolean(characteristic?.isWritableWithoutResponse && !characteristic.isWritableWithResponse);
|
|
137
|
+
} catch {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
114
142
|
/**
|
|
115
143
|
* Splits a frame into writes the link will carry whole.
|
|
116
144
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_sentryLogger","require","_bluetoothError","_hexToBase","_btPairingRetry","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","constructor","device","onError","isNormalDisconnect","retryAfterPairing","runOnce","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","delayBeforeWriteMs","setTimeout","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","sentryLogger","hexToBase64","join","message","toBluetoothError","expectedEnd","test","errorCode","code","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAEA,MAAMI,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,CAAC;EACnBC,aAAa,GAAkBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAChDC,GAAG,GAAGN,eAAe;
|
|
1
|
+
{"version":3,"names":["_sentryLogger","require","_bluetoothError","_hexToBase","_btPairingRetry","MAX_WRITE_ATTEMPTS","DEFAULT_ATT_MTU","ATT_WRITE_HEADER_BYTES","BTCommandWriter","pendingWrites","Promise","resolve","mtu","writeOnlyWithoutResponse","Map","constructor","device","onError","isNormalDisconnect","retryAfterPairing","runOnce","useNegotiatedMtu","Number","isInteger","reset","send","commands","then","writeInOrder","catch","error","command","writeCommand","delayBeforeWriteMs","setTimeout","chunk","chunksOf","frame","written","writeChunk","writeTo","value","withoutResponse","acceptsOnlyWithoutResponse","writeCharacteristicWithoutResponseForService","serviceUuid","characteristicUuid","writeCharacteristicWithResponseForService","key","toLowerCase","known","get","lookup","readAcceptsOnlyWithoutResponse","set","characteristics","characteristicsForService","characteristic","find","uuid","Boolean","isWritableWithoutResponse","isWritableWithResponse","size","Math","max","chunks","start","length","push","slice","attempt","isConnected","sentryLogger","hexToBase64","join","message","toBluetoothError","expectedEnd","test","errorCode","code","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-command-writer.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAEA,MAAMI,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,MAAMC,sBAAsB,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,CAAC;EACnBC,a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,OAAO,IAAIlE,kBAAkB,EAAEkE,OAAO,EAAE,EAAE;MAC9D,IAAI;QACF,MAAMC,WAAW,GAAG,MAAM,IAAI,CAACxD,MAAM,CAACwD,WAAW,CAAC,CAAC;QAEnD,IAAI,CAACA,WAAW,EAAE;UAChB,IAAAC,0BAAY,EAAC,MAAM,EAAE,yCAAyC,CAAC;UAE/D,OAAO,KAAK;QACd;QAEA,MAAM,IAAI,CAACtD,iBAAiB,CAAC,MAC3B,IAAI,CAACqB,OAAO,CAACT,OAAO,EAAE,IAAA2C,sBAAW,EAACvC,KAAK,CAACwC,IAAI,CAAC,EAAE,CAAC,CAAC,CACnD,CAAC;QAED,OAAO,IAAI;MACb,CAAC,CAAC,OAAO7C,KAAK,EAAE;QACd,MAAM8C,OAAO,GAAG,IAAAC,gCAAgB,EAAC/C,KAAK,CAAC,CAAC8C,OAAO;QAE/C,MAAME,WAAW,GACf,IAAI,CAAC5D,kBAAkB,GAAG,CAAC,KAAK,IAAI,IACpC,6BAA6B,CAAC6D,IAAI,CAACH,OAAO,CAAC;QAE7C,IAAAH,0BAAY,EAACK,WAAW,GAAG,MAAM,GAAG,OAAO,EAAE,+BAA+B,EAAE;UAC5EE,SAAS,EAAE,IAAAH,gCAAgB,EAAC/C,KAAK,CAAC,CAACmD;QACrC,CAAC,CAAC;MAEJ;IACF;IAEA,OAAO,KAAK;EACd,CAAC;AACH;AAACC,OAAA,CAAA1E,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -133,7 +133,7 @@ class BTDataProcessor {
|
|
|
133
133
|
handleFrame = (uuid, frame) => {
|
|
134
134
|
const data = this.frameParser.parse(uuid, frame);
|
|
135
135
|
if (!data) {
|
|
136
|
-
(0, _sentryLogger.sentryLogger)("
|
|
136
|
+
(0, _sentryLogger.sentryLogger)("debug", "BT_MANAGER: Frame matched no declared case", {
|
|
137
137
|
uuid,
|
|
138
138
|
frameLength: frame.length
|
|
139
139
|
});
|
|
@@ -179,7 +179,7 @@ class BTDataProcessor {
|
|
|
179
179
|
message: "Device is stuck"
|
|
180
180
|
}
|
|
181
181
|
}));
|
|
182
|
-
this.
|
|
182
|
+
this.cancelConnection(_measurementFeedback.MeasurementFeedbackKey.STUCK);
|
|
183
183
|
}, this.stuckDataTimeoutDuration);
|
|
184
184
|
};
|
|
185
185
|
startCommandTimeout = () => {
|
|
@@ -198,10 +198,18 @@ class BTDataProcessor {
|
|
|
198
198
|
}
|
|
199
199
|
if (result?.terminal) {
|
|
200
200
|
this.callbacks.onError?.(new Error(_measurementFeedback.MeasurementFeedbackKey.COMMAND_TIMEOUT));
|
|
201
|
-
|
|
201
|
+
this.cancelConnection(_measurementFeedback.MeasurementFeedbackKey.COMMAND_TIMEOUT);
|
|
202
202
|
}
|
|
203
203
|
}, duration);
|
|
204
204
|
};
|
|
205
|
+
|
|
206
|
+
/** Ends the link from this side, logged so it is never mistaken for the device hanging up. */
|
|
207
|
+
cancelConnection = reason => {
|
|
208
|
+
(0, _sentryLogger.sentryLogger)("warning", "BT_MANAGER: Cancelling the connection", {
|
|
209
|
+
reason
|
|
210
|
+
});
|
|
211
|
+
void this.device.cancelConnection?.();
|
|
212
|
+
};
|
|
205
213
|
}
|
|
206
214
|
exports.BTDataProcessor = BTDataProcessor;
|
|
207
215
|
//# sourceMappingURL=bt-data-processor.js.map
|