@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.
Files changed (656) hide show
  1. package/README.md +27 -17
  2. package/app.plugin.js +104 -0
  3. package/lib/commonjs/index.js +11 -0
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
  6. package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
  7. package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js +23 -0
  8. package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
  9. package/lib/commonjs/modules/auth/hooks/use-session.js +91 -0
  10. package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -0
  11. package/lib/commonjs/modules/auth/index.js +44 -0
  12. package/lib/commonjs/modules/auth/index.js.map +1 -1
  13. package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +3 -1
  14. package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
  15. package/lib/commonjs/modules/auth/register/components/form/inputs.js +48 -1
  16. package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
  17. package/lib/commonjs/modules/auth/register/components/form/register-button.js +4 -0
  18. package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
  19. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +6 -0
  20. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  21. package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +12 -0
  22. package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
  23. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
  24. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
  25. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
  26. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  27. package/lib/commonjs/modules/auth/session/components/session-list.js +82 -0
  28. package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -0
  29. package/lib/commonjs/modules/auth/session/events.js +19 -0
  30. package/lib/commonjs/modules/auth/session/events.js.map +1 -0
  31. package/lib/commonjs/modules/auth/session/index.js +13 -0
  32. package/lib/commonjs/modules/auth/session/index.js.map +1 -0
  33. package/lib/commonjs/modules/auth/session/types/session-list-props.js +6 -0
  34. package/lib/commonjs/modules/auth/session/types/session-list-props.js.map +1 -0
  35. package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +25 -0
  36. package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
  37. package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
  38. package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
  39. package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js +58 -0
  40. package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
  41. package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
  42. package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
  43. package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +13 -5
  44. package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
  45. package/lib/commonjs/modules/auth/types/session.js +2 -0
  46. package/lib/commonjs/modules/auth/types/session.js.map +1 -0
  47. package/lib/commonjs/modules/auth/utils/rate-limit.js +37 -0
  48. package/lib/commonjs/modules/auth/utils/rate-limit.js.map +1 -0
  49. package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
  50. package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
  51. package/lib/commonjs/modules/background-sync/background-safe-storage.js +79 -0
  52. package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -0
  53. package/lib/commonjs/modules/background-sync/index.js +11 -0
  54. package/lib/commonjs/modules/background-sync/index.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +123 -21
  56. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +91 -0
  58. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +47 -0
  60. package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +51 -0
  62. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +36 -0
  64. package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -0
  65. package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +46 -0
  66. package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +57 -0
  68. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -0
  69. package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +26 -0
  70. package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +49 -0
  72. package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
  73. package/lib/commonjs/modules/bt-management/index.js +143 -0
  74. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  75. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -4
  76. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  77. package/lib/commonjs/modules/bt-management/services/bt-manager.js +75 -4
  78. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  79. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +57 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  81. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +111 -3
  82. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  83. package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
  84. package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
  85. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
  87. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js +9 -3
  88. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js.map +1 -1
  89. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +52 -0
  90. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/testing/index.js +28 -0
  92. package/lib/commonjs/modules/bt-management/testing/index.js.map +1 -0
  93. package/lib/commonjs/modules/bt-management/testing/recorded-frames.js +23 -0
  94. package/lib/commonjs/modules/bt-management/testing/recorded-frames.js.map +1 -0
  95. package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +80 -0
  96. package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -0
  97. package/lib/commonjs/modules/bt-management/types/device-connection-event.js +6 -0
  98. package/lib/commonjs/modules/bt-management/types/device-connection-event.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/types/result-policy.js +6 -0
  100. package/lib/commonjs/modules/bt-management/types/result-policy.js.map +1 -0
  101. package/lib/commonjs/modules/bt-management/utils/result-identity.js +63 -0
  102. package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -0
  103. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +8 -2
  104. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  105. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +23 -4
  106. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  107. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +2 -2
  108. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  109. package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
  110. package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
  111. package/lib/commonjs/modules/data-sync/utils/retry-save.js +65 -0
  112. package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -0
  113. package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -0
  114. package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
  115. package/lib/commonjs/modules/helpers/index.js +12 -0
  116. package/lib/commonjs/modules/helpers/index.js.map +1 -1
  117. package/lib/commonjs/modules/helpers/utils/s-log.js +4 -13
  118. package/lib/commonjs/modules/helpers/utils/s-log.js.map +1 -1
  119. package/lib/commonjs/modules/helpers/utils/sentry-logger.js +28 -17
  120. package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
  121. package/lib/commonjs/modules/helpers/utils/telemetry.js +143 -0
  122. package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -0
  123. package/lib/commonjs/modules/image/components/optimized-image.js +24 -2
  124. package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
  125. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +18 -9
  126. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
  127. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
  128. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
  129. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
  130. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
  131. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +42 -17
  132. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  133. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
  134. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  135. package/lib/commonjs/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
  136. package/lib/commonjs/modules/tile/components/task-icon.js +2 -1
  137. package/lib/commonjs/modules/tile/components/task-icon.js.map +1 -1
  138. package/lib/commonjs/modules/ui/components/background-sync-setting.js +113 -0
  139. package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -0
  140. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +105 -0
  141. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -0
  142. package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +165 -0
  143. package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -0
  144. package/lib/commonjs/modules/ui/components/health-import-card.js +130 -0
  145. package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -0
  146. package/lib/commonjs/modules/ui/components/manual-entry-form.js +123 -0
  147. package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -0
  148. package/lib/commonjs/modules/ui/components/pairing-flow.js +222 -0
  149. package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -0
  150. package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +99 -0
  151. package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
  152. package/lib/commonjs/modules/ui/components/urine-test-result.js +94 -0
  153. package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -0
  154. package/lib/commonjs/modules/ui/index.js +116 -0
  155. package/lib/commonjs/modules/ui/index.js.map +1 -0
  156. package/lib/commonjs/modules/ui/types.js +6 -0
  157. package/lib/commonjs/modules/ui/types.js.map +1 -0
  158. package/lib/commonjs/modules/ui/use-ovok-ui.js +51 -0
  159. package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -0
  160. package/lib/module/index.js +1 -0
  161. package/lib/module/index.js.map +1 -1
  162. package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
  163. package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
  164. package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js +17 -0
  165. package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
  166. package/lib/module/modules/auth/hooks/use-session.js +85 -0
  167. package/lib/module/modules/auth/hooks/use-session.js.map +1 -0
  168. package/lib/module/modules/auth/index.js +4 -0
  169. package/lib/module/modules/auth/index.js.map +1 -1
  170. package/lib/module/modules/auth/logout-button/components/logout-button.js +3 -1
  171. package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
  172. package/lib/module/modules/auth/register/components/form/inputs.js +48 -1
  173. package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
  174. package/lib/module/modules/auth/register/components/form/register-button.js +4 -0
  175. package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
  176. package/lib/module/modules/auth/register/components/form/register-form-provider.js +6 -0
  177. package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  178. package/lib/module/modules/auth/reset-password/components/form/inputs.js +12 -0
  179. package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
  180. package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
  181. package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
  182. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
  183. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  184. package/lib/module/modules/auth/session/components/session-list.js +76 -0
  185. package/lib/module/modules/auth/session/components/session-list.js.map +1 -0
  186. package/lib/module/modules/auth/session/events.js +13 -0
  187. package/lib/module/modules/auth/session/events.js.map +1 -0
  188. package/lib/module/modules/auth/session/index.js +4 -0
  189. package/lib/module/modules/auth/session/index.js.map +1 -0
  190. package/lib/module/modules/auth/session/types/session-list-props.js +4 -0
  191. package/lib/module/modules/auth/session/types/session-list-props.js.map +1 -0
  192. package/lib/module/modules/auth/sign-in/components/form/inputs.js +25 -0
  193. package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
  194. package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
  195. package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
  196. package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js +52 -0
  197. package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
  198. package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
  199. package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
  200. package/lib/module/modules/auth/sign-in/components/form/signin-button.js +13 -5
  201. package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
  202. package/lib/module/modules/auth/types/session.js +2 -0
  203. package/lib/module/modules/auth/types/session.js.map +1 -0
  204. package/lib/module/modules/auth/utils/rate-limit.js +31 -0
  205. package/lib/module/modules/auth/utils/rate-limit.js.map +1 -0
  206. package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
  207. package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
  208. package/lib/module/modules/background-sync/background-safe-storage.js +74 -0
  209. package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -0
  210. package/lib/module/modules/background-sync/index.js +1 -0
  211. package/lib/module/modules/background-sync/index.js.map +1 -1
  212. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +123 -21
  213. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  214. package/lib/module/modules/bt-management/hooks/runtime-context.js +82 -0
  215. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -0
  216. package/lib/module/modules/bt-management/hooks/use-background-sync.js +41 -0
  217. package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -0
  218. package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +45 -0
  219. package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
  220. package/lib/module/modules/bt-management/hooks/use-device-connection.js +30 -0
  221. package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -0
  222. package/lib/module/modules/bt-management/hooks/use-health-import.js +40 -0
  223. package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -0
  224. package/lib/module/modules/bt-management/hooks/use-measurements.js +51 -0
  225. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -0
  226. package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +20 -0
  227. package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
  228. package/lib/module/modules/bt-management/hooks/use-paired-devices.js +43 -0
  229. package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
  230. package/lib/module/modules/bt-management/index.js +13 -0
  231. package/lib/module/modules/bt-management/index.js.map +1 -1
  232. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -4
  233. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  234. package/lib/module/modules/bt-management/services/bt-manager.js +75 -4
  235. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  236. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +57 -0
  237. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  238. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +111 -3
  239. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  240. package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
  241. package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
  242. package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
  243. package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
  244. package/lib/module/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js +9 -3
  245. package/lib/module/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.js.map +1 -1
  246. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +48 -0
  247. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
  248. package/lib/module/modules/bt-management/testing/index.js +5 -0
  249. package/lib/module/modules/bt-management/testing/index.js.map +1 -0
  250. package/lib/module/modules/bt-management/testing/recorded-frames.js +17 -0
  251. package/lib/module/modules/bt-management/testing/recorded-frames.js.map +1 -0
  252. package/lib/module/modules/bt-management/types/bluetooth-error.js +74 -0
  253. package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -0
  254. package/lib/module/modules/bt-management/types/device-connection-event.js +4 -0
  255. package/lib/module/modules/bt-management/types/device-connection-event.js.map +1 -0
  256. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  257. package/lib/module/modules/bt-management/types/result-policy.js +4 -0
  258. package/lib/module/modules/bt-management/types/result-policy.js.map +1 -0
  259. package/lib/module/modules/bt-management/utils/result-identity.js +57 -0
  260. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -0
  261. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +8 -2
  262. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  263. package/lib/module/modules/data-sync/services/base-health-sync-service.js +23 -4
  264. package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  265. package/lib/module/modules/data-sync/services/managers/data-processor.js +2 -2
  266. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  267. package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
  268. package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
  269. package/lib/module/modules/data-sync/utils/retry-save.js +60 -0
  270. package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -0
  271. package/lib/module/modules/helpers/form-items/form-field.js +2 -0
  272. package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
  273. package/lib/module/modules/helpers/index.js +1 -0
  274. package/lib/module/modules/helpers/index.js.map +1 -1
  275. package/lib/module/modules/helpers/utils/s-log.js +4 -12
  276. package/lib/module/modules/helpers/utils/s-log.js.map +1 -1
  277. package/lib/module/modules/helpers/utils/sentry-logger.js +26 -14
  278. package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
  279. package/lib/module/modules/helpers/utils/telemetry.js +131 -0
  280. package/lib/module/modules/helpers/utils/telemetry.js.map +1 -0
  281. package/lib/module/modules/image/components/optimized-image.js +25 -3
  282. package/lib/module/modules/image/components/optimized-image.js.map +1 -1
  283. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +20 -11
  284. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
  285. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
  286. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
  287. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
  288. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
  289. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +42 -17
  290. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  291. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
  292. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  293. package/lib/module/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
  294. package/lib/module/modules/tile/components/task-icon.js +2 -1
  295. package/lib/module/modules/tile/components/task-icon.js.map +1 -1
  296. package/lib/module/modules/ui/components/background-sync-setting.js +107 -0
  297. package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -0
  298. package/lib/module/modules/ui/components/bluetooth-state-notice.js +99 -0
  299. package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -0
  300. package/lib/module/modules/ui/components/ecg-strip-viewer.js +159 -0
  301. package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -0
  302. package/lib/module/modules/ui/components/health-import-card.js +124 -0
  303. package/lib/module/modules/ui/components/health-import-card.js.map +1 -0
  304. package/lib/module/modules/ui/components/manual-entry-form.js +117 -0
  305. package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -0
  306. package/lib/module/modules/ui/components/pairing-flow.js +216 -0
  307. package/lib/module/modules/ui/components/pairing-flow.js.map +1 -0
  308. package/lib/module/modules/ui/components/supported-devices-catalog-list.js +93 -0
  309. package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
  310. package/lib/module/modules/ui/components/urine-test-result.js +89 -0
  311. package/lib/module/modules/ui/components/urine-test-result.js.map +1 -0
  312. package/lib/module/modules/ui/index.js +13 -0
  313. package/lib/module/modules/ui/index.js.map +1 -0
  314. package/lib/module/modules/ui/types.js +4 -0
  315. package/lib/module/modules/ui/types.js.map +1 -0
  316. package/lib/module/modules/ui/use-ovok-ui.js +45 -0
  317. package/lib/module/modules/ui/use-ovok-ui.js.map +1 -0
  318. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  319. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
  322. package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
  323. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +16 -0
  324. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +4 -0
  326. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
  333. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts +4 -0
  335. package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts +5 -0
  337. package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts +3 -0
  339. package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts +5 -0
  341. package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
  345. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
  347. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
  350. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
  352. package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
  354. package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
  356. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +13 -0
  358. package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts +11 -0
  360. package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +29 -0
  363. package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts +1 -0
  365. package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  367. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +46 -0
  368. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
  370. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
  372. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
  374. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
  376. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
  378. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
  380. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
  382. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +13 -0
  384. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +22 -0
  387. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  389. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +9 -1
  391. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
  393. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts +2 -0
  396. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts.map +1 -1
  397. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +16 -0
  398. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts +3 -0
  400. package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
  402. package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +3 -1
  404. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
  406. package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
  408. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +4 -0
  410. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
  412. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
  414. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  415. package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts +5 -2
  416. package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
  417. package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
  418. package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
  419. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  420. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  421. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +8 -0
  422. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +10 -0
  424. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  426. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
  428. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  430. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
  431. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +1 -1
  433. package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +5 -0
  435. package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
  436. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +4 -1
  437. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +1 -0
  439. package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/modules/helpers/utils/s-log.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
  442. package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +68 -0
  444. package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts +1 -1
  446. package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts +4 -0
  448. package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
  449. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
  451. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  454. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
  455. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
  456. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
  457. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
  459. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
  461. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
  463. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  464. package/lib/typescript/commonjs/src/modules/tile/components/task-icon.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +9 -0
  466. package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
  467. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
  468. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
  470. package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
  471. package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +13 -0
  472. package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -0
  473. package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +20 -0
  474. package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
  475. package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +15 -0
  476. package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
  478. package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts +10 -0
  480. package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
  481. package/lib/typescript/commonjs/src/modules/ui/index.d.ts +11 -0
  482. package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/modules/ui/types.d.ts +24 -0
  484. package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -0
  485. package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts +7 -0
  486. package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
  487. package/lib/typescript/module/src/index.d.ts +1 -0
  488. package/lib/typescript/module/src/index.d.ts.map +1 -1
  489. package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
  490. package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
  491. package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
  492. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +16 -0
  493. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -0
  494. package/lib/typescript/module/src/modules/auth/index.d.ts +4 -0
  495. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  496. package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
  497. package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  498. package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
  499. package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
  501. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
  502. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  503. package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts +4 -0
  504. package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -0
  505. package/lib/typescript/module/src/modules/auth/session/events.d.ts +5 -0
  506. package/lib/typescript/module/src/modules/auth/session/events.d.ts.map +1 -0
  507. package/lib/typescript/module/src/modules/auth/session/index.d.ts +3 -0
  508. package/lib/typescript/module/src/modules/auth/session/index.d.ts.map +1 -0
  509. package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts +5 -0
  510. package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
  511. package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
  512. package/lib/typescript/module/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
  513. package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
  514. package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
  515. package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
  516. package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
  517. package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
  518. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
  519. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
  520. package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
  521. package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
  522. package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
  523. package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
  524. package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
  525. package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
  526. package/lib/typescript/module/src/modules/auth/types/session.d.ts +13 -0
  527. package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -0
  528. package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts +11 -0
  529. package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
  530. package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
  531. package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +29 -0
  532. package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
  533. package/lib/typescript/module/src/modules/background-sync/index.d.ts +1 -0
  534. package/lib/typescript/module/src/modules/background-sync/index.d.ts.map +1 -1
  535. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  536. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +46 -0
  537. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
  538. package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
  539. package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
  540. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
  541. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
  542. package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
  543. package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
  544. package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
  545. package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
  546. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
  547. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
  548. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
  549. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
  550. package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
  551. package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
  552. package/lib/typescript/module/src/modules/bt-management/index.d.ts +13 -0
  553. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  554. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  555. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +22 -0
  556. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  557. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  558. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  559. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +9 -1
  560. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  561. package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
  562. package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
  563. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
  564. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts +2 -0
  565. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.d.ts.map +1 -1
  566. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +16 -0
  567. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
  568. package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts +3 -0
  569. package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts.map +1 -0
  570. package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
  571. package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
  572. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +3 -1
  573. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  574. package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
  575. package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
  576. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
  577. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  578. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +4 -0
  579. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  580. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
  581. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
  582. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
  583. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  584. package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts +5 -2
  585. package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
  586. package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
  587. package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
  588. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  589. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  590. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +8 -0
  591. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
  592. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +10 -0
  593. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
  594. package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  595. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  596. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
  597. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  598. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  599. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
  600. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  601. package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +1 -1
  602. package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
  603. package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +5 -0
  604. package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
  605. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +4 -1
  606. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  607. package/lib/typescript/module/src/modules/helpers/index.d.ts +1 -0
  608. package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
  609. package/lib/typescript/module/src/modules/helpers/utils/s-log.d.ts.map +1 -1
  610. package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
  611. package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
  612. package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +68 -0
  613. package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
  614. package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts +1 -1
  615. package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
  616. package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts +4 -0
  617. package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
  618. package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
  619. package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
  620. package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  622. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  623. package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
  624. package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
  625. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
  626. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  627. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
  628. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
  629. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
  630. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  631. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
  632. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  633. package/lib/typescript/module/src/modules/tile/components/task-icon.d.ts.map +1 -1
  634. package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +9 -0
  635. package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
  636. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
  637. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
  638. package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
  639. package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
  640. package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +13 -0
  641. package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -0
  642. package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +20 -0
  643. package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
  644. package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +15 -0
  645. package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
  646. package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
  647. package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
  648. package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts +10 -0
  649. package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
  650. package/lib/typescript/module/src/modules/ui/index.d.ts +11 -0
  651. package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -0
  652. package/lib/typescript/module/src/modules/ui/types.d.ts +24 -0
  653. package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -0
  654. package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts +7 -0
  655. package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
  656. package/package.json +145 -6
@@ -0,0 +1,16 @@
1
+ import { RuntimeDevice } from "./runtime-context";
2
+ export interface PairedDeviceStorage {
3
+ getItem: (key: string) => Promise<string | null>;
4
+ setItem: (key: string, value: string) => Promise<void>;
5
+ }
6
+ export interface UsePairedDevicesOptions {
7
+ storage: PairedDeviceStorage;
8
+ storageKey?: string;
9
+ autoPair?: boolean;
10
+ }
11
+ export declare const usePairedDevices: ({ storage, storageKey, autoPair, }: UsePairedDevicesOptions) => {
12
+ paired: readonly string[];
13
+ pair: (device: RuntimeDevice) => Promise<void>;
14
+ forget: (id: string) => Promise<void>;
15
+ };
16
+ //# sourceMappingURL=use-paired-devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-paired-devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-paired-devices.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAuB,MAAM,mBAAmB,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,GAAI,oCAI9B,uBAAuB,KAAG;IAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAwCvC,CAAC"}
@@ -29,7 +29,10 @@ export * from "./types/btprovider-children-props";
29
29
  export * from "./types/background-sync";
30
30
  export * from "./types/result-callback";
31
31
  export * from "./types/error-callback";
32
+ export * from "./types/bluetooth-error";
32
33
  export * from "./types/device-status-change-callback";
34
+ export * from "./types/device-connection-event";
35
+ export * from "./types/result-policy";
33
36
  export * from "./services/devices/bt-managed-device";
34
37
  export * from "./services/devices/blood-glucose/blood-glucose.device";
35
38
  export * from "./services/devices/custom/custom.device";
@@ -37,6 +40,8 @@ export * from "./services/bt-manager";
37
40
  export * from "./services/background-sync/background-ble-manager";
38
41
  export * from "./services/background-sync/background-sync-coordinator";
39
42
  export * from "./services/background-sync/background-service-uuids";
43
+ export * from "./utils/result-identity";
44
+ export * from "./testing";
40
45
  export * from "./services/custom/define-custom-device";
41
46
  export * from "./services/devices/standard-gatt/standard-gatt.devices";
42
47
  export * from "./services/devices/boso/boso.medicus";
@@ -65,4 +70,12 @@ export * from "./components/bt-provider";
65
70
  export * from "./components/bluetooth-device-picker";
66
71
  export * from "./components/default-permission-fallback";
67
72
  export * from "./hooks/use-request-permissions";
73
+ export * from "./hooks/runtime-context";
74
+ export * from "./hooks/use-bluetooth-state";
75
+ export * from "./hooks/use-nearby-devices";
76
+ export * from "./hooks/use-paired-devices";
77
+ export * from "./hooks/use-device-connection";
78
+ export * from "./hooks/use-measurements";
79
+ export * from "./hooks/use-background-sync";
80
+ export * from "./hooks/use-health-import";
68
81
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/bt-management/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cA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CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"background-sync-coordinator.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAW7D,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,iBAAiB,yCAAyC,CAAC;AAYjE;;;;GAIG;AACH,cAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS;IAM9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,SAAS,CAAoC;gBAEjB,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAS9D,OAAO,GAAI,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC,CActD;IAEE,KAAK,GAAI,UAAS,0BAA+B,KAAG,OAAO,CAAC,IAAI,CAAC,CAGnE;IAEL,OAAO,CAAC,YAAY,CAMlB;IAEF,OAAO,CAAC,SAAS,CAuBf;IAEF,OAAO,CAAC,UAAU,CAIhB;IAEF,OAAO,CAAC,UAAU,CA+ChB;CACH;AAED,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"background-sync-coordinator.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAwB,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAa7D,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,iBAAiB,yCAAyC,CAAC;AAkBjE;;;;GAIG;AACH,cAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS;IAM9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAL3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,SAAS,CAAoC;gBAEjB,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAS9D,OAAO,GAAI,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC,CAgBtD;IAEE,KAAK,GAAI,UAAS,0BAA+B,KAAG,OAAO,CAAC,IAAI,CAAC,CAGnE;IAEL,OAAO,CAAC,YAAY,CAMlB;IAEF,OAAO,CAAC,SAAS,CAmCf;IAEF,OAAO,CAAC,UAAU,CAIhB;IAEF,OAAO,CAAC,UAAU,CAyDhB;CACH;AAED,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,15 +1,18 @@
1
1
  import { BleManager, Device } from "react-native-ble-plx";
2
2
  import { AcceptedDevice } from "../types/accepted-device";
3
+ import { DeviceConnectionEvent } from "../types/device-connection-event";
3
4
  import { DeviceKeyOf } from "../types/device-key-of";
4
5
  import { DeviceStatusChangeCallback } from "../types/device-status-change-callback";
5
6
  import { ErrorCallback } from "../types/error-callback";
6
7
  import { ResultCallback } from "../types/result-callback";
8
+ import { DeviceResultPolicy } from "../types/result-policy";
7
9
  import { BTManagedDevice } from "./devices/bt-managed-device";
8
10
  interface BTManagerOptions {
9
11
  backgroundEnabled?: boolean;
10
12
  serviceUUIDs?: readonly string[];
11
13
  oneReadingPerConnection?: boolean;
12
14
  deliveredEcgFileNames?: readonly string[];
15
+ resultPolicies?: Partial<Record<string, DeviceResultPolicy>>;
13
16
  /** Connect one newly discovered device automatically after the scan settles. */
14
17
  autoConnect?: boolean;
15
18
  autoConnectDelayMs?: number;
@@ -26,6 +29,7 @@ declare class BTManager<T extends readonly AcceptedDevice[]> {
26
29
  private readonly options;
27
30
  private static readonly MAX_DEVICES;
28
31
  private devices;
32
+ private forgottenDeviceIds;
29
33
  private stateChangeListener;
30
34
  private eventSubscriptions;
31
35
  private scanGeneration;
@@ -42,18 +46,36 @@ declare class BTManager<T extends readonly AcceptedDevice[]> {
42
46
  /** Switches only the scan policy; the app can keep a foreground scan broad. */
43
47
  setBackgroundScanEnabled: (enabled: boolean) => void;
44
48
  stopScan: () => void;
49
+ /**
50
+ * Pauses discovery without tearing down devices or their callbacks.
51
+ *
52
+ * Use this when an app temporarily stops scanning, for example while it is in the
53
+ * background but an already-connected device may still deliver a measurement.
54
+ */
55
+ pauseScan: () => void;
56
+ /**
57
+ * Resumes discovery without clearing devices or callbacks.
58
+ *
59
+ * Restarting unconditionally also recovers when an app stopped the underlying BLE scan
60
+ * directly while BTManager still believed it was active.
61
+ */
62
+ resumeScan: () => void;
45
63
  private restartScan;
46
64
  private removeStateChangeListener;
47
65
  private startDeviceScan;
48
66
  restoreDevices: (devices: readonly Device[]) => void;
67
+ /** Disconnects one device and prevents it from being re-created by later advertisements. */
68
+ forget: (deviceId: string) => Promise<void>;
49
69
  onDeviceFound: (callback?: (device: BTManagedDevice<DeviceKeyOf<T>>, manager: BTManager<T>) => Promise<void>) => void;
50
70
  onError: (callback?: (data: ErrorCallback) => void) => void;
51
71
  onDeviceStatusChanged: (callback?: (data: DeviceStatusChangeCallback) => void) => void;
72
+ onConnectionEvent: (callback?: (data: DeviceConnectionEvent) => void) => void;
52
73
  onResult: (callback?: (data: ResultCallback<DeviceKeyOf<T>>) => void) => void;
53
74
  private onResultCallback?;
54
75
  private onErrorCallback?;
55
76
  private onDeviceFoundCallback?;
56
77
  private onDeviceStatusChangedCallback?;
78
+ private onConnectionEventCallback?;
57
79
  private onScanResult;
58
80
  private queueAutoConnect;
59
81
  private removeDeviceFromFoundedDevices;
@@ -1 +1 @@
1
- {"version":3,"file":"bt-manager.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/services/bt-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,UAAU,EACV,MAAM,EAIP,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,UAAU,gBAAgB;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAE1C,gFAAgF;IAChF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,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AgB,CAAC,CAAiD;IAC1E,OAAO,CAAC,eAAe,CAAC,CAAgC;IACxD,OAAO,CAAC,qBAAqB,CAAC,CAGX;IACnB,OAAO,CAAC,6BAA6B,CAAC,CAE5B;IACV,OAAO,CAAC,yBAAyB,CAAC,CAAwC;IAE1E,OAAO,CAAC,YAAY,CA+FlB;IAEF,OAAO,CAAC,gBAAgB,CAgCtB;IAEF,OAAO,CAAC,8BAA8B,CAUpC;CACH;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { BleError, Device } from "react-native-ble-plx";
2
2
  import { DeviceCommand } from "../../types/device-command";
3
+ import { DeviceConnectionEvent } from "../../types/device-connection-event";
3
4
  import { DeviceStatus } from "../../types/device-status";
4
5
  import { IMedicalDevice } from "../../types/i-medical-device";
5
6
  import { readDeviceInformation } from "./bt-device-information";
@@ -8,6 +9,7 @@ interface ConnectionHandlerCallbacks {
8
9
  onError?: (error: BleError | Error) => void;
9
10
  onDataReceived?: (uuid: string, value: string[]) => void;
10
11
  onDeviceInfo?: Parameters<typeof readDeviceInformation>[1];
12
+ onConnectionEvent?: (event: Omit<DeviceConnectionEvent, "deviceData">) => void;
11
13
  /** The commands to send once every characteristic is subscribed. */
12
14
  initialCommands?: () => readonly DeviceCommand[];
13
15
  /** Called after the first command has been written to the peripheral. */
@@ -35,6 +37,8 @@ export declare class BTConnectionHandler {
35
37
  * refusal is recorded and the connection continues.
36
38
  */
37
39
  private requestPreferredMtu;
40
+ /** Reads the standard Battery Service when a peripheral exposes it. */
41
+ private readBatteryLevel;
38
42
  private connectWithRetries;
39
43
  private onDeviceDisconnected;
40
44
  private subscribeToAllCharacteristics;
@@ -1 +1 @@
1
- {"version":3,"file":"bt-connection-handler.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/bt-connection-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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,sBAuBZ;IAEK,OAAO,aAMZ;IAEF,6DAA6D;IACtD,YAAY,GAAI,UAAU,SAAS,aAAa,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAC5C;IAE7B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAiBzB;IAEF,OAAO,CAAC,kBAAkB,CA2CxB;IAEF,OAAO,CAAC,oBAAoB,CAiB1B;IAEF,OAAO,CAAC,6BAA6B,CAiDnC;CACH"}
1
+ {"version":3,"file":"bt-connection-handler.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/bt-connection-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAStE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,UAAU,0BAA0B;IAClC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,iBAAiB,CAAC,EAAE,CAClB,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,KAC7C,IAAI,CAAC;IAEV,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,SAAS,aAAa,EAAE,CAAC;IAEjD,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC;CACpC;AAED,qBAAa,mBAAmB;IAM5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IARhC,OAAO,CAAC,wBAAwB,CAA2B;IAC3D,OAAO,CAAC,2BAA2B,CAAsB;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;gBAGtB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,cAAc,CAAC,aAAa,CAAC,EAC3C,SAAS,EAAE,0BAA0B,EACrC,YAAY,CAAC,EAAE,MAAM,YAAA;IAKjC,OAAO,sBAyDZ;IAEK,OAAO,aAMZ;IAEF,6DAA6D;IACtD,YAAY,GAAI,UAAU,SAAS,aAAa,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAC5C;IAE7B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAiBzB;IAEF,uEAAuE;IACvE,OAAO,CAAC,gBAAgB,CAwBtB;IAEF,OAAO,CAAC,kBAAkB,CA2CxB;IAEF,OAAO,CAAC,oBAAoB,CAiB1B;IAEF,OAAO,CAAC,6BAA6B,CAiDnC;CACH"}
@@ -3,6 +3,7 @@ import { BleError, Device } from "react-native-ble-plx";
3
3
  import { CommandSequencer } from "../../types/command-sequencer";
4
4
  import { CreateDeviceParams } from "../../types/create-device-params";
5
5
  import { DependentResultHandlerParams } from "../../types/dependent-result-handler-params";
6
+ import { DeviceConnectionEvent } from "../../types/device-connection-event";
6
7
  import { DeviceData } from "../../types/device-data";
7
8
  import { DeviceKey } from "../../types/device-key";
8
9
  import { MeasurementTypeForDevices } from "../../types/device-measurement-map";
@@ -18,7 +19,11 @@ export declare abstract class BTManagedDevice<T extends DeviceKey = IntegratedDe
18
19
  private connectionHandler;
19
20
  private dataProcessor;
20
21
  private readonly oneReadingPerConnection;
22
+ private readonly resultPolicy;
21
23
  private resultReportedThisConnection;
24
+ private reportedMeasurementKinds;
25
+ private reportedDailyTotals;
26
+ private historyResultCount;
22
27
  deviceData: DeviceData;
23
28
  /**
24
29
  * The timeout in milliseconds for the stuck data.
@@ -73,8 +78,11 @@ export declare abstract class BTManagedDevice<T extends DeviceKey = IntegratedDe
73
78
  onDeviceStatusChanged?: (status: DeviceStatus, measurementTypeKey?: MeasurementTypeKey) => void;
74
79
  onResult?: (data: MeasurementWithCaseType<MeasurementTypeForDevices<[T]>>) => void;
75
80
  onDeviceDisconnected?: () => void;
76
- constructor(device: Device, { deviceName, onError: onErrorCallback, onDeviceStatusChanged: onDeviceStatusChangedCallback, onResult: onResultCallback, onDeviceDisconnected: onDeviceDisconnectedCallback, oneReadingPerConnection, }: CreateDeviceParams<T>);
81
+ onConnectionEvent?: (data: DeviceConnectionEvent) => void;
82
+ constructor(device: Device, { deviceName, onError: onErrorCallback, onDeviceStatusChanged: onDeviceStatusChangedCallback, onResult: onResultCallback, onConnectionEvent: onConnectionEventCallback, onDeviceDisconnected: onDeviceDisconnectedCallback, oneReadingPerConnection, resultPolicy, }: CreateDeviceParams<T>);
77
83
  destroy: () => void;
84
+ /** Stops this device's subscriptions and closes its BLE connection. */
85
+ disconnect: () => Promise<void>;
78
86
  connect: () => Promise<void>;
79
87
  }
80
88
  //# sourceMappingURL=bt-managed-device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bt-managed-device.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/bt-managed-device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,gBAAgB,E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AE,CAChB,IAAI,EAAE,uBAAuB,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAC1D,IAAI,CAAC;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;gBAE/C,MAAM,EAAE,MAAM,EAE9B,EACE,UAAU,EACV,OAAO,EAAE,eAAe,EACxB,qBAAqB,EAAE,6BAA6B,EACpD,QAAQ,EAAE,gBAAgB,EAC1B,iBAAiB,EAAE,yBAAyB,EAC5C,oBAAoB,EAAE,4BAA4B,EAClD,uBAAuB,EACvB,YAAY,GACb,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAqKnB,OAAO,aAWZ;IAEF,uEAAuE;IAChE,UAAU,sBAWf;IAEK,OAAO,sBAqFZ;CACH"}
@@ -13,13 +13,14 @@ interface MeasurementStateCallbacks {
13
13
  *
14
14
  * A result is reported whether or not a stream preceded it, because a device already
15
15
  * holding a finished measurement when the app connects has a real reading to hand over.
16
- * Repeats are suppressed on the case transition rather than on the values, so a second
17
- * measurement that happens to read the same as the first is still reported.
16
+ * Identical result frames are suppressed, while a changed frame in the same case is still
17
+ * reported as a new measurement.
18
18
  */
19
19
  export declare class MeasurementStateMachine<T extends Measurement> {
20
20
  private readonly callbacks;
21
21
  private isMeasuring;
22
22
  private lastCaseValue;
23
+ private lastFrame;
23
24
  constructor(callbacks: MeasurementStateCallbacks);
24
25
  reset: () => void;
25
26
  advance: ({ parsingCase, measurementTypeKey, parsedData, }: DependentResultHandlerParams<T>, frame: string[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"measurement-state-machine.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/measurement-state-machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAG7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,UAAU,yBAAyB;IACjC,eAAe,CAAC,EAAE,CAChB,MAAM,EAAE,YAAY,EACpB,kBAAkB,CAAC,EAAE,kBAAkB,KACpC,IAAI,CAAC;IACV,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,CACT,UAAU,EAAE,uBAAuB,CAAC,WAAW,CAAC,EAChD,KAAK,EAAE,MAAM,EAAE,KACZ,OAAO,GAAG,IAAI,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,qBAAa,uBAAuB,CAAC,CAAC,SAAS,WAAW;IAI5C,OAAO,CAAC,QAAQ,CAAC,SAAS;IAHtC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,aAAa,CAAqB;gBAEb,SAAS,EAAE,yBAAyB;IAE1D,KAAK,QAAO,IAAI,CAGrB;IAEK,OAAO,GACZ,kDAIG,4BAA4B,CAAC,CAAC,CAAC,EAClC,OAAO,MAAM,EAAE,KACd,IAAI,CA6BL;IAEF,OAAO,CAAC,cAAc,CAIpB;IAEF,OAAO,CAAC,aAAa,CAMnB;CACH"}
1
+ {"version":3,"file":"measurement-state-machine.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/measurement-state-machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAG7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,UAAU,yBAAyB;IACjC,eAAe,CAAC,EAAE,CAChB,MAAM,EAAE,YAAY,EACpB,kBAAkB,CAAC,EAAE,kBAAkB,KACpC,IAAI,CAAC;IACV,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,CACT,UAAU,EAAE,uBAAuB,CAAC,WAAW,CAAC,EAChD,KAAK,EAAE,MAAM,EAAE,KACZ,OAAO,GAAG,IAAI,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,qBAAa,uBAAuB,CAAC,CAAC,SAAS,WAAW;IAK5C,OAAO,CAAC,QAAQ,CAAC,SAAS;IAJtC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,SAAS,CAAuB;gBAEX,SAAS,EAAE,yBAAyB;IAE1D,KAAK,QAAO,IAAI,CAIrB;IAEK,OAAO,GACZ,kDAIG,4BAA4B,CAAC,CAAC,CAAC,EAClC,OAAO,MAAM,EAAE,KACd,IAAI,CAgCL;IAEF,OAAO,CAAC,cAAc,CAIpB;IAEF,OAAO,CAAC,aAAa,CAMnB;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"spo2.main-services.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/spo/spo2.main-services.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,EAwCtC,CAAC"}
1
+ {"version":3,"file":"spo2.main-services.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/spo/spo2.main-services.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,EAwDtC,CAAC"}
@@ -14,6 +14,8 @@ type ActivityResult = {
14
14
  measurementTypeKey: MeasurementTypeKey.heartRate;
15
15
  caseType: CaseType.RESULT;
16
16
  heartRate?: number;
17
+ start?: Date;
18
+ end?: Date;
17
19
  };
18
20
  interface VerovalActivitySequencerParams {
19
21
  write: Omit<DeviceCommand, "frame">;
@@ -1 +1 @@
1
- {"version":3,"file":"veroval-activity-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,QAAA,MAAM,OAAO,yCAAyC,CAAC;AACvD,QAAA,MAAM,KAAK,yCAAyC,CAAC;AASrD,KAAK,cAAc,GACf;IACE,kBAAkB,EAAE,kBAAkB,CAAC,SAAS,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,GACD;IACE,kBAAkB,EAAE,kBAAkB,CAAC,SAAS,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIN,UAAU,8BAA8B;IACtC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAgDD,kFAAkF;AAClF,cAAM,wBAAyB,YAAW,gBAAgB;IAWrC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAV1C,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,GAAG,CAAgB;IAC3B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,UAAU,CAAK;gBAEa,MAAM,EAAE,8BAA8B;IAEnE,eAAe,QAAO,SAAS,aAAa,EAAE,CAcnD;IAEK,WAAW,GAChB,OAAO,SAAS,MAAM,EAAE,KACvB,SAAS,aAAa,EAAE,GAAG,SAAS,CAoCrC;IAEF,OAAO,CAAC,WAAW,CAiBjB;IAEF,OAAO,CAAC,WAAW,CA6BjB;IAEF,OAAO,CAAC,gBAAgB,CAgBtB;IAEF,OAAO,CAAC,YAAY,CA0BlB;IAEF,OAAO,CAAC,UAAU,CAuBhB;IAEF,OAAO,CAAC,WAAW,CA0CjB;IAEF,OAAO,CAAC,IAAI,CAKV;CACH;AAED,OAAO,EACL,OAAO,IAAI,wBAAwB,EACnC,KAAK,IAAI,sBAAsB,EAC/B,wBAAwB,GACzB,CAAC"}
1
+ {"version":3,"file":"veroval-activity-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/veroval/veroval-activity-sequencer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,QAAA,MAAM,OAAO,yCAAyC,CAAC;AACvD,QAAA,MAAM,KAAK,yCAAyC,CAAC;AASrD,KAAK,cAAc,GACf;IACE,kBAAkB,EAAE,kBAAkB,CAAC,SAAS,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,K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OAAO,CAAC,IAAI,CAKV;CACH;AAED,OAAO,EACL,OAAO,IAAI,wBAAwB,EACnC,KAAK,IAAI,sBAAsB,EAC/B,wBAAwB,GACzB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { BleManager, Device, State } from "react-native-ble-plx";
2
+ export interface FakeBleManagerOptions {
3
+ state?: State;
4
+ devices?: readonly Device[];
5
+ }
6
+ /** A deterministic BLE manager for hook and scan integration tests. No hardware is used. */
7
+ export interface FakeBleManager {
8
+ manager: BleManager;
9
+ emitDevice: (device: Device) => void;
10
+ emitError: (error: unknown) => void;
11
+ setState: (state: State) => void;
12
+ getScannedServiceUUIDs: () => readonly string[] | null;
13
+ stopDeviceScan: () => void;
14
+ }
15
+ export declare const createFakeBleManager: ({ state, devices, }?: FakeBleManagerOptions) => FakeBleManager;
16
+ //# sourceMappingURL=fake-ble-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fake-ble-manager.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/testing/fake-ble-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,sBAAsB,CAAC;AAE/E,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,UAAU,CAAC;IACpB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,sBAAsB,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACvD,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,GAAI,sBAGlC,qBAA0B,KAAG,cA6C/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./fake-ble-manager";
2
+ export * from "./recorded-frames";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/testing/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface RecordedBleFrame {
2
+ characteristicUUID: string;
3
+ value: string;
4
+ /** Optional delay used by replay tests; defaults to zero. */
5
+ delayMs?: number;
6
+ }
7
+ export type RecordedFrameSink = (frame: RecordedBleFrame) => void | Promise<void>;
8
+ /** Replays captured characteristic frames through an app-provided test sink. */
9
+ export declare const replayRecordedFrames: (frames: readonly RecordedBleFrame[], sink: RecordedFrameSink) => Promise<void>;
10
+ /** A registry helper lets an app keep fixtures for every device it supports. */
11
+ export declare const defineRecordedDeviceFrames: <T extends string>(fixtures: Record<T, readonly RecordedBleFrame[]>) => Readonly<Record<T, readonly RecordedBleFrame[]>>;
12
+ //# sourceMappingURL=recorded-frames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorded-frames.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/testing/recorded-frames.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IAEd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAElF,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,SAAS,gBAAgB,EAAE,EACnC,MAAM,iBAAiB,KACtB,OAAO,CAAC,IAAI,CAOd,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,MAAM,EACzD,UAAU,MAAM,CAAC,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC,KAC/C,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAAa,CAAC"}
@@ -7,8 +7,10 @@ interface BackgroundSyncStorage {
7
7
  setItem: (key: string, value: string) => Promise<void>;
8
8
  }
9
9
  interface BackgroundSyncResult<T extends DeviceKey = DeviceKey> extends ResultCallback<T> {
10
- /** Stable identifier for idempotent delivery by the application backend. */
10
+ /** Stable reading identity for idempotent delivery by the application backend. */
11
11
  id: string;
12
+ /** Queue entry identity; unlike `id`, this changes when a reading is enqueued again. */
13
+ queueId?: string;
12
14
  queuedAt: string;
13
15
  attempt: number;
14
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"background-sync.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/background-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,UAAU,qBAAqB;IAC7B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,UAAU,oBAAoB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CAC5D,SAAQ,cAAc,CAAC,CAAC,CAAC;IAEzB,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAA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CAAC;KAC9D,CAAC;IAEF,kFAAkF;IAClF,aAAa,CAAC,EAAE;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;QAC9D,IAAI,CAAC,EACD,uBAAuB,CAAC,MAAM,CAAC,GAC/B,CAAC,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC;KAC5E,CAAC;IAEF,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ export declare enum BluetoothErrorCode {
2
+ UNKNOWN = "bluetooth.unknown",
3
+ PERMISSION_DENIED = "bluetooth.permission-denied",
4
+ UNSUPPORTED = "bluetooth.unsupported",
5
+ SCAN_FAILED = "bluetooth.scan-failed",
6
+ CONNECTION_FAILED = "bluetooth.connection-failed",
7
+ PAIRING_REQUIRED = "bluetooth.pairing-required",
8
+ DISCOVERY_FAILED = "bluetooth.discovery-failed",
9
+ DEVICE_ERROR = "bluetooth.device-error",
10
+ FRAME_INVALID = "bluetooth.frame-invalid",
11
+ MEASUREMENT_FAILED = "bluetooth.measurement-failed",
12
+ BACKGROUND_SYNC = "bluetooth.background-sync"
13
+ }
14
+ export declare class BluetoothError extends Error {
15
+ readonly code: BluetoothErrorCode;
16
+ readonly translationKey?: string | undefined;
17
+ readonly originalError?: unknown | undefined;
18
+ readonly name = "BluetoothError";
19
+ constructor(code: BluetoothErrorCode, message: string, translationKey?: string | undefined, originalError?: unknown | undefined);
20
+ }
21
+ export declare const bluetoothErrorCodeFor: (error: unknown) => BluetoothErrorCode;
22
+ export declare const toBluetoothError: (error: unknown) => BluetoothError;
23
+ //# sourceMappingURL=bluetooth-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bluetooth-error.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/bluetooth-error.ts"],"names":[],"mappings":"AAIA,oBAAY,kBAAkB;IAC5B,OAAO,sBAAsB;IAC7B,iBAAiB,gCAAgC;IACjD,WAAW,0BAA0B;IACrC,WAAW,0BAA0B;IACrC,iBAAiB,gCAAgC;IACjD,gBAAgB,+BAA+B;IAC/C,gBAAgB,+BAA+B;IAC/C,YAAY,2BAA2B;IACvC,aAAa,4BAA4B;IACzC,kBAAkB,iCAAiC;IACnD,eAAe,8BAA8B;CAC9C;AAED,qBAAa,cAAe,SAAQ,KAAK;aAIrB,IAAI,EAAE,kBAAkB;aAExB,cAAc,CAAC,EAAE,MAAM;aACvB,aAAa,CAAC,EAAE,OAAO;IANzC,SAAgB,IAAI,oBAAoB;gBAGtB,IAAI,EAAE,kBAAkB,EACxC,OAAO,EAAE,MAAM,EACC,cAAc,CAAC,EAAE,MAAM,YAAA,EACvB,aAAa,CAAC,EAAE,OAAO,YAAA;CAI1C;AAiBD,eAAO,MAAM,qBAAqB,GAChC,OAAO,OAAO,KACb,kBAwCF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,cAajD,CAAC"}
@@ -3,19 +3,23 @@ import { BTManager } from "../services/bt-manager";
3
3
  import { BTManagedDevice } from "../services/devices/bt-managed-device";
4
4
  import { AcceptedDevice } from "./accepted-device";
5
5
  import { BackgroundSyncOptions } from "./background-sync";
6
+ import { DeviceConnectionEvent } from "./device-connection-event";
6
7
  import { DeviceKeyOf } from "./device-key-of";
7
8
  import { DeviceStatusChangeCallback } from "./device-status-change-callback";
8
9
  import { ErrorCallback } from "./error-callback";
9
10
  import { ResultCallback } from "./result-callback";
11
+ import { DeviceResultPolicy } from "./result-policy";
10
12
  export interface BTProviderChildWrapperProps<T extends readonly AcceptedDevice[]> {
11
13
  bleManager: BleManager;
12
14
  acceptedDevices: T;
13
15
  oneReadingPerConnection?: boolean;
14
16
  deliveredEcgFileNames?: readonly string[];
17
+ resultPolicies?: Partial<Record<string, DeviceResultPolicy>>;
15
18
  backgroundSync?: BackgroundSyncOptions<DeviceKeyOf<T>>;
16
19
  onDeviceFound?: (device: BTManagedDevice<DeviceKeyOf<T>>, manager: BTManager<T>) => Promise<void>;
17
20
  onError?: (data: ErrorCallback) => void;
18
21
  onDeviceStatusChanged?: (data: DeviceStatusChangeCallback) => void;
22
+ onConnectionEvent?: (data: DeviceConnectionEvent) => void;
19
23
  onResult?: (data: ResultCallback<DeviceKeyOf<T>>) => void;
20
24
  }
21
25
  //# sourceMappingURL=btprovider-children-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"btprovider-children-props.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/btprovider-children-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS,SAAS,cAAc,EAAE;IAEnC,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,CAAC,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,cAAc,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EACvC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC3D"}
1
+ {"version":3,"file":"btprovider-children-props.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/btprovider-children-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS,SAAS,cAAc,EAAE;IAEnC,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,CAAC,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC7D,cAAc,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EACvC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC3D"}
@@ -1,16 +1,20 @@
1
1
  import { Device } from "react-native-ble-plx";
2
+ import { DeviceConnectionEvent } from "./device-connection-event";
2
3
  import { DeviceKey } from "./device-key";
3
4
  import { DeviceStatusChangeCallback } from "./device-status-change-callback";
4
5
  import { ErrorCallback } from "./error-callback";
5
6
  import { ResultCallback } from "./result-callback";
7
+ import { DeviceResultPolicy } from "./result-policy";
6
8
  export interface CreateDeviceParams<T extends DeviceKey> {
7
9
  device: Device;
8
10
  deviceName: T;
9
11
  onError?: (data: ErrorCallback) => void;
10
12
  onDeviceStatusChanged?: (data: DeviceStatusChangeCallback) => void;
11
13
  onResult?: (data: ResultCallback<T>) => void;
14
+ onConnectionEvent?: (data: DeviceConnectionEvent) => void;
12
15
  onDeviceDisconnected?: () => void;
13
16
  oneReadingPerConnection?: boolean;
14
17
  deliveredEcgFileNames?: readonly string[];
18
+ resultPolicy?: DeviceResultPolicy;
15
19
  }
16
20
  //# sourceMappingURL=create-device-params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-device-params.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/create-device-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,SAAS;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C"}
1
+ {"version":3,"file":"create-device-params.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/create-device-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,SAAS;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC1D,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC"}
@@ -0,0 +1,16 @@
1
+ import { DeviceData } from "./device-data";
2
+ export type DeviceConnectionEventKind = "pairing" | "bonded" | "history-download" | "battery";
3
+ export interface DeviceConnectionEvent {
4
+ deviceData: DeviceData;
5
+ kind: DeviceConnectionEventKind;
6
+ /** True when the platform is waiting for the user to confirm or enter a pairing code. */
7
+ pairingCodeRequired?: boolean;
8
+ /** Progress for a history transfer when the protocol exposes record counts. */
9
+ progress?: {
10
+ current: number;
11
+ total?: number;
12
+ };
13
+ /** Battery percentage when the device exposes the standard Battery Service. */
14
+ batteryLevel?: number;
15
+ }
16
+ //# sourceMappingURL=device-connection-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-connection-event.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-connection-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,QAAQ,GACR,kBAAkB,GAClB,SAAS,CAAC;AAEd,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,yBAAyB,CAAC;IAEhC,yFAAyF;IACzF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -6,6 +6,8 @@ import { IntegratedDevices } from "./integrated-devices";
6
6
  type ActivityHeartRateMeasurement = {
7
7
  measurementTypeKey: MeasurementTypeKey.heartRate;
8
8
  heartRate?: number;
9
+ start?: Date;
10
+ end?: Date;
9
11
  };
10
12
  type ActivityStepCountMeasurement = {
11
13
  measurementTypeKey: MeasurementTypeKey.stepCount;
@@ -1 +1 @@
1
- {"version":3,"file":"device-measurement-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-measurement-map.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACxB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,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AC,EAAE,cAAc,CAAC;IAChD,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAChC,4BAA4B,GAC5B,4BAA4B,CAAC;IACjC,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAChC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACjC,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC;IAC9B,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;CAClD;AAED;;;GAGG;AACH,KAAK,oBAAoB,CAAC,CAAC,SAAS,SAAS,IAAI,CAAC,SAAS,iBAAiB,GACxE,oBAAoB,CAAC,CAAC,CAAC,GACvB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS,SAAS,EAAE,IAClE,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"device-measurement-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-measurement-map.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACxB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM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C,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAClE,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC;IAChD,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAChC,4BAA4B,GAC5B,4BAA4B,CAAC;IACjC,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAChC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACjC,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC;IAC9B,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;CAClD;AAED;;;GAGG;AACH,KAAK,oBAAoB,CAAC,CAAC,SAAS,SAAS,IAAI,CAAC,SAAS,iBAAiB,GACxE,oBAAoB,CAAC,CAAC,CAAC,GACvB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS,SAAS,EAAE,IAClE,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC"}
@@ -1,7 +1,10 @@
1
- import { BleError } from "react-native-ble-plx";
1
+ import { BluetoothError, BluetoothErrorCode } from "./bluetooth-error";
2
2
  import { DeviceData } from "./device-data";
3
3
  export interface ErrorCallback {
4
4
  deviceData?: DeviceData;
5
- error: BleError | Error | string;
5
+ /** Measurement translation keys remain compatible with existing consumers. */
6
+ error: BluetoothError | Error | string;
7
+ /** Stable machine-readable code for every normalized native/SDK failure. */
8
+ code?: BluetoothErrorCode;
6
9
  }
7
10
  //# sourceMappingURL=error-callback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-callback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/error-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CAClC"}
1
+ {"version":3,"file":"error-callback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/error-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,8EAA8E;IAC9E,KAAK,EAAE,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;IAEvC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B"}
@@ -1,5 +1,6 @@
1
1
  export interface IBTManagedDevice {
2
2
  id: string;
3
3
  connect: () => Promise<void>;
4
+ disconnect: () => Promise<void>;
4
5
  }
5
6
  //# sourceMappingURL=i-bt-managed-device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i-bt-managed-device.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/i-bt-managed-device.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B"}
1
+ {"version":3,"file":"i-bt-managed-device.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/i-bt-managed-device.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC"}
@@ -2,6 +2,8 @@ import { DeviceData } from "./device-data";
2
2
  import { DeviceKey } from "./device-key";
3
3
  import { MeasurementTypeForDevices } from "./device-measurement-map";
4
4
  export interface ResultCallback<T extends DeviceKey> {
5
+ /** Stable identity derived from the peripheral and recorded reading. */
6
+ id: string;
5
7
  deviceData: DeviceData;
6
8
  data: Omit<MeasurementTypeForDevices<[T]>, "caseType">;
7
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"result-callback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/result-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS;IACjD,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACxD"}
1
+ {"version":3,"file":"result-callback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/result-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS;IAEjD,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACxD"}
@@ -0,0 +1,8 @@
1
+ import { MeasurementTypeKey } from "@ovok/core";
2
+ export type ResultPolicy = "all" | "daily-totals-only" | "first-reading-per-kind-per-connection";
3
+ export type ResultPolicyByMeasurement = Partial<Record<MeasurementTypeKey, ResultPolicy>>;
4
+ export interface DeviceResultPolicy {
5
+ default?: ResultPolicy;
6
+ byMeasurement?: ResultPolicyByMeasurement;
7
+ }
8
+ //# sourceMappingURL=result-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-policy.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/result-policy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,mBAAmB,GACnB,uCAAuC,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,MAAM,CAAC,kBAAkB,EAAE,YAAY,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,aAAa,CAAC,EAAE,yBAAyB,CAAC;CAC3C"}
@@ -0,0 +1,10 @@
1
+ import { Measurement } from "@ovok/core";
2
+ import { DeviceData } from "../types/device-data";
3
+ /**
4
+ * Creates an identity that is stable when a device sends its stored history again.
5
+ * Recording IDs, timestamps and indexes are retained in the canonical payload; transient
6
+ * delivery metadata is deliberately not part of the key.
7
+ */
8
+ export declare const createStableResultId: (deviceData: DeviceData, data: Measurement) => string;
9
+ export declare const reviveResultDates: <T>(value: T) => T;
10
+ //# sourceMappingURL=result-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-identity.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/result-identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAsClD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,YAAY,UAAU,EACtB,MAAM,WAAW,KAChB,MAYF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,CA4B/C,CAAC"}