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

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 (597) 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-scanner.js +75 -0
  85. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  86. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +34 -0
  87. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  88. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +67 -0
  89. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  90. package/lib/commonjs/modules/next/bluetooth/connections.js +114 -0
  91. package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -0
  92. package/lib/commonjs/modules/next/bluetooth/daily-total-day.js.map +1 -0
  93. package/lib/commonjs/modules/next/bluetooth/devices.js +41 -0
  94. package/lib/commonjs/modules/next/bluetooth/devices.js.map +1 -0
  95. package/lib/commonjs/modules/next/bluetooth/driver.js +30 -20
  96. package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
  97. package/lib/commonjs/modules/next/bluetooth/errors.js +26 -0
  98. package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -0
  99. package/lib/commonjs/modules/next/bluetooth/index.js +122 -11
  100. package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
  101. package/lib/commonjs/modules/next/bluetooth/link.js +0 -103
  102. package/lib/commonjs/modules/next/bluetooth/link.js.map +1 -1
  103. package/lib/commonjs/modules/next/bluetooth/paired.js +50 -0
  104. package/lib/commonjs/modules/next/bluetooth/paired.js.map +1 -0
  105. package/lib/commonjs/modules/next/bluetooth/permissions.js +2 -0
  106. package/lib/commonjs/modules/next/bluetooth/permissions.js.map +1 -0
  107. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js +44 -0
  108. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  109. package/lib/commonjs/modules/next/bluetooth/react/context.js +54 -0
  110. package/lib/commonjs/modules/next/bluetooth/react/context.js.map +1 -0
  111. package/lib/commonjs/modules/next/bluetooth/react/hooks.js +86 -0
  112. package/lib/commonjs/modules/next/bluetooth/react/hooks.js.map +1 -0
  113. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +28 -0
  114. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  115. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js +32 -0
  116. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  117. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js +43 -0
  118. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  119. package/lib/commonjs/modules/next/bluetooth/readings.js +93 -0
  120. package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -0
  121. package/lib/commonjs/modules/next/bluetooth/result-policy.js +15 -2
  122. package/lib/commonjs/modules/next/bluetooth/result-policy.js.map +1 -1
  123. package/lib/commonjs/modules/next/bluetooth/runtime.js +223 -0
  124. package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -0
  125. package/lib/commonjs/modules/next/bluetooth/scan-loop.js +82 -0
  126. package/lib/commonjs/modules/next/bluetooth/scan-loop.js.map +1 -0
  127. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js +46 -13
  128. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js.map +1 -1
  129. package/lib/commonjs/modules/next/bluetooth/sink.js +6 -0
  130. package/lib/commonjs/modules/next/bluetooth/sink.js.map +1 -0
  131. package/lib/commonjs/modules/next/bluetooth/snapshot.js +6 -0
  132. package/lib/commonjs/modules/next/bluetooth/snapshot.js.map +1 -0
  133. package/lib/commonjs/modules/next/bluetooth/stable-hash.js +42 -0
  134. package/lib/commonjs/modules/next/bluetooth/stable-hash.js.map +1 -0
  135. package/lib/commonjs/modules/next/bluetooth/store.js +61 -0
  136. package/lib/commonjs/modules/next/bluetooth/store.js.map +1 -0
  137. package/lib/commonjs/modules/next/bluetooth/transport.js +6 -0
  138. package/lib/commonjs/modules/next/bluetooth/transport.js.map +1 -0
  139. package/lib/commonjs/modules/next/data-sync/index.js +17 -0
  140. package/lib/commonjs/modules/next/data-sync/index.js.map +1 -0
  141. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
  142. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
  143. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +9 -141
  144. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
  145. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
  146. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  147. package/lib/module/modules/bt-management/components/device-picker-sheet.js +154 -0
  148. package/lib/module/modules/bt-management/components/device-picker-sheet.js.map +1 -0
  149. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
  150. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +4 -3
  151. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
  152. package/lib/module/modules/bt-management/hooks/use-measurements.js +1 -1
  153. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
  154. package/lib/module/modules/bt-management/index.js +1 -0
  155. package/lib/module/modules/bt-management/index.js.map +1 -1
  156. package/lib/module/modules/bt-management/services/bt-manager.js +50 -0
  157. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  158. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +3 -0
  159. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  160. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +4 -2
  161. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  162. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
  163. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  164. package/lib/module/modules/bt-management/services/devices/bt-current-time.js +55 -0
  165. package/lib/module/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
  166. package/lib/module/modules/bt-management/services/devices/bt-device-information.js +18 -37
  167. package/lib/module/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
  168. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +33 -5
  169. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  170. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js +65 -0
  171. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
  172. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js +65 -0
  173. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
  174. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +14 -0
  175. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  176. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +1 -4
  177. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
  178. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +99 -0
  179. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
  180. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
  181. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  182. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +35 -0
  183. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
  184. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +72 -0
  185. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
  186. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +40 -0
  187. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
  188. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +85 -0
  189. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
  190. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +25 -32
  191. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  192. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +18 -20
  193. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  194. package/lib/module/modules/bt-management/services/record-cursor.js +66 -0
  195. package/lib/module/modules/bt-management/services/record-cursor.js.map +1 -0
  196. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +8 -0
  197. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
  198. package/lib/module/modules/bt-management/types/custom-device-definition.js +4 -0
  199. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  200. package/lib/module/modules/bt-management/types/glucose-record-details.js +2 -0
  201. package/lib/module/modules/bt-management/types/glucose-record-details.js.map +1 -0
  202. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js +14 -0
  203. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
  204. package/lib/module/modules/bt-management/utils/device-user.js +17 -0
  205. package/lib/module/modules/bt-management/utils/device-user.js.map +1 -0
  206. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js +6 -0
  207. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
  208. package/lib/module/modules/bt-management/utils/result-identity.js +23 -33
  209. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
  210. package/lib/module/modules/bt-management/utils/rr-interval.js +12 -0
  211. package/lib/module/modules/bt-management/utils/rr-interval.js.map +1 -0
  212. package/lib/module/modules/bt-management/utils/temperature-type.js +11 -0
  213. package/lib/module/modules/bt-management/utils/temperature-type.js.map +1 -0
  214. package/lib/module/modules/bt-management/utils/wait.js +5 -0
  215. package/lib/module/modules/bt-management/utils/wait.js.map +1 -0
  216. package/lib/module/modules/next/background-sync/index.js +12 -0
  217. package/lib/module/modules/next/background-sync/index.js.map +1 -0
  218. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js +55 -0
  219. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  220. package/lib/module/modules/next/bluetooth/auto-connect.js +28 -0
  221. package/lib/module/modules/next/bluetooth/auto-connect.js.map +1 -0
  222. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js +28 -0
  223. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
  224. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js +159 -0
  225. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
  226. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +69 -0
  227. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  228. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +31 -0
  229. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  230. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +63 -0
  231. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  232. package/lib/module/modules/next/bluetooth/connections.js +110 -0
  233. package/lib/module/modules/next/bluetooth/connections.js.map +1 -0
  234. package/lib/module/modules/next/bluetooth/daily-total-day.js.map +1 -0
  235. package/lib/module/modules/next/bluetooth/devices.js +37 -0
  236. package/lib/module/modules/next/bluetooth/devices.js.map +1 -0
  237. package/lib/module/modules/next/bluetooth/driver.js +29 -20
  238. package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
  239. package/lib/module/modules/next/bluetooth/errors.js +21 -0
  240. package/lib/module/modules/next/bluetooth/errors.js.map +1 -0
  241. package/lib/module/modules/next/bluetooth/index.js +22 -4
  242. package/lib/module/modules/next/bluetooth/index.js.map +1 -1
  243. package/lib/module/modules/next/bluetooth/link.js +0 -101
  244. package/lib/module/modules/next/bluetooth/link.js.map +1 -1
  245. package/lib/module/modules/next/bluetooth/paired.js +46 -0
  246. package/lib/module/modules/next/bluetooth/paired.js.map +1 -0
  247. package/lib/module/modules/next/bluetooth/permissions.js +2 -0
  248. package/lib/module/modules/next/bluetooth/permissions.js.map +1 -0
  249. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js +39 -0
  250. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  251. package/lib/module/modules/next/bluetooth/react/context.js +48 -0
  252. package/lib/module/modules/next/bluetooth/react/context.js.map +1 -0
  253. package/lib/module/modules/next/bluetooth/react/hooks.js +76 -0
  254. package/lib/module/modules/next/bluetooth/react/hooks.js.map +1 -0
  255. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +25 -0
  256. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  257. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js +28 -0
  258. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  259. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js +39 -0
  260. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  261. package/lib/module/modules/next/bluetooth/readings.js +89 -0
  262. package/lib/module/modules/next/bluetooth/readings.js.map +1 -0
  263. package/lib/module/modules/next/bluetooth/result-policy.js +14 -2
  264. package/lib/module/modules/next/bluetooth/result-policy.js.map +1 -1
  265. package/lib/module/modules/next/bluetooth/runtime.js +220 -0
  266. package/lib/module/modules/next/bluetooth/runtime.js.map +1 -0
  267. package/lib/module/modules/next/bluetooth/scan-loop.js +78 -0
  268. package/lib/module/modules/next/bluetooth/scan-loop.js.map +1 -0
  269. package/lib/module/modules/next/bluetooth/sig-profiles.js +44 -11
  270. package/lib/module/modules/next/bluetooth/sig-profiles.js.map +1 -1
  271. package/lib/module/modules/next/bluetooth/sink.js +4 -0
  272. package/lib/module/modules/next/bluetooth/sink.js.map +1 -0
  273. package/lib/module/modules/next/bluetooth/snapshot.js +4 -0
  274. package/lib/module/modules/next/bluetooth/snapshot.js.map +1 -0
  275. package/lib/module/modules/next/bluetooth/stable-hash.js +37 -0
  276. package/lib/module/modules/next/bluetooth/stable-hash.js.map +1 -0
  277. package/lib/module/modules/next/bluetooth/store.js +57 -0
  278. package/lib/module/modules/next/bluetooth/store.js.map +1 -0
  279. package/lib/module/modules/next/bluetooth/transport.js +4 -0
  280. package/lib/module/modules/next/bluetooth/transport.js.map +1 -0
  281. package/lib/module/modules/next/data-sync/index.js +11 -0
  282. package/lib/module/modules/next/data-sync/index.js.map +1 -0
  283. package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  284. package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  286. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  291. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
  295. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  309. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  311. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  313. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  315. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  318. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  319. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  320. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  323. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  326. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  328. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  331. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  333. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  336. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  337. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  338. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  340. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  342. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  344. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +6 -0
  346. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  348. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts +6 -0
  350. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  352. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  354. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  356. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  358. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts +3 -0
  360. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  362. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts +10 -0
  363. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  365. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  367. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  369. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  371. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
  373. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  375. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  377. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +25 -0
  379. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts +30 -0
  382. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +27 -20
  384. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +17 -0
  386. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +34 -5
  388. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts +14 -5
  390. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts +18 -0
  392. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts +13 -0
  394. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  396. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts +30 -0
  398. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  400. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  402. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  404. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  405. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  406. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +21 -0
  408. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  409. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  410. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +87 -0
  412. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  414. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts +20 -0
  417. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  419. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  421. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts +16 -0
  423. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts +31 -0
  425. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts +9 -0
  427. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts.map +1 -0
  428. package/lib/typescript/module/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  429. package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  430. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  431. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  432. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  433. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  434. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  435. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  436. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  437. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  438. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  439. package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
  440. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  441. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  442. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  443. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  444. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  445. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  446. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  447. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  448. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  449. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  450. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  451. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  452. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  453. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  454. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  455. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  456. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  457. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  458. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  459. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  460. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  461. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  462. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  463. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  464. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  465. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  466. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  467. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  468. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  469. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  470. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  471. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  472. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  473. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  474. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  475. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  476. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  477. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  478. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  479. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  480. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  481. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  482. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  483. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  484. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  485. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  486. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  487. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  488. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  489. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  490. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +6 -0
  491. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  492. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  493. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  494. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts +6 -0
  495. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  496. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  497. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  498. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  499. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  501. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  502. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  503. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  504. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts +3 -0
  505. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  506. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  507. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts +10 -0
  508. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts.map +1 -0
  509. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  510. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  511. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  512. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  513. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  514. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  515. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  516. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  517. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
  518. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  519. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  520. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  521. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  522. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  523. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +25 -0
  524. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  525. package/lib/typescript/module/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  526. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts +30 -0
  527. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  528. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +27 -20
  529. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  530. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +17 -0
  531. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  532. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +34 -5
  533. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
  534. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts +14 -5
  535. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts.map +1 -1
  536. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts +18 -0
  537. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  538. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts +13 -0
  539. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  540. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  541. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  542. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts +30 -0
  543. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  544. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  545. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  546. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  547. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  548. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  549. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  550. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  551. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  552. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +21 -0
  553. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  554. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  555. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  556. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +87 -0
  557. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  558. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  559. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  560. package/lib/typescript/module/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  561. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts +20 -0
  562. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  563. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  564. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  565. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  566. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  567. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts +16 -0
  568. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts.map +1 -0
  569. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts +31 -0
  570. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  571. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts +9 -0
  572. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts.map +1 -0
  573. package/package.json +12 -2
  574. package/lib/commonjs/modules/bt-management/utils/daily-total-day.js.map +0 -1
  575. package/lib/commonjs/modules/next/bluetooth/drivers.js +0 -20
  576. package/lib/commonjs/modules/next/bluetooth/drivers.js.map +0 -1
  577. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js +0 -55
  578. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js.map +0 -1
  579. package/lib/module/modules/bt-management/utils/daily-total-day.js.map +0 -1
  580. package/lib/module/modules/next/bluetooth/drivers.js +0 -17
  581. package/lib/module/modules/next/bluetooth/drivers.js.map +0 -1
  582. package/lib/module/modules/next/bluetooth/legacy-driver.js +0 -51
  583. package/lib/module/modules/next/bluetooth/legacy-driver.js.map +0 -1
  584. package/lib/typescript/commonjs/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  585. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts +0 -7
  586. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  587. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  588. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  589. package/lib/typescript/module/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  590. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts +0 -7
  591. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  592. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  593. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  594. /package/lib/commonjs/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  595. /package/lib/module/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  596. /package/lib/typescript/commonjs/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
  597. /package/lib/typescript/module/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-connect.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/auto-connect.ts"],"names":[],"mappings":"AAGA,oFAAoF;AACpF,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2D;IAE7E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,OAAO;IAIpD,4EAA4E;IACrE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,MAAM;IAS5C,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAGnC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { BluetoothError } from "../errors";
2
+ /** Classifies a `react-native-ble-plx` or legacy device error as a `BluetoothError`. */
3
+ export declare const fromBleError: (error: unknown) => BluetoothError;
4
+ //# sourceMappingURL=ble-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ble-errors.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAsB,MAAM,WAAW,CAAC;AAiB/D,wFAAwF;AACxF,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,cAQ7C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Device } from "react-native-ble-plx";
2
+ import { Link } from "../link";
3
+ /** Connects (retrying with backoff), discovers services and reads Device Information; aborting `signal` closes the link. */
4
+ declare function openBleLink(device: Device, signal: AbortSignal): Promise<Link>;
5
+ export { openBleLink };
6
+ //# sourceMappingURL=ble-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ble-link.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAOtE,OAAO,EAAqB,IAAI,EAAE,MAAM,SAAS,CAAC;AAyJlD,4HAA4H;AAC5H,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { BleManager, Device } from "react-native-ble-plx";
2
+ import { BluetoothScanner, Peripheral } from "../transport";
3
+ /** The `react-native-ble-plx` device behind a peripheral this adapter reported. */
4
+ declare const bleDeviceOf: (peripheral: Peripheral) => Device;
5
+ /** A `react-native-ble-plx` device as a peripheral. */
6
+ declare const blePeripheral: (device: Device) => Peripheral;
7
+ /** A scanner over a `react-native-ble-plx` `BleManager`. */
8
+ declare const bleManagerScanner: (bleManager: BleManager) => BluetoothScanner;
9
+ export { bleDeviceOf, bleManagerScanner, blePeripheral };
10
+ //# sourceMappingURL=ble-scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ble-scanner.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAgB,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1E,mFAAmF;AACnF,QAAA,MAAM,WAAW,GAAI,YAAY,UAAU,KAAG,MAQ7C,CAAC;AAEF,uDAAuD;AACvD,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,UAcvC,CAAC;AAEF,4DAA4D;AAC5D,QAAA,MAAM,iBAAiB,GAAI,YAAY,UAAU,KAAG,gBA6BlD,CAAC;AAEH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { AcceptedDevice } from "../../../bt-management/types/accepted-device";
2
+ import { DeviceSupport } from "../devices";
3
+ /** Support for the SDK's integrated devices and `defineCustomDevice` declarations, over `react-native-ble-plx`. */
4
+ declare const builtInDevices: (accepted: readonly AcceptedDevice[]) => DeviceSupport;
5
+ export { builtInDevices };
6
+ //# sourceMappingURL=built-in-devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"built-in-devices.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/built-in-devices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,mHAAmH;AACnH,QAAA,MAAM,cAAc,GAAI,UAAU,SAAS,cAAc,EAAE,KAAG,aAgB7D,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DeviceCreator } from "../../../bt-management/services/device-creator";
2
+ import { AcceptedDevice } from "../../../bt-management/types/accepted-device";
3
+ import { DeviceKey } from "../../../bt-management/types/device-key";
4
+ import { Driver } from "../driver";
5
+ /** Runs a device class from `@ovok/native/bt-management` until its protocol moves to a `DeviceProtocol`. */
6
+ declare const legacyDriver: (creator: DeviceCreator<readonly AcceptedDevice[]>, deviceName: DeviceKey) => Driver;
7
+ export { legacyDriver };
8
+ //# sourceMappingURL=legacy-driver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-driver.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/legacy-driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAe,MAAM,EAAiB,MAAM,WAAW,CAAC;AAW/D,4GAA4G;AAC5G,QAAA,MAAM,YAAY,GAAI,SAAS,aAAa,CAAC,SAAS,cAAc,EAAE,CAAC,EAAE,YAAY,SAAS,KAAG,MAkC9F,CAAC;AAEJ,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Driver } from "./driver";
2
+ import { ReadingLog } from "./readings";
3
+ import { ResultPolicy } from "./result-policy";
4
+ import { SnapshotStore } from "./store";
5
+ import { Peripheral } from "./transport";
6
+ /** One driver run per connected device, its events folded into the snapshot. */
7
+ declare class Connections {
8
+ private readonly store;
9
+ private readonly readings;
10
+ private readonly policy;
11
+ private readonly onEnded;
12
+ private readonly sessions;
13
+ constructor(store: SnapshotStore, readings: ReadingLog, policy: ResultPolicy, onEnded: (id: string) => void);
14
+ isActive(id: string): boolean;
15
+ /** Resolves once connected; joins a connection still opening or open, and waits out one being closed. */
16
+ connect(peripheral: Peripheral, driver: Driver): Promise<void>;
17
+ disconnect(id: string): Promise<void>;
18
+ /** Disconnects every device; resolves once every connection has ended. */
19
+ disconnectAll(): Promise<void>;
20
+ private start;
21
+ private run;
22
+ private apply;
23
+ }
24
+ export { Connections };
25
+ //# sourceMappingURL=connections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAgB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOzC,gFAAgF;AAChF,cAAM,WAAW;IAIb,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;gBAGpC,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;IAGzC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIpC,yGAAyG;IAC5F,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlD,0EAA0E;IAC7D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,KAAK;YAsCC,GAAG;IAMjB,OAAO,CAAC,KAAK;CAkBd;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-total-day.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/daily-total-day.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,KAAK,MAAM,KACV,MAAM,GAAG,SAUX,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { DeviceProtocol, Driver } from "./driver";
2
+ import { Advertisement } from "./transport";
3
+ /** A peripheral a support recognised: the device key its readings carry and the driver that runs it. */
4
+ type DeviceMatch = {
5
+ /** Device key reported on its readings. */
6
+ key: string;
7
+ /** The driver that talks to it. */
8
+ driver: Driver;
9
+ };
10
+ /** Recognises peripherals by their advertisement. */
11
+ interface DeviceSupport {
12
+ /** The match for a peripheral this support handles, or `undefined`. */
13
+ match(advertisement: Advertisement): DeviceMatch | undefined;
14
+ }
15
+ /** A device a third party adds: how to recognise it and the protocol that reads it. */
16
+ type DeviceDefinition = {
17
+ /** Device key reported on its readings; unique among the devices a runtime supports. */
18
+ key: string;
19
+ /** Whether an advertisement is this device. */
20
+ matches: (advertisement: Advertisement) => boolean;
21
+ /** The conversation that turns the device's bytes into readings; give each stored reading its `recordedAt`. */
22
+ protocol: DeviceProtocol;
23
+ };
24
+ /** Support for one device a third party defines with its own protocol. */
25
+ declare const defineDevice: ({ key, matches, protocol }: DeviceDefinition) => DeviceSupport;
26
+ /** The first support's match for an advertisement. */
27
+ declare const matchDevice: (devices: readonly DeviceSupport[], advertisement: Advertisement) => DeviceMatch | undefined;
28
+ export { defineDevice, matchDevice };
29
+ export type { DeviceDefinition, DeviceMatch, DeviceSupport };
30
+ //# sourceMappingURL=devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAc,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,wGAAwG;AACxG,KAAK,WAAW,GAAG;IAEjB,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IAEZ,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,qDAAqD;AACrD,UAAU,aAAa;IAErB,uEAAuE;IACvE,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;CAC9D;AAED,uFAAuF;AACvF,KAAK,gBAAgB,GAAG;IAEtB,wFAAwF;IACxF,GAAG,EAAE,MAAM,CAAC;IAEZ,+CAA+C;IAC/C,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,OAAO,CAAC;IAEnD,+GAA+G;IAC/G,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,0EAA0E;AAC1E,QAAA,MAAM,YAAY,GAAI,4BAA4B,gBAAgB,KAAG,aAIpE,CAAC;AAEF,sDAAsD;AACtD,QAAA,MAAM,WAAW,GAAI,SAAS,SAAS,aAAa,EAAE,EAAE,eAAe,aAAa,KAAG,WAAW,GAAG,SAUpG,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACrC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"}
@@ -1,32 +1,39 @@
1
1
  import { Measurement } from "@ovok/core/next";
2
- import { Device } from "react-native-ble-plx";
3
- import { BluetoothError } from "../../bt-management/types/bluetooth-error";
4
- import { DeviceConnectionEvent } from "../../bt-management/types/device-connection-event";
5
- import { DeviceKey } from "../../bt-management/types/device-key";
6
- import { DeviceStatus } from "../../bt-management/types/device-status";
7
- import { Link } from "./link";
2
+ import { BluetoothError } from "./errors";
3
+ import { DeviceInformation, Link } from "./link";
4
+ import { Peripheral } from "./transport";
5
+ /** What a driver reports while it runs. */
8
6
  type DeviceEvent = {
7
+ /** The connection moved on. */
9
8
  kind: "status";
10
- status: DeviceStatus;
11
- }
12
- /** `id` stays the same when a device sends the same stored reading again. */
13
- | {
9
+ /** Where it stands now. */
10
+ status: "connected" | "measuring" | "disconnected";
11
+ } | {
12
+ /** The device reported who made it, which model it is and its serial number. */
13
+ kind: "information";
14
+ /** What it reported. */
15
+ information: DeviceInformation;
16
+ } | {
17
+ /** The device sent a reading. */
14
18
  kind: "reading";
15
- id: string;
19
+ /** Names the reading so a resend is recognised; `null` when it has none, and then it is never deduplicated. */
20
+ id: string | null;
21
+ /** The decoded reading. */
16
22
  reading: Measurement;
17
23
  } | {
18
- kind: "connection";
19
- event: Omit<DeviceConnectionEvent, "deviceData">;
20
- } | {
24
+ /** The device or its protocol reported an error; the connection may continue. */
21
25
  kind: "error";
22
- error: BluetoothError | Error | string;
26
+ /** The error. */
27
+ error: BluetoothError;
23
28
  };
24
- /** Connects to a scanned device and reports what happens until it disconnects or `signal` aborts. */
25
- type Driver = (device: Device, signal: AbortSignal) => AsyncIterable<DeviceEvent>;
29
+ /** Connects to a peripheral and reports what happens until it disconnects or `signal` aborts. */
30
+ type Driver = (peripheral: Peripheral, signal: AbortSignal) => AsyncIterable<DeviceEvent>;
26
31
  /** One device's conversation over a link, as the readings it produces. */
27
32
  type DeviceProtocol = (link: Link) => AsyncIterable<Measurement>;
28
- /** Runs a protocol over a fresh BLE link. */
29
- declare const gattDriver: (deviceName: DeviceKey, protocol: DeviceProtocol) => Driver;
30
- export { gattDriver };
33
+ /** Whether a reading carries the time it was taken, which makes a stored reading recognisable when resent. */
34
+ declare const isTimestamped: (reading: Measurement) => boolean;
35
+ /** Runs a protocol over a fresh link. */
36
+ declare const gattDriver: (key: string, protocol: DeviceProtocol) => Driver;
37
+ export { gattDriver, isTimestamped };
31
38
  export type { DeviceEvent, DeviceProtocol, Driver };
32
39
  //# sourceMappingURL=driver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAGvE,OAAO,EAAE,IAAI,EAAe,MAAM,QAAQ,CAAC;AAE3C,KAAK,WAAW,GACZ;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE;AAE1C,6EAA6E;GAC3E;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAA;CAAE,GACxE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,cAAc,GAAG,KAAK,GAAG,MAAM,CAAA;CAAE,CAAC;AAE9D,qGAAqG;AACrG,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,aAAa,CAAC,WAAW,CAAC,CAAC;AAElF,0EAA0E;AAC1E,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,CAAC,WAAW,CAAC,CAAC;AAWjE,6CAA6C;AAC7C,QAAA,MAAM,UAAU,GAAI,YAAY,SAAS,EAAE,UAAU,cAAc,KAAG,MAcnE,CAAC;AAEJ,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,2CAA2C;AAC3C,KAAK,WAAW,GACZ;IAEA,+BAA+B;IAC/B,IAAI,EAAE,QAAQ,CAAC;IAEf,2BAA2B;IAC3B,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;CACpD,GACC;IAEA,gFAAgF;IAChF,IAAI,EAAE,aAAa,CAAC;IAEpB,wBAAwB;IACxB,WAAW,EAAE,iBAAiB,CAAC;CAChC,GACC;IAEA,iCAAiC;IACjC,IAAI,EAAE,SAAS,CAAC;IAEhB,+GAA+G;IAC/G,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAElB,2BAA2B;IAC3B,OAAO,EAAE,WAAW,CAAC;CACtB,GACC;IAEA,iFAAiF;IACjF,IAAI,EAAE,OAAO,CAAC;IAEd,iBAAiB;IACjB,KAAK,EAAE,cAAc,CAAC;CACvB,CAAC;AAEJ,iGAAiG;AACjG,KAAK,MAAM,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,KAAK,aAAa,CAAC,WAAW,CAAC,CAAC;AAE1F,0EAA0E;AAC1E,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,CAAC,WAAW,CAAC,CAAC;AAEjE,8GAA8G;AAC9G,QAAA,MAAM,aAAa,GAAI,SAAS,WAAW,KAAG,OAI7C,CAAC;AAMF,yCAAyC;AACzC,QAAA,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,UAAU,cAAc,KAAG,MAgBzD,CAAC;AAEJ,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;AACrC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ /** Why a Bluetooth operation failed. */
2
+ type BluetoothErrorCode = "permission-denied" | "powered-off" | "unsupported" | "scan-failed" | "connection-failed" | "pairing-required" | "discovery-failed" | "device-error" | "frame-invalid" | "measurement-failed" | "device-not-found" | "runtime-disposed" | "save-failed" | "unknown";
3
+ /** Every failure the Bluetooth runtime reports; `cause` holds the underlying error, when any. */
4
+ declare class BluetoothError extends Error {
5
+ /** Why it failed. */
6
+ readonly code: BluetoothErrorCode;
7
+ /** Always `"BluetoothError"`. */
8
+ readonly name = "BluetoothError";
9
+ constructor(
10
+ /** Why it failed. */
11
+ code: BluetoothErrorCode, message: string, cause?: unknown);
12
+ }
13
+ /** `error` as a `BluetoothError`, classified as `code` unless it already is one. */
14
+ declare const asBluetoothError: (error: unknown, code: BluetoothErrorCode) => BluetoothError;
15
+ export { asBluetoothError, BluetoothError };
16
+ export type { BluetoothErrorCode };
17
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/errors.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,KAAK,kBAAkB,GACnB,mBAAmB,GACnB,aAAa,GACb,aAAa,GACb,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,SAAS,CAAC;AAEd,iGAAiG;AACjG,cAAM,cAAe,SAAQ,KAAK;IAM9B,qBAAqB;aACL,IAAI,EAAE,kBAAkB;IAN1C,iCAAiC;IACjC,SAAgB,IAAI,oBAAoB;;IAItC,qBAAqB;IACL,IAAI,EAAE,kBAAkB,EACxC,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,OAAO;CAIlB;AAED,oFAAoF;AACpF,QAAA,MAAM,gBAAgB,GAAI,OAAO,OAAO,EAAE,MAAM,kBAAkB,KAAG,cAGwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAC5C,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,9 +1,38 @@
1
- export { gattDriver } from "./driver";
1
+ /**
2
+ * Bluetooth for `@ovok/native/next`, in layers: the framework-free `BluetoothRuntime` and its ports, device drivers,
3
+ * the `react-native-ble-plx` and React Native adapters, React hooks over the runtime, and optional UI built only from
4
+ * those hooks.
5
+ *
6
+ * Import from `@ovok/native/next/bluetooth`.
7
+ *
8
+ * @module next/bluetooth
9
+ */
10
+ export { BluetoothRuntime } from "./runtime";
11
+ export type { BluetoothRuntimeOptions } from "./runtime";
12
+ export { BluetoothError } from "./errors";
13
+ export type { BluetoothErrorCode } from "./errors";
14
+ export type { BluetoothSnapshot, ConnectionState, DeviceReading, NearbyDevice, SaveState } from "./snapshot";
15
+ export type { AdapterState, Advertisement, BluetoothScanner, Peripheral } from "./transport";
16
+ export type { BluetoothPermission, BluetoothPermissions } from "./permissions";
17
+ export type { ReadingSink, SaveResult } from "./sink";
18
+ export { defineDevice } from "./devices";
19
+ export type { DeviceDefinition, DeviceMatch, DeviceSupport } from "./devices";
2
20
  export type { DeviceEvent, DeviceProtocol, Driver } from "./driver";
3
- export { createDrivers } from "./drivers";
4
- export { openBleLink } from "./link";
5
- export type { Link } from "./link";
6
- export { dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind } from "./result-policy";
21
+ export type { DeviceInformation, Link } from "./link";
22
+ export { acceptedMemorySlots, dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind, } from "./result-policy";
7
23
  export type { ResultPolicy } from "./result-policy";
8
24
  export { SIG_PROTOCOLS } from "./sig-profiles";
25
+ export { bleManagerScanner } from "./ble-plx/ble-scanner";
26
+ export { builtInDevices } from "./ble-plx/built-in-devices";
27
+ export { IntegratedDevices } from "../../bt-management/types/integrated-devices";
28
+ export type { AcceptedDevice } from "../../bt-management/types/accepted-device";
29
+ export { osBluetoothPermissions } from "./react-native/os-permissions";
30
+ export { ovokReadingSink } from "./react-native/ovok-sink";
31
+ export { createBluetoothRuntime } from "./react-native/create-bluetooth-runtime";
32
+ export type { CreateBluetoothRuntimeOptions } from "./react-native/create-bluetooth-runtime";
33
+ export { BluetoothProvider, useBluetooth } from "./react/context";
34
+ export type { BluetoothProviderProps } from "./react/context";
35
+ export { useBluetoothPermission, useBluetoothState, useMeasurements, useNearbyDevice, useNearbyDevices, usePairedDevices, useScanning, } from "./react/hooks";
36
+ export { BluetoothDevicePicker } from "./react/bluetooth-device-picker";
37
+ export type { BluetoothDevicePickerProps } from "./react/bluetooth-device-picker";
9
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACjH,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7G,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC7F,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC9E,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,YAAY,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,YAAY,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAClE,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,13 +1,22 @@
1
- import { Device } from "react-native-ble-plx";
1
+ /** What a device's Device Information service reports about it; a field is absent when the device leaves it out. */
2
+ type DeviceInformation = {
3
+ /** Manufacturer Name String. */
4
+ manufacturerName?: string;
5
+ /** Model Number String. */
6
+ model?: string;
7
+ /** Serial Number String. */
8
+ serialNumber?: string;
9
+ };
2
10
  /** An open GATT connection: bytes in, bytes out, no knowledge of any device. */
3
11
  type Link = {
12
+ /** What the device reported about itself when the link opened; absent when the link did not read it. */
13
+ readonly deviceInformation?: DeviceInformation;
4
14
  /** Notified or indicated values until the connection drops. */
5
15
  subscribe(service: string, characteristic: string): AsyncIterable<Uint8Array>;
16
+ /** Writes bytes to a characteristic, with response. */
6
17
  write(service: string, characteristic: string, bytes: Uint8Array): Promise<void>;
18
+ /** Ends every subscription and disconnects. */
7
19
  close(): Promise<void>;
8
20
  };
9
- /** Connects (retrying with backoff) and discovers services; aborting `signal` closes the link. */
10
- declare function openBleLink(device: Device, signal: AbortSignal): Promise<Link>;
11
- export { openBleLink };
12
- export type { Link };
21
+ export type { DeviceInformation, Link };
13
22
  //# sourceMappingURL=link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAOtE,gFAAgF;AAChF,KAAK,IAAI,GAAG;IAEV,+DAA+D;IAC/D,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IAC9E,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAsGF,kGAAkG;AAClG,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAc7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/link.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,KAAK,iBAAiB,GAAG;IAEvB,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,4BAA4B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,gFAAgF;AAChF,KAAK,IAAI,GAAG;IAEV,wGAAwG;IACxG,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAE/C,+DAA+D;IAC/D,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IAE9E,uDAAuD;IACvD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjF,+CAA+C;IAC/C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { OvokStorage } from "@ovok/core/next";
2
+ /** The paired device IDs, persisted when storage is given. */
3
+ declare class PairedDevices {
4
+ private readonly onChange;
5
+ private readonly storage?;
6
+ private readonly key;
7
+ private ids;
8
+ private readonly loaded;
9
+ constructor(onChange: (ids: readonly string[]) => void, storage?: OvokStorage | undefined, key?: string);
10
+ has(id: string): boolean;
11
+ add(id: string): Promise<void>;
12
+ remove(id: string): Promise<void>;
13
+ /** Waits for the stored list, so a change never overwrites IDs not read yet. */
14
+ private change;
15
+ private load;
16
+ }
17
+ export { PairedDevices };
18
+ //# sourceMappingURL=paired.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paired.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/paired.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAc9C,8DAA8D;AAC9D,cAAM,aAAa;IAKf,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IANtB,OAAO,CAAC,GAAG,CAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAGpB,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE,WAAW,YAAA,EACrB,GAAG,SAAqB;IAKpC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIlB,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,gFAAgF;YAClE,MAAM;YAON,IAAI;CAMnB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ /** Whether the app may use Bluetooth; `blocked` means only the system settings can grant it. */
2
+ type BluetoothPermission = "granted" | "denied" | "blocked";
3
+ /** The OS permission prompts Bluetooth needs. */
4
+ interface BluetoothPermissions {
5
+ /** The current permission, without prompting. */
6
+ check(): Promise<BluetoothPermission>;
7
+ /** Prompts for the permission when the OS still can, and resolves to the outcome. */
8
+ request(): Promise<BluetoothPermission>;
9
+ /** Opens the app's system settings, where a blocked permission can be granted. */
10
+ openSettings(): Promise<void>;
11
+ }
12
+ export type { BluetoothPermission, BluetoothPermissions };
13
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/permissions.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,KAAK,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5D,iDAAiD;AACjD,UAAU,oBAAoB;IAE5B,iDAAiD;IACjD,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEtC,qFAAqF;IACrF,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAExC,kFAAkF;IAClF,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,35 @@
1
+ import * as React from "react";
2
+ import type { OvokUiProps } from "../../../ui/types";
3
+ import { NearbyDevice } from "../snapshot";
4
+ /** Props of {@link BluetoothDevicePicker}. */
5
+ interface BluetoothDevicePickerProps extends OvokUiProps {
6
+ /** Whether the picker is shown. */
7
+ visible: boolean;
8
+ /** Called with the picked device once the connection starts; its outcome shows on `device.connection`. */
9
+ onSelect?: (device: NearbyDevice) => void;
10
+ /** Called when the user dismisses the picker; the dismiss button only renders when provided. */
11
+ onDismiss?: () => void;
12
+ /** Heading text; defaults to "Choose a device". */
13
+ title?: string;
14
+ /** Dismiss button label; defaults to "Not now". */
15
+ dismissLabel?: string;
16
+ /** Returns an image URI for a device, shown in its default row. */
17
+ getDeviceImage?: (device: NearbyDevice) => string | undefined;
18
+ /** Returns the display name of a device; defaults to its advertised name. */
19
+ labelForDevice?: (device: NearbyDevice) => string;
20
+ /** Renders a custom row; return `undefined` to fall back to the default row. */
21
+ renderRow?: (device: NearbyDevice, actions: {
22
+ select: () => void;
23
+ }) => React.ReactNode;
24
+ /** Test identifier of the modal; the backdrop gets the `-backdrop` suffix. */
25
+ testID?: string;
26
+ }
27
+ /**
28
+ * A bottom sheet listing the found devices; picking one connects to it. Built only from public hooks.
29
+ *
30
+ * @group Components
31
+ */
32
+ declare const BluetoothDevicePicker: ({ onSelect, title, dismissLabel, labelForDevice, ...props }: BluetoothDevicePickerProps) => React.JSX.Element;
33
+ export { BluetoothDevicePicker };
34
+ export type { BluetoothDevicePickerProps };
35
+ //# sourceMappingURL=bluetooth-device-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bluetooth-device-picker.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react/bluetooth-device-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,8CAA8C;AAC9C,UAAU,0BAA2B,SAAQ,WAAW;IAEtD,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IAEjB,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAE1C,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,mEAAmE;IACnE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,CAAC;IAE9D,6EAA6E;IAC7E,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,MAAM,CAAC;IAElD,gFAAgF;IAChF,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAEvF,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,GAAI,6DAM5B,0BAA0B,sBAoB5B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,0BAA0B,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ import type { AndroidBluetoothForegroundServiceOptions } from "../../../background-sync/android-background-sync";
3
+ import { BluetoothError } from "../errors";
4
+ import { BluetoothRuntime } from "../runtime";
5
+ /** Props of {@link BluetoothProvider}. */
6
+ type BluetoothProviderProps = React.PropsWithChildren<{
7
+ /** The runtime the hooks below read and control; the app owns it and disposes it. */
8
+ runtime: BluetoothRuntime;
9
+ /** Keeps an Android foreground service running while mounted, so connections survive the app going to background. */
10
+ androidForegroundService?: AndroidBluetoothForegroundServiceOptions;
11
+ /** Called when the foreground service cannot start or stop. */
12
+ onForegroundServiceError?: (error: BluetoothError) => void;
13
+ }>;
14
+ /**
15
+ * Gives the Bluetooth hooks below it a runtime.
16
+ *
17
+ * @group Components
18
+ */
19
+ declare const BluetoothProvider: ({ runtime, androidForegroundService, onForegroundServiceError, children, }: BluetoothProviderProps) => React.JSX.Element;
20
+ /**
21
+ * The runtime of the enclosing `BluetoothProvider`: every Bluetooth action is a call on it.
22
+ *
23
+ * @throws When rendered outside `BluetoothProvider`.
24
+ *
25
+ * @group Hooks
26
+ */
27
+ declare const useBluetooth: () => BluetoothRuntime;
28
+ export { BluetoothProvider, useBluetooth };
29
+ export type { BluetoothProviderProps };
30
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,kDAAkD,CAAC;AAIjH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,0CAA0C;AAC1C,KAAK,sBAAsB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAEpD,qFAAqF;IACrF,OAAO,EAAE,gBAAgB,CAAC;IAE1B,qHAAqH;IACrH,wBAAwB,CAAC,EAAE,wCAAwC,CAAC;IAEpE,+DAA+D;IAC/D,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5D,CAAC,CAAC;AAIH;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,GAAI,4EAKxB,sBAAsB,sBAUxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,YAAY,QAAO,gBAQxB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAC3C,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { BluetoothPermission } from "../permissions";
2
+ import { DeviceReading, NearbyDevice } from "../snapshot";
3
+ import { AdapterState } from "../transport";
4
+ /**
5
+ * The Bluetooth adapter state.
6
+ *
7
+ * @group Hooks
8
+ */
9
+ declare const useBluetoothState: () => AdapterState;
10
+ /**
11
+ * The Bluetooth permission, re-checked whenever the app returns to the foreground; `unknown` until first checked.
12
+ *
13
+ * @group Hooks
14
+ */
15
+ declare const useBluetoothPermission: () => BluetoothPermission | "unknown";
16
+ /**
17
+ * Whether a scan is requested.
18
+ *
19
+ * @group Hooks
20
+ */
21
+ declare const useScanning: () => boolean;
22
+ /**
23
+ * The supported devices the scan found, each with its connection state.
24
+ *
25
+ * @group Hooks
26
+ */
27
+ declare const useNearbyDevices: () => readonly NearbyDevice[];
28
+ /**
29
+ * One found device, or `null` until the scan finds it.
30
+ *
31
+ * @group Hooks
32
+ */
33
+ declare const useNearbyDevice: (deviceId: string) => NearbyDevice | null;
34
+ /**
35
+ * IDs of the paired devices.
36
+ *
37
+ * @group Hooks
38
+ */
39
+ declare const usePairedDevices: () => readonly string[];
40
+ /**
41
+ * The recent readings, oldest first, each with its save state.
42
+ *
43
+ * @group Hooks
44
+ */
45
+ declare const useMeasurements: () => readonly DeviceReading[];
46
+ export { useBluetoothPermission, useBluetoothState, useMeasurements, useNearbyDevice, useNearbyDevices, usePairedDevices, useScanning, };
47
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAY5C;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,QAAO,YAA2D,CAAC;AAE1F;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,QAAO,mBAAmB,GAAG,SAcxD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,WAAW,QAAO,OAAuD,CAAC;AAEhF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,QAAO,SAAS,YAAY,EAAiD,CAAC;AAEpG;;;;GAIG;AACH,QAAA,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,YAAY,GAAG,IAC4B,CAAC;AAExF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,QAAO,SAAS,MAAM,EAAgD,CAAC;AAE7F;;;;GAIG;AACH,QAAA,MAAM,eAAe,QAAO,SAAS,aAAa,EAAkD,CAAC;AAErG,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GACZ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { BleManager } from "react-native-ble-plx";
2
+ import type { Ovok } from "../../ovok";
3
+ import { DeviceSupport } from "../devices";
4
+ import { ResultPolicy } from "../result-policy";
5
+ import { BluetoothRuntime } from "../runtime";
6
+ /** What `createBluetoothRuntime` needs. */
7
+ type CreateBluetoothRuntimeOptions = {
8
+ /** Saves the readings and keeps the paired devices in its secure storage. */
9
+ client: Ovok;
10
+ /** The app's `react-native-ble-plx` manager. */
11
+ bleManager: BleManager;
12
+ /** The devices to look for. */
13
+ devices: readonly DeviceSupport[];
14
+ /** Which readings of a connection to keep; defaults to every reading. */
15
+ resultPolicy?: ResultPolicy;
16
+ };
17
+ /** A `BluetoothRuntime` wired for React Native: BLE through `bleManager`, OS permissions, saving through `client`. */
18
+ declare const createBluetoothRuntime: ({ client, bleManager, devices, resultPolicy, }: CreateBluetoothRuntimeOptions) => BluetoothRuntime;
19
+ export { createBluetoothRuntime };
20
+ export type { CreateBluetoothRuntimeOptions };
21
+ //# sourceMappingURL=create-bluetooth-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-bluetooth-runtime.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/create-bluetooth-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9C,2CAA2C;AAC3C,KAAK,6BAA6B,GAAG;IAEnC,6EAA6E;IAC7E,MAAM,EAAE,IAAI,CAAC;IAEb,gDAAgD;IAChD,UAAU,EAAE,UAAU,CAAC;IAEvB,+BAA+B;IAC/B,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAElC,yEAAyE;IACzE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,sHAAsH;AACtH,QAAA,MAAM,sBAAsB,GAAI,gDAK7B,6BAA6B,KAAG,gBAQ/B,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,YAAY,EAAE,6BAA6B,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BluetoothPermissions } from "../permissions";
2
+ /** The platform's Bluetooth permissions through `react-native-permissions`. */
3
+ declare const osBluetoothPermissions: () => BluetoothPermissions;
4
+ export { osBluetoothPermissions };
5
+ //# sourceMappingURL=os-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"os-permissions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/os-permissions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAiB3E,+EAA+E;AAC/E,QAAA,MAAM,sBAAsB,QAAO,oBAYjC,CAAC;AAEH,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Ovok } from "../../ovok";
2
+ import { ReadingSink } from "../sink";
3
+ /** Saves readings for the signed-in account through the `Ovok` measurements API. */
4
+ declare const ovokReadingSink: (client: Ovok) => ReadingSink;
5
+ export { ovokReadingSink };
6
+ //# sourceMappingURL=ovok-sink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ovok-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/ovok-sink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,oFAAoF;AACpF,QAAA,MAAM,eAAe,GAAI,QAAQ,IAAI,KAAG,WAoBtC,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { Measurement } from "@ovok/core/next";
2
+ import { ReadingSink } from "./sink";
3
+ import { NearbyDevice } from "./snapshot";
4
+ import { SnapshotStore } from "./store";
5
+ /** Keeps the recent readings, each resend once, and saves every new one through the sink. */
6
+ declare class ReadingLog {
7
+ private readonly store;
8
+ private readonly sink;
9
+ private readonly recent;
10
+ private sequence;
11
+ constructor(store: SnapshotStore, sink: ReadingSink);
12
+ /** `id` is `null` for a reading that cannot be recognised when resent. */
13
+ receive(device: NearbyDevice, id: string | null, measurement: Measurement): void;
14
+ /** Saves the readings whose save failed again and flushes the sink's offline queue. */
15
+ retrySaves(): Promise<void>;
16
+ /** Records `id`; false when it is a resend of a recent reading. */
17
+ private remember;
18
+ private save;
19
+ }
20
+ export { ReadingLog };
21
+ //# sourceMappingURL=readings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readings.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/readings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAc,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAiB,YAAY,EAAa,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAUxC,6FAA6F;AAC7F,cAAM,UAAU;IAIK,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAiB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAH/E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAK;gBAEe,KAAK,EAAE,aAAa,EAAmB,IAAI,EAAE,WAAW;IAE5F,0EAA0E;IACnE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IAmBvF,uFAAuF;IAC1E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAcxC,mEAAmE;IACnE,OAAO,CAAC,QAAQ;YAaF,IAAI;CAQnB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -2,13 +2,21 @@ import { Measurement, MeasurementTypeKey } from "@ovok/core/next";
2
2
  import { DeviceEvent } from "./driver";
3
3
  /** Makes, for each connection, the test of which readings to keep. */
4
4
  type ResultPolicy = () => (reading: Measurement) => boolean;
5
+ /** Keeps every reading. */
5
6
  declare const everyReading: ResultPolicy;
7
+ /** Keeps the first reading of each measurement type per connection. */
6
8
  declare const firstReadingPerKind: ResultPolicy;
7
9
  /** Activity totals count only once their day has closed, and each day only once. */
8
10
  declare const dailyTotalsOnly: ResultPolicy;
11
+ /**
12
+ * Keeps the readings of the device users in `slots` (a multi-user device reports its user as `memorySlot`, starting at
13
+ * 1), and drops the others. A reading that names no device user is kept.
14
+ */
15
+ declare const acceptedMemorySlots: (slots: readonly number[]) => ResultPolicy;
16
+ /** Applies a policy per measurement type, and `fallback` to the other types. */
9
17
  declare const policyByKind: (policies: Partial<Record<MeasurementTypeKey, ResultPolicy>>, fallback?: ResultPolicy) => ResultPolicy;
10
18
  /** A driver's events minus the readings `policy` drops. */
11
19
  declare function keepReadings(events: AsyncIterable<DeviceEvent>, policy: ResultPolicy): AsyncIterable<DeviceEvent>;
12
- export { dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind };
20
+ export { acceptedMemorySlots, dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind };
13
21
  export type { ResultPolicy };
14
22
  //# sourceMappingURL=result-policy.d.ts.map