@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":["_telemetry","require","_resultIdentity","DEFAULT_QUEUE_KEY","exports","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","recordOvokMetric","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","reviveResultDates","error","
|
|
1
|
+
{"version":3,"names":["_telemetry","require","_resultIdentity","DEFAULT_QUEUE_KEY","exports","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","recordOvokMetric","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","reviveResultDates","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,IAAAA,UAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAD,OAAA;AAiBA,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,sCAAsC;AAChE,MAAME,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,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sB,EAAE,CAAC,EAAE;YAAEH,OAAO;YAAEgC,SAAS,EAAE;UAAK,CAAC,CAAC;QAC3E;QACAD,OAAO,GAAG,IAAI;MAChB;IACF;IAEA,IAAIA,OAAO,EAAE;MACX,MAAM,IAAI,CAAC7B,UAAU,CAACV,KAAK,CAAC;MAC5B,IAAAW,2BAAgB,EAAC,kBAAkB,EAAEX,KAAK,CAACY,MAAM,CAAC;IACpD;EACF,CAAC;AACH;AAACrC,OAAA,CAAAY,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -13,6 +13,16 @@ var _bluetoothError = require("../types/bluetooth-error.js");
|
|
|
13
13
|
var _deviceCreator = require("./device-creator.js");
|
|
14
14
|
/* eslint-disable max-lines */
|
|
15
15
|
|
|
16
|
+
const bluetoothErrorCallback = error => {
|
|
17
|
+
const normalized = (0, _bluetoothError.toBluetoothError)(error);
|
|
18
|
+
const originalError = normalized.originalError;
|
|
19
|
+
return {
|
|
20
|
+
error: normalized.translationKey ?? (originalError instanceof Error || typeof originalError === "string" ? originalError : normalized),
|
|
21
|
+
code: normalized.code
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const SCAN_RETRY_DELAY_MS = 1_000;
|
|
25
|
+
const SCAN_RESTART_DELAY_MS = 1_000;
|
|
16
26
|
class BTManager {
|
|
17
27
|
static MAX_DEVICES = 15; // Safety limit to prevent unbounded growth
|
|
18
28
|
devices = new Map();
|
|
@@ -30,6 +40,21 @@ class BTManager {
|
|
|
30
40
|
this.deviceCreator = new _deviceCreator.DeviceCreator(this.acceptedDevices);
|
|
31
41
|
this.backgroundScanEnabled = options.backgroundEnabled === true;
|
|
32
42
|
}
|
|
43
|
+
setAutoConnect = (enabledOrOptions, delayMs, onDeviceSelectionRequired) => {
|
|
44
|
+
const enabled = typeof enabledOrOptions === "boolean" ? enabledOrOptions : enabledOrOptions.enabled;
|
|
45
|
+
const nextDelayMs = typeof enabledOrOptions === "boolean" ? delayMs : enabledOrOptions.delayMs;
|
|
46
|
+
const nextSelectionHandler = typeof enabledOrOptions === "boolean" ? onDeviceSelectionRequired : enabledOrOptions.onDeviceSelectionRequired;
|
|
47
|
+
this.options.autoConnect = enabled;
|
|
48
|
+
this.options.autoConnectDelayMs = nextDelayMs ?? this.options.autoConnectDelayMs;
|
|
49
|
+
this.options.onDeviceSelectionRequired = nextSelectionHandler;
|
|
50
|
+
if (!enabled) {
|
|
51
|
+
this.autoConnectCandidates.clear();
|
|
52
|
+
if (this.autoConnectTimer) {
|
|
53
|
+
clearTimeout(this.autoConnectTimer);
|
|
54
|
+
this.autoConnectTimer = undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
33
58
|
destroy = () => {
|
|
34
59
|
(0, _sentryLogger.sentryLogger)("info", "BT_MANAGER: Destroying BTManager");
|
|
35
60
|
this.destroyed = true;
|
|
@@ -46,7 +71,7 @@ class BTManager {
|
|
|
46
71
|
this.onDeviceStatusChangedCallback = undefined;
|
|
47
72
|
this.onConnectionEventCallback = undefined;
|
|
48
73
|
this.devices.forEach(device => {
|
|
49
|
-
device.
|
|
74
|
+
void device.disconnect();
|
|
50
75
|
});
|
|
51
76
|
this.devices.clear();
|
|
52
77
|
this.forgottenDeviceIds.clear();
|
|
@@ -58,20 +83,18 @@ class BTManager {
|
|
|
58
83
|
}
|
|
59
84
|
const generation = ++this.scanGeneration;
|
|
60
85
|
let subscription;
|
|
61
|
-
let poweredOnBeforeSubscription = false;
|
|
62
86
|
const onStateChange = state => {
|
|
63
87
|
if (this.destroyed || generation !== this.scanGeneration) {
|
|
64
88
|
return;
|
|
65
89
|
}
|
|
66
90
|
if (state === _reactNativeBlePlx.State.PoweredOn) {
|
|
67
|
-
if (subscription) {
|
|
68
|
-
this.removeStateChangeListener(subscription);
|
|
69
|
-
} else {
|
|
70
|
-
poweredOnBeforeSubscription = true;
|
|
71
|
-
}
|
|
72
91
|
this.startDeviceScan(generation);
|
|
73
92
|
return;
|
|
74
93
|
}
|
|
94
|
+
this.scanActive = false;
|
|
95
|
+
this.scanStarting = false;
|
|
96
|
+
this.bleManager.stopDeviceScan();
|
|
97
|
+
this.onErrorCallback?.(bluetoothErrorCallback("Bluetooth is powered off"));
|
|
75
98
|
(0, _sentryLogger.sentryLogger)("warning", "BT_MANAGER: State is not PoweredOn, sending intent to enable Bluetooth");
|
|
76
99
|
|
|
77
100
|
// Only send intent on Android — iOS has no programmatic way to power on
|
|
@@ -86,17 +109,11 @@ class BTManager {
|
|
|
86
109
|
try {
|
|
87
110
|
subscription = this.bleManager.onStateChange(onStateChange, true);
|
|
88
111
|
} catch (error) {
|
|
89
|
-
this.onErrorCallback?.(
|
|
90
|
-
error: (0, _bluetoothError.toBluetoothError)(error)
|
|
91
|
-
});
|
|
112
|
+
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
92
113
|
return;
|
|
93
114
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
} else {
|
|
97
|
-
this.stateChangeListener = subscription;
|
|
98
|
-
this.eventSubscriptions.push(subscription);
|
|
99
|
-
}
|
|
115
|
+
this.stateChangeListener = subscription;
|
|
116
|
+
this.eventSubscriptions.push(subscription);
|
|
100
117
|
};
|
|
101
118
|
|
|
102
119
|
/** Switches only the scan policy; the app can keep a foreground scan broad. */
|
|
@@ -114,6 +131,7 @@ class BTManager {
|
|
|
114
131
|
this.scanGeneration += 1;
|
|
115
132
|
this.scanActive = false;
|
|
116
133
|
this.scanStarting = false;
|
|
134
|
+
this.clearScanTimers();
|
|
117
135
|
this.removeStateChangeListener();
|
|
118
136
|
this.bleManager.stopDeviceScan();
|
|
119
137
|
|
|
@@ -128,7 +146,7 @@ class BTManager {
|
|
|
128
146
|
this.onDeviceStatusChangedCallback = undefined;
|
|
129
147
|
this.onConnectionEventCallback = undefined;
|
|
130
148
|
this.devices.forEach(device => {
|
|
131
|
-
device.
|
|
149
|
+
void device.disconnect();
|
|
132
150
|
});
|
|
133
151
|
this.devices.clear();
|
|
134
152
|
};
|
|
@@ -147,6 +165,7 @@ class BTManager {
|
|
|
147
165
|
this.scanGeneration += 1;
|
|
148
166
|
this.scanActive = false;
|
|
149
167
|
this.scanStarting = false;
|
|
168
|
+
this.clearScanTimers();
|
|
150
169
|
this.removeStateChangeListener();
|
|
151
170
|
this.bleManager.stopDeviceScan();
|
|
152
171
|
};
|
|
@@ -171,9 +190,32 @@ class BTManager {
|
|
|
171
190
|
this.scanGeneration += 1;
|
|
172
191
|
this.scanActive = false;
|
|
173
192
|
this.scanStarting = false;
|
|
193
|
+
this.clearScanTimers();
|
|
174
194
|
this.removeStateChangeListener();
|
|
175
195
|
this.bleManager.stopDeviceScan();
|
|
176
|
-
this.
|
|
196
|
+
this.scanRestartTimer = setTimeout(() => {
|
|
197
|
+
this.scanRestartTimer = undefined;
|
|
198
|
+
this.startScan();
|
|
199
|
+
}, SCAN_RESTART_DELAY_MS);
|
|
200
|
+
};
|
|
201
|
+
clearScanTimers = () => {
|
|
202
|
+
if (this.scanRetryTimer) {
|
|
203
|
+
clearTimeout(this.scanRetryTimer);
|
|
204
|
+
this.scanRetryTimer = undefined;
|
|
205
|
+
}
|
|
206
|
+
if (this.scanRestartTimer) {
|
|
207
|
+
clearTimeout(this.scanRestartTimer);
|
|
208
|
+
this.scanRestartTimer = undefined;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
scheduleScanRetry = generation => {
|
|
212
|
+
if (this.destroyed || generation !== this.scanGeneration || this.scanRetryTimer) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
this.scanRetryTimer = setTimeout(() => {
|
|
216
|
+
this.scanRetryTimer = undefined;
|
|
217
|
+
this.startDeviceScan(generation);
|
|
218
|
+
}, SCAN_RETRY_DELAY_MS);
|
|
177
219
|
};
|
|
178
220
|
removeStateChangeListener = (subscription = this.stateChangeListener) => {
|
|
179
221
|
if (!subscription) {
|
|
@@ -194,12 +236,11 @@ class BTManager {
|
|
|
194
236
|
}
|
|
195
237
|
const serviceUUIDs = this.options.serviceUUIDs ?? [];
|
|
196
238
|
if (_reactNative.Platform.OS === "ios" && this.backgroundScanEnabled && !serviceUUIDs.length) {
|
|
197
|
-
this.onErrorCallback?.(
|
|
198
|
-
error: "Background Bluetooth sync on iOS requires at least one service UUID. Add serviceUUIDs for custom devices."
|
|
199
|
-
});
|
|
239
|
+
this.onErrorCallback?.(bluetoothErrorCallback("Background Bluetooth sync on iOS requires at least one service UUID. Add serviceUUIDs for custom devices."));
|
|
200
240
|
return;
|
|
201
241
|
}
|
|
202
242
|
this.scanStarting = true;
|
|
243
|
+
let scanFailed = false;
|
|
203
244
|
try {
|
|
204
245
|
this.bleManager.startDeviceScan(this.backgroundScanEnabled ? [...serviceUUIDs] : null, {
|
|
205
246
|
scanMode: this.backgroundScanEnabled ? _reactNativeBlePlx.ScanMode.LowPower : _reactNativeBlePlx.ScanMode.Balanced
|
|
@@ -208,20 +249,21 @@ class BTManager {
|
|
|
208
249
|
return;
|
|
209
250
|
}
|
|
210
251
|
if (error) {
|
|
252
|
+
scanFailed = true;
|
|
211
253
|
this.scanActive = false;
|
|
254
|
+
this.scheduleScanRetry(generation);
|
|
212
255
|
}
|
|
213
256
|
this.onScanResult(error, device);
|
|
214
257
|
});
|
|
215
|
-
this.scanActive =
|
|
258
|
+
this.scanActive = !scanFailed;
|
|
216
259
|
(0, _sentryLogger.sentryLogger)("info", "BT_MANAGER: Scan started (continuous mode)");
|
|
217
260
|
(0, _telemetry.addOvokSpanEvent)("bluetooth.scan.started", {
|
|
218
261
|
platform: _reactNative.Platform.OS,
|
|
219
262
|
background: this.backgroundScanEnabled
|
|
220
263
|
});
|
|
221
264
|
} catch (error) {
|
|
222
|
-
this.
|
|
223
|
-
|
|
224
|
-
});
|
|
265
|
+
this.scheduleScanRetry(generation);
|
|
266
|
+
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
225
267
|
} finally {
|
|
226
268
|
this.scanStarting = false;
|
|
227
269
|
}
|
|
@@ -270,12 +312,7 @@ class BTManager {
|
|
|
270
312
|
onScanResult = (error, device) => {
|
|
271
313
|
try {
|
|
272
314
|
if (error) {
|
|
273
|
-
this.onErrorCallback?.(
|
|
274
|
-
error: (0, _bluetoothError.toBluetoothError)(error)
|
|
275
|
-
});
|
|
276
|
-
(0, _sentryLogger.sentryLogger)("error", "BT_MANAGER: Scan result error", {
|
|
277
|
-
error: error instanceof Error ? error.message : error
|
|
278
|
-
});
|
|
315
|
+
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
279
316
|
(0, _index.slog)(error, "BT_MANAGER: Scan result error", {
|
|
280
317
|
error
|
|
281
318
|
});
|
|
@@ -335,11 +372,6 @@ class BTManager {
|
|
|
335
372
|
this.onDeviceFoundCallback?.(deviceClass, this);
|
|
336
373
|
this.queueAutoConnect(deviceClass);
|
|
337
374
|
} catch (error) {
|
|
338
|
-
(0, _sentryLogger.sentryLogger)("error", "BT_MANAGER: Error creating device", {
|
|
339
|
-
error: error instanceof Error ? error.message : error,
|
|
340
|
-
deviceId: device?.id,
|
|
341
|
-
deviceName: device?.name
|
|
342
|
-
});
|
|
343
375
|
(0, _index.slog)(error, "BT_MANAGER: Error creating device", {
|
|
344
376
|
error,
|
|
345
377
|
deviceId: device?.id,
|
|
@@ -360,13 +392,19 @@ class BTManager {
|
|
|
360
392
|
const devices = [...this.autoConnectCandidates.values()];
|
|
361
393
|
this.autoConnectCandidates.clear();
|
|
362
394
|
if (devices.length === 1) {
|
|
363
|
-
|
|
395
|
+
const candidate = devices[0];
|
|
396
|
+
if (candidate && !this.forgottenDeviceIds.has(candidate.id) && this.devices.get(candidate.id) === candidate) {
|
|
397
|
+
void candidate.connect();
|
|
398
|
+
}
|
|
364
399
|
return;
|
|
365
400
|
}
|
|
366
401
|
if (devices.length > 1) {
|
|
367
402
|
this.options.onDeviceSelectionRequired?.({
|
|
368
403
|
devices: devices,
|
|
369
404
|
select: async selected => {
|
|
405
|
+
if (this.forgottenDeviceIds.has(selected.id) || this.devices.get(selected.id) !== selected) {
|
|
406
|
+
throw new Error("The selected Bluetooth device was forgotten.");
|
|
407
|
+
}
|
|
370
408
|
await selected.connect();
|
|
371
409
|
}
|
|
372
410
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeBlePlx","_index","_sentryLogger","_telemetry","_bluetoothError","_deviceCreator","BTManager","MAX_DEVICES","devices","Map","forgottenDeviceIds","Set","eventSubscriptions","scanGeneration","scanActive","scanStarting","destroyed","autoConnectCandidates","constructor","bleManager","acceptedDevices","options","deviceCreator","DeviceCreator","backgroundScanEnabled","backgroundEnabled","destroy","sentryLogger","stopScan","autoConnectTimer","clearTimeout","undefined","onErrorCallback","onDeviceFoundCallback","onResultCallback","onDeviceStatusChangedCallback","onConnectionEventCallback","forEach","device","clear","startScan","stateChangeListener","generation","subscription","poweredOnBeforeSubscription","onStateChange","state","State","PoweredOn","removeStateChangeListener","startDeviceScan","Platform","OS","Linking","sendIntent","error","toBluetoothError","push","setBackgroundScanEnabled","enabled","restartScan","stopDeviceScan","sub","remove","pauseScan","resumeScan","index","indexOf","splice","serviceUUIDs","length","scanMode","ScanMode","LowPower","Balanced","onScanResult","addOvokSpanEvent","platform","background","restoreDevices","delete","id","forget","deviceId","add","get","disconnect","onDeviceFound","callback","onError","onDeviceStatusChanged","onConnectionEvent","onResult","Error","message","slog","advertisedName","name","trim","localName","has","deviceName","getDeviceName","size","currentSize","deviceClass","createDevice","bind","oneReadingPerConnection","deliveredEcgFileNames","resultPolicy","resultPolicies","onDeviceDisconnected","removeDeviceFromFoundedDevices","set","recordOvokMetric","model","queueAutoConnect","autoConnect","setTimeout","values","connect","onDeviceSelectionRequired","select","selected","Math","max","autoConnectDelayMs","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/bt-manager.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AASA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,aAA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AC;EAC/B,CAAC;AACH;AAAC6C,OAAA,CAAA1H,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeBlePlx","_index","_sentryLogger","_telemetry","_bluetoothError","_deviceCreator","bluetoothErrorCallback","error","normalized","toBluetoothError","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","DeviceCreator","backgroundScanEnabled","backgroundEnabled","setAutoConnect","enabledOrOptions","delayMs","onDeviceSelectionRequired","enabled","nextDelayMs","nextSelectionHandler","autoConnect","autoConnectDelayMs","clear","autoConnectTimer","clearTimeout","undefined","destroy","sentryLogger","stopScan","onErrorCallback","onDeviceFoundCallback","onResultCallback","onDeviceStatusChangedCallback","onConnectionEventCallback","forEach","device","disconnect","startScan","stateChangeListener","generation","subscription","onStateChange","state","State","PoweredOn","startDeviceScan","stopDeviceScan","Platform","OS","Linking","sendIntent","push","setBackgroundScanEnabled","restartScan","clearScanTimers","removeStateChangeListener","sub","remove","pauseScan","resumeScan","scanRestartTimer","setTimeout","scanRetryTimer","scheduleScanRetry","index","indexOf","splice","serviceUUIDs","length","scanFailed","scanMode","ScanMode","LowPower","Balanced","onScanResult","addOvokSpanEvent","platform","background","restoreDevices","delete","id","forget","deviceId","add","get","onDeviceFound","callback","onError","onDeviceStatusChanged","onConnectionEvent","onResult","slog","advertisedName","name","trim","localName","has","deviceName","getDeviceName","size","currentSize","deviceClass","createDevice","bind","oneReadingPerConnection","deliveredEcgFileNames","resultPolicy","resultPolicies","onDeviceDisconnected","removeDeviceFromFoundedDevices","set","recordOvokMetric","model","queueAutoConnect","values","candidate","connect","select","selected","Math","max","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/bt-manager.ts"],"mappings":";;;;;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C1C,IAAI,CAACrF,OAAO,CAACyF,GAAG,CAAC+B,SAAS,CAACnC,EAAE,CAAC,KAAKmC,SAAS,EAC5C;UACA,KAAKA,SAAS,CAACC,OAAO,CAAC,CAAC;QAC1B;QAEA;MACF;MAEA,IAAIzH,OAAO,CAACyE,MAAM,GAAG,CAAC,EAAE;QACtB,IAAI,CAAC5D,OAAO,CAACQ,yBAAyB,GAAG;UACvCrB,OAAO,EAAEA,OAAuC;UAChD0H,MAAM,EAAE,MAAOC,QAAQ,IAAK;YAC1B,IACE,IAAI,CAACzH,kBAAkB,CAACmG,GAAG,CAACsB,QAAQ,CAACtC,EAAE,CAAC,IACxC,IAAI,CAACrF,OAAO,CAACyF,GAAG,CAACkC,QAAQ,CAACtC,EAAE,CAAC,KAAKsC,QAAQ,EAC1C;cACA,MAAM,IAAIjI,KAAK,CAAC,8CAA8C,CAAC;YACjE;YAEA,MAAMiI,QAAQ,CAACF,OAAO,CAAC,CAAC;UAC1B;QACF,CAAC,CAAC;MACJ;IACF,CAAC,EAAEG,IAAI,CAACC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAChH,OAAO,CAACa,kBAAkB,IAAI,GAAG,CAAC,CAAC;EACzD,CAAC;EAEOwF,8BAA8B,GAAI3B,QAAgB,IAAK;IAC7D,IAAAvD,0BAAY,EACV,MAAM,EACN,2EAA2E,EAC3E;MACEuD,QAAQ;MACRe,UAAU,EAAE,IAAI,CAACtG,OAAO,CAACyF,GAAG,CAACF,QAAQ,CAAC,EAAE/C,MAAM,EAAE0D;IAClD,CACF,CAAC;IACD,IAAI,CAAClG,OAAO,CAACoF,MAAM,CAACG,QAAQ,CAAC;EAC/B,CAAC;AACH;AAACuC,OAAA,CAAAhI,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -18,12 +18,15 @@ const BOSO_MEDICUS_NAME_MATCH = exports.BOSO_MEDICUS_NAME_MATCH = /^boso medicus
|
|
|
18
18
|
* pairing. The shared profile declaration handles mmHg, optional timestamps, pulse rate and
|
|
19
19
|
* the profile's user/status bytes without inventing a boso-specific wire format.
|
|
20
20
|
*/
|
|
21
|
-
const bosoMedicusMonitor = params => (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
stuckDataTimeoutMs:
|
|
26
|
-
|
|
21
|
+
const bosoMedicusMonitor = params => ({
|
|
22
|
+
...(0, _standardGattDevices.standardBloodPressureDevice)({
|
|
23
|
+
id: params.id ?? "boso-medicus-system",
|
|
24
|
+
nameMatch: params.nameMatch ?? BOSO_MEDICUS_NAME_MATCH,
|
|
25
|
+
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
26
|
+
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
|
27
|
+
})
|
|
28
|
+
}),
|
|
29
|
+
reportsBondedEvent: true
|
|
27
30
|
});
|
|
28
31
|
exports.bosoMedicusMonitor = bosoMedicusMonitor;
|
|
29
32
|
//# sourceMappingURL=boso.medicus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_standardGattDevices","require","BOSO_MEDICUS_NAME_MATCH","exports","bosoMedicusMonitor","params","standardBloodPressureDevice","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,kBAAkB,GACtBC,MAAyB,
|
|
1
|
+
{"version":3,"names":["_standardGattDevices","require","BOSO_MEDICUS_NAME_MATCH","exports","bosoMedicusMonitor","params","standardBloodPressureDevice","id","nameMatch","stuckDataTimeoutMs","undefined","reportsBondedEvent"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/boso/boso.medicus.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,6BAA6B;AAc7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,kBAAkB,GACtBC,MAAyB,KACG;EAC5B,GAAG,IAAAC,gDAA2B,EAAC;IAC7BC,EAAE,EAAEF,MAAM,CAACE,EAAE,IAAI,qBAAqB;IACtCC,SAAS,EAAEH,MAAM,CAACG,SAAS,IAAIN,uBAAuB;IACtD,IAAIG,MAAM,CAACI,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;MAAED,kBAAkB,EAAEJ,MAAM,CAACI;IAAmB,CAAC;EACvD,CAAC,CAAC;EACFE,kBAAkB,EAAE;AACtB,CAAC,CAAC;AAACR,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BP2Device = void 0;
|
|
6
|
+
exports.BP2_ECG_MILLIVOLTS_PER_COUNT = exports.BP2Device = void 0;
|
|
7
7
|
var _core = require("@ovok/core");
|
|
8
8
|
var _BloodPressureStates = require("@ovok/core/dist/client/observation/types/measurement/BloodPressureStates");
|
|
9
9
|
var _bloodPressureTranslatedExceptionMap = require("../../../constants/blood-pressure-translated-exception-map.js");
|
|
@@ -13,23 +13,57 @@ var _i16FromHex = require("../../../utils/i-16-from-hex.js");
|
|
|
13
13
|
var _le16FromHex = require("../../../utils/le-16-from-hex.js");
|
|
14
14
|
var _le32FromHex = require("../../../utils/le-32-from-hex.js");
|
|
15
15
|
var _btManagedDevice = require("../bt-managed-device.js");
|
|
16
|
+
var _bp2Files = require("./bp2.files.js");
|
|
16
17
|
var _bp2FrameReader = require("./bp2.frame-reader.js");
|
|
18
|
+
var _bp2HistorySequencer = require("./bp2.history-sequencer.js");
|
|
17
19
|
var _bp2MainServices = require("./bp2.main-services.js");
|
|
20
|
+
/* eslint-disable max-lines */
|
|
21
|
+
|
|
18
22
|
/**
|
|
19
23
|
* Leaves a 244 byte payload, enough for an ECG waveform frame to arrive in far fewer
|
|
20
24
|
* notifications than the 23 byte default allows.
|
|
21
25
|
*/
|
|
22
26
|
const BP2_PREFERRED_MTU = 247;
|
|
27
|
+
|
|
28
|
+
/** BP2 ECG waveform resolution from the device protocol. */
|
|
29
|
+
const BP2_ECG_MILLIVOLTS_PER_COUNT = exports.BP2_ECG_MILLIVOLTS_PER_COUNT = 0.003098;
|
|
23
30
|
class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
24
31
|
collectedValues = [];
|
|
25
32
|
diagramPoints = [];
|
|
26
33
|
duration = 0;
|
|
34
|
+
historyMode = false;
|
|
35
|
+
historyRequested = false;
|
|
36
|
+
pendingResults = new Map();
|
|
37
|
+
reportedFileNames = new Set();
|
|
27
38
|
mainServices = _bp2MainServices.bp2MainServices;
|
|
28
39
|
stuckDataTimeout = 5_000;
|
|
29
40
|
onStreamStart = () => {
|
|
30
41
|
this.collectedValues = [];
|
|
31
42
|
this.diagramPoints = [];
|
|
32
43
|
this.duration = 0;
|
|
44
|
+
this.lastLiveResultSignature = undefined;
|
|
45
|
+
};
|
|
46
|
+
createCommandSequencer = () => {
|
|
47
|
+
this.historyMode = true;
|
|
48
|
+
this.historyRequested = false;
|
|
49
|
+
this.lastLiveResultSignature = undefined;
|
|
50
|
+
this.pendingResults.clear();
|
|
51
|
+
this.reportedFileNames.clear();
|
|
52
|
+
const service = _bp2MainServices.bp2MainServices[0];
|
|
53
|
+
const write = service.writeUuid;
|
|
54
|
+
return new _bp2HistorySequencer.BP2HistorySequencer({
|
|
55
|
+
write: {
|
|
56
|
+
serviceUuid: service.uuid,
|
|
57
|
+
characteristicUuid: write.uuid
|
|
58
|
+
},
|
|
59
|
+
onFile: this.handleHistoryFile,
|
|
60
|
+
onError: this.handleHistoryError,
|
|
61
|
+
onTransferFinished: this.reportPendingResults,
|
|
62
|
+
shouldStartTransfer: () => this.historyRequested,
|
|
63
|
+
onTransferRequested: () => {
|
|
64
|
+
this.historyRequested = false;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
33
67
|
};
|
|
34
68
|
frameReader = new _bp2FrameReader.BP2FrameReader();
|
|
35
69
|
preferredMtu = BP2_PREFERRED_MTU;
|
|
@@ -56,6 +90,10 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
56
90
|
this.onError?.(error);
|
|
57
91
|
return;
|
|
58
92
|
}
|
|
93
|
+
if (this.historyMode) {
|
|
94
|
+
this.queueHistoryResult(successResult);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
59
97
|
this.onResult?.(successResult);
|
|
60
98
|
return;
|
|
61
99
|
}
|
|
@@ -83,7 +121,7 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
83
121
|
for (let i = 0; i < samplingNum; i++) {
|
|
84
122
|
const byteIndexInData = samplesStart + i * 2;
|
|
85
123
|
const sampleVal = (0, _i16FromHex.i16FromHex)(data, byteIndexInData);
|
|
86
|
-
this.diagramPoints.push(sampleVal);
|
|
124
|
+
this.diagramPoints.push(sampleVal * BP2_ECG_MILLIVOLTS_PER_COUNT);
|
|
87
125
|
}
|
|
88
126
|
}
|
|
89
127
|
handleBloodPressureResult(successResult) {
|
|
@@ -95,6 +133,10 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
95
133
|
this.onError?.(error);
|
|
96
134
|
return;
|
|
97
135
|
}
|
|
136
|
+
if (this.historyMode) {
|
|
137
|
+
this.queueHistoryResult(successResult);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
98
140
|
this.onResult?.(successResult);
|
|
99
141
|
}
|
|
100
142
|
checkIfHasErrorForBloodPressure(successResult) {
|
|
@@ -121,6 +163,59 @@ class BP2Device extends _btManagedDevice.BTManagedDevice {
|
|
|
121
163
|
}
|
|
122
164
|
return undefined;
|
|
123
165
|
}
|
|
166
|
+
queueHistoryResult = result => {
|
|
167
|
+
const signature = this.signatureFor(result);
|
|
168
|
+
if (signature === this.lastLiveResultSignature) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.lastLiveResultSignature = signature;
|
|
172
|
+
this.pendingResults.set(result.measurementTypeKey, result);
|
|
173
|
+
this.historyRequested = true;
|
|
174
|
+
};
|
|
175
|
+
signatureFor = result => result.measurementTypeKey === _core.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("|");
|
|
176
|
+
handleHistoryFile = file => {
|
|
177
|
+
if (this.reportedFileNames.has(file.name)) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const decoded = (0, _bp2Files.decodeBP2File)(file.name, file.content);
|
|
181
|
+
if (!decoded) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const pending = this.pendingResults.get(decoded.measurementTypeKey);
|
|
185
|
+
if (!pending || !this.matchesPendingResult(pending, decoded)) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
this.reportedFileNames.add(file.name);
|
|
189
|
+
const result = {
|
|
190
|
+
...decoded,
|
|
191
|
+
caseType: _caseType.CaseType.RESULT
|
|
192
|
+
};
|
|
193
|
+
const error = result.measurementTypeKey === _core.MeasurementTypeKey.bloodPressure ? this.checkIfHasErrorForBloodPressure(result) : this.checkIfHasErrorForEcg(result);
|
|
194
|
+
if (error) {
|
|
195
|
+
this.onError?.(error);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
this.pendingResults.delete(result.measurementTypeKey);
|
|
199
|
+
this.onResult?.(result);
|
|
200
|
+
};
|
|
201
|
+
matchesPendingResult = (pending, decoded) => {
|
|
202
|
+
if (decoded.measurementTypeKey === _core.MeasurementTypeKey.bloodPressure) {
|
|
203
|
+
const pendingBloodPressure = pending;
|
|
204
|
+
const decodedBloodPressure = decoded;
|
|
205
|
+
return pendingBloodPressure.systolic === decodedBloodPressure.systolic && pendingBloodPressure.diastolic === decodedBloodPressure.diastolic && pendingBloodPressure.heartRate === decodedBloodPressure.heartRate && pendingBloodPressure.status === decodedBloodPressure.status;
|
|
206
|
+
}
|
|
207
|
+
const pendingEcg = pending;
|
|
208
|
+
const decodedEcg = decoded;
|
|
209
|
+
return pendingEcg.heartRate === decodedEcg.heartRate && pendingEcg.diagnosticResult === decodedEcg.diagnosticResult && pendingEcg.duration === decodedEcg.duration;
|
|
210
|
+
};
|
|
211
|
+
handleHistoryError = reason => {
|
|
212
|
+
this.onError?.(new Error(`BP2 history: ${reason}`));
|
|
213
|
+
this.reportPendingResults();
|
|
214
|
+
};
|
|
215
|
+
reportPendingResults = () => {
|
|
216
|
+
this.pendingResults.forEach(result => this.onResult?.(result));
|
|
217
|
+
this.pendingResults.clear();
|
|
218
|
+
};
|
|
124
219
|
checkIfHasErrorForEcg(successResult) {
|
|
125
220
|
const ecgMeasurement = successResult;
|
|
126
221
|
if (ecgMeasurement.diagnosticResult === _core.EcgDiagnosticFlag.POOR_WAVEFORM) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_BloodPressureStates","_bloodPressureTranslatedExceptionMap","_caseType","_hexToByte","_i16FromHex","_le16FromHex","_le32FromHex","_btManagedDevice","_bp2FrameReader","_bp2MainServices","BP2_PREFERRED_MTU","BP2Device","BTManagedDevice","collectedValues","diagramPoints","duration","mainServices","bp2MainServices","stuckDataTimeout","onStreamStart","frameReader","BP2FrameReader","preferredMtu","handleSuccessResult","successResult","measurementTypeKey","caseType","
|
|
1
|
+
{"version":3,"names":["_core","require","_BloodPressureStates","_bloodPressureTranslatedExceptionMap","_caseType","_hexToByte","_i16FromHex","_le16FromHex","_le32FromHex","_btManagedDevice","_bp2Files","_bp2FrameReader","_bp2HistorySequencer","_bp2MainServices","BP2_PREFERRED_MTU","BP2_ECG_MILLIVOLTS_PER_COUNT","exports","BP2Device","BTManagedDevice","collectedValues","diagramPoints","duration","historyMode","historyRequested","pendingResults","Map","reportedFileNames","Set","mainServices","bp2MainServices","stuckDataTimeout","onStreamStart","lastLiveResultSignature","undefined","createCommandSequencer","clear","service","write","writeUuid","BP2HistorySequencer","serviceUuid","uuid","characteristicUuid","onFile","handleHistoryFile","onError","handleHistoryError","onTransferFinished","reportPendingResults","shouldStartTransfer","onTransferRequested","frameReader","BP2FrameReader","preferredMtu","handleSuccessResult","successResult","measurementTypeKey","caseType","Error","MeasurementTypeKey","ecg","handleEcgResult","bloodPressure","handleBloodPressureResult","CaseType","RESULT","error","checkIfHasErrorForEcg","queueHistoryResult","onResult","handleEcgStream","lenL","hexToByte","lenH","dataLen","dataStart","dataEnd","data","slice","le32FromHex","samplingNum","le16FromHex","samplesStart","i","byteIndexInData","sampleVal","i16FromHex","push","checkIfHasErrorForBloodPressure","bpMeasurement","status","diastolic","systolic","heartRate","BloodPressureStates","REGULAR","errorString","bloodPressureTranslatedExceptionMap","get","DEVICE_ERROR","result","signature","signatureFor","set","join","diagnosticResult","file","has","name","decoded","decodeBP2File","content","pending","matchesPendingResult","add","delete","pendingBloodPressure","decodedBloodPressure","pendingEcg","decodedEcg","reason","forEach","ecgMeasurement","EcgDiagnosticFlag","POOR_WAVEFORM","LEAD_OFF","length"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bp2/bp2.device.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAOA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,oCAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAMA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AAEA,IAAAS,SAAA,GA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