@ovok/native 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
  2. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
  3. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
  4. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
  5. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +23 -22
  6. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  7. package/lib/commonjs/modules/bt-device/constants/device-list-items.js +36 -0
  8. package/lib/commonjs/modules/bt-device/constants/device-list-items.js.map +1 -1
  9. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +38 -0
  10. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
  11. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +45 -0
  12. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
  13. package/lib/commonjs/modules/bt-device/constants/supported-devices.js +212 -42
  14. package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
  15. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +88 -0
  16. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
  17. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +15 -8
  18. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  19. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
  20. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  21. package/lib/commonjs/modules/bt-management/index.js +55 -0
  22. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +10 -4
  24. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  25. package/lib/commonjs/modules/bt-management/services/bt-manager.js +43 -5
  26. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +2 -0
  28. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +2 -1
  30. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +24 -0
  32. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js +8 -1
  34. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +6 -2
  36. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  37. package/lib/commonjs/modules/bt-management/services/device-creator.js +23 -8
  38. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  39. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js +50 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +78 -127
  44. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +60 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +74 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
  52. package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
  53. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +3 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +7 -3
  56. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +5 -0
  58. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  59. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +3 -1
  60. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  61. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -1
  62. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  63. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +43 -5
  64. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  65. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js +13 -1
  66. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  67. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +6 -3
  68. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -1
  69. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  70. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +84 -38
  71. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  72. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +14 -2
  73. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  74. package/lib/commonjs/modules/bt-management/services/devices/spo/oxyfit.device.js +18 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/spo/oxyfit.device.js.map +1 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
  77. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  78. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.device.js +78 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.device.js.map +1 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.frame-reader.js +83 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.frame-reader.js.map +1 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.sequencer.js +60 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.sequencer.js.map +1 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
  85. package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
  86. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
  87. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
  88. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -1
  89. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  90. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +35 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
  92. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
  93. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  94. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +2 -1
  95. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
  96. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +54 -39
  97. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  98. package/lib/commonjs/modules/bt-management/types/device-measurement-map.js.map +1 -1
  99. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +1 -0
  100. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  101. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +3 -0
  102. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  103. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +11 -2
  104. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  105. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +3 -1
  106. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  107. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +3 -1
  108. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  109. package/lib/commonjs/modules/data-sync/utils/health-units.js +22 -0
  110. package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -0
  111. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
  112. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
  113. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
  114. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
  115. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +3 -2
  116. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  117. package/lib/module/modules/bt-device/constants/device-list-items.js +36 -0
  118. package/lib/module/modules/bt-device/constants/device-list-items.js.map +1 -1
  119. package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +35 -0
  120. package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
  121. package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +41 -0
  122. package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
  123. package/lib/module/modules/bt-device/constants/supported-devices.js +202 -32
  124. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  125. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +83 -0
  126. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
  127. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +15 -8
  128. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  129. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  130. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  131. package/lib/module/modules/bt-management/index.js +5 -0
  132. package/lib/module/modules/bt-management/index.js.map +1 -1
  133. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +10 -4
  134. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  135. package/lib/module/modules/bt-management/services/bt-manager.js +45 -6
  136. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  137. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +2 -0
  138. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  139. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +2 -1
  140. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  141. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +24 -0
  142. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  143. package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js +8 -1
  144. package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -1
  145. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +6 -2
  146. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  147. package/lib/module/modules/bt-management/services/device-creator.js +23 -8
  148. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  149. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
  150. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
  151. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js +40 -0
  152. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
  153. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +59 -109
  154. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
  155. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
  156. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  157. package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +56 -0
  158. package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
  159. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +69 -0
  160. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
  161. package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
  162. package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
  163. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +3 -0
  164. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  165. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +7 -3
  166. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  167. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +5 -0
  168. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  169. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +3 -1
  170. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  171. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -1
  172. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  173. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +42 -5
  174. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  175. package/lib/module/modules/bt-management/services/devices/frame-parser.js +13 -1
  176. package/lib/module/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  177. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +6 -3
  178. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -1
  179. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +2 -1
  180. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  181. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +84 -38
  182. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  183. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +14 -2
  184. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  185. package/lib/module/modules/bt-management/services/devices/spo/oxyfit.device.js +14 -0
  186. package/lib/module/modules/bt-management/services/devices/spo/oxyfit.device.js.map +1 -0
  187. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
  188. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  189. package/lib/module/modules/bt-management/services/devices/uebe/mysense.device.js +73 -0
  190. package/lib/module/modules/bt-management/services/devices/uebe/mysense.device.js.map +1 -0
  191. package/lib/module/modules/bt-management/services/devices/uebe/mysense.frame-reader.js +78 -0
  192. package/lib/module/modules/bt-management/services/devices/uebe/mysense.frame-reader.js.map +1 -0
  193. package/lib/module/modules/bt-management/services/devices/uebe/mysense.sequencer.js +55 -0
  194. package/lib/module/modules/bt-management/services/devices/uebe/mysense.sequencer.js.map +1 -0
  195. package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
  196. package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
  197. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
  198. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
  199. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -1
  200. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  201. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +31 -0
  202. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
  203. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
  204. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  205. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +2 -1
  206. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
  207. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +54 -39
  208. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  209. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  210. package/lib/module/modules/bt-management/types/integrated-devices.js +1 -0
  211. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  212. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +3 -0
  213. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  214. package/lib/module/modules/data-sync/services/managers/data-processor.js +11 -2
  215. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  216. package/lib/module/modules/data-sync/utils/get-samples-from-health.js +3 -1
  217. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  218. package/lib/module/modules/data-sync/utils/get-total-samples-count.js +3 -1
  219. package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  220. package/lib/module/modules/data-sync/utils/health-units.js +17 -0
  221. package/lib/module/modules/data-sync/utils/health-units.js.map +1 -0
  222. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
  225. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +33 -0
  228. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
  230. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +43 -22
  232. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
  234. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +5 -0
  238. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +5 -1
  240. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +19 -2
  242. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts +1 -1
  249. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
  251. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
  253. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
  255. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
  257. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
  259. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
  261. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
  263. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  266. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -0
  272. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts +1 -0
  274. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +6 -1
  276. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +3 -2
  278. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +10 -51
  280. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +9 -2
  282. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts +9 -0
  284. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -2
  286. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts +15 -0
  288. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts +8 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts +17 -0
  292. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
  294. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -0
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +1 -1
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +1 -1
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +5 -8
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
  312. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +2 -1
  314. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +10 -0
  316. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +5 -0
  318. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +5 -4
  320. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +1 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +3 -0
  330. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
  331. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
  332. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
  333. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
  334. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  335. package/lib/typescript/module/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
  336. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +33 -0
  337. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
  338. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
  339. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
  340. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +43 -22
  341. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  342. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
  343. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
  344. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  345. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  346. package/lib/typescript/module/src/modules/bt-management/index.d.ts +5 -0
  347. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  348. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +5 -1
  349. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  350. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +19 -2
  351. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  352. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  353. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  354. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  355. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -1
  356. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  357. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts +1 -1
  358. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  359. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
  360. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
  361. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
  362. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
  363. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
  364. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
  365. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
  366. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  367. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
  368. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
  369. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
  370. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
  371. package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
  372. package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
  373. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  374. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  375. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  376. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  377. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  378. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  379. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  380. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -0
  381. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  382. package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts +1 -0
  383. package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  384. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +6 -1
  385. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -1
  386. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +3 -2
  387. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  388. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +10 -51
  389. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  390. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +9 -2
  391. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  392. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts +9 -0
  393. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts.map +1 -0
  394. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -2
  395. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  396. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts +15 -0
  397. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts.map +1 -0
  398. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts +8 -0
  399. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts.map +1 -0
  400. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts +17 -0
  401. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts.map +1 -0
  402. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
  403. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
  404. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
  405. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
  406. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
  407. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  408. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -0
  409. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
  410. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +1 -1
  411. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  412. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +1 -1
  413. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
  414. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +5 -8
  415. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  416. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
  417. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  418. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
  419. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  420. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
  421. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  422. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +2 -1
  423. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  424. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +10 -0
  425. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  426. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +5 -0
  427. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -1
  428. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +5 -4
  429. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  430. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
  431. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  432. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +1 -0
  433. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  434. package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  435. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  436. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  437. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  438. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +3 -0
  439. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
  440. package/package.json +5 -3
@@ -5,40 +5,28 @@ import { LepuCommand } from "./lepu.commands.js";
5
5
  import { parseLepuDeviceInfo } from "./lepu.device-info.js";
6
6
  import { describeLepuResponseType, isLepuSuccess } from "./lepu.response-type.js";
7
7
  const COMMAND_INDEX = 1;
8
+ const VIATOM_OXYGEN_INFO = 0x14;
8
9
 
9
- /**
10
- * Asks a Lepu device what it is before sending it anything that acts.
11
- *
12
- * The family shares one frame format, one checksum and one opcode space, but not one
13
- * meaning: `0x08` polls realtime data on a BP2, starts a blood-pressure measurement on an
14
- * AirBp and starts an ECG on a Lepod. A frame built for the wrong device is therefore
15
- * perfectly well-formed - the CRC is computed the same way on every one of them - so
16
- * nothing in the protocol catches a driver bound to the wrong hardware. What comes back is
17
- * a cuff inflating on someone's arm because a name matched during a scan.
18
- *
19
- * `GET_INFO` is the one command that cannot cause that: it is generic, inert, and answered
20
- * identically family-wide. So it goes first, and everything else waits on its reply.
21
- *
22
- * A declaration that names the models it was written for is refused permanently when the
23
- * device answers with a different one. A declaration that names none is identified by the
24
- * advertised name it already matched, which is the basis the vendor's own SDK binds every
25
- * one of its products on; it is asked what it is anyway, and the answer reported, because
26
- * that is the only place these model numbers exist - the vendor never reads the field back,
27
- * so there is no table of them to copy.
28
- *
29
- * A reply that never arrives leaves the gate closed and nothing sent, which the data
30
- * processor's stuck-data timeout reports and disconnects on. That is the watchdog for this
31
- * too - the protocol has no retry of its own, so a dropped reply is recovered by
32
- * reconnecting rather than by asking again.
33
- */
10
+ /** Identifies a device before sending it a model-specific command. */
34
11
  export class LepuIdentityGate {
35
12
  isIdentified = false;
36
13
  isRefused = false;
37
14
  constructor(params) {
38
15
  this.params = params;
39
16
  }
40
- initialCommands = () => [this.commandFor(LepuCommand.GET_INFO)];
17
+ initialCommands = () => {
18
+ if (this.params.protocol === "viatom-oxygen") {
19
+ const command = this.params.setClockBeforeInfo ? this.commandFor(0x16, oxyClockPayload()) : this.commandFor(VIATOM_OXYGEN_INFO);
20
+ this.pendingCommand = this.params.setClockBeforeInfo ? 0x16 : VIATOM_OXYGEN_INFO;
21
+ return [command];
22
+ }
23
+ this.pendingCommand = LepuCommand.GET_INFO;
24
+ return [this.commandFor(LepuCommand.GET_INFO)];
25
+ };
41
26
  nextCommand = frame => {
27
+ if (this.params.protocol === "viatom-oxygen") {
28
+ return this.nextViatomOxygenCommand(frame);
29
+ }
42
30
  if (this.isRefused) {
43
31
  return undefined;
44
32
  }
@@ -48,16 +36,7 @@ export class LepuIdentityGate {
48
36
  return this.admit(frame);
49
37
  };
50
38
 
51
- /**
52
- * Decides on the reply to `GET_INFO`.
53
- *
54
- * A frame that is not that reply leaves the gate as it was rather than provoking another
55
- * command, because the only command outstanding is the one still being waited on.
56
- *
57
- * A reply that is that command but carries an error type is refused rather than parsed.
58
- * The payload of an error is the reason for it, so reading a model number out of it would
59
- * identify the hardware from an error code.
60
- */
39
+ /** Decides on the reply to the generic `GET_INFO` command. */
61
40
  admit = frame => {
62
41
  if (hexToByte(frame[COMMAND_INDEX] ?? "0") !== LepuCommand.GET_INFO) {
63
42
  return undefined;
@@ -90,9 +69,76 @@ export class LepuIdentityGate {
90
69
 
91
70
  /** Nothing, for a declaration that asks what the device is and stops there. */
92
71
  poll = () => this.params.pollCommand === undefined ? undefined : [this.commandFor(this.params.pollCommand)];
93
- commandFor = command => ({
72
+ commandFor = (command, payload = [], delayBeforeWriteMs) => ({
94
73
  ...this.params.write,
95
- frame: this.params.builder.build(command)
74
+ frame: this.params.builder.build(command, payload),
75
+ ...(this.params.writeWithoutResponse ? {
76
+ withoutResponse: true
77
+ } : {}),
78
+ ...(delayBeforeWriteMs === undefined ? {} : {
79
+ delayBeforeWriteMs
80
+ })
96
81
  });
82
+ nextViatomOxygenCommand = frame => {
83
+ if (this.isRefused || this.pendingCommand === undefined) {
84
+ return undefined;
85
+ }
86
+ const status = hexToByte(frame[1] ?? "ff");
87
+ if (status !== 0) {
88
+ if (this.pendingCommand === 0x17 && this.isIdentified) {
89
+ return [this.commandFor(0x17, [], 3_000)];
90
+ }
91
+ return this.refuse(`the device rejected command 0x${this.pendingCommand.toString(16).padStart(2, "0")} with status 0x${status.toString(16).padStart(2, "0")}`);
92
+ }
93
+ switch (this.pendingCommand) {
94
+ case 0x16:
95
+ this.pendingCommand = VIATOM_OXYGEN_INFO;
96
+ return [this.commandFor(VIATOM_OXYGEN_INFO)];
97
+ case VIATOM_OXYGEN_INFO:
98
+ {
99
+ const info = parseViatomOxygenDeviceInfo(frame);
100
+ if (!info) {
101
+ return this.refuse("the device answered INFO without a JSON model number");
102
+ }
103
+ this.params.onIdentified?.(info);
104
+ if (this.params.expectedDeviceTypes.length > 0 && !this.params.expectedDeviceTypes.includes(info.deviceType)) {
105
+ return this.refuse(`the hardware reported model ${info.deviceType}, which this declaration was not written for`);
106
+ }
107
+ this.isIdentified = true;
108
+ this.pendingCommand = 0x17;
109
+ return [this.commandFor(0x17, [], 1_000)];
110
+ }
111
+ case 0x17:
112
+ return [this.commandFor(0x17, [], 1_000)];
113
+ default:
114
+ return undefined;
115
+ }
116
+ };
97
117
  }
118
+ const oxyClockPayload = () => {
119
+ const now = new Date();
120
+ const pad = value => String(value).padStart(2, "0");
121
+ const payload = JSON.stringify({
122
+ SetTIME: `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())},${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`
123
+ });
124
+ return Array.from(new TextEncoder().encode(payload));
125
+ };
126
+ const parseViatomOxygenDeviceInfo = frame => {
127
+ try {
128
+ const text = frame.slice(7, -1).map(byte => String.fromCharCode(hexToByte(byte))).join("").replace(/\0+$/, "");
129
+ const info = JSON.parse(text);
130
+ const deviceType = Number(info.Model);
131
+ if (!Number.isInteger(deviceType)) {
132
+ return undefined;
133
+ }
134
+ return {
135
+ deviceType,
136
+ protocolMaxLength: 0,
137
+ branchCode: String(info.Branch ?? ""),
138
+ serialNumber: String(info.SN ?? info.SerialNumber ?? "")
139
+ };
140
+ } catch {
141
+ return undefined;
142
+ }
143
+ };
98
144
  //# sourceMappingURL=lepu.identity-gate.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["hexToByte","LepuCommand","parseLepuDeviceInfo","describeLepuResponseType","isLepuSuccess","COMMAND_INDEX","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","commandFor","GET_INFO","nextCommand","frame","undefined","poll","admit","refuse","info","onIdentified","pollCommand","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","command","write","builder","build"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AAGtD,SAASC,WAAW,QAAQ,oBAAiB;AAC7C,SAAyBC,mBAAmB,QAAQ,uBAAoB;AACxE,SACEC,wBAAwB,EACxBC,aAAa,QACR,yBAAsB;AAmC7B,MAAMC,aAAa,GAAG,CAAC;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAA6B;EAChDC,YAAY,GAAG,KAAK;EACpBC,SAAS,GAAG,KAAK;EAElBC,WAAWA,CAAkBC,MAA8B,EAAE;IAAA,KAAhCA,MAA8B,GAA9BA,MAA8B;EAAG;EAE9DC,eAAe,GAAGA,CAAA,KAAgC,CACvD,IAAI,CAACC,UAAU,CAACX,WAAW,CAACY,QAAQ,CAAC,CACtC;EAEMC,WAAW,GAChBC,KAAwB,IACiB;IACzC,IAAI,IAAI,CAACP,SAAS,EAAE;MAClB,OAAOQ,SAAS;IAClB;IAEA,IAAI,IAAI,C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,IAAI,CAACE,MAAM,CAACoB,SAAS,CAACD,MAAM,CAAC;IAE7B,OAAOb,SAAS;EAClB,CAAC;;EAED;EACQC,IAAI,GAAGA,CAAA,KACb,IAAI,CAACP,MAAM,CAACY,WAAW,KAAKN,SAAS,GACjCA,SAAS,GACT,CAAC,IAAI,CAACJ,UAAU,CAAC,IAAI,CAACF,MAAM,CAACY,WAAW,CAAC,CAAC;EAExCV,UAAU,GAAImB,OAAe,KAAqB;IACxD,GAAG,IAAI,CAACrB,MAAM,CAACsB,KAAK;IACpBjB,KAAK,EAAE,IAAI,CAACL,MAAM,CAACuB,OAAO,CAACC,KAAK,CAACH,OAAO;EAC1C,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["hexToByte","LepuCommand","parseLepuDeviceInfo","describeLepuResponseType","isLepuSuccess","COMMAND_INDEX","VIATOM_OXYGEN_INFO","LepuIdentityGate","isIdentified","isRefused","constructor","params","initialCommands","protocol","command","setClockBeforeInfo","commandFor","oxyClockPayload","pendingCommand","GET_INFO","nextCommand","frame","nextViatomOxygenCommand","undefined","poll","admit","refuse","info","onIdentified","pollCommand","isNarrowed","expectedDeviceTypes","length","includes","deviceType","branchCode","reason","onRefused","payload","delayBeforeWriteMs","write","builder","build","writeWithoutResponse","withoutResponse","status","toString","padStart","parseViatomOxygenDeviceInfo","now","Date","pad","value","String","JSON","stringify","SetTIME","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","Array","from","TextEncoder","encode","text","slice","map","byte","fromCharCode","join","replace","parse","Number","Model","isInteger","protocolMaxLength","Branch","serialNumber","SN","SerialNumber"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AAGtD,SAASC,WAAW,QAAQ,oBAAiB;AAC7C,SAAyBC,mBAAmB,QAAQ,uBAAoB;AACxE,SACEC,wBAAwB,EACxBC,aAAa,QACR,yBAAsB;AA2B7B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;
108
108
  const lepuDevice = params => {
109
109
  const transport = lepuTransports[params.transport ?? "standard"];
110
+ const viatomOxygen = params.protocol === "viatom-oxygen";
110
111
  return defineCustomDevice({
111
- id: params.id,
112
+ id: params.id ?? "lepu-device",
112
113
  nameMatch: params.nameMatch,
113
114
  stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? DEFAULT_STUCK_TIMEOUT_MS,
114
115
  preferredMtu: transport.preferredMtu,
115
116
  lepu: {
116
- startBytes: [START_BYTE],
117
+ protocol: params.protocol,
118
+ startBytes: [viatomOxygen ? "55" : START_BYTE],
119
+ requestStartByte: viatomOxygen ? "aa" : START_BYTE,
117
120
  write: {
118
121
  serviceUuid: transport.serviceUuid,
119
122
  characteristicUuid: transport.writeUuid
120
123
  },
121
124
  expectedDeviceTypes: [...(params.expectedDeviceTypes ?? [])],
125
+ ...(params.fileTransfer === undefined ? {} : {
126
+ fileTransfer: params.fileTransfer
127
+ }),
122
128
  ...(params.pollCommand === undefined ? {} : {
123
129
  pollCommand: params.pollCommand
130
+ }),
131
+ ...(params.writeWithoutResponse === undefined ? {} : {
132
+ writeWithoutResponse: params.writeWithoutResponse
133
+ }),
134
+ ...(params.setClockBeforeInfo === undefined ? {} : {
135
+ setClockBeforeInfo: params.setClockBeforeInfo
124
136
  })
125
137
  },
126
138
  services: [{
@@ -1 +1 @@
1
- {"version":3,"names":["defineCustomDevice","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","pollCommand","undefined","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,sCAAmC;;AAEtE;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,MAAMC,gBAAgB,GAAG,sCAAsC;AAC/D,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;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,MAAMC,aAAa,GAAG,GAAG;;AAEzB;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,GAAG;EACrBC,QAAQ,EAAE;IACRC,WAAW,EAAElB,gBAAgB;IAC7BmB,UAAU,EAAEjB,eAAe;IAC3BkB,SAAS,EAAEnB,cAAc;IACzBoB,YAAY,EAAET;EAChB,CAAC;EAED;EACAU,gBAAgB,EAAE;IAChBJ,WAAW,EAAElB,gBAAgB;IAC7BmB,UAAU,EAAEjB,eAAe;IAC3BkB,SAAS,EAAEnB,cAAc;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O,EAAE,CACP;QACED,IAAI,EAAEZ,SAAS,CAACV,UAAU;QAC1BwB,KAAK,EAAE;UAAEC,cAAc,EAAEhB,MAAM,CAACgB;QAAe,CAAC;QAChDC,iBAAiB,EAAEjB,MAAM,CAACiB,iBAAiB,IAAI,CAACnB,YAAY,CAAC;QAC7DoB,KAAK,EAAElB,MAAM,CAACkB;MAChB,CAAC;IAEL,CAAC;EAEL,CAAC,CAAC;AACJ,CAAC;AAED,SAASnB,UAAU,EAAEX,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["defineCustomDevice","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","viatomOxygen","protocol","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","requestStartByte","write","characteristicUuid","expectedDeviceTypes","fileTransfer","undefined","pollCommand","writeWithoutResponse","setClockBeforeInfo","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,sCAAmC;;AAEtE;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,MAAMC,gBAAgB,GAAG,sCAAsC;AAC/D,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;AACA,MAAMC,WAAW,GAAG,sC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AEjB,MAAM,CAACiB;MAAmB,CAAC;IACvD,CAAC;IACDC,QAAQ,EAAE,CACR;MACEC,IAAI,EAAElB,SAAS,CAACX,WAAW;MAC3B8B,OAAO,EAAE,CACP;QACED,IAAI,EAAElB,SAAS,CAACV,UAAU;QAC1B8B,KAAK,EAAE;UAAEC,cAAc,EAAEtB,MAAM,CAACsB;QAAe,CAAC;QAChDC,iBAAiB,EAAEvB,MAAM,CAACuB,iBAAiB,IAAI,CAACzB,YAAY,CAAC;QAC7D0B,KAAK,EAAExB,MAAM,CAACwB;MAChB,CAAC;IAEL,CAAC;EAEL,CAAC,CAAC;AACJ,CAAC;AAED,SAASzB,UAAU,EAAEX,cAAc","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ import { CustomDevice } from "../custom/custom.device.js";
4
+ import { viatomOximeter } from "../viatom/viatom.oximeters.js";
5
+
6
+ /** Keeps the legacy IntegratedDevices.SPO2 entry on the working Viatom protocol. */
7
+ export class OxyfitDevice extends CustomDevice {
8
+ constructor(device, params) {
9
+ super(device, params, viatomOximeter("Oxyfit", {
10
+ id: "integrated-oxyfit"
11
+ }));
12
+ }
13
+ }
14
+ //# sourceMappingURL=oxyfit.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CustomDevice","viatomOximeter","OxyfitDevice","constructor","device","params","id"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/spo/oxyfit.device.ts"],"mappings":";;AAKA,SAASA,YAAY,QAAQ,4BAAyB;AACtD,SAASC,cAAc,QAAQ,+BAA4B;;AAE3D;AACA,OAAO,MAAMC,YAAY,SAASF,YAAY,CAAC;EACtCG,WAAWA,CAChBC,MAAc,EACdC,MAAkD,EAClD;IACA,KAAK,CACHD,MAAM,EACNC,MAAM,EACNJ,cAAc,CAAC,QAAQ,EAAE;MAAEK,EAAE,EAAE;IAAoB,CAAC,CACtD,CAAC;EACH;AACF","ignoreList":[]}
@@ -13,8 +13,9 @@ const sigUuid = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
13
13
  * flag combination puts it and with the frame length that shape guarantees.
14
14
  */
15
15
  const declareProfile = (params, profile) => defineCustomDevice({
16
- id: params.id,
16
+ id: params.id ?? `standard-${profile.measurementTypeKey}`,
17
17
  nameMatch: params.nameMatch,
18
+ matchByService: true,
18
19
  stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
19
20
  services: [{
20
21
  uuid: sigUuid(profile.service),
@@ -1 +1 @@
1
- {"version":3,"names":["defineCustomDevice","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","declareProfile","params","profile","id","nameMatch","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","measurementTypeKey","fields","littleEndian","name","byteIndexes","unit","encoding","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;AAIA,SAASA,kBAAkB,QAAQ,sCAAmC;;AAEtE;AACA,MAAMC,qBAAqB,GAAG,MAAM;AAyCpC,MAAMC,OAAO,GAAIC,QAAgB,IAC/B,OAAOA,QAAQ,8BAA8B;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,MAA4B,EAC5BC,OAAoB,KAEpBN,kBAAkB,CAAC;EACjBO,EAAE,EAAEF,MAAM,CAACE,EAAE;EACbC,SAAS,EAAEH,MAAM,CAACG,SAAS;EAC3BC,kBAAkB,EAAEJ,MAAM,CAACI,kBAAkB,IAAIR,qBAAqB;EACtES,QAAQ,EAAE,CACR;IACEC,IAAI,EAAET,OAAO,CAACI,OAAO,CAACM,OAAO,CAAC;IAC9BC,OAAO,EAAE,CACP;MACEF,IAAI,EAAET,OAAO,CAACI,OAAO,CAACQ,cAAc,CAAC;MACrCC,KAAK,EAAE;QAAEC,cAAc,EAAEV,OAAO,CAACU;MAAe,CAAC;MACjDC,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtBC,KAAK,EAAEZ,OAAO,CAACa,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;QACzC,MAAMC,QAAQ,GAAGhB,OAAO,CAACiB,cAAc,GAAGF,QAAQ,CAAC;QAEnD,OAAO;UACLA,QAAQ;UACRG,IAAI,EAAE,QAAiB;UACvBC,kBAAkB,EAAEnB,OAAO,CAACmB,kBAAkB;UAC9CC,MAAM,EAAE,CAAC,GAAGpB,OAAO,CAACoB,MAAM,EAAE,IAAIJ,QAAQ,EAAEI,MAAM,IAAI,EAAE,CAAC,CAAC;UACxD,IAAIJ,QAAQ,GACR;YAAEN,cAAc,EAAEM,QAAQ,CAACN;UAAe,CAAC,GAC3C,CAAC,CAAC;QACR,CAAC;MACH,CAAC;IACH,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC;AAEJ,MAAMW,YAAY,GAAGA,CACnBC,IAAY,EACZC,WAAqB,EACrBC,IAAY,EACZC,QAAqC,MAChB;EACrBH,IAAI;EACJC,WAAW;EACXG,SAAS,EAAE,QAAQ;EACnBD,QAAQ;EACRD;AACF,CAAC,CAAC;AAEF,SAAS1B,cAAc,EAAEuB,YAAY,EAAEzB,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["defineCustomDevice","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","declareProfile","params","profile","id","measurementTypeKey","nameMatch","matchByService","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","fields","littleEndian","name","byteIndexes","unit","encoding","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;AAIA,SAASA,kBAAkB,QAAQ,sCAAmC;;AAEtE;AACA,MAAMC,qBAAqB,GAAG,MAAM;AAyCpC,MAAMC,OAAO,GAAIC,QAAgB,IAC/B,OAAOA,QAAQ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ACnBD,QAAQ;EACRD;AACF,CAAC,CAAC;AAEF,SAAS3B,cAAc,EAAEwB,YAAY,EAAE1B,OAAO","ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey } from "@ovok/core";
4
+ import { defineCustomDevice } from "../../custom/define-custom-device.js";
5
+ import { CustomDevice } from "../custom/custom.device.js";
6
+ import { MySenseFrameReader } from "./mysense.frame-reader.js";
7
+ import { MySenseSequencer } from "./mysense.sequencer.js";
8
+ const SERVICE = "0000fff0-0000-1000-8000-00805f9b34fb";
9
+ const NOTIFY = "0000fff1-0000-1000-8000-00805f9b34fb";
10
+ const definition = defineCustomDevice({
11
+ id: "cyclotest-mysense",
12
+ nameMatch: "mySense",
13
+ stuckDataTimeoutMs: 30_000,
14
+ services: [{
15
+ uuid: SERVICE,
16
+ monitor: [{
17
+ uuid: NOTIFY,
18
+ frame: {
19
+ minLengthBytes: 17
20
+ },
21
+ caseSelectorBytes: [4],
22
+ cases: [{
23
+ selector: "a1",
24
+ kind: "idle",
25
+ minLengthBytes: 20,
26
+ description: "mySense greeting"
27
+ }, {
28
+ selector: "a3",
29
+ kind: "result",
30
+ minLengthBytes: 17,
31
+ repeatedRecords: {
32
+ recordBytes: 9,
33
+ from: 8
34
+ },
35
+ measurementTypeKey: MeasurementTypeKey.temperature,
36
+ description: "mySense stored temperature history",
37
+ fields: [{
38
+ name: "bodyTemp",
39
+ byteIndexes: [5, 6],
40
+ encoding: "decimal-pair",
41
+ unit: "Cel",
42
+ decimals: 2
43
+ }]
44
+ }]
45
+ }]
46
+ }]
47
+ });
48
+ export class MySenseDevice extends CustomDevice {
49
+ reportedHistory = false;
50
+ constructor(device, params) {
51
+ super(device, params, definition);
52
+ this.frameReader = new MySenseFrameReader();
53
+ this.createCommandSequencer = () => {
54
+ this.reportedHistory = false;
55
+ return new MySenseSequencer({
56
+ onGreeting: frame => {
57
+ this.deviceData.sn = frame.slice(5, 11).join(":");
58
+ }
59
+ });
60
+ };
61
+ }
62
+ shouldReportDependentResult = data => {
63
+ if (data.parsingCase.caseValue !== "a3") {
64
+ return true;
65
+ }
66
+ if (this.reportedHistory) {
67
+ return false;
68
+ }
69
+ this.reportedHistory = true;
70
+ return true;
71
+ };
72
+ }
73
+ //# sourceMappingURL=mysense.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","defineCustomDevice","CustomDevice","MySenseFrameReader","MySenseSequencer","SERVICE","NOTIFY","definition","id","nameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases","selector","kind","description","repeatedRecords","recordBytes","from","measurementTypeKey","temperature","fields","name","byteIndexes","encoding","unit","decimals","MySenseDevice","reportedHistory","constructor","device","params","frameReader","createCommandSequencer","onGreeting","deviceData","sn","slice","join","shouldReportDependentResult","data","parsingCase","caseValue"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/mysense.device.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAQ/C,SAASC,kBAAkB,QAAQ,sCAAmC;AACtE,SAASC,YAAY,QAAQ,4BAAyB;AAEtD,SAASC,kBAAkB,QAAQ,2BAAwB;AAC3D,SAASC,gBAAgB,QAAQ,wBAAqB;AAEtD,MAAMC,OAAO,GAAG,sCAAsC;AACtD,MAAMC,MAAM,GAAG,sCAAsC;AAMrD,MAAMC,UAAU,GAAGN,kBAAkB,CAAC;EACpCO,EAAE,EAAE,mBAAmB;EACvBC,SAAS,EAAE,SAAS;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,QAAQ,EAAE,CACR;IACEC,IAAI,EAAEP,OAAO;IACbQ,OAAO,EAAE,CACP;MACED,IAAI,EAAEN,MAAM;MACZQ,KAAK,EAAE;QAAEC,cAAc,EAAE;MAAG,CAAC;MAC7BC,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtBC,KAAK,EAAE,CACL;QACEC,QAAQ,EAAE,IAAI;QACdC,IAAI,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AAE;MACxB,OAAO,KAAK;IACd;IAEA,IAAI,CAACA,eAAe,GAAG,IAAI;IAE3B,OAAO,IAAI;EACb,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ import { FrameReadStatus } from "../../../types/frame-read-status.js";
4
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
5
+ const START = "4d";
6
+ const HEADER_BYTES = 4;
7
+ const MAX_FRAME_BYTES = 512;
8
+ const A3 = 0xa3;
9
+ const byteAt = (frame, index) => hexToByte(frame[index] ?? "0");
10
+
11
+ /** Reads mySense frames by their big-endian length, independent of notification boundaries. */
12
+ export class MySenseFrameReader {
13
+ readFrame(buffer) {
14
+ const start = buffer.findIndex(byte => byte.toLowerCase() === START);
15
+ if (start === -1) {
16
+ return {
17
+ status: FrameReadStatus.INCOMPLETE,
18
+ consumedBytes: Math.max(0, buffer.length - 1)
19
+ };
20
+ }
21
+ if (start + HEADER_BYTES > buffer.length) {
22
+ return {
23
+ status: FrameReadStatus.INCOMPLETE,
24
+ consumedBytes: start
25
+ };
26
+ }
27
+ const payloadLength = byteAt(buffer, start + 2) << 8 | byteAt(buffer, start + 3);
28
+ const frameLength = HEADER_BYTES + payloadLength;
29
+ if (payloadLength < 2 || frameLength > MAX_FRAME_BYTES) {
30
+ return {
31
+ status: FrameReadStatus.CORRUPT,
32
+ consumedBytes: start + 1
33
+ };
34
+ }
35
+ if (start + frameLength > buffer.length) {
36
+ return {
37
+ status: FrameReadStatus.INCOMPLETE,
38
+ consumedBytes: start
39
+ };
40
+ }
41
+ const frame = buffer.slice(start, start + frameLength);
42
+ if (!this.isValid(frame)) {
43
+ return {
44
+ status: FrameReadStatus.CORRUPT,
45
+ consumedBytes: start + 1
46
+ };
47
+ }
48
+ return {
49
+ status: FrameReadStatus.COMPLETE,
50
+ consumedBytes: start + frameLength,
51
+ frame
52
+ };
53
+ }
54
+ isValid(frame) {
55
+ const declared = byteAt(frame, frame.length - 1);
56
+ const actual = frame.slice(0, -1).reduce((sum, _, index, bytes) => sum + byteAt(bytes, index) & 0xff, 0);
57
+ if (declared !== actual) {
58
+ return false;
59
+ }
60
+ if (byteAt(frame, 4) !== A3) {
61
+ return true;
62
+ }
63
+ const count = byteAt(frame, 6) << 8 | byteAt(frame, 7);
64
+ const recordsStart = 8;
65
+ if (frame.length !== recordsStart + count * 9 + 1) {
66
+ return false;
67
+ }
68
+ for (let record = 0; record < count; record++) {
69
+ const from = recordsStart + record * 9;
70
+ const recordSum = frame.slice(from, from + 8).reduce((sum, _, index, bytes) => sum + byteAt(bytes, index) & 0xff, 0);
71
+ if (recordSum !== byteAt(frame, from + 8)) {
72
+ return false;
73
+ }
74
+ }
75
+ return true;
76
+ }
77
+ }
78
+ //# sourceMappingURL=mysense.frame-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FrameReadStatus","hexToByte","START","HEADER_BYTES","MAX_FRAME_BYTES","A3","byteAt","frame","index","MySenseFrameReader","readFrame","buffer","start","findIndex","byte","toLowerCase","status","INCOMPLETE","consumedBytes","Math","max","length","payloadLength","frameLength","CORRUPT","slice","isValid","COMPLETE","declared","actual","reduce","sum","_","bytes","count","recordsStart","record","from","recordSum"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/mysense.frame-reader.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,eAAe,GAAG,GAAG;AAC3B,MAAMC,EAAE,GAAG,IAAI;AAEf,MAAMC,MAAM,GAAGA,CAACC,KAAwB,EAAEC,KAAa,KACrDP,SAAS,CAACM,KAAK,CAACC,KAAK,CAAC,IAAI,GAAG,CAAC;;AAEhC;AACA,OAAO,MAAMC,kBAAkB,CAAwB;EAC9CC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGD,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GzB,MAAM,CAAC2B,KAAK,EAAEzB,KAAK,CAAC,GAAI,IAAI,EAAE,CAAC,CAAC;MAE3E,IAAI8B,SAAS,KAAKhC,MAAM,CAACC,KAAK,EAAE8B,IAAI,GAAG,CAAC,CAAC,EAAE;QACzC,OAAO,KAAK;MACd;IACF;IAEA,OAAO,IAAI;EACb;AACF","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
4
+ const SERVICE = "0000fff0-0000-1000-8000-00805f9b34fb";
5
+ const WRITE = "0000fff2-0000-1000-8000-00805f9b34fb";
6
+ const START = 0x4d;
7
+ const DEVICE_ROLE = 0x61;
8
+ const APP_ROLE = 0xfc;
9
+ const REQUEST = 0xa1;
10
+ const HISTORY = 0xa3;
11
+ const byte = value => (value & 0xff).toString(16).padStart(2, "0");
12
+ const frameFor = (role, opcode, data) => {
13
+ const length = 1 + data.length + 1;
14
+ const frame = [START, role, length >> 8 & 0xff, length & 0xff, opcode, ...data];
15
+ const sum = frame.reduce((total, value) => total + value & 0xff, 0);
16
+ return [...frame, sum].map(byte);
17
+ };
18
+ const nowData = () => {
19
+ const now = new Date();
20
+ return [now.getFullYear() % 100, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), 0x0f];
21
+ };
22
+ /** Answers the greeting, then acknowledges each valid history frame exactly once. */
23
+ export class MySenseSequencer {
24
+ normalDisconnect = false;
25
+ constructor(params) {
26
+ this.params = params;
27
+ }
28
+ initialCommands = () => [];
29
+ nextCommand = frame => {
30
+ if (hexToByte(frame[0] ?? "0") !== START || hexToByte(frame[1] ?? "0") !== DEVICE_ROLE) {
31
+ return undefined;
32
+ }
33
+ switch (hexToByte(frame[4] ?? "0")) {
34
+ case REQUEST:
35
+ this.params.onGreeting(frame);
36
+ this.normalDisconnect = true;
37
+ return [this.commandFor(frameFor(APP_ROLE, REQUEST, nowData()))];
38
+ case HISTORY:
39
+ {
40
+ const count = hexToByte(frame[6] ?? "0") << 8 | hexToByte(frame[7] ?? "0");
41
+ this.normalDisconnect = true;
42
+ return [this.commandFor(frameFor(APP_ROLE, HISTORY, [count >> 8, count & 0xff]))];
43
+ }
44
+ default:
45
+ return undefined;
46
+ }
47
+ };
48
+ isNormalDisconnect = () => this.normalDisconnect;
49
+ commandFor = frame => ({
50
+ serviceUuid: SERVICE,
51
+ characteristicUuid: WRITE,
52
+ frame
53
+ });
54
+ }
55
+ //# sourceMappingURL=mysense.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["hexToByte","SERVICE","WRITE","START","DEVICE_ROLE","APP_ROLE","REQUEST","HISTORY","byte","value","toString","padStart","frameFor","role","opcode","data","length","frame","sum","reduce","total","map","nowData","now","Date","getFullYear","getMonth","getDate","getHours","getMinutes","MySenseSequencer","normalDisconnect","constructor","params","initialCommands","nextCommand","undefined","onGreeting","commandFor","count","isNormalDisconnect","serviceUuid","characteristicUuid"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/mysense.sequencer.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,OAAO,GAAG,sCAAsC;AACtD,MAAMC,KAAK,GAAG,sCAAsC;AACpD,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,QAAQ,GAAG,IAAI;AACrB,MAAMC,OAAO,GAAG,IAAI;AACpB,MAAMC,OAAO,GAAG,IAAI;AAEpB,MAAMC,IAAI,GAAIC,KAAa,IAAa,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAEpF,MAAMC,QAAQ,GAAGA,CAACC,IAAY,EAAEC,MAAc,EAAEC,IAAuB,KAAe;EACpF,MAAMC,MAAM,GAAG,CAAC,GAAGD,IAAI,CAACC,MAAM,GAAG,CAAC;EAElC,MAAMC,KAAK,GAAG,CACZd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KAAK,CAAC;QAC7B,IAAI,CAACc,gBAAgB,GAAG,IAAI;QAE5B,OAAO,CAAC,IAAI,CAACO,UAAU,CAAC1B,QAAQ,CAACP,QAAQ,EAAEC,OAAO,EAAEgB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;MAElE,KAAKf,OAAO;QAAE;UACZ,MAAMgC,KAAK,GAAIvC,SAAS,CAACiB,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,GAAIjB,SAAS,CAACiB,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;UAE5E,IAAI,CAACc,gBAAgB,GAAG,IAAI;UAE5B,OAAO,CACL,IAAI,CAACO,UAAU,CAAC1B,QAAQ,CAACP,QAAQ,EAAEE,OAAO,EAAE,CAACgC,KAAK,IAAI,CAAC,EAAEA,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CACzE;QACH;MAEA;QACE,OAAOH,SAAS;IACpB;EACF,CAAC;EAEMI,kBAAkB,GAAGA,CAAA,KAAe,IAAI,CAACT,gBAAgB;EAExDO,UAAU,GAAIrB,KAAwB,KAAqB;IACjEwB,WAAW,EAAExC,OAAO;IACpByC,kBAAkB,EAAExC,KAAK;IACzBe;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -12,7 +12,7 @@ const VISOMAT_COMFORT_SOFT_BT_NAME_MATCH = /^visomat\s+comfort\s+soft\s+bt$/i;
12
12
  * pairing flow.
13
13
  */
14
14
  const visomatComfortSoftBtMonitor = params => standardBloodPressureDevice({
15
- id: params.id,
15
+ id: params.id ?? "visomat-comfort-soft-bt",
16
16
  nameMatch: params.nameMatch ?? VISOMAT_COMFORT_SOFT_BT_NAME_MATCH,
17
17
  ...(params.stuckDataTimeoutMs === undefined ? {} : {
18
18
  stuckDataTimeoutMs: params.stuckDataTimeoutMs
@@ -1 +1 @@
1
- {"version":3,"names":["standardBloodPressureDevice","VISOMAT_COMFORT_SOFT_BT_NAME_MATCH","visomatComfortSoftBtMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA,MAAMC,kCAAkC,GAAG,kCAAkC;AAc7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAC/BC,MAAkC,IAElCH,2BAA2B,CAAC;EAC1BI,EAAE,EAAED,MAAM,CAACC,EAAE;EACbC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIJ,kCAAkC;EACjE,IAAIE,MAAM,CAACG,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEH,MAAM,CAACG;EAAmB,CAAC;AACvD,CAAC,CAAC;AAEJ,SACEL,kCAAkC,EAClCC,2BAA2B","ignoreList":[]}
1
+ {"version":3,"names":["standardBloodPressureDevice","VISOMAT_COMFORT_SOFT_BT_NAME_MATCH","visomatComfortSoftBtMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA,MAAMC,kCAAkC,GAAG,kCAAkC;AAc7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAC/BC,MAAkC,IAElCH,2BAA2B,CAAC;EAC1BI,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,yBAAyB;EAC1CC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIJ,kCAAkC;EACjE,IAAIE,MAAM,CAACG,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEH,MAAM,CAACG;EAAmB,CAAC;AACvD,CAAC,CAAC;AAEJ,SACEL,kCAAkC,EAClCC,2BAA2B","ignoreList":[]}
@@ -19,7 +19,7 @@ import { standardBloodPressureDevice } from "../standard-gatt/standard-gatt.devi
19
19
  const BPU_26 = "BPU26";
20
20
  const BPW_26 = "BPW26";
21
21
  const verovalCompactMonitor = (advertisedName, params) => standardBloodPressureDevice({
22
- id: params.id,
22
+ id: params.id ?? `veroval-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
23
23
  nameMatch: params.nameMatch ?? new RegExp(`^${advertisedName}$`, "i"),
24
24
  ...(params.stuckDataTimeoutMs === undefined ? {} : {
25
25
  stuckDataTimeoutMs: params.stuckDataTimeoutMs
@@ -1 +1 @@
1
- {"version":3,"names":["standardBloodPressureDevice","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","id","nameMatch","RegExp","stuckDataTimeoutMs","undefined","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvBL,2BAA2B,CAAC;EAC1BM,EAAE,EAAED,MAAM,CAACC,EAAE;EACbC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAI,IAAIC,MAAM,CAAC,IAAIJ,cAAc,GAAG,EAAE,GAAG,CAAC;EACrE,IAAIC,MAAM,CAACI,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEJ,MAAM,CAACI;EAAmB,CAAC;AACvD,CAAC,CAAC;;AAEJ;AACA,MAAME,YAAY,GAAIN,MAAuB,IAC3CF,qBAAqB,CAACF,MAAM,EAAEI,MAAM,CAAC;;AAEvC;AACA,MAAMO,YAAY,GAAIP,MAAuB,IAC3CF,qBAAqB,CAACD,MAAM,EAAEG,MAAM,CAAC;;AAEvC;AACA,MAAMQ,sBAAyC,GAAG,CAACZ,MAAM,EAAEC,MAAM,CAAC;AAElE,SACES,YAAY,EACZC,YAAY,EACZC,sBAAsB,EACtBV,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["standardBloodPressureDevice","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","id","toLowerCase","replace","nameMatch","RegExp","stuckDataTimeoutMs","undefined","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvBL,2BAA2B,CAAC;EAC1BM,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,WAAWF,cAAc,CAACG,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE;EACtFC,SAAS,EAAEJ,MAAM,CAACI,SAAS,IAAI,IAAIC,MAAM,CAAC,IAAIN,cAAc,GAAG,EAAE,GAAG,CAAC;EACrE,IAAIC,MAAM,CAACM,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEN,MAAM,CAACM;EAAmB,CAAC;AACvD,CAAC,CAAC;;AAEJ;AACA,MAAME,YAAY,GAAIR,MAAuB,IAC3CF,qBAAqB,CAACF,MAAM,EAAEI,MAAM,CAAC;;AAEvC;AACA,MAAMS,YAAY,GAAIT,MAAuB,IAC3CF,qBAAqB,CAACD,MAAM,EAAEG,MAAM,CAAC;;AAEvC;AACA,MAAMU,sBAAyC,GAAG,CAACd,MAAM,EAAEC,MAAM,CAAC;AAElE,SACEW,YAAY,EACZC,YAAY,EACZC,sBAAsB,EACtBZ,qBAAqB","ignoreList":[]}
@@ -79,7 +79,7 @@ const BP2_CASES = [measuring("0804", "Cuff inflating or deflating"), result("080
79
79
  * cannot pick up a `BP2W`.
80
80
  */
81
81
  const viatomBpMonitor = (advertisedName, params) => lepuDevice({
82
- id: params.id,
82
+ id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
83
83
  nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
84
84
  pollCommand: RT_DATA,
85
85
  minLengthBytes: MIN_LENGTH_BYTES,
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","READING","name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","id","nameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAK/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAA0B,GAAG,CACjC;EACEC,IAAI,EAAE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E,EAAED,MAAM,CAACC,EAAE;EACbC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIxB,aAAa,CAACqB,cAAc,CAAC;EAC5DI,WAAW,EAAEvB,OAAO;EACpBwB,cAAc,EAAEtB,gBAAgB;EAChCuB,iBAAiB,EAAExB,mBAAmB;EACtCyB,KAAK,EAAET,SAAS,CAACU,GAAG,CAAEC,IAAI,KAAM;IAAE,GAAGA;EAAK,CAAC,CAAC,CAAC;EAC7C,IAAIR,MAAM,CAACS,mBAAmB,GAC1B;IAAEA,mBAAmB,EAAET,MAAM,CAACS;EAAoB,CAAC,GACnD,CAAC,CAAC;AACR,CAAC,CAAC;;AAEJ;AACA,MAAMC,WAAW,GAAIV,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA,MAAMW,WAAW,GAAIX,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA,MAAMY,WAAW,GAAIZ,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMa,eAAkC,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,CACP;AAED,SACEH,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,eAAe,EACff,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","READING","name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","id","toLowerCase","replace","nameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAK/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAA0B,GAAG,CACjC;EACEC,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,CACF;AAED,MAAMC,MAAM,GAAGA,CAACC,QAAgB,EAAEC,WAAmB,MAAsB;EACzED,QAAQ;EACRE,IAAI,EAAE,QAAQ;EACdC,kBAAkB,EAAEhB,kBAAkB,CAACiB,aAAa;EACpDC,MAAM,EAAE,CAAC,GAAGZ,OAAO,CAAC;EACpBQ;AACF,CAAC,CAAC;AAEF,MA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AAMc,WAAW,GAAId,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMe,eAAkC,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,CACP;AAED,SACEH,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfjB,eAAe","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
4
+ const VIATOM_ECG_SAMPLE_RATE_HZ = 125;
5
+ const VIATOM_ECG_MILLIVOLTS_PER_COUNT = 0.002467;
6
+ const readUInt32LittleEndian = (bytes, from) => hexToByte(bytes[from] ?? "0") | hexToByte(bytes[from + 1] ?? "0") << 8 | hexToByte(bytes[from + 2] ?? "0") << 16 | hexToByte(bytes[from + 3] ?? "0") << 24;
7
+
8
+ /** Decodes the official ER1/ER2 file container and its signed ECG samples. */
9
+ const decodeViatomEcgRecording = content => {
10
+ if (content.length <= 30) {
11
+ return {
12
+ samples: [],
13
+ duration: 0
14
+ };
15
+ }
16
+ const waveStart = 10;
17
+ const waveEnd = content.length - 20;
18
+ const samples = [];
19
+ for (let index = waveStart; index + 1 < waveEnd; index += 2) {
20
+ const raw = hexToByte(content[index] ?? "0") | hexToByte(content[index + 1] ?? "0") << 8;
21
+ const signed = raw & 0x8000 ? raw - 0x10000 : raw;
22
+ samples.push(signed * VIATOM_ECG_MILLIVOLTS_PER_COUNT);
23
+ }
24
+ const recordedSeconds = readUInt32LittleEndian(content, content.length - 20);
25
+ return {
26
+ samples,
27
+ duration: recordedSeconds || samples.length / VIATOM_ECG_SAMPLE_RATE_HZ
28
+ };
29
+ };
30
+ export { decodeViatomEcgRecording, VIATOM_ECG_MILLIVOLTS_PER_COUNT, VIATOM_ECG_SAMPLE_RATE_HZ };
31
+ //# sourceMappingURL=viatom.ecg-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["hexToByte","VIATOM_ECG_SAMPLE_RATE_HZ","VIATOM_ECG_MILLIVOLTS_PER_COUNT","readUInt32LittleEndian","bytes","from","decodeViatomEcgRecording","content","length","samples","duration","waveStart","waveEnd","index","raw","signed","push","recordedSeconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,yBAAyB,GAAG,GAAG;AACrC,MAAMC,+BAA+B,GAAG,QAAQ;AAEhD,MAAMC,sBAAsB,GAAGA,CAACC,KAAwB,EAAEC,IAAY,KACpEL,SAAS,CAACI,KAAK,CAACC,IAAI,CAAC,IAAI,GAAG,CAAC,GAC5BL,SAAS,CAACI,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAE,GACvCL,SAAS,CAACI,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,EAAG,GACxCL,SAAS,CAACI,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,EAAG;;AAE3C;AACA,MAAMC,wBAAwB,GAC5BC,OAA0B,IACkB;EAC5C,IAAIA,OAAO,CAACC,MAAM,IAAI,EAAE,EAAE;IACxB,OAAO;MAAEC,OAAO,EAAE,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAC;EACrC;EAEA,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,OAAO,GAAGL,OAAO,CAACC,MAAM,GAAG,EAAE;EACnC,MAAMC,OAAiB,GAAG,EAAE;EAE5B,KAAK,IAAII,KAAK,GAAGF,SAAS,EAAEE,KAAK,GAAG,CAAC,GAAGD,OA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