@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
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ import { memorySlotForDeviceUser } from "../../../utils/device-user.js";
4
+ import { rrIntervalMilliseconds } from "../../../utils/rr-interval.js";
5
+ import { temperatureTypeFromCode } from "../../../utils/temperature-type.js";
6
+ import { byteAt, DATE_TIME_BYTES, dateTimeAt, withDefinedMetadata } from "./standard-gatt.frame.js";
7
+ const TEMPERATURE_TIMESTAMP = 0x02;
8
+ const TEMPERATURE_TYPE = 0x04;
9
+ const TEMPERATURE_FIELDS_INDEX = 5;
10
+ const WEIGHT_TIMESTAMP = 0x02;
11
+ const WEIGHT_USER = 0x04;
12
+ const WEIGHT_FIELDS_INDEX = 3;
13
+
14
+ /** The weight a scale sends when the measurement failed. */
15
+ const WEIGHT_UNSUCCESSFUL = 0xffff;
16
+ const PULSE_OXIMETER_TIMESTAMP = 0x01;
17
+ const PULSE_OXIMETER_FIELDS_INDEX = 5;
18
+ const HEART_RATE_UINT16 = 0x01;
19
+ const HEART_RATE_ENERGY_EXPENDED = 0x08;
20
+ const HEART_RATE_RR_INTERVALS = 0x10;
21
+ const HEART_RATE_FLAGS_BYTES = 1;
22
+ const UINT8_BYTES = 1;
23
+ const UINT16_BYTES = 2;
24
+
25
+ /** Where the optional fields start once the fixed ones and the timestamp are accounted for. */
26
+ const afterTimestamp = (flags, timestampFlag, fieldsIndex) => flags & timestampFlag ? fieldsIndex + DATE_TIME_BYTES : fieldsIndex;
27
+ const littleEndian16 = (frame, index, offset) => {
28
+ const low = byteAt(frame, index, offset);
29
+ const high = byteAt(frame, index + 1, offset);
30
+ return low === undefined || high === undefined ? undefined : low | high << 8;
31
+ };
32
+
33
+ /** Temperature Measurement 0x2A1C: the device's own timestamp and where on the body it measured. */
34
+ const decorateThermometerReading = (reading, frame, recordOffset = 0) => {
35
+ const flags = frame && byteAt(frame, 0, recordOffset);
36
+ if (!frame || flags === undefined) {
37
+ return reading;
38
+ }
39
+ const typeCode = flags & TEMPERATURE_TYPE ? byteAt(frame, afterTimestamp(flags, TEMPERATURE_TIMESTAMP, TEMPERATURE_FIELDS_INDEX), recordOffset) : undefined;
40
+ return withDefinedMetadata(reading, {
41
+ recordedAt: flags & TEMPERATURE_TIMESTAMP ? dateTimeAt(frame, TEMPERATURE_FIELDS_INDEX, recordOffset) : undefined,
42
+ temperatureType: typeCode === undefined ? undefined : temperatureTypeFromCode(typeCode)
43
+ });
44
+ };
45
+
46
+ /** Weight Measurement 0x2A9D: withholds an unsuccessful weight, adds the timestamp and the device user. */
47
+ const decorateWeightReading = (reading, frame, recordOffset = 0) => {
48
+ const flags = frame && byteAt(frame, 0, recordOffset);
49
+ if (!frame || flags === undefined) {
50
+ return reading;
51
+ }
52
+ if (littleEndian16(frame, 1, recordOffset) === WEIGHT_UNSUCCESSFUL) {
53
+ return null;
54
+ }
55
+ const userId = flags & WEIGHT_USER ? byteAt(frame, afterTimestamp(flags, WEIGHT_TIMESTAMP, WEIGHT_FIELDS_INDEX), recordOffset) : undefined;
56
+ return withDefinedMetadata(reading, {
57
+ recordedAt: flags & WEIGHT_TIMESTAMP ? dateTimeAt(frame, WEIGHT_FIELDS_INDEX, recordOffset) : undefined,
58
+ memorySlot: userId === undefined ? undefined : memorySlotForDeviceUser(userId)
59
+ });
60
+ };
61
+
62
+ /** PLX Spot-Check Measurement 0x2A5E: the device's own timestamp. */
63
+ const decoratePulseOximeterReading = (reading, frame, recordOffset = 0) => {
64
+ const flags = frame && byteAt(frame, 0, recordOffset);
65
+ if (!frame || flags === undefined || !(flags & PULSE_OXIMETER_TIMESTAMP)) {
66
+ return reading;
67
+ }
68
+ return withDefinedMetadata(reading, {
69
+ recordedAt: dateTimeAt(frame, PULSE_OXIMETER_FIELDS_INDEX, recordOffset)
70
+ });
71
+ };
72
+
73
+ /** The RR intervals a Heart Rate Measurement carries, in milliseconds and in the order sent. */
74
+ const rrIntervalsFromHeartRateFrame = (frame, flags, recordOffset) => {
75
+ const rrIntervals = [];
76
+ let index = HEART_RATE_FLAGS_BYTES + (flags & HEART_RATE_UINT16 ? UINT16_BYTES : UINT8_BYTES) + (flags & HEART_RATE_ENERGY_EXPENDED ? UINT16_BYTES : 0);
77
+ let counts = littleEndian16(frame, index, recordOffset);
78
+ while (counts !== undefined) {
79
+ rrIntervals.push(rrIntervalMilliseconds(counts));
80
+ index += UINT16_BYTES;
81
+ counts = littleEndian16(frame, index, recordOffset);
82
+ }
83
+ return rrIntervals;
84
+ };
85
+
86
+ /** Heart Rate Measurement 0x2A37: the RR intervals, when the strap sends them. */
87
+ const decorateHeartRateReading = (reading, frame, recordOffset = 0) => {
88
+ const flags = frame && byteAt(frame, 0, recordOffset);
89
+ if (!frame || flags === undefined || !(flags & HEART_RATE_RR_INTERVALS)) {
90
+ return reading;
91
+ }
92
+ const rrIntervals = rrIntervalsFromHeartRateFrame(frame, flags, recordOffset);
93
+ return rrIntervals.length > 0 ? {
94
+ ...reading,
95
+ rrIntervals
96
+ } : reading;
97
+ };
98
+ export { decorateHeartRateReading, decoratePulseOximeterReading, decorateThermometerReading, decorateWeightReading };
99
+ //# sourceMappingURL=standard-gatt.decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memorySlotForDeviceUser","rrIntervalMilliseconds","temperatureTypeFromCode","byteAt","DATE_TIME_BYTES","dateTimeAt","withDefinedMetadata","TEMPERATURE_TIMESTAMP","TEMPERATURE_TYPE","TEMPERATURE_FIELDS_INDEX","WEIGHT_TIMESTAMP","WEIGHT_USER","WEIGHT_FIELDS_INDEX","WEIGHT_UNSUCCESSFUL","PULSE_OXIMETER_TIMESTAMP","PULSE_OXIMETER_FIELDS_INDEX","HEART_RATE_UINT16","HEART_RATE_ENERGY_EXPENDED","HEART_RATE_RR_INTERVALS","HEART_RATE_FLAGS_BYTES","UINT8_BYTES","UINT16_BYTES","afterTimestamp","flags","timestampFlag","fieldsIndex","littleEndian16","frame","index","offset","low","high","undefined","decorateThermometerReading","reading","recordOffset","typeCode","recordedAt","temperatureType","decorateWeightReading","userId","memorySlot","decoratePulseOximeterReading","rrIntervalsFromHeartRateFrame","rrIntervals","counts","push","decorateHeartRateReading","length"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.ts"],"mappings":";;AACA,SAASA,uBAAuB,QAAQ,+BAA4B;AACpE,SAASC,sBAAsB,QAAQ,+BAA4B;AACnE,SAASC,uBAAuB,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AgD,GAAGA,CACvDb,OAAO,EACPP,KAAK,EACLQ,YAAY,GAAG,CAAC,KACb;EACH,MAAMZ,KAAK,GAAGI,KAAK,IAAIxB,MAAM,CAACwB,KAAK,EAAE,CAAC,EAAEQ,YAAY,CAAC;EAErD,IAAI,CAACR,KAAK,IAAIJ,KAAK,KAAKS,SAAS,IAAI,EAAET,KAAK,GAAGL,uBAAuB,CAAC,EAAE;IACvE,OAAOgB,OAAO;EAChB;EAEA,MAAMU,WAAW,GAAGD,6BAA6B,CAAChB,KAAK,EAAEJ,KAAK,EAAEY,YAAY,CAAC;EAE7E,OAAOS,WAAW,CAACI,MAAM,GAAG,CAAC,GAAG;IAAE,GAAGd,OAAO;IAAEU;EAAY,CAAC,GAAGV,OAAO;AACvE,CAAC;AAED,SACEa,wBAAwB,EACxBL,4BAA4B,EAC5BT,0BAA0B,EAC1BM,qBAAqB","ignoreList":[]}
@@ -4,6 +4,8 @@
4
4
 
5
5
  import { MeasurementTypeKey } from "@ovok/core/next";
6
6
  import { byteToHex } from "../../../utils/bytes-to-hex.js";
7
+ import { KPA_TO_MMHG } from "../../../utils/kpa-to-mmhg.js";
8
+ import { decorateHeartRateReading, decoratePulseOximeterReading, decorateThermometerReading, decorateWeightReading } from "./standard-gatt.decorators.js";
7
9
  import { standardGlucoseDevice } from "./standard-gatt.glucose.js";
8
10
  import { decorateBloodPressureReading, declareProfile, littleEndian } from "./standard-gatt.profile.js";
9
11
 
@@ -18,12 +20,20 @@ import { decorateBloodPressureReading, declareProfile, littleEndian } from "./st
18
20
  * every vendor names its hardware differently. A product declares the profile and supplies
19
21
  * the name its own hardware advertises.
20
22
  *
21
- * Values are little-endian, as the specification requires. Only the layouts using each
22
- * catalog's canonical unit are declared: a device reporting kPa, Fahrenheit or pounds needs
23
- * a conversion a declaration cannot express, and leaving those flag values undeclared means
24
- * such a device yields no reading rather than one that is quietly wrong.
23
+ * Values are little-endian, as the specification requires. A device may report in kPa,
24
+ * Fahrenheit or pounds; each field is then declared with the scale and offset that convert
25
+ * it to the catalog's canonical unit.
25
26
  */
26
27
 
28
+ const BLOOD_PRESSURE_KPA = 0x01;
29
+ const BLOOD_PRESSURE_TIMESTAMP = 0x02;
30
+ const BLOOD_PRESSURE_PULSE = 0x04;
31
+
32
+ /** Bits 0-4 are defined: kPa, timestamp, pulse, user id and measurement status. */
33
+ const BLOOD_PRESSURE_FLAGS = Array.from({
34
+ length: 32
35
+ }, (_, flags) => flags);
36
+
27
37
  /**
28
38
  * Blood Pressure Service 0x1810, Blood Pressure Measurement 0x2A35.
29
39
  *
@@ -33,8 +43,8 @@ import { decorateBloodPressureReading, declareProfile, littleEndian } from "./st
33
43
  * declares the length it needs. A device that reports no pulse still decodes, because the
34
44
  * flags value it sends selects a case that never looks for one.
35
45
  *
36
- * Bit 3 (user id, 0x08) and bit 4 (measurement status, 0x10) follow the pulse, so neither
37
- * moves it. Each shape is declared again with those bits set. Bit 0 (kPa) stays undeclared.
46
+ * Bit 3 (user id) and bit 4 (measurement status) follow the pulse, so neither moves it.
47
+ * Bit 0 says the pressures are in kPa, which is converted to whole mmHg.
38
48
  */
39
49
  /** Bit 2 set, bit 1 clear: the pulse follows the mean pressure. */
40
50
  const pulseAfterMeanPressure = {
@@ -47,35 +57,25 @@ const pulseAfterTimestamp = {
47
57
  fields: [littleEndian("heartRate", [14, 15], "bpm", "sfloat")],
48
58
  minLengthBytes: 16
49
59
  };
60
+ const pressureInKpa = (name, byteIndexes) => ({
61
+ ...littleEndian(name, byteIndexes, "mmHg", "sfloat"),
62
+ scale: KPA_TO_MMHG,
63
+ decimals: 0
64
+ });
65
+ const pressuresInKpa = [pressureInKpa("systolic", [1, 2]), pressureInKpa("diastolic", [3, 4])];
50
66
 
51
67
  /** Declares a Bluetooth SIG blood pressure profile device. */
52
- const standardBloodPressureDevice = params => declareProfile({
53
- ...params,
54
- decorateReading: (reading, frame, recordOffset) => {
55
- const decorated = decorateBloodPressureReading(reading, frame, recordOffset);
56
- if (!decorated) {
57
- return null;
58
- }
59
- return params.decorateReading ? params.decorateReading(decorated, frame, recordOffset) : decorated;
60
- }
61
- }, {
68
+ const standardBloodPressureDevice = params => declareProfile(params, {
62
69
  service: "1810",
63
70
  characteristic: "2a35",
64
71
  minLengthBytes: 7,
65
72
  measurementTypeKey: MeasurementTypeKey.bloodPressure,
66
- /** mmHg. 0x08, 0x10 and 0x18 repeat each shape with bit 3, bit 4, or both. */
67
- selectors: ["00", "08", "10", "18", "02", "0a", "12", "1a", "04", "0c", "14", "1c", "06", "0e", "16", "1e"],
73
+ decorateReading: decorateBloodPressureReading,
74
+ selectors: BLOOD_PRESSURE_FLAGS.map(byteToHex),
75
+ /** mmHg; the kPa shapes override it in `fieldsBySelector`. */
68
76
  fields: [littleEndian("systolic", [1, 2], "mmHg", "sfloat"), littleEndian("diastolic", [3, 4], "mmHg", "sfloat")],
69
- optionalFields: {
70
- "04": pulseAfterMeanPressure,
71
- "0c": pulseAfterMeanPressure,
72
- "14": pulseAfterMeanPressure,
73
- "1c": pulseAfterMeanPressure,
74
- "06": pulseAfterTimestamp,
75
- "0e": pulseAfterTimestamp,
76
- "16": pulseAfterTimestamp,
77
- "1e": pulseAfterTimestamp
78
- }
77
+ fieldsBySelector: Object.fromEntries(BLOOD_PRESSURE_FLAGS.filter(flags => flags & BLOOD_PRESSURE_KPA).map(flags => [byteToHex(flags), pressuresInKpa])),
78
+ optionalFields: Object.fromEntries(BLOOD_PRESSURE_FLAGS.filter(flags => flags & BLOOD_PRESSURE_PULSE).map(flags => [byteToHex(flags), flags & BLOOD_PRESSURE_TIMESTAMP ? pulseAfterTimestamp : pulseAfterMeanPressure]))
79
79
  });
80
80
 
81
81
  /** Health Thermometer Service 0x1809, Temperature Measurement 0x2A1C. */
@@ -84,6 +84,7 @@ const standardThermometerDevice = params => declareProfile(params, {
84
84
  characteristic: "2a1c",
85
85
  minLengthBytes: 5,
86
86
  measurementTypeKey: MeasurementTypeKey.temperature,
87
+ decorateReading: decorateThermometerReading,
87
88
  /** All combinations of Fahrenheit, timestamp and temperature type flags. */
88
89
  selectors: ["00", "02", "04", "06", "01", "03", "05", "07"],
89
90
  fields: [littleEndian("bodyTemp", [1, 2, 3, 4], "Cel", "float")],
@@ -122,12 +123,14 @@ const WEIGHT_KG_PER_COUNT = 0.005;
122
123
  * Weight Scale Service 0x181D, Weight Measurement 0x2A9D.
123
124
  *
124
125
  * The reading is a scaled integer rather than a float, so the resolution is applied here.
126
+ * A weight of 0xFFFF means the measurement failed, so it yields no reading.
125
127
  */
126
128
  const standardWeightScaleDevice = params => declareProfile(params, {
127
129
  service: "181d",
128
130
  characteristic: "2a9d",
129
131
  minLengthBytes: 3,
130
132
  measurementTypeKey: MeasurementTypeKey.bodyWeight,
133
+ decorateReading: decorateWeightReading,
131
134
  /** Unit, timestamp, user-id and BMI/height flags may all follow the value. */
132
135
  selectors: Array.from({
133
136
  length: 16
@@ -153,14 +156,16 @@ const standardWeightScaleDevice = params => declareProfile(params, {
153
156
  * Pulse Oximeter Service 0x1822, PLX Spot-Check Measurement 0x2A5E.
154
157
  *
155
158
  * Saturation and pulse rate are both required by the catalog, which matches the
156
- * specification: a spot-check measurement always carries both.
159
+ * specification: a spot-check measurement always carries both, at bytes 1-4 whatever the
160
+ * flags say, so every flags value selects the same fields. The optional ones follow them.
157
161
  */
158
162
  const standardPulseOximeterDevice = params => declareProfile(params, {
159
163
  service: "1822",
160
164
  characteristic: "2a5e",
161
165
  minLengthBytes: 5,
162
166
  measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
163
- selectors: ["00"],
167
+ decorateReading: decoratePulseOximeterReading,
168
+ selectors: ["*"],
164
169
  fields: [littleEndian("bloodOxygen", [1, 2], "%", "sfloat"), littleEndian("pulseRate", [3, 4], "bpm", "sfloat")]
165
170
  });
166
171
 
@@ -176,13 +181,15 @@ const UINT16_HEART_RATE_FLAGS = HEART_RATE_FLAGS.filter(flags => (flags & 0x01)
176
181
  * Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
177
182
  *
178
183
  * Both heart-rate layouts are declared. A contact-not-detected frame is idle, so it cannot
179
- * become a false reading while the strap is off the body.
184
+ * become a false reading while the strap is off the body. RR intervals, a list of any
185
+ * length, are read from the frame by the decorator and reported as `rrIntervals`.
180
186
  */
181
187
  const standardHeartRateDevice = params => declareProfile(params, {
182
188
  service: "180d",
183
189
  characteristic: "2a37",
184
190
  minLengthBytes: 2,
185
191
  measurementTypeKey: MeasurementTypeKey.heartRate,
192
+ decorateReading: decorateHeartRateReading,
186
193
  selectors: HEART_RATE_FLAGS.map(byteToHex),
187
194
  fields: [{
188
195
  name: "heartRate",
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","byteToHex","standardGlucoseDevice","decorateBloodPressureReading","declareProfile","littleEndian","pulseAfterMeanPressure","fields","minLengthBytes","pulseAfterTimestamp","standardBloodPressureDevice","params","decorateReading","reading","frame","recordOffset","decorated","service","characteristic","measurementTypeKey","bloodPressure","selectors","optionalFields","standardThermometerDevice","temperature","fieldsBySelector","scale","offset","decimals","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","Array","from","length","_","flags","Object","fromEntries","selector","standardPulseOximeterDevice","bloodOxygenPulseRate","HEART_RATE_FLAGS","filter","UINT16_HEART_RATE_FLAGS","standardHeartRateDevice","heartRate","map","name","byteIndexes","encoding","unit","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"mappings":";;AAAA;;AAEA,SAASA,kBAAkB,QAAQ,iBAAiB;AAGpD,SAASC,SAAS,QAAQ,gCAA6B;AAEvD,SAASC,qBAAqB,QAAQ,4BAAyB;AAC/D,SACEC,4BAA4B,EAC5BC,cAAc,EACdC,YAAY,QAEP,4BAAyB;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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PA_TO_MMHG","decorateHeartRateReading","decoratePulseOximeterReading","decorateThermometerReading","decorateWeightReading","standardGlucoseDevice","decorateBloodPressureReading","declareProfile","littleEndian","BLOOD_PRESSURE_KPA","BLOOD_PRESSURE_TIMESTAMP","BLOOD_PRESSURE_PULSE","BLOOD_PRESSURE_FLAGS","Array","from","length","_","flags","pulseAfterMeanPressure","fields","minLengthBytes","pulseAfterTimestamp","pressureInKpa","name","byteIndexes","scale","decimals","pressuresInKpa","standardBloodPressureDevice","params","service","characteristic","measurementTypeKey","bloodPressure","decorateReading","selectors","map","fieldsBySelector","Object","fromEntries","filter","optionalFields","standardThermometerDevice","temperature","offset","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","selector","standardPulseOximeterDevice","bloodOxygenPulseRate","HEART_RATE_FLAGS","UINT16_HEART_RATE_FLAGS","standardHeartRateDevice","heartRate","encoding","unit","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"mappings":";;AAAA;;AAEA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,SAASC,SAAS,QAAQ,gCAA6B;AACvD,SAASC,WAAW,QAAQ,+BAA4B;AAExD,SACEC,wBAAwB,EACxBC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,qBAAqB,QAChB,+BAA4B;AACnC,SAASC,qBAAqB,QAAQ,4BAAyB;AAC/D,SACEC,4BAA4B,EAC5BC,cAAc,EACdC,YAAY,QAEP,4BAAyB;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,wBAAwB,GAAG,IAAI;AACrC,MAAMC,oBAAoB,GAAG,IAAI;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,KAAK,CAACC,IAAI,CAAC;EAAEC,MAAM,EAAE;AAAG,CAAC,EAAE,CAACC,CAAC,EAAEC,KA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IAAI,EAAE;EACR,CAAC,CACF,CACF,CACL,CAAC;EACDf,cAAc,EAAEH,MAAM,CAACC,WAAW,CAChCa,uBAAuB,CAAChB,GAAG,CAAEnB,KAAK,IAAK,CAAClB,SAAS,CAACkB,KAAK,CAAC,EAAE;IACtDE,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE;EAClB,CAAC,CAAC,CACN;AACF,CAAC,CAAC;AAEJ,SACEQ,2BAA2B,EAC3BvB,qBAAqB,EACrBgD,uBAAuB,EACvBJ,2BAA2B,EAC3BP,yBAAyB,EACzBI,yBAAyB","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ /** The Bluetooth SIG Date Time characteristic is seven bytes long. */
4
+ const DATE_TIME_BYTES = 7;
5
+
6
+ /** The byte at `index` of a record that starts at `offset`; undefined when the frame ends first. */
7
+ const byteAt = (frame, index, offset) => {
8
+ const value = Number.parseInt(frame[index + offset] ?? "", 16);
9
+ return Number.isInteger(value) && value >= 0 && value <= 0xff ? value : undefined;
10
+ };
11
+
12
+ /** Reads a SIG Date Time at `index` as a phone-local date; undefined for missing or impossible fields. */
13
+ const dateTimeAt = (frame, index, offset = 0) => {
14
+ const yearLow = byteAt(frame, index, offset);
15
+ const yearHigh = byteAt(frame, index + 1, offset);
16
+ const month = byteAt(frame, index + 2, offset);
17
+ const day = byteAt(frame, index + 3, offset);
18
+ const hour = byteAt(frame, index + 4, offset);
19
+ const minute = byteAt(frame, index + 5, offset);
20
+ const second = byteAt(frame, index + 6, offset);
21
+ if (yearLow === undefined || yearHigh === undefined || month === undefined || day === undefined || hour === undefined || minute === undefined || second === undefined) {
22
+ return undefined;
23
+ }
24
+ const year = yearLow | yearHigh << 8;
25
+ const date = new Date(year, month - 1, day, hour, minute, second);
26
+ return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day && date.getHours() === hour && date.getMinutes() === minute && date.getSeconds() === second ? date : undefined;
27
+ };
28
+
29
+ /** `reading` plus each of `metadata` that has a value. */
30
+ const withDefinedMetadata = (reading, metadata) => ({
31
+ ...reading,
32
+ ...Object.fromEntries(Object.entries(metadata).filter(([, value]) => value !== undefined))
33
+ });
34
+ export { byteAt, DATE_TIME_BYTES, dateTimeAt, withDefinedMetadata };
35
+ //# sourceMappingURL=standard-gatt.frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DATE_TIME_BYTES","byteAt","frame","index","offset","value","Number","parseInt","isInteger","undefined","dateTimeAt","yearLow","yearHigh","month","day","hour","minute","second","year","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","withDefinedMetadata","reading","metadata","Object","fromEntries","entries","filter"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.ts"],"mappings":";;AAAA;AACA,MAAMA,eAAe,GAAG,CAAC;;AAEzB;AACA,MAAMC,MAAM,GAAGA,CACbC,KAAwB,EACxBC,KAAa,EACbC,MAAc,KACS;EACvB,MAAMC,KAAK,GAAGC,MAAM,CAACC,QAAQ,CAACL,KAAK,CAACC,KAAK,GAAGC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC;EAE9D,OAAOE,MAAM,CAACE,SAAS,CAACH,KAAK,CAAC,IAAIA,KAAK,IAAI,CAAC,IAAIA,KAAK,IAAI,IAAI,GACzDA,KAAK,GACLI,SAAS;AACf,CAAC;;AAED;AACA,MAAMC,UAAU,GAAGA,CACjBR,KAAwB,EACxBC,KAAa,EACbC,MAAM,GAAG,CAAC,KACW;EACrB,MAAMO,OAAO,GAAGV,MAAM,CAACC,KAAK,EAAEC,KAAK,EAAEC,MAAM,CAAC;EAC5C,MAAMQ,QAAQ,GAAGX,MAAM,CAACC,KAAK,EAAEC,KAAK,GAAG,CAAC,EAAEC,MAAM,CAAC;EACjD,MAAMS,KAAK,GAAGZ,MAAM,CAACC,KAAK,EAAEC,KAAK,GAAG,CAAC,EAAEC,MAAM,CAAC;EAC9C,MAAMU,GAAG,GAAGb,MAAM,CA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,MAAM,CAACE,OAAO,CAACH,QAAQ,CAAC,CAACI,MAAM,CAAC,CAAC,GAAG5B,KAAK,CAAC,KAAKA,KAAK,KAAKI,SAAS,CACpE;AACF,CAAC,CAAC;AAEF,SAASR,MAAM,EAAED,eAAe,EAAEU,UAAU,EAAEiB,mBAAmB","ignoreList":[]}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ import { byte, FLAG_MOL_PER_L, hasFlag, sensorStatusFromGlucoseFrame, sequenceNumberFromGlucoseFrame, typeAndLocationFromGlucoseFrame } from "./standard-gatt.glucose-frame.js";
4
+ const NIBBLE_BITS = 4;
5
+ const NIBBLE_MASK = 0x0f;
6
+
7
+ /** Indexed by the specimen type code; 0, 10 (control solution) and 11-15 are not a patient sample. */
8
+ const SPECIMEN_TYPES = [undefined, "capillaryWholeBlood", "capillaryPlasma", "venousWholeBlood", "venousPlasma", "arterialWholeBlood", "arterialPlasma", "undeterminedWholeBlood", "undeterminedPlasma", "interstitialFluid"];
9
+
10
+ /** Indexed by the sample location code; 0, 4 (control solution), 5-14 and 15 (not available) say nothing. */
11
+ const SAMPLE_LOCATIONS = [undefined, "finger", "alternateSite", "earlobe"];
12
+ const STATUS_BATTERY_LOW = 0x0001;
13
+ const STATUS_SENSOR_MALFUNCTION = 0x0002;
14
+ const STATUS_SAMPLE_TOO_SMALL = 0x0004;
15
+ const STATUS_STRIP_INSERTION_ERROR = 0x0008;
16
+ const STATUS_STRIP_TYPE_INCORRECT = 0x0010;
17
+ const STATUS_RESULT_TOO_HIGH = 0x0020;
18
+ const STATUS_RESULT_TOO_LOW = 0x0040;
19
+ const STATUS_TEMPERATURE_TOO_HIGH = 0x0080;
20
+ const STATUS_TEMPERATURE_TOO_LOW = 0x0100;
21
+ const STATUS_READ_INTERRUPTED = 0x0200;
22
+ const STATUS_DEVICE_FAULT = 0x0400;
23
+ const STATUS_TIME_FAULT = 0x0800;
24
+
25
+ /** The test did not take place properly, so the concentration is not a patient's result. */
26
+ const UNUSABLE_STATUS = STATUS_SENSOR_MALFUNCTION | STATUS_SAMPLE_TOO_SMALL | STATUS_STRIP_INSERTION_ERROR | STATUS_STRIP_TYPE_INCORRECT | STATUS_READ_INTERRUPTED | STATUS_DEVICE_FAULT;
27
+ const SENSOR_WARNINGS = [[STATUS_BATTERY_LOW, "batteryLow"], [STATUS_TEMPERATURE_TOO_HIGH, "temperatureTooHigh"], [STATUS_TEMPERATURE_TOO_LOW, "temperatureTooLow"], [STATUS_TIME_FAULT, "timeFault"]];
28
+ const reportedUnit = frame => hasFlag(byte(frame, 0) ?? 0, FLAG_MOL_PER_L) ? "mmol/L" : "mg/dL";
29
+ const outOfRange = status => {
30
+ if (hasFlag(status, STATUS_RESULT_TOO_HIGH)) {
31
+ return "high";
32
+ }
33
+ return hasFlag(status, STATUS_RESULT_TOO_LOW) ? "low" : undefined;
34
+ };
35
+ const sensorWarnings = status => SENSOR_WARNINGS.filter(([flag]) => hasFlag(status, flag)).map(([, warning]) => warning);
36
+
37
+ /** Whether the meter flagged the record as a test that failed rather than a result. */
38
+ const hasUnusableSensorStatus = frame => {
39
+ const status = sensorStatusFromGlucoseFrame(frame);
40
+ return status !== undefined && hasFlag(status, UNUSABLE_STATUS);
41
+ };
42
+
43
+ /** What the record says about itself, beside its concentration. */
44
+ const glucoseRecordDetails = frame => {
45
+ const sequenceNumber = sequenceNumberFromGlucoseFrame(frame);
46
+ const typeAndLocation = typeAndLocationFromGlucoseFrame(frame);
47
+ const status = sensorStatusFromGlucoseFrame(frame);
48
+ const specimen = typeAndLocation === undefined ? undefined : SPECIMEN_TYPES[typeAndLocation & NIBBLE_MASK];
49
+ const sampleLocation = typeAndLocation === undefined ? undefined : SAMPLE_LOCATIONS[typeAndLocation >> NIBBLE_BITS];
50
+ const range = status === undefined ? undefined : outOfRange(status);
51
+ const warnings = status === undefined ? [] : sensorWarnings(status);
52
+ return {
53
+ reportedUnit: reportedUnit(frame),
54
+ ...(sequenceNumber !== undefined && {
55
+ sequenceNumber
56
+ }),
57
+ ...(specimen && {
58
+ specimen
59
+ }),
60
+ ...(sampleLocation && {
61
+ sampleLocation
62
+ }),
63
+ ...(range && {
64
+ outOfRange: range
65
+ }),
66
+ ...(warnings.length > 0 && {
67
+ sensorStatus: warnings
68
+ })
69
+ };
70
+ };
71
+ export { glucoseRecordDetails, hasUnusableSensorStatus };
72
+ //# sourceMappingURL=standard-gatt.glucose-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["byte","FLAG_MOL_PER_L","hasFlag","sensorStatusFromGlucoseFrame","sequenceNumberFromGlucoseFrame","typeAndLocationFromGlucoseFrame","NIBBLE_BITS","NIBBLE_MASK","SPECIMEN_TYPES","undefined","SAMPLE_LOCATIONS","STATUS_BATTERY_LOW","STATUS_SENSOR_MALFUNCTION","STATUS_SAMPLE_TOO_SMALL","STATUS_STRIP_INSERTION_ERROR","STATUS_STRIP_TYPE_INCORRECT","STATUS_RESULT_TOO_HIGH","STATUS_RESULT_TOO_LOW","STATUS_TEMPERATURE_TOO_HIGH","STATUS_TEMPERATURE_TOO_LOW","STATUS_READ_INTERRUPTED","STATUS_DEVICE_FAULT","STATUS_TIME_FAULT","UNUSABLE_STATUS","SENSOR_WARNINGS","reportedUnit","frame","outOfRange","status","sensorWarnings","filter","flag","map","warning","hasUnusableSensorStatus","glucoseRecordDetails","sequenceNumber","typeAndLocation","specimen","sampleLocation","range","warnings","length","sensorStatus"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.ts"],"mappings":";;AAQA,SACEA,IAAI,EACJC,cAAc,EACdC,OAAO,EACPC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,+BAA+B,QAC1B,kCAA+B;AAEtC,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,WAAW,GAAG,IAAI;;AAExB;AACA,MAAMC,cAA4D,GAAG,CACnEC,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,o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Ac,IAAI;MAAEA;IAAe,CAAC,CAAC;IACzC,IAAIC,KAAK,IAAI;MAAEb,UAAU,EAAEa;IAAM,CAAC,CAAC;IACnC,IAAIC,QAAQ,CAACC,MAAM,GAAG,CAAC,IAAI;MAAEC,YAAY,EAAEF;IAAS,CAAC;EACvD,CAAC;AACH,CAAC;AAED,SAASN,oBAAoB,EAAED,uBAAuB","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ const FLAG_TIME_OFFSET = 0x01;
4
+ const FLAG_CONCENTRATION = 0x02;
5
+ const FLAG_MOL_PER_L = 0x04;
6
+ const FLAG_SENSOR_STATUS = 0x08;
7
+ const SEQUENCE_NUMBER_INDEX = 1;
8
+ const BASE_TIME_INDEX = 3;
9
+ const TIME_OFFSET_INDEX = 10;
10
+ const BYTE_BITS = 8;
11
+ const TYPE_AND_LOCATION_OFFSET = 2;
12
+ const SENSOR_STATUS_OFFSET = 3;
13
+ const hasFlag = (flags, flag) => (flags & flag) !== 0;
14
+ const concentrationIndex = flags => hasFlag(flags, FLAG_TIME_OFFSET) ? TIME_OFFSET_INDEX + 2 : TIME_OFFSET_INDEX;
15
+ const byte = (frame, index) => {
16
+ const value = Number.parseInt(frame[index] ?? "", 16);
17
+ return Number.isInteger(value) ? value : undefined;
18
+ };
19
+ const uint16 = (frame, index) => {
20
+ const low = byte(frame, index);
21
+ const high = byte(frame, index + 1);
22
+ return low === undefined || high === undefined ? undefined : low | high << BYTE_BITS;
23
+ };
24
+
25
+ /** The meter's number for the record, in bytes 1-2 of every Glucose Measurement. */
26
+ const sequenceNumberFromGlucoseFrame = frame => uint16(frame, SEQUENCE_NUMBER_INDEX);
27
+
28
+ /** Specimen type in the low nibble and sample location in the high one; only a record with a concentration has it. */
29
+ const typeAndLocationFromGlucoseFrame = frame => {
30
+ const flags = byte(frame, 0) ?? 0;
31
+ return hasFlag(flags, FLAG_CONCENTRATION) ? byte(frame, concentrationIndex(flags) + TYPE_AND_LOCATION_OFFSET) : undefined;
32
+ };
33
+
34
+ /** The Sensor Status Annunciation bits, which only a record that sets flag bit 3 carries. */
35
+ const sensorStatusFromGlucoseFrame = frame => {
36
+ const flags = byte(frame, 0) ?? 0;
37
+ return hasFlag(flags, FLAG_SENSOR_STATUS) && hasFlag(flags, FLAG_CONCENTRATION) ? uint16(frame, concentrationIndex(flags) + SENSOR_STATUS_OFFSET) : undefined;
38
+ };
39
+ export { BASE_TIME_INDEX, byte, concentrationIndex, FLAG_CONCENTRATION, FLAG_MOL_PER_L, FLAG_TIME_OFFSET, hasFlag, sensorStatusFromGlucoseFrame, sequenceNumberFromGlucoseFrame, TIME_OFFSET_INDEX, typeAndLocationFromGlucoseFrame };
40
+ //# sourceMappingURL=standard-gatt.glucose-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FLAG_TIME_OFFSET","FLAG_CONCENTRATION","FLAG_MOL_PER_L","FLAG_SENSOR_STATUS","SEQUENCE_NUMBER_INDEX","BASE_TIME_INDEX","TIME_OFFSET_INDEX","BYTE_BITS","TYPE_AND_LOCATION_OFFSET","SENSOR_STATUS_OFFSET","hasFlag","flags","flag","concentrationIndex","byte","frame","index","value","Number","parseInt","isInteger","undefined","uint16","low","high","sequenceNumberFromGlucoseFrame","typeAndLocationFromGlucoseFrame","sensorStatusFromGlucoseFrame"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.ts"],"mappings":";;AAAA,MAAMA,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,cAAc,GAAG,IAAI;AAC3B,MAAMC,kBAAkB,GAAG,IAAI;AAE/B,MAAMC,qBAAqB,GAAG,CAAC;AAC/B,MAAMC,eAAe,GAAG,CAAC;AACzB,MAAMC,iBAAiB,GAAG,EAAE;AAE5B,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,wBAAwB,GAAG,CAAC;AAClC,MAAMC,oBAAoB,GAAG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IACD;EACvB,MAAMJ,KAAK,GAAGG,IAAI,CAACC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC;EAEjC,OAAOL,OAAO,CAACC,KAAK,EAAER,kBAAkB,CAAC,IAAIO,OAAO,CAACC,KAAK,EAAEV,kBAAkB,CAAC,GAC3EqB,MAAM,CAACP,KAAK,EAAEF,kBAAkB,CAACF,KAAK,CAAC,GAAGF,oBAAoB,CAAC,GAC/DY,SAAS;AACf,CAAC;AAED,SACEhB,eAAe,EACfS,IAAI,EACJD,kBAAkB,EAClBZ,kBAAkB,EAClBC,cAAc,EACdF,gBAAgB,EAChBU,OAAO,EACPiB,4BAA4B,EAC5BF,8BAA8B,EAC9BnB,iBAAiB,EACjBoB,+BAA+B","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ import { bytesToHex } from "../../../utils/bytes-to-hex.js";
4
+ import { sigUuid } from "../../../utils/sig-uuid.js";
5
+ import { RecordCursor } from "../../record-cursor.js";
6
+ import { byte, sequenceNumberFromGlucoseFrame } from "./standard-gatt.glucose-frame.js";
7
+ const GLUCOSE_SERVICE_UUID = sigUuid("1808");
8
+ const GLUCOSE_MEASUREMENT_UUID = sigUuid("2a18");
9
+ const RECORD_ACCESS_CONTROL_POINT_UUID = sigUuid("2a52");
10
+ const RACP_REPORT_STORED_RECORDS = 0x01;
11
+ const RACP_RESPONSE_CODE = 0x06;
12
+ const RACP_OPERATOR_ALL_RECORDS = 0x01;
13
+ const RACP_OPERATOR_GREATER_OR_EQUAL = 0x03;
14
+ const RACP_FILTER_SEQUENCE_NUMBER = 0x01;
15
+ const RESPONSE_OPCODE_INDEX = 0;
16
+ const RESPONSE_REQUEST_INDEX = 2;
17
+ const RESPONSE_RESULT_INDEX = 3;
18
+
19
+ /** Invalid operator, operator not supported, invalid operand and operand not supported. */
20
+ const FILTER_REFUSALS = new Set([0x03, 0x04, 0x05, 0x09]);
21
+ const BYTE_BITS = 8;
22
+ const MAX_SEQUENCE_NUMBER = 0xffff;
23
+ const CURSOR_KEY_PREFIX = "@ovok/native/glucose-sequence";
24
+ const reportAllRecords = () => bytesToHex([RACP_REPORT_STORED_RECORDS, RACP_OPERATOR_ALL_RECORDS]);
25
+ const reportRecordsFrom = sequenceNumber => bytesToHex([RACP_REPORT_STORED_RECORDS, RACP_OPERATOR_GREATER_OR_EQUAL, RACP_FILTER_SEQUENCE_NUMBER, sequenceNumber, sequenceNumber >> BYTE_BITS]);
26
+
27
+ /** The first number worth asking for, or nothing when none is known or the one after it cannot be written. */
28
+ const sequenceToAskFrom = newestStored => newestStored === undefined || newestStored >= MAX_SEQUENCE_NUMBER ? undefined : newestStored + 1;
29
+
30
+ /** Whether the meter answered "report stored records" by refusing the filter it was given. */
31
+ const refusesFilter = frame => {
32
+ const result = byte(frame, RESPONSE_RESULT_INDEX);
33
+ return byte(frame, RESPONSE_OPCODE_INDEX) === RACP_RESPONSE_CODE && byte(frame, RESPONSE_REQUEST_INDEX) === RACP_REPORT_STORED_RECORDS && result !== undefined && FILTER_REFUSALS.has(result);
34
+ };
35
+ const racpCommand = frame => ({
36
+ serviceUuid: GLUCOSE_SERVICE_UUID,
37
+ characteristicUuid: RECORD_ACCESS_CONTROL_POINT_UUID,
38
+ frame
39
+ });
40
+
41
+ /**
42
+ * Asks a glucose meter for the records stored after the newest one already read, and keeps
43
+ * count of the sequence numbers it sends. A meter that refuses the sequence-number filter is
44
+ * asked for every record instead, once.
45
+ *
46
+ * Every Glucose Measurement counts, usable or not: a record the SDK withholds is no reason to
47
+ * download it again.
48
+ */
49
+ class GlucoseRecordSequencer {
50
+ filtered = false;
51
+ constructor(cursor) {
52
+ this.cursor = cursor;
53
+ }
54
+ initialCommands = async () => {
55
+ const from = sequenceToAskFrom(await this.cursor.load());
56
+ this.filtered = from !== undefined;
57
+ return [racpCommand(from === undefined ? reportAllRecords() : reportRecordsFrom(from))];
58
+ };
59
+ nextCommand = (frame, characteristicUuid) => {
60
+ const uuid = characteristicUuid?.toLowerCase();
61
+ if (uuid === GLUCOSE_MEASUREMENT_UUID) {
62
+ this.countRecord(frame);
63
+ return undefined;
64
+ }
65
+ if (uuid === RECORD_ACCESS_CONTROL_POINT_UUID && this.filtered && refusesFilter(frame)) {
66
+ this.filtered = false;
67
+ return [racpCommand(reportAllRecords())];
68
+ }
69
+ return undefined;
70
+ };
71
+ countRecord(frame) {
72
+ const sequenceNumber = sequenceNumberFromGlucoseFrame(frame);
73
+ if (sequenceNumber !== undefined) {
74
+ this.cursor.advance(sequenceNumber);
75
+ }
76
+ }
77
+ }
78
+
79
+ /** Gives each connection to a glucose meter its own sequencer over that meter's stored cursor. */
80
+ const createGlucoseSequencer = ({
81
+ deviceId,
82
+ recordCursorStorage
83
+ }) => new GlucoseRecordSequencer(new RecordCursor(recordCursorStorage, `${CURSOR_KEY_PREFIX}/${deviceId}`));
84
+ export { createGlucoseSequencer, GLUCOSE_MEASUREMENT_UUID, GLUCOSE_SERVICE_UUID, RECORD_ACCESS_CONTROL_POINT_UUID };
85
+ //# sourceMappingURL=standard-gatt.glucose-racp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["bytesToHex","sigUuid","RecordCursor","byte","sequenceNumberFromGlucoseFrame","GLUCOSE_SERVICE_UUID","GLUCOSE_MEASUREMENT_UUID","RECORD_ACCESS_CONTROL_POINT_UUID","RACP_REPORT_STORED_RECORDS","RACP_RESPONSE_CODE","RACP_OPERATOR_ALL_RECORDS","RACP_OPERATOR_GREATER_OR_EQUAL","RACP_FILTER_SEQUENCE_NUMBER","RESPONSE_OPCODE_INDEX","RESPONSE_REQUEST_INDEX","RESPONSE_RESULT_INDEX","FILTER_REFUSALS","Set","BYTE_BITS","MAX_SEQUENCE_NUMBER","CURSOR_KEY_PREFIX","reportAllRecords","reportRecordsFrom","sequenceNumber","sequenceToAskFrom","newestStored","undefined","refusesFilter","frame","result","has","racpCommand","serviceUuid","characteristicUuid","GlucoseRecordSequencer","filtered","constructor","cursor","initialCommands","from","load","nextCommand","uuid","toLowerCase","countRecord","advance","createGlucoseSequencer","deviceId","recordCursorStorage"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.ts"],"mappings":";;AAGA,SAASA,UAAU,QAAQ,gCAA6B;AACxD,SAASC,OAAO,QAAQ,4BAAyB;AACjD,SAASC,YAAY,QAAQ,wBAAqB;AAElD,SAASC,IAAI,EAAEC,8BAA8B,QAAQ,kCAA+B;AAEpF,MAAMC,oBAAoB,GAAGJ,OAAO,CAAC,MAAM,CAAC;AAC5C,MAAMK,wBAAwB,GAAGL,OAAO,CAAC,MAAM,CAAC;AAChD,MAAMM,gCAAgC,GAAGN,OAAO,CAAC,MAAM,CAAC;AAExD,MAAMO,0BAA0B,GAAG,IAAI;AACvC,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,yBAAyB,GAAG,IAAI;AACtC,MAAMC,8BAA8B,GAAG,IAAI;AAC3C,MAAMC,2BAA2B,GAAG,IAAI;AAExC,MAAMC,qBAAqB,GAAG,CAAC;AAC/B,MAAMC,sBAAsB,GAAG,CAAC;AAChC,MAAMC,qBAAqB,GAAG,CAAC;;AAE/B;AACA,MAAMC,eAAoC,GAAG,IAAIC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE9E,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,mBAAmB,GAAG,MAAM;AAClC,MAAMC,iBAAiB,GAAG,+BAA+B;AAEzD,MAAMC,gBAAgB,GAAGA,CAAA,KACvBrB,UAAU,CAAC,CAACQ,0BAA0B,EAAEE,yBAAyB,CAAC,CAAC;AAErE,MAAMY,iBAAiB,GAAIC,cAAsB,IAC/CvB,UAAU,CAAC,CACTQ,0BAA0B,EAC1BG,8BAA8B,EAC9BC,2BAA2B,EAC3BW,cAAc,EACdA,cAAc,IAAIL,SAAS,CAC5B,CAAC;;AAEJ;AACA,MAAMM,iBAAiB,GAAIC,YAAg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