@ovok/native 1.16.1-rc.5 → 1.16.1-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
- package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +21 -10
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
- package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +12 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +78 -19
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +11 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +48 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +115 -26
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +32 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +73 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +130 -30
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +75 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +67 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +57 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js +46 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js +27 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -20
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +47 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/device-waveform.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js +23 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js +15 -8
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/commonjs/modules/data-sync/constants.js +4 -1
- package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js +6 -9
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +8 -7
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js +47 -0
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +14 -6
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +68 -0
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +43 -86
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +6 -5
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js +11 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js +64 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js +20 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js +21 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js +59 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +20 -11
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/connections.js +45 -2
- package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/readings.js +10 -2
- package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js +37 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/module/modules/auth/google-return-page/index.js +21 -0
- package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/module/modules/auth/index.js +2 -1
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +1 -1
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/index.js +2 -0
- package/lib/module/modules/auth/sign-in/index.js.map +1 -1
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +77 -19
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +11 -3
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +48 -3
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +115 -26
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +28 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +69 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +129 -30
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +72 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +109 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +64 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js +51 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +53 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js +42 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js +22 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -21
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +44 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-waveform.js +4 -0
- package/lib/module/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js +18 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
- package/lib/module/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/module/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js +16 -9
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js +2 -2
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/module/modules/data-sync/constants.js +4 -1
- package/lib/module/modules/data-sync/constants.js.map +1 -1
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js +7 -10
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +8 -7
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js +43 -0
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +14 -6
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/default-health-coding.js +65 -0
- package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +44 -87
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +5 -4
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-units.js +11 -1
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js +59 -0
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js +16 -0
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js +17 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js +52 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-series.js +19 -10
- package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/connections.js +45 -2
- package/lib/module/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/readings.js +10 -2
- package/lib/module/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/module/modules/next/bluetooth/runtime.js +37 -1
- package/lib/module/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/package.json +8 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getHealthObservationDevice } from "./health-observation-device.js";
|
|
4
|
+
/** The device a HealthKit sample came from, and the interval it was recorded over. */
|
|
5
|
+
const getHealthKitSampleSource = sample => ({
|
|
6
|
+
device: sample ? getHealthObservationDevice({
|
|
7
|
+
manufacturer: sample.device?.manufacturer,
|
|
8
|
+
model: sample.device?.model,
|
|
9
|
+
sourceApp: sample.sourceRevision?.source?.name
|
|
10
|
+
}) : undefined,
|
|
11
|
+
timing: {
|
|
12
|
+
start: sample?.startDate,
|
|
13
|
+
end: sample?.endDate
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export { getHealthKitSampleSource };
|
|
17
|
+
//# sourceMappingURL=healthkit-sample-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getHealthObservationDevice","getHealthKitSampleSource","sample","device","manufacturer","model","sourceApp","sourceRevision","source","name","undefined","timing","start","startDate","end","endDate"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/healthkit-sample-source.ts"],"mappings":";;AAEA,SAASA,0BAA0B,QAAQ,gCAA6B;AAQxE;AACA,MAAMC,wBAAwB,GAC5BC,MAAyC,KAClB;EACvBC,MAAM,EAAED,MAAM,GACVF,0BAA0B,CAAC;IACzBI,YAAY,EAAEF,MAAM,CAACC,MAAM,EAAEC,YAAY;IACzCC,KAAK,EAAEH,MAAM,CAACC,MAAM,EAAEE,KAAK;IAC3BC,SAAS,EAAEJ,MAAM,CAACK,cAAc,EAAEC,MAAM,EAAEC;EAC5C,CAAC,CAAC,GACFC,SAAS;EACbC,MAAM,EAAE;IAAEC,KAAK,EAAEV,MAAM,EAAEW,SAAS;IAAEC,GAAG,EAAEZ,MAAM,EAAEa;EAAQ;AAC3D,CAAC,CAAC;AAEF,SAASd,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const METERS_PER_KILOMETER = 1000;
|
|
4
|
+
const KILOMETER_UNIT = "km";
|
|
5
|
+
const METER_UNITS = new Set(["m", "meters"]);
|
|
6
|
+
|
|
7
|
+
/** Fields v16 adds to every sample; earlier versions did not return them, and they would end up in the stored record. */
|
|
8
|
+
const ADDED_SAMPLE_FIELDS = new Set(["sampleType", "hasUndeterminedDuration"]);
|
|
9
|
+
|
|
10
|
+
/** Apple's reading of a recording; the SDK imports what was measured, not an interpretation of it. */
|
|
11
|
+
const ECG_INTERPRETATION_FIELDS = new Set([...ADDED_SAMPLE_FIELDS, "classification", "symptomsStatus"]);
|
|
12
|
+
const withoutFields = (sample, fields) => Object.fromEntries(Object.entries(sample).filter(([field]) => !fields.has(field)));
|
|
13
|
+
const toPlainSample = sample => withoutFields(sample, ADDED_SAMPLE_FIELDS);
|
|
14
|
+
const toPlainCorrelation = correlation => ({
|
|
15
|
+
...toPlainSample(correlation),
|
|
16
|
+
objects: correlation.objects.map(toPlainSample)
|
|
17
|
+
});
|
|
18
|
+
const toEcgRecord = sample => withoutFields(sample, ECG_INTERPRETATION_FIELDS);
|
|
19
|
+
|
|
20
|
+
/** v16 gives the distance in metres; the record keeps the kilometres it was read in before. */
|
|
21
|
+
const toKilometers = distance => distance && METER_UNITS.has(distance.unit) ? {
|
|
22
|
+
quantity: distance.quantity / METERS_PER_KILOMETER,
|
|
23
|
+
unit: KILOMETER_UNIT
|
|
24
|
+
} : distance;
|
|
25
|
+
const toIsoDates = ({
|
|
26
|
+
startDate,
|
|
27
|
+
endDate
|
|
28
|
+
}) => ({
|
|
29
|
+
startDate: startDate.toISOString(),
|
|
30
|
+
endDate: endDate.toISOString()
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** A v16 workout is a native object that spreads to nothing: read it with `toJSON()` into the shape v8 returned. */
|
|
34
|
+
const toWorkoutRecord = workout => {
|
|
35
|
+
const sample = workout.toJSON();
|
|
36
|
+
return {
|
|
37
|
+
...toPlainSample(sample),
|
|
38
|
+
duration: sample.duration.quantity,
|
|
39
|
+
totalDistance: toKilometers(sample.totalDistance),
|
|
40
|
+
events: (sample.events ?? []).map(event => ({
|
|
41
|
+
type: event.type,
|
|
42
|
+
...toIsoDates(event)
|
|
43
|
+
})),
|
|
44
|
+
activities: (sample.activities ?? []).map(activity => ({
|
|
45
|
+
...toIsoDates(activity),
|
|
46
|
+
uuid: activity.uuid,
|
|
47
|
+
duration: activity.duration
|
|
48
|
+
}))
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export { toEcgRecord, toPlainCorrelation, toPlainSample, toWorkoutRecord };
|
|
52
|
+
//# sourceMappingURL=healthkit-samples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["METERS_PER_KILOMETER","KILOMETER_UNIT","METER_UNITS","Set","ADDED_SAMPLE_FIELDS","ECG_INTERPRETATION_FIELDS","withoutFields","sample","fields","Object","fromEntries","entries","filter","field","has","toPlainSample","toPlainCorrelation","correlation","objects","map","toEcgRecord","toKilometers","distance","unit","quantity","toIsoDates","startDate","endDate","toISOString","toWorkoutRecord","workout","toJSON","duration","totalDistance","events","event","type","activities","activity","uuid"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/healthkit-samples.ts"],"mappings":";;AAMA,MAAMA,oBAAoB,GAAG,IAAI;AACjC,MAAMC,cAAc,GAAG,IAAI;AAC3B,MAAMC,WAAgC,GAAG,IAAIC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;;AAEjE;AACA,MAAMC,mBAAwC,GAAG,IAAID,GAAG,CAAC,CACvD,YAAY,EACZ,yBAAyB,CAC1B,CAAC;;AAEF;AACA,MAAME,yBAA8C,GAAG,IAAIF,GAAG,CAAC,CAC7D,GAAGC,mBAAmB,EACtB,gBAAgB,EAChB,gBAAgB,CACjB,CAAC;AAEF,MAAME,aAAa,GAAGA,CAACC,MAAc,EAAEC,MAA2B,KAChEC,MAAM,CAACC,WAAW,CAChBD,MAAM,CAACE,OAAO,CAACJ,MAAM,CAAC,CAACK,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC,KAAK,CAACL,MAAM,CAACM,GAAG,CAACD,KAAK,CAAC,CAC/D,CAAC;AAEH,MAAME,aAAa,GAAIR,MAAc,IAC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CAAEmB,QAAQ,KAAM;MACvD,GAAGb,UAAU,CAACa,QAAQ,CAAC;MACvBC,IAAI,EAAED,QAAQ,CAACC,IAAI;MACnBP,QAAQ,EAAEM,QAAQ,CAACN;IACrB,CAAC,CAAC;EACJ,CAAC;AACH,CAAC;AAED,SACEZ,WAAW,EACXJ,kBAAkB,EAClBD,aAAa,EACbc,eAAe","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import Healthkit
|
|
4
|
-
import { SERIES_SLOT_MS } from "../constants.js";
|
|
3
|
+
import Healthkit from "@kingstinct/react-native-healthkit";
|
|
5
4
|
import { healthUnitFor } from "./health-units.js";
|
|
6
5
|
import { finishedHourWindows, toHourlySeries } from "./hourly-series.js";
|
|
7
6
|
|
|
@@ -19,17 +18,27 @@ const getHealthKitSeries = async (typeIdentifier, startDate) => {
|
|
|
19
18
|
from,
|
|
20
19
|
to
|
|
21
20
|
} of finishedHourWindows(startDate)) {
|
|
22
|
-
const statistics = await Healthkit.queryStatisticsCollectionForQuantity(typeIdentifier, [
|
|
21
|
+
const statistics = await Healthkit.queryStatisticsCollectionForQuantity(typeIdentifier, ["discreteAverage"], from, {
|
|
23
22
|
minute: 1
|
|
24
|
-
},
|
|
23
|
+
}, {
|
|
24
|
+
unit,
|
|
25
|
+
filter: {
|
|
26
|
+
date: {
|
|
27
|
+
startDate: from,
|
|
28
|
+
endDate: to
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
25
32
|
|
|
26
|
-
//
|
|
27
|
-
statistics.forEach((
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
// HealthKit may leave minutes without a value out, so each is placed by its own start, not its position.
|
|
34
|
+
statistics.forEach(({
|
|
35
|
+
startDate: start,
|
|
36
|
+
averageQuantity
|
|
37
|
+
}) => {
|
|
38
|
+
if (start && start >= from && start < to && averageQuantity) {
|
|
30
39
|
minutes.push({
|
|
31
|
-
start
|
|
32
|
-
value:
|
|
40
|
+
start,
|
|
41
|
+
value: averageQuantity.quantity * scale
|
|
33
42
|
});
|
|
34
43
|
}
|
|
35
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Healthkit","
|
|
1
|
+
{"version":3,"names":["Healthkit","healthUnitFor","finishedHourWindows","toHourlySeries","getHealthKitSeries","typeIdentifier","startDate","unit","scale","minutes","from","to","statistics","queryStatisticsCollectionForQuantity","minute","filter","date","endDate","forEach","start","averageQuantity","push","value","quantity","data","anchor","undefined"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/healthkit-series.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAAkC,oCAAoC;AAItF,SAASC,aAAa,QAAQ,mBAAgB;AAC9C,SAASC,mBAAmB,EAAeC,cAAc,QAAQ,oBAAiB;;AAElF;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,MAAAA,CACzBC,cAAsC,EACtCC,SAAe,KAC8C;EAC7D,MAAMC,IAAI,GAAGN,aAAa,CAACI,cAAc,CAAC;;EAE1C;EACA,MAAMG,KAAK,GAAGD,IAAI,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;EACpC,MAAME,OAAsB,GAAG,EAAE;EAEjC,KAAK,MAAM;IAAEC,IAAI;IAAEC;EAAG,CAAC,IAAIT,mBAAmB,CAACI,SAAS,CAAC,EAAE;IACzD,MAAMM,UAAU,GAAG,MAAMZ,SAAS,CAACa,oCAAoC,CACrER,cAAc,EACd,CAAC,iBAAiB,CAAC,EACnBK,IAAI,EACJ;MAAEI,MAAM,EAAE;IAAE,CAAC,EACb;MAAEP,IAAI;MAAEQ,MAAM,EAAE;QAAEC,IAAI,EAAE;UAAEV,SAAS,EAAEI,IAAI;UAAEO,OAAO,EAAEN;QAAG;MAAE;IAAE,CAC7D,CAAC;;IAED;IACAC,UAAU,CAACM,OAAO,CAAC,CAAC;MAAEZ,SAAS,EAAEa,KAAK;MAAEC;IAAgB,CAAC,KAAK;MAC5D,IAAID,KAAK,IAAIA,KAAK,IAAIT,IAAI,IAAIS,KAAK,GAAGR,EAAE,IAAIS,eAAe,EAAE;QAC3DX,OAAO,CAACY,IAAI,CAAC;UAAEF,KAAK;UAAEG,KAAK,EAAEF,eAAe,CAACG,QAAQ,GAAGf;QAAM,CAAC,CAAC;MAClE;IACF,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEgB,IAAI,EAAErB,cAAc,CAACE,cAAc,EAAEE,IAAI,IAAI,GAAG,EAAEE,OAAO,CAAC;IAAEgB,MAAM,EAAEC;EAAU,CAAC;AAC1F,CAAC;AAED,SAAStB,kBAAkB","ignoreList":[]}
|
|
@@ -6,9 +6,19 @@ import { gattDriver } from "../driver.js";
|
|
|
6
6
|
import { SIG_PROTOCOLS } from "../sig-profiles.js";
|
|
7
7
|
import { legacyDriver } from "./legacy-driver.js";
|
|
8
8
|
|
|
9
|
+
/** Options for `builtInDevices`. */
|
|
10
|
+
|
|
11
|
+
const asyncStorage = storage => ({
|
|
12
|
+
getItem: async key => storage.getItem(key),
|
|
13
|
+
setItem: async (key, value) => storage.setItem(key, value)
|
|
14
|
+
});
|
|
15
|
+
|
|
9
16
|
/** Support for the SDK's integrated devices and `defineCustomDevice` declarations, over `react-native-ble-plx`. */
|
|
10
|
-
const builtInDevices = accepted
|
|
17
|
+
const builtInDevices = (accepted, {
|
|
18
|
+
recordCursorStorage
|
|
19
|
+
} = {}) => {
|
|
11
20
|
const creator = new DeviceCreator(accepted);
|
|
21
|
+
const storage = recordCursorStorage && asyncStorage(recordCursorStorage);
|
|
12
22
|
return {
|
|
13
23
|
match: ({
|
|
14
24
|
name,
|
|
@@ -22,7 +32,7 @@ const builtInDevices = accepted => {
|
|
|
22
32
|
const protocol = SIG_PROTOCOLS.get(key);
|
|
23
33
|
return {
|
|
24
34
|
key,
|
|
25
|
-
driver: protocol ? gattDriver(key, protocol) : legacyDriver(creator, key)
|
|
35
|
+
driver: protocol ? gattDriver(key, protocol) : legacyDriver(creator, key, storage)
|
|
26
36
|
};
|
|
27
37
|
}
|
|
28
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveDeviceKey","DeviceCreator","gattDriver","SIG_PROTOCOLS","legacyDriver","builtInDevices","accepted","creator","match","name","serviceUUIDs","manufacturerData","
|
|
1
|
+
{"version":3,"names":["resolveDeviceKey","DeviceCreator","gattDriver","SIG_PROTOCOLS","legacyDriver","asyncStorage","storage","getItem","key","setItem","value","builtInDevices","accepted","recordCursorStorage","creator","match","name","serviceUUIDs","manufacturerData","undefined","protocol","get","driver"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/built-in-devices.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,mDAAgD;AACjF,SAASC,aAAa,QAAQ,mDAAgD;AAI9E,SAASC,UAAU,QAAQ,cAAW;AACtC,SAASC,aAAa,QAAQ,oBAAiB;AAE/C,SAASC,YAAY,QAAQ,oBAAiB;;AAE9C;;AAWA,MAAMC,YAAY,GAAIC,OAAoB,KAA6B;EACrEC,OAAO,EAAE,MAAOC,GAAG,IAAKF,OAAO,CAACC,OAAO,CAACC,GAAG,CAAC;EAC5CC,OAAO,EAAE,MAAAA,CAAOD,GAAG,EAAEE,KAAK,KAAKJ,OAAO,CAACG,OAAO,CAACD,GAAG,EAAEE,KAAK;AAC3D,CAAC,CAAC;;AAEF;AACA,MAAMC,cAAc,GAAGA,CACrBC,QAAmC,EACnC;EAAEC;AAA2C,CAAC,GAAG,CAAC,CAAC,KACjC;EAClB,MAAMC,OAAO,GAAG,IAAIb,aAAa,CAACW,QAAQ,CAAC;EAC3C,MAAMN,OAAO,GAAGO,mBAAmB,IAAIR,YAAY,CAACQ,mBAAmB,CAAC;EAExE,OAAO;IACLE,KAAK,EAAEA,CAAC;MAAEC,IAAI;MAAEC,YAAY;MAAEC;IAAiB,CAAC,KAAK;MACnD,MAAMV,GAAG,GAAGR,gBAAgB,CAACY,QAAQ,EAAEI,IAAI,EAAEC,YAAY,EAAEC,gBAAgB,IAAIC,SAAS,CAAC;MAEzF,IAAIX,GAAG,KAAKW,SAAS,EAAE;QACrB,OAAOA,SAAS;MAClB;MAEA,MAAMC,QAAQ,GAAGjB,aAAa,CAACkB,GAAG,CAACb,GAAG,CAAC;MAEvC,OAAO;QAAEA,GAAG;QAAEc,MAAM,EAAEF,QAAQ,GAAGlB,UAAU,CAACM,GAAG,EAAEY,QAAQ,CAAC,GAAGhB,YAAY,CAACU,OAAO,EAAEN,GAAG,EAAEF,OAAO;MAAE,CAAC;IACpG;EACF,CAAC;AACH,CAAC;AAED,SAASK,cAAc","ignoreList":[]}
|
|
@@ -12,7 +12,7 @@ const STATUSES = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
/** Runs a device class from `@ovok/native/bt-management` until its protocol moves to a `DeviceProtocol`. */
|
|
15
|
-
const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
|
|
15
|
+
const legacyDriver = (creator, deviceName, recordCursorStorage) => (peripheral, signal) => {
|
|
16
16
|
const stop = () => events.end();
|
|
17
17
|
const events = new Channel(() => {
|
|
18
18
|
signal.removeEventListener("abort", stop);
|
|
@@ -21,17 +21,19 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
|
|
|
21
21
|
const managed = creator.createDevice({
|
|
22
22
|
device: bleDeviceOf(peripheral),
|
|
23
23
|
deviceName,
|
|
24
|
+
recordCursorStorage,
|
|
24
25
|
onResult: ({
|
|
25
26
|
id,
|
|
26
27
|
data
|
|
27
|
-
}) => {
|
|
28
|
+
}) => new Promise(delivered => {
|
|
28
29
|
const reading = data;
|
|
29
30
|
events.push({
|
|
30
31
|
kind: "reading",
|
|
31
32
|
id: isTimestamped(reading) ? id : null,
|
|
32
|
-
reading
|
|
33
|
+
reading,
|
|
34
|
+
delivered
|
|
33
35
|
});
|
|
34
|
-
},
|
|
36
|
+
}),
|
|
35
37
|
onDeviceStatusChanged: ({
|
|
36
38
|
status
|
|
37
39
|
}) => {
|
|
@@ -51,8 +53,40 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
|
|
|
51
53
|
}) => events.push({
|
|
52
54
|
kind: "error",
|
|
53
55
|
error: fromBleError(error)
|
|
54
|
-
})
|
|
56
|
+
}),
|
|
57
|
+
onWaveform: ({
|
|
58
|
+
samples,
|
|
59
|
+
sampleRateHz,
|
|
60
|
+
millivoltsPerCount,
|
|
61
|
+
at
|
|
62
|
+
}) => events.push({
|
|
63
|
+
kind: "waveform",
|
|
64
|
+
waveform: {
|
|
65
|
+
samples,
|
|
66
|
+
sampleRateHz,
|
|
67
|
+
millivoltsPerCount,
|
|
68
|
+
at
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
onConnectionEvent: ({
|
|
72
|
+
kind,
|
|
73
|
+
recording
|
|
74
|
+
}) => {
|
|
75
|
+
if (kind === "recording") {
|
|
76
|
+
events.push({
|
|
77
|
+
kind: "recording",
|
|
78
|
+
recording: recording ?? null,
|
|
79
|
+
stop: () => managed.stopRecording()
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
55
83
|
});
|
|
84
|
+
if (managed.readsHistoryOnRequest) {
|
|
85
|
+
events.push({
|
|
86
|
+
kind: "history",
|
|
87
|
+
sync: () => managed.syncHistory()
|
|
88
|
+
});
|
|
89
|
+
}
|
|
56
90
|
signal.addEventListener("abort", stop, {
|
|
57
91
|
once: true
|
|
58
92
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeviceStatus","Channel","isTimestamped","fromBleError","bleDeviceOf","STATUSES","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","removeEventListener","managed","disconnect","createDevice","device","onResult","id","data","reading","push","kind","onDeviceStatusChanged","status","mapped","onError","error","addEventListener","once","connect","catch","fail"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["DeviceStatus","Channel","isTimestamped","fromBleError","bleDeviceOf","STATUSES","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","recordCursorStorage","peripheral","signal","stop","events","end","removeEventListener","managed","disconnect","createDevice","device","onResult","id","data","Promise","delivered","reading","push","kind","onDeviceStatusChanged","status","mapped","onError","error","onWaveform","samples","sampleRateHz","millivoltsPerCount","at","waveform","onConnectionEvent","recording","stopRecording","readsHistoryOnRequest","sync","syncHistory","addEventListener","once","connect","catch","fail"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;AAMA,SAASA,YAAY,QAAQ,+CAA4C;AACzE,SAASC,OAAO,QAAQ,eAAY;AACpC,SAA8BC,aAAa,QAAQ,cAAW;AAE9D,SAASC,YAAY,QAAQ,iBAAc;AAC3C,SAASC,WAAW,QAAQ,qBAAkB;AAE9C,MAAMC,QAAmF,GAAG;EAC1F,CAACL,YAAY,CAACM,SAAS,GAAG,WAAW;EACrC,CAACN,YAAY,CAACO,SAAS,GAAG,WAAW;EACrC,CAACP,YAAY,CAACQ,YAAY,GAAG;AAC/B,CAAC;;AAED;AACA,MAAMC,YAAY,GAAGA,CACnBC,OAAiD,EACjDC,UAAqB,EACrBC,mBAA2C,KAE3C,CAACC,UAAU,EAAEC,MAAM,KAAK;EACtB,MAAMC,IAAI,GAAGA,CAAA,KAAMC,MAAM,CAACC,GAAG,CAAC,CAAC;EAE/B,MAAMD,MAAM,GAAG,IAAIf,OAAO,CAAc,MAAM;IAC5Ca,MAAM,CAACI,mBAAmB,CAAC,OAAO,EAAEH,IAAI,CAAC;IACzC,KAAKI,OAAO,CAACC,UAAU,CAAC,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMD,OAAO,GAAGT,OAAO,CAACW,YAAY,CAAC;IACnCC,MAAM,EAAElB,WAAW,CAACS,UAAU,CAAC;IAC/BF,UAAU;IACVC,mBAAmB;IACnBW,QAAQ,EAAEA,CAAC;MAAEC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AAI;UAAE5B,IAAI,EAAEA,CAAA,KAAMI,OAAO,CAACyB,aAAa,CAAC;QAAE,CAAC,CAAC;MACvG;IACF;EACF,CAAC,CAAC;EAEF,IAAIzB,OAAO,CAAC0B,qBAAqB,EAAE;IACjC7B,MAAM,CAACa,IAAI,CAAC;MAAEC,IAAI,EAAE,SAAS;MAAEgB,IAAI,EAAEA,CAAA,KAAM3B,OAAO,CAAC4B,WAAW,CAAC;IAAE,CAAC,CAAC;EACrE;EAEAjC,MAAM,CAACkC,gBAAgB,CAAC,OAAO,EAAEjC,IAAI,EAAE;IAAEkC,IAAI,EAAE;EAAK,CAAC,CAAC;EACtD9B,OAAO,CAAC+B,OAAO,CAAC,CAAC,CAACC,KAAK,CAAEhB,KAAc,IAAKnB,MAAM,CAACoC,IAAI,CAACjD,YAAY,CAACgC,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOnB,MAAM;AACf,CAAC;AAEH,SAASP,YAAY","ignoreList":[]}
|
|
@@ -7,11 +7,14 @@ const endedBeforeConnecting = () => new BluetoothError("connection-failed", "The
|
|
|
7
7
|
/** One driver run per connected device, its events folded into the snapshot. */
|
|
8
8
|
class Connections {
|
|
9
9
|
sessions = new Map();
|
|
10
|
-
|
|
10
|
+
recordingStops = new Map();
|
|
11
|
+
historySyncs = new Map();
|
|
12
|
+
constructor(store, readings, policy, onEnded, onWaveform) {
|
|
11
13
|
this.store = store;
|
|
12
14
|
this.readings = readings;
|
|
13
15
|
this.policy = policy;
|
|
14
16
|
this.onEnded = onEnded;
|
|
17
|
+
this.onWaveform = onWaveform;
|
|
15
18
|
}
|
|
16
19
|
isActive(id) {
|
|
17
20
|
return this.sessions.has(id);
|
|
@@ -32,6 +35,26 @@ class Connections {
|
|
|
32
35
|
await session?.ended;
|
|
33
36
|
}
|
|
34
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Stops the recording a connected device holds open.
|
|
40
|
+
*
|
|
41
|
+
* @throws BluetoothError `no-open-recording` when the device holds none.
|
|
42
|
+
*/
|
|
43
|
+
async stopRecording(id) {
|
|
44
|
+
const stop = this.recordingStops.get(id);
|
|
45
|
+
if (!stop || !this.store.device(id)?.recording) {
|
|
46
|
+
throw new BluetoothError("no-open-recording", "The device holds no open recording to stop");
|
|
47
|
+
}
|
|
48
|
+
await stop().catch(error => {
|
|
49
|
+
throw asBluetoothError(error, "no-open-recording");
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Reads the records a connected device stored, when it keeps them until asked. */
|
|
54
|
+
async syncHistory(id) {
|
|
55
|
+
await this.historySyncs.get(id)?.();
|
|
56
|
+
}
|
|
57
|
+
|
|
35
58
|
/** Disconnects every device; resolves once every connection has ended. */
|
|
36
59
|
async disconnectAll() {
|
|
37
60
|
await Promise.all([...this.sessions.keys()].map(id => this.disconnect(id)));
|
|
@@ -67,6 +90,11 @@ class Connections {
|
|
|
67
90
|
failConnecting(failure);
|
|
68
91
|
}).finally(() => {
|
|
69
92
|
this.sessions.delete(id);
|
|
93
|
+
this.recordingStops.delete(id);
|
|
94
|
+
this.historySyncs.delete(id);
|
|
95
|
+
this.store.updateDevice(id, {
|
|
96
|
+
recording: undefined
|
|
97
|
+
});
|
|
70
98
|
this.onEnded(id);
|
|
71
99
|
});
|
|
72
100
|
const session = {
|
|
@@ -94,10 +122,25 @@ class Connections {
|
|
|
94
122
|
this.store.updateDevice(id, {
|
|
95
123
|
information: event.information
|
|
96
124
|
});
|
|
125
|
+
} else if (event.kind === "waveform") {
|
|
126
|
+
this.onWaveform({
|
|
127
|
+
deviceId: id,
|
|
128
|
+
...event.waveform
|
|
129
|
+
});
|
|
130
|
+
} else if (event.kind === "recording") {
|
|
131
|
+
this.recordingStops.set(id, event.stop);
|
|
132
|
+
this.store.updateDevice(id, {
|
|
133
|
+
recording: event.recording ?? undefined
|
|
134
|
+
});
|
|
135
|
+
} else if (event.kind === "history") {
|
|
136
|
+
this.historySyncs.set(id, event.sync);
|
|
137
|
+
this.store.updateDevice(id, {
|
|
138
|
+
readsHistoryOnRequest: true
|
|
139
|
+
});
|
|
97
140
|
} else if (event.kind === "reading") {
|
|
98
141
|
const device = this.store.device(id);
|
|
99
142
|
if (device) {
|
|
100
|
-
this.readings.receive(device, event.id, event.reading);
|
|
143
|
+
this.readings.receive(device, event.id, event.reading, event.delivered);
|
|
101
144
|
}
|
|
102
145
|
} else {
|
|
103
146
|
this.store.updateDevice(id, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["asBluetoothError","BluetoothError","keepReadings","endedBeforeConnecting","Connections","sessions","Map","constructor","store","readings","policy","onEnded","isActive","id","has","connect","peripheral","driver","current","get","controller","signal","aborted","ended","start","connected","disconnect","session","abort","disconnectAll","Promise","all","keys","map","AbortController","markConnected","undefined","failConnecting","resolve","reject","updateDevice","connection","
|
|
1
|
+
{"version":3,"names":["asBluetoothError","BluetoothError","keepReadings","endedBeforeConnecting","Connections","sessions","Map","recordingStops","historySyncs","constructor","store","readings","policy","onEnded","onWaveform","isActive","id","has","connect","peripheral","driver","current","get","controller","signal","aborted","ended","start","connected","disconnect","session","abort","stopRecording","stop","device","recording","catch","error","syncHistory","disconnectAll","Promise","all","keys","map","AbortController","markConnected","undefined","failConnecting","resolve","reject","updateDevice","connection","run","then","failure","finally","delete","set","event","apply","kind","status","information","deviceId","waveform","sync","readsHistoryOnRequest","receive","reading","delivered"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/connections.ts"],"mappings":";;AACA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,aAAU;AAE3D,SAASC,YAAY,QAAsB,oBAAiB;AAO5D,MAAMC,qBAAqB,GAAGA,CAAA,KAC5B,IAAIF,cAAc,CAAC,mBAAmB,EAAE,6CAA6C,CAAC;;AAExF;AACA,MAAMG,WAAW,CAAC;EACCC,QAAQ,GAAG,IAAIC,GAAG,CAAkB,CAAC;EACrCC,cAAc,GAAG,IAAID,GAAG,CAA8B,CAAC;EACvDE,YAAY,GAAG,IAAIF,G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0C,KAAK,CAACO,IAAI,CAAC;MACrC,IAAI,CAACvD,KAAK,CAACwC,YAAY,CAAClC,EAAE,EAAE;QAAEkD,qBAAqB,EAAE;MAAK,CAAC,CAAC;IAC9D,CAAC,MAAM,IAAIR,KAAK,CAACE,IAAI,KAAK,SAAS,EAAE;MACnC,MAAM1B,MAAM,GAAG,IAAI,CAACxB,KAAK,CAACwB,MAAM,CAAClB,EAAE,CAAC;MAEpC,IAAIkB,MAAM,EAAE;QACV,IAAI,CAACvB,QAAQ,CAACwD,OAAO,CAACjC,MAAM,EAAEwB,KAAK,CAAC1C,EAAE,EAAE0C,KAAK,CAACU,OAAO,EAAEV,KAAK,CAACW,SAAS,CAAC;MACzE;IACF,CAAC,MAAM;MACL,IAAI,CAAC3D,KAAK,CAACwC,YAAY,CAAClC,EAAE,EAAE;QAAEqB,KAAK,EAAEqB,KAAK,CAACrB;MAAM,CAAC,CAAC;IACrD;EACF;AACF;AAEA,SAASjC,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stableHash","isTimestamped","reading","temporal","recordedAt","start","end","some","value","Date","readingId","key","peripheral","id","gattDriver","protocol","signal","link","openLink","kind","status","deviceInformation","information","close"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/driver.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["stableHash","isTimestamped","reading","temporal","recordedAt","start","end","some","value","Date","readingId","key","peripheral","id","gattDriver","protocol","signal","link","openLink","kind","status","deviceInformation","information","close"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/driver.ts"],"mappings":";;AAKA,SAASA,UAAU,QAAQ,kBAAe;;AAG1C;;AAoEA;;AAGA;;AAGA;AACA,MAAMC,aAAa,GAAIC,OAAoB,IAAc;EACvD,MAAMC,QAAQ,GAAGD,OAAmE;EAEpF,OAAO,CAACC,QAAQ,CAACC,UAAU,EAAED,QAAQ,CAACE,KAAK,EAAEF,QAAQ,CAACG,GAAG,CAAC,CAACC,IAAI,CAAEC,KAAK,IAAKA,KAAK,YAAYC,IAAI,CAAC;AACnG,CAAC;;AAED;AACA,MAAMC,SAAS,GAAGA,CAACC,GAAW,EAAEC,UAAsB,EAAEV,OAAoB,KAC1ED,aAAa,CAACC,OAAO,CAAC,GAAG,QAAQF,UAAU,CAAC;EAAEW,GAAG;EAAEC,UAAU,EAAEA,UAAU,CAACC,EAAE;EAAEX;AAAQ,CAAC,CAAC,EAAE,GAAG,IAAI;;AAEnG;AACA,MAAMY,UAAU,GAAGA,CAACH,GAAW,EAAEI,QAAwB,KACvD,iBAAiBH,UAAU,EAAEI,MAAM,EAAE;EACnC,MAAMC,IAAI,GAAG,MAAML,UAAU,CAACM,QAAQ,CAACF,MAAM,CAAC;EAE9C,IAAI;IACF,MAAM;MAAEG,IAAI,EAAE,QAAQ;MAAEC,MAAM,EAAE;IAAY,CAAC;IAC7C,IAAIH,IAAI,CAACI,iBAAiB,EAAE;MAC1B,MAAM;QAAEF,IAAI,EAAE,aAAa;QAAEG,WAAW,EAAEL,IAAI,CAACI;MAAkB,CAAC;IACpE;IACA,WAAW,MAAMnB,OAAO,IAAIa,QAAQ,CAACE,IAAI,CAAC,EAAE;MAC1C,MAAM;QAAEE,IAAI,EAAE,SAAS;QAAEN,EAAE,EAAEH,SAAS,CAACC,GAAG,EAAEC,UAAU,EAAEV,OAAO,CAAC;QAAEA;MAAQ,CAAC;IAC7E;IACA,MAAM;MAAEiB,IAAI,EAAE,QAAQ;MAAEC,MAAM,EAAE;IAAe,CAAC;EAClD,CAAC,SAAS;IACR,MAAMH,IAAI,CAACM,KAAK,CAAC,CAAC;EACpB;AACF,CAAC;AAEH,SAAST,UAAU,EAAEb,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BluetoothError","Error","name","constructor","code","message","cause","asBluetoothError","error","String"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/errors.ts"],"mappings":";;AAAA;;
|
|
1
|
+
{"version":3,"names":["BluetoothError","Error","name","constructor","code","message","cause","asBluetoothError","error","String"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/errors.ts"],"mappings":";;AAAA;;AAkBA;AACA,MAAMA,cAAc,SAASC,KAAK,CAAC;EACjC;EACgBC,IAAI,GAAG,gBAAgB;EAEhCC,WAAWA,CAEhB;EACgBC,IAAwB,EACxCC,OAAe,EACfC,KAAe,EACf;IACA,KAAK,CAACD,OAAO,EAAE;MAAEC;IAAM,CAAC,CAAC;IAAC,KAJVF,IAAwB,GAAxBA,IAAwB;EAK1C;AACF;;AAEA;AACA,MAAMG,gBAAgB,GAAGA,CAACC,KAAc,EAAEJ,IAAwB,KAChEI,KAAK,YAAYR,cAAc,GAC3BQ,KAAK,GACL,IAAIR,cAAc,CAACI,IAAI,EAAEI,KAAK,YAAYP,KAAK,GAAGO,KAAK,CAACH,OAAO,GAAGI,MAAM,CAACD,KAAK,CAAC,EAAEA,KAAK,CAAC;AAE7F,SAASD,gBAAgB,EAAEP,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BluetoothRuntime","BluetoothError","defineDevice","acceptedMemorySlots","dailyTotalsOnly","everyReading","firstReadingPerKind","keepReadings","policyByKind","SIG_PROTOCOLS","bleManagerScanner","builtInDevices","IntegratedDevices","osBluetoothPermissions","ovokReadingSink","createBluetoothRuntime","BluetoothProvider","useBluetooth","useBluetoothPermission","useBluetoothState","useMeasurements","useNearbyDevice","useNearbyDevices","usePairedDevices","useScanning","BluetoothDevicePicker"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,cAAW;AAE5C,SAASC,cAAc,QAAQ,aAAU;AAOzC,SAASC,YAAY,QAAQ,cAAW;AAIxC,SACEC,mBAAmB,EACnBC,eAAe,EACfC,YAAY,EACZC,mBAAmB,EACnBC,YAAY,EACZC,YAAY,QACP,oBAAiB;AAExB,SAASC,aAAa,QAAQ,mBAAgB;AAE9C,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,cAAc,QAAQ,+BAA4B;
|
|
1
|
+
{"version":3,"names":["BluetoothRuntime","BluetoothError","defineDevice","acceptedMemorySlots","dailyTotalsOnly","everyReading","firstReadingPerKind","keepReadings","policyByKind","SIG_PROTOCOLS","bleManagerScanner","builtInDevices","IntegratedDevices","osBluetoothPermissions","ovokReadingSink","createBluetoothRuntime","BluetoothProvider","useBluetooth","useBluetoothPermission","useBluetoothState","useMeasurements","useNearbyDevice","useNearbyDevices","usePairedDevices","useScanning","BluetoothDevicePicker"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,cAAW;AAE5C,SAASC,cAAc,QAAQ,aAAU;AAOzC,SAASC,YAAY,QAAQ,cAAW;AAIxC,SACEC,mBAAmB,EACnBC,eAAe,EACfC,YAAY,EACZC,mBAAmB,EACnBC,YAAY,EACZC,YAAY,QACP,oBAAiB;AAExB,SAASC,aAAa,QAAQ,mBAAgB;AAE9C,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,cAAc,QAAQ,+BAA4B;AAE3D,SAASC,iBAAiB,QAAQ,iDAA8C;AAEhF,SAASC,sBAAsB,QAAQ,kCAA+B;AACtE,SAASC,eAAe,QAAQ,6BAA0B;AAC1D,SAASC,sBAAsB,QAAQ,4CAAyC;AAGhF,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,oBAAiB;AAEjE,SACEC,sBAAsB,EACtBC,iBAAiB,EACjBC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,QACN,kBAAe;AACtB,SAASC,qBAAqB,QAAQ,oCAAiC","ignoreList":[]}
|
|
@@ -10,14 +10,15 @@ const saveFailed = error => new BluetoothError("save-failed", error instanceof E
|
|
|
10
10
|
/** Keeps the recent readings, each resend once, and saves every new one through the sink. */
|
|
11
11
|
class ReadingLog {
|
|
12
12
|
recent = new Set();
|
|
13
|
+
awaitingDelivery = new Map();
|
|
13
14
|
sequence = 0;
|
|
14
15
|
constructor(store, sink) {
|
|
15
16
|
this.store = store;
|
|
16
17
|
this.sink = sink;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
/** `id` is `null` for a reading that cannot be recognised when resent. */
|
|
20
|
-
receive(device, id, measurement) {
|
|
20
|
+
/** `id` is `null` for a reading that cannot be recognised when resent; `delivered` is called once it is saved or queued. */
|
|
21
|
+
receive(device, id, measurement, delivered) {
|
|
21
22
|
if (id !== null && !this.remember(id)) {
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
@@ -39,6 +40,9 @@ class ReadingLog {
|
|
|
39
40
|
this.store.set({
|
|
40
41
|
readings: [...this.store.get().readings, reading].slice(-KEPT_READINGS)
|
|
41
42
|
});
|
|
43
|
+
if (delivered) {
|
|
44
|
+
this.awaitingDelivery.set(reading.id, delivered);
|
|
45
|
+
}
|
|
42
46
|
void this.save(reading);
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -79,6 +83,10 @@ class ReadingLog {
|
|
|
79
83
|
status: "failed",
|
|
80
84
|
error: saveFailed(error)
|
|
81
85
|
}));
|
|
86
|
+
if (save.status !== "failed") {
|
|
87
|
+
this.awaitingDelivery.get(reading.id)?.();
|
|
88
|
+
this.awaitingDelivery.delete(reading.id);
|
|
89
|
+
}
|
|
82
90
|
this.store.updateReadings(current => current.id === reading.id ? {
|
|
83
91
|
...current,
|
|
84
92
|
save
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BluetoothError","KEPT_READINGS","RECOGNISED_READINGS","saveFailed","error","Error","message","String","ReadingLog","recent","Set","sequence","constructor","store","sink","receive","device","id","measurement","remember","receivedAt","Date","reading","getTime","key","name","information","save","status","set","readings","get","slice","retrySaves","failed","filter","updateReadings","includes","Promise","all","map","flushed","flushQueued","has","queueId","add","size","delete","values","next","value","then","result","current"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/readings.ts"],"mappings":";;AAEA,SAASA,cAAc,QAAQ,aAAU;AAKzC,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,UAAU,GAAIC,KAAc,IAChC,IAAIJ,cAAc,CAAC,aAAa,EAAEI,KAAK,YAAYC,KAAK,GAAGD,KAAK,CAACE,OAAO,GAAGC,MAAM,CAACH,KAAK,CAAC,EAAEA,KAAK,CAAC;;AAElG;AACA,MAAMI,UAAU,CAAC;EACEC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["BluetoothError","KEPT_READINGS","RECOGNISED_READINGS","saveFailed","error","Error","message","String","ReadingLog","recent","Set","awaitingDelivery","Map","sequence","constructor","store","sink","receive","device","id","measurement","delivered","remember","receivedAt","Date","reading","getTime","key","name","information","save","status","set","readings","get","slice","retrySaves","failed","filter","updateReadings","includes","Promise","all","map","flushed","flushQueued","has","queueId","add","size","delete","values","next","value","then","result","current"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/readings.ts"],"mappings":";;AAEA,SAASA,cAAc,QAAQ,aAAU;AAKzC,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,UAAU,GAAIC,KAAc,IAChC,IAAIJ,cAAc,CAAC,aAAa,EAAEI,KAAK,YAAYC,KAAK,GAAGD,KAAK,CAACE,OAAO,GAAGC,MAAM,CAACH,KAAK,CAAC,EAAEA,KAAK,CAAC;;AAElG;AACA,MAAMI,UAAU,CAAC;EACEC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC1BC,gBAAgB,GAAG,IAAIC,GAAG,CAAqB,CAAC;EACzDC,QAAQ,GAAG,CAAC;EAEbC,WAAWA,CAAk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OAAO,IAAI;EACb;EAEA,MAAcvB,IAAIA,CAACL,OAAsB,EAAiB;IACxD,MAAMK,IAAe,GAAG,MAAM,IAAI,CAACd,IAAI,CAACc,IAAI,CAACL,OAAO,CAAC,CAAC6B,IAAI,CACvDC,MAAkB,IAAgBA,MAAM,EACxCnD,KAAc,KAAiB;MAAE2B,MAAM,EAAE,QAAQ;MAAE3B,KAAK,EAAED,UAAU,CAACC,KAAK;IAAE,CAAC,CAChF,CAAC;IAED,IAAI0B,IAAI,CAACC,MAAM,KAAK,QAAQ,EAAE;MAC5B,IAAI,CAACpB,gBAAgB,CAACuB,GAAG,CAACT,OAAO,CAACN,EAAE,CAAC,GAAG,CAAC;MACzC,IAAI,CAACR,gBAAgB,CAACuC,MAAM,CAACzB,OAAO,CAACN,EAAE,CAAC;IAC1C;IAEA,IAAI,CAACJ,KAAK,CAACwB,cAAc,CAAEiB,OAAO,IAAMA,OAAO,CAACrC,EAAE,KAAKM,OAAO,CAACN,EAAE,GAAG;MAAE,GAAGqC,OAAO;MAAE1B;IAAK,CAAC,GAAG0B,OAAQ,CAAC;EACtG;AACF;AAEA,SAAShD,UAAU","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable max-lines */
|
|
4
|
+
|
|
3
5
|
import { AutoConnectBackoff } from "./auto-connect.js";
|
|
4
6
|
import { Connections } from "./connections.js";
|
|
5
7
|
import { matchDevice } from "./devices.js";
|
|
@@ -22,12 +24,13 @@ class BluetoothRuntime {
|
|
|
22
24
|
held = new Set();
|
|
23
25
|
backoff = new AutoConnectBackoff();
|
|
24
26
|
retryTimers = new Set();
|
|
27
|
+
waveformListeners = new Set();
|
|
25
28
|
scanRequest = 0;
|
|
26
29
|
disposed = false;
|
|
27
30
|
constructor(options) {
|
|
28
31
|
this.options = options;
|
|
29
32
|
this.readings = new ReadingLog(this.store, options.sink);
|
|
30
|
-
this.connections = new Connections(this.store, this.readings, options.resultPolicy ?? everyReading, id => this.connectionEnded(id));
|
|
33
|
+
this.connections = new Connections(this.store, this.readings, options.resultPolicy ?? everyReading, id => this.connectionEnded(id), waveform => this.waveformListeners.forEach(listener => listener(waveform)));
|
|
31
34
|
this.paired = new PairedDevices(paired => this.store.set({
|
|
32
35
|
paired
|
|
33
36
|
}), options.pairedStorage);
|
|
@@ -47,6 +50,12 @@ class BluetoothRuntime {
|
|
|
47
50
|
/** Calls `listener` after every state change; returns the unsubscribe. */
|
|
48
51
|
subscribe = listener => this.store.subscribe(listener);
|
|
49
52
|
|
|
53
|
+
/** Calls `listener` with the live ECG samples of recording devices, for display; returns the unsubscribe. */
|
|
54
|
+
subscribeWaveform = listener => {
|
|
55
|
+
this.waveformListeners.add(listener);
|
|
56
|
+
return () => this.waveformListeners.delete(listener);
|
|
57
|
+
};
|
|
58
|
+
|
|
50
59
|
/** Reads the permission without prompting. */
|
|
51
60
|
async checkPermission() {
|
|
52
61
|
return this.recordPermission(await this.options.permissions.check());
|
|
@@ -106,6 +115,33 @@ class BluetoothRuntime {
|
|
|
106
115
|
await this.connections.connect(peripheral, match.driver);
|
|
107
116
|
}
|
|
108
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Stops the recording a connected recorder holds open, for instance once the user confirms it while
|
|
120
|
+
* its `recording.leadOffSince` is set. The stored recording then arrives as a reading.
|
|
121
|
+
*
|
|
122
|
+
* @throws BluetoothError `no-open-recording` when the device holds none; `runtime-disposed` after `dispose`.
|
|
123
|
+
*/
|
|
124
|
+
async stopRecording(deviceId) {
|
|
125
|
+
this.assertLive();
|
|
126
|
+
await this.connections.stopRecording(deviceId);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Reads the records a device stored, connecting it first when it is not connected. One that
|
|
131
|
+
* `readsHistoryOnRequest` reads them over its connection, even while it measures; any other is
|
|
132
|
+
* reconnected, since it reads them each time it connects.
|
|
133
|
+
*
|
|
134
|
+
* @throws BluetoothError as `connect` does; `runtime-disposed` after `dispose`.
|
|
135
|
+
*/
|
|
136
|
+
async syncHistory(deviceId) {
|
|
137
|
+
this.assertLive();
|
|
138
|
+
if (this.connections.isActive(deviceId) && !this.store.device(deviceId)?.readsHistoryOnRequest) {
|
|
139
|
+
await this.disconnect(deviceId);
|
|
140
|
+
}
|
|
141
|
+
await this.connect(deviceId);
|
|
142
|
+
await this.connections.syncHistory(deviceId);
|
|
143
|
+
}
|
|
144
|
+
|
|
109
145
|
/** Disconnects a device; a paired one stays disconnected until `connect` or `pair` is called again. */
|
|
110
146
|
async disconnect(deviceId) {
|
|
111
147
|
this.held.add(deviceId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AutoConnectBackoff","Connections","matchDevice","BluetoothError","PairedDevices","ReadingLog","everyReading","ScanLoop","SnapshotStore","BluetoothRuntime","store","known","Map","held","Set","backoff","retryTimers","scanRequest","disposed","constructor","options","readings","sink","connections","resultPolicy","id","connectionEnded","paired","set","pairedStorage","scan","scanner","peripheral","found","unwatchAdapter","watchState","adapter","sync","checkPermission","catch","undefined","getSnapshot","get","subscribe","
|
|
1
|
+
{"version":3,"names":["AutoConnectBackoff","Connections","matchDevice","BluetoothError","PairedDevices","ReadingLog","everyReading","ScanLoop","SnapshotStore","BluetoothRuntime","store","known","Map","held","Set","backoff","retryTimers","waveformListeners","scanRequest","disposed","constructor","options","readings","sink","connections","resultPolicy","id","connectionEnded","waveform","forEach","listener","paired","set","pairedStorage","scan","scanner","peripheral","found","unwatchAdapter","watchState","adapter","sync","checkPermission","catch","undefined","getSnapshot","get","subscribe","subscribeWaveform","add","delete","recordPermission","permissions","check","requestPermission","request","openPermissionSettings","openSettings","startScan","assertLive","permission","scanning","stopScan","connect","deviceId","match","require","driver","stopRecording","syncHistory","isActive","device","readsHistoryOnRequest","disconnect","pair","forget","remove","retrySaves","dispose","close","clearTimeout","disconnectAll","devices","advertisement","key","name","connection","error","connectIfPaired","waiting","has","allows","succeeded","restartScan","timer","setTim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AC6E,SAAS,CAAClE,EAAE,CAAC;MAC1B,IAAI,CAACmE,WAAW,CAAC,CAAC;MAElB;IACF;IAEA,MAAMC,KAAK,GAAGC,UAAU,CAAC,MAAM;MAC7B,IAAI,CAAC/E,WAAW,CAACkC,MAAM,CAAC4C,KAAK,CAAC;MAC9B,IAAI,CAACD,WAAW,CAAC,CAAC;IACpB,CAAC,EAAE,IAAI,CAAC9E,OAAO,CAACiF,MAAM,CAACtE,EAAE,CAAC,CAAC;IAE3B,IAAI,CAACV,WAAW,CAACiC,GAAG,CAAC6C,KAAK,CAAC;EAC7B;EAEQD,WAAWA,CAAA,EAAS;IAC1B,IAAI,IAAI,CAAC3D,IAAI,CAAC+D,OAAO,EAAE;MACrB,IAAI,CAAC/D,IAAI,CAACgE,OAAO,CAAC,CAAC;IACrB;EACF;EAEQhC,OAAOA,CAACF,QAAgB,EAAe;IAC7C,MAAMO,MAAM,GAAG,IAAI,CAAC5D,KAAK,CAACmC,GAAG,CAACkB,QAAQ,CAAC;IAEvC,IAAI,CAACO,MAAM,EAAE;MACX,MAAM,IAAIpE,cAAc,CAAC,kBAAkB,EAAE,aAAa6D,QAAQ,wBAAwB,CAAC;IAC7F;IAEA,OAAOO,MAAM;EACf;EAEQZ,UAAUA,CAAA,EAAS;IACzB,IAAI,IAAI,CAACxC,QAAQ,EAAE;MACjB,MAAM,IAAIhB,cAAc,CAAC,kBAAkB,EAAE,oCAAoC,CAAC;IACpF;EACF;AACF;AAEA,SAASM,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createWebBluetoothRuntime","isWebBluetoothAvailable","webBluetoothScanner","webBluetoothPermissions","WEB_BLUETOOTH_SERVICES","webBluetoothServicesFor","BluetoothRuntime","BluetoothError","defineDevice","acceptedMemorySlots","dailyTotalsOnly","everyReading","firstReadingPerKind","keepReadings","policyByKind","SIG_PROTOCOLS","builtInDevices","IntegratedDevices","Devices","SUPPORTED_DEVICES","resultPoliciesFor","ovokReadingSink","BluetoothProvider","useBluetooth","useBluetoothPermission","useBluetoothState","useMeasurements","useNearbyDevice","useNearbyDevices","usePairedDevices","useScanning"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,mCAAgC;AAE1E,SAASC,uBAAuB,EAAEC,mBAAmB,QAAQ,4BAAyB;AAEtF,SAASC,uBAAuB,QAAQ,gCAA6B;AACrE,SAASC,sBAAsB,EAAEC,uBAAuB,QAAQ,6BAA0B;AAE1F,SAASC,gBAAgB,QAAQ,eAAY;AAE7C,SAASC,cAAc,QAAQ,cAAW;AAM1C,SAASC,YAAY,QAAQ,eAAY;AAIzC,SACEC,mBAAmB,EACnBC,eAAe,EACfC,YAAY,EACZC,mBAAmB,EACnBC,YAAY,EACZC,YAAY,QACP,qBAAkB;AAEzB,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,cAAc,QAAQ,gCAA6B;
|
|
1
|
+
{"version":3,"names":["createWebBluetoothRuntime","isWebBluetoothAvailable","webBluetoothScanner","webBluetoothPermissions","WEB_BLUETOOTH_SERVICES","webBluetoothServicesFor","BluetoothRuntime","BluetoothError","defineDevice","acceptedMemorySlots","dailyTotalsOnly","everyReading","firstReadingPerKind","keepReadings","policyByKind","SIG_PROTOCOLS","builtInDevices","IntegratedDevices","Devices","SUPPORTED_DEVICES","resultPoliciesFor","ovokReadingSink","BluetoothProvider","useBluetooth","useBluetoothPermission","useBluetoothState","useMeasurements","useNearbyDevice","useNearbyDevices","usePairedDevices","useScanning"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,mCAAgC;AAE1E,SAASC,uBAAuB,EAAEC,mBAAmB,QAAQ,4BAAyB;AAEtF,SAASC,uBAAuB,QAAQ,gCAA6B;AACrE,SAASC,sBAAsB,EAAEC,uBAAuB,QAAQ,6BAA0B;AAE1F,SAASC,gBAAgB,QAAQ,eAAY;AAE7C,SAASC,cAAc,QAAQ,cAAW;AAM1C,SAASC,YAAY,QAAQ,eAAY;AAIzC,SACEC,mBAAmB,EACnBC,eAAe,EACfC,YAAY,EACZC,mBAAmB,EACnBC,YAAY,EACZC,YAAY,QACP,qBAAkB;AAEzB,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,cAAc,QAAQ,gCAA6B;AAE5D,SAASC,iBAAiB,QAAQ,oDAAiD;AAEnF,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,mDAAgD;AAE3F,SAASC,iBAAiB,QAAQ,0CAAuC;AACzE,SAASC,eAAe,QAAQ,8BAA2B;AAC3D,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,qBAAkB;AAElE,SACEC,sBAAsB,EACtBC,iBAAiB,EACjBC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,QACN,mBAAgB","ignoreList":[]}
|