@ovok/native 1.6.0 → 1.6.2
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/README.md +8 -2
- package/android/src/main/AndroidManifest.xml +1 -20
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokBackgroundSyncModule.java +25 -3
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokHealthConnectWorker.java +6 -2
- package/app.plugin.js +86 -7
- package/lib/commonjs/index.js +5 -115
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/auth/default-translation.js +69 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +47 -17
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/index.js +1 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +30 -3
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +10 -8
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/login-link.js +4 -3
- package/lib/commonjs/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +6 -3
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +2 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +6 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +8 -6
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-out-google.js +16 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/commonjs/modules/background-sync/background-safe-storage.js +3 -6
- package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/status.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-device/index.js +0 -22
- package/lib/commonjs/modules/bt-device/index.js.map +1 -1
- package/lib/commonjs/modules/bt-device-instructions/index.js +39 -0
- package/lib/commonjs/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +64 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +2 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +43 -54
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +18 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +56 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +8 -4
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +5 -1
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +48 -12
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +40 -18
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +8 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +27 -9
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js +21 -0
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +22 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +4 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +75 -37
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +97 -2
- 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.files.js +74 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +52 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +4 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +43 -28
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +10 -1
- 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.file-transfer.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/push-notification.js +39 -0
- package/lib/commonjs/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +81 -1
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +8 -2
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js +17 -0
- package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +1 -1
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/title.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/title.js.map +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +12 -3
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +7 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +13 -0
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +19 -4
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +30 -21
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js +55 -0
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/retry-save.js +40 -6
- package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -1
- package/lib/commonjs/modules/diary/components/no-data.js +1 -2
- package/lib/commonjs/modules/diary/components/no-data.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-select.js +13 -13
- package/lib/commonjs/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/commonjs/modules/helpers/index.js +11 -4
- package/lib/commonjs/modules/helpers/index.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js +2 -3
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/telemetry.js +133 -46
- package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -1
- package/lib/commonjs/modules/image/components/optimized-image.js +29 -8
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js +0 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js +0 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/date-range.js +4 -3
- package/lib/commonjs/modules/measurement/components/date-range.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +3 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/setting/components/list-header.js +1 -2
- package/lib/commonjs/modules/setting/components/list-header.js.map +1 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js +0 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/commonjs/modules/tab/components/tab-item.js +0 -1
- package/lib/commonjs/modules/tab/components/tab-item.js.map +1 -1
- package/lib/commonjs/modules/theme/utils/generate-theme.js +35 -4
- package/lib/commonjs/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/commonjs/modules/tile/components/measured-value.js +0 -3
- package/lib/commonjs/modules/tile/components/measured-value.js.map +1 -1
- package/lib/commonjs/modules/tile/components/title.js +0 -1
- package/lib/commonjs/modules/tile/components/title.js.map +1 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/commonjs/modules/ui/components/background-sync-setting.js +20 -4
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +33 -6
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +10 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -1
- package/lib/commonjs/modules/ui/components/health-import-card.js +25 -2
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/commonjs/modules/ui/components/manual-entry-form.js +14 -1
- package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -1
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js +95 -0
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +103 -34
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +11 -4
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/commonjs/modules/ui/components/urine-test-result.js +7 -2
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/modules/ui/use-ovok-ui.js +5 -2
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/module/index.js +3 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/auth/default-translation.js +68 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +47 -17
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/index.js +1 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +30 -3
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/module/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/inputs.js +10 -8
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/description.js +0 -1
- package/lib/module/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/title.js +5 -2
- package/lib/module/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/register/components/login-link.js +4 -3
- package/lib/module/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/module/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/module/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +6 -3
- package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +2 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +6 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/module/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +8 -6
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/module/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/inputs.js +4 -3
- package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/module/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/module/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/module/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-out-google.js +12 -0
- package/lib/module/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/module/modules/background-sync/background-safe-storage.js +3 -6
- package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/status.js +1 -2
- package/lib/module/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/module/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/title.js +1 -2
- package/lib/module/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-device/index.js +0 -2
- package/lib/module/modules/bt-device/index.js.map +1 -1
- package/lib/module/modules/bt-device-instructions/index.js +6 -0
- package/lib/module/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +58 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +2 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +42 -53
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +18 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +56 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-background-sync.js +8 -4
- package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-device-connection.js +5 -1
- package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-health-import.js +48 -12
- package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js +40 -18
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +8 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +27 -9
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-scan-control.js +16 -0
- package/lib/module/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +2 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +4 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +75 -37
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +98 -2
- 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.files.js +68 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +48 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +4 -3
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +44 -29
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +10 -1
- 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.file-transfer.js +2 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/push-notification.js +34 -0
- package/lib/module/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js +79 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js +8 -2
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/module/modules/bt-management/utils/device-title.js +12 -0
- package/lib/module/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +1 -1
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/module/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/module/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/module/modules/content/content-card/components/title.js +1 -3
- package/lib/module/modules/content/content-card/components/title.js.map +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +12 -3
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +8 -2
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +13 -0
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +19 -4
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js +30 -21
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-observation-device.js +50 -0
- package/lib/module/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/module/modules/data-sync/utils/retry-save.js +39 -7
- package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -1
- package/lib/module/modules/diary/components/no-data.js +1 -2
- package/lib/module/modules/diary/components/no-data.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-select.js +13 -13
- package/lib/module/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/module/modules/helpers/index.js +1 -1
- package/lib/module/modules/helpers/index.js.map +1 -1
- package/lib/module/modules/helpers/utils/sentry-logger.js +3 -4
- package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/module/modules/helpers/utils/telemetry.js +133 -46
- package/lib/module/modules/helpers/utils/telemetry.js.map +1 -1
- package/lib/module/modules/image/components/optimized-image.js +29 -8
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/journal/past-journal/components/title.js +0 -1
- package/lib/module/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/module/modules/language-switcher/components/option/label.js +0 -1
- package/lib/module/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/module/modules/measurement/components/date-range.js +4 -3
- package/lib/module/modules/measurement/components/date-range.js.map +1 -1
- package/lib/module/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/module/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +3 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/setting/components/list-header.js +1 -2
- package/lib/module/modules/setting/components/list-header.js.map +1 -1
- package/lib/module/modules/setting/components/setting-list-item.js +0 -1
- package/lib/module/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/module/modules/tab/components/tab-item.js +0 -1
- package/lib/module/modules/tab/components/tab-item.js.map +1 -1
- package/lib/module/modules/theme/utils/generate-theme.js +35 -4
- package/lib/module/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/module/modules/tile/components/measured-value.js +0 -3
- package/lib/module/modules/tile/components/measured-value.js.map +1 -1
- package/lib/module/modules/tile/components/title.js +0 -1
- package/lib/module/modules/tile/components/title.js.map +1 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/module/modules/ui/components/background-sync-setting.js +20 -4
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +33 -6
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/ecg-strip-viewer.js +10 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -1
- package/lib/module/modules/ui/components/health-import-card.js +25 -2
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/module/modules/ui/components/manual-entry-form.js +14 -1
- package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -1
- package/lib/module/modules/ui/components/measurement-trend-chart.js +91 -0
- package/lib/module/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +106 -37
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +12 -5
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/module/modules/ui/components/urine-test-result.js +7 -2
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/modules/ui/use-ovok-ui.js +6 -3
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -10
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +8 -2
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- 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/logout-button/components/logout-button.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/login-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +2 -5
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- 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/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +9 -0
- 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/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- 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.files.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +7 -0
- 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/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
- 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/push-notification.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.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/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -10
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +8 -2
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- 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/logout-button/components/logout-button.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/login-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +2 -5
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +3 -1
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- 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/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +9 -3
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +9 -0
- 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/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- 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.files.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +7 -0
- 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/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
- 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/push-notification.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.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/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts +9 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +3 -2
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +3 -2
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +2 -1
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","AppState","Linking","Platform","PERMISSIONS","requestMultiple","slog","sentryLogger","useRequestPermissions","onAccessPermissionChanged","onChangeRef","useRef","accessPermission","setAccessPermission","useState","undefined","openBleSetting","useCallback","openSettings","useEffect","requestPermissions","
|
|
1
|
+
{"version":3,"names":["React","AppState","Linking","Platform","PERMISSIONS","requestMultiple","slog","sentryLogger","useRequestPermissions","onAccessPermissionChanged","onChangeRef","useRef","accessPermission","setAccessPermission","useState","undefined","openBleSetting","useCallback","openSettings","useEffect","requestPermissions","requestedPermissions","OS","Number","Version","ANDROID","BLUETOOTH_CONNECT","BLUETOOTH_SCAN","ACCESS_FINE_LOCATION","IOS","BLUETOOTH","permissions","then","grantedPermissions","allGranted","every","permission","current","catch","error","listener","addEventListener","state","remove"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-request-permissions.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAC1D,SAASC,WAAW,EAAEC,eAAe,QAAQ,0BAA0B;AAEvE,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,YAAY,QAAQ,sCAAmC;AAIhE,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC;AACuE,CAAC,KAAK;EAC7E,MAAMC,WAAW,GAAGV,KAAK,CAACW,MAAM,CAC9BF,yBACF,CAAC;EAED,MAAM,CAACG,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGb,KAAK,CAACc,QAAQ,CAE5DC,SAAS,CAAC;EAEZ,MAAMC,cAAc,GAAGhB,KAAK,CAACiB,WAAW,CAAC,MAAM;IAC7Cf,OAAO,CAACgB,YAAY,CAAC,CAAC;EACxB,CAAC,EAAE,EAAE,CAAC;EAENlB,KAAK,CAACmB,SAAS,CAAC,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAAA,CAAA,KAAY;MACrC,MAAMC,oBAAoB,GACxBlB,QAAQ,CAACmB,EAAE,KAAK,SAAS,GACrBC,MAAM,CAACpB,QAAQ,CAACqB,OAAO,CAAC,IAAI,EAAE,GAC5B,CACEpB,WAAW,CAACqB,OAAO,CAACC,iBAAiB,EACrCtB,WAAW,CAACqB,OAAO,CAACE,cAAc,CACnC,GACD,CAACvB,WAAW,CAACqB,OAAO,CAACG,oBAAoB,CAAC,GAC5C,CAACxB,WAAW,CAACyB,GAAG,CAACC,SAAS,CAAC;MAEjCvB,YAAY,CAAC,MAAM,EAAE,qCAAqC,EAAE;QAC1DwB,WAAW,EAAEV;MACf,CAAC,CAAC;MAEFhB,eAAe,CAACgB,oBAAoB,CAAC,CAClCW,IAAI,CAAEC,kBAAkB,IAAK;QAC5B,MAAMC,UAAU,GAAGb,oBAAoB,CAACc,KAAK,CAC1CC,UAAU,IAAKH,kBAAkB,CAACG,UAAU,CAAC,KAAK,SACrD,CAAC;QAED7B,YAAY,CAAC,MAAM,EAAE,oCAAoC,EAAE;UACzDwB,WAAW,EAAEE,kBAAkB;UAC/BC;QACF,CAAC,CAAC;QACFxB,WAAW,CAAC2B,OAAO,GAAGH,UAAU,CAAC;QACjCrB,mBAAmB,CAACqB,UAAU,CAAC;MACjC,CAAC,CAAC,CACDI,KAAK,CAAEC,KAAK,IAAKjC,IAAI,CAACiC,KAAK,EAAE,6BAA6B,CAAC,CAAC;IACjE,CAAC;IAED,MAAMC,QAAQ,GAAGvC,QAAQ,CAACwC,gBAAgB,CAAC,QAAQ,EAAGC,KAAK,IAAK;MAC9D,IAAIA,KAAK,KAAK,QAAQ,EAAE;QACtB;MACF;MACAtB,kBAAkB,CAAC,CAAC;IACtB,CAAC,CAAC;IAEFA,kBAAkB,CAAC,CAAC;IAEpB,OAAO,MAAM;MACXoB,QAAQ,CAACG,MAAM,CAAC,CAAC;IACnB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN3C,KAAK,CAACmB,SAAS,CAAC,MAAM;IACpBT,WAAW,CAAC2B,OAAO,GAAG5B,yBAAyB;EACjD,CAAC,EAAE,CAACA,yBAAyB,CAAC,CAAC;EAE/B,OAAO;IACLG,gBAAgB;IAChBI;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useBluetoothRuntime } from "./runtime-context.js";
|
|
5
|
+
|
|
6
|
+
/** Exposes scan pause/resume to apps using BTProvider. */
|
|
7
|
+
export const useScanControl = () => {
|
|
8
|
+
const runtime = useBluetoothRuntime();
|
|
9
|
+
React.useSyncExternalStore(runtime.subscribeState, () => runtime.manager, () => undefined);
|
|
10
|
+
return {
|
|
11
|
+
canControl: Boolean(runtime.manager),
|
|
12
|
+
pauseScan: () => runtime.manager?.pauseScan(),
|
|
13
|
+
resumeScan: () => runtime.manager?.resumeScan()
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-scan-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useBluetoothRuntime","useScanControl","runtime","useSyncExternalStore","subscribeState","manager","undefined","canControl","Boolean","pauseScan","resumeScan"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-scan-control.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,mBAAmB,QAAQ,sBAAmB;;AAEvD;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAIzB;EACH,MAAMC,OAAO,GAAGF,mBAAmB,CAAC,CAAC;EAErCD,KAAK,CAACI,oBAAoB,CACxBD,OAAO,CAACE,cAAc,EACtB,MAAMF,OAAO,CAACG,OAAO,EACrB,MAAMC,SACR,CAAC;EAED,OAAO;IACLC,UAAU,EAAEC,OAAO,CAACN,OAAO,CAACG,OAAO,CAAC;IACpCI,SAAS,EAAEA,CAAA,KAAMP,OAAO,CAACG,OAAO,EAAEI,SAAS,CAAC,CAAC;IAC7CC,UAAU,EAAEA,CAAA,KAAMR,OAAO,CAACG,OAAO,EAAEK,UAAU,CAAC;EAChD,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -43,6 +43,7 @@ export * from "./services/background-sync/background-ble-manager.js";
|
|
|
43
43
|
export * from "./services/background-sync/background-sync-coordinator.js";
|
|
44
44
|
export * from "./services/background-sync/background-service-uuids.js";
|
|
45
45
|
export * from "./utils/result-identity.js";
|
|
46
|
+
export * from "./utils/device-title.js";
|
|
46
47
|
export * from "./testing/index.js";
|
|
47
48
|
export * from "./services/custom/define-custom-device.js";
|
|
48
49
|
export * from "./services/devices/standard-gatt/standard-gatt.devices.js";
|
|
@@ -80,4 +81,5 @@ export * from "./hooks/use-device-connection.js";
|
|
|
80
81
|
export * from "./hooks/use-measurements.js";
|
|
81
82
|
export * from "./hooks/use-background-sync.js";
|
|
82
83
|
export * from "./hooks/use-health-import.js";
|
|
84
|
+
export * from "./hooks/use-scan-control.js";
|
|
83
85
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,2BAAwB;AACtC,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,0BAAuB;AACrC,cAAc,+BAA4B;AAC1C,cAAc,6BAA0B;AACxC,cAAc,yBAAsB;AACpC,cAAc,0BAAuB;AACrC,cAAc,6BAA0B;AACxC,cAAc,sCAAmC;AACjD,cAAc,4BAAyB;AACvC,cAAc,4BAAyB;AACvC,cAAc,2BAAwB;AACtC,cAAc,4BAAyB;AACvC,cAAc,0CAAuC;AACrD,cAAc,oCAAiC;AAC/C,cAAc,0BAAuB;AAErC,cAAc,yCAAsC;AACpD,cAAc,0DAAuD;AACrE,cAAc,4CAAyC;AACvD,cAAc,0BAAuB;AACrC,cAAc,sDAAmD;AACjE,cAAc,2DAAwD;AACtE,cAAc,wDAAqD;AACnE,cAAc,4BAAyB;AACvC,cAAc,oBAAW;AACzB,cAAc,2CAAwC;AACtD,cAAc,2DAAwD;AACtE,cAAc,yCAAsC;AACpD,cAAc,oDAAiD;AAC/D,cAAc,mDAAgD;AAC9D,cAAc,0DAAuD;AACrE,cAAc,kDAA+C;AAC7D,cAAc,uDAAoD;AAClE,cAAc,0DAAuD;AACrE,cAAc,mDAAgD;AAC9D,cAAc,4CAAyC;AACvD,cAAc,4CAAyC;AACvD,cAAc,iDAA8C;AAC5D,cAAc,+CAA4C;AAC1D,cAAc,mDAAgD;AAC9D,cAAc,+CAA4C;AAC1D,cAAc,2CAAwC;AACtD,cAAc,8CAA2C;AACzD,cAAc,4CAAyC;AACvD,cAAc,0CAAuC;AACrD,cAAc,6CAA0C;AACxD,cAAc,+CAA4C;AAC1D,cAAc,+CAA4C;AAE1D,cAAc,0CAAuC;AAErD,cAAc,6BAA0B;AACxC,cAAc,yCAAsC;AACpD,cAAc,6CAA0C;AACxD,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2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cAAc,6CAA0C;AACxD,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js
CHANGED
|
@@ -76,8 +76,11 @@ class BackgroundSyncCoordinator {
|
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
78
|
} catch (error) {
|
|
79
|
+
const queueError = new Error(`Background sync queue could not be read: ${error instanceof Error ? error.message : String(error)}`);
|
|
80
|
+
await this.options.storage.setItem(`${this.storageKey}.corrupt`, serialized);
|
|
79
81
|
await this.options.storage.setItem(this.storageKey, "[]");
|
|
80
|
-
|
|
82
|
+
this.options.onError?.(queueError);
|
|
83
|
+
return [];
|
|
81
84
|
}
|
|
82
85
|
};
|
|
83
86
|
writeQueue = async queue => {
|
package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["recordOvokMetric","reviveResultDates","DEFAULT_QUEUE_KEY","DEFAULT_MAX_RETRIES","DEFAULT_RETRY_BACKOFF_MS","resultSequence","createResultId","Date","now","Math","random","toString","slice","createQueueId","BackgroundSyncCoordinator","operation","Promise","resolve","constructor","options","storageKey","maxRetries","max","retryBackoffMs","enqueue","result","runExclusive","queue","readQueue","stableId","id","push","queueId","queuedAt","toISOString","attempt","nextAttemptAt","writeQueue","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","error","
|
|
1
|
+
{"version":3,"names":["recordOvokMetric","reviveResultDates","DEFAULT_QUEUE_KEY","DEFAULT_MAX_RETRIES","DEFAULT_RETRY_BACKOFF_MS","resultSequence","createResultId","Date","now","Math","random","toString","slice","createQueueId","BackgroundSyncCoordinator","operation","Promise","resolve","constructor","options","storageKey","maxRetries","max","retryBackoffMs","enqueue","result","runExclusive","queue","readQueue","stableId","id","push","queueId","queuedAt","toISOString","attempt","nextAttemptAt","writeQueue","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","error","queueError","message","String","setItem","onError","stringify","changed","exhausted","resetExhausted","includeExhausted","onResult","splice","indexOf","measurementTypeKey","data","Number","MAX_SAFE_INTEGER"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,qCAAkC;AAInE,SAASC,iBAAiB,QAAQ,gCAA6B;AAiB/D,MAAMC,iBAAiB,GAAG,sCAAsC;AAChE,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,IAAIC,cAAc,GAAG,CAAC;AAEtB,MAAMC,cAAc,GAAGA,CAAA,KAAc;EACnCD,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAACC,GAAG,CAAC,CAAC,IAAIH,cAAc,IAAII,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AACrF,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAc;EAClCR,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAACC,GAAG,CAAC,CAAC,UAAUH,cAAc,IAAII,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AAC3F,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAME,yBAAyB,CAAsB;EAI3CC,SAAS,GAAkBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAE7CC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":[]}
|
|
@@ -8,6 +8,16 @@ import { sentryLogger } from "../../helpers/utils/sentry-logger.js";
|
|
|
8
8
|
import { addOvokSpanEvent, recordOvokMetric } from "../../helpers/utils/telemetry.js";
|
|
9
9
|
import { toBluetoothError } from "../types/bluetooth-error.js";
|
|
10
10
|
import { DeviceCreator } from "./device-creator.js";
|
|
11
|
+
const bluetoothErrorCallback = error => {
|
|
12
|
+
const normalized = toBluetoothError(error);
|
|
13
|
+
const originalError = normalized.originalError;
|
|
14
|
+
return {
|
|
15
|
+
error: normalized.translationKey ?? (originalError instanceof Error || typeof originalError === "string" ? originalError : normalized),
|
|
16
|
+
code: normalized.code
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const SCAN_RETRY_DELAY_MS = 1_000;
|
|
20
|
+
const SCAN_RESTART_DELAY_MS = 1_000;
|
|
11
21
|
class BTManager {
|
|
12
22
|
static MAX_DEVICES = 15; // Safety limit to prevent unbounded growth
|
|
13
23
|
devices = new Map();
|
|
@@ -25,6 +35,21 @@ class BTManager {
|
|
|
25
35
|
this.deviceCreator = new DeviceCreator(this.acceptedDevices);
|
|
26
36
|
this.backgroundScanEnabled = options.backgroundEnabled === true;
|
|
27
37
|
}
|
|
38
|
+
setAutoConnect = (enabledOrOptions, delayMs, onDeviceSelectionRequired) => {
|
|
39
|
+
const enabled = typeof enabledOrOptions === "boolean" ? enabledOrOptions : enabledOrOptions.enabled;
|
|
40
|
+
const nextDelayMs = typeof enabledOrOptions === "boolean" ? delayMs : enabledOrOptions.delayMs;
|
|
41
|
+
const nextSelectionHandler = typeof enabledOrOptions === "boolean" ? onDeviceSelectionRequired : enabledOrOptions.onDeviceSelectionRequired;
|
|
42
|
+
this.options.autoConnect = enabled;
|
|
43
|
+
this.options.autoConnectDelayMs = nextDelayMs ?? this.options.autoConnectDelayMs;
|
|
44
|
+
this.options.onDeviceSelectionRequired = nextSelectionHandler;
|
|
45
|
+
if (!enabled) {
|
|
46
|
+
this.autoConnectCandidates.clear();
|
|
47
|
+
if (this.autoConnectTimer) {
|
|
48
|
+
clearTimeout(this.autoConnectTimer);
|
|
49
|
+
this.autoConnectTimer = undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
28
53
|
destroy = () => {
|
|
29
54
|
sentryLogger("info", "BT_MANAGER: Destroying BTManager");
|
|
30
55
|
this.destroyed = true;
|
|
@@ -41,7 +66,7 @@ class BTManager {
|
|
|
41
66
|
this.onDeviceStatusChangedCallback = undefined;
|
|
42
67
|
this.onConnectionEventCallback = undefined;
|
|
43
68
|
this.devices.forEach(device => {
|
|
44
|
-
device.
|
|
69
|
+
void device.disconnect();
|
|
45
70
|
});
|
|
46
71
|
this.devices.clear();
|
|
47
72
|
this.forgottenDeviceIds.clear();
|
|
@@ -53,20 +78,18 @@ class BTManager {
|
|
|
53
78
|
}
|
|
54
79
|
const generation = ++this.scanGeneration;
|
|
55
80
|
let subscription;
|
|
56
|
-
let poweredOnBeforeSubscription = false;
|
|
57
81
|
const onStateChange = state => {
|
|
58
82
|
if (this.destroyed || generation !== this.scanGeneration) {
|
|
59
83
|
return;
|
|
60
84
|
}
|
|
61
85
|
if (state === State.PoweredOn) {
|
|
62
|
-
if (subscription) {
|
|
63
|
-
this.removeStateChangeListener(subscription);
|
|
64
|
-
} else {
|
|
65
|
-
poweredOnBeforeSubscription = true;
|
|
66
|
-
}
|
|
67
86
|
this.startDeviceScan(generation);
|
|
68
87
|
return;
|
|
69
88
|
}
|
|
89
|
+
this.scanActive = false;
|
|
90
|
+
this.scanStarting = false;
|
|
91
|
+
this.bleManager.stopDeviceScan();
|
|
92
|
+
this.onErrorCallback?.(bluetoothErrorCallback("Bluetooth is powered off"));
|
|
70
93
|
sentryLogger("warning", "BT_MANAGER: State is not PoweredOn, sending intent to enable Bluetooth");
|
|
71
94
|
|
|
72
95
|
// Only send intent on Android — iOS has no programmatic way to power on
|
|
@@ -81,17 +104,11 @@ class BTManager {
|
|
|
81
104
|
try {
|
|
82
105
|
subscription = this.bleManager.onStateChange(onStateChange, true);
|
|
83
106
|
} catch (error) {
|
|
84
|
-
this.onErrorCallback?.(
|
|
85
|
-
error: toBluetoothError(error)
|
|
86
|
-
});
|
|
107
|
+
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
87
108
|
return;
|
|
88
109
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
} else {
|
|
92
|
-
this.stateChangeListener = subscription;
|
|
93
|
-
this.eventSubscriptions.push(subscription);
|
|
94
|
-
}
|
|
110
|
+
this.stateChangeListener = subscription;
|
|
111
|
+
this.eventSubscriptions.push(subscription);
|
|
95
112
|
};
|
|
96
113
|
|
|
97
114
|
/** Switches only the scan policy; the app can keep a foreground scan broad. */
|
|
@@ -109,6 +126,7 @@ class BTManager {
|
|
|
109
126
|
this.scanGeneration += 1;
|
|
110
127
|
this.scanActive = false;
|
|
111
128
|
this.scanStarting = false;
|
|
129
|
+
this.clearScanTimers();
|
|
112
130
|
this.removeStateChangeListener();
|
|
113
131
|
this.bleManager.stopDeviceScan();
|
|
114
132
|
|
|
@@ -123,7 +141,7 @@ class BTManager {
|
|
|
123
141
|
this.onDeviceStatusChangedCallback = undefined;
|
|
124
142
|
this.onConnectionEventCallback = undefined;
|
|
125
143
|
this.devices.forEach(device => {
|
|
126
|
-
device.
|
|
144
|
+
void device.disconnect();
|
|
127
145
|
});
|
|
128
146
|
this.devices.clear();
|
|
129
147
|
};
|
|
@@ -142,6 +160,7 @@ class BTManager {
|
|
|
142
160
|
this.scanGeneration += 1;
|
|
143
161
|
this.scanActive = false;
|
|
144
162
|
this.scanStarting = false;
|
|
163
|
+
this.clearScanTimers();
|
|
145
164
|
this.removeStateChangeListener();
|
|
146
165
|
this.bleManager.stopDeviceScan();
|
|
147
166
|
};
|
|
@@ -166,9 +185,32 @@ class BTManager {
|
|
|
166
185
|
this.scanGeneration += 1;
|
|
167
186
|
this.scanActive = false;
|
|
168
187
|
this.scanStarting = false;
|
|
188
|
+
this.clearScanTimers();
|
|
169
189
|
this.removeStateChangeListener();
|
|
170
190
|
this.bleManager.stopDeviceScan();
|
|
171
|
-
this.
|
|
191
|
+
this.scanRestartTimer = setTimeout(() => {
|
|
192
|
+
this.scanRestartTimer = undefined;
|
|
193
|
+
this.startScan();
|
|
194
|
+
}, SCAN_RESTART_DELAY_MS);
|
|
195
|
+
};
|
|
196
|
+
clearScanTimers = () => {
|
|
197
|
+
if (this.scanRetryTimer) {
|
|
198
|
+
clearTimeout(this.scanRetryTimer);
|
|
199
|
+
this.scanRetryTimer = undefined;
|
|
200
|
+
}
|
|
201
|
+
if (this.scanRestartTimer) {
|
|
202
|
+
clearTimeout(this.scanRestartTimer);
|
|
203
|
+
this.scanRestartTimer = undefined;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
scheduleScanRetry = generation => {
|
|
207
|
+
if (this.destroyed || generation !== this.scanGeneration || this.scanRetryTimer) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
this.scanRetryTimer = setTimeout(() => {
|
|
211
|
+
this.scanRetryTimer = undefined;
|
|
212
|
+
this.startDeviceScan(generation);
|
|
213
|
+
}, SCAN_RETRY_DELAY_MS);
|
|
172
214
|
};
|
|
173
215
|
removeStateChangeListener = (subscription = this.stateChangeListener) => {
|
|
174
216
|
if (!subscription) {
|
|
@@ -189,12 +231,11 @@ class BTManager {
|
|
|
189
231
|
}
|
|
190
232
|
const serviceUUIDs = this.options.serviceUUIDs ?? [];
|
|
191
233
|
if (Platform.OS === "ios" && this.backgroundScanEnabled && !serviceUUIDs.length) {
|
|
192
|
-
this.onErrorCallback?.(
|
|
193
|
-
error: "Background Bluetooth sync on iOS requires at least one service UUID. Add serviceUUIDs for custom devices."
|
|
194
|
-
});
|
|
234
|
+
this.onErrorCallback?.(bluetoothErrorCallback("Background Bluetooth sync on iOS requires at least one service UUID. Add serviceUUIDs for custom devices."));
|
|
195
235
|
return;
|
|
196
236
|
}
|
|
197
237
|
this.scanStarting = true;
|
|
238
|
+
let scanFailed = false;
|
|
198
239
|
try {
|
|
199
240
|
this.bleManager.startDeviceScan(this.backgroundScanEnabled ? [...serviceUUIDs] : null, {
|
|
200
241
|
scanMode: this.backgroundScanEnabled ? ScanMode.LowPower : ScanMode.Balanced
|
|
@@ -203,20 +244,21 @@ class BTManager {
|
|
|
203
244
|
return;
|
|
204
245
|
}
|
|
205
246
|
if (error) {
|
|
247
|
+
scanFailed = true;
|
|
206
248
|
this.scanActive = false;
|
|
249
|
+
this.scheduleScanRetry(generation);
|
|
207
250
|
}
|
|
208
251
|
this.onScanResult(error, device);
|
|
209
252
|
});
|
|
210
|
-
this.scanActive =
|
|
253
|
+
this.scanActive = !scanFailed;
|
|
211
254
|
sentryLogger("info", "BT_MANAGER: Scan started (continuous mode)");
|
|
212
255
|
addOvokSpanEvent("bluetooth.scan.started", {
|
|
213
256
|
platform: Platform.OS,
|
|
214
257
|
background: this.backgroundScanEnabled
|
|
215
258
|
});
|
|
216
259
|
} catch (error) {
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
});
|
|
260
|
+
this.scheduleScanRetry(generation);
|
|
261
|
+
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
220
262
|
} finally {
|
|
221
263
|
this.scanStarting = false;
|
|
222
264
|
}
|
|
@@ -265,12 +307,7 @@ class BTManager {
|
|
|
265
307
|
onScanResult = (error, device) => {
|
|
266
308
|
try {
|
|
267
309
|
if (error) {
|
|
268
|
-
this.onErrorCallback?.(
|
|
269
|
-
error: toBluetoothError(error)
|
|
270
|
-
});
|
|
271
|
-
sentryLogger("error", "BT_MANAGER: Scan result error", {
|
|
272
|
-
error: error instanceof Error ? error.message : error
|
|
273
|
-
});
|
|
310
|
+
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
274
311
|
slog(error, "BT_MANAGER: Scan result error", {
|
|
275
312
|
error
|
|
276
313
|
});
|
|
@@ -330,11 +367,6 @@ class BTManager {
|
|
|
330
367
|
this.onDeviceFoundCallback?.(deviceClass, this);
|
|
331
368
|
this.queueAutoConnect(deviceClass);
|
|
332
369
|
} catch (error) {
|
|
333
|
-
sentryLogger("error", "BT_MANAGER: Error creating device", {
|
|
334
|
-
error: error instanceof Error ? error.message : error,
|
|
335
|
-
deviceId: device?.id,
|
|
336
|
-
deviceName: device?.name
|
|
337
|
-
});
|
|
338
370
|
slog(error, "BT_MANAGER: Error creating device", {
|
|
339
371
|
error,
|
|
340
372
|
deviceId: device?.id,
|
|
@@ -355,13 +387,19 @@ class BTManager {
|
|
|
355
387
|
const devices = [...this.autoConnectCandidates.values()];
|
|
356
388
|
this.autoConnectCandidates.clear();
|
|
357
389
|
if (devices.length === 1) {
|
|
358
|
-
|
|
390
|
+
const candidate = devices[0];
|
|
391
|
+
if (candidate && !this.forgottenDeviceIds.has(candidate.id) && this.devices.get(candidate.id) === candidate) {
|
|
392
|
+
void candidate.connect();
|
|
393
|
+
}
|
|
359
394
|
return;
|
|
360
395
|
}
|
|
361
396
|
if (devices.length > 1) {
|
|
362
397
|
this.options.onDeviceSelectionRequired?.({
|
|
363
398
|
devices: devices,
|
|
364
399
|
select: async selected => {
|
|
400
|
+
if (this.forgottenDeviceIds.has(selected.id) || this.devices.get(selected.id) !== selected) {
|
|
401
|
+
throw new Error("The selected Bluetooth device was forgotten.");
|
|
402
|
+
}
|
|
365
403
|
await selected.connect();
|
|
366
404
|
}
|
|
367
405
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Linking","Platform","ScanMode","State","slog","sentryLogger","addOvokSpanEvent","recordOvokMetric","toBluetoothError","DeviceCreator","BTManager","MAX_DEVICES","devices","Map","forgottenDeviceIds","Set","eventSubscriptions","scanGeneration","scanActive","scanStarting","destroyed","autoConnectCandidates","constructor","bleManager","acceptedDevices","options","deviceCreator","backgroundScanEnabled","backgroundEnabled","destroy","stopScan","autoConnectTimer","clearTimeout","undefined","onErrorCallback","onDeviceFoundCallback","onResultCallback","onDeviceStatusChangedCallback","onConnectionEventCallback","forEach","device","clear","startScan","stateChangeListener","generation","subscription","poweredOnBeforeSubscription","onStateChange","state","PoweredOn","removeStateChangeListener","startDeviceScan","OS","sendIntent","error","push","setBackgroundScanEnabled","enabled","restartScan","stopDeviceScan","sub","remove","pauseScan","resumeScan","index","indexOf","splice","serviceUUIDs","length","scanMode","LowPower","Balanced","onScanResult","platform","background","restoreDevices","delete","id","forget","deviceId","add","get","disconnect","onDeviceFound","callback","onError","onDeviceStatusChanged","onConnectionEvent","onResult","Error","message","advertisedName","name","trim","localName","has","deviceName","getDeviceName","size","currentSize","deviceClass","createDevice","bind","oneReadingPerConnection","deliveredEcgFileNames","resultPolicy","resultPolicies","onDeviceDisconnected","removeDeviceFromFoundedDevices","set","model","queueAutoConnect","autoConnect","setTimeout","values","connect","onDeviceSelectionRequired","select","selected","Math","max","autoConnectDelayMs"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/bt-manager.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAChD,SAIEC,QAAQ,EACRC,KAAK,QAEA,sBAAsB;AAE7B,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,YAAY,QAAQ,sCAAmC;AAChE,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,kCAA+B;AAElF,SAASC,gBAAgB,QAAQ,6BAA0B;AAQ3D,SAASC,aAAa,QAAQ,qBAAkB;AA0BhD,MAAMC,SAAS,CAAsC;EACnD,OAAwBC,WAAW,GAAG,EAAE,CAAC,CAAC;EAClCC,OAAO,GAAG,IAAIC,GAAG,CAA0C,CAAC;EAC5DC,kBAAkB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAGtCC,kBAAkB,GAAmB,EAAE;EACvCC,cAAc,GAAG,CAAC;EAClBC,UAAU,GAAG,KAAK;EAClBC,YAAY,GAAG,KAAK;EACpBC,SAAS,GAAG,KAAK;EAIjBC,qBAAqB,GAAG,IAAIR,GAAG,CAA0C,CAAC;EAGlFS,WAAWA,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B,IAAI,CAAC3C,OAAO,CAAC2F,yBAAyB,GAAG;UACvCxG,OAAO,EAAEA,OAAuC;UAChDyG,MAAM,EAAE,MAAOC,QAAQ,IAAK;YAC1B,MAAMA,QAAQ,CAACH,OAAO,CAAC,CAAC;UAC1B;QACF,CAAC,CAAC;MACJ;IACF,CAAC,EAAEI,IAAI,CAACC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC/F,OAAO,CAACgG,kBAAkB,IAAI,GAAG,CAAC,CAAC;EACzD,CAAC;EAEOb,8BAA8B,GAAI7B,QAAgB,IAAK;IAC7D1E,YAAY,CACV,MAAM,EACN,2EAA2E,EAC3E;MACE0E,QAAQ;MACRiB,UAAU,EAAE,IAAI,CAACpF,OAAO,CAACqE,GAAG,CAACF,QAAQ,CAAC,EAAEvC,MAAM,EAAEoD;IAClD,CACF,CAAC;IACD,IAAI,CAAChF,OAAO,CAACgE,MAAM,CAACG,QAAQ,CAAC;EAC/B,CAAC;AACH;AAEA,SAASrE,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Linking","Platform","ScanMode","State","slog","sentryLogger","addOvokSpanEvent","recordOvokMetric","toBluetoothError","DeviceCreator","bluetoothErrorCallback","error","normalized","originalError","translationKey","Error","code","SCAN_RETRY_DELAY_MS","SCAN_RESTART_DELAY_MS","BTManager","MAX_DEVICES","devices","Map","forgottenDeviceIds","Set","eventSubscriptions","scanGeneration","scanActive","scanStarting","destroyed","autoConnectCandidates","constructor","bleManager","acceptedDevices","options","deviceCreator","backgroundScanEnabled","backgroundEnabled","setAutoConnect","enabledOrOptions","delayMs","onDeviceSelectionRequired","enabled","nextDelayMs","nextSelectionHandler","autoConnect","autoConnectDelayMs","clear","autoConnectTimer","clearTimeout","undefined","destroy","stopScan","onErrorCallback","onDeviceFoundCallback","onResultCallback","onDeviceStatusChangedCallback","onConnectionEventCallback","forEach","device","disconnect","startScan","stateChangeListener","generation","subscription","onStateChange","state","PoweredOn","startDeviceScan","stopDeviceScan","OS","sendIntent","push","setBackgroundScanEnabled","restartScan","clearScanTimers","removeStateChangeListener","sub","remove","pauseScan","resumeScan","scanRestartTimer","setTimeout","scanRetryTimer","scheduleScanRetry","index","indexOf","splice","serviceUUIDs","length","scanFailed","scanMode","LowPower","Balanced","onScanResult","platform","background","restoreDevices","delete","id","forget","deviceId","add","get","onDeviceFound","callback","onError","onDeviceStatusChanged","onConnectionEvent","onResult","advertisedName","name","trim","localName","has","deviceName","getDeviceName","size","currentSize","deviceClass","createDevice","bind","oneReadingPerConnection","deliveredEcgFileNames","resultPolicy","resultPolicies","onDeviceDisconnected","removeDeviceFromFoundedDevices","set","model","queueAutoConnect","values","candidate","connect","select","selected","Math","max"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/bt-manager.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAChD,SAIEC,QAAQ,EACRC,KAAK,QAEA,sBAAsB;AAE7B,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,YAAY,QAAQ,sCAAmC;AAChE,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,kCAA+B;AAElF,SAASC,gBAAgB,QAAQ,6BAA0B;AAQ3D,SAASC,aAAa,QAAQ,qBAAkB;AA0BhD,MAAMC,sBAAsB,GAAIC,KAAc,IAA4C;EACxF,MAAMC,UAAU,GAAGJ,gBAAgB,CAACG,KAAK,CAAC;EAC1C,MAAME,aAAa,GAAGD,UAAU,CAACC,aAAa;EAE9C,OAAO;IACLF,KAAK,EACHC,UAAU,CAACE,cAAc,KACxBD,aAAa,YAAYE,KAAK,IAAI,OAAOF,aAAa,KAAK,QAAQ,GAChEA,aAAa,GACbD,UAAU,CAAC;IACjBI,IAAI,EAAEJ,UAAU,CAACI;EACnB,CAAC;AACH,CAAC;AAED,MAAMC,mBAAmB,GAAG,KAAK;AACjC,MAAMC,qBAAqB,GAAG,KAAK;AAEnC,MAAMC,SAAS,CAAsC;EACnD,OAAwBC,WAAW,GAA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AM,EACN,2EAA2E,EAC3E;MACEgG,QAAQ;MACRc,UAAU,EAAE,IAAI,CAAC9F,OAAO,CAACkF,GAAG,CAACF,QAAQ,CAAC,EAAE1C,MAAM,EAAEoD;IAClD,CACF,CAAC;IACD,IAAI,CAAC1F,OAAO,CAAC6E,MAAM,CAACG,QAAQ,CAAC;EAC/B,CAAC;AACH;AAEA,SAASlF,SAAS","ignoreList":[]}
|
|
@@ -15,12 +15,15 @@ const BOSO_MEDICUS_NAME_MATCH = /^boso medicus [0-9a-f]{6}$/i;
|
|
|
15
15
|
* pairing. The shared profile declaration handles mmHg, optional timestamps, pulse rate and
|
|
16
16
|
* the profile's user/status bytes without inventing a boso-specific wire format.
|
|
17
17
|
*/
|
|
18
|
-
const bosoMedicusMonitor = params =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
stuckDataTimeoutMs:
|
|
23
|
-
|
|
18
|
+
const bosoMedicusMonitor = params => ({
|
|
19
|
+
...standardBloodPressureDevice({
|
|
20
|
+
id: params.id ?? "boso-medicus-system",
|
|
21
|
+
nameMatch: params.nameMatch ?? BOSO_MEDICUS_NAME_MATCH,
|
|
22
|
+
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
23
|
+
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
|
24
|
+
})
|
|
25
|
+
}),
|
|
26
|
+
reportsBondedEvent: true
|
|
24
27
|
});
|
|
25
28
|
export { BOSO_MEDICUS_NAME_MATCH, bosoMedicusMonitor };
|
|
26
29
|
//# sourceMappingURL=boso.medicus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["standardBloodPressureDevice","BOSO_MEDICUS_NAME_MATCH","bosoMedicusMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GACtBC,MAAyB,
|
|
1
|
+
{"version":3,"names":["standardBloodPressureDevice","BOSO_MEDICUS_NAME_MATCH","bosoMedicusMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined","reportsBondedEvent"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GACtBC,MAAyB,KACG;EAC5B,GAAGH,2BAA2B,CAAC;IAC7BI,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,qBAAqB;IACtCC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIJ,uBAAuB;IACtD,IAAIE,MAAM,CAACG,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;MAAED,kBAAkB,EAAEH,MAAM,CAACG;IAAmB,CAAC;EACvD,CAAC,CAAC;EACFE,kBAAkB,EAAE;AACtB,CAAC,CAAC;AAEF,SAASP,uBAAuB,EAAEC,kBAAkB","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable max-lines */
|
|
4
|
+
|
|
3
5
|
import { MeasurementTypeKey, EcgDiagnosticFlag } from "@ovok/core";
|
|
4
6
|
import { BloodPressureStates } from "@ovok/core/dist/client/observation/types/measurement/BloodPressureStates";
|
|
5
7
|
import { bloodPressureTranslatedExceptionMap } from "../../../constants/blood-pressure-translated-exception-map.js";
|
|
@@ -9,7 +11,9 @@ import { i16FromHex } from "../../../utils/i-16-from-hex.js";
|
|
|
9
11
|
import { le16FromHex } from "../../../utils/le-16-from-hex.js";
|
|
10
12
|
import { le32FromHex } from "../../../utils/le-32-from-hex.js";
|
|
11
13
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
14
|
+
import { decodeBP2File } from "./bp2.files.js";
|
|
12
15
|
import { BP2FrameReader } from "./bp2.frame-reader.js";
|
|
16
|
+
import { BP2HistorySequencer } from "./bp2.history-sequencer.js";
|
|
13
17
|
import { bp2MainServices } from "./bp2.main-services.js";
|
|
14
18
|
|
|
15
19
|
/**
|
|
@@ -17,16 +21,46 @@ import { bp2MainServices } from "./bp2.main-services.js";
|
|
|
17
21
|
* notifications than the 23 byte default allows.
|
|
18
22
|
*/
|
|
19
23
|
const BP2_PREFERRED_MTU = 247;
|
|
20
|
-
|
|
24
|
+
|
|
25
|
+
/** BP2 ECG waveform resolution from the device protocol. */
|
|
26
|
+
const BP2_ECG_MILLIVOLTS_PER_COUNT = 0.003098;
|
|
27
|
+
class BP2Device extends BTManagedDevice {
|
|
21
28
|
collectedValues = [];
|
|
22
29
|
diagramPoints = [];
|
|
23
30
|
duration = 0;
|
|
31
|
+
historyMode = false;
|
|
32
|
+
historyRequested = false;
|
|
33
|
+
pendingResults = new Map();
|
|
34
|
+
reportedFileNames = new Set();
|
|
24
35
|
mainServices = bp2MainServices;
|
|
25
36
|
stuckDataTimeout = 5_000;
|
|
26
37
|
onStreamStart = () => {
|
|
27
38
|
this.collectedValues = [];
|
|
28
39
|
this.diagramPoints = [];
|
|
29
40
|
this.duration = 0;
|
|
41
|
+
this.lastLiveResultSignature = undefined;
|
|
42
|
+
};
|
|
43
|
+
createCommandSequencer = () => {
|
|
44
|
+
this.historyMode = true;
|
|
45
|
+
this.historyRequested = false;
|
|
46
|
+
this.lastLiveResultSignature = undefined;
|
|
47
|
+
this.pendingResults.clear();
|
|
48
|
+
this.reportedFileNames.clear();
|
|
49
|
+
const service = bp2MainServices[0];
|
|
50
|
+
const write = service.writeUuid;
|
|
51
|
+
return new BP2HistorySequencer({
|
|
52
|
+
write: {
|
|
53
|
+
serviceUuid: service.uuid,
|
|
54
|
+
characteristicUuid: write.uuid
|
|
55
|
+
},
|
|
56
|
+
onFile: this.handleHistoryFile,
|
|
57
|
+
onError: this.handleHistoryError,
|
|
58
|
+
onTransferFinished: this.reportPendingResults,
|
|
59
|
+
shouldStartTransfer: () => this.historyRequested,
|
|
60
|
+
onTransferRequested: () => {
|
|
61
|
+
this.historyRequested = false;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
30
64
|
};
|
|
31
65
|
frameReader = new BP2FrameReader();
|
|
32
66
|
preferredMtu = BP2_PREFERRED_MTU;
|
|
@@ -53,6 +87,10 @@ export class BP2Device extends BTManagedDevice {
|
|
|
53
87
|
this.onError?.(error);
|
|
54
88
|
return;
|
|
55
89
|
}
|
|
90
|
+
if (this.historyMode) {
|
|
91
|
+
this.queueHistoryResult(successResult);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
56
94
|
this.onResult?.(successResult);
|
|
57
95
|
return;
|
|
58
96
|
}
|
|
@@ -80,7 +118,7 @@ export class BP2Device extends BTManagedDevice {
|
|
|
80
118
|
for (let i = 0; i < samplingNum; i++) {
|
|
81
119
|
const byteIndexInData = samplesStart + i * 2;
|
|
82
120
|
const sampleVal = i16FromHex(data, byteIndexInData);
|
|
83
|
-
this.diagramPoints.push(sampleVal);
|
|
121
|
+
this.diagramPoints.push(sampleVal * BP2_ECG_MILLIVOLTS_PER_COUNT);
|
|
84
122
|
}
|
|
85
123
|
}
|
|
86
124
|
handleBloodPressureResult(successResult) {
|
|
@@ -92,6 +130,10 @@ export class BP2Device extends BTManagedDevice {
|
|
|
92
130
|
this.onError?.(error);
|
|
93
131
|
return;
|
|
94
132
|
}
|
|
133
|
+
if (this.historyMode) {
|
|
134
|
+
this.queueHistoryResult(successResult);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
95
137
|
this.onResult?.(successResult);
|
|
96
138
|
}
|
|
97
139
|
checkIfHasErrorForBloodPressure(successResult) {
|
|
@@ -118,6 +160,59 @@ export class BP2Device extends BTManagedDevice {
|
|
|
118
160
|
}
|
|
119
161
|
return undefined;
|
|
120
162
|
}
|
|
163
|
+
queueHistoryResult = result => {
|
|
164
|
+
const signature = this.signatureFor(result);
|
|
165
|
+
if (signature === this.lastLiveResultSignature) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.lastLiveResultSignature = signature;
|
|
169
|
+
this.pendingResults.set(result.measurementTypeKey, result);
|
|
170
|
+
this.historyRequested = true;
|
|
171
|
+
};
|
|
172
|
+
signatureFor = result => result.measurementTypeKey === MeasurementTypeKey.bloodPressure ? [result.measurementTypeKey, result.systolic, result.diastolic, result.heartRate, result.status].join("|") : [result.measurementTypeKey, result.heartRate, result.diagnosticResult, result.duration, result.diagramPoints?.join(",")].join("|");
|
|
173
|
+
handleHistoryFile = file => {
|
|
174
|
+
if (this.reportedFileNames.has(file.name)) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const decoded = decodeBP2File(file.name, file.content);
|
|
178
|
+
if (!decoded) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const pending = this.pendingResults.get(decoded.measurementTypeKey);
|
|
182
|
+
if (!pending || !this.matchesPendingResult(pending, decoded)) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
this.reportedFileNames.add(file.name);
|
|
186
|
+
const result = {
|
|
187
|
+
...decoded,
|
|
188
|
+
caseType: CaseType.RESULT
|
|
189
|
+
};
|
|
190
|
+
const error = result.measurementTypeKey === MeasurementTypeKey.bloodPressure ? this.checkIfHasErrorForBloodPressure(result) : this.checkIfHasErrorForEcg(result);
|
|
191
|
+
if (error) {
|
|
192
|
+
this.onError?.(error);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this.pendingResults.delete(result.measurementTypeKey);
|
|
196
|
+
this.onResult?.(result);
|
|
197
|
+
};
|
|
198
|
+
matchesPendingResult = (pending, decoded) => {
|
|
199
|
+
if (decoded.measurementTypeKey === MeasurementTypeKey.bloodPressure) {
|
|
200
|
+
const pendingBloodPressure = pending;
|
|
201
|
+
const decodedBloodPressure = decoded;
|
|
202
|
+
return pendingBloodPressure.systolic === decodedBloodPressure.systolic && pendingBloodPressure.diastolic === decodedBloodPressure.diastolic && pendingBloodPressure.heartRate === decodedBloodPressure.heartRate && pendingBloodPressure.status === decodedBloodPressure.status;
|
|
203
|
+
}
|
|
204
|
+
const pendingEcg = pending;
|
|
205
|
+
const decodedEcg = decoded;
|
|
206
|
+
return pendingEcg.heartRate === decodedEcg.heartRate && pendingEcg.diagnosticResult === decodedEcg.diagnosticResult && pendingEcg.duration === decodedEcg.duration;
|
|
207
|
+
};
|
|
208
|
+
handleHistoryError = reason => {
|
|
209
|
+
this.onError?.(new Error(`BP2 history: ${reason}`));
|
|
210
|
+
this.reportPendingResults();
|
|
211
|
+
};
|
|
212
|
+
reportPendingResults = () => {
|
|
213
|
+
this.pendingResults.forEach(result => this.onResult?.(result));
|
|
214
|
+
this.pendingResults.clear();
|
|
215
|
+
};
|
|
121
216
|
checkIfHasErrorForEcg(successResult) {
|
|
122
217
|
const ecgMeasurement = successResult;
|
|
123
218
|
if (ecgMeasurement.diagnosticResult === EcgDiagnosticFlag.POOR_WAVEFORM) {
|
|
@@ -145,4 +240,5 @@ export class BP2Device extends BTManagedDevice {
|
|
|
145
240
|
return undefined;
|
|
146
241
|
}
|
|
147
242
|
}
|
|
243
|
+
export { BP2Device, BP2_ECG_MILLIVOLTS_PER_COUNT };
|
|
148
244
|
//# sourceMappingURL=bp2.device.js.map
|