@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
|
@@ -16,7 +16,7 @@ const STATUSES = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/** Runs a device class from `@ovok/native/bt-management` until its protocol moves to a `DeviceProtocol`. */
|
|
19
|
-
const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
|
|
19
|
+
const legacyDriver = (creator, deviceName, recordCursorStorage) => (peripheral, signal) => {
|
|
20
20
|
const stop = () => events.end();
|
|
21
21
|
const events = new _channel.Channel(() => {
|
|
22
22
|
signal.removeEventListener("abort", stop);
|
|
@@ -25,17 +25,19 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
|
|
|
25
25
|
const managed = creator.createDevice({
|
|
26
26
|
device: (0, _blePeripheral.bleDeviceOf)(peripheral),
|
|
27
27
|
deviceName,
|
|
28
|
+
recordCursorStorage,
|
|
28
29
|
onResult: ({
|
|
29
30
|
id,
|
|
30
31
|
data
|
|
31
|
-
}) => {
|
|
32
|
+
}) => new Promise(delivered => {
|
|
32
33
|
const reading = data;
|
|
33
34
|
events.push({
|
|
34
35
|
kind: "reading",
|
|
35
36
|
id: (0, _driver.isTimestamped)(reading) ? id : null,
|
|
36
|
-
reading
|
|
37
|
+
reading,
|
|
38
|
+
delivered
|
|
37
39
|
});
|
|
38
|
-
},
|
|
40
|
+
}),
|
|
39
41
|
onDeviceStatusChanged: ({
|
|
40
42
|
status
|
|
41
43
|
}) => {
|
|
@@ -55,8 +57,40 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
|
|
|
55
57
|
}) => events.push({
|
|
56
58
|
kind: "error",
|
|
57
59
|
error: (0, _bleErrors.fromBleError)(error)
|
|
58
|
-
})
|
|
60
|
+
}),
|
|
61
|
+
onWaveform: ({
|
|
62
|
+
samples,
|
|
63
|
+
sampleRateHz,
|
|
64
|
+
millivoltsPerCount,
|
|
65
|
+
at
|
|
66
|
+
}) => events.push({
|
|
67
|
+
kind: "waveform",
|
|
68
|
+
waveform: {
|
|
69
|
+
samples,
|
|
70
|
+
sampleRateHz,
|
|
71
|
+
millivoltsPerCount,
|
|
72
|
+
at
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
onConnectionEvent: ({
|
|
76
|
+
kind,
|
|
77
|
+
recording
|
|
78
|
+
}) => {
|
|
79
|
+
if (kind === "recording") {
|
|
80
|
+
events.push({
|
|
81
|
+
kind: "recording",
|
|
82
|
+
recording: recording ?? null,
|
|
83
|
+
stop: () => managed.stopRecording()
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
59
87
|
});
|
|
88
|
+
if (managed.readsHistoryOnRequest) {
|
|
89
|
+
events.push({
|
|
90
|
+
kind: "history",
|
|
91
|
+
sync: () => managed.syncHistory()
|
|
92
|
+
});
|
|
93
|
+
}
|
|
60
94
|
signal.addEventListener("abort", stop, {
|
|
61
95
|
once: true
|
|
62
96
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_deviceStatus","require","_channel","_driver","_bleErrors","_blePeripheral","STATUSES","DeviceStatus","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","Channel","removeEventListener","managed","disconnect","createDevice","device","bleDeviceOf","onResult","id","data","reading","push","kind","isTimestamped","onDeviceStatusChanged","status","mapped","onError","error","fromBleError","addEventListener","once","connect","catch","fail","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_deviceStatus","require","_channel","_driver","_bleErrors","_blePeripheral","STATUSES","DeviceStatus","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","recordCursorStorage","peripheral","signal","stop","events","end","Channel","removeEventListener","managed","disconnect","createDevice","device","bleDeviceOf","onResult","id","data","Promise","delivered","reading","push","kind","isTimestamped","onDeviceStatusChanged","status","mapped","onError","error","fromBleError","onWaveform","samples","sampleRateHz","millivoltsPerCount","at","waveform","onConnectionEvent","recording","stopRecording","readsHistoryOnRequest","sync","syncHistory","addEventListener","once","connect","catch","fail","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;;;;;AAMA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAC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CAACC,KAAK,CAAEjB,KAAc,IAAKtB,MAAM,CAACwC,IAAI,CAAC,IAAAjB,uBAAY,EAACD,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOtB,MAAM;AACf,CAAC;AAACyC,OAAA,CAAAhD,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -11,11 +11,14 @@ const endedBeforeConnecting = () => new _errors.BluetoothError("connection-faile
|
|
|
11
11
|
/** One driver run per connected device, its events folded into the snapshot. */
|
|
12
12
|
class Connections {
|
|
13
13
|
sessions = new Map();
|
|
14
|
-
|
|
14
|
+
recordingStops = new Map();
|
|
15
|
+
historySyncs = new Map();
|
|
16
|
+
constructor(store, readings, policy, onEnded, onWaveform) {
|
|
15
17
|
this.store = store;
|
|
16
18
|
this.readings = readings;
|
|
17
19
|
this.policy = policy;
|
|
18
20
|
this.onEnded = onEnded;
|
|
21
|
+
this.onWaveform = onWaveform;
|
|
19
22
|
}
|
|
20
23
|
isActive(id) {
|
|
21
24
|
return this.sessions.has(id);
|
|
@@ -36,6 +39,26 @@ class Connections {
|
|
|
36
39
|
await session?.ended;
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Stops the recording a connected device holds open.
|
|
44
|
+
*
|
|
45
|
+
* @throws BluetoothError `no-open-recording` when the device holds none.
|
|
46
|
+
*/
|
|
47
|
+
async stopRecording(id) {
|
|
48
|
+
const stop = this.recordingStops.get(id);
|
|
49
|
+
if (!stop || !this.store.device(id)?.recording) {
|
|
50
|
+
throw new _errors.BluetoothError("no-open-recording", "The device holds no open recording to stop");
|
|
51
|
+
}
|
|
52
|
+
await stop().catch(error => {
|
|
53
|
+
throw (0, _errors.asBluetoothError)(error, "no-open-recording");
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Reads the records a connected device stored, when it keeps them until asked. */
|
|
58
|
+
async syncHistory(id) {
|
|
59
|
+
await this.historySyncs.get(id)?.();
|
|
60
|
+
}
|
|
61
|
+
|
|
39
62
|
/** Disconnects every device; resolves once every connection has ended. */
|
|
40
63
|
async disconnectAll() {
|
|
41
64
|
await Promise.all([...this.sessions.keys()].map(id => this.disconnect(id)));
|
|
@@ -71,6 +94,11 @@ class Connections {
|
|
|
71
94
|
failConnecting(failure);
|
|
72
95
|
}).finally(() => {
|
|
73
96
|
this.sessions.delete(id);
|
|
97
|
+
this.recordingStops.delete(id);
|
|
98
|
+
this.historySyncs.delete(id);
|
|
99
|
+
this.store.updateDevice(id, {
|
|
100
|
+
recording: undefined
|
|
101
|
+
});
|
|
74
102
|
this.onEnded(id);
|
|
75
103
|
});
|
|
76
104
|
const session = {
|
|
@@ -98,10 +126,25 @@ class Connections {
|
|
|
98
126
|
this.store.updateDevice(id, {
|
|
99
127
|
information: event.information
|
|
100
128
|
});
|
|
129
|
+
} else if (event.kind === "waveform") {
|
|
130
|
+
this.onWaveform({
|
|
131
|
+
deviceId: id,
|
|
132
|
+
...event.waveform
|
|
133
|
+
});
|
|
134
|
+
} else if (event.kind === "recording") {
|
|
135
|
+
this.recordingStops.set(id, event.stop);
|
|
136
|
+
this.store.updateDevice(id, {
|
|
137
|
+
recording: event.recording ?? undefined
|
|
138
|
+
});
|
|
139
|
+
} else if (event.kind === "history") {
|
|
140
|
+
this.historySyncs.set(id, event.sync);
|
|
141
|
+
this.store.updateDevice(id, {
|
|
142
|
+
readsHistoryOnRequest: true
|
|
143
|
+
});
|
|
101
144
|
} else if (event.kind === "reading") {
|
|
102
145
|
const device = this.store.device(id);
|
|
103
146
|
if (device) {
|
|
104
|
-
this.readings.receive(device, event.id, event.reading);
|
|
147
|
+
this.readings.receive(device, event.id, event.reading, event.delivered);
|
|
105
148
|
}
|
|
106
149
|
} else {
|
|
107
150
|
this.store.updateDevice(id, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_errors","require","_resultPolicy","endedBeforeConnecting","BluetoothError","Connections","sessions","Map","constructor","store","readings","policy","onEnded","isActive","id","has","connect","peripheral","driver","current","get","controller","signal","aborted","ended","start","connected","disconnect","session","abort","disconnectAll","Promise","all","keys","map","AbortController","markConnected","undefined","failConnecting","resolve","reject","updateDevice","connection","
|
|
1
|
+
{"version":3,"names":["_errors","require","_resultPolicy","endedBeforeConnecting","BluetoothError","Connections","sessions","Map","recordingStops","historySyncs","constructor","store","readings","policy","onEnded","onWaveform","isActive","id","has","connect","peripheral","driver","current","get","controller","signal","aborted","ended","start","connected","disconnect","session","abort","stopRecording","stop","device","recording","catch","error","asBluetoothError","syncHistory","disconnectAll","Promise","all","keys","map","AbortController","markConnected","undefined","failConnecting","resolve","reject","updateDevice","connection","run","then","failure","finally","delete","set","event","keepReadings","apply","kind","status","information","deviceId","waveform","sync","readsHistoryOnRequest","receive","reading","delivered","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/connections.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAOA,MAAME,qBAAqB,GAAGA,CAAA,KAC5B,IAAIC,sBAAc,CAAC,mBAAmB,EAAE,6CAA6C,CAAC;;AAExF;AACA,MAAMC,WAAW,CAAC;EACCC,QAAQ,GAAG,IAAIC,GAAG,CAAkB,CAAC;EACrCC,cAAc,GAAG,IAAID,GAAG,CAA8B,CAAC;EACvDE,YAAY,GAAG,IAAIF,GAAG,CAA8B,CAAC;EAE/DG,WAAWA,CACCC,KAAoB,EACpBC,QAAoB,EACpBC,MAAoB,EACpBC,OAA6B,EAC7BC,UAA8C,EAC/D;IAAA,KALiBJ,KAAoB,GAApBA,KAAoB;IAAA,KACpBC,QAAoB,GAApBA,QAAoB;IAAA,KACpBC,MAAoB,GAApBA,MAAoB;IAAA,KACpBC,OAA6B,GAA7BA,OAA6B;IAAA,KAC7BC,UAA8C,GAA9CA,UAA8C;EAC9D;EAEIC,QAAQA,CAACC,EAAU,EAAW;IACnC,OAAO,IAAI,CAACX,QAAQ,CAACY,GAAG,CAACD,EAAE,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,EAAE,EAAE2C,KAAK,CAACW,OAAO,EAAEX,KAAK,CAACY,SAAS,CAAC;MACzE;IACF,CAAC,MAAM;MACL,IAAI,CAAC7D,KAAK,CAACyC,YAAY,CAACnC,EAAE,EAAE;QAAEqB,KAAK,EAAEsB,KAAK,CAACtB;MAAM,CAAC,CAAC;IACrD;EACF;AACF;AAACmC,OAAA,CAAApE,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stableHash","require","isTimestamped","reading","temporal","recordedAt","start","end","some","value","Date","exports","readingId","key","peripheral","stableHash","id","gattDriver","protocol","signal","link","openLink","kind","status","deviceInformation","information","close"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/driver.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_stableHash","require","isTimestamped","reading","temporal","recordedAt","start","end","some","value","Date","exports","readingId","key","peripheral","stableHash","id","gattDriver","protocol","signal","link","openLink","kind","status","deviceInformation","information","close"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/driver.ts"],"mappings":";;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA;AAGA;;AAoEA;;AAGA;;AAGA;AACA,MAAMC,aAAa,GAAIC,OAAoB,IAAc;EACvD,MAAMC,QAAQ,GAAGD,OAAmE;EAEpF,OAAO,CAACC,QAAQ,CAACC,UAAU,EAAED,QAAQ,CAACE,KAAK,EAAEF,QAAQ,CAACG,GAAG,CAAC,CAACC,IAAI,CAAEC,KAAK,IAAKA,KAAK,YAAYC,IAAI,CAAC;AACnG,CAAC;;AAED;AAAAC,OAAA,CAAAT,aAAA,GAAAA,aAAA;AACA,MAAMU,SAAS,GAAGA,CAACC,GAAW,EAAEC,UAAsB,EAAEX,OAAoB,KAC1ED,aAAa,CAACC,OAAO,CAAC,GAAG,QAAQ,IAAAY,sBAAU,EAAC;EAAEF,GAAG;EAAEC,UAAU,EAAEA,UAAU,CAACE,EAAE;EAAEb;AAAQ,CAAC,CAAC,EAAE,GAAG,IAAI;;AAEnG;AACA,MAAMc,UAAU,GAAGA,CAACJ,GAAW,EAAEK,QAAwB,KACvD,iBAAiBJ,UAAU,EAAEK,MAAM,EAAE;EACnC,MAAMC,IAAI,GAAG,MAAMN,UAAU,CAACO,QAAQ,CAACF,MAAM,CAAC;EAE9C,IAAI;IACF,MAAM;MAAEG,IAAI,EAAE,QAAQ;MAAEC,MAAM,EAAE;IAAY,CAAC;IAC7C,IAAIH,IAAI,CAACI,iBAAiB,EAAE;MAC1B,MAAM;QAAEF,IAAI,EAAE,aAAa;QAAEG,WAAW,EAAEL,IAAI,CAACI;MAAkB,CAAC;IACpE;IACA,WAAW,MAAMrB,OAAO,IAAIe,QAAQ,CAACE,IAAI,CAAC,EAAE;MAC1C,MAAM;QAAEE,IAAI,EAAE,SAAS;QAAEN,EAAE,EAAEJ,SAAS,CAACC,GAAG,EAAEC,UAAU,EAAEX,OAAO,CAAC;QAAEA;MAAQ,CAAC;IAC7E;IACA,MAAM;MAAEmB,IAAI,EAAE,QAAQ;MAAEC,MAAM,EAAE;IAAe,CAAC;EAClD,CAAC,SAAS;IACR,MAAMH,IAAI,CAACM,KAAK,CAAC,CAAC;EACpB;AACF,CAAC;AAACf,OAAA,CAAAM,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BluetoothError","Error","name","constructor","code","message","cause","exports","asBluetoothError","error","String"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/errors.ts"],"mappings":";;;;;;AAAA;;
|
|
1
|
+
{"version":3,"names":["BluetoothError","Error","name","constructor","code","message","cause","exports","asBluetoothError","error","String"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/errors.ts"],"mappings":";;;;;;AAAA;;AAkBA;AACA,MAAMA,cAAc,SAASC,KAAK,CAAC;EACjC;EACgBC,IAAI,GAAG,gBAAgB;EAEhCC,WAAWA,CAEhB;EACgBC,IAAwB,EACxCC,OAAe,EACfC,KAAe,EACf;IACA,KAAK,CAACD,OAAO,EAAE;MAAEC;IAAM,CAAC,CAAC;IAAC,KAJVF,IAAwB,GAAxBA,IAAwB;EAK1C;AACF;;AAEA;AAAAG,OAAA,CAAAP,cAAA,GAAAA,cAAA;AACA,MAAMQ,gBAAgB,GAAGA,CAACC,KAAc,EAAEL,IAAwB,KAChEK,KAAK,YAAYT,cAAc,GAC3BS,KAAK,GACL,IAAIT,cAAc,CAACI,IAAI,EAAEK,KAAK,YAAYR,KAAK,GAAGQ,KAAK,CAACJ,OAAO,GAAGK,MAAM,CAACD,KAAK,CAAC,EAAEA,KAAK,CAAC;AAACF,OAAA,CAAAC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_runtime","require","_errors","_devices","_resultPolicy","_sigProfiles","_bleScanner","_builtInDevices","_integratedDevices","_osPermissions","_ovokSink","_createBluetoothRuntime","_context","_hooks","_bluetoothDevicePicker"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AASA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;
|
|
1
|
+
{"version":3,"names":["_runtime","require","_errors","_devices","_resultPolicy","_sigProfiles","_bleScanner","_builtInDevices","_integratedDevices","_osPermissions","_ovokSink","_createBluetoothRuntime","_context","_hooks","_bluetoothDevicePicker"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AASA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAEA,IAAAO,kBAAA,GAAAP,OAAA;AAEA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,uBAAA,GAAAV,OAAA;AAGA,IAAAW,QAAA,GAAAX,OAAA;AAEA,IAAAY,MAAA,GAAAZ,OAAA;AASA,IAAAa,sBAAA,GAAAb,OAAA","ignoreList":[]}
|
|
@@ -14,14 +14,15 @@ const saveFailed = error => new _errors.BluetoothError("save-failed", error inst
|
|
|
14
14
|
/** Keeps the recent readings, each resend once, and saves every new one through the sink. */
|
|
15
15
|
class ReadingLog {
|
|
16
16
|
recent = new Set();
|
|
17
|
+
awaitingDelivery = new Map();
|
|
17
18
|
sequence = 0;
|
|
18
19
|
constructor(store, sink) {
|
|
19
20
|
this.store = store;
|
|
20
21
|
this.sink = sink;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
/** `id` is `null` for a reading that cannot be recognised when resent. */
|
|
24
|
-
receive(device, id, measurement) {
|
|
24
|
+
/** `id` is `null` for a reading that cannot be recognised when resent; `delivered` is called once it is saved or queued. */
|
|
25
|
+
receive(device, id, measurement, delivered) {
|
|
25
26
|
if (id !== null && !this.remember(id)) {
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
@@ -43,6 +44,9 @@ class ReadingLog {
|
|
|
43
44
|
this.store.set({
|
|
44
45
|
readings: [...this.store.get().readings, reading].slice(-KEPT_READINGS)
|
|
45
46
|
});
|
|
47
|
+
if (delivered) {
|
|
48
|
+
this.awaitingDelivery.set(reading.id, delivered);
|
|
49
|
+
}
|
|
46
50
|
void this.save(reading);
|
|
47
51
|
}
|
|
48
52
|
|
|
@@ -83,6 +87,10 @@ class ReadingLog {
|
|
|
83
87
|
status: "failed",
|
|
84
88
|
error: saveFailed(error)
|
|
85
89
|
}));
|
|
90
|
+
if (save.status !== "failed") {
|
|
91
|
+
this.awaitingDelivery.get(reading.id)?.();
|
|
92
|
+
this.awaitingDelivery.delete(reading.id);
|
|
93
|
+
}
|
|
86
94
|
this.store.updateReadings(current => current.id === reading.id ? {
|
|
87
95
|
...current,
|
|
88
96
|
save
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_errors","require","KEPT_READINGS","RECOGNISED_READINGS","saveFailed","error","BluetoothError","Error","message","String","ReadingLog","recent","Set","sequence","constructor","store","sink","receive","device","id","measurement","remember","receivedAt","Date","reading","getTime","key","name","information","save","status","set","readings","get","slice","retrySaves","failed","filter","updateReadings","includes","Promise","all","map","flushed","flushQueued","has","queueId","add","size","delete","values","next","value","then","result","current","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/readings.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAKA,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,UAAU,GAAIC,KAAc,IAChC,IAAIC,sBAAc,CAAC,aAAa,EAAED,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAGC,MAAM,CAACJ,KAAK,CAAC,EAAEA,KAAK,CAAC;;AAElG;AACA,MAAMK,UAAU,CAAC;EACEC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["_errors","require","KEPT_READINGS","RECOGNISED_READINGS","saveFailed","error","BluetoothError","Error","message","String","ReadingLog","recent","Set","awaitingDelivery","Map","sequence","constructor","store","sink","receive","device","id","measurement","delivered","remember","receivedAt","Date","reading","getTime","key","name","information","save","status","set","readings","get","slice","retrySaves","failed","filter","updateReadings","includes","Promise","all","map","flushed","flushQueued","has","queueId","add","size","delete","values","next","value","then","result","current","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/readings.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAKA,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,UAAU,GAAIC,KAAc,IAChC,IAAIC,sBAAc,CAAC,aAAa,EAAED,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAGC,MAAM,CAACJ,KAAK,CAAC,EAAEA,KAAK,CAAC;;AAElG;AACA,MAAMK,UAAU,CAAC;EACEC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC1BC,gBAAgB,GAAG,IAAIC,GAAG,CAAqB,CAAC;EACzDC,QAAQ,GAAG,CAAC;EAEbC,WAAWA,CAAkBC,KAAoB,EAAmBC,IAAiB,EAAE;IAAA,KAA1DD,KAAoB,GAApBA,KAAoB;IAAA,KAAmBC,IAAiB,GAAjBA,IAAiB;EAAG;;EAE/F;EACOC,OAAOA,CAACC,MAAoB,EAAEC,EAAiB,EAAEC,WAAwB,EAAEC,SAAsB,EAAQ;IAC9G,IAAIF,EAAE,KAAK,IAAI,IAAI,CAAC,IAAI,CAACG,QAAQ,CAACH,EAAE,CAAC,EAAE;MACrC;IACF;IAEA,MAAMI,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;IAE7B,MAAMC,OAAsB,GAAG;MAC7BN,EAAE,EAAEA,EAAE,IAAI,GAAGD,MAAM,CAACC,EAAE,IAA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AAI,CAACR,gBAAgB,CAACuC,MAAM,CAACzB,OAAO,CAACN,EAAE,CAAC;IAC1C;IAEA,IAAI,CAACJ,KAAK,CAACwB,cAAc,CAAEiB,OAAO,IAAMA,OAAO,CAACrC,EAAE,KAAKM,OAAO,CAACN,EAAE,GAAG;MAAE,GAAGqC,OAAO;MAAE1B;IAAK,CAAC,GAAG0B,OAAQ,CAAC;EACtG;AACF;AAACC,OAAA,CAAAjD,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -13,6 +13,8 @@ var _readings = require("./readings.js");
|
|
|
13
13
|
var _resultPolicy = require("./result-policy.js");
|
|
14
14
|
var _scanLoop = require("./scan-loop.js");
|
|
15
15
|
var _store = require("./store.js");
|
|
16
|
+
/* eslint-disable max-lines */
|
|
17
|
+
|
|
16
18
|
/** What a `BluetoothRuntime` is built from. */
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -25,12 +27,13 @@ class BluetoothRuntime {
|
|
|
25
27
|
held = new Set();
|
|
26
28
|
backoff = new _autoConnect.AutoConnectBackoff();
|
|
27
29
|
retryTimers = new Set();
|
|
30
|
+
waveformListeners = new Set();
|
|
28
31
|
scanRequest = 0;
|
|
29
32
|
disposed = false;
|
|
30
33
|
constructor(options) {
|
|
31
34
|
this.options = options;
|
|
32
35
|
this.readings = new _readings.ReadingLog(this.store, options.sink);
|
|
33
|
-
this.connections = new _connections.Connections(this.store, this.readings, options.resultPolicy ?? _resultPolicy.everyReading, id => this.connectionEnded(id));
|
|
36
|
+
this.connections = new _connections.Connections(this.store, this.readings, options.resultPolicy ?? _resultPolicy.everyReading, id => this.connectionEnded(id), waveform => this.waveformListeners.forEach(listener => listener(waveform)));
|
|
34
37
|
this.paired = new _paired.PairedDevices(paired => this.store.set({
|
|
35
38
|
paired
|
|
36
39
|
}), options.pairedStorage);
|
|
@@ -50,6 +53,12 @@ class BluetoothRuntime {
|
|
|
50
53
|
/** Calls `listener` after every state change; returns the unsubscribe. */
|
|
51
54
|
subscribe = listener => this.store.subscribe(listener);
|
|
52
55
|
|
|
56
|
+
/** Calls `listener` with the live ECG samples of recording devices, for display; returns the unsubscribe. */
|
|
57
|
+
subscribeWaveform = listener => {
|
|
58
|
+
this.waveformListeners.add(listener);
|
|
59
|
+
return () => this.waveformListeners.delete(listener);
|
|
60
|
+
};
|
|
61
|
+
|
|
53
62
|
/** Reads the permission without prompting. */
|
|
54
63
|
async checkPermission() {
|
|
55
64
|
return this.recordPermission(await this.options.permissions.check());
|
|
@@ -109,6 +118,33 @@ class BluetoothRuntime {
|
|
|
109
118
|
await this.connections.connect(peripheral, match.driver);
|
|
110
119
|
}
|
|
111
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Stops the recording a connected recorder holds open, for instance once the user confirms it while
|
|
123
|
+
* its `recording.leadOffSince` is set. The stored recording then arrives as a reading.
|
|
124
|
+
*
|
|
125
|
+
* @throws BluetoothError `no-open-recording` when the device holds none; `runtime-disposed` after `dispose`.
|
|
126
|
+
*/
|
|
127
|
+
async stopRecording(deviceId) {
|
|
128
|
+
this.assertLive();
|
|
129
|
+
await this.connections.stopRecording(deviceId);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Reads the records a device stored, connecting it first when it is not connected. One that
|
|
134
|
+
* `readsHistoryOnRequest` reads them over its connection, even while it measures; any other is
|
|
135
|
+
* reconnected, since it reads them each time it connects.
|
|
136
|
+
*
|
|
137
|
+
* @throws BluetoothError as `connect` does; `runtime-disposed` after `dispose`.
|
|
138
|
+
*/
|
|
139
|
+
async syncHistory(deviceId) {
|
|
140
|
+
this.assertLive();
|
|
141
|
+
if (this.connections.isActive(deviceId) && !this.store.device(deviceId)?.readsHistoryOnRequest) {
|
|
142
|
+
await this.disconnect(deviceId);
|
|
143
|
+
}
|
|
144
|
+
await this.connect(deviceId);
|
|
145
|
+
await this.connections.syncHistory(deviceId);
|
|
146
|
+
}
|
|
147
|
+
|
|
112
148
|
/** Disconnects a device; a paired one stays disconnected until `connect` or `pair` is called again. */
|
|
113
149
|
async disconnect(deviceId) {
|
|
114
150
|
this.held.add(deviceId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_autoConnect","require","_connections","_devices","_errors","_paired","_readings","_resultPolicy","_scanLoop","_store","BluetoothRuntime","store","SnapshotStore","known","Map","held","Set","backoff","AutoConnectBackoff","retryTimers","scanRequest","disposed","constructor","options","readings","ReadingLog","sink","connections","Connections","resultPolicy","everyReading","id","connectionEnded","paired","PairedDevices","set","pairedStorage","scan","ScanLoop","scanner","peripheral","found","unwatchAdapter","watchState","adapter","sync","checkPermission","catch","undefined","getSnapshot","get","subscribe","
|
|
1
|
+
{"version":3,"names":["_autoConnect","require","_connections","_devices","_errors","_paired","_readings","_resultPolicy","_scanLoop","_store","BluetoothRuntime","store","SnapshotStore","known","Map","held","Set","backoff","AutoConnectBackoff","retryTimers","waveformListeners","scanRequest","disposed","constructor","options","readings","ReadingLog","sink","connections","Connections","resultPolicy","everyReading","id","connectionEnded","waveform","forEach","listener","paired","PairedDevices","set","pairedStorage","scan","ScanLoop","scanner","peripheral","found","unwatchAdapter","watchState","adapter","sync","checkPermission","catch","undefined","getSnapshot","get","subscribe","subscribeWaveform","add","delete","recordPermission","permissions","check","requestPermission","request","openPermissionSettings","openSettings","startScan","assertLive","permission","BluetoothError","scanning","stopScan","connect","deviceId","match","driver","stopRecording","syncHistory","isActive","device","readsHistoryOnRequest","disconnect","pair","forget","remove","retrySaves","dispose","close","clearTimeout","disconnectAll","matchDevice","devices","advertisement","key","name","connection","error","connectIfPaired","waiting","has","allows","succeeded","restartScan","timer","setTimeout","failed","running","restart","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/runtime.ts"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ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AAI,CAACD,WAAW,CAAC,CAAC;IACpB,CAAC,EAAE,IAAI,CAACrF,OAAO,CAACwF,MAAM,CAACzE,EAAE,CAAC,CAAC;IAE3B,IAAI,CAACb,WAAW,CAACsC,GAAG,CAAC8C,KAAK,CAAC;EAC7B;EAEQD,WAAWA,CAAA,EAAS;IAC1B,IAAI,IAAI,CAAC7D,IAAI,CAACiE,OAAO,EAAE;MACrB,IAAI,CAACjE,IAAI,CAACkE,OAAO,CAAC,CAAC;IACrB;EACF;EAEQ1G,OAAOA,CAACwE,QAAgB,EAAe;IAC7C,MAAMM,MAAM,GAAG,IAAI,CAAClE,KAAK,CAACyC,GAAG,CAACmB,QAAQ,CAAC;IAEvC,IAAI,CAACM,MAAM,EAAE;MACX,MAAM,IAAIV,sBAAc,CAAC,kBAAkB,EAAE,aAAaI,QAAQ,wBAAwB,CAAC;IAC7F;IAEA,OAAOM,MAAM;EACf;EAEQZ,UAAUA,CAAA,EAAS;IACzB,IAAI,IAAI,CAAC7C,QAAQ,EAAE;MACjB,MAAM,IAAI+C,sBAAc,CAAC,kBAAkB,EAAE,oCAAoC,CAAC;IACpF;EACF;AACF;AAACuC,OAAA,CAAAlG,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_createWebBluetoothRuntime","require","_webBluetoothScanner","_webBluetoothPermissions","_webBluetoothServices","_runtime","_errors","_devices","_resultPolicy","_sigProfiles","_builtInDevices","_integratedDevices","_supportedDevices","_deviceQuery","_ovokSink","_context","_hooks"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,0BAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AASA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;
|
|
1
|
+
{"version":3,"names":["_createWebBluetoothRuntime","require","_webBluetoothScanner","_webBluetoothPermissions","_webBluetoothServices","_runtime","_errors","_devices","_resultPolicy","_sigProfiles","_builtInDevices","_integratedDevices","_supportedDevices","_deviceQuery","_ovokSink","_context","_hooks"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,0BAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AASA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AAEA,IAAAU,kBAAA,GAAAV,OAAA;AAEA,IAAAW,iBAAA,GAAAX,OAAA;AAEA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AAEA,IAAAe,MAAA,GAAAf,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY } from "../sign-in/utils/google-redirect-sign-in.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The page Google returns to when `GoogleLogin` signs in on the web.
|
|
7
|
+
*
|
|
8
|
+
* Serve it as a static file at the redirect URI, by default `/oauth/google.html`. It keeps Google's answer
|
|
9
|
+
* for this tab and sends the tab back to the sign-in screen, so the token never stays in the address.
|
|
10
|
+
*/
|
|
11
|
+
export const GOOGLE_RETURN_PAGE_HTML = `<!doctype html>
|
|
12
|
+
<meta charset="utf-8">
|
|
13
|
+
<title>Signing in</title>
|
|
14
|
+
<script>
|
|
15
|
+
var request = JSON.parse(sessionStorage.getItem("${GOOGLE_REQUEST_KEY}") || "{}");
|
|
16
|
+
var target = new URL(request.returnTo || "/", location.origin);
|
|
17
|
+
sessionStorage.setItem("${GOOGLE_ANSWER_KEY}", location.hash.slice(1));
|
|
18
|
+
location.replace(target.origin === location.origin ? target.href : "/");
|
|
19
|
+
</script>
|
|
20
|
+
`;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GOOGLE_ANSWER_KEY","GOOGLE_REQUEST_KEY","GOOGLE_RETURN_PAGE_HTML"],"sourceRoot":"../../../../../src","sources":["modules/auth/google-return-page/index.ts"],"mappings":";;AAAA,SACEA,iBAAiB,EACjBC,kBAAkB,QACb,6CAA0C;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAA+B,GAAG;AAC/C;AACA;AACA;AACA,qDAAqDD,kBAAkB;AACvE;AACA,4BAA4BD,iBAAiB;AAC7C;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useAuthAction } from "./use-auth-action.js";
|
|
4
|
+
const NOT_ON_THE_WEB = "useSocialSignIn is not available on the web; render SignIn.SocialLogins.GoogleLogin or AppleLogin instead";
|
|
5
|
+
|
|
6
|
+
/** Rejects: the web signs in through the `SignIn.SocialLogins` buttons, which leave and return to the page. */
|
|
7
|
+
export const useSocialSignIn = _options => useAuthAction(async () => {
|
|
8
|
+
throw new Error(NOT_ON_THE_WEB);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=use-social-sign-in.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAuthAction","NOT_ON_THE_WEB","useSocialSignIn","_options","Error"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-social-sign-in.web.ts"],"mappings":";;AAGA,SAASA,aAAa,QAAQ,sBAAmB;AAEjD,MAAMC,cAAc,GAClB,2GAA2G;;AAE7G;AACA,OAAO,MAAMC,eAAe,GAAIC,QAA6B,IAC3DH,aAAa,CAAC,YAA8B;EAC1C,MAAM,IAAII,KAAK,CAACH,cAAc,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import "./default-translation.js";
|
|
11
11
|
export * from "./sign-in/index.js";
|
|
12
|
+
export * from "./google-return-page/index.js";
|
|
12
13
|
export * from "./register/index.js";
|
|
13
14
|
export * from "./profile/index.js";
|
|
14
15
|
export * from "./delete-account-button/index.js";
|
|
@@ -18,7 +19,7 @@ export * from "./hooks/use-rate-limit-cooldown.js";
|
|
|
18
19
|
export * from "./hooks/use-auth-action.js";
|
|
19
20
|
export * from "./hooks/use-sign-in.js";
|
|
20
21
|
export * from "./hooks/use-accept-invite-link.js";
|
|
21
|
-
export * from "./hooks/use-social-sign-in
|
|
22
|
+
export * from "./hooks/use-social-sign-in";
|
|
22
23
|
export * from "./hooks/use-sign-out.js";
|
|
23
24
|
export * from "./hooks/use-delete-account.js";
|
|
24
25
|
export * from "./utils/rate-limit.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/auth/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,0BAAuB;AAE9B,cAAc,oBAAW;AACzB,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,kCAAyB;AACvC,cAAc,0BAAiB;AAC/B,cAAc,2BAAkB;AAChC,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/auth/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,0BAAuB;AAE9B,cAAc,oBAAW;AACzB,cAAc,+BAAsB;AACpC,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,kCAAyB;AACvC,cAAc,0BAAiB;AAC/B,cAAc,2BAAkB;AAChC,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc,4BAA4B;AAC1C,cAAc,yBAAsB;AACpC,cAAc,+BAA4B;AAC1C,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,oBAAW","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { signOutGoogleIfNeeded } from "../utils/sign-out-google
|
|
3
|
+
import { signOutGoogleIfNeeded } from "../utils/sign-out-google";
|
|
4
4
|
const logoutRequests = new WeakMap();
|
|
5
5
|
const logoutInProgress = new WeakSet();
|
|
6
6
|
const isLogoutInProgress = client => logoutInProgress.has(client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["signOutGoogleIfNeeded","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","request","auth","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,
|
|
1
|
+
{"version":3,"names":["signOutGoogleIfNeeded","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","request","auth","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,0BAA0B;AAEhE,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;AAC3D,MAAMC,gBAAgB,GAAG,IAAIC,OAAO,CAAS,CAAC;AAE9C,MAAMC,kBAAkB,GAAIC,MAAc,IACxCH,gBAAgB,CAACI,GAAG,CAACD,MAAM,CAAC;;AAE9B;AACA,MAAME,aAAa,GAAIF,MAAY,IAAoB;EACrD,MAAMG,GAAG,GAAGH,MAAgB;EAC5B,MAAMI,OAAO,GAAGT,cAAc,CAACU,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAP,gBAAgB,CAACS,GAAG,CAACH,GAAG,CAAC;EAEzB,MAAMI,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMP,MAAM,CAACQ,IAAI,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC,SAAS;MACR,MAAMf,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACgB,OAAO,CAAC,MAAM;IACjBf,cAAc,CAACgB,MAAM,CAACR,GAAG,CAAC;IAC1BN,gBAAgB,CAACc,MAAM,CAACR,GAAG,CAAC;EAC9B,CAAC,CAAC;EAEFR,cAAc,CAACiB,GAAG,CAACT,GAAG,EAAEI,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAED,SAASR,kBAAkB,EAAEG,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useOvok } from "@ovok/core/next/react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { parseSignInError } from "../../../utils/sign-in-error.js";
|
|
6
|
+
import { isAppleCancel, loadAppleScript, signInWithApple } from "../../utils/apple-web-sign-in.js";
|
|
7
|
+
import { SocialLoginButton } from "./social-login-button.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const AppleServicesLoginButton = ({
|
|
10
|
+
appleServicesId,
|
|
11
|
+
appleRedirectUri,
|
|
12
|
+
internalId,
|
|
13
|
+
onSuccess,
|
|
14
|
+
onError,
|
|
15
|
+
testID,
|
|
16
|
+
style,
|
|
17
|
+
disabled,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}) => {
|
|
21
|
+
const client = useOvok();
|
|
22
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
23
|
+
const handleAppleLogin = React.useCallback(async () => {
|
|
24
|
+
try {
|
|
25
|
+
setIsLoading(true);
|
|
26
|
+
const credentials = await signInWithApple({
|
|
27
|
+
servicesId: appleServicesId,
|
|
28
|
+
redirectUri: appleRedirectUri
|
|
29
|
+
});
|
|
30
|
+
const loginResponse = await client.auth.socialLogin("apple", {
|
|
31
|
+
...credentials,
|
|
32
|
+
internalId
|
|
33
|
+
});
|
|
34
|
+
onSuccess?.(loginResponse);
|
|
35
|
+
} catch (cause) {
|
|
36
|
+
if (!isAppleCancel(cause)) {
|
|
37
|
+
onError?.(parseSignInError(cause).error);
|
|
38
|
+
}
|
|
39
|
+
} finally {
|
|
40
|
+
setIsLoading(false);
|
|
41
|
+
}
|
|
42
|
+
}, [appleRedirectUri, appleServicesId, client, internalId, onError, onSuccess]);
|
|
43
|
+
|
|
44
|
+
// Browsers only open the popup right after a tap, so Apple's script is loaded before one.
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
loadAppleScript().catch(() => undefined);
|
|
47
|
+
}, []);
|
|
48
|
+
return /*#__PURE__*/_jsx(SocialLoginButton, {
|
|
49
|
+
...props,
|
|
50
|
+
backgroundColor: "#000",
|
|
51
|
+
style: style,
|
|
52
|
+
disabled: disabled || isLoading,
|
|
53
|
+
onPress: handleAppleLogin,
|
|
54
|
+
testID: testID,
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** Sign in with Apple in a popup, for the Services ID registered for this site; renders nothing without one. */
|
|
60
|
+
export const AppleLoginButton = ({
|
|
61
|
+
appleServicesId,
|
|
62
|
+
...props
|
|
63
|
+
}) => appleServicesId ? /*#__PURE__*/_jsx(AppleServicesLoginButton, {
|
|
64
|
+
...props,
|
|
65
|
+
appleServicesId: appleServicesId
|
|
66
|
+
}) : null;
|
|
67
|
+
//# sourceMappingURL=apple-login-button.web.js.map
|
package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useOvok","React","parseSignInError","isAppleCancel","loadAppleScript","signInWithApple","SocialLoginButton","jsx","_jsx","AppleServicesLoginButton","appleServicesId","appleRedirectUri","internalId","onSuccess","onError","testID","style","disabled","children","props","client","isLoading","setIsLoading","useState","handleAppleLogin","useCallback","credentials","servicesId","redirectUri","loginResponse","auth","socialLogin","cause","error","useEffect","catch","undefined","backgroundColor","onPress","AppleLoginButton"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login-button.web.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,uBAAuB;AAC/C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,gBAAgB,QAAQ,iCAA8B;AAE/D,SACEC,aAAa,EACbC,eAAe,EACf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EAC1C,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE5B,IAAA,CAACF,iBAAiB;IAAA,GACZa,KAAK;IACTkB,eAAe,EAAC,MAAM;IACtBrB,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA,QAAQ,IAAII,SAAU;IAChCiB,OAAO,EAAEd,gBAAiB;IAC1BT,MAAM,EAAEA,MAAO;IAAAG,QAAA,EAEdA;EAAQ,CACQ,CAAC;AAExB,CAAC;;AAED;AACA,OAAO,MAAMqB,gBAAgB,GAAGA,CAAC;EAC/B7B,eAAe;EACf,GAAGS;AACqC,CAAC,KACzCT,eAAe,gBACbF,IAAA,CAACC,wBAAwB;EAAA,GAAKU,KAAK;EAAET,eAAe,EAAEA;AAAgB,CAAE,CAAC,GACvE,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppleLoginButton","AppleLoginIcon","AppleLoginText","AppleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"names":["AppleLoginButton","AppleLoginIcon","AppleLoginText","AppleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,sBAAsB;AACvD,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,cAAc,QAAQ,uBAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACL,gBAAgB,EAAE;EACxD;EACAM,IAAI,EAAEL,cAAc;EAEpB;EACAM,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}
|