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

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 (712) hide show
  1. package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
  2. package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
  3. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
  4. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  5. package/lib/commonjs/modules/auth/index.js +21 -10
  6. package/lib/commonjs/modules/auth/index.js.map +1 -1
  7. package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
  8. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
  9. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  10. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  11. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
  12. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  13. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  14. package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
  15. package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
  16. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
  17. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  18. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
  19. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  20. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
  21. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  22. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
  23. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
  24. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
  25. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  26. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/index.js +12 -0
  28. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/bt-manager.js +27 -1
  30. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
  32. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
  34. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
  38. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
  40. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
  42. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  43. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +78 -19
  44. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +30 -2
  46. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +11 -3
  48. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  49. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +48 -3
  50. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  51. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
  52. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  53. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
  54. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +115 -26
  56. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
  58. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
  59. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +32 -0
  60. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +73 -0
  62. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +130 -30
  64. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
  65. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
  66. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
  68. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  69. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
  70. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
  71. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
  72. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  73. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +75 -0
  74. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +113 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +67 -0
  78. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js +55 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +57 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
  85. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js +46 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
  88. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  89. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js +27 -0
  90. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
  92. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  93. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -20
  94. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
  95. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
  96. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  97. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +47 -0
  98. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
  100. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  101. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
  102. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
  103. package/lib/commonjs/modules/bt-management/services/series-recorder.js +27 -5
  104. package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -1
  105. package/lib/commonjs/modules/bt-management/types/device-waveform.js +6 -0
  106. package/lib/commonjs/modules/bt-management/types/device-waveform.js.map +1 -0
  107. package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js +23 -0
  108. package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
  109. package/lib/commonjs/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
  110. package/lib/commonjs/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
  111. package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
  112. package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
  113. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js +15 -8
  114. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
  115. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js +1 -1
  116. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
  117. package/lib/commonjs/modules/data-sync/constants.js +4 -1
  118. package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
  119. package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js +6 -9
  120. package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
  121. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +8 -7
  122. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  123. package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +13 -0
  124. package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
  125. package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js +47 -0
  126. package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
  127. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +14 -6
  128. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  129. package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
  130. package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
  131. package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +68 -0
  132. package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
  133. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
  134. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  135. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +43 -86
  136. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  137. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +6 -5
  138. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  139. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +15 -15
  140. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  141. package/lib/commonjs/modules/data-sync/utils/health-units.js +11 -1
  142. package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
  143. package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js +64 -0
  144. package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
  145. package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
  146. package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js +20 -0
  147. package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
  148. package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js +21 -0
  149. package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
  150. package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js +59 -0
  151. package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js.map +1 -0
  152. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +20 -11
  153. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
  154. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
  155. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
  156. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
  157. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  158. package/lib/commonjs/modules/next/bluetooth/connections.js +45 -2
  159. package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -1
  160. package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
  161. package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -1
  162. package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
  163. package/lib/commonjs/modules/next/bluetooth/readings.js +10 -2
  164. package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -1
  165. package/lib/commonjs/modules/next/bluetooth/runtime.js +37 -1
  166. package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -1
  167. package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -1
  168. package/lib/module/modules/auth/google-return-page/index.js +21 -0
  169. package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
  170. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
  171. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  172. package/lib/module/modules/auth/index.js +2 -1
  173. package/lib/module/modules/auth/index.js.map +1 -1
  174. package/lib/module/modules/auth/session/logout-session.js +1 -1
  175. package/lib/module/modules/auth/session/logout-session.js.map +1 -1
  176. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
  177. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  178. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  179. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
  180. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
  181. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  182. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  183. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
  184. package/lib/module/modules/auth/sign-in/index.js +2 -0
  185. package/lib/module/modules/auth/sign-in/index.js.map +1 -1
  186. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
  187. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  188. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
  189. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  190. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
  191. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  192. package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
  193. package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
  194. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
  195. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  196. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
  197. package/lib/module/modules/bt-management/index.js +1 -0
  198. package/lib/module/modules/bt-management/index.js.map +1 -1
  199. package/lib/module/modules/bt-management/services/bt-manager.js +27 -1
  200. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  201. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
  202. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  203. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
  204. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  205. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
  206. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
  207. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
  208. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
  209. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
  210. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  211. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
  212. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  213. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +77 -19
  214. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  215. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +30 -2
  216. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  217. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +11 -3
  218. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  219. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +48 -3
  220. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  221. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
  222. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  223. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
  224. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  225. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +115 -26
  226. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  227. package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
  228. package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
  229. package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +28 -0
  230. package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
  231. package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +69 -0
  232. package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
  233. package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +129 -30
  234. package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
  235. package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
  236. package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
  237. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
  238. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  239. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
  240. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
  241. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
  242. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  243. package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +72 -0
  244. package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
  245. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +109 -0
  246. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
  247. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +64 -0
  248. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
  249. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js +51 -0
  250. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
  251. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +53 -0
  252. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
  253. package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
  254. package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
  255. package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js +42 -0
  256. package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
  257. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
  258. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  259. package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js +22 -0
  260. package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
  261. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
  262. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  263. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -21
  264. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
  265. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
  266. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  267. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +44 -0
  268. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
  269. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
  270. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  271. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
  272. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
  273. package/lib/module/modules/bt-management/services/series-recorder.js +27 -5
  274. package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -1
  275. package/lib/module/modules/bt-management/types/device-waveform.js +4 -0
  276. package/lib/module/modules/bt-management/types/device-waveform.js.map +1 -0
  277. package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js +18 -0
  278. package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
  279. package/lib/module/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
  280. package/lib/module/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
  281. package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
  282. package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
  283. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js +16 -9
  284. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
  285. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js +2 -2
  286. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
  287. package/lib/module/modules/data-sync/constants.js +4 -1
  288. package/lib/module/modules/data-sync/constants.js.map +1 -1
  289. package/lib/module/modules/data-sync/hooks/use-listen-changes.js +7 -10
  290. package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
  291. package/lib/module/modules/data-sync/services/managers/data-processor.js +8 -7
  292. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  293. package/lib/module/modules/data-sync/types/health-sync-keys.js +13 -0
  294. package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
  295. package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js +43 -0
  296. package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
  297. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +14 -6
  298. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  299. package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
  300. package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
  301. package/lib/module/modules/data-sync/utils/default-health-coding.js +65 -0
  302. package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
  303. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
  304. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  305. package/lib/module/modules/data-sync/utils/get-samples-from-health.js +44 -87
  306. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  307. package/lib/module/modules/data-sync/utils/get-total-samples-count.js +5 -4
  308. package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  309. package/lib/module/modules/data-sync/utils/health-data-catalog.js +15 -15
  310. package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  311. package/lib/module/modules/data-sync/utils/health-units.js +11 -1
  312. package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
  313. package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js +59 -0
  314. package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
  315. package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
  316. package/lib/module/modules/data-sync/utils/healthkit-query-options.js +16 -0
  317. package/lib/module/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
  318. package/lib/module/modules/data-sync/utils/healthkit-sample-source.js +17 -0
  319. package/lib/module/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
  320. package/lib/module/modules/data-sync/utils/healthkit-samples.js +52 -0
  321. package/lib/module/modules/data-sync/utils/healthkit-samples.js.map +1 -0
  322. package/lib/module/modules/data-sync/utils/healthkit-series.js +19 -10
  323. package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
  324. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
  325. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
  326. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
  327. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  328. package/lib/module/modules/next/bluetooth/connections.js +45 -2
  329. package/lib/module/modules/next/bluetooth/connections.js.map +1 -1
  330. package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
  331. package/lib/module/modules/next/bluetooth/errors.js.map +1 -1
  332. package/lib/module/modules/next/bluetooth/index.js.map +1 -1
  333. package/lib/module/modules/next/bluetooth/readings.js +10 -2
  334. package/lib/module/modules/next/bluetooth/readings.js.map +1 -1
  335. package/lib/module/modules/next/bluetooth/runtime.js +37 -1
  336. package/lib/module/modules/next/bluetooth/runtime.js.map +1 -1
  337. package/lib/module/modules/next/bluetooth/web/index.js.map +1 -1
  338. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
  339. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  341. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
  343. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
  345. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  346. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  347. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  348. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  349. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  350. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  352. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  353. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
  354. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  356. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  358. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  360. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  362. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  364. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  366. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
  369. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
  371. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +21 -5
  373. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
  379. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
  381. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
  383. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
  385. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
  387. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  389. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
  391. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
  394. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
  396. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  397. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
  398. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
  399. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
  400. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
  402. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
  404. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
  406. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
  408. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
  410. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
  412. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
  414. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
  416. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
  417. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
  418. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
  419. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
  420. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
  422. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
  424. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
  426. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
  428. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
  430. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
  431. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
  433. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
  436. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
  437. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +6 -1
  440. package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -1
  442. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
  444. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  445. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
  446. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts +15 -0
  448. package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
  449. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
  450. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
  452. package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
  456. package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
  457. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
  459. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +3 -1
  461. package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  464. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
  465. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
  466. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
  467. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
  468. package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
  469. package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
  471. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  472. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
  473. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
  474. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
  475. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
  476. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
  477. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
  479. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  480. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
  481. package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
  482. package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
  484. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
  486. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  487. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  488. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  489. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +2 -2
  490. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  491. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
  492. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
  493. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
  494. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
  495. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
  496. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
  497. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
  498. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
  499. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
  500. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
  501. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
  502. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
  503. package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
  504. package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
  505. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
  506. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
  507. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
  508. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
  509. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +13 -1
  510. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +20 -0
  512. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +1 -1
  514. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -1
  515. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +2 -1
  516. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
  517. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +3 -2
  518. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -1
  519. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +19 -1
  520. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
  521. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +33 -1
  522. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
  523. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +1 -0
  524. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
  525. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
  526. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  527. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  528. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  529. package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
  530. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  531. package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
  532. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  533. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  534. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  535. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  536. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  537. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  538. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  539. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  540. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
  541. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
  542. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  543. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  544. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  545. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  546. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  547. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  548. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  549. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  550. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  551. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  552. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  553. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  554. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  555. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
  556. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  557. package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
  558. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  559. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +21 -5
  560. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  561. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  562. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  563. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
  564. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
  565. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
  566. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
  567. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
  568. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  569. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
  570. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  571. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
  572. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  573. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
  574. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  575. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  576. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  577. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
  578. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  579. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
  580. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
  581. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  582. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
  583. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  584. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
  585. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
  586. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
  587. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
  588. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
  589. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
  590. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
  591. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
  592. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
  593. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
  594. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
  595. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  596. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
  597. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
  598. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
  599. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  600. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
  601. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
  602. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
  603. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
  604. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
  605. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
  606. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
  607. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
  608. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
  609. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
  610. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
  611. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
  612. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
  613. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
  614. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
  615. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  616. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
  617. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
  618. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  619. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
  620. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  622. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
  623. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
  624. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  625. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
  626. package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +6 -1
  627. package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
  628. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -1
  629. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  630. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
  631. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  632. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
  633. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
  634. package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts +15 -0
  635. package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
  636. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
  637. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
  638. package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
  639. package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
  640. package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
  641. package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
  642. package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
  643. package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
  644. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
  645. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
  646. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
  647. package/lib/typescript/module/src/modules/data-sync/constants.d.ts +3 -1
  648. package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
  649. package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
  650. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  651. package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
  652. package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
  653. package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
  654. package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
  655. package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
  656. package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
  657. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
  658. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  659. package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
  660. package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
  661. package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
  662. package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
  663. package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
  664. package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
  665. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
  666. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  667. package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
  668. package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
  669. package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
  670. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
  671. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  672. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
  673. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  674. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  675. package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  676. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +2 -2
  677. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  678. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
  679. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
  680. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
  681. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
  682. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
  683. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
  684. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
  685. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
  686. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
  687. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
  688. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
  689. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
  690. package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
  691. package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
  692. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
  693. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
  694. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
  695. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
  696. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +13 -1
  697. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -1
  698. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +20 -0
  699. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  700. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +1 -1
  701. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -1
  702. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +2 -1
  703. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
  704. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +3 -2
  705. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -1
  706. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +19 -1
  707. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
  708. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +33 -1
  709. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
  710. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +1 -0
  711. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
  712. package/package.json +8 -3
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.readPulseWave = exports.PULSE_WAVE_REQUEST = exports.PULSE_WAVE_PERIOD_MS = exports.PULSE_WAVE_COMMAND = void 0;
7
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
8
+ var _le16FromHex = require("../../../utils/le-16-from-hex.js");
9
+ /** The legacy oxygen protocol's realtime request answered with the pulse wave as well as the parameters. */
10
+ const PULSE_WAVE_COMMAND = exports.PULSE_WAVE_COMMAND = 0x1b;
11
+
12
+ /** Its one payload byte picks the sample rate; 0 is 125 Hz. */
13
+ const RATE_125_HZ = 0x00;
14
+ const PULSE_WAVE_REQUEST = exports.PULSE_WAVE_REQUEST = [RATE_125_HZ];
15
+ const PULSE_WAVE_PERIOD_MS = exports.PULSE_WAVE_PERIOD_MS = 8;
16
+ const PAYLOAD_START = 7;
17
+ const CHECKSUM_BYTES = 1;
18
+
19
+ /** Offsets in the answer's payload. */
20
+ const LEAD_STATE = 6;
21
+ const SAMPLE_COUNT = 10;
22
+ const SAMPLES_START = 12;
23
+ const LEAD_ON = 1;
24
+
25
+ /** One sample would make the answer as long as a realtime parameters answer, so it could be one. */
26
+ const MIN_SAMPLES = 2;
27
+
28
+ /** Sample values the ring sends as markers rather than as the wave. */
29
+ const MARKERS = new Set([156, 246]);
30
+
31
+ /** The pulse wave one answer carries: raw, unitless and inverted, so systolic peaks are minima. */
32
+
33
+ const isSample = value => value !== undefined;
34
+
35
+ /** The whole mean of the samples either side, or the one neighbour at an edge, as the vendor's SDKs do. */
36
+ const neighbourMean = (raw, index) => {
37
+ const neighbours = [raw[index - 1], raw[index + 1]].filter(isSample);
38
+ const total = neighbours.reduce((sum, value) => sum + value, 0);
39
+ return Math.floor(total / neighbours.length);
40
+ };
41
+ const withoutMarkers = raw => raw.map((value, index) => MARKERS.has(value) ? neighbourMean(raw, index) : value);
42
+
43
+ /** An answer that ends right after a zero count streams the wave but had nothing new, as while the sensor acquires. */
44
+ const isEmptyWave = (payload, count) => count === 0 && payload.length === SAMPLES_START;
45
+
46
+ /** The pulse wave in a realtime wave answer; `undefined` for one sample, or fewer than it counts. */
47
+ const readPulseWave = frame => {
48
+ const payload = frame.slice(PAYLOAD_START, -CHECKSUM_BYTES);
49
+ const count = (0, _le16FromHex.le16FromHex)(payload, SAMPLE_COUNT);
50
+ const samples = payload.slice(SAMPLES_START, SAMPLES_START + count).map(_hexToByte.hexToByte);
51
+ const leadOn = (0, _hexToByte.hexToByte)(payload[LEAD_STATE] ?? "00") === LEAD_ON;
52
+ if (isEmptyWave(payload, count)) {
53
+ return {
54
+ leadOn,
55
+ samples: []
56
+ };
57
+ }
58
+ if (count < MIN_SAMPLES || samples.length < count) {
59
+ return undefined;
60
+ }
61
+ return {
62
+ leadOn,
63
+ samples: withoutMarkers(samples)
64
+ };
65
+ };
66
+ exports.readPulseWave = readPulseWave;
67
+ //# sourceMappingURL=lepu.pulse-wave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_hexToByte","require","_le16FromHex","PULSE_WAVE_COMMAND","exports","RATE_125_HZ","PULSE_WAVE_REQUEST","PULSE_WAVE_PERIOD_MS","PAYLOAD_START","CHECKSUM_BYTES","LEAD_STATE","SAMPLE_COUNT","SAMPLES_START","LEAD_ON","MIN_SAMPLES","MARKERS","Set","isSample","value","undefined","neighbourMean","raw","index","neighbours","filter","total","reduce","sum","Math","floor","length","withoutMarkers","map","has","isEmptyWave","payload","count","readPulseWave","frame","slice","le16FromHex","samples","hexToByte","leadOn"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.pulse-wave.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAI;;AAE/B;AACA,MAAME,WAAW,GAAG,IAAI;AACxB,MAAMC,kBAAqC,GAAAF,OAAA,CAAAE,kBAAA,GAAG,CAACD,WAAW,CAAC;AAC3D,MAAME,oBAAoB,GAAAH,OAAA,CAAAG,oBAAA,GAAG,CAAC;AAE9B,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,cAAc,GAAG,CAAC;;AAExB;AACA,MAAMC,UAAU,GAAG,CAAC;AACpB,MAAMC,YAAY,GAAG,EAAE;AACvB,MAAMC,aAAa,GAAG,EAAE;AAExB,MAAMC,OAAO,GAAG,CAAC;;AAEjB;AACA,MAAMC,WAAW,GAAG,CAAC;;AAErB;AACA,MAAMC,OAA4B,GAAG,IAAIC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;;AAExD;;AAUA,MAAMC,QAAQ,GAAIC,KAAyB,IAAsBA,KAAK,KAAKC,SAAS;;AAEpF;AACA,MAAMC,aAAa,GAAGA,CAACC,GAAsB,EAAEC,KAAa,KAAa;EACvE,MAAMC,UAAU,GAAG,CAACF,GAAG,CAACC,KAAK,GAAG,CAAC,CAAC,EAAED,GAAG,CAACC,KAAK,GAAG,CAAC,CAAC,CAAC,CAACE,MAAM,CAACP,QAAQ,CAAC;EACpE,MAAMQ,KAAK,GAAGF,UAAU,CAACG,MAAM,CAAC,CAACC,GAAG,EAAET,KAAK,KAAKS,GAAG,GAAGT,KAAK,EAAE,CAAC,CAAC;EAE/D,OAAOU,IAAI,CAACC,KAAK,CAACJ,KAAK,GAAGF,UAAU,CAACO,MAAM,C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+ exports.LepuRecorder = void 0;
7
+ var _lepuLiveEcgChunks = require("./lepu.live-ecg-chunks.js");
8
+ var _lepuRecordingWatch = require("./lepu.recording-watch.js");
9
+ var _lepuWaveform = require("./lepu.waveform.js");
10
+ /**
11
+ * Follows a recorder's open recording through its poll answers: reports its state, feeds the live
12
+ * trace while it records, and hands its samples over in chunks.
13
+ */
14
+ class LepuRecorder {
15
+ constructor(status, callbacks) {
16
+ this.status = status;
17
+ this.callbacks = callbacks;
18
+ this.watch = new _lepuRecordingWatch.LepuRecordingWatch(status, callbacks.onRecordingChanged);
19
+ this.chunks = status.waveform ? new _lepuLiveEcgChunks.LiveEcgChunks(status.waveform, callbacks.onChunk) : undefined;
20
+ }
21
+
22
+ /** Reads one poll answer; true when it is the first in the saved state, so the files are read. */
23
+ observe = pollAnswer => {
24
+ const saved = this.watch.observe(pollAnswer);
25
+ if (this.watch.isRecording()) {
26
+ this.record(pollAnswer);
27
+ } else if (this.watch.isOpen()) {
28
+ this.chunks?.flush();
29
+ } else {
30
+ this.chunks?.endRecording();
31
+ }
32
+ return saved;
33
+ };
34
+ isOpen = () => this.watch.isOpen();
35
+
36
+ /** Whether samples are being recorded, so every answer's samples count. */
37
+ isRecording = () => this.watch.isRecording();
38
+
39
+ /** Hands over what is collected, for a connection that is ending. */
40
+ flush = () => this.chunks?.flush();
41
+ record = pollAnswer => {
42
+ if (!this.status.waveform) {
43
+ return;
44
+ }
45
+ const samples = (0, _lepuWaveform.waveformSamples)(pollAnswer, this.status.waveform);
46
+ const at = new Date();
47
+ if (samples.length === 0) {
48
+ return;
49
+ }
50
+ this.callbacks.onSamples(samples, at);
51
+ this.chunks?.append(samples, at, this.watch.recordedSeconds());
52
+ };
53
+ }
54
+ exports.LepuRecorder = LepuRecorder;
55
+ //# sourceMappingURL=lepu.recorder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_lepuLiveEcgChunks","require","_lepuRecordingWatch","_lepuWaveform","LepuRecorder","constructor","status","callbacks","watch","LepuRecordingWatch","onRecordingChanged","chunks","waveform","LiveEcgChunks","onChunk","undefined","observe","pollAnswer","saved","isRecording","record","isOpen","flush","endRecording","samples","waveformSamples","at","Date","length","onSamples","append","recordedSeconds","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.recorder.ts"],"mappings":";;;;;;AAGA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAcA;AACA;AACA;AACA;AACA,MAAMG,YAAY,CAAC;EAIVC,WAAWA,CACCC,MAAuB,EACvBC,SAAgC,EACjD;IAAA,KAFiBD,MAAuB,GAAvBA,MAAuB;IAAA,KACvBC,SAAgC,GAAhCA,SAAgC;IAEjD,IAAI,CAACC,KAAK,GAAG,IAAIC,sCAAkB,CAACH,MAAM,EAAEC,SAAS,CAACG,kBAAkB,CAAC;IACzE,IAAI,CAACC,MAAM,GAAGL,MAAM,CAACM,QAAQ,GAAG,IAAIC,gCAAa,CAACP,MAAM,CAACM,QAAQ,EAAEL,SAAS,CAACO,OAAO,CAAC,GAAGC,SAAS;EACnG;;EAEA;EACOC,OAAO,GAAIC,UAA6B,IAAc;IAC3D,MAAMC,KAAK,GAAG,IAAI,CAACV,KAAK,CAACQ,OAAO,CAACC,UAAU,CAAC;IAE5C,IAAI,IAAI,CAACT,KAAK,CAACW,WAAW,CAAC,CAAC,EAAE;MAC5B,IAAI,CAACC,MAAM,CAACH,UAAU,CAAC;IACzB,CAAC,MAAM,IAAI,IAAI,CAACT,KAAK,CAACa,MAAM,CAAC,CAAC,EAAE;MAC9B,IAAI,CAACV,MAAM,EAAEW,KAAK,CAAC,CAAC;IACtB,CAAC,MAAM;MACL,IAAI,CAACX,MAAM,EAAEY,YAAY,CAAC,CAAC;IAC7B;IAEA,OAAOL,KAAK;EACd,CAAC;EAEMG,MAAM,GAAGA,CAAA,KAAe,IAAI,CAACb,KAAK,CAACa,MAAM,CAAC,CAAC;;EAElD;EACOF,WAAW,GAAGA,CAAA,KAAe,IAAI,CAACX,KAAK,CAACW,WAAW,CAAC,CAAC;;EAE5D;EACOG,KAAK,GAAGA,CAAA,KAAY,IAAI,CAACX,MAAM,EAAEW,KAAK,CAAC,CAAC;EAEvCF,MAAM,GAAIH,UAA6B,IAAW;IACxD,IAAI,CAAC,IAAI,CAACX,MAAM,CAACM,QAAQ,EAAE;MACzB;IACF;IAEA,MAAMY,OAAO,GAAG,IAAAC,6BAAe,EAACR,UAAU,EAAE,IAAI,CAACX,MAAM,CAACM,QAAQ,CAAC;IACjE,MAAMc,EAAE,GAAG,IAAIC,IAAI,CAAC,CAAC;IAErB,IAAIH,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;MACxB;IACF;IAEA,IAAI,CAACrB,SAAS,CAACsB,SAAS,CAACL,OAAO,EAAEE,EAAE,CAAC;IACrC,IAAI,CAACf,MAAM,EAAEmB,MAAM,CAACN,OAAO,EAAEE,EAAE,EAAE,IAAI,CAAClB,KAAK,CAACuB,eAAe,CAAC,CAAC,CAAC;EAChE,CAAC;AACH;AAACC,OAAA,CAAA5B,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LepuRecordingWatch = void 0;
7
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
8
+ var _le32FromHex = require("../../../utils/le-32-from-hex.js");
9
+ const LOW_NIBBLE = 0x0f;
10
+ const CLOSED = "closed";
11
+ /** Follows a recorder's open recording through its poll answers. */
12
+ class LepuRecordingWatch {
13
+ seconds = 0;
14
+ constructor(status, onRecordingChanged) {
15
+ this.status = status;
16
+ this.onRecordingChanged = onRecordingChanged;
17
+ }
18
+
19
+ /** Reads one poll answer; true when it is the first in the saved state, so the files are read. */
20
+ observe = pollAnswer => {
21
+ const previous = this.state;
22
+ this.state = (0, _hexToByte.hexToByte)(pollAnswer[this.status.byteIndex] ?? "00") & LOW_NIBBLE;
23
+ this.seconds = (0, _le32FromHex.le32FromHex)(pollAnswer, this.status.secondsByteIndex);
24
+ this.leadOffSince = this.isLeadOff() ? this.leadOffSince ?? new Date() : undefined;
25
+ this.report(this.recordingIn());
26
+ return this.state === this.status.savedState && previous !== this.status.savedState;
27
+ };
28
+
29
+ /** Whether a recording is open, so that stopping it means something. */
30
+ isOpen = () => this.isRecording() || this.isLeadOff();
31
+
32
+ /** Whether the electrodes have contact and samples are being recorded. */
33
+ isRecording = () => this.state === this.status.recordingState;
34
+
35
+ /** Seconds recorded, as of the last answer. */
36
+ recordedSeconds = () => this.seconds;
37
+ recordingIn = () => this.isOpen() ? {
38
+ seconds: this.seconds,
39
+ ...(this.leadOffSince ? {
40
+ leadOffSince: this.leadOffSince
41
+ } : {}),
42
+ storesOnStop: this.seconds >= this.status.minimumStoredSeconds
43
+ } : undefined;
44
+ isLeadOff = () => this.state === this.status.leadOffState;
45
+
46
+ /** Reports a change in what the app would act on, not every tick of the seconds. */
47
+ report = recording => {
48
+ const key = recording ? `${recording.leadOffSince !== undefined}:${recording.storesOnStop}` : CLOSED;
49
+ const changed = key !== (this.reported ?? CLOSED);
50
+ this.reported = key;
51
+ if (changed) {
52
+ this.onRecordingChanged(recording);
53
+ }
54
+ };
55
+ }
56
+ exports.LepuRecordingWatch = LepuRecordingWatch;
57
+ //# sourceMappingURL=lepu.recording-watch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_hexToByte","require","_le32FromHex","LOW_NIBBLE","CLOSED","LepuRecordingWatch","seconds","constructor","status","onRecordingChanged","observe","pollAnswer","previous","state","hexToByte","byteIndex","le32FromHex","secondsByteIndex","leadOffSince","isLeadOff","Date","undefined","report","recordingIn","savedState","isOpen","isRecording","recordingState","recordedSeconds","storesOnStop","minimumStoredSeconds","leadOffState","recording","key","changed","reported","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.recording-watch.ts"],"m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AO;EAE3CiB,WAAW,GAAGA,CAAA,KACpB,IAAI,CAACE,MAAM,CAAC,CAAC,GACT;IACEnB,OAAO,EAAE,IAAI,CAACA,OAAO;IACrB,IAAI,IAAI,CAACY,YAAY,GAAG;MAAEA,YAAY,EAAE,IAAI,CAACA;IAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IACjEW,YAAY,EAAE,IAAI,CAACvB,OAAO,IAAI,IAAI,CAACE,MAAM,CAACsB;EAC5C,CAAC,GACDT,SAAS;EAEPF,SAAS,GAAGA,CAAA,KAAe,IAAI,CAACN,KAAK,KAAK,IAAI,CAACL,MAAM,CAACuB,YAAY;;EAE1E;EACQT,MAAM,GAAIU,SAAgC,IAAW;IAC3D,MAAMC,GAAG,GAAGD,SAAS,GACjB,GAAGA,SAAS,CAACd,YAAY,KAAKG,SAAS,IAAIW,SAAS,CAACH,YAAY,EAAE,GACnEzB,MAAM;IAEV,MAAM8B,OAAO,GAAGD,GAAG,MAAM,IAAI,CAACE,QAAQ,IAAI/B,MAAM,CAAC;IAEjD,IAAI,CAAC+B,QAAQ,GAAGF,GAAG;IAEnB,IAAIC,OAAO,EAAE;MACX,IAAI,CAACzB,kBAAkB,CAACuB,SAAS,CAAC;IACpC;EACF,CAAC;AACH;AAACI,OAAA,CAAA/B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LepuSession = void 0;
7
+ var _bytesToHex = require("../../../utils/bytes-to-hex.js");
8
+ var _calculateCrc = require("../../../utils/calculate-crc-8.js");
9
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
10
+ var _viatomLepuCrypto = require("../viatom/viatom-lepu-crypto.js");
11
+ var _lepuFrame = require("./lepu.frame.js");
12
+ const PAYLOAD_LENGTH_INDEX = 5;
13
+ const BITS_PER_BYTE = 8;
14
+ const BYTE_MASK = 0xff;
15
+
16
+ /**
17
+ * One connection's AES key, from the moment the device hands it over in the handshake.
18
+ *
19
+ * Requests leave encrypted and replies reach every parser in plain text. Without a key, and
20
+ * for an empty payload, frames pass through unchanged, as the vendor's own client does.
21
+ */
22
+ class LepuSession {
23
+ begin = key => {
24
+ this.key = [...key];
25
+ };
26
+ end = () => {
27
+ this.key = undefined;
28
+ };
29
+ encryptFrame = frame => this.withPayload(frame, _viatomLepuCrypto.encryptLepuPayload) ?? [...frame];
30
+
31
+ /** The frame in plain text, or `undefined` when its payload does not decrypt. */
32
+ decryptFrame = frame => this.withPayload(frame, _viatomLepuCrypto.decryptLepuPayload);
33
+ withPayload = (frame, transform) => {
34
+ const payload = (0, _lepuFrame.lepuPayloadOf)(frame).map(_hexToByte.hexToByte);
35
+ if (!this.key || payload.length === 0) {
36
+ return [...frame];
37
+ }
38
+ const transformed = transform(payload, this.key);
39
+ return transformed && rebuildFrame(frame, transformed);
40
+ };
41
+ }
42
+
43
+ /** The same header with a new payload, its length and its checksum. */
44
+ exports.LepuSession = LepuSession;
45
+ const rebuildFrame = (frame, payload) => {
46
+ const body = [...frame.slice(0, PAYLOAD_LENGTH_INDEX), (0, _bytesToHex.byteToHex)(payload.length & BYTE_MASK), (0, _bytesToHex.byteToHex)(payload.length >> BITS_PER_BYTE), ...payload.map(_bytesToHex.byteToHex)];
47
+ return [...body, (0, _bytesToHex.byteToHex)((0, _calculateCrc.calculateCrc8)(body, body.length))];
48
+ };
49
+ //# sourceMappingURL=lepu.session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_bytesToHex","require","_calculateCrc","_hexToByte","_viatomLepuCrypto","_lepuFrame","PAYLOAD_LENGTH_INDEX","BITS_PER_BYTE","BYTE_MASK","LepuSession","begin","key","end","undefined","encryptFrame","frame","withPayload","encryptLepuPayload","decryptFrame","decryptLepuPayload","transform","payload","lepuPayloadOf","map","hexToByte","length","transformed","rebuildFrame","exports","body","slice","byteToHex","calculateCrc8"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/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kB,YAAY,GAAGA,CACnBZ,KAAwB,EACxBM,OAA0B,KACb;EACb,MAAMQ,IAAI,GAAG,CACX,GAAGd,KAAK,CAACe,KAAK,CAAC,CAAC,EAAExB,oBAAoB,CAAC,EACvC,IAAAyB,qBAAS,EAACV,OAAO,CAACI,MAAM,GAAGjB,SAAS,CAAC,EACrC,IAAAuB,qBAAS,EAACV,OAAO,CAACI,MAAM,IAAIlB,aAAa,CAAC,EAC1C,GAAGc,OAAO,CAACE,GAAG,CAACQ,qBAAS,CAAC,CAC1B;EAED,OAAO,CAAC,GAAGF,IAAI,EAAE,IAAAE,qBAAS,EAAC,IAAAC,2BAAa,EAACH,IAAI,EAAEA,IAAI,CAACJ,MAAM,CAAC,CAAC,CAAC;AAC/D,CAAC","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LepuStoredFiles = void 0;
7
+ var _lepuFileTransfer = require("./lepu.file-transfer.js");
8
+ /**
9
+ * The files a Lepu device holds, read only when asked.
10
+ *
11
+ * On connect their names are only listed, so a later `readNew` fetches what the device stored
12
+ * since; `readAll` is the app's explicit history sync. A file read once on a connection is not
13
+ * read again on it, and one whose reading the app took is not read again at all.
14
+ */
15
+ class LepuStoredFiles {
16
+ listedOnConnect = new Set();
17
+ read = new Set();
18
+ constructor(params) {
19
+ this.params = params;
20
+ }
21
+
22
+ /** Lists the files without opening any. */
23
+ listExisting = afterTransfer => this.transfer(afterTransfer, () => false, names => names.forEach(name => this.listedOnConnect.add(name)));
24
+
25
+ /** Reads the files stored since the connection listed them. */
26
+ readNew = afterTransfer => this.transfer(afterTransfer, name => !this.listedOnConnect.has(name) && this.isUnread(name));
27
+
28
+ /** Reads every stored file not read yet. */
29
+ readAll = afterTransfer => this.transfer(afterTransfer, this.isUnread);
30
+ isUnread = name => !this.read.has(name) && !this.params.deliveredFiles?.has(name) && (this.params.acceptFile?.(name) ?? true);
31
+ transfer = (afterTransfer, acceptFile, onFileList) => new _lepuFileTransfer.LepuFileTransfer({
32
+ ...this.params,
33
+ acceptFile,
34
+ afterTransfer,
35
+ onFileList: names => {
36
+ this.params.deliveredFiles?.keepListed(names);
37
+ onFileList?.(names);
38
+ },
39
+ onFile: file => {
40
+ this.read.add(file.name);
41
+ this.params.onFile(file, () => this.params.deliveredFiles?.add(file.name));
42
+ }
43
+ });
44
+ }
45
+ exports.LepuStoredFiles = LepuStoredFiles;
46
+ //# sourceMappingURL=lepu.stored-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_lepuFileTransfer","require","LepuStoredFiles","listedOnConnect","Set","read","constructor","params","listExisting","afterTransfer","transfer","names","forEach","name","add","readNew","has","isUnread","readAll","deliveredFiles","acceptFile","onFileList","LepuFileTransfer","keepListed","onFile","file","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.stored-files.ts"],"mappings":";;;;;;AAGA,IAAAA,iBAAA,GAAAC,OAAA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAAC;EACHC,eAAe,GAAG,IAAIC,GAAG,CAAS,CAAC;EACnCC,IAAI,GAAG,IAAID,GAAG,CAAS,CAAC;EAElCE,WAAWA,CAAkBC,MAA6B,EAAE;IAAA,KAA/BA,MAA6B,GAA7BA,MAA6B;EAAG;;EAEpE;EACOC,YAAY,GAAIC,aAA4B,IACjD,IAAI,CAACC,QAAQ,CAACD,aAAa,EAAE,MAAM,KAAK,EAAGE,KAAK,IAC9CA,KAAK,CAACC,OAAO,CAAEC,IAAI,IAAK,IAAI,CAACV,eAAe,CAACW,GAAG,CAACD,IAAI,CAAC,CACxD,CAAC;;EAEH;EACOE,OAAO,GAAIN,aAA4B,IAC5C,IAAI,CAACC,QAAQ,CACXD,aAAa,EACZI,IAAI,IAAK,CAAC,IAAI,CAACV,eAAe,CAACa,GAAG,CAACH,IAAI,CAAC,IAAI,IAAI,CAACI,QAAQ,CAACJ,IAAI,CACjE,CAAC;;EAEH;EACOK,OAAO,GAAIT,aAA4B,IAC5C,IAAI,CAACC,QAAQ,CAACD,aAAa,EAAE,IAAI,CAACQ,QAAQ,CAAC;EAErCA,QAAQ,GAAIJ,IAAY,IAC9B,CAAC,IAAI,CAACR,IAAI,CAACW,GAAG,CAACH,IAAI,CAAC,IACpB,CAAC,IAAI,CAACN,MAAM,CAACY,cAAc,EAAEH,GAAG,CAACH,IAAI,CAAC,KACrC,IAAI,CAACN,MAAM,CAACa,UAAU,GAAGP,IAAI,CAAC,IAAI,IAAI,CAAC;EAElCH,QAAQ,GAAGA,CACjBD,aAA4B,EAC5BW,UAAqC,EACrCC,UAA+C,KAE/C,IAAIC,kCAAgB,CAAC;IACnB,GAAG,IAAI,CAACf,MAAM;IACda,UAAU;IACVX,aAAa;IACbY,UAAU,EAAGV,KAAK,IAAK;MACrB,IAAI,CAACJ,MAAM,CAACY,cAAc,EAAEI,UAAU,CAACZ,KAAK,CAAC;MAC7CU,UAAU,GAAGV,KAAK,CAAC;IACrB,CAAC;IACDa,MAAM,EAAGC,IAAI,IAAK;MAChB,IAAI,CAACpB,IAAI,CAACS,GAAG,CAACW,IAAI,CAACZ,IAAI,CAAC;MACxB,IAAI,CAACN,MAAM,CAACiB,MAAM,CAACC,IAAI,EAAE,MAAM,IAAI,CAAClB,MAAM,CAACY,cAAc,EAAEL,GAAG,CAACW,IAAI,CAACZ,IAAI,CAAC,CAAC;IAC5E;EACF,CAAC,CAAC;AACN;AAACa,OAAA,CAAAxB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -27,10 +27,10 @@ var _checkmeProtocol = require("../checkme/checkme.protocol.js");
27
27
  * - **The payload layout.** Every product decodes differently, and a guessed offset yields
28
28
  * a plausible wrong reading rather than an error. Declared cases are the caller's.
29
29
  *
30
- * Some of these products negotiate encryption in the vendor app (`Bp2`, `Er2` and the
31
- * oximeters do; `Er1`, `Er3`, `Bp3` and `Lepod` do not). The SDK speaks the cleartext
32
- * protocol, which is what the BP2 already runs on in production, so a product that turns out
33
- * to require the handshake will identify itself and then stop rather than mis-report.
30
+ * A product whose advertisement offers or requires encryption gets the vendor's handshake on
31
+ * the standard protocol first (`withLepuEncryption`); the rest speak it in cleartext, as the
32
+ * BP2 does in production. The oxygen protocol has no handshake, so its declarations refuse an
33
+ * advertisement that requires one (`rejectEncryptionAtBytes`).
34
34
  */
35
35
 
36
36
  /**
@@ -210,12 +210,18 @@ const lepuDevice = params => {
210
210
  ...(params.pollIntervalMs === undefined ? {} : {
211
211
  pollIntervalMs: params.pollIntervalMs
212
212
  }),
213
+ ...(params.recordingStatus === undefined ? {} : {
214
+ recordingStatus: params.recordingStatus
215
+ }),
213
216
  ...(params.writeWithoutResponse === undefined ? {} : {
214
217
  writeWithoutResponse: params.writeWithoutResponse
215
218
  }),
216
219
  ...(params.setClockBeforeInfo === undefined ? {} : {
217
220
  setClockBeforeInfo: params.setClockBeforeInfo
218
221
  }),
222
+ ...(params.pulseWave === undefined ? {} : {
223
+ pulseWave: params.pulseWave
224
+ }),
219
225
  ...(params.clockSyncProtocol === undefined ? {} : {
220
226
  clockSyncProtocol: params.clockSyncProtocol
221
227
  })
@@ -1 +1 @@
1
- {"version":3,"names":["_preferredMtu","require","_defineCustomDevice","_checkmeProtocol","STANDARD_SERVICE","CHECKME_SERVICE","STANDARD_WRITE","CHECKME_WRITE","STANDARD_NOTIFY","CHECKME_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","PREFERRED_MTU","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","monitor","each","uuid","frame","minLengthBytes","caseSelectorBytes","undefined","cases","services","v2","defineCustomDevice","id","nameMatch","matchByService","stuckDataTimeoutMs","clockSync","sessionPolicy","lepu","startBytes","manufacturerDataProtocol","requestStartByte","rejectEncryptionAtBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","pollIntervalMs","writeWithoutResponse","setClockBeforeInfo","clockSyncProtocol","map","service","decorateReading","createFrameHandler"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AASA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAZA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,gBAAgB,GAAGC,gCAAe;AACxC,MAAMC,cAAc,GAAGC,8BAAa;AACpC,MAAMC,eAAe,GAAGC,+BAAc;;AAEtC;AACA,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AACxD,MAAMC,UAAU,GAAG,sCAAsC;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,sCAAsC;AAC3D,MAAMC,UAAU,GAAG,sCAAsC;AACzD,MAAMC,WAAW,GAAG,sCAAsC;;AAE1D;AACA,MAAMC,eAAe,GAAG,sCAAsC;AAC9D,MAAMC,aAAa,GAAG,sCAAsC;AAC5D,MAAMC,cAAc,GAAG,sCAAsC;;AAE7D;AACA;AACA,MAAMC,WAAW,GAAG,EAAE;;AAEtB;AACA,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,MAAMC,UAAU,GAAG,IAAI;AASvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EACrB;EACAE,QAAQ,E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MAAM,CAACgC,cAAc,KAAKtB,SAAS,GACnC,CAAC,CAAC,GACF;QAAEsB,cAAc,EAAEhC,MAAM,CAACgC;MAAe,CAAC,CAAC;MAC9C,IAAIhC,MAAM,CAACiC,oBAAoB,KAAKvB,SAAS,GACzC,CAAC,CAAC,GACF;QAAEuB,oBAAoB,EAAEjC,MAAM,CAACiC;MAAqB,CAAC,CAAC;MAC1D,IAAIjC,MAAM,CAACkC,kBAAkB,KAAKxB,SAAS,GACvC,CAAC,CAAC,GACF;QAAEwB,kBAAkB,EAAElC,MAAM,CAACkC;MAAmB,CAAC,CAAC;MACtD,IAAIlC,MAAM,CAACmC,iBAAiB,KAAKzB,SAAS,GACtC,CAAC,CAAC,GACF;QAAEyB,iBAAiB,EAAEnC,MAAM,CAACmC;MAAkB,CAAC;IACrD,CAAC;IACDvB,QAAQ,EAAEA,QAAQ,CAACwB,GAAG,CAAEC,OAAO,KAAM;MACnC,GAAGA,OAAO;MACVjC,OAAO,EAAEiC,OAAO,CAACjC,OAAO,CAACgC,GAAG,CAAE/B,IAAI,KAAM;QACtC,GAAGA,IAAI;QACPI,iBAAiB,EAAEJ,IAAI,CAACI,iBAAiB,IAAI,CAACX,YAAY;MAC5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD;IACE,IAAIE,MAAM,CAACsC,eAAe,KAAK5B,SAAS,GACpC,CAAC,CAAC,GACF;MAAE4B,eAAe,EAAEtC,MAAM,CAACsC;IAAgB,CAAC,CAAC;IAChD,IAAItC,MAAM,CAACuC,kBAAkB,KAAK7B,SAAS,GACvC,CAAC,CAAC,GACF;MAAE6B,kBAAkB,EAAEvC,MAAM,CAACuC;IAAmB,CAAC;EACvD,CACF,CAAC;AACH,CAAC;AAACpD,OAAA,CAAAY,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_preferredMtu","require","_defineCustomDevice","_checkmeProtocol","STANDARD_SERVICE","CHECKME_SERVICE","STANDARD_WRITE","CHECKME_WRITE","STANDARD_NOTIFY","CHECKME_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","PREFERRED_MTU","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","monitor","each","uuid","frame","minLengthBytes","caseSelectorBytes","undefined","cases","services","v2","defineCustomDevice","id","nameMatch","matchByService","stuckDataTimeoutMs","clockSync","sessionPolicy","lepu","startBytes","manufacturerDataProtocol","requestStartByte","rejectEncryptionAtBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","ecgFileDecoder","pollCommand","pollIntervalMs","recordingStatus","writeWithoutResponse","setClockBeforeInfo","pulseWave","clockSyncProtocol","map","service","decorateReading","createFrameHandler"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,OAAA;AAUA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAbA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,gBAAgB,GAAGC,gCAAe;AACxC,MAAMC,cAAc,GAAGC,8BAAa;AACpC,MAAMC,eAAe,GAAGC,+BAAc;;AAEtC;AACA,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AACxD,MAAMC,UAAU,GAAG,sCAAsC;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,sCAAsC;AAC3D,MAAM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OAAO;MACVnC,OAAO,EAAEmC,OAAO,CAACnC,OAAO,CAACkC,GAAG,CAAEjC,IAAI,KAAM;QACtC,GAAGA,IAAI;QACPI,iBAAiB,EAAEJ,IAAI,CAACI,iBAAiB,IAAI,CAACX,YAAY;MAC5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,EACD;IACE,IAAIE,MAAM,CAACwC,eAAe,KAAK9B,SAAS,GACpC,CAAC,CAAC,GACF;MAAE8B,eAAe,EAAExC,MAAM,CAACwC;IAAgB,CAAC,CAAC;IAChD,IAAIxC,MAAM,CAACyC,kBAAkB,KAAK/B,SAAS,GACvC,CAAC,CAAC,GACF;MAAE+B,kBAAkB,EAAEzC,MAAM,CAACyC;IAAmB,CAAC;EACvD,CACF,CAAC;AACH,CAAC;AAACtD,OAAA,CAAAY,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.waveformSamples = exports.millivoltsOf = void 0;
7
+ var _i16FromHex = require("../../../utils/i-16-from-hex.js");
8
+ var _le16FromHex = require("../../../utils/le-16-from-hex.js");
9
+ const SAMPLE_BYTES = 2;
10
+ const COUNT_BYTES = 2;
11
+ const CHECKSUM_BYTES = 1;
12
+
13
+ /** The raw sample counts a poll answer carries, never more than the frame holds. */
14
+ const waveformSamples = (pollAnswer, waveform) => {
15
+ const first = waveform.countByteIndex + COUNT_BYTES;
16
+ const declared = (0, _le16FromHex.le16FromHex)(pollAnswer, waveform.countByteIndex);
17
+ const available = Math.floor((pollAnswer.length - CHECKSUM_BYTES - first) / SAMPLE_BYTES);
18
+ return Array.from({
19
+ length: Math.max(0, Math.min(declared, available))
20
+ }, (_, index) => (0, _i16FromHex.i16FromHex)(pollAnswer, first + index * SAMPLE_BYTES));
21
+ };
22
+
23
+ /** One count in millivolts; the no-signal marker reads as 0. */
24
+ exports.waveformSamples = waveformSamples;
25
+ const millivoltsOf = (count, waveform) => count === waveform.noSignalCount ? 0 : count * waveform.millivoltsPerCount;
26
+ exports.millivoltsOf = millivoltsOf;
27
+ //# sourceMappingURL=lepu.waveform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_i16FromHex","require","_le16FromHex","SAMPLE_BYTES","COUNT_BYTES","CHECKSUM_BYTES","waveformSamples","pollAnswer","waveform","first","countByteIndex","declared","le16FromHex","available","Math","floor","length","Array","from","max","min","_","index","i16FromHex","exports","millivoltsOf","count","noSignalCount","millivoltsPerCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.waveform.ts"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,MAAME,YAAY,GAAG,CAAC;AACtB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,cAAc,GAAG,CAAC;;AAExB;AACA,MAAMC,eAAe,GAAGA,CAACC,UAA6B,EAAEC,QAAkB,KAAe;EACvF,MAAMC,KAAK,GAAGD,QAAQ,CAACE,cAAc,GAAGN,WAAW;EACnD,MAAMO,QAAQ,GAAG,IAAAC,wBAAW,EAACL,UAAU,EAAEC,QAAQ,CAACE,cAAc,CAAC;EACjE,MAAMG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAC,CAACR,UAAU,CAACS,MAAM,GAAGX,cAAc,GAAGI,KAAK,IAAIN,YAAY,CAAC;EAEzF,OAAOc,KAAK,CAACC,IAAI,CAAC;IAAEF,MAAM,EAAEF,IAAI,CAACK,GAAG,CAAC,CAAC,EAAEL,IAAI,CAACM,GAAG,CAACT,QAAQ,EAAEE,SAAS,CAAC;EAAE,CAAC,EAAE,CAACQ,CAAC,EAAEC,KAAK,KACjF,IAAAC,sBAAU,EAAChB,UAAU,EAAEE,KAAK,GAAGa,KAAK,GAAGnB,YAAY,CAAC,CAAC;AACzD,CAAC;;AAED;AAAAqB,OAAA,CAAAlB,eAAA,GAAAA,eAAA;AACA,MAAMmB,YAAY,GAAGA,CAACC,KAAa,EAAElB,QAAkB,KACrDkB,KAAK,KAAKlB,QAAQ,CAACmB,aAAa,GAAG,CAAC,GAAGD,KAAK,GAAGlB,QAAQ,CAACoB,kBAAkB;AAACJ,OAAA,CAAAC,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -69,7 +69,6 @@ const viatomBpMonitor = (advertisedName, params) => {
69
69
  clockSync: "supported",
70
70
  clockSyncProtocol: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
71
71
  fileTransfer: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
72
- rejectEncryptionAtBytes: [4],
73
72
  pollCommand: RT_DATA,
74
73
  pollIntervalMs: 200,
75
74
  minLengthBytes: MIN_LENGTH_BYTES,
@@ -1 +1 @@
1
- {"version":3,"names":["_le32FromHex","require","_defineCustomDevice","_bp2Files","_lepuNameMatch","_lepuTransports","_tmbBpHandler","_viatomBpEcgHandler","_viatomBpMonitorCases","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","recordedAtFromLocalSeconds","le32FromHex","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","clockSync","clockSyncProtocol","fileTransfer","rejectEncryptionAtBytes","pollCommand","pollIntervalMs","minLengthBytes","caseSelectorBytes","cases","BP3_ECG_CASES","BP3_CASES","BP2_CASES","BP2_ECG_CASES","map","each","decorateReading","createFrameHandler","createViatomFrameHandler","expectedDeviceTypes","exports","bp2aMonitor","bp2tMonitor","bp2wMonitor","bp2vMonitor","lpBp2wMonitor","TMB_SERVICE","TMB_WRITE","TMB_ACK","TMB_NOTIFY","TMB_INDICATE","tmbBpMonitor","defineCustomDevice","stuckDataTimeoutMs","preferredMtu","tmb","serviceUuid","writeUuid","ackUuid","services","uuid","monitor","selector","kind","createTmbBloodPressureFrameHandler","TMB_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAEA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AAdA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMQ,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,iBAAiB,GAAG,EAAE;AAE5B,MAAMC,kBAA0C,GAAGA,CAACC,OAAO,EAAEC,KAAK,KAAK;EACrE,MAAMC,UAAU,GAAGC,MAAM,CAACC,QAAQ,CAACH,KAAK,GAAGJ,iBAAiB,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;EAE1E,IAAIK,UAAU,KAAK,CAAC,EAAE;IACpB,MAAM,IAAIG,KAAK,CACb,+DAA+DH,UAAU,CACtEI,QAAQ,CAAC,EAAE,CAAC,CACZC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EACrB,CAAC;EACH;EAEA,MAAMC,UAAU,GACdP,KAAK,IAAIA,KAAK,CAACQ,MAAM,IAAIX,iBAAiB,GAAG,CAAC,GAC1C,IAAAY,oCAA0B,EAAC,IAAAC,wBAAW,EAAC,CAAC,GAAGV,KAAK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N,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,CACR;;AAED;AACA,MAAMqD,eAAkC,GAAAzB,OAAA,CAAAyB,eAAA,GAAG,CACzC,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,CACX","ignoreList":[]}
1
+ {"version":3,"names":["_le32FromHex","require","_defineCustomDevice","_bp2Files","_lepuNameMatch","_lepuTransports","_tmbBpHandler","_viatomBpEcgHandler","_viatomBpMonitorCases","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","recordedAtFromLocalSeconds","le32FromHex","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","lepuDevice","id","toLowerCase","replace","nameMatch","lepuNameMatch","clockSync","clockSyncProtocol","fileTransfer","pollCommand","pollIntervalMs","minLengthBytes","caseSelectorBytes","cases","BP3_ECG_CASES","BP3_CASES","BP2_CASES","BP2_ECG_CASES","map","each","decorateReading","createFrameHandler","createViatomFrameHandler","expectedDeviceTypes","exports","bp2aMonitor","bp2tMonitor","bp2wMonitor","bp2vMonitor","lpBp2wMonitor","TMB_SERVICE","TMB_WRITE","TMB_ACK","TMB_NOTIFY","TMB_INDICATE","tmbBpMonitor","defineCustomDevice","stuckDataTimeoutMs","preferredMtu","tmb","serviceUuid","writeUuid","ackUuid","services","uuid","monitor","selector","kind","createTmbBloodPressureFrameHandler","TMB_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAA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;IACxBW,SAAS,EAAEV,SAAS;IACpBW,OAAO,EAAEV;EACX,CAAC;EACDW,QAAQ,EAAE,CACR;IACEC,IAAI,EAAEd,WAAW;IACjBe,OAAO,EAAE,CACP;MACED,IAAI,EAAEX,UAAU;MAChBrB,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtB/B,KAAK,EAAE;QAAE8B,cAAc,EAAE;MAAE,CAAC;MAC5BE,KAAK,EAAE,CAAC;QAAEiC,QAAQ,EAAE,GAAG;QAAEC,IAAI,EAAE;MAAQ,CAAC;IAC1C,CAAC,EACD;MACEH,IAAI,EAAEV,YAAY;MAClBtB,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtB/B,KAAK,EAAE;QAAE8B,cAAc,EAAE;MAAE,CAAC;MAC5BE,KAAK,EAAE,CAAC;QAAEiC,QAAQ,EAAE,GAAG;QAAEC,IAAI,EAAE;MAAQ,CAAC;IAC1C,CAAC;EAEL,CAAC;AAEL,CAAC,EACD;EAAE1B,kBAAkB,EAAE2B;AAAmC,CAC3D,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXAxB,OAAA,CAAAW,YAAA,GAAAA,YAAA;AAYA,MAAMtC,eAAkC,GAAA2B,OAAA,CAAA3B,eAAA,GAAG,CACzC,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,CACR;;AAED;AACA,MAAMoD,eAAkC,GAAAzB,OAAA,CAAAyB,eAAA,GAAG,CACzC,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,CACX","ignoreList":[]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.recordedAtFromViatomFileName = exports.decodeViatomEcgRecording = exports.VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_MILLIVOLTS_PER_COUNT = void 0;
7
- var _hexToByte = require("../../../utils/hex-to-byte.js");
8
7
  /** ECG sample rate in hertz. */
9
8
  const VIATOM_ECG_SAMPLE_RATE_HZ = exports.VIATOM_ECG_SAMPLE_RATE_HZ = 125;
10
9
 
@@ -26,29 +25,85 @@ const recordedAtFromViatomFileName = name => {
26
25
  }
27
26
  return validDate(2000 + Number(digits.slice(0, 2)), Number(digits.slice(2, 4)), Number(digits.slice(4, 6)), Number(digits.slice(6, 8)), Number(digits.slice(8, 10)), Number(digits.slice(10, 12)));
28
27
  };
28
+
29
+ /** The file version and reserved bytes that precede the waveform. */
29
30
  exports.recordedAtFromViatomFileName = recordedAtFromViatomFileName;
30
- const readUInt32LittleEndian = (bytes, from) => (0, _hexToByte.hexToByte)(bytes[from] ?? "0") | (0, _hexToByte.hexToByte)(bytes[from + 1] ?? "0") << 8 | (0, _hexToByte.hexToByte)(bytes[from + 2] ?? "0") << 16 | (0, _hexToByte.hexToByte)(bytes[from + 3] ?? "0") << 24;
31
-
32
- /** Decodes the official ER1/ER2 file container and its signed ECG samples. */
33
- const decodeViatomEcgRecording = content => {
34
- if (content.length <= 30) {
35
- return {
36
- samples: [],
37
- duration: 0
38
- };
31
+ const FILE_HEAD_BYTES = 10;
32
+
33
+ /** The bytes after the waveform, opened by the recording time in seconds. */
34
+ const FILE_TAIL_BYTES = 20;
35
+
36
+ /** The count Viatom stores where the recorder had no signal. */
37
+ const NO_SIGNAL_COUNT = 0x7fff;
38
+
39
+ /** A large step's extra byte counts on from the largest one-byte step. */
40
+ const LARGE_STEP_BASE = 127;
41
+
42
+ /** How far the decoded length may stray from the recorded time before a file is refused. */
43
+ const RECORDED_TIME_TOLERANCE_SECONDS = 1;
44
+
45
+ /** A decoded ER1/ER2 recording. */
46
+
47
+ const emptyRecording = () => ({
48
+ samples: [],
49
+ duration: 0
50
+ });
51
+ const toInt8 = byte => byte << 24 >> 24;
52
+ const toInt16 = value => value << 16 >> 16;
53
+ const ONE_BYTE_STEP = {
54
+ width: 1,
55
+ next: (current, bytes, at) => current + toInt8(bytes[at] ?? 0)
56
+ };
57
+
58
+ /** Marker bytes that escape the one-byte step. */
59
+ const ESCAPED_STEPS = new Map([[0x80, {
60
+ width: 3,
61
+ next: (_current, bytes, at) => (bytes[at + 1] ?? 0) | (bytes[at + 2] ?? 0) << 8
62
+ }], [0x7f, {
63
+ width: 2,
64
+ next: (current, bytes, at) => current + (bytes[at + 1] ?? 0) + LARGE_STEP_BASE
65
+ }], [0x81, {
66
+ width: 2,
67
+ next: (current, bytes, at) => current - (bytes[at + 1] ?? 0) - LARGE_STEP_BASE
68
+ }]]);
69
+
70
+ /** Expands Viatom's delta-compressed waveform into signed counts. */
71
+ const decompressWaveform = bytes => {
72
+ const counts = [];
73
+ let current = 0;
74
+ let at = 0;
75
+ while (at < bytes.length) {
76
+ const step = ESCAPED_STEPS.get(bytes[at] ?? 0) ?? ONE_BYTE_STEP;
77
+ if (at + step.width > bytes.length) {
78
+ break;
79
+ }
80
+ current = toInt16(step.next(current, bytes, at));
81
+ counts.push(current);
82
+ at += step.width;
83
+ }
84
+ return counts;
85
+ };
86
+ const readUInt32LittleEndian = (bytes, from) => ((bytes[from] ?? 0) | (bytes[from + 1] ?? 0) << 8 | (bytes[from + 2] ?? 0) << 16 | (bytes[from + 3] ?? 0) << 24) >>> 0;
87
+ const matchesRecordedTime = (sampleCount, seconds) => seconds > 0 && Math.abs(sampleCount - seconds * VIATOM_ECG_SAMPLE_RATE_HZ) <= RECORDED_TIME_TOLERANCE_SECONDS * VIATOM_ECG_SAMPLE_RATE_HZ;
88
+ const toMillivolts = count => count === NO_SIGNAL_COUNT ? 0 : count * VIATOM_ECG_MILLIVOLTS_PER_COUNT;
89
+
90
+ /**
91
+ * Decodes an ER1/ER2 recording. A file whose waveform does not last as long as its tail
92
+ * records is returned empty, because that file is in a format this decoder does not read.
93
+ */
94
+ const decodeViatomEcgRecording = bytes => {
95
+ if (bytes.length <= FILE_HEAD_BYTES + FILE_TAIL_BYTES) {
96
+ return emptyRecording();
39
97
  }
40
- const waveStart = 10;
41
- const waveEnd = content.length - 20;
42
- const samples = [];
43
- for (let index = waveStart; index + 1 < waveEnd; index += 2) {
44
- const raw = (0, _hexToByte.hexToByte)(content[index] ?? "0") | (0, _hexToByte.hexToByte)(content[index + 1] ?? "0") << 8;
45
- const signed = raw & 0x8000 ? raw - 0x10000 : raw;
46
- samples.push(raw === 0x7fff ? 0 : signed * VIATOM_ECG_MILLIVOLTS_PER_COUNT);
98
+ const tailStart = bytes.length - FILE_TAIL_BYTES;
99
+ const duration = readUInt32LittleEndian(bytes, tailStart);
100
+ const counts = decompressWaveform(bytes.subarray(FILE_HEAD_BYTES, tailStart));
101
+ if (!matchesRecordedTime(counts.length, duration)) {
102
+ return emptyRecording();
47
103
  }
48
- const recordedSeconds = readUInt32LittleEndian(content, content.length - 20);
49
104
  return {
50
- samples,
51
- duration: recordedSeconds || samples.length / VIATOM_ECG_SAMPLE_RATE_HZ
105
+ samples: counts.map(toMillivolts),
106
+ duration
52
107
  };
53
108
  };
54
109
  exports.decodeViatomEcgRecording = decodeViatomEcgRecording;
@@ -1 +1 @@
1
- {"version":3,"names":["_hexToByte","require","VIATOM_ECG_SAMPLE_RATE_HZ","exports","VIATOM_ECG_MILLIVOLTS_PER_COUNT","validDate","year","month","day","hour","minute","second","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","undefined","recordedAtFromViatomFileName","name","digits","match","length","Number","slice","readUInt32LittleEndian","bytes","from","hexToByte","decodeViatomEcgRecording","content","samples","duration","waveStart","waveEnd","index","raw","signed","push","recordedSeconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,yBAAy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AI,EAAE,EAAE;IACxB,OAAO;MAAES,OAAO,EAAE,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAC;EACrC;EAEA,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,OAAO,GAAGJ,OAAO,CAACR,MAAM,GAAG,EAAE;EACnC,MAAMS,OAAiB,GAAG,EAAE;EAE5B,KAAK,IAAII,KAAK,GAAGF,SAAS,EAAEE,KAAK,GAAG,CAAC,GAAGD,OAAO,EAAEC,KAAK,IAAI,CAAC,EAAE;IAC3D,MAAMC,GAAG,GACP,IAAAR,oBAAS,EAACE,OAAO,CAACK,KAAK,CAAC,IAAI,GAAG,CAAC,GAC/B,IAAAP,oBAAS,EAACE,OAAO,CAACK,KAAK,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAE;IAE7C,MAAME,MAAM,GAAGD,GAAG,GAAG,MAAM,GAAGA,GAAG,GAAG,OAAO,GAAGA,GAAG;IAEjDL,OAAO,CAACO,IAAI,CACVF,GAAG,KAAK,MAAM,GAAG,CAAC,GAAGC,MAAM,GAAGpC,+BAChC,CAAC;EACH;EAEA,MAAMsC,eAAe,GAAGd,sBAAsB,CAACK,OAAO,EAAEA,OAAO,CAACR,MAAM,GAAG,EAAE,CAAC;EAE5E,OAAO;IACLS,OAAO;IACPC,QAAQ,EAAEO,eAAe,IAAIR,OAAO,CAACT,MAAM,GAAGvB;EAChD,CAAC;AACH,CAAC;AAACC,OAAA,CAAA6B,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["VIATOM_ECG_SAMPLE_RATE_HZ","exports","VIATOM_ECG_MILLIVOLTS_PER_COUNT","validDate","year","month","day","hour","minute","second","date","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","undefined","recordedAtFromViatomFileName","name","digits","match","length","Number","slice","FILE_HEAD_BYTES","FILE_TAIL_BYTES","NO_SIGNAL_COUNT","LARGE_STEP_BASE","RECORDED_TIME_TOLERANCE_SECONDS","emptyRecording","samples","duration","toInt8","byte","toInt16","value","ONE_BYTE_STEP","width","next","current","bytes","at","ESCAPED_STEPS","Map","_current","decompressWaveform","counts","step","get","push","readUInt32LittleEndian","from","matchesRecordedTime","sampleCount","seconds","Math","abs","toMillivolts","count","decodeViatomEcgRecording","tailStart","subarray","map"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;;;;;AAAA;AACA,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,GAAG;;AAErC;AACA,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,QAAQ;AAEhD,MAAMC,SAAS,GAAGA,CAChBC,IAAY,EACZC,KAAa,EACbC,GAAW,EACXC,IAAY,EACZC,MAAc,EACdC,MAAc,KACO;EACrB,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACP,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAEC,GAAG,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAE,CAAC,CAAC;EAEpE,OAAOC,IAAI,CAACE,WAAW,CAAC,CAAC,KAAKR,IAAI,IAChCM,IAAI,CAACG,QAAQ,CAAC,CAAC,KAAKR,KAAK,GAAG,CAAC,IAC7BK,IAAI,CAACI,OAAO,CAAC,CAAC,KAAKR,GAAG,IACtBI,IAAI,CAACK,QAAQ,CAAC,CAAC,KAAKR,IAAI,IACxBG,IAAI,CAACM,UAAU,CAAC,CAAC,KAAKR,MAAM,IAC5BE,IAAI,CAACO,UAAU,CAAC,CAAC,KAAKR,MAAM,GAC1BC,IAAI,GACJQ,SAAS;AACf,CAAC;;AAED;AACA,MAAMC,4BAA4B,GAAIC,IAAY,IAAuB;EACvE,MAAMC,MAAM,GAAGD,IAAI,CAACE,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;EAE/C,IAAI,CAACD,MAAM,EAAE;IACX,OAAOH,SAAS;EAClB;EAEA,IAAIG,MAAM,CAACE,MAAM,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