@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
|
@@ -4,8 +4,12 @@ import { base64ToHex } from "../../../utils/base-64-to-hex.js";
|
|
|
4
4
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
5
5
|
const PROTOCOL_MASK = 0x0f;
|
|
6
6
|
const ENCRYPTION_MASK = 0xf0;
|
|
7
|
+
const ENCRYPTION_OPTIONAL = 0x10;
|
|
7
8
|
const ENCRYPTION_REQUIRED = 0x20;
|
|
8
9
|
const VIATOM_OXYGEN_V2_BYTES = [3, 4];
|
|
10
|
+
const LEPU_FLAG_BYTES = [4, 3];
|
|
11
|
+
const LEPU_PROTOCOLS = [1, 2];
|
|
12
|
+
const ENCRYPTION_LEVELS = [ENCRYPTION_OPTIONAL, ENCRYPTION_REQUIRED];
|
|
9
13
|
const manufacturerBytes = manufacturerData => {
|
|
10
14
|
if (!manufacturerData) {
|
|
11
15
|
return [];
|
|
@@ -21,7 +25,19 @@ const manufacturerByte = (manufacturerData, index) => manufacturerBytes(manufact
|
|
|
21
25
|
/** Returns true when the advertised byte says that only encrypted traffic is accepted. */
|
|
22
26
|
const advertisementRequiresEncryption = (manufacturerData, byteIndexes = []) => byteIndexes.some(index => ((manufacturerByte(manufacturerData, index) ?? 0) & ENCRYPTION_MASK) === ENCRYPTION_REQUIRED);
|
|
23
27
|
|
|
28
|
+
/**
|
|
29
|
+
* True when the advertisement offers or requires the encryption handshake.
|
|
30
|
+
*
|
|
31
|
+
* Byte 4 describes the second service and wins when it names a protocol; otherwise byte 3
|
|
32
|
+
* does. A level of 1 (optional) or 2 (required) is a handshake for the vendor's own client.
|
|
33
|
+
*/
|
|
34
|
+
const advertisesLepuEncryption = manufacturerData => {
|
|
35
|
+
const bytes = manufacturerBytes(manufacturerData);
|
|
36
|
+
const flag = LEPU_FLAG_BYTES.map(index => bytes[index] ?? 0).find(value => LEPU_PROTOCOLS.includes(value & PROTOCOL_MASK));
|
|
37
|
+
return flag !== undefined && ENCRYPTION_LEVELS.includes(flag & ENCRYPTION_MASK);
|
|
38
|
+
};
|
|
39
|
+
|
|
24
40
|
/** The vendor uses the low nibble of byte 3 or 4 to select the OxyII service. */
|
|
25
41
|
const viatomOxygenUsesV2 = manufacturerData => VIATOM_OXYGEN_V2_BYTES.some(index => ((manufacturerByte(manufacturerData, index) ?? 0) & PROTOCOL_MASK) === 2);
|
|
26
|
-
export { advertisementRequiresEncryption, manufacturerBytes, viatomOxygenUsesV2 };
|
|
42
|
+
export { advertisementRequiresEncryption, advertisesLepuEncryption, manufacturerBytes, viatomOxygenUsesV2 };
|
|
27
43
|
//# sourceMappingURL=lepu.advertisement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["base64ToHex","hexToByte","PROTOCOL_MASK","ENCRYPTION_MASK","ENCRYPTION_REQUIRED","VIATOM_OXYGEN_V2_BYTES","manufacturerBytes","manufacturerData","map","manufacturerByte","index","advertisementRequiresEncryption","byteIndexes","some","viatomOxygenUsesV2"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,mBAAmB,GAAG,IAAI;AAChC,MAAMC,sBAAsB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAU;
|
|
1
|
+
{"version":3,"names":["base64ToHex","hexToByte","PROTOCOL_MASK","ENCRYPTION_MASK","ENCRYPTION_OPTIONAL","ENCRYPTION_REQUIRED","VIATOM_OXYGEN_V2_BYTES","LEPU_FLAG_BYTES","LEPU_PROTOCOLS","ENCRYPTION_LEVELS","manufacturerBytes","manufacturerData","map","manufacturerByte","index","advertisementRequiresEncryption","byteIndexes","some","advertisesLepuEncryption","bytes","flag","find","value","includes","undefined","viatomOxygenUsesV2"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,mBAAmB,GAAG,IAAI;AA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H,IAAI,GAAGjB,eAAe,CAAC;AACjF,CAAC;;AAED;AACA,MAAMsB,kBAAkB,GAAId,gBAAyB,IACnDL,sBAAsB,CAACW,IAAI,CACxBH,KAAK,IACJ,CAAC,CAACD,gBAAgB,CAACF,gBAAgB,EAAEG,KAAK,CAAC,IAAI,CAAC,IAAIZ,aAAa,MAAM,CAC3E,CAAC;AAEH,SACEa,+BAA+B,EAC/BG,wBAAwB,EACxBR,iBAAiB,EACjBe,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** How long a connect-time command may go unanswered before it is sent again. */
|
|
4
|
+
const LEPU_CONNECT_REPLY_TIMEOUT_MS = 1_000;
|
|
5
|
+
|
|
6
|
+
/** A device just woken can drop its first command, so each connect step gets one more try. */
|
|
7
|
+
const LEPU_CONNECT_ATTEMPTS = 2;
|
|
8
|
+
|
|
9
|
+
/** Counts the tries of one connect-time command. */
|
|
10
|
+
class LepuConnectRetry {
|
|
11
|
+
attempts = 0;
|
|
12
|
+
|
|
13
|
+
/** Marks the first send of the command. */
|
|
14
|
+
started = () => {
|
|
15
|
+
this.attempts = 1;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** Whether the command may be sent again; counts that send when it may. */
|
|
19
|
+
mayRetry = () => {
|
|
20
|
+
if (this.attempts >= LEPU_CONNECT_ATTEMPTS) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
this.attempts++;
|
|
24
|
+
return true;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export { LEPU_CONNECT_REPLY_TIMEOUT_MS, LepuConnectRetry };
|
|
28
|
+
//# sourceMappingURL=lepu.connect-retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LEPU_CONNECT_REPLY_TIMEOUT_MS","LEPU_CONNECT_ATTEMPTS","LepuConnectRetry","attempts","started","mayRetry"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.connect-retry.ts"],"mappings":";;AAAA;AACA,MAAMA,6BAA6B,GAAG,KAAK;;AAE3C;AACA,MAAMC,qBAAqB,GAAG,CAAC;;AAE/B;AACA,MAAMC,gBAAgB,CAAC;EACbC,QAAQ,GAAG,CAAC;;EAEpB;EACOC,OAAO,GAAGA,CAAA,KAAY;IAC3B,IAAI,CAACD,QAAQ,GAAG,CAAC;EACnB,CAAC;;EAED;EACOE,QAAQ,GAAGA,CAAA,KAAe;IAC/B,IAAI,IAAI,CAACF,QAAQ,IAAIF,qBAAqB,EAAE;MAC1C,OAAO,KAAK;IACd;IAEA,IAAI,CAACE,QAAQ,EAAE;IAEf,OAAO,IAAI;EACb,CAAC;AACH;AAEA,SAASH,6BAA6B,EAAEE,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { sentryLogger } from "../../../../helpers/utils/sentry-logger.js";
|
|
4
|
+
import { toBluetoothError } from "../../../types/bluetooth-error.js";
|
|
5
|
+
const KEY_PREFIX = "@ovok/native/lepu-delivered-files";
|
|
6
|
+
const parseNames = stored => {
|
|
7
|
+
try {
|
|
8
|
+
const parsed = JSON.parse(stored ?? "[]");
|
|
9
|
+
return Array.isArray(parsed) ? parsed.filter(name => typeof name === "string") : [];
|
|
10
|
+
} catch {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The names of a device's stored files whose readings the app took (queued or saved), kept in
|
|
17
|
+
* `storage` so a later connection skips them, as the vendor app skips the files it saved. Without
|
|
18
|
+
* storage it forgets on disconnect.
|
|
19
|
+
*/
|
|
20
|
+
class LepuDeliveredFiles {
|
|
21
|
+
names = new Set();
|
|
22
|
+
constructor(storage, deviceId) {
|
|
23
|
+
this.storage = storage;
|
|
24
|
+
this.key = `${KEY_PREFIX}/${deviceId}`;
|
|
25
|
+
this.writes = this.load();
|
|
26
|
+
}
|
|
27
|
+
has = name => this.names.has(name);
|
|
28
|
+
|
|
29
|
+
/** Remembers a file whose reading the app took. */
|
|
30
|
+
add = name => {
|
|
31
|
+
this.names.add(name);
|
|
32
|
+
this.persist();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Forgets the files the device no longer lists, so no more names are kept than it holds. */
|
|
36
|
+
keepListed = listed => {
|
|
37
|
+
const kept = [...this.names].filter(name => listed.includes(name));
|
|
38
|
+
if (kept.length < this.names.size) {
|
|
39
|
+
this.names = new Set(kept);
|
|
40
|
+
this.persist();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
load = async () => {
|
|
44
|
+
try {
|
|
45
|
+
const stored = parseNames(await this.storage?.getItem(this.key));
|
|
46
|
+
this.names = new Set([...stored, ...this.names]);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
sentryLogger("error", "LEPU_DELIVERED_FILES: Could not read the stored names", {
|
|
49
|
+
errorCode: toBluetoothError(error).code
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Writes in order, each after the stored names were read, so none overwrites names not read yet. */
|
|
55
|
+
persist = () => {
|
|
56
|
+
this.writes = this.writes.then(this.store);
|
|
57
|
+
};
|
|
58
|
+
store = async () => {
|
|
59
|
+
try {
|
|
60
|
+
await this.storage?.setItem(this.key, JSON.stringify([...this.names]));
|
|
61
|
+
} catch (error) {
|
|
62
|
+
sentryLogger("error", "LEPU_DELIVERED_FILES: Could not store the names", {
|
|
63
|
+
errorCode: toBluetoothError(error).code
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export { LepuDeliveredFiles };
|
|
69
|
+
//# sourceMappingURL=lepu.delivered-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["sentryLogger","toBluetoothError","KEY_PREFIX","parseNames","stored","parsed","JSON","parse","Array","isArray","filter","name","LepuDeliveredFiles","names","Set","constructor","storage","deviceId","key","writes","load","has","add","persist","keepListed","listed","kept","includes","length","size","getItem","error","errorCode","code","then","store","setItem","stringify"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.delivered-files.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4CAAyC;AAEtE,SAASC,gBAAgB,QAAQ,mCAAgC;AAEjE,MAAMC,UAAU,GAAG,mCAAmC;AAEtD,MAAMC,UAAU,GAAIC,MAAiC,IAAe;EAClE,IAAI;IACF,MAAMC,MAAe,GAAGC,IAAI,CAACC,KAAK,CAACH,MAAM,IAAI,IAAI,CAAC;IAElD,OAAOI,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,GACxBA,MAAM,CAACK,MAAM,CAAEC,IAAI,IAAqB,OAAOA,IAAI,KAAK,QAAQ,CAAC,GACjE,EAAE;EACR,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAAC;EACfC,KAAK,GAAG,IAAIC,GAAG,CAAS,CAAC;EAI1BC,WAAWA,CACCC,OAA0C,EAC3DC,QAAgB,EAChB;IAAA,KAFiBD,OAA0C,GAA1CA,OAA0C;IAG3D,IAAI,CAACE,GAAG,GAAG,GAAGhB,UAAU,IAAIe,QAAQ,EAAE;IACtC,IAAI,CAACE,MAAM,GAAG,IAAI,CAACC,IAAI,CAAC,CAAC;EAC3B;EAEOC,GAAG,GAAIV,IAAY,IAAc,IAAI,CAACE,KAAK,CAACQ,GAAG,CAACV,IAAI,CAAC;;EAE5D;EACOW,GAAG,GAAIX,IAAY,IAAW;IACnC,IAAI,CAACE,KAAK,CAACS,GAAG,CAACX,IAAI,CAAC;IACpB,IAAI,CAACY,OAAO,CAAC,CAAC;EAChB,CAAC;;EAED;EACOC,UAAU,GAAIC,MAAyB,IAAW;IACvD,MAAMC,IAAI,GAAG,CAAC,GAAG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C,CAACE;MACrC,CAAC,CAAC;IACJ;EACF,CAAC;AACH;AAEA,SAASrB,kBAAkB","ignoreList":[]}
|
|
@@ -1,16 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable max-lines */
|
|
3
4
|
import { getClockParts, isClockSyncEnabled } from "../../../types/clock-sync.js";
|
|
4
5
|
import { LepuCommand } from "./lepu.commands.js";
|
|
5
|
-
import {
|
|
6
|
+
import { LEPU_CONNECT_REPLY_TIMEOUT_MS, LepuConnectRetry } from "./lepu.connect-retry.js";
|
|
6
7
|
import { lepuCommandOf } from "./lepu.frame.js";
|
|
7
8
|
import { LepuIdentityGate } from "./lepu.identity-gate.js";
|
|
8
9
|
import { describeLepuResponseType, isLepuSuccess } from "./lepu.response-type.js";
|
|
9
|
-
|
|
10
|
+
import { LepuStoredFiles } from "./lepu.stored-files.js";
|
|
11
|
+
/** How long past its delay a poll may go unanswered before it is sent again. */
|
|
12
|
+
const POLL_ANSWER_GRACE_MS = 1_000;
|
|
13
|
+
|
|
14
|
+
/** Lets a device finish writing a record before its file list is read. */
|
|
15
|
+
const FILE_LIST_DELAY_MS = 3_000;
|
|
16
|
+
const hexOf = opcode => `0x${(opcode ?? 0).toString(16).padStart(2, "0")}`;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Identifies a recorder, sets its local clock, then polls it live. Its stored files are only
|
|
20
|
+
* listed on connect: they are read when the app asks (`takeHistorySync`), and a record the
|
|
21
|
+
* device stores while connected is read as it is saved. A device that does not poll reads its
|
|
22
|
+
* files on connect, as nothing else would ever ask for them.
|
|
23
|
+
*/
|
|
10
24
|
class LepuEcgTransferSequencer {
|
|
11
25
|
phase = "identity";
|
|
26
|
+
clockRetry = new LepuConnectRetry();
|
|
12
27
|
constructor(params) {
|
|
13
28
|
this.params = params;
|
|
29
|
+
this.storedFiles = new LepuStoredFiles({
|
|
30
|
+
write: params.write,
|
|
31
|
+
builder: params.builder,
|
|
32
|
+
onFile: params.onFile,
|
|
33
|
+
onError: params.onError,
|
|
34
|
+
skipFiles: params.skipFiles,
|
|
35
|
+
deliveredFiles: params.deliveredFiles,
|
|
36
|
+
acceptFile: params.acceptFile,
|
|
37
|
+
onProgress: params.onProgress
|
|
38
|
+
});
|
|
14
39
|
this.identity = new LepuIdentityGate({
|
|
15
40
|
write: params.write,
|
|
16
41
|
builder: params.builder,
|
|
@@ -19,11 +44,51 @@ class LepuEcgTransferSequencer {
|
|
|
19
44
|
rejectEncryptionAtBytes: params.rejectEncryptionAtBytes,
|
|
20
45
|
onIdentified: params.onIdentified,
|
|
21
46
|
onRefused: params.onRefused,
|
|
22
|
-
onAdmitted: this.
|
|
47
|
+
onAdmitted: this.startClockOrFiles
|
|
23
48
|
});
|
|
24
49
|
}
|
|
25
50
|
initialCommands = () => this.identity.initialCommands();
|
|
26
51
|
isHistoryTransfer = () => true;
|
|
52
|
+
commandTimeoutMs = () => {
|
|
53
|
+
if (this.phase === "identity") {
|
|
54
|
+
return this.identity.commandTimeoutMs();
|
|
55
|
+
}
|
|
56
|
+
if (this.phase === "polling" && this.params.pollIntervalMs !== undefined) {
|
|
57
|
+
return this.params.pollIntervalMs + POLL_ANSWER_GRACE_MS;
|
|
58
|
+
}
|
|
59
|
+
if (this.phase === "requested") {
|
|
60
|
+
return LEPU_CONNECT_REPLY_TIMEOUT_MS;
|
|
61
|
+
}
|
|
62
|
+
return this.phase === "clock" ? LEPU_CONNECT_REPLY_TIMEOUT_MS : undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** An unanswered clock is sent once more, then skipped; nothing after it needs it. */
|
|
66
|
+
onCommandTimeout = () => {
|
|
67
|
+
if (this.phase === "identity") {
|
|
68
|
+
return this.identity.onCommandTimeout();
|
|
69
|
+
}
|
|
70
|
+
if (this.phase === "requested") {
|
|
71
|
+
this.params.onError(`the device did not answer command ${hexOf(this.requestedCommand)}`);
|
|
72
|
+
}
|
|
73
|
+
if (this.phase === "polling" || this.phase === "requested") {
|
|
74
|
+
return {
|
|
75
|
+
commands: this.resumePolling()
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (this.phase !== "clock") {
|
|
79
|
+
return {};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
commands: this.clockRetry.mayRetry() ? [this.setTimeCommand()] : this.startFiles()
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
commandProgress = frame => {
|
|
86
|
+
if (this.phase === "identity") {
|
|
87
|
+
return this.identity.commandProgress(frame);
|
|
88
|
+
}
|
|
89
|
+
const awaited = this.phase === "clock" ? LepuCommand.SET_TIME : this.phase === "polling" ? this.params.pollCommand : this.phase === "requested" ? this.requestedCommand : undefined;
|
|
90
|
+
return awaited !== undefined && lepuCommandOf(frame) !== awaited ? "ignored" : "complete";
|
|
91
|
+
};
|
|
27
92
|
nextCommand = frame => {
|
|
28
93
|
if (this.phase === "identity") {
|
|
29
94
|
return this.identity.nextCommand(frame);
|
|
@@ -35,20 +100,60 @@ class LepuEcgTransferSequencer {
|
|
|
35
100
|
if (this.params.pollCommand === undefined || lepuCommandOf(frame) !== this.params.pollCommand) {
|
|
36
101
|
return undefined;
|
|
37
102
|
}
|
|
38
|
-
return this.
|
|
103
|
+
return this.afterPollAnswer(frame);
|
|
104
|
+
}
|
|
105
|
+
if (this.phase === "requested") {
|
|
106
|
+
return this.finishRequested(frame);
|
|
39
107
|
}
|
|
40
108
|
return this.transfer?.nextCommand(frame);
|
|
41
109
|
};
|
|
42
|
-
|
|
110
|
+
afterPollAnswer = frame => {
|
|
111
|
+
const stored = this.params.shouldStartTransfer?.(frame) ?? true;
|
|
112
|
+
const delayBeforeWriteMs = stored ? FILE_LIST_DELAY_MS : undefined;
|
|
113
|
+
if (this.params.takeHistorySync?.()) {
|
|
114
|
+
return this.startTransfer(this.storedFiles.readAll, delayBeforeWriteMs);
|
|
115
|
+
}
|
|
116
|
+
return stored ? this.startTransfer(this.storedFiles.readNew, delayBeforeWriteMs) : this.requestedOrPoll();
|
|
117
|
+
};
|
|
118
|
+
requestedOrPoll = () => {
|
|
119
|
+
const requested = this.params.takeRequestedCommand?.();
|
|
120
|
+
if (requested === undefined) {
|
|
121
|
+
return [this.pollCommand()];
|
|
122
|
+
}
|
|
123
|
+
this.phase = "requested";
|
|
124
|
+
this.requestedCommand = requested;
|
|
125
|
+
return [{
|
|
126
|
+
...this.params.write,
|
|
127
|
+
frame: this.params.builder.build(requested)
|
|
128
|
+
}];
|
|
129
|
+
};
|
|
130
|
+
finishRequested = frame => {
|
|
131
|
+
if (lepuCommandOf(frame) !== this.requestedCommand) {
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
if (!isLepuSuccess(frame)) {
|
|
135
|
+
this.params.onError(`the device refused command ${hexOf(this.requestedCommand)}: ${describeLepuResponseType(frame)}`);
|
|
136
|
+
}
|
|
137
|
+
return this.resumePolling();
|
|
138
|
+
};
|
|
139
|
+
resumePolling = () => {
|
|
140
|
+
this.phase = "polling";
|
|
141
|
+
this.requestedCommand = undefined;
|
|
142
|
+
return [this.pollCommand()];
|
|
143
|
+
};
|
|
144
|
+
startClockOrFiles = () => {
|
|
43
145
|
if (isClockSyncEnabled(this.params.clockSync)) {
|
|
44
146
|
this.phase = "clock";
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
frame: this.params.builder.build(LepuCommand.SET_TIME, clockPayload(this.params.clockSync))
|
|
48
|
-
}];
|
|
147
|
+
this.clockRetry.started();
|
|
148
|
+
return [this.setTimeCommand()];
|
|
49
149
|
}
|
|
50
|
-
return this.
|
|
150
|
+
return this.startFiles();
|
|
51
151
|
};
|
|
152
|
+
startFiles = () => this.params.pollCommand === undefined || this.params.takeHistorySync?.() ? this.startTransfer(this.storedFiles.readAll) : this.startTransfer(this.storedFiles.listExisting);
|
|
153
|
+
setTimeCommand = () => ({
|
|
154
|
+
...this.params.write,
|
|
155
|
+
frame: this.params.builder.build(LepuCommand.SET_TIME, clockPayload(this.params.clockSync))
|
|
156
|
+
});
|
|
52
157
|
finishClock = frame => {
|
|
53
158
|
if (lepuCommandOf(frame) !== LepuCommand.SET_TIME) {
|
|
54
159
|
return undefined;
|
|
@@ -56,20 +161,11 @@ class LepuEcgTransferSequencer {
|
|
|
56
161
|
if (!isLepuSuccess(frame)) {
|
|
57
162
|
this.params.onError(`the device refused SET_TIME: ${describeLepuResponseType(frame)}`);
|
|
58
163
|
}
|
|
59
|
-
return this.
|
|
164
|
+
return this.startFiles();
|
|
60
165
|
};
|
|
61
|
-
startTransfer = delayBeforeWriteMs => {
|
|
166
|
+
startTransfer = (files, delayBeforeWriteMs) => {
|
|
62
167
|
this.phase = "files";
|
|
63
|
-
this.transfer =
|
|
64
|
-
write: this.params.write,
|
|
65
|
-
builder: this.params.builder,
|
|
66
|
-
onFile: this.params.onFile,
|
|
67
|
-
onError: this.params.onError,
|
|
68
|
-
skipFiles: this.params.skipFiles,
|
|
69
|
-
acceptFile: this.params.acceptFile,
|
|
70
|
-
afterTransfer: this.finishTransfer,
|
|
71
|
-
onProgress: this.params.onProgress
|
|
72
|
-
});
|
|
168
|
+
this.transfer = files(this.finishTransfer);
|
|
73
169
|
return this.transfer.initialCommands(delayBeforeWriteMs);
|
|
74
170
|
};
|
|
75
171
|
finishTransfer = () => {
|
|
@@ -78,15 +174,18 @@ class LepuEcgTransferSequencer {
|
|
|
78
174
|
this.phase = "polling";
|
|
79
175
|
return [this.pollCommand()];
|
|
80
176
|
}
|
|
81
|
-
return
|
|
177
|
+
return [];
|
|
178
|
+
};
|
|
179
|
+
pollCommand = () => {
|
|
180
|
+
const delayBeforeWriteMs = this.params.pollsOnAnswer?.() ? undefined : this.params.pollIntervalMs;
|
|
181
|
+
return {
|
|
182
|
+
...this.params.write,
|
|
183
|
+
frame: this.params.builder.build(this.params.pollCommand),
|
|
184
|
+
...(delayBeforeWriteMs === undefined ? {} : {
|
|
185
|
+
delayBeforeWriteMs
|
|
186
|
+
})
|
|
187
|
+
};
|
|
82
188
|
};
|
|
83
|
-
pollCommand = () => ({
|
|
84
|
-
...this.params.write,
|
|
85
|
-
frame: this.params.builder.build(this.params.pollCommand),
|
|
86
|
-
...(this.params.pollIntervalMs === undefined ? {} : {
|
|
87
|
-
delayBeforeWriteMs: this.params.pollIntervalMs
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
189
|
}
|
|
91
190
|
const clockPayload = clockSync => {
|
|
92
191
|
const parts = getClockParts(clockSync?.now?.() ?? new Date(), clockSync?.timezone);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getClockParts","isClockSyncEnabled","LepuCommand","
|
|
1
|
+
{"version":3,"names":["getClockParts","isClockSyncEnabled","LepuCommand","LEPU_CONNECT_REPLY_TIMEOUT_MS","LepuConnectRetry","lepuCommandOf","LepuIdentityGate","describeLepuResponseType","isLepuSuccess","LepuStoredFiles","POLL_ANSWER_GRACE_MS","FILE_LIST_DELAY_MS","hexOf","opcode","toString","padStart","LepuEcgTransferSequencer","phase","clockRetry","constructor","params","storedFiles","write","builder","onFile","onError","skipFiles","deliveredFiles","acceptFile","onProgress","identity","expectedDeviceTypes","manufacturerData","rejectEncryptionAtBytes","onIdentified","onRefused","onAdmitted","startClockOrFiles","initialCommands","isHistoryTransfer","commandTimeoutMs","pollIntervalMs","undefined","onCommandTimeout","requestedCommand","commands","resumePolling","mayRetry","setTimeCommand","startFiles","commandProgress","frame","awaited","SET_TIME","pollCommand","nextCommand","finishClock","afterPollAnswer","finishRequested","transfer","stored","shouldStartTransfer","delayBeforeWriteMs","takeHistorySync","startTransfer","readAll","readNew","requestedOrPoll","requested","takeRequestedCommand","build","clockSync","started","listExisting","clockPayload","files","finishTransfer","pollsOnAnswer","parts","now","Date","timezone","year","month","day","hours","minutes","seconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.ecg-transfer.ts"],"mappings":";;AAAA;AACA,SAEEA,aAAa,EACbC,kBAAkB,QACb,8BAA2B;AAQlC,SAASC,WAAW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G,IAAI,CAACtB,MAAM,CAACqB,cAAc;IAEjG,OAAO;MACL,GAAG,IAAI,CAACrB,MAAM,CAACE,KAAK;MACpB6B,KAAK,EAAE,IAAI,CAAC/B,MAAM,CAACG,OAAO,CAAC+C,KAAK,CAAC,IAAI,CAAClD,MAAM,CAACkC,WAAY,CAAC;MAC1D,IAAIQ,kBAAkB,KAAKpB,SAAS,GAAG,CAAC,CAAC,GAAG;QAAEoB;MAAmB,CAAC;IACpE,CAAC;EACH,CAAC;AACH;AAEA,MAAMY,YAAY,GAAIH,SAA4B,IAAe;EAC/D,MAAMO,KAAK,GAAG9E,aAAa,CACzBuE,SAAS,EAAEQ,GAAG,GAAG,CAAC,IAAI,IAAIC,IAAI,CAAC,CAAC,EAChCT,SAAS,EAAEU,QACb,CAAC;EAED,OAAO,CACLH,KAAK,CAACI,IAAI,GAAG,IAAI,EAChBJ,KAAK,CAACI,IAAI,IAAI,CAAC,GAAI,IAAI,EACxBJ,KAAK,CAACK,KAAK,EACXL,KAAK,CAACM,GAAG,EACTN,KAAK,CAACO,KAAK,EACXP,KAAK,CAACQ,OAAO,EACbR,KAAK,CAACS,OAAO,CACd;AACH,CAAC;AAED,SAASvE,wBAAwB,EAAE0D,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
import { createLepuAccessToken, decryptLepuHandshake, parseLepuSessionKey } from "../viatom/viatom-lepu-crypto.js";
|
|
5
|
+
import { advertisesLepuEncryption } from "./lepu.advertisement.js";
|
|
6
|
+
import { LepuCommandBuilder } from "./lepu.command-builder.js";
|
|
7
|
+
import { LEPU_CONNECT_REPLY_TIMEOUT_MS, LepuConnectRetry } from "./lepu.connect-retry.js";
|
|
8
|
+
import { lepuCommandOf, lepuPayloadOf } from "./lepu.frame.js";
|
|
9
|
+
import { isLepuSuccess } from "./lepu.response-type.js";
|
|
10
|
+
const LEPU_ENCRYPT_COMMAND = 0xff;
|
|
11
|
+
/**
|
|
12
|
+
* Runs the vendor's encryption handshake before a standard Lepu exchange, when the
|
|
13
|
+
* advertisement asks for one.
|
|
14
|
+
*
|
|
15
|
+
* The access token goes out in plain text; the reply carries the session key, and from then
|
|
16
|
+
* on every request is encrypted here and every reply is decrypted by the frame reader that
|
|
17
|
+
* shares the session. Without the flag the exchange runs exactly as it did before.
|
|
18
|
+
*/
|
|
19
|
+
class LepuEncryptionHandshake {
|
|
20
|
+
state = "awaiting-key";
|
|
21
|
+
retry = new LepuConnectRetry();
|
|
22
|
+
constructor(inner, params) {
|
|
23
|
+
this.inner = inner;
|
|
24
|
+
this.params = params;
|
|
25
|
+
}
|
|
26
|
+
initialCommands = () => {
|
|
27
|
+
this.retry.started();
|
|
28
|
+
return [this.tokenCommand()];
|
|
29
|
+
};
|
|
30
|
+
nextCommand = (frame, characteristicUuid) => {
|
|
31
|
+
if (this.state === "done") {
|
|
32
|
+
return this.encrypted(this.inner.nextCommand(frame, characteristicUuid));
|
|
33
|
+
}
|
|
34
|
+
if (this.state === "refused" || lepuCommandOf(frame) !== LEPU_ENCRYPT_COMMAND) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
return this.acceptKey(frame);
|
|
38
|
+
};
|
|
39
|
+
commandTimeoutMs = () => this.state === "awaiting-key" ? LEPU_CONNECT_REPLY_TIMEOUT_MS : this.state === "done" ? this.inner.commandTimeoutMs?.() : undefined;
|
|
40
|
+
|
|
41
|
+
/** A device just woken can drop the token, so it is sent once more before giving up. */
|
|
42
|
+
onCommandTimeout = () => {
|
|
43
|
+
if (this.state === "done") {
|
|
44
|
+
const result = this.inner.onCommandTimeout?.() ?? {};
|
|
45
|
+
return {
|
|
46
|
+
...result,
|
|
47
|
+
commands: this.encrypted(result.commands)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (this.state === "refused") {
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
return this.retry.mayRetry() ? {
|
|
54
|
+
commands: [this.tokenCommand()]
|
|
55
|
+
} : {
|
|
56
|
+
terminal: true
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
commandProgress = frame => {
|
|
60
|
+
if (this.state === "done") {
|
|
61
|
+
return this.inner.commandProgress?.(frame) ?? "complete";
|
|
62
|
+
}
|
|
63
|
+
return lepuCommandOf(frame) === LEPU_ENCRYPT_COMMAND ? "complete" : "ignored";
|
|
64
|
+
};
|
|
65
|
+
onServicesDiscovered = serviceUuids => this.inner.onServicesDiscovered?.(serviceUuids);
|
|
66
|
+
isNormalDisconnect = () => this.inner.isNormalDisconnect?.() ?? false;
|
|
67
|
+
isHistoryTransfer = () => this.inner.isHistoryTransfer?.() ?? false;
|
|
68
|
+
acceptKey = frame => {
|
|
69
|
+
const reply = lepuPayloadOf(frame).map(hexToByte);
|
|
70
|
+
const key = isLepuSuccess(frame) ? parseLepuSessionKey(decryptLepuHandshake(reply)) : undefined;
|
|
71
|
+
if (!key) {
|
|
72
|
+
this.state = "refused";
|
|
73
|
+
this.params.onRefused("the device refused the encryption handshake");
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
this.params.session.begin(key);
|
|
77
|
+
this.state = "done";
|
|
78
|
+
return this.encrypted(this.inner.initialCommands());
|
|
79
|
+
};
|
|
80
|
+
tokenCommand = () => ({
|
|
81
|
+
...this.params.write,
|
|
82
|
+
frame: new LepuCommandBuilder(this.params.startByte).build(LEPU_ENCRYPT_COMMAND, createLepuAccessToken())
|
|
83
|
+
});
|
|
84
|
+
encrypted = commands => commands?.map(command => ({
|
|
85
|
+
...command,
|
|
86
|
+
frame: this.params.session.encryptFrame(command.frame)
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The sequencer for one connection: wrapped in the handshake when the advertisement asks
|
|
92
|
+
* for encryption, unchanged otherwise. Either way the session starts without a key.
|
|
93
|
+
*/
|
|
94
|
+
const withLepuEncryption = (inner, params) => {
|
|
95
|
+
params.session.end();
|
|
96
|
+
return advertisesLepuEncryption(params.manufacturerData) ? new LepuEncryptionHandshake(inner, params) : inner;
|
|
97
|
+
};
|
|
98
|
+
export { withLepuEncryption };
|
|
99
|
+
//# sourceMappingURL=lepu.encryption-handshake.js.map
|
package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","createLepuAccessToken","decryptLepuHandshake","parseLepuSessionKey","advertisesLepuEncryption","LepuCommandBuilder","LEPU_CONNECT_REPLY_TIMEOUT_MS","LepuConnectRetry","lepuCommandOf","lepuPayloadOf","isLepuSuccess","LEPU_ENCRYPT_COMMAND","LepuEncryptionHandshake","state","retry","constructor","inner","params","initialCommands","started","tokenCommand","nextCommand","frame","characteristicUuid","encrypted","undefined","acceptKey","commandTimeoutMs","onCommandTimeout","result","commands","mayRetry","terminal","commandProgress","onServicesDiscovered","serviceUuids","isNormalDisconnect","isHistoryTransfer","reply","map","key","onRefused","session","begin","write","startByte","build","command","encryptFrame","withLepuEncryption","end","manufacturerData"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.encryption-handshake.ts"],"mappings":";;AAKA,SAASA,SAAS,QAAQ,+BAA4B;AACtD,SACEC,qBAAqB,EACrBC,oBAAoB,EACpBC,mBAAmB,QACd,iCAA8B;AAErC,SAASC,wBAAwB,QAAQ,yBAAsB;AAC/D,SAASC,kBAAkB,QAAQ,2BAAwB;AAC3D,SAASC,6BAA6B,EAAEC,gBAAgB,QAAQ,yBAAsB;AACtF,SAASC,aAAa,EAAEC,aAAa,QAAQ,iBAAc;AAC3D,SAASC,aAAa,QAAQ,yBAAsB;AAGpD,MAAMC,oBAAoB,GAAG,IAAI;AAgBjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,CAA6B;EAChDC,KAAK,GAAm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AACH,GAAG,CAAC;IAC9B,IAAI,CAAC3B,KAAK,GAAG,MAAM;IAEnB,OAAO,IAAI,CAACW,SAAS,CAAC,IAAI,CAACR,KAAK,CAACE,eAAe,CAAC,CAAC,CAAC;EACrD,CAAC;EAEOE,YAAY,GAAGA,CAAA,MAAsB;IAC3C,GAAG,IAAI,CAACH,MAAM,CAAC2B,KAAK;IACpBtB,KAAK,EAAE,IAAIjB,kBAAkB,CAAC,IAAI,CAACY,MAAM,CAAC4B,SAAS,CAAC,CAACC,KAAK,CACxDnC,oBAAoB,EACpBV,qBAAqB,CAAC,CACxB;EACF,CAAC,CAAC;EAEMuB,SAAS,GACfM,QAA8C,IAE9CA,QAAQ,EAAES,GAAG,CAAEQ,OAAO,KAAM;IAC1B,GAAGA,OAAO;IACVzB,KAAK,EAAE,IAAI,CAACL,MAAM,CAACyB,OAAO,CAACM,YAAY,CAACD,OAAO,CAACzB,KAAK;EACvD,CAAC,CAAC,CAAC;AACP;;AAEA;AACA;AACA;AACA;AACA,MAAM2B,kBAAkB,GAAGA,CACzBjC,KAA2B,EAC3BC,MAA4B,KACP;EACrBA,MAAM,CAACyB,OAAO,CAACQ,GAAG,CAAC,CAAC;EAEpB,OAAO9C,wBAAwB,CAACa,MAAM,CAACkC,gBAAgB,CAAC,GACpD,IAAIvC,uBAAuB,CAACI,KAAK,EAAEC,MAAM,CAAC,GAC1CD,KAAK;AACX,CAAC;AAED,SAASiC,kBAAkB","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable max-lines */
|
|
4
4
|
|
|
5
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
5
6
|
import { le32FromHex } from "../../../utils/le-32-from-hex.js";
|
|
6
7
|
import { le32ToBytes } from "../../../utils/le-32-to-bytes.js";
|
|
7
8
|
import { LepuCommand } from "./lepu.commands.js";
|
|
@@ -11,11 +12,10 @@ import { describeLepuResponseType, isLepuSuccess } from "./lepu.response-type.js
|
|
|
11
12
|
const FILE_SIZE_OFFSET = 0;
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* A
|
|
15
|
-
*
|
|
16
|
-
* is a length to refuse rather than try to hold on a low-memory tablet.
|
|
15
|
+
* A size beyond this is a corrupt length field rather than a recording. A holter ECG takes about
|
|
16
|
+
* a byte per sample at 125 Hz, so this holds about 140 hours.
|
|
17
17
|
*/
|
|
18
|
-
const MAX_FILE_BYTES =
|
|
18
|
+
const MAX_FILE_BYTES = 64 * 1_024 * 1_024;
|
|
19
19
|
const TRANSFER_COMMANDS = [LepuCommand.GET_FILE_LIST, LepuCommand.READ_FILE_START, LepuCommand.READ_FILE_DATA, LepuCommand.READ_FILE_END];
|
|
20
20
|
|
|
21
21
|
/** A file read from a Lepu device. */
|
|
@@ -44,7 +44,8 @@ class LepuFileTransfer {
|
|
|
44
44
|
fileIndex = 0;
|
|
45
45
|
name = "";
|
|
46
46
|
totalBytes = 0;
|
|
47
|
-
|
|
47
|
+
bytes = new Uint8Array(0);
|
|
48
|
+
received = 0;
|
|
48
49
|
isSessionOpen = false;
|
|
49
50
|
isDone = false;
|
|
50
51
|
constructor(params) {
|
|
@@ -66,6 +67,7 @@ class LepuFileTransfer {
|
|
|
66
67
|
if (command === LepuCommand.GET_FILE_LIST) {
|
|
67
68
|
this.files = lepuNamesFrom(lepuPayloadOf(frame));
|
|
68
69
|
this.fileIndex = 0;
|
|
70
|
+
this.params.onFileList?.(this.files);
|
|
69
71
|
return this.openNextFile();
|
|
70
72
|
}
|
|
71
73
|
if (command === LepuCommand.READ_FILE_START) {
|
|
@@ -88,7 +90,8 @@ class LepuFileTransfer {
|
|
|
88
90
|
}
|
|
89
91
|
this.name = name;
|
|
90
92
|
this.totalBytes = 0;
|
|
91
|
-
this.
|
|
93
|
+
this.bytes = new Uint8Array(0);
|
|
94
|
+
this.received = 0;
|
|
92
95
|
return [this.commandFor(LepuCommand.READ_FILE_START, [...lepuNameBytes(name), ...le32ToBytes(0)])];
|
|
93
96
|
};
|
|
94
97
|
|
|
@@ -103,6 +106,7 @@ class LepuFileTransfer {
|
|
|
103
106
|
if (this.totalBytes === 0) {
|
|
104
107
|
return this.closeFile();
|
|
105
108
|
}
|
|
109
|
+
this.bytes = new Uint8Array(this.totalBytes);
|
|
106
110
|
return [this.commandFor(LepuCommand.READ_FILE_DATA, le32ToBytes(0))];
|
|
107
111
|
};
|
|
108
112
|
|
|
@@ -113,28 +117,30 @@ class LepuFileTransfer {
|
|
|
113
117
|
*/
|
|
114
118
|
appendChunk = payload => {
|
|
115
119
|
if (payload.length === 0) {
|
|
116
|
-
return this.fail(`"${this.name}" stopped sending at ${this.
|
|
120
|
+
return this.fail(`"${this.name}" stopped sending at ${this.received} of ${this.totalBytes} bytes`);
|
|
117
121
|
}
|
|
118
|
-
this.
|
|
122
|
+
const fits = payload.slice(0, this.totalBytes - this.received);
|
|
123
|
+
this.bytes.set(fits.map(hexToByte), this.received);
|
|
124
|
+
this.received += fits.length;
|
|
119
125
|
this.params.onProgress?.({
|
|
120
126
|
name: this.name,
|
|
121
|
-
receivedBytes: this.
|
|
127
|
+
receivedBytes: this.received,
|
|
122
128
|
totalBytes: this.totalBytes
|
|
123
129
|
});
|
|
124
|
-
if (this.
|
|
130
|
+
if (this.received >= this.totalBytes) {
|
|
125
131
|
return this.closeFile();
|
|
126
132
|
}
|
|
127
|
-
return [this.commandFor(LepuCommand.READ_FILE_DATA, le32ToBytes(this.
|
|
133
|
+
return [this.commandFor(LepuCommand.READ_FILE_DATA, le32ToBytes(this.received))];
|
|
128
134
|
};
|
|
129
135
|
closedFile = () => {
|
|
130
136
|
this.isSessionOpen = false;
|
|
131
|
-
if (this.totalBytes > 0 && this.
|
|
132
|
-
return this.fail(`"${this.name}" ended at ${this.
|
|
137
|
+
if (this.totalBytes > 0 && this.received !== this.totalBytes) {
|
|
138
|
+
return this.fail(`"${this.name}" ended at ${this.received} of ${this.totalBytes} bytes`);
|
|
133
139
|
}
|
|
134
140
|
if (this.totalBytes > 0) {
|
|
135
141
|
this.params.onFile({
|
|
136
142
|
name: this.name,
|
|
137
|
-
|
|
143
|
+
bytes: this.bytes
|
|
138
144
|
});
|
|
139
145
|
}
|
|
140
146
|
this.fileIndex++;
|