@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
|
@@ -14,17 +14,71 @@ import { lepuDevice } from "../lepu/lepu.transports.js";
|
|
|
14
14
|
* the blood-pressure monitors answer, and its stored files are read with `0x03`-`0x05`
|
|
15
15
|
* rather than the generic `0xF1`-`0xF4`. A file transfer written for the rest of the family
|
|
16
16
|
* does not apply to these.
|
|
17
|
+
*
|
|
18
|
+
* A ring that serves its pulse wave (`0x1B`) is polled for that instead: its answer starts with
|
|
19
|
+
* the same saturation and pulse rate, followed by the wave.
|
|
17
20
|
*/
|
|
18
21
|
|
|
19
22
|
/** Realtime parameters. A read: it reports what the sensor sees and starts nothing. */
|
|
20
23
|
const RT_PARAM = 0x17;
|
|
21
24
|
|
|
22
|
-
/** Status, payload length, oxygen
|
|
23
|
-
const CASE_SELECTOR_BYTES = [1, 5, 6, 7, 8, 9, 18];
|
|
25
|
+
/** Status, payload length, oxygen and pulse, then the sensor state of a parameters answer and of a wave answer. */
|
|
26
|
+
const CASE_SELECTOR_BYTES = [1, 5, 6, 7, 8, 9, 18, 13];
|
|
24
27
|
|
|
25
28
|
/** Header plus the complete realtime response, including sensor state and checksum. */
|
|
26
29
|
const MIN_LENGTH_BYTES = 21;
|
|
30
|
+
|
|
31
|
+
/** A wave answer of two samples or more, longer than any parameters answer, so the two never share a case. */
|
|
32
|
+
const WAVE_MIN_LENGTH_BYTES = MIN_LENGTH_BYTES + 1;
|
|
27
33
|
const PAYLOAD = 7;
|
|
34
|
+
const OXYGEN_AND_PULSE_FIELDS = [{
|
|
35
|
+
name: "bloodOxygen",
|
|
36
|
+
byteIndexes: [PAYLOAD],
|
|
37
|
+
encoding: "uint",
|
|
38
|
+
unit: "%"
|
|
39
|
+
}, {
|
|
40
|
+
name: "pulseRate",
|
|
41
|
+
byteIndexes: [PAYLOAD + 1, PAYLOAD + 2],
|
|
42
|
+
byteOrder: "little",
|
|
43
|
+
encoding: "uint",
|
|
44
|
+
unit: "bpm"
|
|
45
|
+
}];
|
|
46
|
+
const CASES = [{
|
|
47
|
+
selector: "000002??????????",
|
|
48
|
+
kind: "idle",
|
|
49
|
+
description: "Device information response"
|
|
50
|
+
}, {
|
|
51
|
+
selector: "000d00ffffff00??",
|
|
52
|
+
kind: "idle",
|
|
53
|
+
description: "No finger detected"
|
|
54
|
+
}, {
|
|
55
|
+
selector: "000d0000000001??",
|
|
56
|
+
kind: "idle",
|
|
57
|
+
description: "Sensor acquiring"
|
|
58
|
+
}, {
|
|
59
|
+
selector: "000d00??????01??",
|
|
60
|
+
kind: "result",
|
|
61
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
62
|
+
description: "Realtime parameters",
|
|
63
|
+
fields: OXYGEN_AND_PULSE_FIELDS
|
|
64
|
+
}, {
|
|
65
|
+
selector: "00????????????00",
|
|
66
|
+
kind: "idle",
|
|
67
|
+
minLengthBytes: WAVE_MIN_LENGTH_BYTES,
|
|
68
|
+
description: "Pulse wave without sensor contact"
|
|
69
|
+
}, {
|
|
70
|
+
selector: "00????000000??01",
|
|
71
|
+
kind: "idle",
|
|
72
|
+
minLengthBytes: WAVE_MIN_LENGTH_BYTES,
|
|
73
|
+
description: "Pulse wave, sensor acquiring"
|
|
74
|
+
}, {
|
|
75
|
+
selector: "00????????????01",
|
|
76
|
+
kind: "result",
|
|
77
|
+
minLengthBytes: WAVE_MIN_LENGTH_BYTES,
|
|
78
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
79
|
+
description: "Realtime parameters with the pulse wave",
|
|
80
|
+
fields: OXYGEN_AND_PULSE_FIELDS
|
|
81
|
+
}];
|
|
28
82
|
const SPOT_CHECK_TIMEOUT_MS = 60_000;
|
|
29
83
|
|
|
30
84
|
/** OxyII realtime-parameter replies carry the values after the seven-byte frame header. */
|
|
@@ -92,38 +146,10 @@ const viatomOximeter = (advertisedName, params) => {
|
|
|
92
146
|
emit: "mean"
|
|
93
147
|
},
|
|
94
148
|
pollCommand: RT_PARAM,
|
|
149
|
+
pulseWave: true,
|
|
95
150
|
minLengthBytes: MIN_LENGTH_BYTES,
|
|
96
151
|
caseSelectorBytes: CASE_SELECTOR_BYTES,
|
|
97
|
-
cases:
|
|
98
|
-
selector: "000002????????",
|
|
99
|
-
kind: "idle",
|
|
100
|
-
description: "Device information response"
|
|
101
|
-
}, {
|
|
102
|
-
selector: "000d00ffffff00",
|
|
103
|
-
kind: "idle",
|
|
104
|
-
description: "No finger detected"
|
|
105
|
-
}, {
|
|
106
|
-
selector: "000d0000000001",
|
|
107
|
-
kind: "idle",
|
|
108
|
-
description: "Sensor acquiring"
|
|
109
|
-
}, {
|
|
110
|
-
selector: "000d00??????01",
|
|
111
|
-
kind: "result",
|
|
112
|
-
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
113
|
-
description: "Realtime parameters",
|
|
114
|
-
fields: [{
|
|
115
|
-
name: "bloodOxygen",
|
|
116
|
-
byteIndexes: [PAYLOAD],
|
|
117
|
-
encoding: "uint",
|
|
118
|
-
unit: "%"
|
|
119
|
-
}, {
|
|
120
|
-
name: "pulseRate",
|
|
121
|
-
byteIndexes: [PAYLOAD + 1, PAYLOAD + 2],
|
|
122
|
-
byteOrder: "little",
|
|
123
|
-
encoding: "uint",
|
|
124
|
-
unit: "bpm"
|
|
125
|
-
}]
|
|
126
|
-
}],
|
|
152
|
+
cases: CASES,
|
|
127
153
|
...(expectedDeviceTypes === undefined ? {} : {
|
|
128
154
|
expectedDeviceTypes
|
|
129
155
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","PAYLOAD","
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","WAVE_MIN_LENGTH_BYTES","PAYLOAD","OXYGEN_AND_PULSE_FIELDS","name","byteIndexes","encoding","unit","byteOrder","CASES","selector","kind","description","measurementTypeKey","bloodOxygenPulseRate","fields","minLengthBytes","SPOT_CHECK_TIMEOUT_MS","OXYII_MIN_LENGTH_BYTES","OXYII_CASE_SELECTOR_BYTES","OXYII_CASES","scale","decimals","VIATOM_OXYII_NAMES","viatomOximeter","advertisedName","params","expectedDeviceTypes","undefined","id","toLowerCase","replace","nameMatch","stuckDataTimeoutMs","protocol","manufacturerDataProtocol","rejectEncryptionAtBytes","v2","caseSelectorBytes","cases","setClockBeforeInfo","writeWithoutResponse","sessionPolicy","minSamples","emit","pollCommand","pulseWave","viatomOxyIiMonitor","transport","VIATOM_OXIMETER_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"mappings":";;AAAA;;AAEA,SAASA,kBAAkB,QAAQ,iBAAiB;AAKpD,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,QAAQ,GAAG,IAAI;;AAErB;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC;;AAEtD;AACA,MAAMC,gBAAgB,GAAG,EAAE;;AAE3B;AACA,MAAMC,qBAAqB,GAAGD,gBAAgB,GAAG,CAAC;AAElD,MAAME,OAAO,GAAG,CAAC;AAEjB,MAAMC,uBAA0C,GAAG,CACjD;EACEC,IAAI,EAAE,aAAa;EACnBC,WAAW,EAAE,CAACH,OAAO,CAAC;EACtBI,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAACH,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAG,CAAC,CAAC;EACvCM,SAAS,EAAE,QAAQ;EACnBF,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,CACF;AAED,MAAME,KAAuB,GAAG,CAC9B;EACEC,QAAQ,EAAE,kBAAkB;EAC5BC,IAAI,EAAE,MAAM;EACZC,WAAW,EAAE;AACf,CAAC,EACD;EACEF,QAAQ,EAAE,kBA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X,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,CACT;AAED,SACEA,qBAAqB,EACrB1B,kBAAkB,EAClBC,cAAc,EACduB,kBAAkB","ignoreList":[]}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
/* eslint-disable import/group-exports */
|
|
4
4
|
|
|
5
5
|
import { byteToHex } from "../../../utils/bytes-to-hex.js";
|
|
6
|
+
import { calculateCrc16Modbus } from "../../../utils/calculate-crc-16-modbus.js";
|
|
7
|
+
import { frameBytes } from "../../../utils/frame-bytes.js";
|
|
6
8
|
import { complete, corrupt, incomplete, noFrameStart } from "../../../utils/frame-read-results.js";
|
|
7
9
|
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
8
10
|
export const WBP02_CONTROL_SERVICE = "0000ffe5-0000-1000-8000-00805f9b34fb";
|
|
@@ -12,13 +14,7 @@ export const WBP02_NOTIFY = "0000ffe4-0000-1000-8000-00805f9b34fb";
|
|
|
12
14
|
|
|
13
15
|
/** CRC-16 used by the WBP-02 service, returned low byte first. */
|
|
14
16
|
export const wbp02Crc = bytes => {
|
|
15
|
-
|
|
16
|
-
for (const value of bytes) {
|
|
17
|
-
crc ^= hexToByte(value);
|
|
18
|
-
for (let bit = 0; bit < 8; bit += 1) {
|
|
19
|
-
crc = (crc & 1) !== 0 ? crc >>> 1 ^ 0xa001 : crc >>> 1;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
17
|
+
const crc = calculateCrc16Modbus(frameBytes(bytes));
|
|
22
18
|
return [byteToHex(crc), byteToHex(crc >> 8)];
|
|
23
19
|
};
|
|
24
20
|
export const wbp02Command = (command, payload = []) => {
|
package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["byteToHex","complete","corrupt","incomplete","noFrameStart","hexToByte","WBP02_CONTROL_SERVICE","WBP02_WRITE","WBP02_DATA_SERVICE","WBP02_NOTIFY","wbp02Crc","bytes","crc","
|
|
1
|
+
{"version":3,"names":["byteToHex","calculateCrc16Modbus","frameBytes","complete","corrupt","incomplete","noFrameStart","hexToByte","WBP02_CONTROL_SERVICE","WBP02_WRITE","WBP02_DATA_SERVICE","WBP02_NOTIFY","wbp02Crc","bytes","crc","wbp02Command","command","payload","body","length","map","wbp02Connect","wbp02SyncTime","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","wbp02Login","wbp02RecordCount","wbp02Record","index","decodeWbp02Response","frame","undefined","slice","at","content","parseWbp02Record","value","offset","year","month","day","hour","minute","recordedAt","systolic","diastolic","heartRate","recordingId","toISOString","Wbp02FrameReader","readFrame","buffer","start","findIndex"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.ts"],"mappings":";;AAAA;;AAIA,SAASA,SAAS,QAAQ,gCAA6B;AACvD,SAASC,oBAAoB,QAAQ,2CAAwC;AAC7E,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SACEC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,YAAY,QACP,sCAAmC;AAC1C,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,OAAO,MAAMC,qBAAqB,GAAG,sCAAsC;AAC3E,OAAO,MAAMC,WAAW,GAAG,sCAAsC;AACjE,OAAO,MAAMC,kBAAkB,GAAG,sCAAsC;AACxE,OAAO,MAAMC,YAAY,GAAG,sCAAsC;;AAElE;AACA,OAAO,MAAMC,QAAQ,GAAIC,KAAwB,IAAuB;EACtE,MAAMC,GAAG,GAAGb,oBAAoB,CAACC,UAAU,CAACW,KAAK,CAAC,CAAC;EAEnD,OAAO,CAACb,SAAS,CAACc,GAAG,CAAC,EAAEd,SAAS,CAACc,GAAG,IAAI,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,OAAO,MAAMC,YAAY,GAAGA,CAC1B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AAE;MAAC,OAAOd,UAAU,CAACoD,KAAK,CAAC;IAAC;IACzD,MAAMtC,MAAM,GAAGZ,SAAS,CAACiD,MAAM,CAACC,KAAK,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;IAEnD,IAAItC,MAAM,GAAG,CAAC,EAAE;MAAC,OAAOf,OAAO,CAACqD,KAAK,GAAG,CAAC,CAAC;IAAC;IAC3C,IAAIA,KAAK,GAAGtC,MAAM,GAAGqC,MAAM,CAACrC,MAAM,EAAE;MAAC,OAAOd,UAAU,CAACoD,KAAK,CAAC;IAAC;IAC9D,MAAMtB,KAAK,GAAGqB,MAAM,CAACnB,KAAK,CAACoB,KAAK,EAAEA,KAAK,GAAGtC,MAAM,CAAC;IAEjD,IAAI,CAACe,mBAAmB,CAACC,KAAK,CAAC,EAAE;MAAC,OAAO/B,OAAO,CAACqD,KAAK,GAAG,CAAC,CAAC;IAAC;IAE5D,OAAOtD,QAAQ,CAACgC,KAAK,EAAEsB,KAAK,GAAGtC,MAAM,CAAC;EACxC;AACF","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable max-lines */
|
|
4
|
+
|
|
3
5
|
import { hasEnded, IDLE_CLOSE_MS, isLive, NOT_MEASURED, readStored, slotCount, SLOT_MS, toOpenSeries, toResult } from "./series-slots.js";
|
|
4
6
|
|
|
5
7
|
// Open series are stored at most this often, so a killed app loses up to 30 s of values.
|
|
@@ -8,11 +10,15 @@ const DEFAULT_SERIES_KEY = "@ovok/native/series";
|
|
|
8
10
|
/**
|
|
9
11
|
* Keeps each device's live values of a kind as a series of one-second slots, for a result policy of `"series"`. A
|
|
10
12
|
* series closes when its device disconnects, after an hour, or after 15 minutes without a value, and is then handed
|
|
11
|
-
* to the receiver as one result; until there is a receiver it waits, stored.
|
|
13
|
+
* to the receiver as one result; until there is a receiver it waits, stored. A series a device recorded itself, such
|
|
14
|
+
* as an oximeter's pulse wave, goes to the same receiver.
|
|
12
15
|
*/
|
|
13
16
|
class SeriesRecorder {
|
|
14
17
|
open = new Map();
|
|
15
18
|
closed = [];
|
|
19
|
+
|
|
20
|
+
/** Recorded by a device and waiting for a receiver; kept in memory, as a wave chunk is too large to restore often. */
|
|
21
|
+
finished = [];
|
|
16
22
|
listeners = new Set();
|
|
17
23
|
snapshot = [];
|
|
18
24
|
storing = Promise.resolve();
|
|
@@ -79,6 +85,18 @@ class SeriesRecorder {
|
|
|
79
85
|
/** Closes a device's series as it disconnects, so they are saved now rather than once they go quiet. */
|
|
80
86
|
closeDevice = deviceId => this.closeWhere(series => series.deviceData.id === deviceId);
|
|
81
87
|
|
|
88
|
+
/** Hands over a series a device recorded itself, for the signed-in account, now or once there is a receiver. */
|
|
89
|
+
addFinished = result => {
|
|
90
|
+
const ownerKey = this.options.getOwnerKey?.();
|
|
91
|
+
this.finished.push({
|
|
92
|
+
...result,
|
|
93
|
+
...(ownerKey && {
|
|
94
|
+
recordedFor: ownerKey
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
this.deliver();
|
|
98
|
+
};
|
|
99
|
+
|
|
82
100
|
/** Hands closed series to `receiver`, those waiting and those still to close; `undefined` makes them wait. */
|
|
83
101
|
deliverTo = receiver => {
|
|
84
102
|
this.receiver = receiver;
|
|
@@ -116,13 +134,17 @@ class SeriesRecorder {
|
|
|
116
134
|
};
|
|
117
135
|
deliver = () => {
|
|
118
136
|
const receiver = this.receiver;
|
|
119
|
-
if (!receiver
|
|
137
|
+
if (!receiver) {
|
|
120
138
|
return;
|
|
121
139
|
}
|
|
122
|
-
const
|
|
140
|
+
const finished = this.finished;
|
|
141
|
+
const closed = this.closed;
|
|
142
|
+
this.finished = [];
|
|
123
143
|
this.closed = [];
|
|
124
|
-
|
|
125
|
-
|
|
144
|
+
[...finished, ...closed.map(toResult)].forEach(result => receiver(result));
|
|
145
|
+
if (closed.length > 0) {
|
|
146
|
+
void this.store();
|
|
147
|
+
}
|
|
126
148
|
};
|
|
127
149
|
changed = () => {
|
|
128
150
|
this.snapshot = [...this.open.values()].filter(series => series.ownerKey === this.options.getOwnerKey?.()).map(toOpenSeries);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hasEnded","IDLE_CLOSE_MS","isLive","NOT_MEASURED","readStored","slotCount","SLOT_MS","toOpenSeries","toResult","STORE_EVERY_MS","DEFAULT_SERIES_KEY","SeriesRecorder","open","Map","closed","listeners","Set","snapshot","storing","Promise","resolve","constructor","options","restored","restore","add","deviceData","reading","now","key","id","measurementTypeKey","ownerKey","getOwnerKey","series","get","close","undefined","start","Math","floor","updatedAt","values","set","current","slot","Object","entries","forEach","property","value","Number","isFinite","has","length","push","changed","storeSoon","closeIdle","closeWhere","closeDevice","deviceId","
|
|
1
|
+
{"version":3,"names":["hasEnded","IDLE_CLOSE_MS","isLive","NOT_MEASURED","readStored","slotCount","SLOT_MS","toOpenSeries","toResult","STORE_EVERY_MS","DEFAULT_SERIES_KEY","SeriesRecorder","open","Map","closed","finished","listeners","Set","snapshot","storing","Promise","resolve","constructor","options","restored","restore","add","deviceData","reading","now","key","id","measurementTypeKey","ownerKey","getOwnerKey","series","get","close","undefined","start","Math","floor","updatedAt","values","set","current","slot","Object","entries","forEach","property","value","Number","isFinite","has","length","push","changed","storeSoon","closeIdle","closeWhere","closeDevice","deviceId","addFinished","result","recordedFor","deliver","deliverTo","receiver","then","getOpen","subscribe","listener","delete","destroy","clearTimeout","storeTimer","store","Date","ended","filter","map","storage","setTimeout","state","setItem","storageKey","JSON","stringify","catch"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/series-recorder.ts"],"mappings":";;AAAA;;AAOA,SACEA,QAAQ,EACRC,aAAa,EACbC,MAAM,EACNC,YAAY,EACZC,UAAU,EAGVC,SAAS,EACTC,OAAO,EACPC,YAAY,EACZC,QAAQ,QACH,mBAAgB;;AAEvB;AACA,MAAMC,cAAc,GAAG,MAAM;AAE7B,MAAMC,kBAAkB,GAAG,qBAA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Root":"../../../../../src","sources":["modules/bt-management/types/device-waveform.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const INITIAL_VALUE = 0xffff;
|
|
4
|
+
const REFLECTED_POLYNOMIAL = 0xa001;
|
|
5
|
+
const BITS_PER_BYTE = 8;
|
|
6
|
+
|
|
7
|
+
/** CRC-16/MODBUS (reflected polynomial 0xA001, initial value 0xFFFF); its low byte is the one sent first. */
|
|
8
|
+
export const calculateCrc16Modbus = bytes => {
|
|
9
|
+
let crc = INITIAL_VALUE;
|
|
10
|
+
for (const value of bytes) {
|
|
11
|
+
crc ^= value;
|
|
12
|
+
for (let bit = 0; bit < BITS_PER_BYTE; bit += 1) {
|
|
13
|
+
crc = (crc & 1) !== 0 ? crc >>> 1 ^ REFLECTED_POLYNOMIAL : crc >>> 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return crc;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=calculate-crc-16-modbus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["INITIAL_VALUE","REFLECTED_POLYNOMIAL","BITS_PER_BYTE","calculateCrc16Modbus","bytes","crc","value","bit"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/calculate-crc-16-modbus.ts"],"mappings":";;AAAA,MAAMA,aAAa,GAAG,MAAM;AAC5B,MAAMC,oBAAoB,GAAG,MAAM;AACnC,MAAMC,aAAa,GAAG,CAAC;;AAEvB;AACA,OAAO,MAAMC,oBAAoB,GAAIC,KAAwB,IAAa;EACxE,IAAIC,GAAG,GAAGL,aAAa;EAEvB,KAAK,MAAMM,KAAK,IAAIF,KAAK,EAAE;IACzBC,GAAG,IAAIC,KAAK;IACZ,KAAK,IAAIC,GAAG,GAAG,CAAC,EAAEA,GAAG,GAAGL,aAAa,EAAEK,GAAG,IAAI,CAAC,EAAE;MAC/CF,GAAG,GAAG,CAACA,GAAG,GAAG,CAAC,MAAM,CAAC,GAAIA,GAAG,KAAK,CAAC,GAAIJ,oBAAoB,GAAGI,GAAG,KAAK,CAAC;IACxE;EACF;EAEA,OAAOA,GAAG;AACZ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["le16FromHex","i16FromHex","hex","i","v"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/i-16-from-hex.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,qBAAkB;;AAE9C;AACA,OAAO,MAAMC,UAAU,GAAGA,CAACC,
|
|
1
|
+
{"version":3,"names":["le16FromHex","i16FromHex","hex","i","v"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/i-16-from-hex.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,qBAAkB;;AAE9C;AACA,OAAO,MAAMC,UAAU,GAAGA,CAACC,GAAsB,EAAEC,CAAS,KAAa;EACvE,MAAMC,CAAC,GAAGJ,WAAW,CAACE,GAAG,EAAEC,CAAC,CAAC;EAE7B,OAAOC,CAAC,GAAG,MAAM,GAAGA,CAAC,GAAG,OAAO,GAAGA,CAAC;AACrC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hexToByte","le32FromHex","hex","i","b0","b1","b2","b3"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/le-32-from-hex.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,kBAAe;;AAEzC;AACA,OAAO,MAAMC,WAAW,GAAGA,CAACC,
|
|
1
|
+
{"version":3,"names":["hexToByte","le32FromHex","hex","i","b0","b1","b2","b3"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/le-32-from-hex.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,kBAAe;;AAEzC;AACA,OAAO,MAAMC,WAAW,GAAGA,CAACC,GAAsB,EAAEC,CAAS,KAAa;EACxE,MAAMC,EAAE,GAAGJ,SAAS,CAACE,GAAG,CAACC,CAAC,CAAC,IAAI,GAAG,CAAC;EACnC,MAAME,EAAE,GAAGL,SAAS,CAACE,GAAG,CAACC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;EACvC,MAAMG,EAAE,GAAGN,SAAS,CAACE,GAAG,CAACC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;EACvC,MAAMI,EAAE,GAAGP,SAAS,CAACE,GAAG,CAACC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;EAEvC,OAAOC,EAAE,GAAIC,EAAE,IAAI,CAAE,GAAIC,EAAE,IAAI,EAAG,GAAIC,EAAE,IAAI,EAAG;AACjD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** One mmol/L of glucose (180.16 g/mol) is 18.016 mg/dL, as in the SIG glucose profile. */
|
|
4
|
+
const MG_PER_DL_PER_MMOL_PER_L = 18.016;
|
|
5
|
+
|
|
6
|
+
/** Glucose in tenths of a mmol/L, rounded to whole mg/dL. */
|
|
7
|
+
export const tenthsMmolToMgPerDl = tenthsMmol => Math.round(tenthsMmol / 10 * MG_PER_DL_PER_MMOL_PER_L);
|
|
8
|
+
//# sourceMappingURL=tenths-mmol-to-mg-per-dl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MG_PER_DL_PER_MMOL_PER_L","tenthsMmolToMgPerDl","tenthsMmol","Math","round"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/tenths-mmol-to-mg-per-dl.ts"],"mappings":";;AAAA;AACA,MAAMA,wBAAwB,GAAG,MAAM;;AAEvC;AACA,OAAO,MAAMC,mBAAmB,GAAIC,UAAkB,IACpDC,IAAI,CAACC,KAAK,CAAEF,UAAU,GAAG,EAAE,GAAIF,wBAAwB,CAAC","ignoreList":[]}
|
package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { AuthorizationRequestStatus, getRequestStatusForAuthorization, useHealthkitAuthorization } from "@kingstinct/react-native-healthkit";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { toError } from "../../../helpers/utils/to-error.js";
|
|
6
6
|
import { HealthAuthorizationContext } from "../../contexts/health-authorization-context.js";
|
|
@@ -17,7 +17,10 @@ export const AppleHealthAuthorizationProvider = /*#__PURE__*/React.memo(({
|
|
|
17
17
|
renderManualRequestUI,
|
|
18
18
|
onAuthorizationStatusChange
|
|
19
19
|
}) => {
|
|
20
|
-
const [authorizationStatus, requestAuthorization] = useHealthkitAuthorization(
|
|
20
|
+
const [authorizationStatus, requestAuthorization] = useHealthkitAuthorization({
|
|
21
|
+
toRead: readIdentifiers,
|
|
22
|
+
toWrite: writeIdentifiers
|
|
23
|
+
});
|
|
21
24
|
const [requestState, setRequestState] = React.useState("unknown");
|
|
22
25
|
const [notRequestedReadIdentifiers, setNotRequestedReadIdentifiers] = React.useState(readIdentifiers);
|
|
23
26
|
const [notRequestedWriteIdentifiers, setNotRequestedWriteIdentifiers] = React.useState(writeIdentifiers || []);
|
|
@@ -49,7 +52,11 @@ export const AppleHealthAuthorizationProvider = /*#__PURE__*/React.memo(({
|
|
|
49
52
|
readIdentifiers: currentRead,
|
|
50
53
|
writeIdentifiers: currentWrite
|
|
51
54
|
} = identifiersRef.current;
|
|
52
|
-
const [notRequestedRead, notRequestedWrite] = await Promise.all([getNotRequestedIdentifiers(currentRead, identifier => getRequestStatusForAuthorization(
|
|
55
|
+
const [notRequestedRead, notRequestedWrite] = await Promise.all([getNotRequestedIdentifiers(currentRead, identifier => getRequestStatusForAuthorization({
|
|
56
|
+
toRead: [identifier]
|
|
57
|
+
})), getNotRequestedIdentifiers(currentWrite || [], identifier => getRequestStatusForAuthorization({
|
|
58
|
+
toShare: [identifier]
|
|
59
|
+
}))]);
|
|
53
60
|
setNotRequestedReadIdentifiers(notRequestedRead);
|
|
54
61
|
setNotRequestedWriteIdentifiers(notRequestedWrite);
|
|
55
62
|
}, []);
|
|
@@ -72,7 +79,7 @@ export const AppleHealthAuthorizationProvider = /*#__PURE__*/React.memo(({
|
|
|
72
79
|
}
|
|
73
80
|
previousRequestKey.current = requestKey;
|
|
74
81
|
setRequestError(undefined);
|
|
75
|
-
setRequestState(authorizationStatus === null ? "unknown" : authorizationStatus ===
|
|
82
|
+
setRequestState(authorizationStatus === null ? "unknown" : authorizationStatus === AuthorizationRequestStatus.shouldRequest ? "shouldRequest" : "unknown");
|
|
76
83
|
setNotRequestedReadIdentifiers(readIdentifiers);
|
|
77
84
|
setNotRequestedWriteIdentifiers(writeIdentifiers || []);
|
|
78
85
|
}, [authorizationStatus, readIdentifiers, requestKey, writeIdentifiers]);
|
|
@@ -80,11 +87,11 @@ export const AppleHealthAuthorizationProvider = /*#__PURE__*/React.memo(({
|
|
|
80
87
|
if (authorizationStatus === null) {
|
|
81
88
|
return;
|
|
82
89
|
}
|
|
83
|
-
if (authorizationStatus ===
|
|
90
|
+
if (authorizationStatus === AuthorizationRequestStatus.shouldRequest) {
|
|
84
91
|
setRequestState(currentState => currentState === "unknown" ? "shouldRequest" : currentState);
|
|
85
92
|
}
|
|
86
93
|
void inspectAuthorization().then(() => {
|
|
87
|
-
setRequestState(currentState => currentState === "unknown" && authorizationStatus ===
|
|
94
|
+
setRequestState(currentState => currentState === "unknown" && authorizationStatus === AuthorizationRequestStatus.shouldRequest ? "shouldRequest" : currentState === "unknown" ? "ready" : currentState);
|
|
88
95
|
}).catch(error => {
|
|
89
96
|
const normalizedError = toError(error);
|
|
90
97
|
setRequestError(normalizedError);
|
|
@@ -92,12 +99,12 @@ export const AppleHealthAuthorizationProvider = /*#__PURE__*/React.memo(({
|
|
|
92
99
|
});
|
|
93
100
|
}, [authorizationStatus, inspectAuthorization]);
|
|
94
101
|
React.useEffect(() => {
|
|
95
|
-
if (renderManualRequestUI || skipRequest || authorizationStatus !==
|
|
102
|
+
if (renderManualRequestUI || skipRequest || authorizationStatus !== AuthorizationRequestStatus.shouldRequest || requestState !== "shouldRequest") {
|
|
96
103
|
return;
|
|
97
104
|
}
|
|
98
105
|
void requestAccess();
|
|
99
106
|
}, [authorizationStatus, requestAccess, renderManualRequestUI, requestState, skipRequest]);
|
|
100
|
-
const needsAuthorization = requestState === "shouldRequest" || requestState === "requesting" || requestState === "unknown" && authorizationStatus ===
|
|
107
|
+
const needsAuthorization = requestState === "shouldRequest" || requestState === "requesting" || requestState === "unknown" && authorizationStatus === AuthorizationRequestStatus.shouldRequest;
|
|
101
108
|
const shouldRenderManualRequestUI = renderManualRequestUI && needsAuthorization && requestState !== "requesting" && !skipRequest;
|
|
102
109
|
const shouldRenderFallback = fallback && needsAuthorization && !skipRequest;
|
|
103
110
|
const exposedStatus = React.useMemo(() => skipRequest && status.state === "unknown" ? {
|
|
@@ -111,7 +118,7 @@ export const AppleHealthAuthorizationProvider = /*#__PURE__*/React.memo(({
|
|
|
111
118
|
request: requestAccess
|
|
112
119
|
}), [exposedStatus, requestAccess]);
|
|
113
120
|
let content = null;
|
|
114
|
-
if (skipRequest || requestState === "ready" || requestState === "unknown" && (authorizationStatus ===
|
|
121
|
+
if (skipRequest || requestState === "ready" || requestState === "unknown" && (authorizationStatus === AuthorizationRequestStatus.unknown || authorizationStatus === AuthorizationRequestStatus.unnecessary)) {
|
|
115
122
|
content = /*#__PURE__*/_jsx(_Fragment, {
|
|
116
123
|
children: children
|
|
117
124
|
});
|
package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["AuthorizationRequestStatus","getRequestStatusForAuthorization","useHealthkitAuthorization","React","toError","HealthAuthorizationContext","AppleHealthAuthorizationContext","getNotRequestedIdentifiers","Fragment","_Fragment","jsx","_jsx","AppleHealthAuthorizationProvider","memo","readIdentifiers","writeIdentifiers","dataToSync","fallback","children","skipRequest","renderManualRequestUI","onAuthorizationStatusChange","authorizationStatus","requestAuthorization","toRead","toWrite","requestState","setRequestState","useState","notRequestedReadIdentifiers","setNotRequestedReadIdentifiers","notRequestedWriteIdentifiers","setNotRequestedWriteIdentifiers","requestError","setRequestError","requestKey","join","identifiersRef","useRef","current","previousRequestKey","status","useMemo","error","state","notRequestedMeasurementTypes","Object","entries","filter","data","typeIdentifiers","some","typeIdentifier","includes","map","key","useEffect","inspectAuthorization","useCallback","currentRead","currentWrite","notRequestedRead","notRequestedWrite","Promise","all","identifier","toShare","requestAccess","undefined","normalizedError","shouldRequest","currentState","then","catch","needsAuthorization","shouldRenderManualRequestUI","shouldRenderFallback","exposedStatus","authorizationValue","platform","missingTypes","request","content","unknown","unnecessary","Provider","value"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/apple/apple-health-authorization-provider.tsx"],"mappings":";;AAAA,SACEA,0BAA0B,EAC1BC,gCAAgC,EAChCC,yBAAyB,QACpB,oCAAoC;AAC3C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,OAAO,QAAQ,oCAAiC;AACzD,SAASC,0BAA0B,QAAQ,gDAA6C;AAIxF,SAASC,+BAA+B,QAAQ,yCAAsC;AACtF,SAASC,0BAA0B,QAAQ,uCAAoC;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAEhF,OAAO,MAAMC,gCAAgC,gBAAGT,KAAK,CAACU,IAAI,CACxD,CAAC;EACCC,eAAe;EACfC,gBAAgB;EAChBC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,WAAW;EACXC,qBAAqB;EACrBC;AAC8D,CAAC,KAAK;EACpE,MAAM,CAACC,mBAAmB,EAAEC,oBAAoB,CAAC,GAC/CrB,yBAAyB,CAAC;IACxBsB,MAAM,EAAEV,eAAe;IACvBW,OAAO,EAAEV;EACX,CAAC,CAAC;EAEJ,MAAM,CAAC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AG,IAAI;EAEnC,IACE/D,WAAW,IACXO,YAAY,KAAK,OAAO,IACvBA,YAAY,KAAK,SAAS,KACxBJ,mBAAmB,KAAKtB,0BAA0B,CAACmF,OAAO,IACzD7D,mBAAmB,KAAKtB,0BAA0B,CAACoF,WAAW,CAAE,EACpE;IACAF,OAAO,gBAAGvE,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGA;IAAQ,CAAG,CAAC;EAC3B,CAAC,MAAM,IAAIyD,2BAA2B,EAAE;IACtCO,OAAO,GAAG9D,qBAAqB,GAAG+C,aAAa,CAAC;EAClD,CAAC,MAAM,IAAIS,oBAAoB,EAAE;IAC/BM,OAAO,gBAAGvE,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGD,QAAQ,IAAI;IAAI,CAAG,CAAC;EACnC;EAEA,oBACEN,IAAA,CAACN,0BAA0B,CAACgF,QAAQ;IAACC,KAAK,EAAER,kBAAmB;IAAA5D,QAAA,eAC7DP,IAAA,CAACL,+BAA+B,CAAC+E,QAAQ;MAACC,KAAK,EAAET,aAAc;MAAA3D,QAAA,EAC5DgE;IAAO,CACgC;EAAC,CACR,CAAC;AAE1C,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { AuthorizationRequestStatus } from "@kingstinct/react-native-healthkit";
|
|
4
4
|
const getNotRequestedIdentifiers = async (identifiers, getStatus) => {
|
|
5
5
|
const statuses = await Promise.all(identifiers.map(async identifier => ({
|
|
6
6
|
identifier,
|
|
@@ -8,7 +8,7 @@ const getNotRequestedIdentifiers = async (identifiers, getStatus) => {
|
|
|
8
8
|
})));
|
|
9
9
|
return statuses.filter(({
|
|
10
10
|
status
|
|
11
|
-
}) => status ===
|
|
11
|
+
}) => status === AuthorizationRequestStatus.shouldRequest).map(({
|
|
12
12
|
identifier
|
|
13
13
|
}) => identifier);
|
|
14
14
|
};
|
package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["AuthorizationRequestStatus","getNotRequestedIdentifiers","identifiers","getStatus","statuses","Promise","all","map","identifier","status","filter","shouldRequest"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/apple/apple-health-authorization-utils.ts"],"mappings":";;AAAA,SAASA,0BAA0B,QAAQ,oCAAoC;AAE/E,MAAMC,0BAA0B,GAAG,MAAAA,CACjCC,WAAgB,EAChBC,SAAiE,KAChD;EACjB,MAAMC,QAAQ,GAAG,MAAMC,OAAO,CAACC,GAAG,CAChCJ,WAAW,CAACK,GAAG,CAAC,MAAOC,UAAU,KAAM;IACrCA,UAAU;IACVC,MAAM,EAAE,MAAMN,SAAS,CAACK,UAAU;EACpC,CAAC,CAAC,CACJ,CAAC;EAED,OAAOJ,QAAQ,CACZM,MAAM,CAAC,CAAC;IAAED;EAAO,CAAC,KAAKA,MAAM,KAAKT,0BAA0B,CAACW,aAAa,CAAC,CAC3EJ,GAAG,CAAC,CAAC;IAAEC;EAAW,CAAC,KAAKA,UAAU,CAAC;AACxC,CAAC;AAED,SAASP,0BAA0B","ignoreList":[]}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
const DEFAULT_HEALTH_SYNC_CHUNK_SIZE = 250;
|
|
9
9
|
|
|
10
|
+
/** Each ECG recording holds about 15,000 voltages, so a page of them stays small whatever the chunk size. */
|
|
11
|
+
const ECG_PAGE_SIZE = 10;
|
|
12
|
+
|
|
10
13
|
/** How far back the first import of a type reaches when no watermark exists yet. */
|
|
11
14
|
const DEFAULT_SYNC_LOOKBACK_DAYS = 30;
|
|
12
15
|
|
|
@@ -22,5 +25,5 @@ const SERIES_SLOT_MS = 60_000;
|
|
|
22
25
|
|
|
23
26
|
/** How many already-imported hours a `series` type reads again, for a watch that syncs a little late. */
|
|
24
27
|
const SERIES_REREAD_HOURS = 3;
|
|
25
|
-
export { DAILY_REREAD_DAYS, SERIES_REREAD_HOURS, SERIES_SLOT_MS, DEFAULT_HEALTH_SYNC_CHUNK_SIZE, DEFAULT_SYNC_LOOKBACK_DAYS };
|
|
28
|
+
export { DAILY_REREAD_DAYS, ECG_PAGE_SIZE, SERIES_REREAD_HOURS, SERIES_SLOT_MS, DEFAULT_HEALTH_SYNC_CHUNK_SIZE, DEFAULT_SYNC_LOOKBACK_DAYS };
|
|
26
29
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_HEALTH_SYNC_CHUNK_SIZE","DEFAULT_SYNC_LOOKBACK_DAYS","DAILY_REREAD_DAYS","SERIES_SLOT_MS","SERIES_REREAD_HOURS"],"sourceRoot":"../../../../src","sources":["modules/data-sync/constants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,MAAMA,8BAA8B,GAAG,GAAG;;AAE1C;AACA,MAAMC,0BAA0B,GAAG,EAAE;;AAErC;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,CAAC;;AAE3B;AACA,MAAMC,cAAc,GAAG,MAAM;;AAE7B;AACA,MAAMC,mBAAmB,GAAG,CAAC;AAE7B,SACEF,iBAAiB,
|
|
1
|
+
{"version":3,"names":["DEFAULT_HEALTH_SYNC_CHUNK_SIZE","ECG_PAGE_SIZE","DEFAULT_SYNC_LOOKBACK_DAYS","DAILY_REREAD_DAYS","SERIES_SLOT_MS","SERIES_REREAD_HOURS"],"sourceRoot":"../../../../src","sources":["modules/data-sync/constants.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,MAAMA,8BAA8B,GAAG,GAAG;;AAE1C;AACA,MAAMC,aAAa,GAAG,EAAE;;AAExB;AACA,MAAMC,0BAA0B,GAAG,EAAE;;AAErC;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,CAAC;;AAE3B;AACA,MAAMC,cAAc,GAAG,MAAM;;AAE7B;AACA,MAAMC,mBAAmB,GAAG,CAAC;AAE7B,SACEF,iBAAiB,EACjBF,aAAa,EACbI,mBAAmB,EACnBD,cAAc,EACdJ,8BAA8B,EAC9BE,0BAA0B","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import Healthkit, {
|
|
3
|
+
import Healthkit, { UpdateFrequency } from "@kingstinct/react-native-healthkit";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
export const useListenChanges = (dataToSync, onChange, backgroundDelivery, onError) => {
|
|
6
6
|
const timeoutRef = React.useRef(undefined);
|
|
7
7
|
const onChangeRef = React.useRef(onChange);
|
|
8
8
|
const onErrorRef = React.useRef(onError);
|
|
9
9
|
const identifiers = React.useMemo(() => {
|
|
10
|
-
return Object.values(dataToSync).flatMap(data => data?.typeIdentifiers.map(identifier => identifier.typeIdentifier));
|
|
10
|
+
return Object.values(dataToSync).flatMap(data => data?.typeIdentifiers.map(identifier => identifier.typeIdentifier) ?? []);
|
|
11
11
|
}, [dataToSync]);
|
|
12
12
|
const backgroundDeliveryEnabled = backgroundDelivery !== undefined;
|
|
13
|
-
const backgroundDeliveryFrequency = backgroundDelivery?.frequency ??
|
|
13
|
+
const backgroundDeliveryFrequency = backgroundDelivery?.frequency ?? UpdateFrequency.hourly;
|
|
14
14
|
const debouncedOnChange = React.useCallback(identifier => {
|
|
15
15
|
if (timeoutRef.current) {
|
|
16
16
|
clearTimeout(timeoutRef.current);
|
|
@@ -37,25 +37,22 @@ export const useListenChanges = (dataToSync, onChange, backgroundDelivery, onErr
|
|
|
37
37
|
const subscriptions = [];
|
|
38
38
|
const initSubscriptions = async () => {
|
|
39
39
|
try {
|
|
40
|
-
|
|
40
|
+
await Promise.all(identifiers.map(async identifier => {
|
|
41
41
|
if (backgroundDeliveryEnabled) {
|
|
42
42
|
await Healthkit.enableBackgroundDelivery(identifier, backgroundDeliveryFrequency);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
subscriptions.push(Healthkit.subscribeToChanges(identifier, () => {
|
|
45
45
|
debouncedOnChange(identifier);
|
|
46
|
-
});
|
|
47
|
-
subscriptions.push(subscription);
|
|
48
|
-
return subscription;
|
|
46
|
+
}));
|
|
49
47
|
}));
|
|
50
48
|
} catch (error) {
|
|
51
49
|
onErrorRef.current?.(error);
|
|
52
|
-
return undefined;
|
|
53
50
|
}
|
|
54
51
|
};
|
|
55
52
|
initSubscriptions();
|
|
56
53
|
return () => {
|
|
57
54
|
subscriptions.forEach(subscription => {
|
|
58
|
-
subscription
|
|
55
|
+
subscription.remove();
|
|
59
56
|
});
|
|
60
57
|
if (backgroundDeliveryEnabled) {
|
|
61
58
|
void Promise.all(identifiers.map(identifier => Healthkit.disableBackgroundDelivery(identifier))).catch(error => onErrorRef.current?.(error));
|