@ovok/native 1.5.5 → 1.6.0
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 +27 -17
- package/app.plugin.js +104 -0
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- 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-rate-limit-cooldown.js +23 -0
- package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js +91 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +44 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +3 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +48 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +4 -0
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +6 -0
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +12 -0
- 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 +4 -0
- 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 +7 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +82 -0
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -0
- package/lib/commonjs/modules/auth/session/events.js +19 -0
- package/lib/commonjs/modules/auth/session/events.js.map +1 -0
- package/lib/commonjs/modules/auth/session/index.js +13 -0
- package/lib/commonjs/modules/auth/session/index.js.map +1 -0
- package/lib/commonjs/modules/auth/session/types/session-list-props.js +6 -0
- package/lib/commonjs/modules/auth/session/types/session-list-props.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +25 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js +58 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +13 -5
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/types/session.js +2 -0
- package/lib/commonjs/modules/auth/types/session.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/rate-limit.js +37 -0
- package/lib/commonjs/modules/auth/utils/rate-limit.js.map +1 -0
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/background-sync/background-safe-storage.js +79 -0
- package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -0
- package/lib/commonjs/modules/background-sync/index.js +11 -0
- package/lib/commonjs/modules/background-sync/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +123 -21
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +91 -0
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +47 -0
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +51 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +36 -0
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +46 -0
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +57 -0
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +26 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +49 -0
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +143 -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 +41 -4
- 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 -4
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +57 -0
- 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 +111 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
- package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js +9 -3
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +52 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/index.js +28 -0
- package/lib/commonjs/modules/bt-management/testing/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/recorded-frames.js +23 -0
- package/lib/commonjs/modules/bt-management/testing/recorded-frames.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +80 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-connection-event.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-connection-event.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/result-policy.js +6 -0
- package/lib/commonjs/modules/bt-management/types/result-policy.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +63 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -0
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +8 -2
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +23 -4
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +2 -2
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/retry-save.js +65 -0
- package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/index.js +12 -0
- package/lib/commonjs/modules/helpers/index.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/s-log.js +4 -13
- package/lib/commonjs/modules/helpers/utils/s-log.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js +28 -17
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/telemetry.js +143 -0
- package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -0
- package/lib/commonjs/modules/image/components/optimized-image.js +24 -2
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +18 -9
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +42 -17
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
- package/lib/commonjs/modules/tile/components/task-icon.js +2 -1
- package/lib/commonjs/modules/tile/components/task-icon.js.map +1 -1
- package/lib/commonjs/modules/ui/components/background-sync-setting.js +113 -0
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +105 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +165 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -0
- package/lib/commonjs/modules/ui/components/health-import-card.js +130 -0
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -0
- package/lib/commonjs/modules/ui/components/manual-entry-form.js +123 -0
- package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +222 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -0
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +99 -0
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
- package/lib/commonjs/modules/ui/components/urine-test-result.js +94 -0
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -0
- package/lib/commonjs/modules/ui/index.js +116 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -0
- package/lib/commonjs/modules/ui/types.js +6 -0
- package/lib/commonjs/modules/ui/types.js.map +1 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js +51 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- 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-rate-limit-cooldown.js +17 -0
- package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-session.js +85 -0
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -0
- package/lib/module/modules/auth/index.js +4 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +3 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/inputs.js +48 -1
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +4 -0
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-form-provider.js +6 -0
- package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +12 -0
- 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 +4 -0
- 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 +7 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +76 -0
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -0
- package/lib/module/modules/auth/session/events.js +13 -0
- package/lib/module/modules/auth/session/events.js.map +1 -0
- package/lib/module/modules/auth/session/index.js +4 -0
- package/lib/module/modules/auth/session/index.js.map +1 -0
- package/lib/module/modules/auth/session/types/session-list-props.js +4 -0
- package/lib/module/modules/auth/session/types/session-list-props.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/form/inputs.js +25 -0
- package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
- package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js +52 -0
- package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
- package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +13 -5
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/types/session.js +2 -0
- package/lib/module/modules/auth/types/session.js.map +1 -0
- package/lib/module/modules/auth/utils/rate-limit.js +31 -0
- package/lib/module/modules/auth/utils/rate-limit.js.map +1 -0
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/background-sync/background-safe-storage.js +74 -0
- package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -0
- package/lib/module/modules/background-sync/index.js +1 -0
- package/lib/module/modules/background-sync/index.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +123 -21
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +82 -0
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-background-sync.js +41 -0
- package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +45 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-device-connection.js +30 -0
- package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-health-import.js +40 -0
- package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-measurements.js +51 -0
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +20 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +43 -0
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +13 -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 +41 -4
- 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 -4
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +57 -0
- 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 +111 -3
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
- package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js +9 -3
- package/lib/module/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js +48 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
- package/lib/module/modules/bt-management/testing/index.js +5 -0
- package/lib/module/modules/bt-management/testing/index.js.map +1 -0
- package/lib/module/modules/bt-management/testing/recorded-frames.js +17 -0
- package/lib/module/modules/bt-management/testing/recorded-frames.js.map +1 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js +74 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-connection-event.js +4 -0
- package/lib/module/modules/bt-management/types/device-connection-event.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/result-policy.js +4 -0
- package/lib/module/modules/bt-management/types/result-policy.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +57 -0
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -0
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +8 -2
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +23 -4
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +2 -2
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/module/modules/data-sync/utils/retry-save.js +60 -0
- package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -0
- package/lib/module/modules/helpers/form-items/form-field.js +2 -0
- package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/module/modules/helpers/index.js +1 -0
- package/lib/module/modules/helpers/index.js.map +1 -1
- package/lib/module/modules/helpers/utils/s-log.js +4 -12
- package/lib/module/modules/helpers/utils/s-log.js.map +1 -1
- package/lib/module/modules/helpers/utils/sentry-logger.js +26 -14
- package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/module/modules/helpers/utils/telemetry.js +131 -0
- package/lib/module/modules/helpers/utils/telemetry.js.map +1 -0
- package/lib/module/modules/image/components/optimized-image.js +25 -3
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +20 -11
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +42 -17
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
- package/lib/module/modules/tile/components/task-icon.js +2 -1
- package/lib/module/modules/tile/components/task-icon.js.map +1 -1
- package/lib/module/modules/ui/components/background-sync-setting.js +107 -0
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +99 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js +159 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -0
- package/lib/module/modules/ui/components/health-import-card.js +124 -0
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -0
- package/lib/module/modules/ui/components/manual-entry-form.js +117 -0
- package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +216 -0
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -0
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +93 -0
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
- package/lib/module/modules/ui/components/urine-test-result.js +89 -0
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -0
- package/lib/module/modules/ui/index.js +13 -0
- package/lib/module/modules/ui/index.js.map +1 -0
- package/lib/module/modules/ui/types.js +4 -0
- package/lib/module/modules/ui/types.js.map +1 -0
- package/lib/module/modules/ui/use-ovok-ui.js +45 -0
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- 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-rate-limit-cooldown.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +4 -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.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/form/register-form-provider.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.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
- 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/login-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.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/sign-in.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/index.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/hooks/runtime-context.d.ts +46 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +13 -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 +22 -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/bt-connection-handler.d.ts +4 -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 +9 -1
- 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/measurement-state-machine.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +3 -1
- 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 +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
- 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/create-device-params.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts +5 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
- 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/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/s-log.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts +7 -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 +68 -0
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.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/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/components/task-icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- 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-rate-limit-cooldown.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +16 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +4 -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.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/form/register-form-provider.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.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/events.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/session/events.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/session/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
- 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/login-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.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/sign-in.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts +11 -0
- package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +29 -0
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/background-sync/index.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/hooks/runtime-context.d.ts +46 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +13 -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 +22 -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/bt-connection-handler.d.ts +4 -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 +9 -1
- 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/measurement-state-machine.d.ts +3 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +3 -1
- 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 +23 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
- 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/create-device-params.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts +5 -2
- package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
- 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/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +5 -0
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +4 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/s-log.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts +7 -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 +68 -0
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts +4 -0
- package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.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/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/components/task-icon.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +9 -0
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +13 -0
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +20 -0
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +15 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts +10 -0
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts +11 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/types.d.ts +24 -0
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts +7 -0
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
- package/package.json +145 -6
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
/* eslint-disable max-lines */
|
|
4
4
|
|
|
5
5
|
import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
|
|
6
|
+
import { addOvokSpanEvent, recordOvokMetric } from "../../../helpers/utils/telemetry.js";
|
|
7
|
+
import { BluetoothError, toBluetoothError } from "../../types/bluetooth-error.js";
|
|
6
8
|
import { DeviceStatus } from "../../types/device-status.js";
|
|
9
|
+
import { createStableResultId } from "../../utils/result-identity.js";
|
|
7
10
|
import { summariseMeasurementForLog } from "../../utils/summarise-measurement-for-log.js";
|
|
8
11
|
import { supportedMeasurementTypeKeys } from "../../utils/supported-measurement-type-keys.js";
|
|
9
12
|
import { BTConnectionHandler } from "./bt-connection-handler.js";
|
|
@@ -11,6 +14,9 @@ import { BTDataProcessor } from "./bt-data-processor.js";
|
|
|
11
14
|
import { pollingSequencerFor } from "./polling-command-sequencer.js";
|
|
12
15
|
export class BTManagedDevice {
|
|
13
16
|
resultReportedThisConnection = false;
|
|
17
|
+
reportedMeasurementKinds = new Set();
|
|
18
|
+
reportedDailyTotals = new Set();
|
|
19
|
+
historyResultCount = 0;
|
|
14
20
|
|
|
15
21
|
/**
|
|
16
22
|
* The timeout in milliseconds for the stuck data.
|
|
@@ -63,11 +69,14 @@ export class BTManagedDevice {
|
|
|
63
69
|
onError: onErrorCallback,
|
|
64
70
|
onDeviceStatusChanged: onDeviceStatusChangedCallback,
|
|
65
71
|
onResult: onResultCallback,
|
|
72
|
+
onConnectionEvent: onConnectionEventCallback,
|
|
66
73
|
onDeviceDisconnected: onDeviceDisconnectedCallback,
|
|
67
|
-
oneReadingPerConnection
|
|
74
|
+
oneReadingPerConnection,
|
|
75
|
+
resultPolicy
|
|
68
76
|
}) {
|
|
69
77
|
this.device = device;
|
|
70
78
|
this.oneReadingPerConnection = oneReadingPerConnection === true;
|
|
79
|
+
this.resultPolicy = resultPolicy;
|
|
71
80
|
sentryLogger("info", "BT_MANAGER: Creating BTManagedDevice", {
|
|
72
81
|
deviceId: device.id,
|
|
73
82
|
deviceName: deviceName
|
|
@@ -89,6 +98,12 @@ export class BTManagedDevice {
|
|
|
89
98
|
deviceData: this.deviceData,
|
|
90
99
|
deviceName: this.deviceData.name
|
|
91
100
|
});
|
|
101
|
+
addOvokSpanEvent("device.status_changed", {
|
|
102
|
+
deviceId: this.deviceData.id,
|
|
103
|
+
model: this.deviceData.name,
|
|
104
|
+
status,
|
|
105
|
+
measurementTypeKey: measurementTypeKey ?? "unknown"
|
|
106
|
+
});
|
|
92
107
|
onDeviceStatusChangedCallback?.({
|
|
93
108
|
deviceData: this.deviceData,
|
|
94
109
|
status: status,
|
|
@@ -101,9 +116,21 @@ export class BTManagedDevice {
|
|
|
101
116
|
deviceData: this.deviceData,
|
|
102
117
|
deviceName: this.deviceData.name
|
|
103
118
|
});
|
|
119
|
+
const normalized = toBluetoothError(error);
|
|
120
|
+
if (error && (typeof error === "object" || typeof error === "function")) {
|
|
121
|
+
try {
|
|
122
|
+
Object.defineProperty(error, "ovokCode", {
|
|
123
|
+
value: normalized.code,
|
|
124
|
+
configurable: true,
|
|
125
|
+
enumerable: false
|
|
126
|
+
});
|
|
127
|
+
} catch {
|
|
128
|
+
// Some native error objects are frozen; the original error is still delivered.
|
|
129
|
+
}
|
|
130
|
+
}
|
|
104
131
|
onErrorCallback?.({
|
|
105
132
|
deviceData: this.deviceData,
|
|
106
|
-
error: error
|
|
133
|
+
error: error instanceof BluetoothError ? normalized : error
|
|
107
134
|
});
|
|
108
135
|
};
|
|
109
136
|
this.onResult = ({
|
|
@@ -113,18 +140,73 @@ export class BTManagedDevice {
|
|
|
113
140
|
if (this.oneReadingPerConnection && this.resultReportedThisConnection) {
|
|
114
141
|
return;
|
|
115
142
|
}
|
|
143
|
+
const measurementTypeKey = data.measurementTypeKey;
|
|
144
|
+
const policy = this.resultPolicy?.byMeasurement?.[measurementTypeKey] ?? this.resultPolicy?.default ?? "all";
|
|
145
|
+
if (policy === "first-reading-per-kind-per-connection") {
|
|
146
|
+
if (this.reportedMeasurementKinds.has(measurementTypeKey)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.reportedMeasurementKinds.add(measurementTypeKey);
|
|
150
|
+
}
|
|
151
|
+
if (policy === "daily-totals-only") {
|
|
152
|
+
const temporal = data;
|
|
153
|
+
const end = temporal.end instanceof Date ? temporal.end : undefined;
|
|
154
|
+
const now = new Date();
|
|
155
|
+
|
|
156
|
+
// Activity totals are useful only after their day has closed. Devices that
|
|
157
|
+
// do not expose an interval are not filtered by this policy.
|
|
158
|
+
if (end && end.getTime() > now.getTime()) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const day = temporal.end ?? temporal.start ?? temporal.recordedAt;
|
|
162
|
+
if (day instanceof Date) {
|
|
163
|
+
const key = `${measurementTypeKey}:${day.toISOString().slice(0, 10)}`;
|
|
164
|
+
if (this.reportedDailyTotals.has(key)) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
this.reportedDailyTotals.add(key);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
116
170
|
this.resultReportedThisConnection = true;
|
|
171
|
+
this.historyResultCount += 1;
|
|
172
|
+
recordOvokMetric("ovok.readings.received", 1, {
|
|
173
|
+
deviceId: this.deviceData.id,
|
|
174
|
+
model: this.deviceData.name,
|
|
175
|
+
measurementTypeKey
|
|
176
|
+
});
|
|
177
|
+
addOvokSpanEvent("reading.received", {
|
|
178
|
+
deviceId: this.deviceData.id,
|
|
179
|
+
model: this.deviceData.name,
|
|
180
|
+
measurementTypeKey
|
|
181
|
+
});
|
|
117
182
|
sentryLogger("info", "BT_MANAGER: Calling onResult callback", {
|
|
118
183
|
data: summariseMeasurementForLog(data),
|
|
119
184
|
deviceData: this.deviceData,
|
|
120
185
|
deviceName: this.deviceData.name
|
|
121
186
|
});
|
|
122
|
-
|
|
187
|
+
onConnectionEventCallback?.({
|
|
188
|
+
deviceData: this.deviceData,
|
|
189
|
+
kind: "history-download",
|
|
190
|
+
progress: {
|
|
191
|
+
current: this.historyResultCount
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
const result = {
|
|
123
195
|
deviceData: this.deviceData,
|
|
124
196
|
data
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// Keep the new identity available to consumers while preserving the enumerable
|
|
200
|
+
// callback shape used by 1.5 integrations. Queue adapters materialize it below.
|
|
201
|
+
Object.defineProperty(result, "id", {
|
|
202
|
+
value: createStableResultId(this.deviceData, data),
|
|
203
|
+
enumerable: false,
|
|
204
|
+
writable: false
|
|
125
205
|
});
|
|
206
|
+
onResultCallback?.(result);
|
|
126
207
|
};
|
|
127
208
|
this.onDeviceDisconnected = onDeviceDisconnectedCallback;
|
|
209
|
+
this.onConnectionEvent = onConnectionEventCallback;
|
|
128
210
|
}
|
|
129
211
|
destroy = () => {
|
|
130
212
|
sentryLogger("info", "BT_MANAGER: Destroying device", {
|
|
@@ -136,9 +218,25 @@ export class BTManagedDevice {
|
|
|
136
218
|
this.onError = undefined;
|
|
137
219
|
this.onDeviceStatusChanged = undefined;
|
|
138
220
|
this.onResult = undefined;
|
|
221
|
+
this.onConnectionEvent = undefined;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/** Stops this device's subscriptions and closes its BLE connection. */
|
|
225
|
+
disconnect = async () => {
|
|
226
|
+
this.destroy();
|
|
227
|
+
try {
|
|
228
|
+
await this.device.cancelConnection();
|
|
229
|
+
} catch (error) {
|
|
230
|
+
sentryLogger("info", "BT_MANAGER: Device was already disconnected", {
|
|
231
|
+
deviceId: this.device.id,
|
|
232
|
+
error: error instanceof Error ? error.message : String(error)
|
|
233
|
+
});
|
|
234
|
+
}
|
|
139
235
|
};
|
|
140
236
|
connect = async () => {
|
|
141
237
|
this.resultReportedThisConnection = false;
|
|
238
|
+
this.reportedMeasurementKinds.clear();
|
|
239
|
+
this.historyResultCount = 0;
|
|
142
240
|
|
|
143
241
|
// To access the abstract property in the constructor, we need to set it here
|
|
144
242
|
this.deviceData.measurementTypes = supportedMeasurementTypeKeys(this.mainServices);
|
|
@@ -146,12 +244,22 @@ export class BTManagedDevice {
|
|
|
146
244
|
this.connectionHandler = new BTConnectionHandler(this.device, this.mainServices, {
|
|
147
245
|
onStatusChanged: status => {
|
|
148
246
|
this.onDeviceStatusChanged?.bind(this)(status);
|
|
247
|
+
if (status === DeviceStatus.CONNECTED) {
|
|
248
|
+
this.onConnectionEvent?.({
|
|
249
|
+
deviceData: this.deviceData,
|
|
250
|
+
kind: "bonded"
|
|
251
|
+
});
|
|
252
|
+
}
|
|
149
253
|
if (status === DeviceStatus.DISCONNECTED) {
|
|
150
254
|
this.onDeviceDisconnected?.();
|
|
151
255
|
this.destroy();
|
|
152
256
|
}
|
|
153
257
|
},
|
|
154
258
|
onError: error => this.onError?.bind(this)(error),
|
|
259
|
+
onConnectionEvent: event => this.onConnectionEvent?.({
|
|
260
|
+
deviceData: this.deviceData,
|
|
261
|
+
...event
|
|
262
|
+
}),
|
|
155
263
|
onDataReceived: (uuid, hexValue) => {
|
|
156
264
|
this.dataProcessor?.processData(uuid, hexValue);
|
|
157
265
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sentryLogger","DeviceStatus","summariseMeasurementForLog","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","resultReportedThisConnection","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","deviceId","id","deviceData","name","localName","manufacturerData","sn","measurementTypes","status","measurementTypeKey","error","Error","message","caseType","_","data","destroy","connectionHandler","dataProcessor","undefined","connect","mainServices","sequencer","createCommandSequencer","onStatusChanged","bind","DISCONNECTED","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","model","serialNumber","initialCommands","onCommandSent","armStuckTimeout","isNormalDisconnect","preferredMtu","stuckDataTimeout","onStreamStart","validatePackage","parsedData","collectedValues","handleSuccessResult","nextCommand","frame","sendCommands","commands","handleDependentResult","frameReader"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;AAAA;;AAKA,SAASA,YAAY,QAAQ,yCAAsC;AAOnE,SAASC,YAAY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AEA,CAACiD,UAAU,EAAEC,eAAe,KAAK;QACzC,IAAI;UACF,OAAO,IAAI,CAACC,mBAAmB,CAACrB,IAAI,CAAC,IAAI,CAAC,CACxCmB,UAAU,EACVC,eACF,CAAC;QACH,CAAC,CAAC,OAAOnC,KAAK,EAAE;UACd,IAAI,CAACnB,OAAO,EAAEkC,IAAI,CAAC,IAAI,CAAC,CAACf,KAAyB,CAAC;QACrD;MACF,CAAC;MACDqC,WAAW,EAAGC,KAAK,IAAK1B,SAAS,CAACyB,WAAW,CAACC,KAAK,CAAC;MACpDC,YAAY,EAAGC,QAAQ,IACrB,KAAK,IAAI,CAACjC,iBAAiB,EAAEgC,YAAY,CAACC,QAAQ,CAAC;MACrD3D,OAAO,EAAE,IAAI,CAACA,OAAO,EAAEkC,IAAI,CAAC,IAAI,CAAC;MACjC0B,qBAAqB,EAAE,IAAI,CAACA,qBAAqB,EAAE1B,IAAI,CAAC,IAAI;IAC9D,CAAC,EACD,IAAI,CAAC2B,WACP,CAAC;IAED,MAAM,IAAI,CAACnC,iBAAiB,CAACG,OAAO,CAAC,CAAC;EACxC,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["sentryLogger","addOvokSpanEvent","recordOvokMetric","BluetoothError","toBluetoothError","DeviceStatus","createStableResultId","summariseMeasurementForLog","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","resultReportedThisConnection","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResult","onResultCallback","onConnectionEvent","onConnectionEventCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","resultPolicy","deviceId","id","deviceData","name","localName","manufacturerData","sn","measurementTypes","status","measurementTypeKey","model","error","Error","message","normalized","Object","defineProperty","value","code","configurable","enumerable","caseType","_","data","policy","byMeasurement","default","has","add","temporal","end","Date","undefined","now","getTime","day","start","recordedAt","key","toISOString","slice","kind","progress","current","result","writable","destroy","connectionHandler","dataProcessor","disconnect","cancelConnection","String","connect","clear","mainServices","sequencer","createCommandSequencer","onStatusChanged","bind","CONNECTED","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","initialCommands","onCommandSent","armStuckTimeout","isNormalDisconnect","preferredMtu","stuckDataTimeout","onStreamStart","validatePackage","parsedData","collectedValues","handleSuccessResult","nextCommand","frame","sendCommands","commands","handleDependentResult","frameReader"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;AAAA;;AAKA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,qCAAkC;AACrF,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,gCAA6B;AAQ9E,SAASC,YAAY,QAAQ,8BAA2B;AAOxD,SAASC,oBAAoB,QAAQ,gCAA6B;AAClE,SAASC,0BAA0B,QAAQ,8CAA2C;AACtF,SAASC,4BAA4B,QAAQ,gDAA6C;AAE1F,SAASC,mBAAmB,QAAQ,4BAAyB;AAC7D,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,mBAAmB,QAAQ,gCAA6B;AAEjE,OAAO,MAAeC,eAAe,CAErC;EASUC,4BAA4B,GAAG,KAAK;EACpCC,wBAAwB,GAAG,IAAIC,GAAG,CAAqB,CAAC;EACxDC,mBAAmB,GAAG,IAAID,GAAG,CAAS,CAAC;EACvCE,kBAAkB,GAAG,CAAC;;EAG9B;AACF;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAOE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAkBEC,WAAWA,CACOC,MAAc,EAE9B;IACEC,UAAU;IACVC,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CAACK,OAAO,CAAC,CAAC;EACxC,CAAC;AACH","ignoreList":[]}
|
|
@@ -8,8 +8,8 @@ import { DeviceStatus } from "../../types/device-status.js";
|
|
|
8
8
|
*
|
|
9
9
|
* A result is reported whether or not a stream preceded it, because a device already
|
|
10
10
|
* holding a finished measurement when the app connects has a real reading to hand over.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Identical result frames are suppressed, while a changed frame in the same case is still
|
|
12
|
+
* reported as a new measurement.
|
|
13
13
|
*/
|
|
14
14
|
export class MeasurementStateMachine {
|
|
15
15
|
isMeasuring = false;
|
|
@@ -19,6 +19,7 @@ export class MeasurementStateMachine {
|
|
|
19
19
|
reset = () => {
|
|
20
20
|
this.isMeasuring = false;
|
|
21
21
|
this.lastCaseValue = undefined;
|
|
22
|
+
this.lastFrame = undefined;
|
|
22
23
|
};
|
|
23
24
|
advance = ({
|
|
24
25
|
parsingCase,
|
|
@@ -26,8 +27,9 @@ export class MeasurementStateMachine {
|
|
|
26
27
|
parsedData
|
|
27
28
|
}, frame) => {
|
|
28
29
|
const isResult = parsingCase.caseType === CaseType.RESULT;
|
|
29
|
-
const isRepeatedResult = isResult && parsingCase.caseValue === this.lastCaseValue;
|
|
30
|
+
const isRepeatedResult = isResult && parsingCase.caseValue === this.lastCaseValue && this.lastFrame?.join("").toLowerCase() === frame.join("").toLowerCase();
|
|
30
31
|
this.lastCaseValue = parsingCase.caseValue;
|
|
32
|
+
this.lastFrame = [...frame];
|
|
31
33
|
if (parsingCase.caseType === CaseType.STREAM && !this.isMeasuring) {
|
|
32
34
|
this.startMeasuring(measurementTypeKey);
|
|
33
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CaseType","DeviceStatus","MeasurementStateMachine","isMeasuring","constructor","callbacks","reset","lastCaseValue","undefined","advance","parsingCase","measurementTypeKey","parsedData","frame","isResult","caseType","RESULT","isRepeatedResult","caseValue","STREAM","startMeasuring","OTHER","stopMeasuring","keepMeasuring","onResult","onStreamStart","onStatusChanged","MEASURING","CONNECTED"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/measurement-state-machine.ts"],"mappings":";;AAEA,SAASA,QAAQ,QAAQ,0BAAuB;AAEhD,SAASC,YAAY,QAAQ,8BAA2B;AAexD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,CAAwB;EAClDC,WAAW,GAAY,KAAK;
|
|
1
|
+
{"version":3,"names":["CaseType","DeviceStatus","MeasurementStateMachine","isMeasuring","constructor","callbacks","reset","lastCaseValue","undefined","lastFrame","advance","parsingCase","measurementTypeKey","parsedData","frame","isResult","caseType","RESULT","isRepeatedResult","caseValue","join","toLowerCase","STREAM","startMeasuring","OTHER","stopMeasuring","keepMeasuring","onResult","onStreamStart","onStatusChanged","MEASURING","CONNECTED"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/measurement-state-machine.ts"],"mappings":";;AAEA,SAASA,QAAQ,QAAQ,0BAAuB;AAEhD,SAASC,YAAY,QAAQ,8BAA2B;AAexD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,CAAwB;EAClDC,WAAW,GAAY,KAAK;EAIpCC,WAAWA,CAAkBC,SAAoC,EAAE;IAAA,KAAtCA,SAAoC,GAApCA,SAAoC;EAAG;EAE7DC,KAAK,GAAGA,CAAA,KAAY;IACzB,IAAI,CAACH,WAAW,GAAG,KAAK;IACxB,IAAI,CAACI,aAAa,GAAGC,SAAS;IAC9B,IAAI,CAACC,SAAS,GAAGD,SAAS;EAC5B,CAAC;EAEME,OAAO,GAAGA,CACf;IACEC,WAAW;IACXC,kBAAkB;IAClBC;EAC+B,CAAC,EAClCC,KAAe,KACN;IACT,MAAMC,QAAQ,GAAGJ,WAAW,CAACK,QAAQ,KAAKhB,QAAQ,CAACiB,MAAM;IAEzD,MAAMC,gBAAgB,GACpBH,QAAQ,IACRJ,WAAW,CAACQ,S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AAS,CAACwB,eAAe,GAC5B5B,YAAY,CAAC8B,SAAS,EACtBnB,kBACF,CAAC;EACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -9,6 +9,18 @@ export const spo2MainServices = [{
|
|
|
9
9
|
parsingModel: {
|
|
10
10
|
caseValuePosition: [0, 2, 3, 4],
|
|
11
11
|
cases: [{
|
|
12
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
13
|
+
caseType: CaseType.STREAM,
|
|
14
|
+
caseValue: "aa0f0621",
|
|
15
|
+
parseDefinitions: [],
|
|
16
|
+
description: "OxySmart measurement status"
|
|
17
|
+
}, {
|
|
18
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
19
|
+
caseType: CaseType.STREAM,
|
|
20
|
+
caseValue: "aaf003??",
|
|
21
|
+
parseDefinitions: [],
|
|
22
|
+
description: "OxySmart measurement status"
|
|
23
|
+
}, {
|
|
12
24
|
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
|
|
13
25
|
caseType: CaseType.STREAM,
|
|
14
26
|
caseValue: "aa0f0702",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","spo2MainServices","uuid","monitorUuids","parsingModel","caseValuePosition","cases","measurementTypeKey","bloodOxygenPulseRate","caseType","STREAM","caseValue","parseDefinitions","RESULT","name","parseType","byteIndexes","parseReference"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/spo2.main-services.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAGnD,OAAO,MAAMC,gBAA4B,GAAG,CAC1C;EACEC,IAAI,EAAE,sCAAsC;EAC5CC,YAAY,EAAE,CACZ;IACED,IAAI,EAAE,sCAAsC;IAC5CE,YAAY,EAAE;MACZC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;MAC/BC,KAAK,EAAE,CACL;QACEC,kBAAkB,EAAER,kBAAkB,CAACS,oBAAoB;QAC3DC,QAAQ,EAAET,QAAQ,CAACU,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE;MACpB,CAAC,EAED;QACEL,kBAAkB,EAAER,kBAAkB,CAACS,oBAAoB;QAC3DC,QAAQ,EAAET,QAAQ,
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","spo2MainServices","uuid","monitorUuids","parsingModel","caseValuePosition","cases","measurementTypeKey","bloodOxygenPulseRate","caseType","STREAM","caseValue","parseDefinitions","description","RESULT","name","parseType","byteIndexes","parseReference"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/spo2.main-services.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAGnD,OAAO,MAAMC,gBAA4B,GAAG,CAC1C;EACEC,IAAI,EAAE,sCAAsC;EAC5CC,YAAY,EAAE,CACZ;IACED,IAAI,EAAE,sCAAsC;IAC5CE,YAAY,EAAE;MACZC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;MAC/BC,KAAK,EAAE,CACL;QACEC,kBAAkB,EAAER,kBAAkB,CAACS,oBAAoB;QAC3DC,QAAQ,EAAET,QAAQ,CAACU,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,EAAE;QACpBC,WAAW,EAAE;MACf,CAAC,EAED;QACEN,kBAAkB,EAAER,kBAAkB,CAACS,oBAAoB;QAC3DC,QAAQ,EAAET,QAAQ,CAACU,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,EAAE;QACpBC,WAAW,EAAE;MACf,CAAC,EAED;QACEN,kBAAkB,EAAER,kBAAkB,CAACS,oBAAoB;QAC3DC,QAAQ,EAAET,QAAQ,CAACU,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE;MACpB,CAAC,EAED;QACEL,kBAAkB,EAAER,kBAAkB,CAACS,oBAAoB;QAC3DC,QAAQ,EAAET,QAAQ,CAACc,MAAM;QACzBH,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,CAChB;UACEG,IAAI,EAAE,aAAa;UACnBC,SAAS,EAAE,QAAQ;UACnBC,WAAW,EAAE,CAAC,CAAC,CAAC;UAChBC,cAAc,EAAE;QAClB,CAAC,EACD;UACEH,IAAI,EAAE,WAAW;UACjBC,SAAS,EAAE,QAAQ;UACnBC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UACnBC,cAAc,EAAE;QAClB,CAAC;MAEL,CAAC;IAEL;EACF,CAAC;AAEL,CAAC,CACF","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js
CHANGED
|
@@ -141,13 +141,17 @@ class VerovalActivitySequencer {
|
|
|
141
141
|
if (stepCount <= 0) {
|
|
142
142
|
continue;
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const year = 2000 + record[0];
|
|
145
|
+
const month = (record[1] ?? 1) - 1;
|
|
146
|
+
const day = record[2] ?? 1;
|
|
147
|
+
const recordedAt = new Date(year, month, day);
|
|
148
|
+
const nextMidnight = new Date(year, month, day + 1);
|
|
145
149
|
this.params.onResult({
|
|
146
150
|
measurementTypeKey: MeasurementTypeKey.stepCount,
|
|
147
151
|
caseType: CaseType.RESULT,
|
|
148
152
|
stepCount,
|
|
149
153
|
start: recordedAt,
|
|
150
|
-
end:
|
|
154
|
+
end: nextMidnight
|
|
151
155
|
});
|
|
152
156
|
}
|
|
153
157
|
};
|
|
@@ -182,7 +186,9 @@ class VerovalActivitySequencer {
|
|
|
182
186
|
this.params.onResult({
|
|
183
187
|
measurementTypeKey: MeasurementTypeKey.heartRate,
|
|
184
188
|
caseType: CaseType.RESULT,
|
|
185
|
-
heartRate
|
|
189
|
+
heartRate,
|
|
190
|
+
start,
|
|
191
|
+
end
|
|
186
192
|
});
|
|
187
193
|
}
|
|
188
194
|
minute += 1;
|
package/lib/module/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","SERVICE","WRITE","TOKEN","BOND","GET_MINUTE","GET_DAILY","TERMINATOR","MAX_MINUTES","bytes","frame","map","hex","value","toString","padStart","command","write","values","encrypted","key","index","Math","floor","bit","bits","from","to","result","uint32","isTerminator","length","every","VerovalActivitySequencer","phase","summary","daily","minute","dailyCount","minuteCount","chunkCount","constructor","params","initialCommands","n","random","checksum","nextCommand","undefined","response","stop","serviceUuid","characteristicUuid","finishReply","appendChunk","raw","decrypted","slice","push","parseSummary","startMinuteReply","parseDaily","parseMinute","year","month","day","latestAt","Date","UTC","max","min","recordBytes","offset","record","stepCount","recordedAt","onResult","measurementTypeKey","caseType","RESULT","start","end","
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","SERVICE","WRITE","TOKEN","BOND","GET_MINUTE","GET_DAILY","TERMINATOR","MAX_MINUTES","bytes","frame","map","hex","value","toString","padStart","command","write","values","encrypted","key","index","Math","floor","bit","bits","from","to","result","uint32","isTerminator","length","every","VerovalActivitySequencer","phase","summary","daily","minute","dailyCount","minuteCount","chunkCount","constructor","params","initialCommands","n","random","checksum","nextCommand","undefined","response","stop","serviceUuid","characteristicUuid","finishReply","appendChunk","raw","decrypted","slice","push","parseSummary","startMinuteReply","parseDaily","parseMinute","year","month","day","latestAt","Date","UTC","max","min","recordBytes","offset","record","stepCount","recordedAt","nextMidnight","onResult","measurementTypeKey","caseType","RESULT","start","end","heartRate","getTime","reason","onError","VEROVAL_ACTIVITY_SERVICE","VEROVAL_ACTIVITY_WRITE"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval-activity-sequencer.ts"],"mappings":";;AAA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+1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { State } from "react-native-ble-plx";
|
|
6
|
+
|
|
7
|
+
/** A deterministic BLE manager for hook and scan integration tests. No hardware is used. */
|
|
8
|
+
|
|
9
|
+
export const createFakeBleManager = ({
|
|
10
|
+
state = State.PoweredOn,
|
|
11
|
+
devices = []
|
|
12
|
+
} = {}) => {
|
|
13
|
+
let currentState = state;
|
|
14
|
+
let scanCallback;
|
|
15
|
+
const stateCallbacks = new Set();
|
|
16
|
+
let scannedServiceUUIDs = null;
|
|
17
|
+
const manager = {
|
|
18
|
+
onStateChange: (callback, emitCurrentState) => {
|
|
19
|
+
stateCallbacks.add(callback);
|
|
20
|
+
if (emitCurrentState) {
|
|
21
|
+
callback(currentState);
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
remove: () => stateCallbacks.delete(callback)
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
startDeviceScan: (serviceUUIDs, _options, callback) => {
|
|
28
|
+
scannedServiceUUIDs = serviceUUIDs;
|
|
29
|
+
scanCallback = callback;
|
|
30
|
+
devices.forEach(device => callback(null, device));
|
|
31
|
+
},
|
|
32
|
+
stopDeviceScan: () => {
|
|
33
|
+
scanCallback = undefined;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
manager,
|
|
38
|
+
emitDevice: device => scanCallback?.(null, device),
|
|
39
|
+
emitError: error => scanCallback?.(error, null),
|
|
40
|
+
setState: nextState => {
|
|
41
|
+
currentState = nextState;
|
|
42
|
+
stateCallbacks.forEach(callback => callback(nextState));
|
|
43
|
+
},
|
|
44
|
+
getScannedServiceUUIDs: () => scannedServiceUUIDs,
|
|
45
|
+
stopDeviceScan: () => manager.stopDeviceScan()
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=fake-ble-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["State","createFakeBleManager","state","PoweredOn","devices","currentState","scanCallback","stateCallbacks","Set","scannedServiceUUIDs","manager","onStateChange","callback","emitCurrentState","add","remove","delete","startDeviceScan","serviceUUIDs","_options","forEach","device","stopDeviceScan","undefined","emitDevice","emitError","error","setState","nextState","getScannedServiceUUIDs"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/fake-ble-manager.ts"],"mappings":";;AAAA;;AAEA,SAA6BA,KAAK,QAAsB,sBAAsB;;AAO9E;;AAUA,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,GAAGF,KAAK,CAACG,SAAS;EACvBC,OAAO,GAAG;AACW,CAAC,GAAG,CAAC,CAAC,KAAqB;EAChD,IAAIC,YAAY,GAAGH,KAAK;EACxB,IAAII,YAES;EACb,MAAMC,cAAc,GAAG,IAAIC,GAAG,CAA6B,CAAC;EAC5D,IAAIC,mBAA6C,GAAG,IAAI;EAExD,MAAMC,OAAO,GAAG;IACdC,aAAa,EAAEA,CAACC,QAAoC,EAAEC,gBAA0B,KAAK;MACnFN,cAAc,CAACO,GAAG,CAACF,QAAQ,CAAC;MAC5B,IAAIC,gBAAgB,EAAE;QACpBD,QAAQ,CAACP,YAAY,CAAC;MACxB;MAEA,OAAO;QACLU,MAAM,EAAEA,CAAA,KAAMR,cAAc,CAACS,MAAM,CAACJ,QAAQ;MAC9C,CAAC;IACH,CAAC;IACDK,eAAe,EAAEA,CACfC,YAAsC,EACtCC,QAAiB,EACjBP,QAAsD,KACnD;MACHH,mBAAmB,GAAGS,YAAY;MAClCZ,YAAY,GAAGM,QAAQ;MACvBR,OAAO,CAACgB,OAAO,CAAEC,MAAM,IAAKT,QAAQ,CAAC,IAAI,EAAES,MAAM,CAAC,CAAC;IACrD,CAAC;IACDC,cAAc,EAAEA,CAAA,KAAM;MACpBhB,YAAY,GAAGiB,SAAS;IAC1B;EACF,CAA0B;EAE1B,OAAO;IACLb,OAAO;IACPc,UAAU,EAAGH,MAAM,IAAKf,YAAY,GAAG,IAAI,EAAEe,MAAM,CAAC;IACpDI,SAAS,EAAGC,KAAK,IACfpB,YAAY,GAAGoB,KAAK,EAAW,IAAI,CAAC;IACtCC,QAAQ,EAAGC,SAAS,IAAK;MACvBvB,YAAY,GAAGuB,SAAS;MACxBrB,cAAc,CAACa,OAAO,CAAER,QAAQ,IAAKA,QAAQ,CAACgB,SAAS,CAAC,CAAC;IAC3D,CAAC;IACDC,sBAAsB,EAAEA,CAAA,KAAMpB,mBAAmB;IACjDa,cAAc,EAAEA,CAAA,KAAMZ,OAAO,CAACY,cAAc,CAAC;EAC/C,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/index.ts"],"mappings":";;AAAA,cAAc,uBAAoB;AAClC,cAAc,sBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
/** Replays captured characteristic frames through an app-provided test sink. */
|
|
6
|
+
export const replayRecordedFrames = async (frames, sink) => {
|
|
7
|
+
for (const frame of frames) {
|
|
8
|
+
if (frame.delayMs) {
|
|
9
|
+
await new Promise(resolve => setTimeout(resolve, frame.delayMs));
|
|
10
|
+
}
|
|
11
|
+
await sink(frame);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** A registry helper lets an app keep fixtures for every device it supports. */
|
|
16
|
+
export const defineRecordedDeviceFrames = fixtures => fixtures;
|
|
17
|
+
//# sourceMappingURL=recorded-frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["replayRecordedFrames","frames","sink","frame","delayMs","Promise","resolve","setTimeout","defineRecordedDeviceFrames","fixtures"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/recorded-frames.ts"],"mappings":";;AAAA;;AAYA;AACA,OAAO,MAAMA,oBAAoB,GAAG,MAAAA,CAClCC,MAAmC,EACnCC,IAAuB,KACL;EAClB,KAAK,MAAMC,KAAK,IAAIF,MAAM,EAAE;IAC1B,IAAIE,KAAK,CAACC,OAAO,EAAE;MACjB,MAAM,IAAIC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEH,KAAK,CAACC,OAAO,CAAC,CAAC;IACpE;IACA,MAAMF,IAAI,CAACC,KAAK,CAAC;EACnB;AACF,CAAC;;AAED;AACA,OAAO,MAAMK,0BAA0B,GACrCC,QAAgD,IACKA,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
export let BluetoothErrorCode = /*#__PURE__*/function (BluetoothErrorCode) {
|
|
6
|
+
BluetoothErrorCode["UNKNOWN"] = "bluetooth.unknown";
|
|
7
|
+
BluetoothErrorCode["PERMISSION_DENIED"] = "bluetooth.permission-denied";
|
|
8
|
+
BluetoothErrorCode["UNSUPPORTED"] = "bluetooth.unsupported";
|
|
9
|
+
BluetoothErrorCode["SCAN_FAILED"] = "bluetooth.scan-failed";
|
|
10
|
+
BluetoothErrorCode["CONNECTION_FAILED"] = "bluetooth.connection-failed";
|
|
11
|
+
BluetoothErrorCode["PAIRING_REQUIRED"] = "bluetooth.pairing-required";
|
|
12
|
+
BluetoothErrorCode["DISCOVERY_FAILED"] = "bluetooth.discovery-failed";
|
|
13
|
+
BluetoothErrorCode["DEVICE_ERROR"] = "bluetooth.device-error";
|
|
14
|
+
BluetoothErrorCode["FRAME_INVALID"] = "bluetooth.frame-invalid";
|
|
15
|
+
BluetoothErrorCode["MEASUREMENT_FAILED"] = "bluetooth.measurement-failed";
|
|
16
|
+
BluetoothErrorCode["BACKGROUND_SYNC"] = "bluetooth.background-sync";
|
|
17
|
+
return BluetoothErrorCode;
|
|
18
|
+
}({});
|
|
19
|
+
export class BluetoothError extends Error {
|
|
20
|
+
name = "BluetoothError";
|
|
21
|
+
constructor(code, message, translationKey, originalError) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.code = code;
|
|
24
|
+
this.translationKey = translationKey;
|
|
25
|
+
this.originalError = originalError;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const translationKeyFor = message => /^([\w-]+\.)+[\w-]+$/.test(message) ? message : undefined;
|
|
29
|
+
const messageFor = error => {
|
|
30
|
+
if (error instanceof Error) {
|
|
31
|
+
return error.message;
|
|
32
|
+
}
|
|
33
|
+
if (typeof error === "string") {
|
|
34
|
+
return error;
|
|
35
|
+
}
|
|
36
|
+
return String(error);
|
|
37
|
+
};
|
|
38
|
+
export const bluetoothErrorCodeFor = error => {
|
|
39
|
+
if (error instanceof BluetoothError) {
|
|
40
|
+
return error.code;
|
|
41
|
+
}
|
|
42
|
+
const message = messageFor(error);
|
|
43
|
+
const errorCode = error?.errorCode;
|
|
44
|
+
if (/permission|unauthori[sz]ed|denied/i.test(message)) {
|
|
45
|
+
return BluetoothErrorCode.PERMISSION_DENIED;
|
|
46
|
+
}
|
|
47
|
+
if (/unsupported/i.test(message)) {
|
|
48
|
+
return BluetoothErrorCode.UNSUPPORTED;
|
|
49
|
+
}
|
|
50
|
+
if (/scan/i.test(message) || errorCode === "ScanStartFailed") {
|
|
51
|
+
return BluetoothErrorCode.SCAN_FAILED;
|
|
52
|
+
}
|
|
53
|
+
if (/pair|bond|authentication/i.test(message)) {
|
|
54
|
+
return BluetoothErrorCode.PAIRING_REQUIRED;
|
|
55
|
+
}
|
|
56
|
+
if (/connect|disconnect/i.test(message)) {
|
|
57
|
+
return BluetoothErrorCode.CONNECTION_FAILED;
|
|
58
|
+
}
|
|
59
|
+
if (/frame|parse|checksum|corrupt/i.test(message)) {
|
|
60
|
+
return BluetoothErrorCode.FRAME_INVALID;
|
|
61
|
+
}
|
|
62
|
+
if (/measurement|reading|result/i.test(message)) {
|
|
63
|
+
return BluetoothErrorCode.MEASUREMENT_FAILED;
|
|
64
|
+
}
|
|
65
|
+
return BluetoothErrorCode.UNKNOWN;
|
|
66
|
+
};
|
|
67
|
+
export const toBluetoothError = error => {
|
|
68
|
+
if (error instanceof BluetoothError) {
|
|
69
|
+
return error;
|
|
70
|
+
}
|
|
71
|
+
const message = messageFor(error);
|
|
72
|
+
return new BluetoothError(bluetoothErrorCodeFor(error), message, translationKeyFor(message), error);
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=bluetooth-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BluetoothErrorCode","BluetoothError","Error","name","constructor","code","message","translationKey","originalError","translationKeyFor","test","undefined","messageFor","error","String","bluetoothErrorCodeFor","errorCode","PERMISSION_DENIED","UNSUPPORTED","SCAN_FAILED","PAIRING_REQUIRED","CONNECTION_FAILED","FRAME_INVALID","MEASUREMENT_FAILED","UNKNOWN","toBluetoothError"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/bluetooth-error.ts"],"mappings":";;AAAA;;AAIA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAc9B,OAAO,MAAMC,cAAc,SAASC,KAAK,CAAC;EACxBC,IAAI,GAAG,gBAAgB;EAEhCC,WAAWA,CACAC,IAAwB,EACxCC,OAAe,EACCC,cAAuB,EACvBC,aAAuB,EACvC;IACA,KAAK,CAACF,OAAO,CAAC;IAAC,KALCD,IAAwB,GAAxBA,IAAwB;IAAA,KAExBE,cAAuB,GAAvBA,cAAuB;IAAA,KACvBC,aAAuB,GAAvBA,aAAuB;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J,OAAO,CAAC,EAAE;IAC/C,OAAON,kBAAkB,CAACuB,kBAAkB;EAC9C;EAEA,OAAOvB,kBAAkB,CAACwB,OAAO;AACnC,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAIZ,KAAc,IAAqB;EAClE,IAAIA,KAAK,YAAYZ,cAAc,EAAE;IACnC,OAAOY,KAAK;EACd;EAEA,MAAMP,OAAO,GAAGM,UAAU,CAACC,KAAK,CAAC;EAEjC,OAAO,IAAIZ,cAAc,CACvBc,qBAAqB,CAACF,KAAK,CAAC,EAC5BP,OAAO,EACPG,iBAAiB,CAACH,OAAO,CAAC,EAC1BO,KACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-connection-event.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAYA,SAASA,iBAAiB,QAAQ,yBAAsB;;
|
|
1
|
+
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAYA,SAASA,iBAAiB,QAAQ,yBAAsB;;AA4CxD;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/result-policy.ts"],"mappings":"","ignoreList":[]}
|