@ovok/native 1.16.1-rc.3 → 1.16.1-rc.5

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 (837) hide show
  1. package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
  2. package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
  3. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +9 -141
  4. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
  5. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
  6. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  7. package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js +160 -0
  8. package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js.map +1 -0
  9. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
  10. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js +2 -1
  11. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
  12. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +1 -1
  13. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
  14. package/lib/commonjs/modules/bt-management/index.js +12 -0
  15. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  16. package/lib/commonjs/modules/bt-management/services/bt-manager.js +50 -0
  17. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  18. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +3 -0
  19. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  20. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +4 -2
  21. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  22. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
  23. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  24. package/lib/commonjs/modules/bt-management/services/devices/bt-current-time.js +59 -0
  25. package/lib/commonjs/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
  26. package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js +18 -37
  27. package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
  28. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +31 -3
  29. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  30. package/lib/commonjs/modules/bt-management/services/devices/bt-notification-readiness.js +68 -0
  31. package/lib/commonjs/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
  32. package/lib/commonjs/modules/bt-management/services/devices/bt-pairing-retry.js +70 -0
  33. package/lib/commonjs/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
  34. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +14 -0
  35. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  36. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +4 -7
  37. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
  38. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +106 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
  40. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
  41. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  42. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +41 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +77 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +49 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +89 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +35 -42
  51. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  52. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +22 -24
  53. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  54. package/lib/commonjs/modules/bt-management/services/record-cursor.js +70 -0
  55. package/lib/commonjs/modules/bt-management/services/record-cursor.js.map +1 -0
  56. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +8 -0
  57. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
  58. package/lib/commonjs/modules/bt-management/types/glucose-record-details.js +2 -0
  59. package/lib/commonjs/modules/bt-management/types/glucose-record-details.js.map +1 -0
  60. package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js +19 -0
  61. package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
  62. package/lib/commonjs/modules/bt-management/utils/device-user.js +22 -0
  63. package/lib/commonjs/modules/bt-management/utils/device-user.js.map +1 -0
  64. package/lib/commonjs/modules/bt-management/utils/kpa-to-mmhg.js +9 -0
  65. package/lib/commonjs/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
  66. package/lib/commonjs/modules/bt-management/utils/result-identity.js +26 -35
  67. package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
  68. package/lib/commonjs/modules/bt-management/utils/rr-interval.js +16 -0
  69. package/lib/commonjs/modules/bt-management/utils/rr-interval.js.map +1 -0
  70. package/lib/commonjs/modules/bt-management/utils/temperature-type.js +15 -0
  71. package/lib/commonjs/modules/bt-management/utils/temperature-type.js.map +1 -0
  72. package/lib/commonjs/modules/bt-management/utils/wait.js +10 -0
  73. package/lib/commonjs/modules/bt-management/utils/wait.js.map +1 -0
  74. package/lib/commonjs/modules/next/background-sync/index.js +28 -0
  75. package/lib/commonjs/modules/next/background-sync/index.js.map +1 -0
  76. package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js +63 -0
  77. package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  78. package/lib/commonjs/modules/next/bluetooth/auto-connect.js +32 -0
  79. package/lib/commonjs/modules/next/bluetooth/auto-connect.js.map +1 -0
  80. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js +33 -0
  81. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
  82. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js +162 -0
  83. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
  84. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js +35 -0
  85. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  86. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +48 -0
  87. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  88. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +34 -0
  89. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  90. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +67 -0
  91. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  92. package/lib/commonjs/modules/next/bluetooth/connections.js +114 -0
  93. package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -0
  94. package/lib/commonjs/modules/next/bluetooth/daily-total-day.js.map +1 -0
  95. package/lib/commonjs/modules/next/bluetooth/devices.js +41 -0
  96. package/lib/commonjs/modules/next/bluetooth/devices.js.map +1 -0
  97. package/lib/commonjs/modules/next/bluetooth/driver.js +30 -20
  98. package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
  99. package/lib/commonjs/modules/next/bluetooth/errors.js +26 -0
  100. package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -0
  101. package/lib/commonjs/modules/next/bluetooth/index.js +122 -11
  102. package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
  103. package/lib/commonjs/modules/next/bluetooth/link.js +0 -103
  104. package/lib/commonjs/modules/next/bluetooth/link.js.map +1 -1
  105. package/lib/commonjs/modules/next/bluetooth/paired.js +50 -0
  106. package/lib/commonjs/modules/next/bluetooth/paired.js.map +1 -0
  107. package/lib/commonjs/modules/next/bluetooth/permissions.js +2 -0
  108. package/lib/commonjs/modules/next/bluetooth/permissions.js.map +1 -0
  109. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js +44 -0
  110. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  111. package/lib/commonjs/modules/next/bluetooth/react/context.js +54 -0
  112. package/lib/commonjs/modules/next/bluetooth/react/context.js.map +1 -0
  113. package/lib/commonjs/modules/next/bluetooth/react/hooks.js +86 -0
  114. package/lib/commonjs/modules/next/bluetooth/react/hooks.js.map +1 -0
  115. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +28 -0
  116. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  117. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js +32 -0
  118. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  119. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js +43 -0
  120. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  121. package/lib/commonjs/modules/next/bluetooth/readings.js +93 -0
  122. package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -0
  123. package/lib/commonjs/modules/next/bluetooth/result-policy.js +15 -2
  124. package/lib/commonjs/modules/next/bluetooth/result-policy.js.map +1 -1
  125. package/lib/commonjs/modules/next/bluetooth/runtime.js +223 -0
  126. package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -0
  127. package/lib/commonjs/modules/next/bluetooth/scan-loop.js +82 -0
  128. package/lib/commonjs/modules/next/bluetooth/scan-loop.js.map +1 -0
  129. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js +46 -13
  130. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js.map +1 -1
  131. package/lib/commonjs/modules/next/bluetooth/sink.js +6 -0
  132. package/lib/commonjs/modules/next/bluetooth/sink.js.map +1 -0
  133. package/lib/commonjs/modules/next/bluetooth/snapshot.js +6 -0
  134. package/lib/commonjs/modules/next/bluetooth/snapshot.js.map +1 -0
  135. package/lib/commonjs/modules/next/bluetooth/stable-hash.js +42 -0
  136. package/lib/commonjs/modules/next/bluetooth/stable-hash.js.map +1 -0
  137. package/lib/commonjs/modules/next/bluetooth/store.js +61 -0
  138. package/lib/commonjs/modules/next/bluetooth/store.js.map +1 -0
  139. package/lib/commonjs/modules/next/bluetooth/transport.js +6 -0
  140. package/lib/commonjs/modules/next/bluetooth/transport.js.map +1 -0
  141. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +28 -0
  142. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  143. package/lib/commonjs/modules/next/bluetooth/web/index.js +208 -0
  144. package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -0
  145. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js +143 -0
  146. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  147. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js +43 -0
  148. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  149. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js +21 -0
  150. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  151. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js +133 -0
  152. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  153. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js +28 -0
  154. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  155. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js +37 -0
  156. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  157. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  158. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  159. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js +83 -0
  160. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  161. package/lib/commonjs/modules/next/breathing-exercise/index.js +17 -0
  162. package/lib/commonjs/modules/next/breathing-exercise/index.js.map +1 -0
  163. package/lib/commonjs/modules/next/cms/index.js +17 -0
  164. package/lib/commonjs/modules/next/cms/index.js.map +1 -0
  165. package/lib/commonjs/modules/next/content/index.js +17 -0
  166. package/lib/commonjs/modules/next/content/index.js.map +1 -0
  167. package/lib/commonjs/modules/next/data-sync/index.js +17 -0
  168. package/lib/commonjs/modules/next/data-sync/index.js.map +1 -0
  169. package/lib/commonjs/modules/next/diary/index.js +17 -0
  170. package/lib/commonjs/modules/next/diary/index.js.map +1 -0
  171. package/lib/commonjs/modules/next/image/index.js +17 -0
  172. package/lib/commonjs/modules/next/image/index.js.map +1 -0
  173. package/lib/commonjs/modules/next/journal/index.js +17 -0
  174. package/lib/commonjs/modules/next/journal/index.js.map +1 -0
  175. package/lib/commonjs/modules/next/language-switcher/index.js +17 -0
  176. package/lib/commonjs/modules/next/language-switcher/index.js.map +1 -0
  177. package/lib/commonjs/modules/next/measurement/index.js +17 -0
  178. package/lib/commonjs/modules/next/measurement/index.js.map +1 -0
  179. package/lib/commonjs/modules/next/observation-detail/index.js +17 -0
  180. package/lib/commonjs/modules/next/observation-detail/index.js.map +1 -0
  181. package/lib/commonjs/modules/next/patient/index.js +17 -0
  182. package/lib/commonjs/modules/next/patient/index.js.map +1 -0
  183. package/lib/commonjs/modules/next/pdf/index.js +17 -0
  184. package/lib/commonjs/modules/next/pdf/index.js.map +1 -0
  185. package/lib/commonjs/modules/next/picker-sheet/index.js +17 -0
  186. package/lib/commonjs/modules/next/picker-sheet/index.js.map +1 -0
  187. package/lib/commonjs/modules/next/progress-bar/index.js +17 -0
  188. package/lib/commonjs/modules/next/progress-bar/index.js.map +1 -0
  189. package/lib/commonjs/modules/next/progress-ring/index.js +17 -0
  190. package/lib/commonjs/modules/next/progress-ring/index.js.map +1 -0
  191. package/lib/commonjs/modules/next/setting/index.js +17 -0
  192. package/lib/commonjs/modules/next/setting/index.js.map +1 -0
  193. package/lib/commonjs/modules/next/tab/index.js +17 -0
  194. package/lib/commonjs/modules/next/tab/index.js.map +1 -0
  195. package/lib/commonjs/modules/next/theme/index.js +17 -0
  196. package/lib/commonjs/modules/next/theme/index.js.map +1 -0
  197. package/lib/commonjs/modules/next/tile/index.js +17 -0
  198. package/lib/commonjs/modules/next/tile/index.js.map +1 -0
  199. package/lib/commonjs/modules/next/ui/index.js +17 -0
  200. package/lib/commonjs/modules/next/ui/index.js.map +1 -0
  201. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
  202. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
  203. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +9 -141
  204. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
  205. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
  206. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  207. package/lib/module/modules/bt-management/components/device-picker-sheet.js +154 -0
  208. package/lib/module/modules/bt-management/components/device-picker-sheet.js.map +1 -0
  209. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
  210. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +4 -3
  211. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
  212. package/lib/module/modules/bt-management/hooks/use-measurements.js +1 -1
  213. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
  214. package/lib/module/modules/bt-management/index.js +1 -0
  215. package/lib/module/modules/bt-management/index.js.map +1 -1
  216. package/lib/module/modules/bt-management/services/bt-manager.js +50 -0
  217. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  218. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +3 -0
  219. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  220. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +4 -2
  221. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  222. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
  223. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  224. package/lib/module/modules/bt-management/services/devices/bt-current-time.js +55 -0
  225. package/lib/module/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
  226. package/lib/module/modules/bt-management/services/devices/bt-device-information.js +18 -37
  227. package/lib/module/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
  228. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +33 -5
  229. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  230. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js +65 -0
  231. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
  232. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js +65 -0
  233. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
  234. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +14 -0
  235. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  236. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +1 -4
  237. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
  238. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +99 -0
  239. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
  240. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
  241. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  242. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +35 -0
  243. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
  244. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +72 -0
  245. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
  246. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +40 -0
  247. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
  248. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +85 -0
  249. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
  250. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +25 -32
  251. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  252. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +18 -20
  253. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  254. package/lib/module/modules/bt-management/services/record-cursor.js +66 -0
  255. package/lib/module/modules/bt-management/services/record-cursor.js.map +1 -0
  256. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +8 -0
  257. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
  258. package/lib/module/modules/bt-management/types/custom-device-definition.js +4 -0
  259. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  260. package/lib/module/modules/bt-management/types/glucose-record-details.js +2 -0
  261. package/lib/module/modules/bt-management/types/glucose-record-details.js.map +1 -0
  262. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js +14 -0
  263. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
  264. package/lib/module/modules/bt-management/utils/device-user.js +17 -0
  265. package/lib/module/modules/bt-management/utils/device-user.js.map +1 -0
  266. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js +6 -0
  267. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
  268. package/lib/module/modules/bt-management/utils/result-identity.js +23 -33
  269. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
  270. package/lib/module/modules/bt-management/utils/rr-interval.js +12 -0
  271. package/lib/module/modules/bt-management/utils/rr-interval.js.map +1 -0
  272. package/lib/module/modules/bt-management/utils/temperature-type.js +11 -0
  273. package/lib/module/modules/bt-management/utils/temperature-type.js.map +1 -0
  274. package/lib/module/modules/bt-management/utils/wait.js +5 -0
  275. package/lib/module/modules/bt-management/utils/wait.js.map +1 -0
  276. package/lib/module/modules/next/background-sync/index.js +12 -0
  277. package/lib/module/modules/next/background-sync/index.js.map +1 -0
  278. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js +55 -0
  279. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  280. package/lib/module/modules/next/bluetooth/auto-connect.js +28 -0
  281. package/lib/module/modules/next/bluetooth/auto-connect.js.map +1 -0
  282. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js +28 -0
  283. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
  284. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js +159 -0
  285. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
  286. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js +30 -0
  287. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  288. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +44 -0
  289. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  290. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +31 -0
  291. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  292. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +63 -0
  293. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  294. package/lib/module/modules/next/bluetooth/connections.js +110 -0
  295. package/lib/module/modules/next/bluetooth/connections.js.map +1 -0
  296. package/lib/module/modules/next/bluetooth/daily-total-day.js.map +1 -0
  297. package/lib/module/modules/next/bluetooth/devices.js +37 -0
  298. package/lib/module/modules/next/bluetooth/devices.js.map +1 -0
  299. package/lib/module/modules/next/bluetooth/driver.js +29 -20
  300. package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
  301. package/lib/module/modules/next/bluetooth/errors.js +21 -0
  302. package/lib/module/modules/next/bluetooth/errors.js.map +1 -0
  303. package/lib/module/modules/next/bluetooth/index.js +22 -4
  304. package/lib/module/modules/next/bluetooth/index.js.map +1 -1
  305. package/lib/module/modules/next/bluetooth/link.js +0 -101
  306. package/lib/module/modules/next/bluetooth/link.js.map +1 -1
  307. package/lib/module/modules/next/bluetooth/paired.js +46 -0
  308. package/lib/module/modules/next/bluetooth/paired.js.map +1 -0
  309. package/lib/module/modules/next/bluetooth/permissions.js +2 -0
  310. package/lib/module/modules/next/bluetooth/permissions.js.map +1 -0
  311. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js +39 -0
  312. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  313. package/lib/module/modules/next/bluetooth/react/context.js +48 -0
  314. package/lib/module/modules/next/bluetooth/react/context.js.map +1 -0
  315. package/lib/module/modules/next/bluetooth/react/hooks.js +76 -0
  316. package/lib/module/modules/next/bluetooth/react/hooks.js.map +1 -0
  317. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +25 -0
  318. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  319. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js +28 -0
  320. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  321. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js +39 -0
  322. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  323. package/lib/module/modules/next/bluetooth/readings.js +89 -0
  324. package/lib/module/modules/next/bluetooth/readings.js.map +1 -0
  325. package/lib/module/modules/next/bluetooth/result-policy.js +14 -2
  326. package/lib/module/modules/next/bluetooth/result-policy.js.map +1 -1
  327. package/lib/module/modules/next/bluetooth/runtime.js +220 -0
  328. package/lib/module/modules/next/bluetooth/runtime.js.map +1 -0
  329. package/lib/module/modules/next/bluetooth/scan-loop.js +78 -0
  330. package/lib/module/modules/next/bluetooth/scan-loop.js.map +1 -0
  331. package/lib/module/modules/next/bluetooth/sig-profiles.js +44 -11
  332. package/lib/module/modules/next/bluetooth/sig-profiles.js.map +1 -1
  333. package/lib/module/modules/next/bluetooth/sink.js +4 -0
  334. package/lib/module/modules/next/bluetooth/sink.js.map +1 -0
  335. package/lib/module/modules/next/bluetooth/snapshot.js +4 -0
  336. package/lib/module/modules/next/bluetooth/snapshot.js.map +1 -0
  337. package/lib/module/modules/next/bluetooth/stable-hash.js +37 -0
  338. package/lib/module/modules/next/bluetooth/stable-hash.js.map +1 -0
  339. package/lib/module/modules/next/bluetooth/store.js +57 -0
  340. package/lib/module/modules/next/bluetooth/store.js.map +1 -0
  341. package/lib/module/modules/next/bluetooth/transport.js +4 -0
  342. package/lib/module/modules/next/bluetooth/transport.js.map +1 -0
  343. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +25 -0
  344. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  345. package/lib/module/modules/next/bluetooth/web/index.js +28 -0
  346. package/lib/module/modules/next/bluetooth/web/index.js.map +1 -0
  347. package/lib/module/modules/next/bluetooth/web/web-ble-device.js +140 -0
  348. package/lib/module/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  349. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js +39 -0
  350. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  351. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js +18 -0
  352. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  353. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js +128 -0
  354. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  355. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js +25 -0
  356. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  357. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js +29 -0
  358. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  359. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  360. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  361. package/lib/module/modules/next/bluetooth/web/web-gatt.js +79 -0
  362. package/lib/module/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  363. package/lib/module/modules/next/breathing-exercise/index.js +5 -0
  364. package/lib/module/modules/next/breathing-exercise/index.js.map +1 -0
  365. package/lib/module/modules/next/cms/index.js +5 -0
  366. package/lib/module/modules/next/cms/index.js.map +1 -0
  367. package/lib/module/modules/next/content/index.js +5 -0
  368. package/lib/module/modules/next/content/index.js.map +1 -0
  369. package/lib/module/modules/next/data-sync/index.js +11 -0
  370. package/lib/module/modules/next/data-sync/index.js.map +1 -0
  371. package/lib/module/modules/next/diary/index.js +5 -0
  372. package/lib/module/modules/next/diary/index.js.map +1 -0
  373. package/lib/module/modules/next/image/index.js +5 -0
  374. package/lib/module/modules/next/image/index.js.map +1 -0
  375. package/lib/module/modules/next/journal/index.js +5 -0
  376. package/lib/module/modules/next/journal/index.js.map +1 -0
  377. package/lib/module/modules/next/language-switcher/index.js +5 -0
  378. package/lib/module/modules/next/language-switcher/index.js.map +1 -0
  379. package/lib/module/modules/next/measurement/index.js +5 -0
  380. package/lib/module/modules/next/measurement/index.js.map +1 -0
  381. package/lib/module/modules/next/observation-detail/index.js +5 -0
  382. package/lib/module/modules/next/observation-detail/index.js.map +1 -0
  383. package/lib/module/modules/next/patient/index.js +5 -0
  384. package/lib/module/modules/next/patient/index.js.map +1 -0
  385. package/lib/module/modules/next/pdf/index.js +5 -0
  386. package/lib/module/modules/next/pdf/index.js.map +1 -0
  387. package/lib/module/modules/next/picker-sheet/index.js +5 -0
  388. package/lib/module/modules/next/picker-sheet/index.js.map +1 -0
  389. package/lib/module/modules/next/progress-bar/index.js +5 -0
  390. package/lib/module/modules/next/progress-bar/index.js.map +1 -0
  391. package/lib/module/modules/next/progress-ring/index.js +5 -0
  392. package/lib/module/modules/next/progress-ring/index.js.map +1 -0
  393. package/lib/module/modules/next/setting/index.js +5 -0
  394. package/lib/module/modules/next/setting/index.js.map +1 -0
  395. package/lib/module/modules/next/tab/index.js +5 -0
  396. package/lib/module/modules/next/tab/index.js.map +1 -0
  397. package/lib/module/modules/next/theme/index.js +5 -0
  398. package/lib/module/modules/next/theme/index.js.map +1 -0
  399. package/lib/module/modules/next/tile/index.js +5 -0
  400. package/lib/module/modules/next/tile/index.js.map +1 -0
  401. package/lib/module/modules/next/ui/index.js +5 -0
  402. package/lib/module/modules/next/ui/index.js.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  404. package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  406. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  409. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  411. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
  415. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  417. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  418. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  419. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  421. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  423. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  424. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  425. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  427. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  428. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  429. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  431. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  433. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  435. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  438. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  439. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  440. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  442. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  443. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  444. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  446. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  447. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  448. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  449. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  451. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  453. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  456. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  458. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  459. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  460. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  462. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  463. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  464. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +6 -0
  466. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  468. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts +6 -0
  470. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  471. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  472. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  473. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  474. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  476. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  478. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts +3 -0
  480. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  481. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  482. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts +10 -0
  483. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  485. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  486. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  487. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  488. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  489. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  490. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  491. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  492. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  493. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +6 -0
  495. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  497. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  498. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  499. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  500. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +25 -0
  501. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  502. package/lib/typescript/commonjs/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  503. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts +30 -0
  504. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +27 -20
  506. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  507. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +17 -0
  508. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  509. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +34 -5
  510. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts +14 -5
  512. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts +18 -0
  514. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  515. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts +13 -0
  516. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  517. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  518. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  519. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts +30 -0
  520. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  521. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  522. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  523. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  524. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  525. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  526. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  527. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  528. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  529. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +21 -0
  530. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  531. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  532. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  533. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +87 -0
  534. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  535. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  536. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  537. package/lib/typescript/commonjs/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  538. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts +20 -0
  539. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  540. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  541. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  542. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  543. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  544. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts +16 -0
  545. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts.map +1 -0
  546. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts +31 -0
  547. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  548. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  549. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  550. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +41 -0
  551. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  552. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  553. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  554. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  555. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  556. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  557. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  558. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  559. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  560. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  561. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  562. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  563. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  564. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  565. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  566. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  567. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  568. package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts +3 -0
  569. package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
  570. package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts +3 -0
  571. package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts.map +1 -0
  572. package/lib/typescript/commonjs/src/modules/next/content/index.d.ts +3 -0
  573. package/lib/typescript/commonjs/src/modules/next/content/index.d.ts.map +1 -0
  574. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts +9 -0
  575. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts.map +1 -0
  576. package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts +3 -0
  577. package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts.map +1 -0
  578. package/lib/typescript/commonjs/src/modules/next/image/index.d.ts +3 -0
  579. package/lib/typescript/commonjs/src/modules/next/image/index.d.ts.map +1 -0
  580. package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts +3 -0
  581. package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts.map +1 -0
  582. package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts +3 -0
  583. package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts.map +1 -0
  584. package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts +3 -0
  585. package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts.map +1 -0
  586. package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts +3 -0
  587. package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts.map +1 -0
  588. package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts +3 -0
  589. package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts.map +1 -0
  590. package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts +3 -0
  591. package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts.map +1 -0
  592. package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts +3 -0
  593. package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts.map +1 -0
  594. package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts +3 -0
  595. package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts.map +1 -0
  596. package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts +3 -0
  597. package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts.map +1 -0
  598. package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts +3 -0
  599. package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts.map +1 -0
  600. package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts +3 -0
  601. package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts.map +1 -0
  602. package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts +3 -0
  603. package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts.map +1 -0
  604. package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts +3 -0
  605. package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts.map +1 -0
  606. package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts +3 -0
  607. package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts.map +1 -0
  608. package/lib/typescript/module/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  609. package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  610. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  611. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  612. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  613. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  614. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  615. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  616. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  617. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  618. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  619. package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
  620. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  622. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  623. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  624. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  625. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  626. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  627. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  628. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  629. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  630. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  631. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  632. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  633. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  634. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  635. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  636. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  637. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  638. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  639. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  640. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  641. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  642. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  643. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  644. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  645. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  646. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  647. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  648. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  649. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  650. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  651. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  652. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  653. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  654. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  655. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  656. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  657. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  658. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  659. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  660. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  661. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  662. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  663. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  664. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  665. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  666. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  667. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  668. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  669. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  670. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +6 -0
  671. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  672. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  673. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  674. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts +6 -0
  675. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  676. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  677. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  678. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  679. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  680. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  681. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  682. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  683. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  684. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts +3 -0
  685. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  686. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  687. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts +10 -0
  688. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts.map +1 -0
  689. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  690. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  691. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  692. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  693. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  694. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  695. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  696. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  697. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  698. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  699. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +6 -0
  700. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  701. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  702. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  703. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  704. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  705. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +25 -0
  706. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  707. package/lib/typescript/module/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  708. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts +30 -0
  709. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  710. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +27 -20
  711. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  712. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +17 -0
  713. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  714. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +34 -5
  715. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
  716. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts +14 -5
  717. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts.map +1 -1
  718. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts +18 -0
  719. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  720. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts +13 -0
  721. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  722. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  723. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  724. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts +30 -0
  725. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  726. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  727. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  728. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  729. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  730. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  731. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  732. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  733. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  734. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +21 -0
  735. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  736. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  737. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  738. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +87 -0
  739. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  740. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  741. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  742. package/lib/typescript/module/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  743. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts +20 -0
  744. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  745. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  746. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  747. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  748. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  749. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts +16 -0
  750. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts.map +1 -0
  751. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts +31 -0
  752. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  753. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  754. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  755. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +41 -0
  756. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  757. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  758. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  759. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  760. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  761. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  762. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  763. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  764. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  765. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  766. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  767. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  768. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  769. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  770. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  771. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  772. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  773. package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts +3 -0
  774. package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
  775. package/lib/typescript/module/src/modules/next/cms/index.d.ts +3 -0
  776. package/lib/typescript/module/src/modules/next/cms/index.d.ts.map +1 -0
  777. package/lib/typescript/module/src/modules/next/content/index.d.ts +3 -0
  778. package/lib/typescript/module/src/modules/next/content/index.d.ts.map +1 -0
  779. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts +9 -0
  780. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts.map +1 -0
  781. package/lib/typescript/module/src/modules/next/diary/index.d.ts +3 -0
  782. package/lib/typescript/module/src/modules/next/diary/index.d.ts.map +1 -0
  783. package/lib/typescript/module/src/modules/next/image/index.d.ts +3 -0
  784. package/lib/typescript/module/src/modules/next/image/index.d.ts.map +1 -0
  785. package/lib/typescript/module/src/modules/next/journal/index.d.ts +3 -0
  786. package/lib/typescript/module/src/modules/next/journal/index.d.ts.map +1 -0
  787. package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts +3 -0
  788. package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts.map +1 -0
  789. package/lib/typescript/module/src/modules/next/measurement/index.d.ts +3 -0
  790. package/lib/typescript/module/src/modules/next/measurement/index.d.ts.map +1 -0
  791. package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts +3 -0
  792. package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts.map +1 -0
  793. package/lib/typescript/module/src/modules/next/patient/index.d.ts +3 -0
  794. package/lib/typescript/module/src/modules/next/patient/index.d.ts.map +1 -0
  795. package/lib/typescript/module/src/modules/next/pdf/index.d.ts +3 -0
  796. package/lib/typescript/module/src/modules/next/pdf/index.d.ts.map +1 -0
  797. package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts +3 -0
  798. package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts.map +1 -0
  799. package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts +3 -0
  800. package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts.map +1 -0
  801. package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts +3 -0
  802. package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts.map +1 -0
  803. package/lib/typescript/module/src/modules/next/setting/index.d.ts +3 -0
  804. package/lib/typescript/module/src/modules/next/setting/index.d.ts.map +1 -0
  805. package/lib/typescript/module/src/modules/next/tab/index.d.ts +3 -0
  806. package/lib/typescript/module/src/modules/next/tab/index.d.ts.map +1 -0
  807. package/lib/typescript/module/src/modules/next/theme/index.d.ts +3 -0
  808. package/lib/typescript/module/src/modules/next/theme/index.d.ts.map +1 -0
  809. package/lib/typescript/module/src/modules/next/tile/index.d.ts +3 -0
  810. package/lib/typescript/module/src/modules/next/tile/index.d.ts.map +1 -0
  811. package/lib/typescript/module/src/modules/next/ui/index.d.ts +3 -0
  812. package/lib/typescript/module/src/modules/next/ui/index.d.ts.map +1 -0
  813. package/package.json +12 -2
  814. package/lib/commonjs/modules/bt-management/utils/daily-total-day.js.map +0 -1
  815. package/lib/commonjs/modules/next/bluetooth/drivers.js +0 -20
  816. package/lib/commonjs/modules/next/bluetooth/drivers.js.map +0 -1
  817. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js +0 -55
  818. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js.map +0 -1
  819. package/lib/module/modules/bt-management/utils/daily-total-day.js.map +0 -1
  820. package/lib/module/modules/next/bluetooth/drivers.js +0 -17
  821. package/lib/module/modules/next/bluetooth/drivers.js.map +0 -1
  822. package/lib/module/modules/next/bluetooth/legacy-driver.js +0 -51
  823. package/lib/module/modules/next/bluetooth/legacy-driver.js.map +0 -1
  824. package/lib/typescript/commonjs/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  825. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts +0 -7
  826. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  827. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  828. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  829. package/lib/typescript/module/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  830. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts +0 -7
  831. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  832. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  833. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  834. /package/lib/commonjs/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  835. /package/lib/module/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  836. /package/lib/typescript/commonjs/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
  837. /package/lib/typescript/module/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
@@ -3,50 +3,31 @@
3
3
  import { Buffer } from "buffer";
4
4
  import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
5
5
  import { toBluetoothError } from "../../types/bluetooth-error.js";
6
- const MAX_PAIRING_RETRIES = 2;
7
- const PAIRING_RETRY_DELAY_MS = 1_000;
8
- const isPairingAuthenticationError = error => {
9
- const text = error instanceof Error ? error.message : String(error);
10
- return /(?:GATT_)?(?:INSUFFICIENT_AUTHENTICATION|AUTH_FAIL)|authentication|pairing|bond/i.test(text);
11
- };
12
- const wait = milliseconds => new Promise(resolve => setTimeout(resolve, milliseconds));
13
- const readDeviceInformation = async (device, onDeviceInfo) => {
6
+ import { runOnce } from "./bt-pairing-retry.js";
7
+ const GENERIC_ACCESS_SERVICE = "00001800-0000-1000-8000-00805f9b34fb";
8
+ const DEVICE_INFORMATION_SERVICE = "0000180a-0000-1000-8000-00805f9b34fb";
9
+ const INFORMATION_CHARACTERISTICS = [["name", GENERIC_ACCESS_SERVICE, "00002a00-0000-1000-8000-00805f9b34fb"], ["manufacturerName", DEVICE_INFORMATION_SERVICE, "00002a29-0000-1000-8000-00805f9b34fb"], ["model", DEVICE_INFORMATION_SERVICE, "00002a24-0000-1000-8000-00805f9b34fb"], ["serialNumber", DEVICE_INFORMATION_SERVICE, "00002a25-0000-1000-8000-00805f9b34fb"]];
10
+ const textOf = base64 => Buffer.from(base64, "base64").toString("utf8").replace(/\0+$/, "").trim();
11
+ const readDeviceInformation = async (device, onDeviceInfo, retryAfterPairing = runOnce) => {
14
12
  const read = device.readCharacteristicForService;
15
13
  if (typeof read !== "function") {
16
14
  return;
17
15
  }
18
16
  const info = {};
19
- const values = [["name", "00001800-0000-1000-8000-00805f9b34fb", "00002a00-0000-1000-8000-00805f9b34fb"], ["manufacturerName", "0000180a-0000-1000-8000-00805f9b34fb", "00002a29-0000-1000-8000-00805f9b34fb"], ["model", "0000180a-0000-1000-8000-00805f9b34fb", "00002a24-0000-1000-8000-00805f9b34fb"], ["serialNumber", "0000180a-0000-1000-8000-00805f9b34fb", "00002a25-0000-1000-8000-00805f9b34fb"]];
20
- let pending = values;
21
- for (let attempt = 0; attempt <= MAX_PAIRING_RETRIES; attempt += 1) {
22
- const retry = [];
23
- for (const [key, serviceUuid, characteristicUuid] of pending) {
24
- try {
25
- const characteristic = await read.call(device, serviceUuid, characteristicUuid);
26
- const value = characteristic?.value;
27
- if (!value) {
28
- continue;
29
- }
30
- const text = Buffer.from(value, "base64").toString("utf8").replace(/\0+$/, "").trim();
31
- if (text) {
32
- info[key] = text;
33
- }
34
- } catch (error) {
35
- // Optional GAP/Device Information characteristics are not present on every device.
36
- sentryLogger("info", "DEVICE: Optional device information unavailable", {
37
- characteristicUuid,
38
- errorCode: toBluetoothError(error).code
39
- });
40
- if (attempt < MAX_PAIRING_RETRIES && isPairingAuthenticationError(error)) {
41
- retry.push([key, serviceUuid, characteristicUuid]);
42
- }
17
+ for (const [key, serviceUuid, characteristicUuid] of INFORMATION_CHARACTERISTICS) {
18
+ try {
19
+ const characteristic = await retryAfterPairing(() => read.call(device, serviceUuid, characteristicUuid));
20
+ const text = characteristic?.value ? textOf(characteristic.value) : "";
21
+ if (text) {
22
+ info[key] = text;
43
23
  }
24
+ } catch (error) {
25
+ // Optional GAP/Device Information characteristics are not present on every device.
26
+ sentryLogger("info", "DEVICE: Optional device information unavailable", {
27
+ characteristicUuid,
28
+ errorCode: toBluetoothError(error).code
29
+ });
44
30
  }
45
- if (!retry.length) {
46
- break;
47
- }
48
- await wait(PAIRING_RETRY_DELAY_MS * (attempt + 1));
49
- pending = retry;
50
31
  }
51
32
  if (Object.keys(info).length > 0) {
52
33
  onDeviceInfo?.(info);
@@ -1 +1 @@
1
- {"version":3,"names":["Buffer","sentryLogger","toBluetoothError","MAX_PAIRING_RETRIES","PAIRING_RETRY_DELAY_MS","isPairingAuthenticationError","error","text","Error","message","String","test","wait","milliseconds","Promise","resolve","setTimeout","readDeviceInformation","device","onDeviceInfo","read","readCharacteristicForService","info","values","pending","attempt","retry","key","serviceUuid","characteristicUuid","characteristic","call","value","from","toString","replace","trim","errorCode","code","push","length","Object","keys"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-device-information.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,QAAQ;AAI/B,SAASC,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,QAAQ,gC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,GAAGF,cAAc,EAAEE,KAAK;QAEnC,IAAI,CAACA,KAAK,EAAE;UACV;QACF;QAEA,MAAMzB,IAAI,GAAGP,MAAM,CAACiC,IAAI,CAACD,KAAK,EAAE,QAAQ,CAAC,CACtCE,QAAQ,CAAC,MAAM,CAAC,CAChBC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CACnBC,IAAI,CAAC,CAAC;QAET,IAAI7B,IAAI,EAAE;UACRe,IAAI,CAACK,GAAG,CAAC,GAAGpB,IAAI;QAClB;MACF,CAAC,CAAC,OAAOD,KAAK,EAAE;QACd;QACAL,YAAY,CAAC,MAAM,EAAE,iDAAiD,EAAE;UACtE4B,kBAAkB;UAClBQ,SAAS,EAAEnC,gBAAgB,CAACI,KAAK,CAAC,CAACgC;QACrC,CAAC,CAAC;QAEF,IAAIb,OAAO,GAAGtB,mBAAmB,IAAIE,4BAA4B,CAACC,KAAK,CAAC,EAAE;UACxEoB,KAAK,CAACa,IAAI,CAAC,CAACZ,GAAG,EAAEC,WAAW,EAAEC,kBAAkB,CAAC,CAAC;QACpD;MACF;IACF;IAEA,IAAI,CAACH,KAAK,CAACc,MAAM,EAAE;MACjB;IACF;IAEA,MAAM5B,IAAI,CAACR,sBAAsB,IAAIqB,OAAO,GAAG,CAAC,CAAC,CAAC;IAClDD,OAAO,GAAGE,KAAK;EACjB;EAEA,IAAIe,MAAM,CAACC,IAAI,CAACpB,IAAI,CAAC,CAACkB,MAAM,GAAG,CAAC,EAAE;IAChCrB,YAAY,GAAGG,IAAI,CAAC;EACtB;AACF,CAAC;AAED,SAASL,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["Buffer","sentryLogger","toBluetoothError","runOnce","GENERIC_ACCESS_SERVICE","DEVICE_INFORMATION_SERVICE","INFORMATION_CHARACTERISTICS","textOf","base64","from","toString","replace","trim","readDeviceInformation","device","onDeviceInfo","retryAfterPairing","read","readCharacteristicForService","info","key","serviceUuid","characteristicUuid","characteristic","call","text","value","error","errorCode","code","Object","keys","length"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-device-information.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,QAAQ;AAI/B,SAASC,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,QAAQ,gCAA6B;AAE9D,SAAuBC,OAAO,QAAQ,uBAAoB;AAS1D,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,0BAA0B,GAAG,sCAAsC;AAEzE,MAAMC,2BAAmF,GAAG,CAC1F,CAAC,MAAM,EAAEF,sBAAsB,EAAE,sCAAsC,CAAC,EACxE,CAAC,kBAAkB,EAAEC,0BAA0B,EAAE,sCAAsC,CAAC,EACxF,CAAC,OAAO,EAAEA,0BAA0B,EAAE,sCAAsC,CAAC,EAC7E,CAAC,cAAc,EAAEA,0BAA0B,EAAE,sCAAsC,CAAC,CACrF;AAED,MAAME,MAAM,GAAIC,MAAc,IAC5BR,MAAM,CAACS,IAAI,CAACD,MAAM,EAAE,QAAQ,CAAC,CAACE,QAAQ,CAAC,MAAM,CAAC,CAACC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC;AAE3E,MAAMC,qBAAqB,GAAG,MAAAA,CAC5BC,MAAc,EACdC,YAAkD,EAClDC,iBAA+B,GAAGb,OAAO,KACvB;EAClB,MAAMc,IAAI,GAAGH,MAAM,CAACI,4BAA4B;EAEhD,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;IAC9B;EACF;EAEA,MAAME,IAAyB,GAAG,CAAC,CAAC;EAEpC,KAAK,MAAM,CAACC,GAAG,EAAEC,WAAW,EAAEC,kBAAkB,CAAC,IAAIhB,2BAA2B,EAAE;IAChF,IAAI;MACF,MAAMiB,cAAc,GAAG,MAAMP,iBAAiB,CAAC,MAC7CC,IAAI,CAACO,IAAI,CAACV,MAAM,EAAEO,WAAW,EAAEC,kBAAkB,CACnD,CAAC;MAED,MAAMG,IAAI,GAAGF,cAAc,EAAEG,KAAK,GAAGnB,MAAM,CAACgB,cAAc,CAACG,KAAK,CAAC,GAAG,EAAE;MAEtE,IAAID,IAAI,EAAE;QACRN,IAAI,CAACC,GAAG,CAAC,GAAGK,IAAI;MAClB;IACF,CAAC,CAAC,OAAOE,KAAK,EAAE;MACd;MACA1B,YAAY,CAAC,MAAM,EAAE,iDAAiD,EAAE;QACtEqB,kBAAkB;QAClBM,SAAS,EAAE1B,gBAAgB,CAACyB,KAAK,CAAC,CAACE;MACrC,CAAC,CAAC;IACJ;EACF;EAEA,IAAIC,MAAM,CAACC,IAAI,CAACZ,IAAI,CAAC,CAACa,MAAM,GAAG,CAAC,EAAE;IAChCjB,YAAY,GAAGI,IAAI,CAAC;EACtB;AACF,CAAC;AAED,SAASN,qBAAqB","ignoreList":[]}
@@ -4,14 +4,15 @@
4
4
 
5
5
  import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
6
6
  import { addOvokSpanEvent, recordOvokMetric } from "../../../helpers/utils/telemetry.js";
7
+ import { dailyTotalDay } from "../../../next/bluetooth/daily-total-day.js";
7
8
  import { BUILT_IN_MEASUREMENT_TYPES } from "../../constants/built-in-measurement-types.js";
8
9
  import { findDeviceVariant } from "../../constants/device-variants.js";
9
10
  import { toBluetoothError } from "../../types/bluetooth-error.js";
10
- import { clockSyncCapabilityForDevice } from "../../types/clock-sync.js";
11
+ import { clockSyncCapabilityForDevice, isClockSyncEnabled } from "../../types/clock-sync.js";
11
12
  import { DeviceStatus } from "../../types/device-status.js";
12
- import { dailyTotalDay } from "../../utils/daily-total-day.js";
13
+ import { isFromAcceptedMemorySlot } from "../../utils/device-user.js";
13
14
  import { errorCallbackPayload } from "../../utils/error-callback-payload.js";
14
- import { createStableResultId } from "../../utils/result-identity.js";
15
+ import { createLegacyResultId, createStableResultId } from "../../utils/result-identity.js";
15
16
  import { supportedMeasurementTypeKeys } from "../../utils/supported-measurement-type-keys.js";
16
17
  import { BTConnectionHandler } from "./bt-connection-handler.js";
17
18
  import { BTDataProcessor } from "./bt-data-processor.js";
@@ -26,6 +27,9 @@ export class BTManagedDevice {
26
27
 
27
28
  connected = false;
28
29
  destroyed = false;
30
+
31
+ /** A policy that picks how results are delivered replaces `oneReadingPerConnection`; a user filter does not. */
32
+
29
33
  resultReportedThisConnection = false;
30
34
  historyTransferActive = false;
31
35
  bondedEventReported = false;
@@ -86,6 +90,13 @@ export class BTManagedDevice {
86
90
  /** Only declarations with an actual bonding flow should report this event. */
87
91
  reportsBondedEvent = false;
88
92
 
93
+ /**
94
+ * Writes the phone's time to the device's Current Time characteristic on connect, when it
95
+ * has a writable one. Only for a device whose clock has no protocol of its own, and never
96
+ * once the app turned clock synchronisation off.
97
+ */
98
+ syncsCurrentTime = false;
99
+
89
100
  /**
90
101
  * Decides whether the buffer holds a parseable frame.
91
102
  *
@@ -126,11 +137,14 @@ export class BTManagedDevice {
126
137
  onConnectionEvent: onConnectionEventCallback,
127
138
  onDeviceDisconnected: onDeviceDisconnectedCallback,
128
139
  oneReadingPerConnection,
129
- resultPolicy
140
+ resultPolicy,
141
+ clockSync
130
142
  }) {
131
143
  this.device = device;
132
144
  this.oneReadingPerConnection = oneReadingPerConnection === true;
133
145
  this.resultPolicy = resultPolicy;
146
+ this.policyPicksDelivery = resultPolicy?.default !== undefined || resultPolicy?.byMeasurement !== undefined;
147
+ this.clockSyncOptions = clockSync;
134
148
  sentryLogger("info", "BT_MANAGER: Creating BTManagedDevice");
135
149
  this.deviceData = {
136
150
  id: device.id,
@@ -183,13 +197,20 @@ export class BTManagedDevice {
183
197
  ...data
184
198
  }) => {
185
199
  const measurementTypeKey = data.measurementTypeKey;
200
+ const acceptedMemorySlots = this.resultPolicy?.acceptedMemorySlots;
201
+ if (acceptedMemorySlots && !isFromAcceptedMemorySlot(data, acceptedMemorySlots)) {
202
+ sentryLogger("info", "BT_MANAGER: Dropping a reading of another device user", {
203
+ measurementTypeKey
204
+ });
205
+ return;
206
+ }
186
207
  const policy = this.policyFor(measurementTypeKey);
187
208
 
188
209
  // A live value of a kind kept as a series goes to the series; a stored record is reported as it is.
189
210
  if (policy === "series" && onSeriesValueCallback?.(this.deviceData, data)) {
190
211
  return;
191
212
  }
192
- if (this.oneReadingPerConnection && !this.resultPolicy && this.resultReportedThisConnection) {
213
+ if (this.oneReadingPerConnection && !this.policyPicksDelivery && this.resultReportedThisConnection) {
193
214
  return;
194
215
  }
195
216
  if (policy === "first-reading-per-kind-per-connection") {
@@ -244,6 +265,11 @@ export class BTManagedDevice {
244
265
  enumerable: true,
245
266
  writable: false
246
267
  });
268
+ Object.defineProperty(result, "legacyId", {
269
+ value: createLegacyResultId(this.deviceData, data),
270
+ enumerable: true,
271
+ writable: false
272
+ });
247
273
  onResultCallback?.(result);
248
274
  };
249
275
  this.onDeviceDisconnected = onDeviceDisconnectedCallback;
@@ -276,6 +302,7 @@ export class BTManagedDevice {
276
302
  });
277
303
  }
278
304
  };
305
+ currentTimeSync = () => this.syncsCurrentTime && isClockSyncEnabled(this.clockSyncOptions) ? this.clockSyncOptions ?? {} : undefined;
279
306
  connectInternal = async () => {
280
307
  this.resultReportedThisConnection = false;
281
308
  this.reportedMeasurementKinds.clear();
@@ -332,6 +359,7 @@ export class BTManagedDevice {
332
359
  },
333
360
  onServicesDiscovered: uuids => sequencer.onServicesDiscovered?.(uuids),
334
361
  initialCommands: () => sequencer.initialCommands(),
362
+ currentTimeSync: this.currentTimeSync(),
335
363
  onCommandSent: () => {
336
364
  this.dataProcessor?.armStuckTimeout();
337
365
  this.dataProcessor?.armCommandTimeout();
@@ -1 +1 @@
1
- {"version":3,"names":["sentryLogger","addOvokSpanEvent","recordOvokMetric","BUILT_IN_MEASUREMENT_TYPES","findDeviceVariant","toBluetoothError","clockSyncCapabilityForDevice","DeviceStatus","dailyTotalDay","errorCallbackPayload","createStableResultId","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","connected","destroyed","resultReportedThisConnection","historyTransferActive","bondedEventReported","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","getSupportedMeasurementTypeKeys","declared","mainServices","length","deviceData","name","reportsBondedEvent","handleSuccessResult","_successResult","_collectedValues","handleMeasurementEnd","policyFor","measurementTypeKey","resultPolicy","byMeasurement","default","reportResult","result","onResult","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResultCallback","onSeriesValue","onSeriesValueCallback","onConnectionEvent","onConnectionEventCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","id","localName","manufacturerData","sn","measurementTypes","clockSync","variant","String","manufacturer","model","status","error","normalized","errorCode","code","caseType","_","data","policy","has","add","day","Date","now","key","kind","progress","current","Object","defineProperty","value","enumerable","writable","destroy","connectionHandler","dataProcessor","undefined","disconnect","cancelConnection","connectInternal","clear","sequencer","createCommandSequencer","isHistoryTransfer","onStatusChanged","CONNECTED","bind","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","onServicesDiscovered","uuids","initialCommands","onCommandSent","armStuckTimeout","armCommandTimeout","isNormalDisconnect","preferredMtu","stuckDataTimeout","onStreamStart","onMeasurementEnd","validatePackage","parsedData","collectedValues","nextCommand","frame","sendCommands","commands","commandTimeoutMs","onCommandTimeout","commandProgress","handleDependentResult","frameReader","connect","Promise","reject","Error","connectionPromise","resolve","finally"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;AAAA;;AAKA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,qCAAkC;AACrF,SAASC,0BAA0B,QAAQ,+CAA4C;AACvF,SAASC,iBAAiB,QAAQ,oCAAiC;AACnE,SAASC,gBAAgB,QAAQ,gCAA6B;AAC9D,SAASC,4BAA4B,QAAQ,2BAAwB;AAQrE,SAASC,YAAY,QAAQ,8BAA2B;AAQxD,SAASC,aAAa,QAAQ,gCAA6B;AAC3D,SA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","findDeviceVariant","toBluetoothError","clockSyncCapabilityForDevice","isClockSyncEnabled","DeviceStatus","isFromAcceptedMemorySlot","errorCallbackPayload","createLegacyResultId","createStableResultId","supportedMeasurementTypeKeys","BTConnectionHandler","BTDataProcessor","pollingSequencerFor","BTManagedDevice","connected","destroyed","resultReportedThisConnection","historyTransferActive","bondedEventReported","reportedMeasurementKinds","Set","reportedDailyTotals","historyResultCount","getSupportedMeasurementTypeKeys","declared","mainServices","length","deviceData","name","reportsBondedEvent","syncsCurrentTime","handleSuccessResult","_successResult","_collectedValues","handleMeasurementEnd","policyFor","measurementTypeKey","resultPolicy","byMeasurement","default","reportResult","result","onResult","constructor","device","deviceName","onError","onErrorCallback","onDeviceStatusChanged","onDeviceStatusChangedCallback","onResultCallback","onSeriesValue","onSeriesValueCallback","onConnectionEvent","onConnectionEventCallback","onDeviceDisconnected","onDeviceDisconnectedCallback","oneReadingPerConnection","clockSync","policyPicksDelivery","undefined","clockSyncOptions","id","localName","manufacturerData","sn","measurementTypes","variant","String","manufacturer","model","status","error","normalized","errorCode","code","caseType","_","data","acceptedMemorySlots","policy","has","add","day","Date","now","key","kind","progress","current","Object","defineProperty","value","enumerable","writable","destroy","connectionHandler","dataProcessor","disconnect","cancelConnection","currentTimeSync","connectInternal","clear","sequencer","createCommandSequencer","isHistoryTransfer","onStatusChanged","CONNECTED","bind","DISCONNECTED","event","onDataReceived","uuid","hexValue","processData","onDeviceInfo","info","manufacturerName","serialNumber","onServicesDiscovered","uuids","initialCommands","onCommandSent","armStuckTimeout","armCommandTimeout","isNormalDisconnect","preferredMtu","stuckDataTimeout","onStreamStart","onMeasurementEnd","validatePackage","parsedData","collectedValues","nextCommand","frame","sendCommands","commands","commandTimeoutMs","onCommandTimeout","commandProgress","handleDependentResult","frameReader","connect","Promise","reject","Error","connectionPromise","resolve","finally"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-managed-device.ts"],"mappings":";;AAAA;;AAKA,SAASA,YAAY,QAAQ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ry-logger.js";
4
+ import { toBluetoothError } from "../../types/bluetooth-error.js";
5
+ import { base64ToHex } from "../../utils/base-64-to-hex.js";
6
+ import { wait } from "../../utils/wait.js";
7
+
8
+ /** Client Characteristic Configuration descriptor, where a device keeps whether notifications are on. */
9
+ const CCCD_UUID = "00002902-0000-1000-8000-00805f9b34fb";
10
+
11
+ /** Bit 0 enables notifications and bit 1 indications. */
12
+ const NOTIFICATIONS_OR_INDICATIONS = 0x03;
13
+ const CCCD_POLL_ATTEMPTS = 10;
14
+ const CCCD_POLL_INTERVAL_MS = 100;
15
+
16
+ /** For platforms that cannot read the descriptor, which is how long the write usually takes. */
17
+ const UNREADABLE_CCCD_SETTLE_MS = 300;
18
+
19
+ /** A characteristic whose notifications were just requested. */
20
+
21
+ const isEnabled = cccdValue => {
22
+ const [firstByte] = cccdValue ? base64ToHex(cccdValue) : [];
23
+ return (Number.parseInt(firstByte ?? "", 16) & NOTIFICATIONS_OR_INDICATIONS) !== 0;
24
+ };
25
+ const isNotificationsEnabled = async (device, {
26
+ serviceUuid,
27
+ characteristicUuid
28
+ }) => {
29
+ for (let attempt = 1;; attempt += 1) {
30
+ const descriptor = await device.readDescriptorForService(serviceUuid, characteristicUuid, CCCD_UUID);
31
+ if (isEnabled(descriptor.value)) {
32
+ return true;
33
+ }
34
+ if (attempt === CCCD_POLL_ATTEMPTS) {
35
+ return false;
36
+ }
37
+ await wait(CCCD_POLL_INTERVAL_MS);
38
+ }
39
+ };
40
+
41
+ /**
42
+ * Resolves once the device reports notifications on for every characteristic, because
43
+ * `monitorCharacteristicForService` returns before its descriptor write completes.
44
+ * A platform that cannot read the descriptor gets a fixed settle time instead.
45
+ */
46
+ const awaitNotificationsEnabled = async (device, characteristics) => {
47
+ if (characteristics.length === 0 || typeof device.readDescriptorForService !== "function") {
48
+ return;
49
+ }
50
+ try {
51
+ const enabled = await Promise.all(characteristics.map(characteristic => isNotificationsEnabled(device, characteristic)));
52
+ if (!enabled.every(Boolean)) {
53
+ sentryLogger("info", "DEVICE: Notifications not confirmed before the first command", {
54
+ characteristics: characteristics.length
55
+ });
56
+ }
57
+ } catch (error) {
58
+ sentryLogger("info", "DEVICE: Notification state unreadable, waiting a fixed time", {
59
+ errorCode: toBluetoothError(error).code
60
+ });
61
+ await wait(UNREADABLE_CCCD_SETTLE_MS);
62
+ }
63
+ };
64
+ export { awaitNotificationsEnabled };
65
+ //# sourceMappingURL=bt-notification-readiness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sentryLogger","toBluetoothError","base64ToHex","wait","CCCD_UUID","NOTIFICATIONS_OR_INDICATIONS","CCCD_POLL_ATTEMPTS","CCCD_POLL_INTERVAL_MS","UNREADABLE_CCCD_SETTLE_MS","isEnabled","cccdValue","firstByte","Number","parseInt","isNotificationsEnabled","device","serviceUuid","characteristicUuid","attempt","descriptor","readDescriptorForService","value","awaitNotificationsEnabled","characteristics","length","enabled","Promise","all","map","characteristic","every","Boolean","error","errorCode","code"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-notification-readiness.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,gBAAgB,QAAQ,gCAA6B;AAC9D,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,IAAI,QAAQ,qBAAkB;;AAEvC;AACA,MAAMC,SAAS,GAAG,sCAAsC;;AAExD;AACA,MAAMC,4BAA4B,GAAG,IAAI;AAEzC,MAAMC,kBAAkB,GAAG,EAAE;AAC7B,MAAMC,qBAAqB,GAAG,GAAG;;AAEjC;AACA,MAAMC,yBAAyB,GAAG,GAAG;;AAErC;;AAMA,MAAMC,SAAS,GAAIC,SAAoC,IAAc;EACnE,MAAM,CAACC,SAAS,CAAC,GAAGD,SAAS,GAAGR,WAAW,CAACQ,SAAS,CAAC,GAAG,EAAE;EAE3D,OAAO,CAACE,MAAM,CAACC,QAAQ,CAACF,SAAS,IAAI,EAAE,EAAE,EAAE,CAAC,GAAGN,4BAA4B,MAAM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,yBAAyB","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
4
+ import { BluetoothErrorCode, toBluetoothError } from "../../types/bluetooth-error.js";
5
+ import { wait } from "../../utils/wait.js";
6
+
7
+ /** How long the user has to finish the system pairing before the step is given up. */
8
+ const PAIRING_WINDOW_MS = 30_000;
9
+
10
+ /** ble-plx cannot report the bond state, so the step itself is tried again at this interval. */
11
+ const PAIRING_RETRY_INTERVAL_MS = 3_000;
12
+
13
+ /** Runs `operation`; when the device needs pairing for it, runs it again once the user has paired. */
14
+
15
+ const isPairingRequired = error => toBluetoothError(error).code === BluetoothErrorCode.PAIRING_REQUIRED;
16
+ const runOnce = operation => operation();
17
+
18
+ /**
19
+ * Keeps the link while the system pairing (raised by the encrypted access itself) runs,
20
+ * then retries the step that needed it. After a wait ran out, later steps fail at once.
21
+ */
22
+ class BTPairingRetry {
23
+ abandoned = false;
24
+ constructor(device, onPairingRequired) {
25
+ this.device = device;
26
+ this.onPairingRequired = onPairingRequired;
27
+ }
28
+ run = async operation => {
29
+ try {
30
+ return await operation();
31
+ } catch (error) {
32
+ if (this.abandoned || !isPairingRequired(error)) {
33
+ throw error;
34
+ }
35
+ this.onPairingRequired();
36
+ return this.retryUntilPaired(operation, error);
37
+ }
38
+ };
39
+ retryUntilPaired = async (operation, firstError) => {
40
+ const deadline = Date.now() + PAIRING_WINDOW_MS;
41
+ let lastError = firstError;
42
+ while (Date.now() < deadline) {
43
+ await wait(PAIRING_RETRY_INTERVAL_MS);
44
+ if (!(await this.stillConnected())) {
45
+ break;
46
+ }
47
+ try {
48
+ return await operation();
49
+ } catch (error) {
50
+ if (!isPairingRequired(error)) {
51
+ throw error;
52
+ }
53
+ lastError = error;
54
+ }
55
+ }
56
+ this.abandoned = true;
57
+ sentryLogger("info", "DEVICE: Pairing did not finish, giving up the step", {
58
+ errorCode: BluetoothErrorCode.PAIRING_REQUIRED
59
+ });
60
+ throw lastError;
61
+ };
62
+ stillConnected = () => this.device.isConnected().catch(() => false);
63
+ }
64
+ export { BTPairingRetry, isPairingRequired, runOnce };
65
+ //# sourceMappingURL=bt-pairing-retry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sentryLogger","BluetoothErrorCode","toBluetoothError","wait","PAIRING_WINDOW_MS","PAIRING_RETRY_INTERVAL_MS","isPairingRequired","error","code","PAIRING_REQUIRED","runOnce","operation","BTPairingRetry","abandoned","constructor","device","onPairingRequired","run","retryUntilPaired","firstError","deadline","Date","now","lastError","stillConnected","errorCode","isConnected","catch"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-pairing-retry.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,yCAAsC;AACnE,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,gCAA6B;AAClF,SAASC,IAAI,QAAQ,qBAAkB;;AAEvC;AACA,MAAMC,iBAAiB,GAAG,MAAM;;AAEhC;AACA,MAAMC,yBAAyB,GAAG,KAAK;;AAEvC;;AAGA,MAAMC,iBAAiB,GAAIC,KAAc,IACvCL,gBAAgB,CAACK,KAAK,CAAC,CAACC,IAAI,KAAKP,kBAAkB,CAACQ,gBAAgB;AAEtE,MAAMC,OAAqB,GAAIC,SAAS,IAAKA,SAAS,CAAC,CAAC;;AAExD;AACA;AACA;AACA;AACA,MAAMC,cAAc,CAAC;EACXC,SAAS,GAAG,KAAK;EAElBC,WAAWA,CACCC,MAAc,EACdC,iBAA6B,EAC9C;IAAA,KAFiBD,MAAc,GAAdA,MAAc;IAAA,KACdC,iBAA6B,GAA7BA,iBAA6B;EAC7C;EAEIC,GAAG,GAAiB,MAAON,SAAS,IAAK;IAC9C,IAAI;MACF,OAAO,MAAMA,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC,OAAOJ,KAAK,EAAE;MACd,IAAI,IAAI,CAACM,SAAS,IAAI,CAACP,iBAAiB,CAACC,KAAK,CAAC,EAAE;QAC/C,MAAMA,KAAK;MACb;MAEA,IAAI,CAACS,iBAAiB,CAAC,CAAC;MAExB,OAAO,IAAI,CAACE,gBAAgB,CAACP,SAAS,EAAEJ,KAAK,CAAC;IAChD;EACF,CAAC;EAEOW,gBAAgB,GAAG,MAAAA,CACzBP,SAA2B,EAC3BQ,UAAmB,KACJ;IACf,MAAMC,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGlB,iBAAiB;IAC/C,IAAImB,SAAS,GAAGJ,UAAU;IAE1B,OAAOE,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGF,QAAQ,EAAE;MAC5B,MAAMjB,IAAI,CAACE,yBAAyB,CAAC;MAErC,IAAI,EAAE,MAAM,IAAI,CAACmB,cAAc,CAAC,CAAC,CAAC,EAAE;QAClC;MACF;MAEA,IAAI;QACF,OAAO,MAAMb,SAAS,CAAC,CAAC;MAC1B,CAAC,CAAC,OAAOJ,KAAK,EAAE;QACd,IAAI,CAACD,iBAAiB,CAACC,KAAK,CAAC,EAAE;UAC7B,MAAMA,KAAK;QACb;QAEAgB,SAAS,GAAGhB,KAAK;MACnB;IACF;IAEA,IAAI,CAACM,SAAS,GAAG,IAAI;IACrBb,YAAY,CAAC,MAAM,EAAE,oDAAoD,EAAE;MACzEyB,SAAS,EAAExB,kBAAkB,CAACQ;IAChC,CAAC,CAAC;IAEF,MAAMc,SAAS;EACjB,CAAC;EAEOC,cAAc,GAAGA,CAAA,KACvB,IAAI,CAACT,MAAM,CAACW,WAAW,CAAC,CAAC,CAACC,KAAK,CAAC,MAAM,KAAK,CAAC;AAChD;AAEA,SAASf,cAAc,EAAEN,iBAAiB,EAAEI,OAAO","ignoreList":[]}
@@ -44,16 +44,30 @@ export class CustomDevice extends BTManagedDevice {
44
44
  this.frameReader = definition.frameReader;
45
45
  this.stuckDataTimeout = definition.stuckDataTimeout;
46
46
  this.reportsBondedEvent = definition.reportsBondedEvent === true;
47
+ this.syncsCurrentTime = definition.clockSync === "unknown";
47
48
  if (definition.preferredMtu !== undefined) {
48
49
  this.preferredMtu = definition.preferredMtu;
49
50
  }
50
51
  this.declareLepuProtocol(definition, params.clockSync);
51
52
  this.declareTmbProtocol(definition, params.clockSync);
53
+ this.declareSequencerFactory(definition, params);
52
54
  definition.frames.forEach((frame, uuid) => {
53
55
  this.validators.set(uuid, createFrameValidator(frame));
54
56
  });
55
57
  }
56
58
 
59
+ /** Gives a declaration that computes its commands at connect time the context it needs to do so. */
60
+ declareSequencerFactory(definition, params) {
61
+ const create = definition.createCommandSequencer;
62
+ if (!create) {
63
+ return;
64
+ }
65
+ this.createCommandSequencer = () => create({
66
+ deviceId: this.device.id,
67
+ recordCursorStorage: params.recordCursorStorage
68
+ });
69
+ }
70
+
57
71
  /** Gives a TMB declaration its length-prefixed reader and history command sequence. */
58
72
  declareTmbProtocol(definition, clockSync) {
59
73
  const tmb = definition.tmb;
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","CaseType","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","decodeBP2File","BTManagedDevice","LepuCommandBuilder","LepuEcgTransferSequencer","LepuFrameReader","TmbCommandSequencer","TmbFrameReader","decodeViatomBp3File","decodeViatomEcgRecording","recordedAtFromViatomFileName","createLepuSequencer","recordLepuIdentity","selectLepu","CustomDevice","reportedHistoryIds","Set","validators","Map","sessionAggregates","constructor","device","params","definition","oneReadingPerConnection","frameHandler","createFrameHandler","sessionPolicy","deviceData","clockSync","deliveredFileNames","deliveredEcgFileNames","selectedLepu","lepu","manufacturerData","undefined","mainServices","manufacturerDataProtocol","filter","service","uuid","write","serviceUuid","frameReader","stuckDataTimeout","reportsBondedEvent","preferredMtu","declareLepuProtocol","declareTmbProtocol","frames","forEach","frame","set","tmb","createCommandSequencer","protocol","startBytes","fileTransfer","clear","characteristicUuid","builder","rejectEncryptionAtBytes","expectedDeviceTypes","onIdentified","onRefused","onIdentityRefused","onFile","reportViatomEcgFile","reportViatomBp2File","reportViatomBp3File","skipFiles","acceptFile","name","ecgFileDecoder","test","pollCommand","pollIntervalMs","afterTransfer","build","onError","reason","Error","onProgress","progress","onConnectionEvent","kind","current","receivedBytes","total","totalBytes","file","decoded","content","samples","length","onResult","measurementTypeKey","ecg","caseType","RESULT","diagramPoints","duration","recordedAt","recordingId","reportHistoryOnce","has","add","info","id","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","parsingCase","requiresStream","isMeasuring","OTHER","handleFrame","parsedData","handlerOnly","captureSessionSample","STREAM","shouldReportDependentResult","reportFrame","error","_data","handleSuccessResult","successResult","collectedValues","emit","reading","handleMeasurementEnd","policy","aggregates","values","sessionStartedAt","aggregate","count","minSamples","summary","sample","Object","fromEntries","sums","entries","map","sessionAverage","decorateReading","value","decimals","fields","Math","trunc","Number","toFixed","measurements","frameRecordedAt","Date","measurement","createMeasurement","rejection","measurementRejection","policyFor","key","existing","readingFields","fieldNames","recordOffset","decorate","repeated","repeatedRecords","report","records","floor","from","recordBytes","record","discard","reportMeasurement","parsedFields","find","message"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;AAAA;AACA,SAASA,kBAAkB,QAAQ,iBAAiB;AAGpD,SAASC,QAAQ,QAAQ,6BAA0B;AAcnD,SAASC,oBAAoB,QAAQ,0CAAuC;AAC5E,SAASC,gBAAgB,QAAQ,qCAAkC;AACnE,SACEC,qBAAqB,EACrBC,mBAAmB,QACd,yCAAsC;AAC7C,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,eAAe,QAAQ,yBAAsB;AACtD,SAASC,kBAAkB,QAAQ,iCAA8B;AAEjE,SAASC,wBAAwB,QAAQ,8BAA2B;AAEpE,SAASC,eAAe,QAAQ,8BAA2B;AAC3D,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,mBAAmB,QAAQ,+BAA4B;AAChE,SACEC,wBAAwB,EACxBC,4BAA4B,QACvB,+BAA4B;AAEnC,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G,IAAI,CAACC,oBAAoB,CAAC/B,OAAO,EAAE4B,WAAW,CAAC;IAEjE,IAAIE,SAAS,EAAE;MACb,IAAI,CAACiB,OAAO,CAACjB,SAAS,EAAE9B,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAACD,IAAI,CAAC,IAAI,CAACkB,eAAe,CAACjB,OAAO,EAAEnF,KAAK,EAAEwH,YAAY,CAAC,CAAC;EAC/D;EAEQR,iBAAiBA,CACvBzC,UAAwB,EACxBwC,WAA6B,EACf;IACd,MAAM5B,OAAO,GAAG;MACdpC,QAAQ,EAAEwB,UAAU,CAACxB,QAAQ;MAC7BF,kBAAkB,EAAEkE,WAAW,CAAClE;IAClC,CAAiB;IAEjB,MAAMyE,aAAa,GAAGnC,OAAiD;IACvE,MAAMiD,YAAY,GAAG7D,UAAoD;IAEzEwC,WAAW,CAACQ,UAAU,CAACxH,OAAO,CAAEsB,IAAI,IAAK;MACvCiG,aAAa,CAACjG,IAAI,CAAC,GAAG+G,YAAY,CAAC/G,IAAI,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO8D,OAAO;EAChB;EAEQ+B,oBAAoBA,CAC1B/B,OAAqB,EACrB4B,WAA6B,EACT;IACpB,OAAOA,WAAW,CAACQ,UAAU,CAC1BrB,GAAG,CAAE7E,IAAI,IACRxE,mBAAmB,CACjB,IAAI,CAACuB,UAAU,CAACmI,MAAM,EACtBQ,WAAW,CAAClE,kBAAkB,EAC9BxB,IAAI,EACH8D,OAAO,CAA4C9D,IAAI,CAC1D,CACF,CAAC,CACAgH,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAKtJ,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","decodeBP2File","BTManagedDevice","LepuCommandBuilder","LepuEcgTransferSequencer","LepuFrameReader","TmbCommandSequencer","TmbFrameReader","decodeViatomBp3File","decodeViatomEcgRecording","recordedAtFromViatomFileName","createLepuSequencer","recordLepuIdentity","selectLepu","CustomDevice","reportedHistoryIds","Set","validators","Map","sessionAggregates","constructor","device","params","definition","oneReadingPerConnection","frameHandler","createFrameHandler","sessionPolicy","deviceData","clockSync","deliveredFileNames","deliveredEcgFileNames","selectedLepu","lepu","manufacturerData","undefined","mainServices","manufacturerDataProtocol","filter","service","uuid","write","serviceUuid","frameReader","stuckDataTimeout","reportsBondedEvent","syncsCurrentTime","preferredMtu","declareLepuProtocol","declareTmbProtocol","declareSequencerFactory","frames","forEach","frame","set","create","createCommandSequencer","deviceId","id","recordCursorStorage","tmb","protocol","startBytes","fileTransfer","clear","characteristicUuid","builder","rejectEncryptionAtBytes","expectedDeviceTypes","onIdentified","onRefused","onIdentityRefused","onFile","reportViatomEcgFile","reportViatomBp2File","reportViatomBp3File","skipFiles","acceptFile","name","ecgFileDecoder","test","pollCommand","pollIntervalMs","afterTransfer","build","onError","reason","Error","onProgress","progress","onConnectionEvent","kind","current","receivedBytes","total","totalBytes","file","decoded","content","samples","length","onResult","measurementTypeKey","ecg","caseType","RESULT","diagramPoints","duration","recordedAt","recordingId","reportHistoryOnce","has","add","info","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","parsingCase","requiresStream","isMeasuring","OTHER","handleFrame","parsedData","handlerOnly","captureSessionSample","STREAM","shouldReportDependentResult","reportFrame","error","_data","handleSuccessResult","successResult","collectedValues","emit","reading","handleMeasurementEnd","policy","aggregates","values","sessionStartedAt","aggregate","count","minSamples","summary","sample","Object","fromEntries","sums","entries","map","sessionAverage","decorateReading","value","decimals","fields","Math","trunc","Number","toFixed","measurements","frameRecordedAt","Date","measurement","createMeasurement","rejection","measurementRejection","policyFor","key","existing","readingFields","fieldNames","recordOffset","decorate","repeated","repeatedRecords","report","records","floor","from","recordBytes","record","discard","reportMeasurement","parsedFields","find","message"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;AAAA;AACA,SAAS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R,iBAAiBA,CACvBzC,UAAwB,EACxBwC,WAA6B,EACf;IACd,MAAM5B,OAAO,GAAG;MACdnC,QAAQ,EAAEuB,UAAU,CAACvB,QAAQ;MAC7BF,kBAAkB,EAAEiE,WAAW,CAACjE;IAClC,CAAiB;IAEjB,MAAMwE,aAAa,GAAGnC,OAAiD;IACvE,MAAMiD,YAAY,GAAG7D,UAAoD;IAEzEwC,WAAW,CAACQ,UAAU,CAAC3H,OAAO,CAAE0B,IAAI,IAAK;MACvCgG,aAAa,CAAChG,IAAI,CAAC,GAAG8G,YAAY,CAAC9G,IAAI,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO6D,OAAO;EAChB;EAEQ+B,oBAAoBA,CAC1B/B,OAAqB,EACrB4B,WAA6B,EACT;IACpB,OAAOA,WAAW,CAACQ,UAAU,CAC1BrB,GAAG,CAAE5E,IAAI,IACR9E,mBAAmB,CACjB,IAAI,CAACuB,UAAU,CAACwI,MAAM,EACtBQ,WAAW,CAACjE,kBAAkB,EAC9BxB,IAAI,EACH6D,OAAO,CAA4C7D,IAAI,CAC1D,CACF,CAAC,CACA+G,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAK3J,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const byteAt = (frame, index, offset) => {
4
- const value = Number.parseInt(frame[index + offset] ?? "", 16);
5
- return Number.isInteger(value) && value >= 0 && value <= 0xff ? value : undefined;
6
- };
3
+ import { byteAt } from "./standard-gatt.frame.js";
7
4
  const bloodPressureStatusFromFrame = (frame, recordOffset = 0) => {
8
5
  const flags = byteAt(frame, 0, recordOffset);
9
6
  if (flags === undefined || (flags & 0x10) === 0) {
@@ -1 +1 @@
1
- {"version":3,"names":["byteAt","frame","index","offset","value","Number","parseInt","isInteger","undefined","bloodPressureStatusFromFrame","recordOffset","flags","cursor","statusLow","statusHigh"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-g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,"names":["byteAt","bloodPressureStatusFromFrame","frame","recordOffset","flags","undefined","cursor","statusLow","statusHigh"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,0BAAuB;AAE9C,MAAMC,4BAA4B,GAAGA,CACnCC,KAAwB,EACxBC,YAAY,GAAG,CAAC,KACO;EACvB,MAAMC,KAAK,GAAGJ,MAAM,CAACE,KAAK,EAAE,CAAC,EAAEC,YAAY,CAAC;EAE5C,IAAIC,KAAK,KAAKC,SAAS,IAAI,CAACD,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IAC/C,OAAOC,SAAS;EAClB;EAEA,IAAIC,MAAM,GAAG,CAAC;EAEd,IAAI,CAACF,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IACxBE,MAAM,IAAI,CAAC;EACb;EAEA,IAAI,CAACF,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IACxBE,MAAM,IAAI,CAAC;EACb;EAEA,IAAI,CAACF,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE;IACxBE,MAAM,IAAI,CAAC;EACb;EAEA,MAAMC,SAAS,GAAGP,MAAM,CAACE,KAAK,EAAEI,MAAM,EAAEH,YAAY,CAAC;EACrD,MAAMK,UAAU,GAAGR,MAAM,CAACE,KAAK,EAAEI,MAAM,GAAG,CAAC,EAAEH,YAAY,CAAC;EAE1D,OAAOI,SAAS,KAAKF,SAAS,IAAIG,UAAU,KAAKH,SAAS,GACtDE,SAAS,GAAIC,UAAU,IAAI,CAAE,GAC7BH,SAAS;AACf,CAAC;AAED,SAASJ,4BAA4B","ignoreList":[]}