@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
@@ -2,8 +2,10 @@
2
2
 
3
3
  import { MeasurementTypeKey } from "@ovok/core/next";
4
4
  import { byteToHex } from "../../../utils/bytes-to-hex.js";
5
- import { sigUuid } from "../../../utils/sig-uuid.js";
6
5
  import { defineCustomDevice } from "../../custom/define-custom-device.js";
6
+ import { glucoseRecordDetails, hasUnusableSensorStatus } from "./standard-gatt.glucose-details.js";
7
+ import { BASE_TIME_INDEX, byte, concentrationIndex, FLAG_CONCENTRATION, FLAG_MOL_PER_L, FLAG_TIME_OFFSET, TIME_OFFSET_INDEX, typeAndLocationFromGlucoseFrame } from "./standard-gatt.glucose-frame.js";
8
+ import { createGlucoseSequencer, GLUCOSE_MEASUREMENT_UUID, GLUCOSE_SERVICE_UUID, RECORD_ACCESS_CONTROL_POINT_UUID } from "./standard-gatt.glucose-racp.js";
7
9
  import { littleEndian } from "./standard-gatt.profile.js";
8
10
 
9
11
  /**
@@ -11,10 +13,11 @@ import { littleEndian } from "./standard-gatt.profile.js";
11
13
  * 0x2A52.
12
14
  *
13
15
  * A glucose meter does not push its readings. The collector enables indications on the
14
- * control point, writes "report all stored records" (`01 01`) once, and the meter answers
15
- * with one Glucose Measurement per stored record followed by a control-point response
16
- * (`06 00 01 xx`). Every record is reported; the SDK's stable result identity keeps a
17
- * record seen on an earlier connection from becoming a second reading.
16
+ * control point and writes a request for the stored records: those after the newest one it
17
+ * has read (`01 03 01 nn nn`) when the manager has a `recordCursorStorage`, otherwise all of
18
+ * them (`01 01`). The meter answers with one Glucose Measurement per record followed by a
19
+ * control-point response (`06 00 01 xx`). The SDK's stable result identity, which covers the
20
+ * record's sequence number, keeps a record seen twice from becoming a second reading.
18
21
  *
19
22
  * Glucose Measurement layout: flags, sequence number (2), base time (7), time offset (2,
20
23
  * flag bit 0), concentration SFLOAT (2) and type/sample-location (1) (bit 1), sensor status
@@ -24,17 +27,13 @@ const MG_PER_DL_PER_KG_PER_L = 100_000;
24
27
 
25
28
  /** One mol/L of glucose (180.16 g/mol) is 18,016 mg/dL. */
26
29
  const MG_PER_DL_PER_MOL_PER_L = 18_016;
27
- const FLAG_TIME_OFFSET = 0x01;
28
- const FLAG_CONCENTRATION = 0x02;
29
- const FLAG_MOL_PER_L = 0x04;
30
- const BASE_TIME_INDEX = 3;
31
- const TIME_OFFSET_INDEX = 10;
30
+
31
+ /** One decimal reads a mmol/L result (0.1 mmol/L is 1.8 mg/dL) back as the meter showed it. */
32
+ const MG_PER_DL_DECIMALS = 1;
32
33
 
33
34
  /** Type 0xA and sample location 0x4 both mean a control-solution test, not a patient sample. */
34
35
  const CONTROL_SOLUTION_TYPE = 0x0a;
35
36
  const CONTROL_SOLUTION_LOCATION = 0x04;
36
- const REPORT_ALL_STORED_RECORDS = "0101";
37
- const concentrationIndex = flags => flags & FLAG_TIME_OFFSET ? TIME_OFFSET_INDEX + 2 : TIME_OFFSET_INDEX;
38
37
 
39
38
  /** Bits 5-7 are reserved; a meter that sets one still sends a readable record. */
40
39
  const ALL_FLAGS = Array.from({
@@ -45,13 +44,9 @@ const glucoseField = flags => {
45
44
  return {
46
45
  ...littleEndian("bloodGlucose", [index, index + 1], "mg/dL", "sfloat"),
47
46
  scale: flags & FLAG_MOL_PER_L ? MG_PER_DL_PER_MOL_PER_L : MG_PER_DL_PER_KG_PER_L,
48
- decimals: 0
47
+ decimals: MG_PER_DL_DECIMALS
49
48
  };
50
49
  };
51
- const byte = (frame, index) => {
52
- const value = Number.parseInt(frame[index] ?? "", 16);
53
- return Number.isInteger(value) ? value : undefined;
54
- };
55
50
 
56
51
  /** The record's own time: the base time plus its offset in minutes, read as phone-local. */
57
52
  const recordedAtFromGlucoseFrame = frame => {
@@ -82,8 +77,7 @@ const recordedAtFromGlucoseFrame = frame => {
82
77
  return recordedAt;
83
78
  };
84
79
  const isControlSolution = frame => {
85
- const flags = byte(frame, 0) ?? 0;
86
- const typeAndLocation = byte(frame, concentrationIndex(flags) + 2);
80
+ const typeAndLocation = typeAndLocationFromGlucoseFrame(frame);
87
81
  return typeAndLocation !== undefined && ((typeAndLocation & 0x0f) === CONTROL_SOLUTION_TYPE || typeAndLocation >> 4 === CONTROL_SOLUTION_LOCATION);
88
82
  };
89
83
 
@@ -95,9 +89,9 @@ const standardGlucoseDevice = params => defineCustomDevice({
95
89
  oneReadingPerConnection: params.oneReadingPerConnection,
96
90
  stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? 60_000,
97
91
  services: [{
98
- uuid: sigUuid("1808"),
92
+ uuid: GLUCOSE_SERVICE_UUID,
99
93
  monitor: [{
100
- uuid: sigUuid("2a18"),
94
+ uuid: GLUCOSE_MEASUREMENT_UUID,
101
95
  frame: {
102
96
  minLengthBytes: TIME_OFFSET_INDEX
103
97
  },
@@ -114,7 +108,7 @@ const standardGlucoseDevice = params => defineCustomDevice({
114
108
  description: "A record without a concentration"
115
109
  })
116
110
  }, {
117
- uuid: sigUuid("2a52"),
111
+ uuid: RECORD_ACCESS_CONTROL_POINT_UUID,
118
112
  frame: {
119
113
  minLengthBytes: 2
120
114
  },
@@ -128,23 +122,22 @@ const standardGlucoseDevice = params => defineCustomDevice({
128
122
  kind: "idle",
129
123
  description: "Record access response"
130
124
  }]
131
- }],
132
- write: {
133
- uuid: sigUuid("2a52"),
134
- commandHex: REPORT_ALL_STORED_RECORDS,
135
- when: "connect"
136
- }
125
+ }]
137
126
  }]
138
127
  }, {
128
+ createCommandSequencer: createGlucoseSequencer,
139
129
  decorateReading: (reading, frame, recordOffset) => {
140
- if (frame && isControlSolution(frame)) {
130
+ if (frame && (isControlSolution(frame) || hasUnusableSensorStatus(frame))) {
141
131
  return null;
142
132
  }
143
133
  const recordedAt = frame ? recordedAtFromGlucoseFrame(frame) : undefined;
144
- const decorated = recordedAt ? {
134
+ const decorated = {
145
135
  ...reading,
146
- recordedAt
147
- } : reading;
136
+ ...(frame && glucoseRecordDetails(frame)),
137
+ ...(recordedAt && {
138
+ recordedAt
139
+ })
140
+ };
148
141
  return params.decorateReading ? params.decorateReading(decorated, frame, recordOffset) : decorated;
149
142
  }
150
143
  });
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","byteToHex","sigUuid","defineCustomDevice","littleEndian","MG_PER_DL_PER_KG_PER_L","MG_PER_DL_PER_MOL_PER_L","FLAG_TIME_OFFSET","FLAG_CONCENTRATION","FLAG_MOL_PER_L","BASE_TIME_INDEX","TIME_OFFSET_INDEX","CONTROL_SOLUTION_TYPE","CONTROL_SOLUTION_LOCATION","REPORT_ALL_STORED_RECORDS","concentrationIndex","flags","ALL_FLAGS","Array","from","length","_","glucoseField","index","scale","decimals","byte","frame","value","Number","parseInt","isInteger","undefined","recordedAtFromGlucoseFrame","parts","i","some","part","yearLow","yearHigh","month","day","hour","minute","second","year","recordedAt","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","low","high","offsetMinutes","setMinutes","isControlSolution","typeAndLocation","standardGlucoseDevice","params","id","bloodGlucose","nameMatch","matchByService","oneReadingPerConnection","stuckDataTimeoutMs","services","uuid","monitor","minLengthBytes","caseSelectorBytes","cases","map","selector","kind","measurementTypeKey","fields","description","write","commandHex","when","decorateReading","reading","recordOffset","decorated"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,SAASC,SAAS,QAAQ,gCAA6B;AACvD,SAASC,OAAO,QAAQ,4BAAyB;AACjD,SAASC,kBAAkB,QAAQ,sCAAmC;AAEtE,SAASC,YAAY,QAA8B,4BAAyB;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,OAAO;;AAEtC;AACA,MAAMC,uBAAuB,GAAG,MAAM;AAEtC,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,cAAc,GAAG,IAAI;AAE3B,MAAMC,eAAe,GAAG,CAAC;AACzB,MAAMC,iBAAiB,GAAG,EAAE;;AAE5B;AACA,MAAMC,qBAAqB,GAAG,IAAI;AAClC,MAAMC,yBAAyB,GAAG,IAAI;AAEtC,MAAMC,yBAAyB,GAAG,MAAM;AAExC,MAAMC,kBAAkB,GAAIC,KAAa,IACvCA,KAAK,GAAGT,gBAAgB,GAAGI,iBAAiB,GAAG,CAAC,GA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AAI,EAAE,MAAe;QACrBG,WAAW,EAAE;MACf,CACN;IACF,CAAC,EACD;MACEV,IAAI,EAAEnE,OAAO,CAAC,MAAM,CAAC;MACrByB,KAAK,EAAE;QAAE4C,cAAc,EAAE;MAAE,CAAC;MAC5BC,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtBC,KAAK,EAAE,CACL;QAAEE,QAAQ,EAAE,IAAI;QAAEC,IAAI,EAAE,MAAe;QAAEG,WAAW,EAAE;MAA2B,CAAC,EAClF;QAAEJ,QAAQ,EAAE,IAAI;QAAEC,IAAI,EAAE,MAAe;QAAEG,WAAW,EAAE;MAAyB,CAAC;IAEpF,CAAC,CACF;IACDC,KAAK,EAAE;MACLX,IAAI,EAAEnE,OAAO,CAAC,MAAM,CAAC;MACrB+E,UAAU,EAAEnE,yBAAyB;MACrCoE,IAAI,EAAE;IACR;EACF,CAAC;AAEL,CAAC,EACD;EACEC,eAAe,EAAEA,CAACC,OAAO,EAAEzD,KAAK,EAAE0D,YAAY,KAAK;IACjD,IAAI1D,KAAK,IAAI+B,iBAAiB,CAAC/B,KAAK,CAAC,EAAE;MACrC,OAAO,IAAI;IACb;IAEA,MAAMmB,UAAU,GAAGnB,KAAK,GAAGM,0BAA0B,CAACN,KAAK,CAAC,GAAGK,SAAS;IACxE,MAAMsD,SAAS,GAAGxC,UAAU,GAAG;MAAE,GAAGsC,OAAO;MAAEtC;IAAW,CAAC,GAAGsC,OAAO;IAEnE,OAAOvB,MAAM,CAACsB,eAAe,GACzBtB,MAAM,CAACsB,eAAe,CAACG,SAAS,EAAE3D,KAAK,EAAE0D,YAAY,CAAC,GACtDC,SAAS;EACf;AACF,CACF,CAAC;AAEH,SAASrD,0BAA0B,EAAE2B,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["MeasurementTypeKey","byteToHex","defineCustomDevice","glucoseRecordDetails","hasUnusableSensorStatus","BASE_TIME_INDEX","byte","concentrationIndex","FLAG_CONCENTRATION","FLAG_MOL_PER_L","FLAG_TIME_OFFSET","TIME_OFFSET_INDEX","typeAndLocationFromGlucoseFrame","createGlucoseSequencer","GLUCOSE_MEASUREMENT_UUID","GLUCOSE_SERVICE_UUID","RECORD_ACCESS_CONTROL_POINT_UUID","littleEndian","MG_PER_DL_PER_KG_PER_L","MG_PER_DL_PER_MOL_PER_L","MG_PER_DL_DECIMALS","CONTROL_SOLUTION_TYPE","CONTROL_SOLUTION_LOCATION","ALL_FLAGS","Array","from","length","_","flags","glucoseField","index","scale","decimals","recordedAtFromGlucoseFrame","frame","parts","i","undefined","some","part","yearLow","yearHigh","month","day","hour","minute","second","year","recordedAt","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","low","high","offsetMinutes","setMinutes","isControlSolution","typeAndLocation","standardGlucoseDevice","params","id","bloodGlucose","nameMatch","matchByService","oneReadingPerConnection","stuckDataTimeoutMs","services","uuid","monitor","minLengthBytes","caseSelectorBytes","cases","map","selector","kind","measurementTypeKey","fields","description","createCommandSequencer","decorateReading","reading","recordOffset","decorated"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,SAASC,SAAS,QAAQ,gCAA6B;AACvD,SAASC,kBAAkB,QAAQ,sCAAmC;AAEtE,SACEC,oBAAoB,EACpBC,uBAAuB,QAClB,oCAAiC;AACxC,SACEC,eAAe,EACfC,IAAI,EACJC,kBAAkB,EAClBC,kBAAkB,EAClBC,cAAc,EACdC,gBAAgB,EAChBC,iBAAiB,EACjBC,+BAA+B,QAC1B,kCAA+B;AACtC,SACEC,sBAAsB,EACtBC,wBAAwB,EACxBC,oBAAoB,EACpBC,gCAAgC,QAC3B,iCAA8B;AACrC,SAASC,YAAY,QAA8B,4BAAyB;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,OAAO;;AA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AE,MAAe;QAAEG,WAAW,EAAE;MAA2B,CAAC,EAClF;QAAEJ,QAAQ,EAAE,IAAI;QAAEC,IAAI,EAAE,MAAe;QAAEG,WAAW,EAAE;MAAyB,CAAC;IAEpF,CAAC;EAEL,CAAC;AAEL,CAAC,EACD;EACEC,sBAAsB,EAAErE,sBAAsB;EAC9CsE,eAAe,EAAEA,CAACC,OAAO,EAAElD,KAAK,EAAEmD,YAAY,KAAK;IACjD,IAAInD,KAAK,KAAK0B,iBAAiB,CAAC1B,KAAK,CAAC,IAAI9B,uBAAuB,CAAC8B,KAAK,CAAC,CAAC,EAAE;MACzE,OAAO,IAAI;IACb;IAEA,MAAMc,UAAU,GAAGd,KAAK,GAAGD,0BAA0B,CAACC,KAAK,CAAC,GAAGG,SAAS;IAExE,MAAMiD,SAAS,GAAG;MAChB,GAAGF,OAAO;MACV,IAAIlD,KAAK,IAAI/B,oBAAoB,CAAC+B,KAAK,CAAC,CAAC;MACzC,IAAIc,UAAU,IAAI;QAAEA;MAAW,CAAC;IAClC,CAAC;IAED,OAAOe,MAAM,CAACoB,eAAe,GACzBpB,MAAM,CAACoB,eAAe,CAACG,SAAS,EAAEpD,KAAK,EAAEmD,YAAY,CAAC,GACtDC,SAAS;EACf;AACF,CACF,CAAC;AAEH,SAASrD,0BAA0B,EAAE6B,qBAAqB","ignoreList":[]}
@@ -1,12 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  import { BloodPressureStates } from "../../../types/blood-pressure-states.js";
4
+ import { memorySlotForDeviceUser } from "../../../utils/device-user.js";
4
5
  import { sigUuid } from "../../../utils/sig-uuid.js";
5
6
  import { defineCustomDevice } from "../../custom/define-custom-device.js";
6
7
  import { bloodPressureStatusFromFrame } from "./standard-gatt.blood-pressure-status.js";
8
+ import { byteAt, dateTimeAt } from "./standard-gatt.frame.js";
7
9
 
8
10
  /** Milliseconds a spot-check device may take to produce its reading. */
9
11
  const SPOT_CHECK_TIMEOUT_MS = 60_000;
12
+ /** Runs `first`, then `second` on what it returns; either may withhold the reading. */
13
+ const chainDecorators = (first, second) => {
14
+ if (!first || !second) {
15
+ return first ?? second;
16
+ }
17
+ return (reading, frame, recordOffset) => {
18
+ const decorated = first(reading, frame, recordOffset);
19
+ return decorated && second(decorated, frame, recordOffset);
20
+ };
21
+ };
22
+
10
23
  /**
11
24
  * The flags byte selects the case, because it decides which optional fields are present and
12
25
  * therefore where the later ones sit. Fields common to every shape are declared once; a
@@ -43,7 +56,7 @@ const declareProfile = (params, profile) => defineCustomDevice({
43
56
  }]
44
57
  }]
45
58
  }, {
46
- decorateReading: params.decorateReading
59
+ decorateReading: chainDecorators(profile.decorateReading, params.decorateReading)
47
60
  });
48
61
  const littleEndian = (name, byteIndexes, unit, encoding) => ({
49
62
  name,
@@ -52,27 +65,11 @@ const littleEndian = (name, byteIndexes, unit, encoding) => ({
52
65
  encoding,
53
66
  unit
54
67
  });
55
- const byteAt = (frame, index, offset) => {
56
- const value = Number.parseInt(frame[index + offset] ?? "", 16);
57
- return Number.isInteger(value) && value >= 0 && value <= 0xff ? value : undefined;
58
- };
59
68
 
60
69
  /** Reads the SIG blood-pressure timestamp as a phone-local date. */
61
70
  const recordedAtFromBloodPressureFrame = (frame, offset = 0) => {
62
71
  const flags = byteAt(frame, 0, offset);
63
- const yearLow = byteAt(frame, 7, offset);
64
- const yearHigh = byteAt(frame, 8, offset);
65
- const month = byteAt(frame, 9, offset);
66
- const day = byteAt(frame, 10, offset);
67
- const hour = byteAt(frame, 11, offset);
68
- const minute = byteAt(frame, 12, offset);
69
- const second = byteAt(frame, 13, offset);
70
- if (flags === undefined || (flags & 0x02) === 0 || yearLow === undefined || yearHigh === undefined || month === undefined || day === undefined || hour === undefined || minute === undefined || second === undefined) {
71
- return undefined;
72
- }
73
- const year = yearLow | yearHigh << 8;
74
- const recordedAt = new Date(year, month - 1, day, hour, minute, second);
75
- return recordedAt.getFullYear() === year && recordedAt.getMonth() === month - 1 && recordedAt.getDate() === day && recordedAt.getHours() === hour && recordedAt.getMinutes() === minute && recordedAt.getSeconds() === second ? recordedAt : undefined;
72
+ return flags !== undefined && (flags & 0x02) !== 0 ? dateTimeAt(frame, 7, offset) : undefined;
76
73
  };
77
74
  const decorateBloodPressureReading = (reading, frame, recordOffset) => {
78
75
  if (!frame) {
@@ -99,8 +96,9 @@ const decorateBloodPressureReading = (reading, frame, recordOffset) => {
99
96
  } : {};
100
97
  if ((flags & 0x08) !== 0) {
101
98
  const userId = byteAt(frame, cursor, offset);
102
- if (userId === 0 || userId === 1) {
103
- metadata.memorySlot = userId + 1;
99
+ const memorySlot = userId === undefined ? undefined : memorySlotForDeviceUser(userId);
100
+ if (memorySlot !== undefined) {
101
+ metadata.memorySlot = memorySlot;
104
102
  }
105
103
  cursor += 1;
106
104
  }
@@ -1 +1 @@
1
- {"version":3,"names":["BloodPressureStates","sigUuid","defineCustomDevice","bloodPressureStatusFromFrame","SPOT_CHECK_TIMEOUT_MS","declareProfile","params","profile","id","measurementTypeKey","nameMatch","matchByService","undefined","oneReadingPerConnection","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","fields","fieldsBySelector","kind","decorateReading","littleEndian","name","byteIndexes","unit","encoding","byteOrder","byteAt","index","offset","value","Number","parseInt","isInteger","recordedAtFromBloodPressureFrame","flags","yearLow","yearHigh","month","day","hour","minute","second","year","recordedAt","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","decorateBloodPressureReading","reading","recordOffset","cursor","metadata","userId","memorySlot","status","DISTURB_DETECTED","LOOSE_SLEEVE","REGULAR","irregularHeartbeat","Object","keys","length"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;AAEA,SAASA,mBAAmB,QAAQ,yCAAsC;AAM1E,SAASC,OAAO,QAAQ,4BAAyB;AACjD,SAASC,kBAAkB,QAAQ,sCAAmC;AAEtE,SAASC,4BAA4B,QAA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F;EACF;EAEA,OAAOC,MAAM,CAACC,IAAI,CAACT,QAAQ,CAAC,CAACU,MAAM,GAAG,CAAC,GAAG;IAAE,GAAGb,OAAO;IAAE,GAAGG;EAAS,CAAC,GAAGH,OAAO;AACjF,CAAC;AAED,SACE9D,4BAA4B,EAC5B6D,4BAA4B,EAC5B3D,cAAc,EACd4B,YAAY,EACZa,gCAAgC","ignoreList":[]}
1
+ {"version":3,"names":["BloodPressureStates","memorySlotForDeviceUser","sigUuid","defineCustomDevice","bloodPressureStatusFromFrame","byteAt","dateTimeAt","SPOT_CHECK_TIMEOUT_MS","chainDecorators","first","second","reading","frame","recordOffset","decorated","declareProfile","params","profile","id","measurementTypeKey","nameMatch","matchByService","undefined","oneReadingPerConnection","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","fields","fieldsBySelector","kind","decorateReading","littleEndian","name","byteIndexes","unit","encoding","byteOrder","recordedAtFromBloodPressureFrame","offset","flags","decorateBloodPressureReading","recordedAt","cursor","metadata","userId","memorySlot","status","DISTURB_DETECTED","LOOSE_SLEEVE","REGULAR","irregularHeartbeat","Object","keys","length"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;AAEA,SAASA,mBAAmB,QAAQ,yCAAsC;AAM1E,SAASC,uBAAuB,QAAQ,+BAA4B;AACpE,SAASC,OAAO,QAAQ,4BAAyB;AACjD,SAASC,kBAAkB,QAAQ,sCAAmC;AAEtE,SAASC,4BAA4B,QAAQ,0CAAuC;AACpF,SAASC,MAAM,EAAEC,UAAU,QAAQ,0BAAuB;;AAE1D;AACA,MAAMC,qBAAqB,GAAG,MAAM;AAqDpC;AACA,MAAMC,eAAe,GAAGA,CACtBC,KAAyC,EACzCC,MAA0C,KACH;EACvC,IAAI,CAACD,KAAK,IAAI,CAACC,MAAM,EAAE;IACrB,OAAOD,KAAK,IAAIC,MAAM;EACx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GAAG,CAAC,GAAG;IAAE,GAAGrD,OAAO;IAAE,GAAG2C;EAAS,CAAC,GAAG3C,OAAO;AACjF,CAAC;AAED,SACEP,4BAA4B,EAC5B+C,4BAA4B,EAC5BpC,cAAc,EACd2B,YAAY,EACZM,gCAAgC","ignoreList":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ import { sentryLogger } from "../../helpers/utils/sentry-logger.js";
4
+ import { toBluetoothError } from "../types/bluetooth-error.js";
5
+ const parseCursor = stored => {
6
+ const parsed = Number.parseInt(stored ?? "", 10);
7
+ return Number.isSafeInteger(parsed) && parsed >= 0 ? parsed : undefined;
8
+ };
9
+
10
+ /**
11
+ * The number of the newest stored record read from one device, kept in `storage` so the next
12
+ * connection asks the device for newer records only. Without storage it forgets on disconnect.
13
+ */
14
+ class RecordCursor {
15
+ writing = false;
16
+ changedWhileWriting = false;
17
+ constructor(storage, key) {
18
+ this.storage = storage;
19
+ this.key = key;
20
+ }
21
+
22
+ /** What an earlier connection stored; nothing, an unreadable value or a failing store gives `undefined`. */
23
+ load = async () => {
24
+ try {
25
+ this.newest = parseCursor(await this.storage?.getItem(this.key));
26
+ } catch (error) {
27
+ sentryLogger("error", "RECORD_CURSOR: Could not read the stored cursor", {
28
+ errorCode: toBluetoothError(error).code
29
+ });
30
+ this.newest = undefined;
31
+ }
32
+ return this.newest;
33
+ };
34
+
35
+ /** Remembers a record number that is newer than any seen; writes to the store are coalesced. */
36
+ advance = recordNumber => {
37
+ if (this.newest !== undefined && recordNumber <= this.newest) {
38
+ return;
39
+ }
40
+ this.newest = recordNumber;
41
+ void this.persist();
42
+ };
43
+ persist = async () => {
44
+ if (this.writing) {
45
+ this.changedWhileWriting = true;
46
+ return;
47
+ }
48
+ this.writing = true;
49
+ do {
50
+ this.changedWhileWriting = false;
51
+ await this.store();
52
+ } while (this.changedWhileWriting);
53
+ this.writing = false;
54
+ };
55
+ store = async () => {
56
+ try {
57
+ await this.storage?.setItem(this.key, String(this.newest));
58
+ } catch (error) {
59
+ sentryLogger("error", "RECORD_CURSOR: Could not store the cursor", {
60
+ errorCode: toBluetoothError(error).code
61
+ });
62
+ }
63
+ };
64
+ }
65
+ export { RecordCursor };
66
+ //# sourceMappingURL=record-cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sentryLogger","toBluetoothError","parseCursor","stored","parsed","Number","parseInt","isSafeInteger","undefined","RecordCursor","writing","changedWhileWriting","constructor","storage","key","load","newest","getItem","error","errorCode","code","advance","recordNumber","persist","store","setItem","String"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/record-cursor.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,sCAAmC;AAEhE,SAASC,gBAAgB,QAAQ,6BAA0B;AAE3D,MAAMC,WAAW,GAAIC,MAAiC,IAAyB;EAC7E,MAAMC,MAAM,GAAGC,MAAM,CAACC,QAAQ,CAACH,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;EAEhD,OAAOE,MAAM,CAACE,aAAa,CAACH,MAAM,CAAC,IAAIA,MAAM,IAAI,CAAC,GAAGA,MAAM,GAAGI,SAAS;AACzE,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,YAAY,CAAC;EAETC,OAAO,GAAG,KAAK;EACfC,mBAAmB,GAAG,KAAK;EAE5BC,WAAWA,CACCC,OAA0C,EAC1CC,GAAW,EAC5B;IAAA,KAFiBD,OAA0C,GAA1CA,OAA0C;IAAA,KAC1CC,GAAW,GAAXA,GAAW;EAC3B;;EAEH;EACOC,IAAI,GAAG,MAAAA,CAAA,KAAyC;IACrD,IAAI;MACF,IAAI,CAACC,MAAM,GAAGd,WAAW,CAAC,MAAM,IAAI,CAACW,OAAO,EAAEI,OAAO,CAAC,IAAI,CAACH,GAAG,CAAC,CAAC;IAClE,CAAC,CAAC,OAAOI,KAAK,EAAE;MACdlB,YAAY,CAAC,OAAO,EAAE,iDAAiD,EAAE;QACvEmB,SAAS,EAAElB,gBAAgB,CAACiB,KAAK,CAAC,CAACE;MACrC,CAAC,CAAC;MACF,IAAI,CAACJ,MAAM,GAAGR,SAAS;IACzB;IAEA,OAAO,IAAI,CAACQ,MAAM;EACpB,CAAC;;EAED;EACOK,OAAO,GAAIC,YAAoB,IAAW;IAC/C,IAAI,IAAI,CAACN,MAAM,KAAKR,SAAS,IAAIc,YAAY,IAAI,IAAI,CAACN,MAAM,EAAE;MAC5D;IACF;IAEA,IAAI,CAACA,MAAM,GAAGM,YAAY;IAC1B,KAAK,IAAI,CAACC,OAAO,CAAC,CAAC;EACrB,CAAC;EAEOA,OAAO,GAAG,MAAAA,CAAA,KAA2B;IAC3C,IAAI,IAAI,CAACb,OAAO,EAAE;MAChB,IAAI,CAACC,mBAAmB,GAAG,IAAI;MAE/B;IACF;IAEA,IAAI,CAACD,OAAO,GAAG,IAAI;IAEnB,GAAG;MACD,IAAI,CAACC,mBAAmB,GAAG,KAAK;MAChC,MAAM,IAAI,CAACa,KAAK,CAAC,CAAC;IACpB,CAAC,QAAQ,IAAI,CAACb,mBAAmB;IAEjC,IAAI,CAACD,OAAO,GAAG,KAAK;EACtB,CAAC;EAEOc,KAAK,GAAG,MAAAA,CAAA,KAA2B;IACzC,IAAI;MACF,MAAM,IAAI,CAACX,OAAO,EAAEY,OAAO,CAAC,IAAI,CAACX,GAAG,EAAEY,MAAM,CAAC,IAAI,CAACV,MAAM,CAAC,CAAC;IAC5D,CAAC,CAAC,OAAOE,KAAK,EAAE;MACdlB,YAAY,CAAC,OAAO,EAAE,2CAA2C,EAAE;QACjEmB,SAAS,EAAElB,gBAAgB,CAACiB,KAAK,CAAC,CAACE;MACrC,CAAC,CAAC;IACJ;EACF,CAAC;AACH;AAEA,SAASX,YAAY","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
 
3
3
  /* eslint-disable import/group-exports */
4
4
 
5
+ import { Buffer } from "buffer";
5
6
  import { State } from "react-native-ble-plx";
6
7
 
7
8
  /** Options for `createFakeBleDevice`. */
@@ -13,6 +14,8 @@ import { State } from "react-native-ble-plx";
13
14
  /** A deterministic BLE manager for hook and scan integration tests. No hardware is used. */
14
15
 
15
16
  const characteristicKey = (serviceUuid, characteristicUuid) => `${serviceUuid}/${characteristicUuid}`;
17
+ const NOTIFICATIONS_ENABLED = Buffer.from([0x01, 0x00]).toString("base64");
18
+ const NOTIFICATIONS_DISABLED = Buffer.from([0x00, 0x00]).toString("base64");
16
19
 
17
20
  /** Creates a GATT-capable fake device for connection and notification tests. */
18
21
  export const createFakeBleDevice = ({
@@ -27,6 +30,7 @@ export const createFakeBleDevice = ({
27
30
  let connected = false;
28
31
  let currentMtu = mtu;
29
32
  const values = new Map(Object.entries(characteristics));
33
+ const monitoredKeys = new Set();
30
34
  const disconnectedCallbacks = new Set();
31
35
  const notificationCallbacks = new Map();
32
36
  const fake = {
@@ -62,8 +66,12 @@ export const createFakeBleDevice = ({
62
66
  readCharacteristicForService: async (serviceUuid, characteristicUuid) => ({
63
67
  value: values.get(characteristicKey(serviceUuid, characteristicUuid)) ?? null
64
68
  }),
69
+ readDescriptorForService: async (serviceUuid, characteristicUuid) => ({
70
+ value: monitoredKeys.has(characteristicKey(serviceUuid, characteristicUuid)) ? NOTIFICATIONS_ENABLED : NOTIFICATIONS_DISABLED
71
+ }),
65
72
  monitorCharacteristicForService: (serviceUuid, characteristicUuid, callback) => {
66
73
  const key = characteristicKey(serviceUuid, characteristicUuid);
74
+ monitoredKeys.add(key);
67
75
  const callbacks = notificationCallbacks.get(key) ?? new Set();
68
76
  callbacks.add(callback);
69
77
  notificationCallbacks.set(key, callbacks);
@@ -1 +1 @@
1
- {"version":3,"names":["State","characteristicKey","serviceUuid","characteristicUuid","createFakeBleDevice","id","name","localName","manufacturerData","serviceUUIDs","mtu","characteristics","connected","currentMtu","values","Map","Object","entries","disconnectedCallbacks","Set","notificationCallbacks","fake","isConnected","connect","cancelConnection","forEach","callback","discoverAllServicesAndCharacteristics","onDisconnected","add","remove","delete","requestMTU","requestedMtu","readCharacteristicForService","value","get","monitorCharacteristicForService","key","callbacks","set","writeCharacteristicWithResponseForService","writeCharacteristicWithoutResponseForService","device","emitCharacteristic","characteristic","uuid","disconnect","createFakeBleManager","state","PoweredOn","devices","currentState","scanCallback","stateCallbacks","scannedServiceUUIDs","manager","onStateChange","emitCurrentState","startDeviceScan","_options","stopDeviceScan","undefined","createDevice","emitDevice","emitError","error","setState","nextState","getScannedServiceUUIDs"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/fake-ble-manager.ts"],"mappings":";;AAAA;;AAEA,SAA6BA,KAAK,QAAsB,sBAAsB;;AAE9E;;AAyBA;;AAiBA;;AAUA;;AAyBA,MAAMC,iBAAiB,GAAGA,CAACC,WAAmB,EAAEC,kBAA0B,KACxE,GAAGD,WAAW,IAAIC,kBAAkB,EAAE;;AAExC;AACA,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,EAAE;EACFC,IAAI,GAAGD,EAAE;EACTE,SAAS,GAAGD,IAAI;EAChBE,gBAAgB,GAAG,EAAE;EACrBC,YAAY,GAAG,EAAE;EACjBC,GAAG,GAAG,EAAE;EACRC,eAAe,GAAG,CAAC;AACC,CAAC,KAAoB;EACzC,IAAIC,SAAS,GAAG,KAAK;EACrB,IAAIC,UAAU,GAAGH,GAAG;EACpB,MAAMI,MAAM,GAAG,IAAIC,GAAG,CAACC,MAAM,CAACC,OAAO,CAACN,eAAe,CAAC,CAAC;EACvD,MAAMO,qBAAqB,GAAG,IAAIC,GAAG,CAAwC,CAAC;EAE9E,MAAMC,qBAAqB,GAAG,IAAIL,GAAG,CAGnC,CAAC;EAEH,MAAMM,IAAI,GAAG;IACXhB,EAAE;IACFC,IAAI;IACJC,SAAS;IACTC,gBAAgB;IAChBC,YAAY,EAAE,CAAC,GAAGA,YAAY,CAAC;IAC/BC,GAAG,EAAEG,UAAU;IACfS,WAAW,EAAE,MAAAA,CAAA,KAAYV,SAAS;IAClCW,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnBX,SAAS,GAAG,IAAI;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AACL,QAAQ;MAC9C,CAAC;IACH,CAAC;IACDiC,eAAe,EAAEA,CACflD,YAAsC,EACtCmD,QAAiB,EACjBlC,QAAsD,KACnD;MACH6B,mBAAmB,GAAG9C,YAAY;MAClC4C,YAAY,GAAG3B,QAAQ;MACvByB,OAAO,CAAC1B,OAAO,CAAEkB,MAAM,IAAKjB,QAAQ,CAAC,IAAI,EAAEiB,MAAM,CAAC,CAAC;IACrD,CAAC;IACDkB,cAAc,EAAEA,CAAA,KAAM;MACpBR,YAAY,GAAGS,SAAS;IAC1B;EACF,CAA0B;EAE1B,OAAO;IACLN,OAAO;IACPO,YAAY,EAAE3D,mBAAmB;IACjC4D,UAAU,EAAGrB,MAAM,IAAKU,YAAY,GAAG,IAAI,EAAEV,MAAM,CAAC;IACpDsB,SAAS,EAAGC,KAAK,IACfb,YAAY,GAAGa,KAAK,EAAW,IAAI,CAAC;IACtCC,QAAQ,EAAGC,SAAS,IAAK;MACvBhB,YAAY,GAAGgB,SAAS;MACxBd,cAAc,CAAC7B,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC0C,SAAS,CAAC,CAAC;IAC3D,CAAC;IACDC,sBAAsB,EAAEA,CAAA,KAAMd,mBAAmB;IACjDM,cAAc,EAAEA,CAAA,KAAML,OAAO,CAACK,cAAc,CAAC;EAC/C,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Buffer","State","characteristicKey","serviceUuid","characteristicUuid","NOTIFICATIONS_ENABLED","from","toString","NOTIFICATIONS_DISABLED","createFakeBleDevice","id","name","localName","manufacturerData","serviceUUIDs","mtu","characteristics","connected","currentMtu","values","Map","Object","entries","monitoredKeys","Set","disconnectedCallbacks","notificationCallbacks","fake","isConnected","connect","cancelConnection","forEach","callback","discoverAllServicesAndCharacteristics","onDisconnected","add","remove","delete","requestMTU","requestedMtu","readCharacteristicForService","value","get","readDescriptorForService","has","monitorCharacteristicForService","key","callbacks","set","writeCharacteristicWithResponseForService","writeCharacteristicWithoutResponseForService","device","emitCharacteristic","characteristic","uuid","disconnect","createFakeBleManager","state","PoweredOn","devices","currentState","scanCallback","stateCallbacks","scannedServiceUUIDs","manager","onStateChange","emitCurrentState","startDeviceScan","_options","stopDeviceScan","undefined","createDevice","emitDevice","emitError","error","setState","nextState","getScannedServiceUUIDs"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/fake-ble-manager.ts"],"mappings":";;AAAA;;AAEA,SAASA,MAAM,QAAQ,QAAQ;AAE/B,SAA6BC,KAAK,QAAsB,sBAAsB;;AAE9E;;AAyBA;;AAiBA;;AAUA;;AAyBA,MAAMC,iBAAiB,GAAGA,CAACC,WAAmB,EAAEC,kBAA0B,KACxE,GAAGD,WAAW,IAAIC,kBAAkB,EAAE;AAExC,MAAMC,qBAAqB,GAAGL,MAAM,CAACM,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC,QAAQ,CAAC;AAC1E,MAAMC,sBAAsB,GAAGR,MAAM,CAACM,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC,QAAQ,CAAC;;AAE3E;AACA,OAAO,MAAME,mBAAmB,GAAGA,CAAC;EAClCC,EAAE;EACFC,IAAI,GAAGD,EAAE;EACTE,SAAS,GAAGD,IAAI;EAChBE,gBAAgB,GAAG,EAAE;EACrBC,YAAY,GAAG,EAAE;EACjBC,GAAG,GAAG,EAAE;EACRC,eAAe,GAAG,CAAC;AACC,CAAC,KAAoB;EACzC,IAAIC,SAAS,GAAG,KAAK;EACrB,IAAIC,UAAU,GAAGH,GAAG;EACpB,MAAMI,MAAM,GAAG,IAAIC,GAAG,CAACC,MAAM,CAACC,OAAO,CAACN,eAAe,CAAC,CAAC;EACvD,MAAMO,aAAa,GAAG,IAAIC,GAAG,CAAS,CAAC;EACvC,MAAMC,qBAAqB,GAAG,IAAID,GAAG,CAAwC,CAAC;EAE9E,MAAME,qBAAqB,GAAG,IAAIN,GAA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C;IACDC,sBAAsB,EAAEA,CAAA,KAAMd,mBAAmB;IACjDM,cAAc,EAAEA,CAAA,KAAML,OAAO,CAACK,cAAc,CAAC;EAC/C,CAAC;AACH,CAAC","ignoreList":[]}
@@ -8,6 +8,10 @@ import { CUSTOM_DEVICE_BRAND } from "../constants/custom-device-brand.js";
8
8
 
9
9
  /** Creates the per-device `CustomFrameHandler`. */
10
10
 
11
+ /** What a declaration's command sequencer is told about the device it is about to drive. */
12
+
13
+ /** Creates the command sequencer of one connection, for a declaration whose commands depend on the device or on stored state. */
14
+
11
15
  /**
12
16
  * A validated, ready-to-run custom device. Only defineCustomDevice produces one.
13
17
  */
@@ -1 +1 @@
1
- {"version":3,"names":["CUSTOM_DEVICE_BRAND"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-device-definition.ts"],"mappings":";;AAEA,SAASA,mBAAmB,QAAQ,qCAAkC;;AAetE;;AAeA;;AAGA;;AAGA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["CUSTOM_DEVICE_BRAND"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-device-definition.ts"],"mappings":";;AAEA,SAASA,mBAAmB,QAAQ,qCAAkC;;AAiBtE;;AAeA;;AAGA;;AAGA;;AAUA;;AAGA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=glucose-record-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/glucose-record-details.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ import { Platform } from "react-native";
4
+ import { PERMISSIONS } from "react-native-permissions";
5
+ const ANDROID_12_API_LEVEL = 31;
6
+
7
+ /** The OS permissions Bluetooth scanning and connecting need on this platform. */
8
+ export const bluetoothPermissionList = () => {
9
+ if (Platform.OS === "android") {
10
+ return Number(Platform.Version) >= ANDROID_12_API_LEVEL ? [PERMISSIONS.ANDROID.BLUETOOTH_CONNECT, PERMISSIONS.ANDROID.BLUETOOTH_SCAN] : [PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION];
11
+ }
12
+ return Platform.OS === "ios" ? [PERMISSIONS.IOS.BLUETOOTH] : [];
13
+ };
14
+ //# sourceMappingURL=bluetooth-permission-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","PERMISSIONS","ANDROID_12_API_LEVEL","bluetoothPermissionList","OS","Number","Version","ANDROID","BLUETOOTH_CONNECT","BLUETOOTH_SCAN","ACCESS_FINE_LOCATION","IOS","BLUETOOTH"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/bluetooth-permission-list.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAAqBC,WAAW,QAAQ,0BAA0B;AAElE,MAAMC,oBAAoB,GAAG,EAAE;;AAE/B;AACA,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAoB;EACzD,IAAIH,QAAQ,CAACI,EAAE,KAAK,SAAS,EAAE;IAC7B,OAAOC,MAAM,CAACL,QAAQ,CAACM,OAAO,CAAC,IAAIJ,oBAAoB,GACnD,CAACD,WAAW,CAACM,OAAO,CAACC,iBAAiB,EAAEP,WAAW,CAACM,OAAO,CAACE,cAAc,CAAC,GAC3E,CAACR,WAAW,CAACM,OAAO,CAACG,oBAAoB,CAAC;EAChD;EAEA,OAAOV,QAAQ,CAACI,EAAE,KAAK,KAAK,GAAG,CAACH,WAAW,CAACU,GAAG,CAACC,SAAS,CAAC,GAAG,EAAE;AACjE,CAAC","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ /** The Bluetooth SIG User Index that means the device does not know whose reading it is. */
4
+ const UNKNOWN_DEVICE_USER = 0xff;
5
+
6
+ /** The memory slot of a SIG device user: users count from 0, slots from 1; the unknown user has none. */
7
+ const memorySlotForDeviceUser = userId => userId === UNKNOWN_DEVICE_USER ? undefined : userId + 1;
8
+
9
+ /** Whether a reading is from one of the device users `slots`; a reading that names no device user is kept. */
10
+ const isFromAcceptedMemorySlot = (reading, slots) => {
11
+ const {
12
+ memorySlot
13
+ } = reading;
14
+ return typeof memorySlot !== "number" || slots.includes(memorySlot);
15
+ };
16
+ export { isFromAcceptedMemorySlot, memorySlotForDeviceUser };
17
+ //# sourceMappingURL=device-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["UNKNOWN_DEVICE_USER","memorySlotForDeviceUser","userId","undefined","isFromAcceptedMemorySlot","reading","slots","memorySlot","includes"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/device-user.ts"],"mappings":";;AAAA;AACA,MAAMA,mBAAmB,GAAG,IAAI;;AAEhC;AACA,MAAMC,uBAAuB,GAAIC,MAAc,IAC7CA,MAAM,KAAKF,mBAAmB,GAAGG,SAAS,GAAGD,MAAM,GAAG,CAAC;;AAEzD;AACA,MAAME,wBAAwB,GAAGA,CAC/BC,OAAe,EACfC,KAAwB,KACZ;EACZ,MAAM;IAAEC;EAAW,CAAC,GAAGF,OAAmC;EAE1D,OAAO,OAAOE,UAAU,KAAK,QAAQ,IAAID,KAAK,CAACE,QAAQ,CAACD,UAAU,CAAC;AACrE,CAAC;AAED,SAASH,wBAAwB,EAAEH,uBAAuB","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ /** Millimetres of mercury in one kilopascal. */
4
+ const KPA_TO_MMHG = 7.50062;
5
+ export { KPA_TO_MMHG };
6
+ //# sourceMappingURL=kpa-to-mmhg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["KPA_TO_MMHG"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/kpa-to-mmhg.ts"],"mappings":";;AAAA;AACA,MAAMA,WAAW,GAAG,OAAO;AAE3B,SAASA,WAAW","ignoreList":[]}
@@ -2,42 +2,32 @@
2
2
 
3
3
  /* eslint-disable import/group-exports */
4
4
 
5
- const canonicalize = value => {
6
- if (value instanceof Date) {
7
- return value.toISOString();
8
- }
9
- if (Array.isArray(value)) {
10
- return value.map(canonicalize);
11
- }
12
- if (value && typeof value === "object") {
13
- return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, nested]) => [key, canonicalize(nested)]));
14
- }
15
- return value;
16
- };
17
- const hash = value => {
18
- let first = 0x811c9dc5;
19
- let second = 0x01000193;
20
- for (let index = 0; index < value.length; index += 1) {
21
- const code = value.charCodeAt(index);
22
- first = Math.imul(first ^ code, 0x01000193);
23
- second = Math.imul(second ^ code + index, 0x811c9dc5);
24
- }
25
- return `${(first >>> 0).toString(16).padStart(8, "0")}${(second >>> 0).toString(16).padStart(8, "0")}`;
26
- };
5
+ import { isTimestamped } from "../../next/bluetooth/driver.js";
6
+ import { instantStableHash, stableHash } from "../../next/bluetooth/stable-hash.js";
7
+ /** Reading properties added after result ids were first issued; leaving them out keeps every earlier id. */
8
+ const ADDED_READING_PROPERTIES = new Set(["sequenceNumber", "specimen", "sampleLocation", "sensorStatus", "outOfRange", "meal", "reportedUnit", "temperatureType", "rrIntervals"]);
9
+ const identifyingData = data => Object.fromEntries(Object.entries(data).filter(([key]) => !ADDED_READING_PROPERTIES.has(key)));
10
+ const deviceIdentityOf = deviceData => deviceData.sn || deviceData.manufacturerData || deviceData.model || deviceData.name || deviceData.id;
27
11
 
28
12
  /**
29
- * Creates an identity that is stable when a device sends its stored history again.
30
- * Recording IDs, timestamps and indexes are retained in the canonical payload; transient
31
- * delivery metadata is deliberately not part of the key.
13
+ * Creates an identity that is stable when a device sends its stored history again, in any time zone. A reading
14
+ * without a time of its own is a new measurement each time, so it is told apart by when it arrived.
32
15
  */
33
- export const createStableResultId = (deviceData, data) => {
34
- const deviceIdentity = deviceData.sn || deviceData.manufacturerData || deviceData.model || deviceData.name || deviceData.id;
35
- return `ovok:${hash(JSON.stringify(canonicalize({
36
- device: deviceIdentity,
37
- name: deviceData.name,
38
- data
39
- })))}`;
40
- };
16
+ export const createStableResultId = (deviceData, data, receivedAt = new Date()) => `ovok:${stableHash({
17
+ device: deviceIdentityOf(deviceData),
18
+ name: deviceData.name,
19
+ data: identifyingData(data),
20
+ ...(isTimestamped(data) ? {} : {
21
+ receivedAt: receivedAt.toISOString()
22
+ })
23
+ })}`;
24
+
25
+ /** The id SDKs before 1.16.1 gave the same reading, to find what they saved. */
26
+ export const createLegacyResultId = (deviceData, data) => `ovok:${instantStableHash({
27
+ device: deviceIdentityOf(deviceData),
28
+ name: deviceData.name,
29
+ data: identifyingData(data)
30
+ })}`;
41
31
 
42
32
  /** Converts the ISO date strings of `recordedAt`, `start` and `end` fields back to `Date`s, recursively. */
43
33
  export const reviveResultDates = value => {
@@ -1 +1 @@
1
- {"version":3,"names":["canonicalize","value","Date","toISOString","Array","isArray","map","Object","fromEntries","entries","sort","left","right","localeCompare","key","nested","hash","first","second","index","length","code","charCodeAt","Math","imul","toString","padStart","createStableResultId","deviceData","data","deviceIdentity","sn","manufacturerData","model","name","id","JSON","stringify","device","reviveResultDates","revive","current","includes","date","Number","isNaN","getTime","item","childKey","childValue"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/result-identity.ts"],"mappings":";;AAAA;;AAMA,MAAMA,YAAY,GAAIC,KAAc,IAAc;EAChD,IAAIA,KAAK,YAAYC,IAAI,EAAE;IACzB,OAAOD,KAAK,CAACE,WAAW,CAAC,CAAC;EAC5B;EAEA,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE;IACxB,OAAOA,KAAK,CAACK,GAAG,CAACN,YAAY,CAAC;EAChC;EAEA,IAAIC,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACtC,OAAOM,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACR,KAAK,CAAC,CAClBS,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAACC,KAAK,CAAC,KAAKD,IAAI,CAACE,aAAa,CAACD,KAAK,CAAC,CAAC,CACpDN,GAA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L;EACF,CAAC,CACH,CACF,CAAC,EAAE;AACL,CAAC;;AAED;AACA,OAAO,MAAMU,iBAAiB,GAAOtC,KAAQ,IAAQ;EACnD,MAAMuC,MAAM,GAAGA,CAACC,OAAgB,EAAE3B,GAAY,KAAc;IAC1D,IACE,OAAO2B,OAAO,KAAK,QAAQ,IAC3B,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,CAACC,QAAQ,CAAC5B,GAAG,IAAI,EAAE,CAAC,EAClD;MACA,MAAM6B,IAAI,GAAG,IAAIzC,IAAI,CAACuC,OAAO,CAAC;MAE9B,OAAOG,MAAM,CAACC,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,GAAGL,OAAO,GAAGE,IAAI;IACtD;IAEA,IAAIvC,KAAK,CAACC,OAAO,CAACoC,OAAO,CAAC,EAAE;MAC1B,OAAOA,OAAO,CAACnC,GAAG,CAAEyC,IAAI,IAAKP,MAAM,CAACO,IAAI,CAAC,CAAC;IAC5C;IAEA,IAAIN,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAC1C,OAAOlC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACgC,OAAO,CAAC,CAACnC,GAAG,CAAC,CAAC,CAAC0C,QAAQ,EAAEC,UAAU,CAAC,KAAK,CACtDD,QAAQ,EACRR,MAAM,CAACS,UAAU,EAAED,QAAQ,CAAC,CAC7B,CACH,CAAC;IACH;IAEA,OAAOP,OAAO;EAChB,CAAC;EAED,OAAOD,MAAM,CAACvC,KAAK,CAAC;AACtB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["isTimestamped","instantStableHash","stableHash","ADDED_READING_PROPERTIES","Set","identifyingData","data","Object","fromEntries","entries","filter","key","has","deviceIdentityOf","deviceData","sn","manufacturerData","model","name","id","createStableResultId","receivedAt","Date","device","toISOString","createLegacyResultId","reviveResultDates","value","revive","current","includes","date","Number","isNaN","getTime","Array","isArray","map","item","childKey","childValue"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/result-identity.ts"],"mappings":";;AAAA;;AAIA,SAASA,aAAa,QAAQ,gCAA6B;AAC3D,SAASC,iBAAiB,EAAEC,UAAU,QAAQ,qCAAkC;AAGhF;AACA,MAAMC,wBAAwB,GAAG,IAAIC,GAAG,CAAC,CACvC,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,aAAa,CACd,CAAC;AAEF,MAAMC,eAAe,GAAIC,IAAiB,IACxCC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACH,IAAI,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,KAAK,CAACR,wBAAwB,CAACS,GAAG,CAACD,GAAG,CAAC,CAAC,CAAC;AAEhG,MAAME,gBAAgB,GAAIC,UAAsB,IAC9CA,UAAU,CAACC,EAAE,IACbD,UAAU,CAACE,gBAAgB,IAC3BF,UAAU,CAACG,KAAK,IAChBH,UAAU,CAACI,IAAI,IACfJ,UAAU,CAACK,EAAE;;AAEf;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGA,CAClCN,UAAsB,EACtBR,IAAiB,EACjBe,UAAgB,GAAG,IAAIC,IAAI,CAAC,CAAC,KAE7B,QAAQpB,UAAU,CAAC;EACjBqB,MAAM,EAAEV,gBAAgB,CAACC,UAAU,CAAC;EACpCI,IAAI,EAAEJ,UAAU,CAACI,IAAI;EACrBZ,IAAI,EAAED,eAAe,CAACC,IAAI,CAAC;EAC3B,IAAIN,aAAa,CAACM,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG;IAAEe,UAAU,EAAEA,UAAU,CAACG,WAAW,CAAC;EAAE,CAAC;AACzE,CAAC,CAAC,EAAE;;AAEN;AACA,OAAO,MAAMC,oBAAoB,GAAGA,CAACX,UAAsB,EAAER,IAAiB,KAC5E,QAAQL,iBAAiB,CAAC;EACxBsB,MAAM,EAAEV,gBAAgB,CAACC,UAAU,CAAC;EACpCI,IAAI,EAAEJ,UAAU,CAACI,IAAI;EACrBZ,IAAI,EAAED,eAAe,CAACC,IAAI;AAC5B,CAAC,CAAC,EAAE;;AAEN;AACA,OAAO,MAAMoB,iBAAiB,GAAOC,KAAQ,IAAQ;EACnD,MAAMC,MAAM,GAAGA,CAACC,OAAgB,EAAElB,GAAY,KAAc;IAC1D,IACE,OAAOkB,OAAO,KAAK,QAAQ,IAC3B,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,CAACC,QAAQ,CAACnB,GAAG,IAAI,EAAE,CAAC,EAClD;MACA,MAAMoB,IAAI,GAAG,IAAIT,IAAI,CAACO,OAAO,CAAC;MAE9B,OAAOG,MAAM,CAACC,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,GAAGL,OAAO,GAAGE,IAAI;IACtD;IAEA,IAAII,KAAK,CAACC,OAAO,CAACP,OAAO,CAAC,EAAE;MAC1B,OAAOA,OAAO,CAACQ,GAAG,CAAEC,IAAI,IAAKV,MAAM,CAACU,IAAI,CAAC,CAAC;IAC5C;IAEA,IAAIT,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAC1C,OAAOtB,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACoB,OAAO,CAAC,CAACQ,GAAG,CAAC,CAAC,CAACE,QAAQ,EAAEC,UAAU,CAAC,KAAK,CACtDD,QAAQ,EACRX,MAAM,CAACY,UAAU,EAAED,QAAQ,CAAC,CAC7B,CACH,CAAC;IACH;IAEA,OAAOV,OAAO;EAChB,CAAC;EAED,OAAOD,MAAM,CAACD,KAAK,CAAC;AACtB,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ const MILLISECONDS_PER_SECOND = 1000;
4
+
5
+ /** The Bluetooth SIG heart-rate RR-Interval resolution: counts of 1/1024 s. */
6
+ const RR_COUNTS_PER_SECOND = 1024;
7
+ const RR_DECIMALS = 2;
8
+
9
+ /** An RR-Interval count from a Heart Rate Measurement, in milliseconds. */
10
+ const rrIntervalMilliseconds = counts => Number((counts * MILLISECONDS_PER_SECOND / RR_COUNTS_PER_SECOND).toFixed(RR_DECIMALS));
11
+ export { rrIntervalMilliseconds };
12
+ //# sourceMappingURL=rr-interval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MILLISECONDS_PER_SECOND","RR_COUNTS_PER_SECOND","RR_DECIMALS","rrIntervalMilliseconds","counts","Number","toFixed"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/rr-interval.ts"],"mappings":";;AAAA,MAAMA,uBAAuB,GAAG,IAAI;;AAEpC;AACA,MAAMC,oBAAoB,GAAG,IAAI;AAEjC,MAAMC,WAAW,GAAG,CAAC;;AAErB;AACA,MAAMC,sBAAsB,GAAIC,MAAc,IAC5CC,MAAM,CACJ,CAAED,MAAM,GAAGJ,uBAAuB,GAAIC,oBAAoB,EAAEK,OAAO,CACjEJ,WACF,CACF,CAAC;AAEH,SAASC,sBAAsB","ignoreList":[]}