@ovok/native 1.16.1-rc.5 → 1.16.1-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
- package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +21 -10
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
- package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +12 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +78 -19
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +11 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +48 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
- package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +115 -26
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +32 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +73 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +130 -30
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +75 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +67 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js +55 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +57 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js +46 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js +27 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -20
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +47 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/device-waveform.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js +23 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
- package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js +15 -8
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/commonjs/modules/data-sync/constants.js +4 -1
- package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js +6 -9
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +8 -7
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js +47 -0
- package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +14 -6
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +68 -0
- package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +43 -86
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +6 -5
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js +11 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js +64 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js +20 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js +21 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js +59 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +20 -11
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/connections.js +45 -2
- package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/readings.js +10 -2
- package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js +37 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/module/modules/auth/google-return-page/index.js +21 -0
- package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/module/modules/auth/index.js +2 -1
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +1 -1
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/index.js +2 -0
- package/lib/module/modules/auth/sign-in/index.js.map +1 -1
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +27 -1
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +77 -19
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +30 -2
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +11 -3
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +48 -3
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
- package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +115 -26
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +28 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +69 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +129 -30
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +72 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +109 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +64 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js +51 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +53 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js +42 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js +22 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -21
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +44 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
- package/lib/module/modules/bt-management/services/series-recorder.js +27 -5
- package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-waveform.js +4 -0
- package/lib/module/modules/bt-management/types/device-waveform.js.map +1 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js +18 -0
- package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
- package/lib/module/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
- package/lib/module/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
- package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js +16 -9
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js +2 -2
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
- package/lib/module/modules/data-sync/constants.js +4 -1
- package/lib/module/modules/data-sync/constants.js.map +1 -1
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js +7 -10
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +8 -7
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/types/health-sync-keys.js +13 -0
- package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js +43 -0
- package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +14 -6
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/default-health-coding.js +65 -0
- package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +44 -87
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +5 -4
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-data-catalog.js +15 -15
- package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-units.js +11 -1
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js +59 -0
- package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js +16 -0
- package/lib/module/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js +17 -0
- package/lib/module/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js +52 -0
- package/lib/module/modules/data-sync/utils/healthkit-samples.js.map +1 -0
- package/lib/module/modules/data-sync/utils/healthkit-series.js +19 -10
- package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/connections.js +45 -2
- package/lib/module/modules/next/bluetooth/connections.js.map +1 -1
- package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/errors.js.map +1 -1
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/readings.js +10 -2
- package/lib/module/modules/next/bluetooth/readings.js.map +1 -1
- package/lib/module/modules/next/bluetooth/runtime.js +37 -1
- package/lib/module/modules/next/bluetooth/runtime.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/index.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +21 -5
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +6 -1
- package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +13 -1
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +20 -0
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +2 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +19 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +33 -1
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
- package/package.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["le32FromHex","le32ToBytes","LepuCommand","lepuNameBytes","lepuNamesFrom","lepuCommandOf","lepuPayloadOf","describeLepuResponseType","isLepuSuccess","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","
|
|
1
|
+
{"version":3,"names":["hexToByte","le32FromHex","le32ToBytes","LepuCommand","lepuNameBytes","lepuNamesFrom","lepuCommandOf","lepuPayloadOf","describeLepuResponseType","isLepuSuccess","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","bytes","Uint8Array","received","isSessionOpen","isDone","constructor","params","isHistoryTransfer","initialCommands","delayBeforeWriteMs","commandFor","nextCommand","frame","command","afterTransfer","includes","undefined","fail","onFileList","openNextFile","openedFile","appendChunk","closedFile","skipFiles","has","acceptFile","payload","limit","maxFileBytes","closeFile","length","fits","slice","set","map","onProgress","receivedBytes","onFile","reason","onError","write","builder","build"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;AAAA;;AAIA,SAASA,SAAS,QAAQ,+BAA4B;AACtD,SAASC,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,WAAW,QAAQ,kCAA+B;AAG3D,SAASC,WAAW,QAAQ,oBAAiB;AAC7C,SAASC,aAAa,EAAEC,aAAa,QAAQ,sBAAmB;AAChE,SAASC,aAAa,EAAEC,aAAa,QAAQ,iBAAc;AAC3D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,yBAAsB;AAE9E,MAAMC,gBAAgB,GAAG,CAAC;;AAE1B;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,EAAE,GAAG,KAAK,GAAG,KAAK;AAEzC,MAAMC,iBAAoC,GAAG,CAC3CT,WAAW,CAACU,aAAa,EACzBV,WAAW,CAACW,eAAe,EAC3BX,WAAW,CAACY,cAAc,EAC1BZ,WAAW,CAACa,aAAa,CAC1B;;AAED;;AAUA;;AAsCA;AACA;AACA;AACA;AACA;A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,CAAClC,MAAM,GAAG,IAAI;IAElB,IAAI,CAAC,IAAI,CAACD,aAAa,EAAE;MACvB,OAAO,IAAI,CAACG,MAAM,CAACQ,aAAa,GAAG,CAAC;IACtC;IAEA,IAAI,CAACX,aAAa,GAAG,KAAK;IAE1B,OAAO,IAAI,CAAC0B,SAAS,CAAC,CAAC;EACzB,CAAC;EAEOnB,UAAU,GAAGA,CACnBG,OAAe,EACfa,OAA0B,GAAG,EAAE,EAC/BjB,kBAA2B,MACR;IACnB,GAAG,IAAI,CAACH,MAAM,CAACkC,KAAK;IACpB5B,KAAK,EAAE,IAAI,CAACN,MAAM,CAACmC,OAAO,CAACC,KAAK,CAAC7B,OAAO,EAAEa,OAAO,CAAC;IAClD,IAAIjB,kBAAkB,KAAKO,SAAS,GAAG,CAAC,CAAC,GAAG;MAAEP;IAAmB,CAAC;EACpE,CAAC,CAAC;AACJ;AAEA,SAASd,gBAAgB","ignoreList":[]}
|
|
@@ -27,8 +27,9 @@ const START_PATTERN_BYTES = 3;
|
|
|
27
27
|
* protocol, which is why it is worth having once rather than once per device.
|
|
28
28
|
*/
|
|
29
29
|
export class LepuFrameReader {
|
|
30
|
-
constructor(startBytes) {
|
|
30
|
+
constructor(startBytes, session) {
|
|
31
31
|
this.startBytes = startBytes;
|
|
32
|
+
this.session = session;
|
|
32
33
|
}
|
|
33
34
|
readFrame(buffer) {
|
|
34
35
|
const start = this.findFrameStart(buffer);
|
|
@@ -44,7 +45,8 @@ export class LepuFrameReader {
|
|
|
44
45
|
if (!this.hasValidChecksum(frame)) {
|
|
45
46
|
return corrupt(start + START_PATTERN_BYTES);
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
+
const plainFrame = this.session ? this.session.decryptFrame(frame) : frame;
|
|
49
|
+
return plainFrame ? complete(plainFrame, start + frameLength) : corrupt(start + frameLength);
|
|
48
50
|
}
|
|
49
51
|
isFrameStart(buffer, index) {
|
|
50
52
|
if (!this.startBytes.includes((buffer[index] || "").toLowerCase())) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["calculateCrc8","complete","corrupt","incomplete","hexToByte","le16FromHex","COMMAND_INDEX","COMMAND_COMPLEMENT_INDEX","PAYLOAD_LENGTH_INDEX","HEADER_BYTES","CHECKSUM_BYTES","BYTE_MASK","START_PATTERN_BYTES","LepuFrameReader","constructor","startBytes","readFrame","buffer","start","findFrameStart","droppableLeadingBytes","payloadLength","frameLength","length","frame","slice","hasValidChecksum","isFrameStart","index","includes","toLowerCase","command","complement","lastCandidate","Math","max","checksummedBytes","declared"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.frame-reader.ts"],"mappings":";;AAEA,SAASA,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,sCAAmC;AACjF,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,WAAW,QAAQ,kCAA+B;
|
|
1
|
+
{"version":3,"names":["calculateCrc8","complete","corrupt","incomplete","hexToByte","le16FromHex","COMMAND_INDEX","COMMAND_COMPLEMENT_INDEX","PAYLOAD_LENGTH_INDEX","HEADER_BYTES","CHECKSUM_BYTES","BYTE_MASK","START_PATTERN_BYTES","LepuFrameReader","constructor","startBytes","session","readFrame","buffer","start","findFrameStart","droppableLeadingBytes","payloadLength","frameLength","length","frame","slice","hasValidChecksum","plainFrame","decryptFrame","isFrameStart","index","includes","toLowerCase","command","complement","lastCandidate","Math","max","checksummedBytes","declared"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.frame-reader.ts"],"mappings":";;AAEA,SAASA,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,sCAAmC;AACjF,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,WAAW,QAAQ,kCAA+B;AAI3D,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,wBAAwB,GAAG,CAAC;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,GAAG,CAAC;IAE1D,OAAOC,QAAQ,KAAKxC,aAAa,CAACyB,KAAK,EAAEc,gBAAgB,CAAC;EAC5D;AACF","ignoreList":[]}
|
|
@@ -6,15 +6,28 @@ import { getClockParts, isClockSyncEnabled } from "../../../types/clock-sync.js"
|
|
|
6
6
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
7
7
|
import { advertisementRequiresEncryption } from "./lepu.advertisement.js";
|
|
8
8
|
import { LepuCommand } from "./lepu.commands.js";
|
|
9
|
+
import { LEPU_CONNECT_REPLY_TIMEOUT_MS, LepuConnectRetry } from "./lepu.connect-retry.js";
|
|
9
10
|
import { parseLepuDeviceInfo } from "./lepu.device-info.js";
|
|
11
|
+
import { PULSE_WAVE_COMMAND, PULSE_WAVE_REQUEST, readPulseWave } from "./lepu.pulse-wave.js";
|
|
10
12
|
import { describeLepuResponseType, isLepuSuccess } from "./lepu.response-type.js";
|
|
11
13
|
const COMMAND_INDEX = 1;
|
|
12
14
|
const VIATOM_OXYGEN_INFO = 0x14;
|
|
15
|
+
const VIATOM_OXYGEN_PARAMETERS = 0x17;
|
|
16
|
+
const PARAMETERS_POLL_INTERVAL_MS = 1_000;
|
|
17
|
+
const REJECTED_POLL_RETRY_MS = 3_000;
|
|
18
|
+
|
|
19
|
+
/** The vendor polls the wave every 500 to 1000 ms; each answer drains what the ring sampled since the last. */
|
|
20
|
+
const PULSE_WAVE_POLL_INTERVAL_MS = 500;
|
|
21
|
+
|
|
22
|
+
/** Longer than a poll's delay and its answer, so a late answer cannot start a second poll chain. */
|
|
23
|
+
const PULSE_WAVE_REPLY_TIMEOUT_MS = 5_000;
|
|
13
24
|
|
|
14
25
|
/** Identifies a device before sending it a model-specific command. */
|
|
15
26
|
export class LepuIdentityGate {
|
|
16
27
|
isIdentified = false;
|
|
17
28
|
isRefused = false;
|
|
29
|
+
streamsPulseWave = false;
|
|
30
|
+
connectRetry = new LepuConnectRetry();
|
|
18
31
|
constructor(params) {
|
|
19
32
|
this.params = params;
|
|
20
33
|
}
|
|
@@ -38,11 +51,47 @@ export class LepuIdentityGate {
|
|
|
38
51
|
const command = this.params.clockSyncProtocol === "bp3" ? 0xc0 : 0xec;
|
|
39
52
|
this.pendingClockCommand = command;
|
|
40
53
|
this.pendingCommand = command;
|
|
41
|
-
return [this.commandFor(command, clockPayload(this.params.clockSync, this.params.clockSyncProtocol))];
|
|
54
|
+
return [this.awaitConnect(this.commandFor(command, clockPayload(this.params.clockSync, this.params.clockSyncProtocol)))];
|
|
42
55
|
}
|
|
43
|
-
this.
|
|
44
|
-
|
|
56
|
+
return [this.askWhatItIs()];
|
|
57
|
+
};
|
|
58
|
+
commandTimeoutMs = () => {
|
|
59
|
+
if (this.awaitsPulseWave()) {
|
|
60
|
+
return PULSE_WAVE_REPLY_TIMEOUT_MS;
|
|
61
|
+
}
|
|
62
|
+
return this.awaitsConnectReply() ? LEPU_CONNECT_REPLY_TIMEOUT_MS : undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* A device just woken can drop its first command, so an unanswered connect command is sent
|
|
67
|
+
* once more. An unanswered clock is then skipped; an unanswered identity is left to the
|
|
68
|
+
* stuck watchdog, since a device that never says what it is cannot be addressed.
|
|
69
|
+
*/
|
|
70
|
+
onCommandTimeout = () => {
|
|
71
|
+
if (this.awaitsPulseWave()) {
|
|
72
|
+
return {
|
|
73
|
+
commands: this.pollRealtime()
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (!this.awaitsConnectReply() || !this.connectCommand) {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
if (this.connectRetry.mayRetry()) {
|
|
80
|
+
return {
|
|
81
|
+
commands: [this.connectCommand]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (this.pendingClockCommand !== undefined) {
|
|
85
|
+
this.pendingClockCommand = undefined;
|
|
86
|
+
return {
|
|
87
|
+
commands: [this.askWhatItIs()]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return {};
|
|
45
91
|
};
|
|
92
|
+
|
|
93
|
+
/** Only the awaited connect reply settles its command; other frames leave the timeout running. */
|
|
94
|
+
commandProgress = frame => this.awaitsConnectReply() && hexToByte(frame[COMMAND_INDEX] ?? "ff") !== this.pendingCommand ? "ignored" : "complete";
|
|
46
95
|
nextCommand = frame => {
|
|
47
96
|
if (this.params.protocol === "viatom-oxygen") {
|
|
48
97
|
return this.nextViatomOxygenCommand(frame);
|
|
@@ -63,9 +112,20 @@ export class LepuIdentityGate {
|
|
|
63
112
|
return undefined;
|
|
64
113
|
}
|
|
65
114
|
this.pendingClockCommand = undefined;
|
|
115
|
+
return [this.askWhatItIs()];
|
|
116
|
+
};
|
|
117
|
+
askWhatItIs = () => {
|
|
66
118
|
this.pendingCommand = LepuCommand.GET_INFO;
|
|
67
|
-
return
|
|
119
|
+
return this.awaitConnect(this.commandFor(LepuCommand.GET_INFO));
|
|
68
120
|
};
|
|
121
|
+
awaitConnect = command => {
|
|
122
|
+
this.connectCommand = command;
|
|
123
|
+
this.connectRetry.started();
|
|
124
|
+
return command;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** The standard family's clock and identity steps; the oxygen and v2 protocols keep their own pacing. */
|
|
128
|
+
awaitsConnectReply = () => this.params.protocol === undefined && !this.isIdentified && !this.isRefused && this.pendingCommand !== undefined;
|
|
69
129
|
|
|
70
130
|
/** Decides on the reply to the generic `GET_INFO` command. */
|
|
71
131
|
admit = frame => {
|
|
@@ -116,8 +176,11 @@ export class LepuIdentityGate {
|
|
|
116
176
|
}
|
|
117
177
|
const status = hexToByte(frame[1] ?? "ff");
|
|
118
178
|
if (status !== 0) {
|
|
119
|
-
if (this.pendingCommand ===
|
|
120
|
-
return
|
|
179
|
+
if (this.pendingCommand === PULSE_WAVE_COMMAND) {
|
|
180
|
+
return this.streamsPulseWave ? this.pollPulseWave(REJECTED_POLL_RETRY_MS) : this.pollParameters();
|
|
181
|
+
}
|
|
182
|
+
if (this.pendingCommand === VIATOM_OXYGEN_PARAMETERS && this.isIdentified) {
|
|
183
|
+
return this.pollParameters(REJECTED_POLL_RETRY_MS);
|
|
121
184
|
}
|
|
122
185
|
return this.refuse(`the device rejected command 0x${this.pendingCommand.toString(16).padStart(2, "0")} with status 0x${status.toString(16).padStart(2, "0")}`);
|
|
123
186
|
}
|
|
@@ -136,15 +199,36 @@ export class LepuIdentityGate {
|
|
|
136
199
|
return this.refuse(`the hardware reported model ${info.deviceType}, which this declaration was not written for`);
|
|
137
200
|
}
|
|
138
201
|
this.isIdentified = true;
|
|
139
|
-
this.
|
|
140
|
-
return [this.commandFor(0x17, [], 1_000)];
|
|
202
|
+
return this.params.onPulseWave ? this.pollPulseWave() : this.pollParameters();
|
|
141
203
|
}
|
|
142
|
-
case
|
|
143
|
-
return
|
|
204
|
+
case VIATOM_OXYGEN_PARAMETERS:
|
|
205
|
+
return this.pollParameters();
|
|
206
|
+
case PULSE_WAVE_COMMAND:
|
|
207
|
+
return this.answerPulseWave(frame);
|
|
144
208
|
default:
|
|
145
209
|
return undefined;
|
|
146
210
|
}
|
|
147
211
|
};
|
|
212
|
+
|
|
213
|
+
/** A ring whose first wave answer carries no wave is polled for its parameters from then on. */
|
|
214
|
+
answerPulseWave = frame => {
|
|
215
|
+
const wave = readPulseWave(frame);
|
|
216
|
+
if (wave) {
|
|
217
|
+
this.streamsPulseWave = true;
|
|
218
|
+
this.params.onPulseWave?.(wave);
|
|
219
|
+
}
|
|
220
|
+
return this.pollRealtime();
|
|
221
|
+
};
|
|
222
|
+
pollRealtime = () => this.streamsPulseWave ? this.pollPulseWave() : this.pollParameters();
|
|
223
|
+
pollParameters = (delayMs = PARAMETERS_POLL_INTERVAL_MS) => {
|
|
224
|
+
this.pendingCommand = VIATOM_OXYGEN_PARAMETERS;
|
|
225
|
+
return [this.commandFor(VIATOM_OXYGEN_PARAMETERS, [], delayMs)];
|
|
226
|
+
};
|
|
227
|
+
pollPulseWave = (delayMs = PULSE_WAVE_POLL_INTERVAL_MS) => {
|
|
228
|
+
this.pendingCommand = PULSE_WAVE_COMMAND;
|
|
229
|
+
return [this.commandFor(PULSE_WAVE_COMMAND, PULSE_WAVE_REQUEST, delayMs)];
|
|
230
|
+
};
|
|
231
|
+
awaitsPulseWave = () => this.params.protocol === "viatom-oxygen" && !this.isRefused && this.pendingCommand === PULSE_WAVE_COMMAND;
|
|
148
232
|
}
|
|
149
233
|
const oxyClockPayload = clockSync => {
|
|
150
234
|
const parts = getClockParts(clockSync?.now?.() ?? new Date(), clockSync?.timezone);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getClockParts","isClockSyncEnabled","hexToByte","advertisementRequiresEncryption","LepuCommand","parseLepuDeviceInfo","describeLepuResponseType","isLepuSuccess","COMMAND_INDEX","VIATOM_OXYGEN_INFO","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","manufacturerData","rejectEncryptionAtBytes","refuse","protocol","command","pollCommand","pendingCommand","commandFor","setClock","setClockBeforeInfo","clockSync","oxyClockPayload","clockSyncProtocol","pendingClockCommand","clockPayload","GET_INFO","nextCommand","frame","nextViatomOxygenCommand","undefined","nextClockCommand","poll","admit","info","onIdentified","onAdmitted","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","pollIntervalMs","payload","delayBeforeWriteMs","write","builder","build","writeWithoutResponse","withoutResponse","status","toString","padStart","parseViatomOxygenDeviceInfo","parts","now","Date","timezone","pad","value","String","JSON","stringify","SetTIME","year","month","day","hours","minutes","seconds","Array","from","TextEncoder","encode","date","tenthsOfHour","getTimezoneOffset","push","text","slice","map","byte","fromCharCode","join","replace","parse","Number","Model","isInteger","protocolMaxLength","Branch","serialNumber","SN","SerialNumber"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;AAAA;;AAEA,SAEEA,aAAa,EACbC,kBAAkB,QACb,8BAA2B;AAGlC,SAASC,SAAS,QAAQ,+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AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["getClockParts","isClockSyncEnabled","hexToByte","advertisementRequiresEncryption","LepuCommand","LEPU_CONNECT_REPLY_TIMEOUT_MS","LepuConnectRetry","parseLepuDeviceInfo","PULSE_WAVE_COMMAND","PULSE_WAVE_REQUEST","readPulseWave","describeLepuResponseType","isLepuSuccess","COMMAND_INDEX","VIATOM_OXYGEN_INFO","VIATOM_OXYGEN_PARAMETERS","PARAMETERS_POLL_INTERVAL_MS","REJECTED_POLL_RETRY_MS","PULSE_WAVE_POLL_INTERVAL_MS","PULSE_WAVE_REPLY_TIMEOUT_MS","LepuIdentityGate","isIdentified","isRefused","streamsPulseWave","connectRetry","constructor","params","initialCommands","manufacturerData","rejectEncryptionAtBytes","refuse","protocol","command","pollCommand","pendingCommand","commandFor","setClock","setClockBeforeInfo","clockSync","oxyClockPayload","clockSyncProtocol","pendingClockCommand","awaitConnect","clockPayload","askWhatItIs","commandTimeoutMs","awaitsPulseWave","awaitsConnectReply","undefined","onCommandTimeout","commands","pollRealtime","connectCommand","mayRetry","commandProgress","frame","nextCommand","nextViatomOxygenCommand","nextClockCommand","poll","admit","GET_INFO","started","info","onIdentified","onAdmitted","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","pollIntervalMs","payload","delayBeforeWriteMs","write","builder","build","writeWithoutResponse","withoutResponse","status","pollPulseWave","pollParameters","toString","padStart","parseViatomOxygenDeviceInfo","onPulseWave","answerPulseWave","wave","delayMs","parts","now","Date","timezone","pad","value","String","JSON","stringify","SetTIME","year","month","day","hours","minutes","seconds","Array","from","TextEncoder","encode","date","tenthsOfHour","getTimezoneOffset","push","text","slice","map","byte","fromCharCode","join","replace","parse","Number","Model","isInteger","protocolMaxLength","Branch","serialNumber","SN","SerialNumber"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;AAAA;;AAEA,SAEEA,aAAa,EACbC,kBAAk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,IAAI,CAAC,CAAC,CAAC,CACnDE,IAAI,CAAC,EAAE,CAAC,CACRC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAEtB,MAAM3D,IAAI,GAAGoC,IAAI,CAACwB,KAAK,CAACP,IAAI,CAA4B;IACxD,MAAM9C,UAAU,GAAGsD,MAAM,CAAC7D,IAAI,CAAC8D,KAAK,CAAC;IAErC,IAAI,CAACD,MAAM,CAACE,SAAS,CAACxD,UAAU,CAAC,EAAE;MACjC,OAAOtB,SAAS;IAClB;IAEA,OAAO;MACLsB,UAAU;MACVyD,iBAAiB,EAAE,CAAC;MACpBxD,UAAU,EAAE2B,MAAM,CAACnC,IAAI,CAACiE,MAAM,IAAI,EAAE,CAAC;MACrCC,YAAY,EAAE/B,MAAM,CAACnC,IAAI,CAACmE,EAAE,IAAInE,IAAI,CAACoE,YAAY,IAAI,EAAE;IACzD,CAAC;EACH,CAAC,CAAC,MAAM;IACN,OAAOnF,SAAS;EAClB;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core/next";
|
|
4
|
+
import { CaseType } from "../../../types/case-type.js";
|
|
5
|
+
import { millivoltsOf } from "./lepu.waveform.js";
|
|
6
|
+
|
|
7
|
+
/** How long a live chunk grows before it is handed over. */
|
|
8
|
+
const CHUNK_SECONDS = 300;
|
|
9
|
+
const MS_PER_SECOND = 1_000;
|
|
10
|
+
const COVERAGE_DECIMALS = 2;
|
|
11
|
+
|
|
12
|
+
/** A stretch of a recording sent live, before the device's own file supersedes it. */
|
|
13
|
+
|
|
14
|
+
/** Collects one recording's live samples and hands them over in chunks of five minutes or less. */
|
|
15
|
+
class LiveEcgChunks {
|
|
16
|
+
counts = [];
|
|
17
|
+
index = 0;
|
|
18
|
+
constructor(waveform, onChunk) {
|
|
19
|
+
this.waveform = waveform;
|
|
20
|
+
this.onChunk = onChunk;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Adds the samples an answer at `at` carried, `recordedSeconds` into the recording. */
|
|
24
|
+
append = (samples, at, recordedSeconds) => {
|
|
25
|
+
this.recordingKey ??= recordingKeyOf(new Date(at.getTime() - recordedSeconds * MS_PER_SECOND));
|
|
26
|
+
this.startedAt ??= new Date(at.getTime() - this.secondsOf(samples.length) * MS_PER_SECOND);
|
|
27
|
+
this.counts.push(...samples);
|
|
28
|
+
this.lastAt = at;
|
|
29
|
+
if (this.secondsOf(this.counts.length) >= CHUNK_SECONDS) {
|
|
30
|
+
this.flush();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** Hands over what has been collected; the recording may continue into a further chunk. */
|
|
35
|
+
flush = () => {
|
|
36
|
+
if (this.counts.length === 0 || !this.startedAt || !this.lastAt || !this.recordingKey) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.onChunk({
|
|
40
|
+
measurementTypeKey: MeasurementTypeKey.ecg,
|
|
41
|
+
caseType: CaseType.RESULT,
|
|
42
|
+
diagramPoints: this.counts.map(count => millivoltsOf(count, this.waveform)),
|
|
43
|
+
duration: this.secondsOf(this.counts.length),
|
|
44
|
+
recordedAt: this.startedAt,
|
|
45
|
+
recordingId: `${this.recordingKey}-live-${this.index}`,
|
|
46
|
+
live: true,
|
|
47
|
+
coverage: this.coverage()
|
|
48
|
+
});
|
|
49
|
+
this.index += 1;
|
|
50
|
+
this.counts = [];
|
|
51
|
+
this.startedAt = undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Hands over the rest and forgets the recording, so the next one starts its own chunks. */
|
|
55
|
+
endRecording = () => {
|
|
56
|
+
this.flush();
|
|
57
|
+
this.recordingKey = undefined;
|
|
58
|
+
this.index = 0;
|
|
59
|
+
};
|
|
60
|
+
secondsOf = samples => samples / this.waveform.sampleRateHz;
|
|
61
|
+
coverage = () => {
|
|
62
|
+
const spanSeconds = ((this.lastAt?.getTime() ?? 0) - (this.startedAt?.getTime() ?? 0)) / MS_PER_SECOND;
|
|
63
|
+
const expected = Math.max(this.counts.length, spanSeconds * this.waveform.sampleRateHz);
|
|
64
|
+
return Number((this.counts.length / expected).toFixed(COVERAGE_DECIMALS));
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const pad = value => String(value).padStart(2, "0");
|
|
68
|
+
|
|
69
|
+
/** The name the device gives the recording's file: `R` and its local start, to the second. */
|
|
70
|
+
const recordingKeyOf = start => `R${start.getFullYear()}${pad(start.getMonth() + 1)}${pad(start.getDate())}` + `${pad(start.getHours())}${pad(start.getMinutes())}${pad(start.getSeconds())}`;
|
|
71
|
+
export { LiveEcgChunks };
|
|
72
|
+
//# sourceMappingURL=lepu.live-ecg-chunks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","millivoltsOf","CHUNK_SECONDS","MS_PER_SECOND","COVERAGE_DECIMALS","LiveEcgChunks","counts","index","constructor","waveform","onChunk","append","samples","at","recordedSeconds","recordingKey","recordingKeyOf","Date","getTime","startedAt","secondsOf","length","push","lastAt","flush","measurementTypeKey","ecg","caseType","RESULT","diagramPoints","map","count","duration","recordedAt","recordingId","live","coverage","undefined","endRecording","sampleRateHz","spanSeconds","expected","Math","max","Number","toFixed","pad","value","String","padStart","start","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAEpD,SAASC,QAAQ,QAAQ,6BAA0B;AAEnD,SAASC,YAAY,QAAkB,oBAAiB;;AAExD;AACA,MAAMC,aAAa,GAAG,GAAG;AAEzB,MAAMC,aAAa,GAAG,KAAK;AAC3B,MAAMC,iBAAiB,GAAG,CAAC;;AAE3B;;AAwBA;AACA,MAAMC,aAAa,CAAC;EACVC,MAAM,GAAa,EAAE;EAIrBC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AG,CAAC;;AAErE;AACA,MAAMjC,cAAc,GAAIkC,KAAW,IACjC,IAAIA,KAAK,CAACC,WAAW,CAAC,CAAC,GAAGL,GAAG,CAACI,KAAK,CAACE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAGN,GAAG,CAACI,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC,EAAE,GAC5E,GAAGP,GAAG,CAACI,KAAK,CAACI,QAAQ,CAAC,CAAC,CAAC,GAAGR,GAAG,CAACI,KAAK,CAACK,UAAU,CAAC,CAAC,CAAC,GAAGT,GAAG,CAACI,KAAK,CAACM,UAAU,CAAC,CAAC,CAAC,EAAE;AAEhF,SAASnD,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core/next";
|
|
4
|
+
import { PULSE_WAVE_PERIOD_MS } from "./lepu.pulse-wave.js";
|
|
5
|
+
|
|
6
|
+
/** How long a chunk grows before it is handed over. */
|
|
7
|
+
const CHUNK_MS = 300_000;
|
|
8
|
+
const SAMPLES_PER_CHUNK = CHUNK_MS / PULSE_WAVE_PERIOD_MS;
|
|
9
|
+
|
|
10
|
+
/** How far the samples may fall behind the clock before the shortfall is recorded as a gap. */
|
|
11
|
+
const MAX_SHORTFALL_MS = 250;
|
|
12
|
+
const isRecorded = sample => sample !== null;
|
|
13
|
+
const endOf = chunk => chunk.start + chunk.samples.length * PULSE_WAVE_PERIOD_MS;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Collects a pulse wave into series of five minutes or less. Each answer's samples are timed back from its
|
|
17
|
+
* arrival, and `null` marks a gap: no sensor contact, or samples that never arrived.
|
|
18
|
+
*/
|
|
19
|
+
class PulseWaveChunks {
|
|
20
|
+
constructor(onChunk) {
|
|
21
|
+
this.onChunk = onChunk;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Adds one answer's samples, the last of them taken at `at`. */
|
|
25
|
+
append = (wave, at) => {
|
|
26
|
+
if (wave.samples.length === 0) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const firstAt = at.getTime() - wave.samples.length * PULSE_WAVE_PERIOD_MS;
|
|
30
|
+
this.recordGapBefore(firstAt);
|
|
31
|
+
this.chunk ??= {
|
|
32
|
+
start: firstAt,
|
|
33
|
+
samples: []
|
|
34
|
+
};
|
|
35
|
+
this.push(wave.leadOn ? wave.samples : wave.samples.map(() => null));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** Hands over what has been collected; the next answer starts a new chunk. */
|
|
39
|
+
flush = () => {
|
|
40
|
+
if (this.chunk) {
|
|
41
|
+
this.handOver(this.chunk);
|
|
42
|
+
}
|
|
43
|
+
this.chunk = undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Keeps later samples on time; a gap longer than the chunk has room for ends the chunk instead. */
|
|
47
|
+
recordGapBefore = firstAt => {
|
|
48
|
+
const chunk = this.chunk;
|
|
49
|
+
const shortfallMs = chunk ? firstAt - endOf(chunk) : 0;
|
|
50
|
+
if (!chunk || shortfallMs <= MAX_SHORTFALL_MS) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const missing = Math.round(shortfallMs / PULSE_WAVE_PERIOD_MS);
|
|
54
|
+
if (chunk.samples.length + missing < SAMPLES_PER_CHUNK) {
|
|
55
|
+
this.push(Array(missing).fill(null));
|
|
56
|
+
} else {
|
|
57
|
+
this.flush();
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Appends to the open chunk, handing it over when full and carrying the rest into the next. */
|
|
62
|
+
push = samples => {
|
|
63
|
+
const chunk = this.chunk;
|
|
64
|
+
if (!chunk || samples.length === 0) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const room = SAMPLES_PER_CHUNK - chunk.samples.length;
|
|
68
|
+
chunk.samples = chunk.samples.concat(samples.slice(0, room));
|
|
69
|
+
if (chunk.samples.length < SAMPLES_PER_CHUNK) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.handOver(chunk);
|
|
73
|
+
this.chunk = {
|
|
74
|
+
start: chunk.start + CHUNK_MS,
|
|
75
|
+
samples: []
|
|
76
|
+
};
|
|
77
|
+
this.push(samples.slice(room));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** Reports the chunk from its first recorded sample to its last; one with none is dropped. */
|
|
81
|
+
handOver = chunk => {
|
|
82
|
+
const first = chunk.samples.findIndex(isRecorded);
|
|
83
|
+
const last = chunk.samples.findLastIndex(isRecorded);
|
|
84
|
+
if (first === -1) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.onChunk({
|
|
88
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
89
|
+
start: new Date(chunk.start + first * PULSE_WAVE_PERIOD_MS),
|
|
90
|
+
periodMs: PULSE_WAVE_PERIOD_MS,
|
|
91
|
+
values: {
|
|
92
|
+
pulseWave: chunk.samples.slice(first, last + 1)
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** A chunk as a result, with an id the one-second series of the same device cannot share. */
|
|
99
|
+
const pulseWaveResult = (deviceData, series) => ({
|
|
100
|
+
id: `wave:${deviceData.sn || deviceData.id}:pulse-wave:${series.start.toISOString()}`,
|
|
101
|
+
deviceData,
|
|
102
|
+
data: {
|
|
103
|
+
measurementTypeKey: series.measurementTypeKey,
|
|
104
|
+
recordedAt: series.start
|
|
105
|
+
},
|
|
106
|
+
series
|
|
107
|
+
});
|
|
108
|
+
export { PulseWaveChunks, pulseWaveResult };
|
|
109
|
+
//# sourceMappingURL=lepu.pulse-wave-chunks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","PULSE_WAVE_PERIOD_MS","CHUNK_MS","SAMPLES_PER_CHUNK","MAX_SHORTFALL_MS","isRecorded","sample","endOf","chunk","start","samples","length","PulseWaveChunks","constructor","onChunk","append","wave","at","firstAt","getTime","recordGapBefore","push","leadOn","map","flush","handOver","undefined","shortfallMs","missing","Math","round","Array","fill","room","concat","slice","first","findIndex","last","findLastIndex","measurementTypeKey","bloodOxygenPulseRate","Date","periodMs","values","pulseWave","pulseWaveResult","deviceData","series","id","sn","toISOString","data","recordedAt"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAOpD,SAASC,oBAAoB,QAAmB,sBAAmB;;AAEnE;AACA,MAAMC,QAAQ,GAAG,OAAO;AACxB,MAAMC,iBAAiB,GAAGD,QAAQ,GAAGD,oBAAoB;;AAEzD;AACA,MAAMG,gBAAgB,GAAG,GAAG;AAS5B,MAAMC,UAAU,GAAIC,MAAc,IAAcA,MAAM,KAAK,IAAI;AAE/D,MAAMC,KAAK,GAAIC,KAAgB,IAAaA,KAAK,CAACC,KAAK,GAAGD,KAAK,CAACE,OAAO,CAACC,MAAM,GAAGV,oBAAoB;;AAErG;AACA;AACA;AACA;AACA,MAAMW,eAAe,CAAC;EAGbC,WAAWA,CAAkBC,OAA4C,EAAE;IAAA,KAA9CA,OAA4C,GAA5CA,OAA4C;EAAG;;EAEnF;EACOC,MAAM,GAAGA,CAACC,IAAe,EAAEC,EAAQ,KAAW;IACnD,IAAID,IAAI,CAACN,OAAO,CAACC,MAAM,KAAK,CAAC,EAAE;MAC7B;IACF;IAEA,MAAMO,OAAO,GAAGD,EAAE,CAACE,OAAO,CAAC,CAAC,GAAGH,IAAI,CAACN,OAAO,CAACC,MAAM,GAAGV,oBAAoB;IAEzE,IAAI,CAACmB,eAAe,CAACF,OAAO,CAAC;IAC7B,IAAI,CAACV,KAAK,KAAK;MAAEC,KAAK,EAAES,OAAO;MAAER,OAAO,EAAE;IAAG,CAAC;IAC9C,IAAI,CAAC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M,CAACR,kBAAkB;IAC7Ca,UAAU,EAAEL,MAAM,CAACvC;EACrB,CAA6C;EAC7CuC;AACF,CAAC,CAAC;AAEF,SAASpC,eAAe,EAAEkC,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
import { le16FromHex } from "../../../utils/le-16-from-hex.js";
|
|
5
|
+
|
|
6
|
+
/** The legacy oxygen protocol's realtime request answered with the pulse wave as well as the parameters. */
|
|
7
|
+
const PULSE_WAVE_COMMAND = 0x1b;
|
|
8
|
+
|
|
9
|
+
/** Its one payload byte picks the sample rate; 0 is 125 Hz. */
|
|
10
|
+
const RATE_125_HZ = 0x00;
|
|
11
|
+
const PULSE_WAVE_REQUEST = [RATE_125_HZ];
|
|
12
|
+
const PULSE_WAVE_PERIOD_MS = 8;
|
|
13
|
+
const PAYLOAD_START = 7;
|
|
14
|
+
const CHECKSUM_BYTES = 1;
|
|
15
|
+
|
|
16
|
+
/** Offsets in the answer's payload. */
|
|
17
|
+
const LEAD_STATE = 6;
|
|
18
|
+
const SAMPLE_COUNT = 10;
|
|
19
|
+
const SAMPLES_START = 12;
|
|
20
|
+
const LEAD_ON = 1;
|
|
21
|
+
|
|
22
|
+
/** One sample would make the answer as long as a realtime parameters answer, so it could be one. */
|
|
23
|
+
const MIN_SAMPLES = 2;
|
|
24
|
+
|
|
25
|
+
/** Sample values the ring sends as markers rather than as the wave. */
|
|
26
|
+
const MARKERS = new Set([156, 246]);
|
|
27
|
+
|
|
28
|
+
/** The pulse wave one answer carries: raw, unitless and inverted, so systolic peaks are minima. */
|
|
29
|
+
|
|
30
|
+
const isSample = value => value !== undefined;
|
|
31
|
+
|
|
32
|
+
/** The whole mean of the samples either side, or the one neighbour at an edge, as the vendor's SDKs do. */
|
|
33
|
+
const neighbourMean = (raw, index) => {
|
|
34
|
+
const neighbours = [raw[index - 1], raw[index + 1]].filter(isSample);
|
|
35
|
+
const total = neighbours.reduce((sum, value) => sum + value, 0);
|
|
36
|
+
return Math.floor(total / neighbours.length);
|
|
37
|
+
};
|
|
38
|
+
const withoutMarkers = raw => raw.map((value, index) => MARKERS.has(value) ? neighbourMean(raw, index) : value);
|
|
39
|
+
|
|
40
|
+
/** An answer that ends right after a zero count streams the wave but had nothing new, as while the sensor acquires. */
|
|
41
|
+
const isEmptyWave = (payload, count) => count === 0 && payload.length === SAMPLES_START;
|
|
42
|
+
|
|
43
|
+
/** The pulse wave in a realtime wave answer; `undefined` for one sample, or fewer than it counts. */
|
|
44
|
+
const readPulseWave = frame => {
|
|
45
|
+
const payload = frame.slice(PAYLOAD_START, -CHECKSUM_BYTES);
|
|
46
|
+
const count = le16FromHex(payload, SAMPLE_COUNT);
|
|
47
|
+
const samples = payload.slice(SAMPLES_START, SAMPLES_START + count).map(hexToByte);
|
|
48
|
+
const leadOn = hexToByte(payload[LEAD_STATE] ?? "00") === LEAD_ON;
|
|
49
|
+
if (isEmptyWave(payload, count)) {
|
|
50
|
+
return {
|
|
51
|
+
leadOn,
|
|
52
|
+
samples: []
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (count < MIN_SAMPLES || samples.length < count) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
leadOn,
|
|
60
|
+
samples: withoutMarkers(samples)
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export { PULSE_WAVE_COMMAND, PULSE_WAVE_PERIOD_MS, PULSE_WAVE_REQUEST, readPulseWave };
|
|
64
|
+
//# sourceMappingURL=lepu.pulse-wave.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","le16FromHex","PULSE_WAVE_COMMAND","RATE_125_HZ","PULSE_WAVE_REQUEST","PULSE_WAVE_PERIOD_MS","PAYLOAD_START","CHECKSUM_BYTES","LEAD_STATE","SAMPLE_COUNT","SAMPLES_START","LEAD_ON","MIN_SAMPLES","MARKERS","Set","isSample","value","undefined","neighbourMean","raw","index","neighbours","filter","total","reduce","sum","Math","floor","length","withoutMarkers","map","has","isEmptyWave","payload","count","readPulseWave","frame","slice","samples","leadOn"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.pulse-wave.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,+BAA4B;AACtD,SAASC,WAAW,QAAQ,kCAA+B;;AAE3D;AACA,MAAMC,kBAAkB,GAAG,IAAI;;AAE/B;AACA,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,kBAAqC,GAAG,CAACD,WAAW,CAAC;AAC3D,MAAME,oBAAoB,GAAG,CAAC;AAE9B,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,cAAc,GAAG,CAAC;;AAExB;AACA,MAAMC,UAAU,GAAG,CAAC;AACpB,MAAMC,YAAY,GAAG,EAAE;AACvB,MAAMC,aAAa,GAAG,EAAE;AAExB,MAAMC,OAAO,GAAG,CAAC;;AAEjB;AACA,MAAMC,WAAW,GAAG,CAAC;;AAErB;AACA,MAAMC,OAA4B,GAAG,IAAIC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;;AAExD;;AAUA,MAAMC,QAAQ,GAAIC,KAAyB,IAAsBA,KAAK,KAAKC,SAAS;;AAEpF;AACA,MAAMC,aAAa,GAAGA,CAACC,GAAsB,EAAEC,KAAa,KAAa;EACvE,MAAMC,UAAU,GAAG,CAACF,GAAG,CAACC,KAAK,GAAG,CAAC,CAAC,EAAED,GAAG,CAACC,KAAK,GAAG,CAAC,CAAC,CAAC,CAACE,MAAM,CAACP,QAAQ,CAAC;EACpE,MAAMQ,KAAK,GAAGF,UAAU,CAACG,MAAM,CAAC,CAACC,GAAG,EAAET,KAAK,KAAKS,GAAG,GAAGT,KAAK,EAAE,CAAC,CAAC;EAE/D,OAAOU,IAAI,CAACC,KAAK,CAACJ,KAAK,GAAGF,UAA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
+
|
|
3
|
+
import { LiveEcgChunks } from "./lepu.live-ecg-chunks.js";
|
|
4
|
+
import { LepuRecordingWatch } from "./lepu.recording-watch.js";
|
|
5
|
+
import { waveformSamples } from "./lepu.waveform.js";
|
|
6
|
+
/**
|
|
7
|
+
* Follows a recorder's open recording through its poll answers: reports its state, feeds the live
|
|
8
|
+
* trace while it records, and hands its samples over in chunks.
|
|
9
|
+
*/
|
|
10
|
+
class LepuRecorder {
|
|
11
|
+
constructor(status, callbacks) {
|
|
12
|
+
this.status = status;
|
|
13
|
+
this.callbacks = callbacks;
|
|
14
|
+
this.watch = new LepuRecordingWatch(status, callbacks.onRecordingChanged);
|
|
15
|
+
this.chunks = status.waveform ? new LiveEcgChunks(status.waveform, callbacks.onChunk) : undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Reads one poll answer; true when it is the first in the saved state, so the files are read. */
|
|
19
|
+
observe = pollAnswer => {
|
|
20
|
+
const saved = this.watch.observe(pollAnswer);
|
|
21
|
+
if (this.watch.isRecording()) {
|
|
22
|
+
this.record(pollAnswer);
|
|
23
|
+
} else if (this.watch.isOpen()) {
|
|
24
|
+
this.chunks?.flush();
|
|
25
|
+
} else {
|
|
26
|
+
this.chunks?.endRecording();
|
|
27
|
+
}
|
|
28
|
+
return saved;
|
|
29
|
+
};
|
|
30
|
+
isOpen = () => this.watch.isOpen();
|
|
31
|
+
|
|
32
|
+
/** Whether samples are being recorded, so every answer's samples count. */
|
|
33
|
+
isRecording = () => this.watch.isRecording();
|
|
34
|
+
|
|
35
|
+
/** Hands over what is collected, for a connection that is ending. */
|
|
36
|
+
flush = () => this.chunks?.flush();
|
|
37
|
+
record = pollAnswer => {
|
|
38
|
+
if (!this.status.waveform) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const samples = waveformSamples(pollAnswer, this.status.waveform);
|
|
42
|
+
const at = new Date();
|
|
43
|
+
if (samples.length === 0) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this.callbacks.onSamples(samples, at);
|
|
47
|
+
this.chunks?.append(samples, at, this.watch.recordedSeconds());
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export { LepuRecorder };
|
|
51
|
+
//# sourceMappingURL=lepu.recorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LiveEcgChunks","LepuRecordingWatch","waveformSamples","LepuRecorder","constructor","status","callbacks","watch","onRecordingChanged","chunks","waveform","onChunk","undefined","observe","pollAnswer","saved","isRecording","record","isOpen","flush","endRecording","samples","at","Date","length","onSamples","append","recordedSeconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.recorder.ts"],"mappings":";;AAGA,SAAuBA,aAAa,QAAQ,2BAAwB;AACpE,SAASC,kBAAkB,QAAQ,2BAAwB;AAC3D,SAASC,eAAe,QAAQ,oBAAiB;AAcjD;AACA;AACA;AACA;AACA,MAAMC,YAAY,CAAC;EAIVC,WAAWA,CACCC,MAAuB,EACvBC,SAAgC,EACjD;IAAA,KAFiBD,MAAuB,GAAvBA,MAAuB;IAAA,KACvBC,SAAgC,GAAhCA,SAAgC;IAEjD,IAAI,CAACC,KAAK,GAAG,IAAIN,kBAAkB,CAACI,MAAM,EAAEC,SAAS,CAACE,kBAAkB,CAAC;IACzE,IAAI,CAACC,MAAM,GAAGJ,MAAM,CAACK,QAAQ,GAAG,IAAIV,aAAa,CAACK,MAAM,CAACK,QAAQ,EAAEJ,SAAS,CAACK,OAAO,CAAC,GAAGC,SAAS;EACnG;;EAEA;EACOC,OAAO,GAAIC,UAA6B,IAAc;IAC3D,MAAMC,KAAK,GAAG,IAAI,CAACR,KAAK,CAACM,OAAO,CAACC,UAAU,CAAC;IAE5C,IAAI,IAAI,CAACP,KAAK,CAACS,WAAW,CAAC,CAAC,EAAE;MAC5B,IAAI,CAACC,MAAM,CAACH,UAAU,CAAC;IACzB,CAAC,MAAM,IAAI,IAAI,CAACP,KAAK,CAACW,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