@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
package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_caseType","require","_deviceStatus","MeasurementStateMachine","isMeasuring","constructor","callbacks","reset","lastCaseValue","undefined","advance","parsingCase","measurementTypeKey","parsedData","frame","isResult","caseType","CaseType","RESULT","isRepeatedResult","caseValue","STREAM","startMeasuring","OTHER","stopMeasuring","keepMeasuring","onResult","onStreamStart","onStatusChanged","DeviceStatus","MEASURING","CONNECTED","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/measurement-state-machine.ts"],"mappings":";;;;;;AAEA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,uBAAuB,CAAwB;EAClDC,WAAW,GAAY,KAAK;
|
|
1
|
+
{"version":3,"names":["_caseType","require","_deviceStatus","MeasurementStateMachine","isMeasuring","constructor","callbacks","reset","lastCaseValue","undefined","lastFrame","advance","parsingCase","measurementTypeKey","parsedData","frame","isResult","caseType","CaseType","RESULT","isRepeatedResult","caseValue","join","toLowerCase","STREAM","startMeasuring","OTHER","stopMeasuring","keepMeasuring","onResult","onStreamStart","onStatusChanged","DeviceStatus","MEASURING","CONNECTED","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/measurement-state-machine.ts"],"mappings":";;;;;;AAEA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,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,KAAKC,kB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AId,kBAAuC,IAAW;IACzE,IAAI,CAACT,WAAW,GAAG,KAAK;IACxB,IAAI,CAACE,SAAS,CAACyB,eAAe,GAC5BC,0BAAY,CAACE,SAAS,EACtBrB,kBACF,CAAC;EACH,CAAC;AACH;AAACsB,OAAA,CAAAhC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -13,6 +13,18 @@ const spo2MainServices = exports.spo2MainServices = [{
|
|
|
13
13
|
parsingModel: {
|
|
14
14
|
caseValuePosition: [0, 2, 3, 4],
|
|
15
15
|
cases: [{
|
|
16
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
17
|
+
caseType: _caseType.CaseType.STREAM,
|
|
18
|
+
caseValue: "aa0f0621",
|
|
19
|
+
parseDefinitions: [],
|
|
20
|
+
description: "OxySmart measurement status"
|
|
21
|
+
}, {
|
|
22
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
23
|
+
caseType: _caseType.CaseType.STREAM,
|
|
24
|
+
caseValue: "aaf003??",
|
|
25
|
+
parseDefinitions: [],
|
|
26
|
+
description: "OxySmart measurement status"
|
|
27
|
+
}, {
|
|
16
28
|
measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
|
|
17
29
|
caseType: _caseType.CaseType.STREAM,
|
|
18
30
|
caseValue: "aa0f0702",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_caseType","spo2MainServices","exports","uuid","monitorUuids","parsingModel","caseValuePosition","cases","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","caseType","CaseType","STREAM","caseValue","parseDefinitions","RESULT","name","parseType","byteIndexes","parseReference"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/spo2.main-services.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGO,MAAME,gBAA4B,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CAC1C;EACEE,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,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE;MACpB,CAAC,EAED;QACEP,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","spo2MainServices","exports","uuid","monitorUuids","parsingModel","caseValuePosition","cases","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","caseType","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,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGO,MAAME,gBAA4B,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CAC1C;EACEE,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,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,EAAE;QACpBC,WAAW,EAAE;MACf,CAAC,EAED;QACER,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE,EAAE;QACpBC,WAAW,EAAE;MACf,CAAC,EAED;QACER,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,SAAS,EAAE,UAAU;QACrBC,gBAAgB,EAAE;MACpB,CAAC,EAED;QACEP,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3DC,QAAQ,EAAEC,kBAAQ,CAACK,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/commonjs/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js
CHANGED
|
@@ -145,13 +145,17 @@ class VerovalActivitySequencer {
|
|
|
145
145
|
if (stepCount <= 0) {
|
|
146
146
|
continue;
|
|
147
147
|
}
|
|
148
|
-
const
|
|
148
|
+
const year = 2000 + record[0];
|
|
149
|
+
const month = (record[1] ?? 1) - 1;
|
|
150
|
+
const day = record[2] ?? 1;
|
|
151
|
+
const recordedAt = new Date(year, month, day);
|
|
152
|
+
const nextMidnight = new Date(year, month, day + 1);
|
|
149
153
|
this.params.onResult({
|
|
150
154
|
measurementTypeKey: _core.MeasurementTypeKey.stepCount,
|
|
151
155
|
caseType: _caseType.CaseType.RESULT,
|
|
152
156
|
stepCount,
|
|
153
157
|
start: recordedAt,
|
|
154
|
-
end:
|
|
158
|
+
end: nextMidnight
|
|
155
159
|
});
|
|
156
160
|
}
|
|
157
161
|
};
|
|
@@ -186,7 +190,9 @@ class VerovalActivitySequencer {
|
|
|
186
190
|
this.params.onResult({
|
|
187
191
|
measurementTypeKey: _core.MeasurementTypeKey.heartRate,
|
|
188
192
|
caseType: _caseType.CaseType.RESULT,
|
|
189
|
-
heartRate
|
|
193
|
+
heartRate,
|
|
194
|
+
start,
|
|
195
|
+
end
|
|
190
196
|
});
|
|
191
197
|
}
|
|
192
198
|
minute += 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_caseType","_hexToByte","SERVICE","exports","VEROVAL_ACTIVITY_SERVICE","WRITE","VEROVAL_ACTIVITY_WRITE","TOKEN","BOND","GET_MINUTE","GET_DAILY","TERMINATOR","MAX_MINUTES","bytes","frame","map","hexToByte","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","MeasurementTypeKey","caseType","CaseType","RESULT","start","end","
|
|
1
|
+
{"version":3,"names":["_core","require","_caseType","_hexToByte","SERVICE","exports","VEROVAL_ACTIVITY_SERVICE","WRITE","VEROVAL_ACTIVITY_WRITE","TOKEN","BOND","GET_MINUTE","GET_DAILY","TERMINATOR","MAX_MINUTES","bytes","frame","map","hexToByte","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","MeasurementTypeKey","caseType","CaseType","RESULT","start","end","heartRate","getTime","reason","onError"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval-activity-sequencer.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AAPA;;AASA,MAAMG,OAAO,GAAAC,OAAA,CAAAC,wBAAA,GAAG,sCAAsC;AACtD,MAAMC,KAAK,GAAAF,OAAA,CAAAG,sBAAA,GAAG,sCAAsC;AAEpD,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,IAAI,GAAG,IAAI;AACjB,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,SAAS,GAAG,IAAI;AACtB,MAAMC,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAC/B,MAAMC,WAAW,GAAG,MAAM;AA0B1B,MAAMC,KAAK,GAAIC,KAAwB,IAAeA,KAAK,CAACC,GAAG,CAACC,oBAAS,CAAC;AAE1E,MAAMC,GAAG,GAAIC,KAAa,IACxB,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAE9C,MAAMC,OAAO,GAAGA,CACdC,KAAmC,EACnCC,MAAyB,MACN;EACnB,GAAGD,KAAK;EACRR,KAAK,EAAES,MAAM,CAACR,GAAG,CAACE,GAAG;AACvB,CAAC,CAAC;AAEF,MAAMO,SAAS,GAAGA,CAChBD,MAAyB,EACzBE,GAAsB,KAEtBF,MAAM,CAACR,GAAG,CAAC,CAACG,KAAK,EAAEQ,KAAK,K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ACLC;QACF,CAAC,CAAC;MACJ;MAEA/C,MAAM,IAAI,CAAC;IACb;EACF,CAAC;EAEOa,IAAI,GAAIqC,MAAc,IAAgB;IAC5C,IAAI,CAACrD,KAAK,GAAG,MAAM;IACnB,IAAI,CAACQ,MAAM,CAAC8C,OAAO,CAACD,MAAM,CAAC;IAE3B,OAAOvC,SAAS;EAClB,CAAC;AACH;AAAClD,OAAA,CAAAmC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createFakeBleManager = void 0;
|
|
7
|
+
var _reactNativeBlePlx = require("react-native-ble-plx");
|
|
8
|
+
/* eslint-disable import/group-exports */
|
|
9
|
+
|
|
10
|
+
/** A deterministic BLE manager for hook and scan integration tests. No hardware is used. */
|
|
11
|
+
|
|
12
|
+
const createFakeBleManager = ({
|
|
13
|
+
state = _reactNativeBlePlx.State.PoweredOn,
|
|
14
|
+
devices = []
|
|
15
|
+
} = {}) => {
|
|
16
|
+
let currentState = state;
|
|
17
|
+
let scanCallback;
|
|
18
|
+
const stateCallbacks = new Set();
|
|
19
|
+
let scannedServiceUUIDs = null;
|
|
20
|
+
const manager = {
|
|
21
|
+
onStateChange: (callback, emitCurrentState) => {
|
|
22
|
+
stateCallbacks.add(callback);
|
|
23
|
+
if (emitCurrentState) {
|
|
24
|
+
callback(currentState);
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
remove: () => stateCallbacks.delete(callback)
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
startDeviceScan: (serviceUUIDs, _options, callback) => {
|
|
31
|
+
scannedServiceUUIDs = serviceUUIDs;
|
|
32
|
+
scanCallback = callback;
|
|
33
|
+
devices.forEach(device => callback(null, device));
|
|
34
|
+
},
|
|
35
|
+
stopDeviceScan: () => {
|
|
36
|
+
scanCallback = undefined;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
manager,
|
|
41
|
+
emitDevice: device => scanCallback?.(null, device),
|
|
42
|
+
emitError: error => scanCallback?.(error, null),
|
|
43
|
+
setState: nextState => {
|
|
44
|
+
currentState = nextState;
|
|
45
|
+
stateCallbacks.forEach(callback => callback(nextState));
|
|
46
|
+
},
|
|
47
|
+
getScannedServiceUUIDs: () => scannedServiceUUIDs,
|
|
48
|
+
stopDeviceScan: () => manager.stopDeviceScan()
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.createFakeBleManager = createFakeBleManager;
|
|
52
|
+
//# sourceMappingURL=fake-ble-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeBlePlx","require","createFakeBleManager","state","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","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/fake-ble-manager.ts"],"mappings":";;;;;;AAEA,IAAAA,kBAAA,GAAAC,OAAA;AAFA;;AASA;;AAUO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,GAAGC,wBAAK,CAACC,SAAS;EACvBC,OAAO,GAAG;AACW,CAAC,GAAG,CAAC,CAAC,KAAqB;EAChD,IAAIC,YAAY,GAAGJ,KAAK;EACxB,IAAIK,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;AAACQ,OAAA,CAAA9B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _fakeBleManager = require("./fake-ble-manager.js");
|
|
7
|
+
Object.keys(_fakeBleManager).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _fakeBleManager[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _fakeBleManager[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _recordedFrames = require("./recorded-frames.js");
|
|
18
|
+
Object.keys(_recordedFrames).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _recordedFrames[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _recordedFrames[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_fakeBleManager","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_recordedFrames"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/index.ts"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,eAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,eAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,eAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,eAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.replayRecordedFrames = exports.defineRecordedDeviceFrames = void 0;
|
|
7
|
+
/* eslint-disable import/group-exports */
|
|
8
|
+
|
|
9
|
+
/** Replays captured characteristic frames through an app-provided test sink. */
|
|
10
|
+
const replayRecordedFrames = async (frames, sink) => {
|
|
11
|
+
for (const frame of frames) {
|
|
12
|
+
if (frame.delayMs) {
|
|
13
|
+
await new Promise(resolve => setTimeout(resolve, frame.delayMs));
|
|
14
|
+
}
|
|
15
|
+
await sink(frame);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** A registry helper lets an app keep fixtures for every device it supports. */
|
|
20
|
+
exports.replayRecordedFrames = replayRecordedFrames;
|
|
21
|
+
const defineRecordedDeviceFrames = fixtures => fixtures;
|
|
22
|
+
exports.defineRecordedDeviceFrames = defineRecordedDeviceFrames;
|
|
23
|
+
//# sourceMappingURL=recorded-frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["replayRecordedFrames","frames","sink","frame","delayMs","Promise","resolve","setTimeout","exports","defineRecordedDeviceFrames","fixtures"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/recorded-frames.ts"],"mappings":";;;;;;AAAA;;AAYA;AACO,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;AAAAK,OAAA,CAAAR,oBAAA,GAAAA,oBAAA;AACO,MAAMS,0BAA0B,GACrCC,QAAgD,IACKA,QAAQ;AAACF,OAAA,CAAAC,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toBluetoothError = exports.bluetoothErrorCodeFor = exports.BluetoothErrorCode = exports.BluetoothError = void 0;
|
|
7
|
+
/* eslint-disable import/group-exports */
|
|
8
|
+
let BluetoothErrorCode = exports.BluetoothErrorCode = /*#__PURE__*/function (BluetoothErrorCode) {
|
|
9
|
+
BluetoothErrorCode["UNKNOWN"] = "bluetooth.unknown";
|
|
10
|
+
BluetoothErrorCode["PERMISSION_DENIED"] = "bluetooth.permission-denied";
|
|
11
|
+
BluetoothErrorCode["UNSUPPORTED"] = "bluetooth.unsupported";
|
|
12
|
+
BluetoothErrorCode["SCAN_FAILED"] = "bluetooth.scan-failed";
|
|
13
|
+
BluetoothErrorCode["CONNECTION_FAILED"] = "bluetooth.connection-failed";
|
|
14
|
+
BluetoothErrorCode["PAIRING_REQUIRED"] = "bluetooth.pairing-required";
|
|
15
|
+
BluetoothErrorCode["DISCOVERY_FAILED"] = "bluetooth.discovery-failed";
|
|
16
|
+
BluetoothErrorCode["DEVICE_ERROR"] = "bluetooth.device-error";
|
|
17
|
+
BluetoothErrorCode["FRAME_INVALID"] = "bluetooth.frame-invalid";
|
|
18
|
+
BluetoothErrorCode["MEASUREMENT_FAILED"] = "bluetooth.measurement-failed";
|
|
19
|
+
BluetoothErrorCode["BACKGROUND_SYNC"] = "bluetooth.background-sync";
|
|
20
|
+
return BluetoothErrorCode;
|
|
21
|
+
}({});
|
|
22
|
+
class BluetoothError extends Error {
|
|
23
|
+
name = "BluetoothError";
|
|
24
|
+
constructor(code, message, translationKey, originalError) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.code = code;
|
|
27
|
+
this.translationKey = translationKey;
|
|
28
|
+
this.originalError = originalError;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.BluetoothError = BluetoothError;
|
|
32
|
+
const translationKeyFor = message => /^([\w-]+\.)+[\w-]+$/.test(message) ? message : undefined;
|
|
33
|
+
const messageFor = error => {
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
return error.message;
|
|
36
|
+
}
|
|
37
|
+
if (typeof error === "string") {
|
|
38
|
+
return error;
|
|
39
|
+
}
|
|
40
|
+
return String(error);
|
|
41
|
+
};
|
|
42
|
+
const bluetoothErrorCodeFor = error => {
|
|
43
|
+
if (error instanceof BluetoothError) {
|
|
44
|
+
return error.code;
|
|
45
|
+
}
|
|
46
|
+
const message = messageFor(error);
|
|
47
|
+
const errorCode = error?.errorCode;
|
|
48
|
+
if (/permission|unauthori[sz]ed|denied/i.test(message)) {
|
|
49
|
+
return BluetoothErrorCode.PERMISSION_DENIED;
|
|
50
|
+
}
|
|
51
|
+
if (/unsupported/i.test(message)) {
|
|
52
|
+
return BluetoothErrorCode.UNSUPPORTED;
|
|
53
|
+
}
|
|
54
|
+
if (/scan/i.test(message) || errorCode === "ScanStartFailed") {
|
|
55
|
+
return BluetoothErrorCode.SCAN_FAILED;
|
|
56
|
+
}
|
|
57
|
+
if (/pair|bond|authentication/i.test(message)) {
|
|
58
|
+
return BluetoothErrorCode.PAIRING_REQUIRED;
|
|
59
|
+
}
|
|
60
|
+
if (/connect|disconnect/i.test(message)) {
|
|
61
|
+
return BluetoothErrorCode.CONNECTION_FAILED;
|
|
62
|
+
}
|
|
63
|
+
if (/frame|parse|checksum|corrupt/i.test(message)) {
|
|
64
|
+
return BluetoothErrorCode.FRAME_INVALID;
|
|
65
|
+
}
|
|
66
|
+
if (/measurement|reading|result/i.test(message)) {
|
|
67
|
+
return BluetoothErrorCode.MEASUREMENT_FAILED;
|
|
68
|
+
}
|
|
69
|
+
return BluetoothErrorCode.UNKNOWN;
|
|
70
|
+
};
|
|
71
|
+
exports.bluetoothErrorCodeFor = bluetoothErrorCodeFor;
|
|
72
|
+
const toBluetoothError = error => {
|
|
73
|
+
if (error instanceof BluetoothError) {
|
|
74
|
+
return error;
|
|
75
|
+
}
|
|
76
|
+
const message = messageFor(error);
|
|
77
|
+
return new BluetoothError(bluetoothErrorCodeFor(error), message, translationKeyFor(message), error);
|
|
78
|
+
};
|
|
79
|
+
exports.toBluetoothError = toBluetoothError;
|
|
80
|
+
//# sourceMappingURL=bluetooth-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BluetoothErrorCode","exports","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;AAAA,IAIYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,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;AAcvB,MAAME,cAAc,SAASC,KAAK,CAAC;EACxBC,IAAI,GAAG,gBAAgB;EAEhCC,WAAWA,CACAC,IAAwB,EACxCC,OAAe,EACCC,cAAuB,EACvBC,a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,EAAE;IACvC,OAAOP,kBAAkB,CAACsB,iBAAiB;EAC7C;EAEA,IAAI,+BAA+B,CAACX,IAAI,CAACJ,OAAO,CAAC,EAAE;IACjD,OAAOP,kBAAkB,CAACuB,aAAa;EACzC;EAEA,IAAI,6BAA6B,CAACZ,IAAI,CAACJ,OAAO,CAAC,EAAE;IAC/C,OAAOP,kBAAkB,CAACwB,kBAAkB;EAC9C;EAEA,OAAOxB,kBAAkB,CAACyB,OAAO;AACnC,CAAC;AAACxB,OAAA,CAAAe,qBAAA,GAAAA,qBAAA;AAEK,MAAMU,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;AAACb,OAAA,CAAAyB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-connection-event.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/result-policy.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.reviveResultDates = exports.createStableResultId = void 0;
|
|
7
|
+
/* eslint-disable import/group-exports */
|
|
8
|
+
|
|
9
|
+
const canonicalize = value => {
|
|
10
|
+
if (value instanceof Date) {
|
|
11
|
+
return value.toISOString();
|
|
12
|
+
}
|
|
13
|
+
if (Array.isArray(value)) {
|
|
14
|
+
return value.map(canonicalize);
|
|
15
|
+
}
|
|
16
|
+
if (value && typeof value === "object") {
|
|
17
|
+
return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, nested]) => [key, canonicalize(nested)]));
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
};
|
|
21
|
+
const hash = value => {
|
|
22
|
+
let first = 0x811c9dc5;
|
|
23
|
+
let second = 0x01000193;
|
|
24
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
25
|
+
const code = value.charCodeAt(index);
|
|
26
|
+
first = Math.imul(first ^ code, 0x01000193);
|
|
27
|
+
second = Math.imul(second ^ code + index, 0x811c9dc5);
|
|
28
|
+
}
|
|
29
|
+
return `${(first >>> 0).toString(16).padStart(8, "0")}${(second >>> 0).toString(16).padStart(8, "0")}`;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Creates an identity that is stable when a device sends its stored history again.
|
|
34
|
+
* Recording IDs, timestamps and indexes are retained in the canonical payload; transient
|
|
35
|
+
* delivery metadata is deliberately not part of the key.
|
|
36
|
+
*/
|
|
37
|
+
const createStableResultId = (deviceData, data) => {
|
|
38
|
+
const deviceIdentity = deviceData.sn || deviceData.id || deviceData.name;
|
|
39
|
+
return `ovok:${hash(JSON.stringify(canonicalize({
|
|
40
|
+
device: deviceIdentity,
|
|
41
|
+
name: deviceData.name,
|
|
42
|
+
data
|
|
43
|
+
})))}`;
|
|
44
|
+
};
|
|
45
|
+
exports.createStableResultId = createStableResultId;
|
|
46
|
+
const reviveResultDates = value => {
|
|
47
|
+
const revive = (current, key) => {
|
|
48
|
+
if (typeof current === "string" && ["recordedAt", "start", "end"].includes(key ?? "")) {
|
|
49
|
+
const date = new Date(current);
|
|
50
|
+
return Number.isNaN(date.getTime()) ? current : date;
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(current)) {
|
|
53
|
+
return current.map(item => revive(item));
|
|
54
|
+
}
|
|
55
|
+
if (current && typeof current === "object") {
|
|
56
|
+
return Object.fromEntries(Object.entries(current).map(([childKey, childValue]) => [childKey, revive(childValue, childKey)]));
|
|
57
|
+
}
|
|
58
|
+
return current;
|
|
59
|
+
};
|
|
60
|
+
return revive(value);
|
|
61
|
+
};
|
|
62
|
+
exports.reviveResultDates = reviveResultDates;
|
|
63
|
+
//# sourceMappingURL=result-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["canonicalize","value","Date","toISOString","Array","isArray","map","Object","fromEntries","entries","sort","left","right","localeCompare","key","nested","hash","first","second","index","length","code","charCodeAt","Math","imul","toString","padStart","createStableResultId","deviceData","data","deviceIdentity","sn","id","name","JSON","stringify","device","exports","reviveResultDates","revive","current","includes","date","Number","isNaN","getTime","item","childKey","childValue"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/result-identity.ts"],"mappings":";;;;;;AAAA;;AAMA,MAAMA,YAAY,GAAIC,KAAc,IAAc;EAChD,IAAIA,KAAK,YAAYC,IAAI,EAAE;IACzB,OAAOD,KAAK,CAACE,WAAW,CAAC,CAAC;EAC5B;EAEA,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE;IACxB,OAAOA,KAAK,CAACK,GAAG,CAACN,YAAY,CAAC;EAChC;EAEA,IAAIC,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACtC,OAAOM,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACR,KAAK,CAAC,CAClBS,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAACC,KAAK,CAAC,KAAKD,IAAI,CAACE,aAAa,CAACD,KAAK,CAAC,CAAC,CACpDN,GAAG,CAAC,CAAC,CAACQ,GAAG,EAAEC,MAAM,CAAC,KAAK,CAACD,GAAG,EAAEd,YAAY,CAACe,MAAM,CAAC,CAAC,CACvD,CAAC;EACH;EAEA,OAAOd,KAAK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;IAC1D,IACE,OAAO0B,OAAO,KAAK,QAAQ,IAC3B,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,CAACC,QAAQ,CAAC3B,GAAG,IAAI,EAAE,CAAC,EAClD;MACA,MAAM4B,IAAI,GAAG,IAAIxC,IAAI,CAACsC,OAAO,CAAC;MAE9B,OAAOG,MAAM,CAACC,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,GAAGL,OAAO,GAAGE,IAAI;IACtD;IAEA,IAAItC,KAAK,CAACC,OAAO,CAACmC,OAAO,CAAC,EAAE;MAC1B,OAAOA,OAAO,CAAClC,GAAG,CAAEwC,IAAI,IAAKP,MAAM,CAACO,IAAI,CAAC,CAAC;IAC5C;IAEA,IAAIN,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAC1C,OAAOjC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAAC+B,OAAO,CAAC,CAAClC,GAAG,CAAC,CAAC,CAACyC,QAAQ,EAAEC,UAAU,CAAC,KAAK,CACtDD,QAAQ,EACRR,MAAM,CAACS,UAAU,EAAED,QAAQ,CAAC,CAC7B,CACH,CAAC;IACH;IAEA,OAAOP,OAAO;EAChB,CAAC;EAED,OAAOD,MAAM,CAACtC,KAAK,CAAC;AACtB,CAAC;AAACoC,OAAA,CAAAC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -55,9 +55,15 @@ const useHealthConnectAuthorization = (readIdentifiers, writeIdentifiers, backgr
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
const grantedPermissions = await (0, _reactNativeHealthConnect.getGrantedPermissions)();
|
|
58
|
-
const
|
|
58
|
+
const backgroundPermission = permissionsRef.current.find(permission => permission.recordType === "BackgroundAccessPermission");
|
|
59
|
+
const requiredPermissions = permissionsRef.current.filter(permission => permission !== backgroundPermission);
|
|
60
|
+
const allGranted = requiredPermissions.every(permission => grantedPermissions.some(granted => granted.accessType === permission.accessType && granted.recordType === permission.recordType));
|
|
61
|
+
const backgroundGranted = backgroundPermission ? grantedPermissions.some(granted => granted.accessType === backgroundPermission.accessType && granted.recordType === backgroundPermission.recordType) : undefined;
|
|
59
62
|
updateStatus({
|
|
60
|
-
state: allGranted ? "authorized" : hasRequestedRef.current ? "refused" : "shouldRequest"
|
|
63
|
+
state: allGranted ? "authorized" : hasRequestedRef.current ? "refused" : "shouldRequest",
|
|
64
|
+
...(backgroundPermission ? {
|
|
65
|
+
backgroundAccess: backgroundGranted ? "authorized" : hasRequestedRef.current ? "refused" : "shouldRequest"
|
|
66
|
+
} : {})
|
|
61
67
|
});
|
|
62
68
|
} catch (error) {
|
|
63
69
|
updateStatus({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeHealthConnect","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","toError","error","Error","String","useHealthConnectAuthorization","readIdentifiers","writeIdentifiers","backgroundAccess","onStatusChange","status","setStatus","useState","state","hasRequestedRef","useRef","identifiersRef","permissionsRef","current","readPermissions","map","recordType","accessType","writePermissions","backgroundPermissions","updateStatus","useCallback","nextStatus","checkAuthorization","isInitialized","initialize","grantedPermissions","getGrantedPermissions","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeHealthConnect","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","toError","error","Error","String","useHealthConnectAuthorization","readIdentifiers","writeIdentifiers","backgroundAccess","onStatusChange","status","setStatus","useState","state","hasRequestedRef","useRef","identifiersRef","permissionsRef","current","readPermissions","map","recordType","accessType","writePermissions","backgroundPermissions","updateStatus","useCallback","nextStatus","checkAuthorization","isInitialized","initialize","grantedPermissions","getGrantedPermissions","backgroundPermission","find","permission","requiredPermissions","filter","allGranted","every","some","granted","backgroundGranted","undefined","requestAuthorization","requestPermission","useEffect","subscription","AppState","addEventListener","remove","AndroidHealthConnectAuthorizationProvider","exports","memo","fallback","children","skipRequest","renderManualRequestUI","onAuthorizationStatusChange","authorizationStatus","shouldRenderManualRequestUI","includes","shouldRenderFallback","jsx","Fragment"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AAIqC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM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AAK,eAAe,EAC7C;MACA;IACF;IAEA,KAAK+B,oBAAoB,CAAC,CAAC;EAC7B,CAAC,EAAE,CACDe,mBAAmB,CAAC9C,KAAK,EACzB4C,qBAAqB,EACrBb,oBAAoB,EACpBY,WAAW,CACZ,CAAC;EAEF,IAAIA,WAAW,IAAIG,mBAAmB,CAAC9C,KAAK,KAAK,YAAY,EAAE;IAC7D,oBAAO,IAAAhC,WAAA,CAAAkF,GAAA,EAAAlF,WAAA,CAAAmF,QAAA;MAAAT,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACxB;EAEA,IAAIK,2BAA2B,EAAE;IAC/B,OAAOH,qBAAqB,GAAGb,oBAAoB,CAAC;EACtD;EAEA,IAAIkB,oBAAoB,EAAE;IACxB,oBAAO,IAAAjF,WAAA,CAAAkF,GAAA,EAAAlF,WAAA,CAAAmF,QAAA;MAAAT,QAAA,EAAGD,QAAQ,IAAI;IAAI,CAAG,CAAC;EAChC;EAEA,IAAIK,mBAAmB,CAAC9C,KAAK,KAAK,SAAS,EAAE;IAC3C,OAAO,IAAI;EACb;EAEA,OAAO,IAAI;AACb,CACF,CAAC","ignoreList":[]}
|
|
@@ -4,10 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BaseHealthSyncService = void 0;
|
|
7
|
+
var _telemetry = require("../../helpers/utils/telemetry.js");
|
|
8
|
+
var _retrySave = require("../utils/retry-save.js");
|
|
7
9
|
var _dataProcessor = require("./managers/data-processor.js");
|
|
8
10
|
var _storageManager = require("./managers/storage-manager.js");
|
|
9
11
|
var _syncProgressManager = require("./managers/sync-progress-manager.js");
|
|
10
12
|
var _syncStateManager = require("./managers/sync-state-manager.js");
|
|
13
|
+
/* eslint-disable max-lines */
|
|
14
|
+
|
|
11
15
|
class BaseHealthSyncService {
|
|
12
16
|
constructor(props) {
|
|
13
17
|
this.client = props.client;
|
|
@@ -21,7 +25,9 @@ class BaseHealthSyncService {
|
|
|
21
25
|
}
|
|
22
26
|
/** One run at a time; see `SyncStateManager.once` for why that matters. */
|
|
23
27
|
async startSync() {
|
|
24
|
-
return this.stateManager.once(() =>
|
|
28
|
+
return this.stateManager.once(() => (0, _telemetry.withOvokSpan)("health.import", {
|
|
29
|
+
provider: this.getProviderName()
|
|
30
|
+
}, () => this.runSync()));
|
|
25
31
|
}
|
|
26
32
|
async runSync() {
|
|
27
33
|
try {
|
|
@@ -92,22 +98,35 @@ class BaseHealthSyncService {
|
|
|
92
98
|
while (hasAnchor && !this.stateManager.shouldStopSync) {
|
|
93
99
|
const {
|
|
94
100
|
observationBodies,
|
|
95
|
-
hasAnchor: currentHasAnchor
|
|
101
|
+
hasAnchor: currentHasAnchor,
|
|
102
|
+
anchors
|
|
96
103
|
} = await this.dataProcessor.getObservationBodiesForType(measurementTypeKey, data, latestValidStartDate);
|
|
97
104
|
hasAnchor = currentHasAnchor;
|
|
98
105
|
if (this.stateManager.shouldStopSync) {
|
|
99
106
|
break;
|
|
100
107
|
}
|
|
101
108
|
const entries = this.dataProcessor.generateObservationEntries(observationBodies);
|
|
102
|
-
this.progressManager.incrementSyncedObservations(measurementTypeKey, entries.length);
|
|
103
109
|
if (entries.length !== 0 && !this.stateManager.shouldStopSync) {
|
|
104
110
|
try {
|
|
105
|
-
const
|
|
111
|
+
const startedAt = Date.now();
|
|
112
|
+
const result = await (0, _retrySave.withSyncRetries)(() => this.storageManager.saveObservations(entries));
|
|
113
|
+
(0, _telemetry.recordOvokMetric)("ovok.health.samples.imported", entries.length, {
|
|
114
|
+
provider: this.getProviderName(),
|
|
115
|
+
measurementTypeKey
|
|
116
|
+
});
|
|
117
|
+
(0, _telemetry.recordOvokDuration)("ovok.measurement.save.duration", Date.now() - startedAt, {
|
|
118
|
+
provider: this.getProviderName()
|
|
119
|
+
});
|
|
106
120
|
this.stateManager.addResult(result);
|
|
121
|
+
this.progressManager.incrementSyncedObservations(measurementTypeKey, entries.length);
|
|
122
|
+
this.storageManager.saveAnchors(anchors);
|
|
107
123
|
} catch (error) {
|
|
124
|
+
this.progressManager.setStatus(measurementTypeKey, "failed");
|
|
108
125
|
this.onSyncError(error);
|
|
109
126
|
return;
|
|
110
127
|
}
|
|
128
|
+
} else {
|
|
129
|
+
this.storageManager.saveAnchors(anchors);
|
|
111
130
|
}
|
|
112
131
|
}
|
|
113
132
|
this.progressManager.setStatus(measurementTypeKey, this.stateManager.shouldStopSync ? "idle" : "completed");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_telemetry","require","_retrySave","_dataProcessor","_storageManager","_syncProgressManager","_syncStateManager","BaseHealthSyncService","constructor","props","client","patientId","dataToSync","onSyncError","progressManager","SyncProgressManager","updateProgress","stateManager","SyncStateManager","storageManager","StorageManager","getProviderName","dataProcessor","DataProcessor","chunkSize","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","startSync","once","withOvokSpan","provider","runSync","isInitialized","Error","resume","setNotStartedStatuses","initialDataFetched","initializeSync","processAllDataTypes","setPauseStatuses","pauseReason","error","stopSync","resetAll","reset","shouldStopSync","pauseSync","reason","pause","latestObservationDates","getLatestObservationDates","calculateTotalCounts","key","Object","keys","measurementTypeKey","data","getDataForMeasurementType","latestValidStartDate","getLatestValidStartDate","totalCount","getTotalRecordsCountForType","setTotalObservations","setStatus","syncDataByType","hasAnchor","observationBodies","currentHasAnchor","anchors","getObservationBodiesForType","entries","generateObservationEntries","length","startedAt","Date","now","result","withSyncRetries","saveObservations","recordOvokMetric","recordOvokDuration","addResult","incrementSyncedObservations","saveAnchors","exports"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/services/base-health-sync-service.ts"],"mappings":";;;;;;AAUA,IAAAA,UAAA,GAAAC,OAAA;AAeA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IA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