@ovok/native 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (349) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-model.js +82 -0
  2. package/lib/commonjs/modules/bt-device/constants/device-model.js.map +1 -0
  3. package/lib/commonjs/modules/bt-device/constants/supported-devices.js +21 -1
  4. package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
  5. package/lib/commonjs/modules/bt-device/hooks/use-supported-devices.js +16 -0
  6. package/lib/commonjs/modules/bt-device/hooks/use-supported-devices.js.map +1 -0
  7. package/lib/commonjs/modules/bt-device/index.js +117 -0
  8. package/lib/commonjs/modules/bt-device/index.js.map +1 -1
  9. package/lib/commonjs/modules/bt-device/types/device-kind.js +2 -0
  10. package/lib/commonjs/modules/bt-device/types/device-kind.js.map +1 -0
  11. package/lib/commonjs/modules/bt-device/utils/device-query.js +57 -0
  12. package/lib/commonjs/modules/bt-device/utils/device-query.js.map +1 -0
  13. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +3 -1
  14. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  15. package/lib/commonjs/modules/bt-management/constants/blood-pressure-translated-exception-map.js +2 -1
  16. package/lib/commonjs/modules/bt-management/constants/blood-pressure-translated-exception-map.js.map +1 -1
  17. package/lib/commonjs/modules/bt-management/constants/measurement-feedback.js +25 -0
  18. package/lib/commonjs/modules/bt-management/constants/measurement-feedback.js.map +1 -0
  19. package/lib/commonjs/modules/bt-management/hooks/use-bt-device.js +8 -7
  20. package/lib/commonjs/modules/bt-management/hooks/use-bt-device.js.map +1 -1
  21. package/lib/commonjs/modules/bt-management/hooks/use-bt-devices.js +41 -0
  22. package/lib/commonjs/modules/bt-management/hooks/use-bt-devices.js.map +1 -0
  23. package/lib/commonjs/modules/bt-management/hooks/use-open-series.js +18 -0
  24. package/lib/commonjs/modules/bt-management/hooks/use-open-series.js.map +1 -0
  25. package/lib/commonjs/modules/bt-management/hooks/use-queued-results.js +15 -0
  26. package/lib/commonjs/modules/bt-management/hooks/use-queued-results.js.map +1 -0
  27. package/lib/commonjs/modules/bt-management/index.js +60 -0
  28. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +9 -7
  30. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +45 -3
  32. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/bt-manager.js +30 -3
  34. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +2 -1
  36. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  37. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +13 -12
  38. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  39. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +3 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +4 -3
  42. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  43. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +10 -1
  44. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +6 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/devices/f4/f4.device.js +4 -3
  48. package/lib/commonjs/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
  49. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.device.js +2 -1
  50. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.device.js.map +1 -1
  51. package/lib/commonjs/modules/bt-management/services/series-recorder.js +176 -0
  52. package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/services/series-slots.js +93 -0
  54. package/lib/commonjs/modules/bt-management/services/series-slots.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/types/measurement-series.js +6 -0
  56. package/lib/commonjs/modules/bt-management/types/measurement-series.js.map +1 -0
  57. package/lib/commonjs/modules/data-sync/constants.js +14 -1
  58. package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
  59. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +6 -5
  60. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  61. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +10 -7
  62. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  63. package/lib/commonjs/modules/data-sync/services/managers/storage-manager.js +10 -4
  64. package/lib/commonjs/modules/data-sync/services/managers/storage-manager.js.map +1 -1
  65. package/lib/commonjs/modules/data-sync/types/health-data.js +5 -1
  66. package/lib/commonjs/modules/data-sync/types/health-data.js.map +1 -1
  67. package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
  68. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +19 -5
  69. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  70. package/lib/commonjs/modules/data-sync/utils/fhir-systems.js +4 -1
  71. package/lib/commonjs/modules/data-sync/utils/fhir-systems.js.map +1 -1
  72. package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +10 -5
  73. package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
  74. package/lib/commonjs/modules/data-sync/utils/get-health-record-sync-id.js +18 -12
  75. package/lib/commonjs/modules/data-sync/utils/get-health-record-sync-id.js.map +1 -1
  76. package/lib/commonjs/modules/data-sync/utils/get-latest-valid-start-date.js +6 -1
  77. package/lib/commonjs/modules/data-sync/utils/get-latest-valid-start-date.js.map +1 -1
  78. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +4 -0
  79. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  80. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +3 -2
  81. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  82. package/lib/commonjs/modules/data-sync/utils/health-connect-series.js +101 -0
  83. package/lib/commonjs/modules/data-sync/utils/health-connect-series.js.map +1 -0
  84. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +44 -0
  85. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -0
  86. package/lib/commonjs/modules/data-sync/utils/hourly-series.js +57 -0
  87. package/lib/commonjs/modules/data-sync/utils/hourly-series.js.map +1 -0
  88. package/lib/commonjs/modules/data-sync/utils/replaces-saved-observation.js +13 -0
  89. package/lib/commonjs/modules/data-sync/utils/replaces-saved-observation.js.map +1 -0
  90. package/lib/module/modules/bt-device/constants/device-model.js +74 -0
  91. package/lib/module/modules/bt-device/constants/device-model.js.map +1 -0
  92. package/lib/module/modules/bt-device/constants/supported-devices.js +21 -1
  93. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  94. package/lib/module/modules/bt-device/hooks/use-supported-devices.js +12 -0
  95. package/lib/module/modules/bt-device/hooks/use-supported-devices.js.map +1 -0
  96. package/lib/module/modules/bt-device/index.js +4 -0
  97. package/lib/module/modules/bt-device/index.js.map +1 -1
  98. package/lib/module/modules/bt-device/types/device-kind.js +2 -0
  99. package/lib/module/modules/bt-device/types/device-kind.js.map +1 -0
  100. package/lib/module/modules/bt-device/utils/device-query.js +50 -0
  101. package/lib/module/modules/bt-device/utils/device-query.js.map +1 -0
  102. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +3 -1
  103. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  104. package/lib/module/modules/bt-management/constants/blood-pressure-translated-exception-map.js +2 -1
  105. package/lib/module/modules/bt-management/constants/blood-pressure-translated-exception-map.js.map +1 -1
  106. package/lib/module/modules/bt-management/constants/measurement-feedback.js +22 -0
  107. package/lib/module/modules/bt-management/constants/measurement-feedback.js.map +1 -0
  108. package/lib/module/modules/bt-management/hooks/use-bt-device.js +9 -8
  109. package/lib/module/modules/bt-management/hooks/use-bt-device.js.map +1 -1
  110. package/lib/module/modules/bt-management/hooks/use-bt-devices.js +37 -0
  111. package/lib/module/modules/bt-management/hooks/use-bt-devices.js.map +1 -0
  112. package/lib/module/modules/bt-management/hooks/use-open-series.js +13 -0
  113. package/lib/module/modules/bt-management/hooks/use-open-series.js.map +1 -0
  114. package/lib/module/modules/bt-management/hooks/use-queued-results.js +10 -0
  115. package/lib/module/modules/bt-management/hooks/use-queued-results.js.map +1 -0
  116. package/lib/module/modules/bt-management/index.js +5 -0
  117. package/lib/module/modules/bt-management/index.js.map +1 -1
  118. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +9 -7
  119. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  120. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +46 -3
  121. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  122. package/lib/module/modules/bt-management/services/bt-manager.js +30 -3
  123. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  124. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +2 -1
  125. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  126. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +13 -12
  127. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  128. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +3 -1
  129. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  130. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +4 -3
  131. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  132. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +10 -1
  133. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  134. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +6 -0
  135. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  136. package/lib/module/modules/bt-management/services/devices/f4/f4.device.js +4 -3
  137. package/lib/module/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
  138. package/lib/module/modules/bt-management/services/devices/spo/spo2.device.js +2 -1
  139. package/lib/module/modules/bt-management/services/devices/spo/spo2.device.js.map +1 -1
  140. package/lib/module/modules/bt-management/services/series-recorder.js +173 -0
  141. package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -0
  142. package/lib/module/modules/bt-management/services/series-slots.js +85 -0
  143. package/lib/module/modules/bt-management/services/series-slots.js.map +1 -0
  144. package/lib/module/modules/bt-management/types/measurement-series.js +4 -0
  145. package/lib/module/modules/bt-management/types/measurement-series.js.map +1 -0
  146. package/lib/module/modules/data-sync/constants.js +14 -1
  147. package/lib/module/modules/data-sync/constants.js.map +1 -1
  148. package/lib/module/modules/data-sync/services/base-health-sync-service.js +6 -5
  149. package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  150. package/lib/module/modules/data-sync/services/managers/data-processor.js +11 -8
  151. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  152. package/lib/module/modules/data-sync/services/managers/storage-manager.js +10 -4
  153. package/lib/module/modules/data-sync/services/managers/storage-manager.js.map +1 -1
  154. package/lib/module/modules/data-sync/types/health-data.js +6 -1
  155. package/lib/module/modules/data-sync/types/health-data.js.map +1 -1
  156. package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
  157. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +19 -6
  158. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  159. package/lib/module/modules/data-sync/utils/fhir-systems.js +4 -1
  160. package/lib/module/modules/data-sync/utils/fhir-systems.js.map +1 -1
  161. package/lib/module/modules/data-sync/utils/generate-observation-entry.js +10 -5
  162. package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
  163. package/lib/module/modules/data-sync/utils/get-health-record-sync-id.js +16 -11
  164. package/lib/module/modules/data-sync/utils/get-health-record-sync-id.js.map +1 -1
  165. package/lib/module/modules/data-sync/utils/get-latest-valid-start-date.js +7 -2
  166. package/lib/module/modules/data-sync/utils/get-latest-valid-start-date.js.map +1 -1
  167. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +4 -0
  168. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  169. package/lib/module/modules/data-sync/utils/get-samples-from-health.js +3 -2
  170. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  171. package/lib/module/modules/data-sync/utils/health-connect-series.js +97 -0
  172. package/lib/module/modules/data-sync/utils/health-connect-series.js.map +1 -0
  173. package/lib/module/modules/data-sync/utils/healthkit-series.js +40 -0
  174. package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -0
  175. package/lib/module/modules/data-sync/utils/hourly-series.js +52 -0
  176. package/lib/module/modules/data-sync/utils/hourly-series.js.map +1 -0
  177. package/lib/module/modules/data-sync/utils/replaces-saved-observation.js +8 -0
  178. package/lib/module/modules/data-sync/utils/replaces-saved-observation.js.map +1 -0
  179. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-model.d.ts +32 -0
  180. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-model.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +18 -1
  182. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/src/modules/bt-device/hooks/use-supported-devices.d.ts +9 -0
  184. package/lib/typescript/commonjs/src/modules/bt-device/hooks/use-supported-devices.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts +5 -0
  186. package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/src/modules/bt-device/types/device-kind.d.ts +16 -0
  188. package/lib/typescript/commonjs/src/modules/bt-device/types/device-kind.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/src/modules/bt-device/utils/device-query.d.ts +49 -0
  190. package/lib/typescript/commonjs/src/modules/bt-device/utils/device-query.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/src/modules/bt-management/constants/blood-pressure-translated-exception-map.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-feedback.d.ts +21 -0
  194. package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-feedback.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bt-device.d.ts +5 -4
  196. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bt-device.d.ts.map +1 -1
  197. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bt-devices.d.ts +24 -0
  198. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bt-devices.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-open-series.d.ts +12 -0
  200. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-open-series.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-queued-results.d.ts +10 -0
  202. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-queued-results.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +5 -0
  204. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  205. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts +7 -1
  206. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +17 -3
  208. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +17 -0
  210. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  215. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +4 -1
  216. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  217. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  218. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
  219. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.device.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +56 -0
  221. package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/modules/bt-management/services/series-slots.d.ts +36 -0
  223. package/lib/typescript/commonjs/src/modules/bt-management/services/series-slots.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -0
  225. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-series.d.ts +26 -0
  227. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-series.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +6 -0
  229. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +6 -1
  231. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  232. package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +11 -1
  233. package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +3 -2
  236. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/storage-manager.d.ts +2 -1
  238. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/storage-manager.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/src/modules/data-sync/types/health-data.d.ts +15 -2
  240. package/lib/typescript/commonjs/src/modules/data-sync/types/health-data.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +3 -1
  242. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +5 -1
  244. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/modules/data-sync/utils/fhir-systems.d.ts +3 -1
  246. package/lib/typescript/commonjs/src/modules/data-sync/utils/fhir-systems.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts +3 -1
  248. package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-health-record-sync-id.d.ts +9 -6
  250. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +2 -2
  253. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -2
  255. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-connect-series.d.ts +9 -0
  257. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-connect-series.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +12 -0
  259. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/src/modules/data-sync/utils/hourly-series.d.ts +22 -0
  261. package/lib/typescript/commonjs/src/modules/data-sync/utils/hourly-series.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/modules/data-sync/utils/replaces-saved-observation.d.ts +7 -0
  263. package/lib/typescript/commonjs/src/modules/data-sync/utils/replaces-saved-observation.d.ts.map +1 -0
  264. package/lib/typescript/module/src/modules/bt-device/constants/device-model.d.ts +32 -0
  265. package/lib/typescript/module/src/modules/bt-device/constants/device-model.d.ts.map +1 -0
  266. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +18 -1
  267. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  268. package/lib/typescript/module/src/modules/bt-device/hooks/use-supported-devices.d.ts +9 -0
  269. package/lib/typescript/module/src/modules/bt-device/hooks/use-supported-devices.d.ts.map +1 -0
  270. package/lib/typescript/module/src/modules/bt-device/index.d.ts +5 -0
  271. package/lib/typescript/module/src/modules/bt-device/index.d.ts.map +1 -1
  272. package/lib/typescript/module/src/modules/bt-device/types/device-kind.d.ts +16 -0
  273. package/lib/typescript/module/src/modules/bt-device/types/device-kind.d.ts.map +1 -0
  274. package/lib/typescript/module/src/modules/bt-device/utils/device-query.d.ts +49 -0
  275. package/lib/typescript/module/src/modules/bt-device/utils/device-query.d.ts.map +1 -0
  276. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  277. package/lib/typescript/module/src/modules/bt-management/constants/blood-pressure-translated-exception-map.d.ts.map +1 -1
  278. package/lib/typescript/module/src/modules/bt-management/constants/measurement-feedback.d.ts +21 -0
  279. package/lib/typescript/module/src/modules/bt-management/constants/measurement-feedback.d.ts.map +1 -0
  280. package/lib/typescript/module/src/modules/bt-management/hooks/use-bt-device.d.ts +5 -4
  281. package/lib/typescript/module/src/modules/bt-management/hooks/use-bt-device.d.ts.map +1 -1
  282. package/lib/typescript/module/src/modules/bt-management/hooks/use-bt-devices.d.ts +24 -0
  283. package/lib/typescript/module/src/modules/bt-management/hooks/use-bt-devices.d.ts.map +1 -0
  284. package/lib/typescript/module/src/modules/bt-management/hooks/use-open-series.d.ts +12 -0
  285. package/lib/typescript/module/src/modules/bt-management/hooks/use-open-series.d.ts.map +1 -0
  286. package/lib/typescript/module/src/modules/bt-management/hooks/use-queued-results.d.ts +10 -0
  287. package/lib/typescript/module/src/modules/bt-management/hooks/use-queued-results.d.ts.map +1 -0
  288. package/lib/typescript/module/src/modules/bt-management/index.d.ts +5 -0
  289. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  290. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts +7 -1
  291. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  292. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +17 -3
  293. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  294. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +17 -0
  295. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  296. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  297. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  298. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  299. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  300. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +4 -1
  301. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  302. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  303. package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
  304. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.device.d.ts.map +1 -1
  305. package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +56 -0
  306. package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -0
  307. package/lib/typescript/module/src/modules/bt-management/services/series-slots.d.ts +36 -0
  308. package/lib/typescript/module/src/modules/bt-management/services/series-slots.d.ts.map +1 -0
  309. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -0
  310. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  311. package/lib/typescript/module/src/modules/bt-management/types/measurement-series.d.ts +26 -0
  312. package/lib/typescript/module/src/modules/bt-management/types/measurement-series.d.ts.map +1 -0
  313. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +6 -0
  314. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  315. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +6 -1
  316. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  317. package/lib/typescript/module/src/modules/data-sync/constants.d.ts +11 -1
  318. package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
  319. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  320. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +3 -2
  321. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  322. package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts +2 -1
  323. package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts.map +1 -1
  324. package/lib/typescript/module/src/modules/data-sync/types/health-data.d.ts +15 -2
  325. package/lib/typescript/module/src/modules/data-sync/types/health-data.d.ts.map +1 -1
  326. package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +3 -1
  327. package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
  328. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +5 -1
  329. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  330. package/lib/typescript/module/src/modules/data-sync/utils/fhir-systems.d.ts +3 -1
  331. package/lib/typescript/module/src/modules/data-sync/utils/fhir-systems.d.ts.map +1 -1
  332. package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts +3 -1
  333. package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
  334. package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts +9 -6
  335. package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map +1 -1
  336. package/lib/typescript/module/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts.map +1 -1
  337. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +2 -2
  338. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  339. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -2
  340. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  341. package/lib/typescript/module/src/modules/data-sync/utils/health-connect-series.d.ts +9 -0
  342. package/lib/typescript/module/src/modules/data-sync/utils/health-connect-series.d.ts.map +1 -0
  343. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +12 -0
  344. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -0
  345. package/lib/typescript/module/src/modules/data-sync/utils/hourly-series.d.ts +22 -0
  346. package/lib/typescript/module/src/modules/data-sync/utils/hourly-series.d.ts.map +1 -0
  347. package/lib/typescript/module/src/modules/data-sync/utils/replaces-saved-observation.d.ts +7 -0
  348. package/lib/typescript/module/src/modules/data-sync/utils/replaces-saved-observation.d.ts.map +1 -0
  349. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Healthkit","HKStatisticsOptions","SERIES_SLOT_MS","healthUnitFor","finishedHourWindows","toHourlySeries","getHealthKitSeries","typeIdentifier","startDate","unit","minutes","from","to","statistics","queryStatisticsCollectionForQuantity","discreteAverage","minute","forEach","statistic","index","value","averageQuantity","quantity","undefined","push","start","Date","getTime","data","anchor"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/healthkit-series.ts"],"mappings":";;AAAA,OAAOA,SAAS,IAA8BC,mBAAmB,QAAQ,oCAAoC;AAE7G,SAASC,cAAc,QAAQ,iBAAc;AAG7C,SAASC,aAAa,QAAQ,mBAAgB;AAC9C,SAASC,mBAAmB,EAAeC,cAAc,QAAQ,oBAAiB;;AAElF;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,MAAAA,CACzBC,cAAwC,EACxCC,SAAe,KAC8C;EAC7D,MAAMC,IAAI,GAAGN,aAAa,CAACI,cAAc,CAAC;EAC1C,MAAMG,OAAsB,GAAG,EAAE;EAEjC,KAAK,MAAM;IAAEC,IAAI;IAAEC;EAAG,CAAC,IAAIR,mBAAmB,CAACI,SAAS,CAAC,EAAE;IACzD,MAAMK,UAAU,GAAG,MAAMb,SAAS,CAACc,oCAAoC,CACrEP,cAAc,EACd,CAACN,mBAAmB,CAACc,eAAe,CAAC,EACrCJ,IAAI,EACJ;MAAEK,MAAM,EAAE;IAAE,CAAC,EACbL,IAAI,EACJC,EAAE,EACFH,IACF,CAAC;;IAED;IACAI,UAAU,CAACI,OAAO,CAAC,CAACC,SAAS,EAAEC,KAAK,KAAK;MACvC,MAAMC,KAAK,GAAGF,SAAS,CAACG,eAAe,EAAEC,QAAQ;MAEjD,IAAIF,KAAK,KAAKG,SAAS,EAAE;QACvBb,OAAO,CAACc,IAAI,CAAC;UAAEC,KAAK,EAAE,IAAIC,IAAI,CAACf,IAAI,CAACgB,OAAO,CAAC,CAAC,GAAGR,KAAK,GAAGjB,cAAc,CAAC;UAAEkB;QAAM,CAAC,CAAC;MACnF;IACF,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEQ,IAAI,EAAEvB,cAAc,CAACE,cAAc,EAAEE,IAAI,IAAI,GAAG,EAAEC,OAAO,CAAC;IAAEmB,MAAM,EAAEN;EAAU,CAAC;AAC1F,CAAC;AAED,SAASjB,kBAAkB","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ import { SERIES_SLOT_MS } from "../constants.js";
4
+ const HOUR_MS = 3_600_000;
5
+ const DAY_MS = 24 * HOUR_MS;
6
+
7
+ /** A minute's value: the average of what was measured in it. */
8
+
9
+ /**
10
+ * Per-minute values grouped into hours (UTC, so a day never has two 01:00s), each with one slot a minute and `null`
11
+ * for a minute without a value. Hours without any value are left out.
12
+ */
13
+ const toHourlySeries = (typeIdentifier, unit, minutes) => {
14
+ const hours = new Map();
15
+ minutes.forEach(({
16
+ start,
17
+ value
18
+ }) => {
19
+ const time = start.getTime();
20
+ const hour = Math.floor(time / HOUR_MS) * HOUR_MS;
21
+ const slots = hours.get(hour) ?? Array(HOUR_MS / SERIES_SLOT_MS).fill(null);
22
+ slots[Math.floor((time - hour) / SERIES_SLOT_MS)] = value;
23
+ hours.set(hour, slots);
24
+ });
25
+ return [...hours.entries()].sort(([first], [second]) => first - second).map(([hour, values]) => ({
26
+ kind: "series",
27
+ typeIdentifier,
28
+ startDate: new Date(hour),
29
+ endDate: new Date(hour + HOUR_MS),
30
+ unit,
31
+ periodMs: SERIES_SLOT_MS,
32
+ values
33
+ }));
34
+ };
35
+
36
+ /**
37
+ * The finished hours from `start`'s hour up to the current one, in windows of a day at most: one health-store query
38
+ * each, so a first import of months doesn't ask for everything at once.
39
+ */
40
+ const finishedHourWindows = (start, now = new Date()) => {
41
+ const windows = [];
42
+ const end = Math.floor(now.getTime() / HOUR_MS) * HOUR_MS;
43
+ for (let from = Math.floor(start.getTime() / HOUR_MS) * HOUR_MS; from < end; from += DAY_MS) {
44
+ windows.push({
45
+ from: new Date(from),
46
+ to: new Date(Math.min(from + DAY_MS, end))
47
+ });
48
+ }
49
+ return windows;
50
+ };
51
+ export { finishedHourWindows, toHourlySeries };
52
+ //# sourceMappingURL=hourly-series.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SERIES_SLOT_MS","HOUR_MS","DAY_MS","toHourlySeries","typeIdentifier","unit","minutes","hours","Map","forEach","start","value","time","getTime","hour","Math","floor","slots","get","Array","fill","set","entries","sort","first","second","map","values","kind","startDate","Date","endDate","periodMs","finishedHourWindows","now","windows","end","from","push","to","min"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/hourly-series.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,iBAAc;AAG7C,MAAMC,OAAO,GAAG,SAAS;AACzB,MAAMC,MAA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mBAAmB,GAAGA,CAACvB,KAAW,EAAEwB,GAAG,GAAG,IAAIJ,IAAI,CAAC,CAAC,KAAsC;EAC9F,MAAMK,OAAwC,GAAG,EAAE;EACnD,MAAMC,GAAG,GAAGrB,IAAI,CAACC,KAAK,CAACkB,GAAG,CAACrB,OAAO,CAAC,CAAC,GAAGZ,OAAO,CAAC,GAAGA,OAAO;EAEzD,KAAK,IAAIoC,IAAI,GAAGtB,IAAI,CAACC,KAAK,CAACN,KAAK,CAACG,OAAO,CAAC,CAAC,GAAGZ,OAAO,CAAC,GAAGA,OAAO,EAAEoC,IAAI,GAAGD,GAAG,EAAEC,IAAI,IAAInC,MAAM,EAAE;IAC3FiC,OAAO,CAACG,IAAI,CAAC;MAAED,IAAI,EAAE,IAAIP,IAAI,CAACO,IAAI,CAAC;MAAEE,EAAE,EAAE,IAAIT,IAAI,CAACf,IAAI,CAACyB,GAAG,CAACH,IAAI,GAAGnC,MAAM,EAAEkC,GAAG,CAAC;IAAE,CAAC,CAAC;EACpF;EAEA,OAAOD,OAAO;AAChB,CAAC;AAED,SAASF,mBAAmB,EAAE9B,cAAc","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Modes whose observation is written over when its source changes, a day's total that grew or an hour of a series
5
+ * that got more minutes, instead of being created once.
6
+ */
7
+ export const replacesSavedObservation = mode => mode === "daily-total" || mode === "daily-summary" || mode === "series";
8
+ //# sourceMappingURL=replaces-saved-observation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["replacesSavedObservation","mode"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/replaces-saved-observation.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAIC,IAAqB,IAC5DA,IAAI,KAAK,aAAa,IAAIA,IAAI,KAAK,eAAe,IAAIA,IAAI,KAAK,QAAQ","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ import { MeasurementTypeKey } from "@ovok/core";
2
+ import type { AcceptedDevice } from "../../bt-management/types/accepted-device";
3
+ import type { DeviceKey } from "../../bt-management/types/device-key";
4
+ import type { DeviceResultPolicy } from "../../bt-management/types/result-policy";
5
+ import type { DeviceDelivery, DeviceImageCredit, DeviceKind } from "../types/device-kind";
6
+ /** The key BTManager reports a device under (`deviceData.name`): a built-in parser or a declaration id. */
7
+ declare const deviceKeyOf: (device: AcceptedDevice) => DeviceKey;
8
+ /**
9
+ * The reading a device is for. Heart rate comes along with most readings (a blood pressure, an ECG,
10
+ * a step count), so it is the main one only on a device that measures nothing else.
11
+ */
12
+ declare const primaryMeasurementOf: (types: readonly MeasurementTypeKey[]) => MeasurementTypeKey | undefined;
13
+ declare const kindOf: (types: readonly MeasurementTypeKey[]) => DeviceKind;
14
+ /**
15
+ * Devices that send readings continuously while connected rather than one per measurement: the
16
+ * live oximeters, the PC-100 and PC-300 monitors, the wearable T31 thermometer, the Lepod after
17
+ * its stored recordings, and Bluetooth SIG heart-rate straps (a value a second).
18
+ */
19
+ declare const LIVE_DEVICE_KEYS: ReadonlySet<string>;
20
+ declare const deliveryOf: (keys: readonly DeviceKey[]) => DeviceDelivery;
21
+ /**
22
+ * Keeps a live device's whole stream: every live value goes into a series of one-second slots, reported as one
23
+ * result when it closes (after an hour, or 15 minutes without a value). The single measurements a live device also
24
+ * takes, a blood pressure, a glucose reading or an ECG recording, are each reported. Pass it in `resultPolicies` for
25
+ * live devices (`resultPoliciesFor` does it for a whole list), with `seriesStorage` so a series survives the app
26
+ * closing.
27
+ */
28
+ declare const LIVE_RESULT_POLICY: DeviceResultPolicy;
29
+ /** `"Label: https://…"` as `{ label, url }`; an SDK illustration's note as its first clause. */
30
+ declare const imageCreditOf: (credit: string) => DeviceImageCredit;
31
+ export { deliveryOf, deviceKeyOf, imageCreditOf, kindOf, LIVE_DEVICE_KEYS, LIVE_RESULT_POLICY, primaryMeasurementOf, };
32
+ //# sourceMappingURL=device-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-model.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/constants/device-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAM1F,2GAA2G;AAC3G,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,SACG,CAAC;AAoBlD;;;GAGG;AACH,QAAA,MAAM,oBAAoB,GACxB,OAAO,SAAS,kBAAkB,EAAE,KACnC,kBAAkB,GAAG,SAAoE,CAAC;AAE7F,QAAA,MAAM,MAAM,GAAI,OAAO,SAAS,kBAAkB,EAAE,KAAG,UAQtD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAaxC,CAAC;AAEH,QAAA,MAAM,UAAU,GAAI,MAAM,SAAS,SAAS,EAAE,KAAG,cACgB,CAAC;AAElE;;;;;;GAMG;AACH,QAAA,MAAM,kBAAkB,EAAE,kBAGzB,CAAC;AAEF,gGAAgG;AAChG,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,iBAIvC,CAAC;AAEF,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { MeasurementTypeKey } from "@ovok/core";
2
2
  import type { AcceptedDevice } from "../../bt-management/types/accepted-device";
3
+ import type { DeviceKey } from "../../bt-management/types/device-key";
4
+ import type { DeviceDelivery, DeviceImageCredit, DeviceKind } from "../types/device-kind";
3
5
  type SupportedDevice = {
4
6
  name: string;
5
7
  nameKey: string;
@@ -15,6 +17,21 @@ type SupportedDeviceDefinition = SupportedDevice & {
15
17
  acceptedDevices: readonly AcceptedDevice[];
16
18
  measurementTypes: readonly MeasurementTypeKey[];
17
19
  manualUrl?: string;
20
+ /** Every key BTManager reports this product's devices under (`deviceData.name`). */
21
+ keys: readonly DeviceKey[];
22
+ /** What the product is for: a blood-pressure monitor, a weight scale, an ECG recorder… */
23
+ kind: DeviceKind;
24
+ /** The reading it is for; the rest of `measurementTypes` come along with it. */
25
+ primaryMeasurement?: MeasurementTypeKey;
26
+ /** One reading per measurement, or values continuously while connected. */
27
+ delivery: DeviceDelivery;
28
+ /**
29
+ * Its parser also serves other products (rebadged models, a Bluetooth SIG profile), so a
30
+ * connected device may be any of them: `deviceData.variant` names the one it is, when known.
31
+ */
32
+ shared: boolean;
33
+ /** `creditsForImage` as a label and, for a web source, its URL. */
34
+ imageCredit: DeviceImageCredit;
18
35
  };
19
36
  /**
20
37
  * Concrete devices and device families supported by the Bluetooth module.
@@ -220,7 +237,7 @@ declare const Devices: readonly [{
220
237
  readonly creditsForImage: "Bluetooth SIG official brand assets: https://www.bluetooth.com/media/";
221
238
  readonly standardProfile: true;
222
239
  }, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, SupportedDevice, ...SupportedDevice[]];
223
- /** One joined catalog for apps that need names, artwork and ready-made accept-list entries. */
240
+ /** The catalog with what each product is: its kind, main reading, delivery and keys. */
224
241
  declare const supportedDevices: readonly SupportedDeviceDefinition[];
225
242
  declare const SUPPORTED_DEVICES: readonly SupportedDeviceDefinition[];
226
243
  /** A de-duplicated list ready to pass directly to BTProvider.acceptedDevices. */
@@ -1 +1 @@
1
- {"version":3,"file":"supported-devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/constants/supported-devices.ts"],"names":[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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oOAgOkC,CAAC;AAwUhD,wFAAwF;AACxF,QAAA,MAAM,gBAAgB,EAAE,SAAS,yBAAyB,EAYxD,CAAC;AAEH,QAAA,MAAM,iBAAiB,sCAAmB,CAAC;AAK3C,iFAAiF;AACjF,QAAA,MAAM,0BAA0B,EAAE,SAAS,cAAc,EAMxD,CAAC;AAEF,OAAO,EACL,OAAO,EACP,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,GACjB,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { SupportedDeviceDefinition } from "../constants/supported-devices";
2
+ import { type DeviceFilter } from "../utils/device-query";
3
+ /**
4
+ * The catalog products matching `filter`, in catalog order: by kind, manufacturer, what they
5
+ * measure, delivery, key, or a `where` of your own. Every product without a filter.
6
+ */
7
+ declare const useSupportedDevices: (filter?: DeviceFilter) => SupportedDeviceDefinition[];
8
+ export { useSupportedDevices };
9
+ //# sourceMappingURL=use-supported-devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-supported-devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/hooks/use-supported-devices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEhF,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAElF;;;GAGG;AACH,QAAA,MAAM,mBAAmB,GAAI,SAAS,YAAY,KAAG,yBAAyB,EACf,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -8,6 +8,11 @@ export * from "./constants/device-list-items";
8
8
  export * from "./constants/device-instruction-pdfs";
9
9
  export * from "./constants/device-images";
10
10
  export * from "./constants/supported-devices";
11
+ export { deliveryOf, deviceKeyOf, imageCreditOf, kindOf, LIVE_DEVICE_KEYS, LIVE_RESULT_POLICY, primaryMeasurementOf, } from "./constants/device-model";
12
+ export * from "./types/device-kind";
13
+ export { deviceMatches, filterSupportedDevices, findSupportedDevice, resultPoliciesFor, } from "./utils/device-query";
14
+ export type { DeviceFilter, OneOrMany, TextMatch } from "./utils/device-query";
15
+ export * from "./hooks/use-supported-devices";
11
16
  export * from "./types/device-list-item";
12
17
  export * from "./types/supported-device-list-props";
13
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/bt-device/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/bt-device/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/E,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** What a device is for, named after its main measurement. */
2
+ type DeviceKind = "blood-pressure-monitor" | "weight-scale" | "pulse-oximeter" | "thermometer" | "glucose-meter" | "ecg-recorder" | "heart-rate-monitor" | "activity-tracker" | "urine-analyzer" | "lipid-analyzer" | "respiratory-therapy" | "sleep-monitor"
3
+ /** Three or more kinds of reading, such as the Checkme, the PC-300 or the Lepod. */
4
+ | "multi-parameter-monitor" | "other";
5
+ /**
6
+ * How a device hands over readings: `spot` gives one per measurement; `live` sends values every
7
+ * second or so for as long as it is connected (a heart-rate strap, a live oximeter, the Lepod).
8
+ */
9
+ type DeviceDelivery = "spot" | "live";
10
+ /** Who made the catalog image, and where it came from when that is a web page. */
11
+ type DeviceImageCredit = {
12
+ label: string;
13
+ url?: string;
14
+ };
15
+ export type { DeviceDelivery, DeviceImageCredit, DeviceKind };
16
+ //# sourceMappingURL=device-kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-kind.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/types/device-kind.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,KAAK,UAAU,GACX,wBAAwB,GACxB,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,cAAc,GACd,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,qBAAqB,GACrB,eAAe;AAEjB,oFAAoF;GAClF,yBAAyB,GACzB,OAAO,CAAC;AAEZ;;;GAGG;AACH,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,kFAAkF;AAClF,KAAK,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { DeviceData } from "../../bt-management/types/device-data";
2
+ import type { DeviceKey } from "../../bt-management/types/device-key";
3
+ import type { DeviceResultPolicy } from "../../bt-management/types/result-policy";
4
+ import type { DeviceDelivery, DeviceKind } from "../types/device-kind";
5
+ import type { MeasurementTypeKey } from "@ovok/core";
6
+ import { type SupportedDeviceDefinition } from "../constants/supported-devices";
7
+ type OneOrMany<T> = T | readonly T[];
8
+ /** Text to match: a value (in any case), any of several, or a pattern. */
9
+ type TextMatch = OneOrMany<string> | RegExp;
10
+ /**
11
+ * Narrows the device catalog. Every field given must match, and a list matches any one of its
12
+ * values: `{ kind: "blood-pressure-monitor", manufacturer: "HARTMANN" }`,
13
+ * `{ measures: MeasurementTypeKey.ecg, delivery: "spot" }`, `{ manufacturer: /yonker/i }`.
14
+ */
15
+ type DeviceFilter = {
16
+ id?: OneOrMany<string>;
17
+ name?: TextMatch;
18
+ manufacturer?: TextMatch;
19
+ kind?: OneOrMany<DeviceKind>;
20
+ /** Measures any of these. */
21
+ measures?: OneOrMany<MeasurementTypeKey>;
22
+ primaryMeasurement?: OneOrMany<MeasurementTypeKey>;
23
+ delivery?: DeviceDelivery;
24
+ /** Reported under any of these keys (`deviceData.name`). */
25
+ key?: OneOrMany<DeviceKey>;
26
+ shared?: boolean;
27
+ standardProfile?: boolean;
28
+ /** Anything the fields above don't cover. */
29
+ where?: (device: SupportedDeviceDefinition) => boolean;
30
+ };
31
+ declare const listOf: <T>(value: OneOrMany<T>) => readonly T[];
32
+ /** Whether a catalog product matches every field of `filter`. */
33
+ declare const deviceMatches: (device: SupportedDeviceDefinition, filter?: DeviceFilter) => boolean;
34
+ /** The catalog products matching `filter`, in catalog order. */
35
+ declare const filterSupportedDevices: (filter?: DeviceFilter, devices?: readonly SupportedDeviceDefinition[]) => SupportedDeviceDefinition[];
36
+ /**
37
+ * The catalog product behind a string (a catalog id, else a product name, else a reported key) or
38
+ * a connected device's `deviceData`: the product its advertised name identified, else its key's
39
+ * product. Pass `deviceData` for a device: a key can also be another product's name.
40
+ */
41
+ declare const findSupportedDevice: (of: string | Pick<DeviceData, "name" | "variant">) => SupportedDeviceDefinition | undefined;
42
+ /**
43
+ * `resultPolicies` keeping each live device in `devices` as series (`LIVE_RESULT_POLICY`); spot devices keep every
44
+ * reading.
45
+ */
46
+ declare const resultPoliciesFor: (devices: readonly SupportedDeviceDefinition[]) => Record<string, DeviceResultPolicy>;
47
+ export { deviceMatches, filterSupportedDevices, findSupportedDevice, listOf, resultPoliciesFor, };
48
+ export type { DeviceFilter, OneOrMany, TextMatch };
49
+ //# sourceMappingURL=device-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-query.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/utils/device-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,EAAqB,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEnG,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;AAErC,0EAA0E;AAC1E,KAAK,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG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,CAKjC,CAAC;AAEJ,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,EACN,iBAAiB,GAClB,CAAC;AACF,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bt-provider-child-wrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/bt-provider-child-wrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAsCjF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,SAAS,cAAc,EAAE,EAAE,mWAqBvE,KAAK,CAAC,iBAAiB,CACxB,2BAA2B,CAAC,CAAC,CAAC,GAAG;IAAE,wBAAwB,CAAC,EAAE,OAAO,CAAA;CAAE,CACxE,sBAkgBF,CAAC"}
1
+ {"version":3,"file":"bt-provider-child-wrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/bt-provider-child-wrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAsCjF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,SAAS,cAAc,EAAE,EAAE,mWAqBvE,KAAK,CAAC,iBAAiB,CACxB,2BAA2B,CAAC,CAAC,CAAC,GAAG;IAAE,wBAAwB,CAAC,EAAE,OAAO,CAAA;CAAE,CACxE,sBAqgBF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"blood-pressure-translated-exception-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/constants/blood-pressure-translated-exception-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,eAAO,MAAM,mCAAmC,kCAoB9C,CAAC"}
1
+ {"version":3,"file":"blood-pressure-translated-exception-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/constants/blood-pressure-translated-exception-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,eAAO,MAAM,mCAAmC,kCAoB9C,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The translation keys a failed measurement reports, as `BluetoothError.translationKey` (and its
3
+ * message): compare against these rather than the strings, and translate them in the app.
4
+ */
5
+ declare const MeasurementFeedbackKey: {
6
+ readonly DEVICE_ERROR: "feedback-messages.measurement.device-error";
7
+ readonly DEVICE_INTERRUPTED: "feedback-messages.measurement.device-interrupted";
8
+ readonly COMMAND_TIMEOUT: "feedback-messages.measurement.command-timeout";
9
+ /** The device stopped sending mid-measurement (or mid-transfer, after a reading already arrived). */
10
+ readonly STUCK: "feedback-messages.measurement.stuck-error";
11
+ readonly CORRUPT_FRAME: "feedback-messages.measurement.corrupt-frame-error";
12
+ readonly INSUFFICIENT_DATA_LENGTH: "feedback-messages.measurement.insufficient-data-length";
13
+ readonly DISTURB_DETECTED: "feedback-messages.measurement.disturb-detected-error";
14
+ readonly WEAK_SIGNAL: "feedback-messages.measurement.weak-signal-error";
15
+ readonly POOR_WAVEFORM: "feedback-messages.measurement.poor-waveform-error";
16
+ readonly LOOSE_SLEEVE: "feedback-messages.measurement.loose-sleeve-error";
17
+ readonly LEAD_OFF: "feedback-messages.measurement.lead-off-error";
18
+ };
19
+ type MeasurementFeedbackKey = (typeof MeasurementFeedbackKey)[keyof typeof MeasurementFeedbackKey];
20
+ export { MeasurementFeedbackKey };
21
+ //# sourceMappingURL=measurement-feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement-feedback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/constants/measurement-feedback.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,QAAA,MAAM,sBAAsB;;;;IAK1B,qGAAqG;;;;;;;;;CAS7F,CAAC;AAEX,KAAK,sBAAsB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEnG,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Characteristic } from "react-native-ble-plx";
2
2
  import { DeviceKey } from "../types/device-key";
3
3
  import { RuntimeDevice, RuntimeResult } from "./runtime-context";
4
+ import { BTDeviceFilter } from "./use-bt-devices";
4
5
  interface UseBTDeviceOptions {
5
6
  id?: string;
6
7
  autoConnect?: boolean;
@@ -11,11 +12,11 @@ interface RawBluetoothAccess {
11
12
  write: (serviceUUID: string, characteristicUUID: string, base64Value: string, withResponse?: boolean) => Promise<Characteristic>;
12
13
  }
13
14
  declare class DeviceSelectionRequiredError extends Error {
14
- constructor(model: DeviceKey, ids: readonly string[]);
15
+ constructor(model: string, ids: readonly string[]);
15
16
  }
16
- declare const useBTDevice: (model: DeviceKey, { id, autoConnect, allowRawAccess }?: UseBTDeviceOptions) => {
17
- model: DeviceKey;
18
- devices: RuntimeDevice[];
17
+ declare const useBTDevice: <Filter extends BTDeviceFilter>(filter: Filter, { id, autoConnect, allowRawAccess }?: UseBTDeviceOptions) => {
18
+ model: Filter extends DeviceKey ? Filter : undefined;
19
+ devices: readonly RuntimeDevice[];
19
20
  device: RuntimeDevice | undefined;
20
21
  requiresSelection: boolean;
21
22
  status: import("..").DeviceStatus | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"use-bt-device.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-bt-device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAEL,aAAa,EACb,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAE3B,UAAU,kBAAkB;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACnF,KAAK,EAAE,CACL,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,OAAO,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;CAC9B;AAED,cAAM,4BAA6B,SAAQ,KAAK;gBAClC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE;CAIrD;AAmCD,QAAA,MAAM,WAAW,GACf,OAAO,SAAS,EAChB,sCAAqD,kBAAuB;;;;;;;;;uBAoDhC,MAAM;;;;CAoGnD,CAAC;AAEF,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,CAAC"}
1
+ {"version":3,"file":"use-bt-device.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-bt-device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAEL,aAAa,EACb,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAgB,MAAM,kBAAkB,CAAC;AAEhE,UAAU,kBAAkB;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACnF,KAAK,EAAE,CACL,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,OAAO,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;CAC9B;AAED,cAAM,4BAA6B,SAAQ,KAAK;gBAClC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE;CAIlD;AAmCD,QAAA,MAAM,WAAW,GAAI,MAAM,SAAS,cAAc,EAChD,QAAQ,MAAM,EACd,sCAAqD,kBAAuB;;;;;;;;;uBA8ChC,MAAM;;;;CAoGnD,CAAC;AAEF,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { SupportedDeviceDefinition } from "../../bt-device/constants/supported-devices";
2
+ import { type DeviceFilter, type OneOrMany } from "../../bt-device/utils/device-query";
3
+ import { DeviceKey } from "../types/device-key";
4
+ import { DeviceStatus } from "../types/device-status";
5
+ import { RuntimeDevice } from "./runtime-context";
6
+ /**
7
+ * Which connected or nearby devices to follow: a model key (`deviceData.name` or `.model`), or a
8
+ * filter over what the device is (any `DeviceFilter` field, matched against its catalog product)
9
+ * and its state. `{ kind: "weight-scale" }`, `{ manufacturer: "HARTMANN", status: DeviceStatus.CONNECTED }`.
10
+ * A device whose parser serves several products counts as the one its advertised name identifies,
11
+ * else as its parser's product.
12
+ */
13
+ type BTDeviceFilter = DeviceKey | (Omit<DeviceFilter, "where"> & {
14
+ status?: OneOrMany<DeviceStatus>;
15
+ /** Anything else, given the device and its catalog product (when the catalog has it). */
16
+ where?: (device: RuntimeDevice, product: SupportedDeviceDefinition | undefined) => boolean;
17
+ });
18
+ /** Whether a runtime device is one `filter` asks for. */
19
+ declare const btDeviceMatches: (device: RuntimeDevice, filter: BTDeviceFilter) => boolean;
20
+ /** Every connected or nearby device `filter` asks for, in the order Bluetooth found them. */
21
+ declare const useBTDevices: (filter: BTDeviceFilter) => readonly RuntimeDevice[];
22
+ export { btDeviceMatches, useBTDevices };
23
+ export type { BTDeviceFilter };
24
+ //# sourceMappingURL=use-bt-devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-bt-devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-bt-devices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAE7F,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAwB,MAAM,mBAAmB,CAAC;AAExE;;;;;;GAMG;AACH,KAAK,cAAc,GACf,SAAS,GACT,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAC7B,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAEjC,yFAAyF;IACzF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,yBAAyB,GAAG,SAAS,KAAK,OAAO,CAAC;CAC5F,CAAC,CAAC;AAEP,yDAAyD;AACzD,QAAA,MAAM,eAAe,GAAI,QAAQ,aAAa,EAAE,QAAQ,cAAc,KAAG,OAcxE,CAAC;AAWF,6FAA6F;AAC7F,QAAA,MAAM,YAAY,GAAI,QAAQ,cAAc,KAAG,SAAS,aAAa,EAIlE,CAAC;AAEJ,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { OpenSeries } from "../types/measurement-series";
2
+ type SeriesSource = {
3
+ getOpenSeries: () => readonly OpenSeries[];
4
+ subscribeOpenSeries: (listener: () => void) => () => void;
5
+ };
6
+ /**
7
+ * The series a `BTManager` is recording, updated as each value arrives: the live values to show while a device
8
+ * streams (`latest`), before the series is stored.
9
+ */
10
+ declare const useOpenSeries: (manager: SeriesSource | undefined) => readonly OpenSeries[];
11
+ export { useOpenSeries };
12
+ //# sourceMappingURL=use-open-series.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-open-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-open-series.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;IAC3C,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAC3D,CAAC;AAKF;;;GAGG;AACH,QAAA,MAAM,aAAa,GAAI,SAAS,YAAY,GAAG,SAAS,KAAG,SAAS,UAAU,EAI3E,CAAC;AAEJ,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { BackgroundSyncResult } from "../types/background-sync";
2
+ import { DeviceKey } from "../types/device-key";
3
+ type QueueSource<T extends DeviceKey> = {
4
+ getQueued: () => readonly BackgroundSyncResult<T>[];
5
+ subscribe: (listener: () => void) => () => void;
6
+ };
7
+ /** The results a `BackgroundSyncCoordinator` still holds for the current account: readings not saved yet. */
8
+ declare const useQueuedResults: <T extends DeviceKey>(coordinator: QueueSource<T> | undefined) => readonly BackgroundSyncResult<T>[];
9
+ export { useQueuedResults };
10
+ //# sourceMappingURL=use-queued-results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-queued-results.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-queued-results.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,KAAK,WAAW,CAAC,CAAC,SAAS,SAAS,IAAI;IACtC,SAAS,EAAE,MAAM,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;IACpD,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CACjD,CAAC;AAKF,6GAA6G;AAC7G,QAAA,MAAM,gBAAgB,GAAI,CAAC,SAAS,SAAS,EAC3C,aAAa,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,KACtC,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAIhC,CAAC;AAEJ,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -34,6 +34,7 @@ export * from "./types/bluetooth-permission-status";
34
34
  export * from "./types/device-status-change-callback";
35
35
  export * from "./types/device-connection-event";
36
36
  export * from "./types/result-policy";
37
+ export * from "./types/measurement-series";
37
38
  export * from "./types/clock-sync";
38
39
  export * from "./services/devices/bt-managed-device";
39
40
  export * from "./services/devices/blood-glucose/blood-glucose.device";
@@ -106,8 +107,12 @@ export * from "./hooks/use-nearby-device-offer";
106
107
  export * from "./hooks/use-paired-devices";
107
108
  export * from "./hooks/use-device-connection";
108
109
  export * from "./hooks/use-bt-device";
110
+ export * from "./hooks/use-bt-devices";
111
+ export * from "./constants/measurement-feedback";
109
112
  export * from "./hooks/use-measurements";
110
113
  export * from "./hooks/use-background-sync";
114
+ export * from "./hooks/use-open-series";
115
+ export * from "./hooks/use-queued-results";
111
116
  /** @deprecated Import useHealthImport from @ovok/native/data-sync instead. */
112
117
  export { useHealthImport, } from "../data-sync/hooks/use-health-import";
113
118
  /** @deprecated Import HealthImportAdapter from @ovok/native/data-sync instead. */
@@ -1 +1 @@
1
- {"version":3,"file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cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAE3C,8EAA8E;AAC9E,OAAO,EACL,eAAe,GAChB,MAAM,sCAAsC,CAAC;AAE9C,kFAAkF;AAClF,YAAY,EACV,mBAAmB,GACpB,MAAM,sCAAsC,CAAC;AAC9C,cAAc,0BAA0B,CAAC"}
@@ -1,3 +1,9 @@
1
1
  import { AcceptedDevice } from "../../types/accepted-device";
2
- export declare const getBackgroundServiceUUIDs: (acceptedDevices: readonly AcceptedDevice[], additionalServiceUUIDs?: readonly string[]) => string[] | null;
2
+ /**
3
+ * The services a background scan asks for: those of every accepted device whose services are known, and
4
+ * `additionalServiceUUIDs`. In the background iOS (and Android with the screen off) reports only devices advertising a
5
+ * listed service, so an accepted device whose services aren't known is found by a foreground scan only. One such
6
+ * device must not empty the list: iOS can't scan in the background without one.
7
+ */
8
+ export declare const getBackgroundServiceUUIDs: (acceptedDevices: readonly AcceptedDevice[], additionalServiceUUIDs?: readonly string[]) => string[];
3
9
  //# sourceMappingURL=background-service-uuids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"background-service-uuids.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-service-uuids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAqF7D,eAAO,MAAM,yBAAyB,GACpC,iBAAiB,SAAS,cAAc,EAAE,EAC1C,yBAAwB,SAAS,MAAM,EAAO,KAC7C,MAAM,EAAE,GAAG,IAsBb,CAAC"}
1
+ {"version":3,"file":"background-service-uuids.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-service-uuids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAqF7D;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,iBAAiB,SAAS,cAAc,EAAE,EAC1C,yBAAwB,SAAS,MAAM,EAAO,KAC7C,MAAM,EAaR,CAAC"}
@@ -1,15 +1,29 @@
1
1
  import type { BackgroundSyncFlushOptions } from "./background-sync-queue";
2
- import { BackgroundSyncOptions } from "../../types/background-sync";
2
+ import { BackgroundSyncOptions, BackgroundSyncResult } from "../../types/background-sync";
3
3
  import { DeviceKey } from "../../types/device-key";
4
4
  import { ResultCallback } from "../../types/result-callback";
5
5
  import { DEFAULT_QUEUE_KEY } from "./background-sync-queue";
6
+ /** A result is queued only for the account `getOwnerKey` returns, so the coordinator can't work without it. */
7
+ type CoordinatorOptions<T extends DeviceKey> = BackgroundSyncOptions<T> & {
8
+ getOwnerKey: () => string | undefined;
9
+ };
6
10
  declare class BackgroundSyncCoordinator<T extends DeviceKey> {
7
11
  private options;
8
12
  private operation;
9
- constructor(options: BackgroundSyncOptions<T>);
10
- updateOptions(options: BackgroundSyncOptions<T>): void;
13
+ private queued;
14
+ private readonly listeners;
15
+ constructor(options: CoordinatorOptions<T>);
16
+ updateOptions(options: CoordinatorOptions<T>): void;
11
17
  enqueue: (result: ResultCallback<T>) => Promise<void>;
12
18
  flush: (options?: BackgroundSyncFlushOptions) => Promise<void>;
19
+ /**
20
+ * The current account's results still waiting to be accepted, oldest first: readings to show as not saved yet.
21
+ * Kept up to date by every enqueue and flush; `subscribe` reads the stored queue in first.
22
+ */
23
+ getQueued: () => readonly BackgroundSyncResult<T>[];
24
+ /** Calls `listener` whenever the waiting results change; the first subscriber reads the stored queue in. */
25
+ subscribe: (listener: () => void) => (() => void);
26
+ private publish;
13
27
  private runExclusive;
14
28
  private flushQueue;
15
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"background-sync-coordinator.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,qBAAqB,EAAwB,MAAM,6BAA6B,CAAC;AAE1F,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAIL,iBAAiB,EAIlB,MAAM,yBAAyB,CAAC;AAEjC,cAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS;IACjD,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,SAAS,CAAoC;gBAElC,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAI7C,aAAa,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI;IAItD,OAAO,GAAI,QAAQ,cAAc,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC,CA4BzD;IAEK,KAAK,GAAI,UAAS,0BAA+B,KAAG,OAAO,CAAC,IAAI,CAAC,CASnE;IAEL,OAAO,CAAC,YAAY,CAMlB;IAEF,OAAO,CAAC,UAAU,CA+GhB;CACH;AAED,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,CAAC;AACxD,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"background-sync-coordinator.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,yBA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1,21 +1,32 @@
1
1
  import { BleManager, Device } from "react-native-ble-plx";
2
2
  import { AcceptedDevice } from "../types/accepted-device";
3
+ import { BackgroundSyncStorage } from "../types/background-sync";
3
4
  import { ClockSyncOptions } from "../types/clock-sync";
4
5
  import { DeviceConnectionEvent } from "../types/device-connection-event";
5
6
  import { DeviceKeyOf } from "../types/device-key-of";
6
7
  import { DeviceStatusChangeCallback } from "../types/device-status-change-callback";
7
8
  import { ErrorCallback } from "../types/error-callback";
9
+ import { OpenSeries } from "../types/measurement-series";
8
10
  import { ResultCallback } from "../types/result-callback";
9
11
  import { DeviceResultPolicy } from "../types/result-policy";
10
12
  import { BTManagedDevice } from "./devices/bt-managed-device";
11
13
  interface BTManagerOptions {
12
14
  backgroundEnabled?: boolean;
15
+ /**
16
+ * The services a background scan asks for (see `getBackgroundServiceUUIDs`). A foreground scan stays unfiltered, so
17
+ * every accepted device can be found on screen.
18
+ */
13
19
  serviceUUIDs?: readonly string[] | null;
14
20
  oneReadingPerConnection?: boolean;
15
21
  deliveredEcgFileNames?: readonly string[];
16
22
  deliveredFileNames?: readonly string[];
17
23
  clearDeviceHistory?: boolean;
18
24
  resultPolicies?: Partial<Record<string, DeviceResultPolicy>>;
25
+ /**
26
+ * Where series being recorded (a `"series"` result policy) wait, so one survives the app closing; use the store your
27
+ * results queue in. Without it they live in memory, and a closed app loses the series it was recording.
28
+ */
29
+ seriesStorage?: BackgroundSyncStorage;
19
30
  clockSync?: ClockSyncOptions;
20
31
  /** Connect one newly discovered device automatically after the scan settles. */
21
32
  autoConnect?: boolean;
@@ -47,6 +58,8 @@ declare class BTManager<T extends readonly AcceptedDevice[]> {
47
58
  private scanRetryTimer;
48
59
  private scanRestartTimer;
49
60
  private bluetoothEnablePrompted;
61
+ private readonly series;
62
+ private seriesTimer;
50
63
  constructor(bleManager: BleManager, acceptedDevices: T, options?: BTManagerOptions);
51
64
  setAutoConnect: (enabledOrOptions: boolean | {
52
65
  enabled: boolean;
@@ -54,6 +67,10 @@ declare class BTManager<T extends readonly AcceptedDevice[]> {
54
67
  onDeviceSelectionRequired?: BTManagerOptions["onDeviceSelectionRequired"];
55
68
  }, delayMs?: number, onDeviceSelectionRequired?: BTManagerOptions["onDeviceSelectionRequired"]) => void;
56
69
  destroy: () => void;
70
+ /** The series being recorded, each with its latest values: what to show while a device streams. */
71
+ getOpenSeries: () => readonly OpenSeries[];
72
+ /** Calls `listener` whenever a series gets a value or closes; returns the unsubscribe. */
73
+ subscribeOpenSeries: (listener: () => void) => (() => void);
57
74
  startScan: () => void;
58
75
  /** Switches only the scan policy; the app can keep a foreground scan broad. */
59
76
  setBackgroundScanEnabled: (enabled: boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"bt-manager.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/services/bt-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,UAAU,EACV,MAAM,EAIP,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAI5D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,UAAU,gBAAgB;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACxC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CA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