@ovok/native 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  2. package/lib/commonjs/modules/bt-management/components/bt-provider.js.map +1 -1
  3. package/lib/commonjs/modules/bt-management/constants/custom-device-brand.js +12 -0
  4. package/lib/commonjs/modules/bt-management/constants/custom-device-brand.js.map +1 -0
  5. package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +111 -0
  6. package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -0
  7. package/lib/commonjs/modules/bt-management/index.js +209 -0
  8. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  9. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  10. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +116 -0
  11. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -0
  12. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +83 -0
  13. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -0
  14. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js +64 -0
  15. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -0
  16. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js +76 -0
  17. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -0
  18. package/lib/commonjs/modules/bt-management/services/custom/custom-device-error.js +13 -0
  19. package/lib/commonjs/modules/bt-management/services/custom/custom-device-error.js.map +1 -0
  20. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +120 -0
  21. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -0
  22. package/lib/commonjs/modules/bt-management/services/custom/normalize-ble-uuid.js +32 -0
  23. package/lib/commonjs/modules/bt-management/services/custom/normalize-ble-uuid.js.map +1 -0
  24. package/lib/commonjs/modules/bt-management/services/device-creator.js +52 -26
  25. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  26. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +22 -5
  27. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  28. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +103 -0
  30. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -0
  31. package/lib/commonjs/modules/bt-management/types/accepted-device.js +6 -0
  32. package/lib/commonjs/modules/bt-management/types/accepted-device.js.map +1 -0
  33. package/lib/commonjs/modules/bt-management/types/compiled-custom-field.js +6 -0
  34. package/lib/commonjs/modules/bt-management/types/compiled-custom-field.js.map +1 -0
  35. package/lib/commonjs/modules/bt-management/types/custom-byte-order.js +2 -0
  36. package/lib/commonjs/modules/bt-management/types/custom-byte-order.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/types/custom-case-kind.js +2 -0
  38. package/lib/commonjs/modules/bt-management/types/custom-case-kind.js.map +1 -0
  39. package/lib/commonjs/modules/bt-management/types/custom-case-spec.js +6 -0
  40. package/lib/commonjs/modules/bt-management/types/custom-case-spec.js.map +1 -0
  41. package/lib/commonjs/modules/bt-management/types/custom-device-definition.js +4 -0
  42. package/lib/commonjs/modules/bt-management/types/custom-device-definition.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/types/custom-device-id.js +2 -0
  44. package/lib/commonjs/modules/bt-management/types/custom-device-id.js.map +1 -0
  45. package/lib/commonjs/modules/bt-management/types/custom-device-spec.js +6 -0
  46. package/lib/commonjs/modules/bt-management/types/custom-device-spec.js.map +1 -0
  47. package/lib/commonjs/modules/bt-management/types/custom-field-encoding.js +2 -0
  48. package/lib/commonjs/modules/bt-management/types/custom-field-encoding.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/types/custom-field-spec.js +6 -0
  50. package/lib/commonjs/modules/bt-management/types/custom-field-spec.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/types/custom-frame-spec.js +6 -0
  52. package/lib/commonjs/modules/bt-management/types/custom-frame-spec.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/types/custom-measurement.js +6 -0
  54. package/lib/commonjs/modules/bt-management/types/custom-measurement.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/types/custom-monitor-spec.js +6 -0
  56. package/lib/commonjs/modules/bt-management/types/custom-monitor-spec.js.map +1 -0
  57. package/lib/commonjs/modules/bt-management/types/custom-service-spec.js +6 -0
  58. package/lib/commonjs/modules/bt-management/types/custom-service-spec.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/types/device-key-of.js +6 -0
  60. package/lib/commonjs/modules/bt-management/types/device-key-of.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/types/device-key.js +6 -0
  62. package/lib/commonjs/modules/bt-management/types/device-key.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/types/device-measurement-map.js.map +1 -1
  64. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +54 -0
  65. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -0
  66. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js +40 -0
  67. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js.map +1 -0
  68. package/lib/commonjs/modules/bt-management/utils/decode-medical-float.js +38 -0
  69. package/lib/commonjs/modules/bt-management/utils/decode-medical-float.js.map +1 -0
  70. package/lib/commonjs/modules/bt-management/utils/is-custom-device-definition.js +15 -0
  71. package/lib/commonjs/modules/bt-management/utils/is-custom-device-definition.js.map +1 -0
  72. package/lib/commonjs/modules/data-sync/components/android/android-health-sync.js +11 -1
  73. package/lib/commonjs/modules/data-sync/components/android/android-health-sync.js.map +1 -1
  74. package/lib/commonjs/modules/data-sync/components/apple/apple-health-sync.js +33 -1
  75. package/lib/commonjs/modules/data-sync/components/apple/apple-health-sync.js.map +1 -1
  76. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +4 -0
  77. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  78. package/lib/commonjs/modules/data-sync/services/managers/storage-manager.js +30 -2
  79. package/lib/commonjs/modules/data-sync/services/managers/storage-manager.js.map +1 -1
  80. package/lib/commonjs/modules/data-sync/services/managers/sync-state-manager.js +19 -0
  81. package/lib/commonjs/modules/data-sync/services/managers/sync-state-manager.js.map +1 -1
  82. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  83. package/lib/module/modules/bt-management/components/bt-provider.js.map +1 -1
  84. package/lib/module/modules/bt-management/constants/custom-device-brand.js +8 -0
  85. package/lib/module/modules/bt-management/constants/custom-device-brand.js.map +1 -0
  86. package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +108 -0
  87. package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -0
  88. package/lib/module/modules/bt-management/index.js +19 -0
  89. package/lib/module/modules/bt-management/index.js.map +1 -1
  90. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  91. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +112 -0
  92. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -0
  93. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +78 -0
  94. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -0
  95. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js +59 -0
  96. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -0
  97. package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js +71 -0
  98. package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -0
  99. package/lib/module/modules/bt-management/services/custom/custom-device-error.js +8 -0
  100. package/lib/module/modules/bt-management/services/custom/custom-device-error.js.map +1 -0
  101. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +115 -0
  102. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -0
  103. package/lib/module/modules/bt-management/services/custom/normalize-ble-uuid.js +27 -0
  104. package/lib/module/modules/bt-management/services/custom/normalize-ble-uuid.js.map +1 -0
  105. package/lib/module/modules/bt-management/services/device-creator.js +52 -26
  106. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  107. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +22 -5
  108. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  109. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  110. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +98 -0
  111. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -0
  112. package/lib/module/modules/bt-management/types/accepted-device.js +4 -0
  113. package/lib/module/modules/bt-management/types/accepted-device.js.map +1 -0
  114. package/lib/module/modules/bt-management/types/compiled-custom-field.js +4 -0
  115. package/lib/module/modules/bt-management/types/compiled-custom-field.js.map +1 -0
  116. package/lib/module/modules/bt-management/types/custom-byte-order.js +2 -0
  117. package/lib/module/modules/bt-management/types/custom-byte-order.js.map +1 -0
  118. package/lib/module/modules/bt-management/types/custom-case-kind.js +2 -0
  119. package/lib/module/modules/bt-management/types/custom-case-kind.js.map +1 -0
  120. package/lib/module/modules/bt-management/types/custom-case-spec.js +4 -0
  121. package/lib/module/modules/bt-management/types/custom-case-spec.js.map +1 -0
  122. package/lib/module/modules/bt-management/types/custom-device-definition.js +8 -0
  123. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -0
  124. package/lib/module/modules/bt-management/types/custom-device-id.js +2 -0
  125. package/lib/module/modules/bt-management/types/custom-device-id.js.map +1 -0
  126. package/lib/module/modules/bt-management/types/custom-device-spec.js +4 -0
  127. package/lib/module/modules/bt-management/types/custom-device-spec.js.map +1 -0
  128. package/lib/module/modules/bt-management/types/custom-field-encoding.js +2 -0
  129. package/lib/module/modules/bt-management/types/custom-field-encoding.js.map +1 -0
  130. package/lib/module/modules/bt-management/types/custom-field-spec.js +4 -0
  131. package/lib/module/modules/bt-management/types/custom-field-spec.js.map +1 -0
  132. package/lib/module/modules/bt-management/types/custom-frame-spec.js +4 -0
  133. package/lib/module/modules/bt-management/types/custom-frame-spec.js.map +1 -0
  134. package/lib/module/modules/bt-management/types/custom-measurement.js +4 -0
  135. package/lib/module/modules/bt-management/types/custom-measurement.js.map +1 -0
  136. package/lib/module/modules/bt-management/types/custom-monitor-spec.js +4 -0
  137. package/lib/module/modules/bt-management/types/custom-monitor-spec.js.map +1 -0
  138. package/lib/module/modules/bt-management/types/custom-service-spec.js +4 -0
  139. package/lib/module/modules/bt-management/types/custom-service-spec.js.map +1 -0
  140. package/lib/module/modules/bt-management/types/device-key-of.js +4 -0
  141. package/lib/module/modules/bt-management/types/device-key-of.js.map +1 -0
  142. package/lib/module/modules/bt-management/types/device-key.js +4 -0
  143. package/lib/module/modules/bt-management/types/device-key.js.map +1 -0
  144. package/lib/module/modules/bt-management/types/device-measurement-map.js +5 -0
  145. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  146. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +49 -0
  147. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -0
  148. package/lib/module/modules/bt-management/utils/create-frame-validator.js +35 -0
  149. package/lib/module/modules/bt-management/utils/create-frame-validator.js.map +1 -0
  150. package/lib/module/modules/bt-management/utils/decode-medical-float.js +33 -0
  151. package/lib/module/modules/bt-management/utils/decode-medical-float.js.map +1 -0
  152. package/lib/module/modules/bt-management/utils/is-custom-device-definition.js +10 -0
  153. package/lib/module/modules/bt-management/utils/is-custom-device-definition.js.map +1 -0
  154. package/lib/module/modules/data-sync/components/android/android-health-sync.js +11 -1
  155. package/lib/module/modules/data-sync/components/android/android-health-sync.js.map +1 -1
  156. package/lib/module/modules/data-sync/components/apple/apple-health-sync.js +33 -1
  157. package/lib/module/modules/data-sync/components/apple/apple-health-sync.js.map +1 -1
  158. package/lib/module/modules/data-sync/services/base-health-sync-service.js +4 -0
  159. package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  160. package/lib/module/modules/data-sync/services/managers/storage-manager.js +30 -2
  161. package/lib/module/modules/data-sync/services/managers/storage-manager.js.map +1 -1
  162. package/lib/module/modules/data-sync/services/managers/sync-state-manager.js +19 -0
  163. package/lib/module/modules/data-sync/services/managers/sync-state-manager.js.map +1 -1
  164. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts +2 -2
  165. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider.d.ts +2 -2
  167. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider.d.ts.map +1 -1
  168. package/lib/typescript/commonjs/src/modules/bt-management/constants/custom-device-brand.d.ts +6 -0
  169. package/lib/typescript/commonjs/src/modules/bt-management/constants/custom-device-brand.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts +26 -0
  171. package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +19 -0
  173. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  174. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +5 -4
  175. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  176. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts +6 -0
  177. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts +6 -0
  179. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts +13 -0
  181. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts +10 -0
  183. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/custom-device-error.d.ts +6 -0
  185. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/custom-device-error.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts +12 -0
  187. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/normalize-ble-uuid.d.ts +7 -0
  189. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/normalize-ble-uuid.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts +12 -5
  191. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +12 -1
  193. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +2 -1
  195. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  196. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +43 -0
  197. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/modules/bt-management/types/accepted-device.d.ts +5 -0
  199. package/lib/typescript/commonjs/src/modules/bt-management/types/accepted-device.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +5 -4
  201. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  202. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-props.d.ts +2 -2
  203. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-props.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/src/modules/bt-management/types/compiled-custom-field.d.ts +16 -0
  205. package/lib/typescript/commonjs/src/modules/bt-management/types/compiled-custom-field.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +2 -2
  207. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-byte-order.d.ts +6 -0
  209. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-byte-order.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-kind.d.ts +12 -0
  211. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-kind.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts +18 -0
  213. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +22 -0
  215. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-id.d.ts +10 -0
  217. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-id.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  219. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +10 -0
  221. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-spec.d.ts +33 -0
  223. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-spec.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts +27 -0
  225. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement.d.ts +10 -0
  227. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-monitor-spec.d.ts +14 -0
  229. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-monitor-spec.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts +15 -0
  231. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +2 -2
  233. package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/src/modules/bt-management/types/device-key-of.d.ts +8 -0
  235. package/lib/typescript/commonjs/src/modules/bt-management/types/device-key-of.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/src/modules/bt-management/types/device-key.d.ts +5 -0
  237. package/lib/typescript/commonjs/src/modules/bt-management/types/device-key.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +10 -5
  239. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -2
  241. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts +12 -0
  243. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts +10 -0
  245. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/src/modules/bt-management/utils/decode-medical-float.d.ts +9 -0
  247. package/lib/typescript/commonjs/src/modules/bt-management/utils/decode-medical-float.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/src/modules/bt-management/utils/is-custom-device-definition.d.ts +9 -0
  249. package/lib/typescript/commonjs/src/modules/bt-management/utils/is-custom-device-definition.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-sync.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-sync.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts +2 -0
  253. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/storage-manager.d.ts +20 -0
  255. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/storage-manager.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  257. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-state-manager.d.ts +13 -0
  258. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-state-manager.d.ts.map +1 -1
  259. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts +2 -2
  260. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  261. package/lib/typescript/module/src/modules/bt-management/components/bt-provider.d.ts +2 -2
  262. package/lib/typescript/module/src/modules/bt-management/components/bt-provider.d.ts.map +1 -1
  263. package/lib/typescript/module/src/modules/bt-management/constants/custom-device-brand.d.ts +6 -0
  264. package/lib/typescript/module/src/modules/bt-management/constants/custom-device-brand.d.ts.map +1 -0
  265. package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts +26 -0
  266. package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -0
  267. package/lib/typescript/module/src/modules/bt-management/index.d.ts +19 -0
  268. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  269. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +5 -4
  270. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  271. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts +6 -0
  272. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -0
  273. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts +6 -0
  274. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -0
  275. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts +13 -0
  276. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -0
  277. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts +10 -0
  278. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -0
  279. package/lib/typescript/module/src/modules/bt-management/services/custom/custom-device-error.d.ts +6 -0
  280. package/lib/typescript/module/src/modules/bt-management/services/custom/custom-device-error.d.ts.map +1 -0
  281. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts +12 -0
  282. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -0
  283. package/lib/typescript/module/src/modules/bt-management/services/custom/normalize-ble-uuid.d.ts +7 -0
  284. package/lib/typescript/module/src/modules/bt-management/services/custom/normalize-ble-uuid.d.ts.map +1 -0
  285. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts +12 -5
  286. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  287. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +12 -1
  288. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  289. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +2 -1
  290. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  291. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +43 -0
  292. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -0
  293. package/lib/typescript/module/src/modules/bt-management/types/accepted-device.d.ts +5 -0
  294. package/lib/typescript/module/src/modules/bt-management/types/accepted-device.d.ts.map +1 -0
  295. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +5 -4
  296. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  297. package/lib/typescript/module/src/modules/bt-management/types/btprovider-props.d.ts +2 -2
  298. package/lib/typescript/module/src/modules/bt-management/types/btprovider-props.d.ts.map +1 -1
  299. package/lib/typescript/module/src/modules/bt-management/types/compiled-custom-field.d.ts +16 -0
  300. package/lib/typescript/module/src/modules/bt-management/types/compiled-custom-field.d.ts.map +1 -0
  301. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +2 -2
  302. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  303. package/lib/typescript/module/src/modules/bt-management/types/custom-byte-order.d.ts +6 -0
  304. package/lib/typescript/module/src/modules/bt-management/types/custom-byte-order.d.ts.map +1 -0
  305. package/lib/typescript/module/src/modules/bt-management/types/custom-case-kind.d.ts +12 -0
  306. package/lib/typescript/module/src/modules/bt-management/types/custom-case-kind.d.ts.map +1 -0
  307. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts +18 -0
  308. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -0
  309. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +22 -0
  310. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -0
  311. package/lib/typescript/module/src/modules/bt-management/types/custom-device-id.d.ts +10 -0
  312. package/lib/typescript/module/src/modules/bt-management/types/custom-device-id.d.ts.map +1 -0
  313. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  314. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -0
  315. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +10 -0
  316. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -0
  317. package/lib/typescript/module/src/modules/bt-management/types/custom-field-spec.d.ts +33 -0
  318. package/lib/typescript/module/src/modules/bt-management/types/custom-field-spec.d.ts.map +1 -0
  319. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts +27 -0
  320. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -0
  321. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement.d.ts +10 -0
  322. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement.d.ts.map +1 -0
  323. package/lib/typescript/module/src/modules/bt-management/types/custom-monitor-spec.d.ts +14 -0
  324. package/lib/typescript/module/src/modules/bt-management/types/custom-monitor-spec.d.ts.map +1 -0
  325. package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts +15 -0
  326. package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -0
  327. package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +2 -2
  328. package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts.map +1 -1
  329. package/lib/typescript/module/src/modules/bt-management/types/device-key-of.d.ts +8 -0
  330. package/lib/typescript/module/src/modules/bt-management/types/device-key-of.d.ts.map +1 -0
  331. package/lib/typescript/module/src/modules/bt-management/types/device-key.d.ts +5 -0
  332. package/lib/typescript/module/src/modules/bt-management/types/device-key.d.ts.map +1 -0
  333. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +10 -5
  334. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  335. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -2
  336. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  337. package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts +12 -0
  338. package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -0
  339. package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts +10 -0
  340. package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -0
  341. package/lib/typescript/module/src/modules/bt-management/utils/decode-medical-float.d.ts +9 -0
  342. package/lib/typescript/module/src/modules/bt-management/utils/decode-medical-float.d.ts.map +1 -0
  343. package/lib/typescript/module/src/modules/bt-management/utils/is-custom-device-definition.d.ts +9 -0
  344. package/lib/typescript/module/src/modules/bt-management/utils/is-custom-device-definition.d.ts.map +1 -0
  345. package/lib/typescript/module/src/modules/data-sync/components/android/android-health-sync.d.ts.map +1 -1
  346. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-sync.d.ts.map +1 -1
  347. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts +2 -0
  348. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  349. package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts +20 -0
  350. package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts.map +1 -1
  351. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  352. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-state-manager.d.ts +13 -0
  353. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-state-manager.d.ts.map +1 -1
  354. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"btprovider-children-props.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/btprovider-children-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS,SAAS,iBAAiB,EAAE;IAEtC,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,CAAC,CAAC;IACnB,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAClC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC;CACtD"}
1
+ {"version":3,"file":"btprovider-children-props.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/btprovider-children-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS,SAAS,cAAc,EAAE;IAEnC,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,CAAC,CAAC;IACnB,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EACvC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC3D"}
@@ -1,6 +1,6 @@
1
+ import { AcceptedDevice } from "./accepted-device";
1
2
  import { BTProviderChildWrapperProps } from "./btprovider-children-props";
2
- import { IntegratedDevices } from "./integrated-devices";
3
- export interface BTProviderProps<T extends readonly IntegratedDevices[]> extends BTProviderChildWrapperProps<T> {
3
+ export interface BTProviderProps<T extends readonly AcceptedDevice[]> extends BTProviderChildWrapperProps<T> {
4
4
  onAccessPermissionChanged?: (accessPermission: boolean) => void;
5
5
  /**
6
6
  * Callback to be called when the access permission is not granted and the user is asked to open the settings
@@ -1 +1 @@
1
- {"version":3,"file":"btprovider-props.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/btprovider-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,iBAAiB,EAAE,CACrE,SAAQ,2BAA2B,CAAC,CAAC,CAAC;IACtC,yBAAyB,CAAC,EAAE,CAAC,gBAAgB,EAAE,OAAO,KAAK,IAAI,CAAC;IAEhE;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAC5C"}
1
+ {"version":3,"file":"btprovider-props.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/btprovider-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,cAAc,EAAE,CAClE,SAAQ,2BAA2B,CAAC,CAAC,CAAC;IACtC,yBAAyB,CAAC,EAAE,CAAC,gBAAgB,EAAE,OAAO,KAAK,IAAI,CAAC;IAEhE;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAC5C"}
@@ -0,0 +1,16 @@
1
+ import { CustomFieldEncoding } from "./custom-field-encoding";
2
+ /** A validated field spec with every default resolved. */
3
+ export interface CompiledCustomField {
4
+ name: string;
5
+ /** Already reordered for the declared byte order. */
6
+ byteIndexes: number[];
7
+ encoding: CustomFieldEncoding;
8
+ scale: number;
9
+ offset: number;
10
+ decimals?: number;
11
+ unit: string;
12
+ /** Hard accepted range. A decoded value outside it is an error, never a reading. */
13
+ min: number;
14
+ max: number;
15
+ }
16
+ //# sourceMappingURL=compiled-custom-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiled-custom-field.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/compiled-custom-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IAEb,qDAAqD;IACrD,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,QAAQ,EAAE,mBAAmB,CAAC;IAE9B,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb,oFAAoF;IACpF,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -1,9 +1,9 @@
1
1
  import { Device } from "react-native-ble-plx";
2
+ import { DeviceKey } from "./device-key";
2
3
  import { DeviceStatusChangeCallback } from "./device-status-change-callback";
3
4
  import { ErrorCallback } from "./error-callback";
4
- import { IntegratedDevices } from "./integrated-devices";
5
5
  import { ResultCallback } from "./result-callback";
6
- export interface CreateDeviceParams<T extends IntegratedDevices> {
6
+ export interface CreateDeviceParams<T extends DeviceKey> {
7
7
  device: Device;
8
8
  deviceName: T;
9
9
  onError?: (data: ErrorCallback) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"create-device-params.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/create-device-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,iBAAiB;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
1
+ {"version":3,"file":"create-device-params.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/create-device-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,SAAS;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Order in which the declared byte indexes are assembled into a single value.
3
+ * "big" keeps the declared order, "little" reverses it.
4
+ */
5
+ export type CustomByteOrder = "big" | "little";
6
+ //# sourceMappingURL=custom-byte-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-byte-order.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-byte-order.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The three frame roles a declared device may use.
3
+ *
4
+ * - "result" a completed reading; its fields are decoded, bounds-checked and reported
5
+ * - "stream" the device is mid-measurement; moves the device into MEASURING
6
+ * - "idle" anything else the device emits (heartbeats, menu state); moves it back to CONNECTED
7
+ *
8
+ * The stateful roles the built-in device classes use (dependent, sn, error) are deliberately
9
+ * not available to declarations - they require a device class.
10
+ */
11
+ export type CustomCaseKind = "result" | "stream" | "idle";
12
+ //# sourceMappingURL=custom-case-kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-case-kind.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-case-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { MeasurementTypeKey } from "@ovok/core";
2
+ import { CustomCaseKind } from "./custom-case-kind";
3
+ import { CustomFieldSpec } from "./custom-field-spec";
4
+ /** One frame shape the device emits, selected by the monitor's `caseSelectorBytes`. */
5
+ export interface CustomCaseSpec {
6
+ /**
7
+ * Concatenated hex of the selector bytes that identifies this frame, e.g. "aa0f0801".
8
+ * Empty string when the characteristic declares no selector and has a single case.
9
+ */
10
+ selector: string;
11
+ kind: CustomCaseKind;
12
+ /** Required for a "result" case. Must be a type the declarative decoder supports. */
13
+ measurementTypeKey?: MeasurementTypeKey;
14
+ /** Required and non-empty for a "result" case, forbidden otherwise. */
15
+ fields?: CustomFieldSpec[];
16
+ description?: string;
17
+ }
18
+ //# sourceMappingURL=custom-case-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-case-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-case-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAE7B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,cAAc,CAAC;IAErB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC,uEAAuE;IACvE,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAE3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,22 @@
1
+ import { CUSTOM_DEVICE_BRAND } from "../constants/custom-device-brand";
2
+ import { CompiledCustomField } from "./compiled-custom-field";
3
+ import { CustomDeviceId } from "./custom-device-id";
4
+ import { CustomDeviceSpec } from "./custom-device-spec";
5
+ import { CustomFrameSpec } from "./custom-frame-spec";
6
+ import { IService } from "./service.type";
7
+ /**
8
+ * A validated, ready-to-run custom device. Only defineCustomDevice produces one.
9
+ */
10
+ export interface CustomDeviceDefinition {
11
+ readonly [CUSTOM_DEVICE_BRAND]: true;
12
+ readonly id: CustomDeviceId;
13
+ readonly spec: CustomDeviceSpec;
14
+ readonly nameMatch: RegExp;
15
+ readonly mainServices: IService[];
16
+ readonly stuckDataTimeout: number;
17
+ /** Keyed by `${measurementTypeKey}:${fieldName}`, used to bounds-check every reading. */
18
+ readonly fields: ReadonlyMap<string, CompiledCustomField>;
19
+ /** Frame declaration of every monitor characteristic, keyed by its 128-bit UUID. */
20
+ readonly frames: ReadonlyMap<string, CustomFrameSpec>;
21
+ }
22
+ //# sourceMappingURL=custom-device-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-device-definition.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-device-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC;IAErC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAE5B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAEhC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAC;IAElC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAE1D,oFAAoF;IACpF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACvD"}
@@ -0,0 +1,10 @@
1
+ declare const customDeviceIdBrand: unique symbol;
2
+ /**
3
+ * Identifier of a device registered through defineCustomDevice.
4
+ * Branded so it never silently collapses into the IntegratedDevices union.
5
+ */
6
+ export type CustomDeviceId = string & {
7
+ readonly [customDeviceIdBrand]: true;
8
+ };
9
+ export {};
10
+ //# sourceMappingURL=custom-device-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-device-id.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-device-id.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,mBAAmB,EAAE,OAAO,MAAM,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { CustomServiceSpec } from "./custom-service-spec";
2
+ /** Plain, JSON-shaped declaration of a Bluetooth device the SDK has no class for. */
3
+ export interface CustomDeviceSpec {
4
+ /** Reported back as deviceData.name. Must not collide with a built-in device name. */
5
+ id: string;
6
+ /** Advertised BLE name. A string must match exactly; a RegExp is tested (the /g flag is rejected). */
7
+ nameMatch: string | RegExp;
8
+ /** Milliseconds without a usable frame before the read is abandoned. 1000-6000000. */
9
+ stuckDataTimeoutMs: number;
10
+ services: CustomServiceSpec[];
11
+ }
12
+ //# sourceMappingURL=custom-device-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-device-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-device-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qFAAqF;AACrF,MAAM,WAAW,gBAAgB;IAE/B,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAC;IAEX,sGAAsG;IACtG,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B,sFAAsF;IACtF,kBAAkB,EAAE,MAAM,CAAC;IAE3B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * How the assembled bytes of a custom field are turned into a number.
3
+ *
4
+ * - "uint" unsigned integer, 1-6 bytes
5
+ * - "int" two's complement signed integer, 1-6 bytes
6
+ * - "sfloat" IEEE-11073 16-bit SFLOAT, exactly 2 bytes (standard GATT vitals)
7
+ * - "float" IEEE-11073 32-bit FLOAT, exactly 4 bytes (standard GATT thermometer)
8
+ */
9
+ export type CustomFieldEncoding = "uint" | "int" | "sfloat" | "float";
10
+ //# sourceMappingURL=custom-field-encoding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-field-encoding.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-field-encoding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { CustomByteOrder } from "./custom-byte-order";
2
+ import { CustomFieldEncoding } from "./custom-field-encoding";
3
+ /**
4
+ * One measurement property read out of a frame at fixed byte offsets.
5
+ *
6
+ * The property `name` and `unit` are checked at registration against the measurement
7
+ * catalog for the case's measurementTypeKey. A name the SDK does not know, or a unit
8
+ * that is not the canonical one, is rejected - it would otherwise produce a measurement
9
+ * the backend silently drops, or a number in the wrong unit.
10
+ */
11
+ export interface CustomFieldSpec {
12
+ /** Property on the emitted measurement, e.g. "systolic". Must exist for the case's type. */
13
+ name: string;
14
+ /** Byte offsets into the frame, in the order the device puts them on the wire. */
15
+ byteIndexes: number[];
16
+ /** Defaults to "big". Use "little" when the least significant byte comes first. */
17
+ byteOrder?: CustomByteOrder;
18
+ /** Defaults to "uint". */
19
+ encoding?: CustomFieldEncoding;
20
+ /** Multiplied onto the raw value. Defaults to 1. Use it for unit and resolution conversion. */
21
+ scale?: number;
22
+ /** Added after `scale`. Defaults to 0. */
23
+ offset?: number;
24
+ /** Round the result to this many decimals. 0-6. */
25
+ decimals?: number;
26
+ /** Canonical unit for `name`. Declaring any other unit fails registration. */
27
+ unit: string;
28
+ /** Narrower accepted range than the catalog default. Must sit inside it. */
29
+ min?: number;
30
+ /** Narrower accepted range than the catalog default. Must sit inside it. */
31
+ max?: number;
32
+ }
33
+ //# sourceMappingURL=custom-field-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-field-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-field-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAE9B,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAC;IAEb,kFAAkF;IAClF,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,mFAAmF;IACnF,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAE/B,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IAEb,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,27 @@
1
+ import { CustomByteOrder } from "./custom-byte-order";
2
+ /**
3
+ * How a notification buffer is recognised as a complete frame.
4
+ *
5
+ * A declared frame must be header aligned: the SDK never scans forward for the header,
6
+ * because the field offsets are absolute. A buffer that does not start with the header
7
+ * is never parsed - it fails the stuck-data timeout instead of producing a shifted reading.
8
+ */
9
+ export interface CustomFrameSpec {
10
+ /** Required leading bytes as hex, e.g. ["aa", "55"]. */
11
+ header?: string[];
12
+ /**
13
+ * Shortest buffer that may be parsed. Every byte index the declaration reads - case
14
+ * selectors and fields alike - must be inside this length, which is checked at registration.
15
+ */
16
+ minLengthBytes: number;
17
+ /** An in-frame length field, when the device has one. */
18
+ length?: {
19
+ /** Byte offset of the length field. */
20
+ index: number;
21
+ widthBytes: 1 | 2;
22
+ byteOrder: CustomByteOrder;
23
+ /** Bytes in the frame the length field does not count (header, checksum, ...). */
24
+ overheadBytes: number;
25
+ };
26
+ }
27
+ //# sourceMappingURL=custom-frame-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-frame-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-frame-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAE9B,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB,yDAAyD;IACzD,MAAM,CAAC,EAAE;QAEP,uCAAuC;QACvC,KAAK,EAAE,MAAM,CAAC;QAEd,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;QAElB,SAAS,EAAE,eAAe,CAAC;QAE3B,kFAAkF;QAClF,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH"}
@@ -0,0 +1,10 @@
1
+ import { MeasurementTypeKey } from "@ovok/core";
2
+ /**
3
+ * What a declared device reports. The property names are checked at registration against
4
+ * the measurement catalog, so at runtime every own property is a bounds-checked number.
5
+ */
6
+ export interface CustomMeasurement {
7
+ measurementTypeKey: MeasurementTypeKey;
8
+ [field: string]: number | MeasurementTypeKey | undefined;
9
+ }
10
+ //# sourceMappingURL=custom-measurement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-measurement.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-measurement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAC;CAC1D"}
@@ -0,0 +1,14 @@
1
+ import { CustomCaseSpec } from "./custom-case-spec";
2
+ import { CustomFrameSpec } from "./custom-frame-spec";
3
+ /** A notify/indicate characteristic and the frames it emits. */
4
+ export interface CustomMonitorSpec {
5
+ uuid: string;
6
+ frame: CustomFrameSpec;
7
+ /**
8
+ * Byte offsets whose concatenated hex picks the case. Omit only when the characteristic
9
+ * has exactly one case whose selector is the empty string.
10
+ */
11
+ caseSelectorBytes?: number[];
12
+ cases: CustomCaseSpec[];
13
+ }
14
+ //# sourceMappingURL=custom-monitor-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-monitor-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-monitor-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,gEAAgE;AAChE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,eAAe,CAAC;IAEvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB"}
@@ -0,0 +1,15 @@
1
+ import { CustomMonitorSpec } from "./custom-monitor-spec";
2
+ export interface CustomServiceSpec {
3
+ uuid: string;
4
+ monitor: CustomMonitorSpec[];
5
+ /**
6
+ * A single static command written after connect and after every processed frame.
7
+ * A device that needs a handshake, a challenge response or a command sequence cannot
8
+ * be declared and still needs a device class.
9
+ */
10
+ write?: {
11
+ uuid: string;
12
+ commandHex: string;
13
+ };
14
+ }
15
+ //# sourceMappingURL=custom-service-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-service-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-service-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAE7B;;;;OAIG;IACH,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
@@ -1,8 +1,8 @@
1
1
  import { MeasurementTypeKey } from "@ovok/core";
2
- import { IntegratedDevices } from "./integrated-devices";
2
+ import { DeviceKey } from "./device-key";
3
3
  export type DeviceData = {
4
4
  id: string;
5
- name: IntegratedDevices;
5
+ name: DeviceKey;
6
6
  localName: string;
7
7
  manufacturerData: string;
8
8
  sn: string;
@@ -1 +1 @@
1
- {"version":3,"file":"device-data.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;CACxC,CAAC"}
1
+ {"version":3,"file":"device-data.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;CACxC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { AcceptedDevice } from "./accepted-device";
2
+ import { CustomDeviceId } from "./custom-device-id";
3
+ import { IntegratedDevices } from "./integrated-devices";
4
+ type KeyOfAccepted<A extends AcceptedDevice> = A extends IntegratedDevices ? A : CustomDeviceId;
5
+ /** The device keys an `acceptedDevices` list can report. */
6
+ export type DeviceKeyOf<T extends readonly AcceptedDevice[]> = KeyOfAccepted<T[number]>;
7
+ export {};
8
+ //# sourceMappingURL=device-key-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-key-of.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-key-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,KAAK,aAAa,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAAS,iBAAiB,GACtE,CAAC,GACD,cAAc,CAAC;AAEnB,4DAA4D;AAC5D,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,SAAS,cAAc,EAAE,IAAI,aAAa,CAC1E,CAAC,CAAC,MAAM,CAAC,CACV,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { CustomDeviceId } from "./custom-device-id";
2
+ import { IntegratedDevices } from "./integrated-devices";
3
+ /** Anything the SDK can report as deviceData.name: a built-in device, or a declared one. */
4
+ export type DeviceKey = IntegratedDevices | CustomDeviceId;
5
+ //# sourceMappingURL=device-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-key.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,4FAA4F;AAC5F,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,cAAc,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { BloodPressureMeasurement, BodyWeightMeasurement, EcgMeasurement, PulseOximeterMeasurement, UrineAnalyzeMeasurement } from "@ovok/core";
2
2
  import { CaseType } from "./case-type";
3
+ import { CustomMeasurement } from "./custom-measurement";
4
+ import { DeviceKey } from "./device-key";
3
5
  import { IntegratedDevices } from "./integrated-devices";
4
6
  interface DeviceMeasurementMap {
5
7
  [IntegratedDevices.F4]: BodyWeightMeasurement;
@@ -22,10 +24,13 @@ interface DeviceMeasurementMap {
22
24
  [IntegratedDevices.ALIVE_COR]: never;
23
25
  [IntegratedDevices.BGM]: never;
24
26
  }
25
- export type MeasurementTypeForDevices<T extends readonly IntegratedDevices[]> = {
26
- [K in T[number]]: DeviceMeasurementMap[K] & {
27
- caseType: CaseType;
28
- };
29
- }[T[number]];
27
+ /**
28
+ * A built-in device has a measurement type the SDK knows statically. A device registered
29
+ * through defineCustomDevice reports the catalog-checked properties its declaration named.
30
+ */
31
+ type MeasurementForDevice<K extends DeviceKey> = K extends IntegratedDevices ? DeviceMeasurementMap[K] : CustomMeasurement;
32
+ export type MeasurementTypeForDevices<T extends readonly DeviceKey[]> = MeasurementForDevice<T[number]> & {
33
+ caseType: CaseType;
34
+ };
30
35
  export {};
31
36
  //# sourceMappingURL=device-measurement-map.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"device-measurement-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-measurement-map.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,UAAU,oBAAoB;IAC5B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC9C,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,wBAAwB,GAAG,cAAc,CAAC;IACnE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,wBAAwB,CAAC;IACnD,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;IAClC,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IACrD,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC;IAC1C,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;IACxC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IACpC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IACpC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAClD,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAChC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACjC,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC;IAC9B,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC;CAChC;AAED,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS,iBAAiB,EAAE,IAC1E;KACG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE;CACnE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"device-measurement-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/device-measurement-map.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,UAAU,oBAAoB;IAC5B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC9C,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,wBAAwB,GAAG,cAAc,CAAC;IACnE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,wBAAwB,CAAC;IACnD,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;IAClC,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IACrD,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC;IAC1C,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;IACxC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IACpC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IACpC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAClD,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IACtC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAChC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACjC,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC;IAC9B,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC;CAChC;AAED;;;GAGG;AACH,KAAK,oBAAoB,CAAC,CAAC,SAAS,SAAS,IAAI,CAAC,SAAS,iBAAiB,GACxE,oBAAoB,CAAC,CAAC,CAAC,GACvB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,SAAS,SAAS,EAAE,IAClE,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { DeviceData } from "./device-data";
2
+ import { DeviceKey } from "./device-key";
2
3
  import { MeasurementTypeForDevices } from "./device-measurement-map";
3
- import { IntegratedDevices } from "./integrated-devices";
4
- export interface ResultCallback<T extends IntegratedDevices> {
4
+ export interface ResultCallback<T extends DeviceKey> {
5
5
  deviceData: DeviceData;
6
6
  data: Omit<MeasurementTypeForDevices<[T]>, "caseType">;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"result-callback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/result-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,iBAAiB;IACzD,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACxD"}
1
+ {"version":3,"file":"result-callback.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/result-callback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS;IACjD,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;CACxD"}
@@ -0,0 +1,12 @@
1
+ import { CompiledCustomField } from "../types/compiled-custom-field";
2
+ /**
3
+ * Builds the parser a compiled field contributes to the parsing model.
4
+ *
5
+ * It receives the hex bytes parse-measurement assembled for the field. Anything that is not
6
+ * exactly the declared width of clean hex returns undefined - notably the string
7
+ * parse-measurement produces when a byte index falls off the end of a short frame, which
8
+ * would otherwise be parsed as a plausible truncated number. The device turns an undefined
9
+ * field into an error and reports no reading.
10
+ */
11
+ export declare const createCustomFieldParser: (field: CompiledCustomField) => (assembledHex: string) => number | undefined;
12
+ //# sourceMappingURL=create-custom-field-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-custom-field-parser.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/create-custom-field-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AA8BrE;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GACjC,OAAO,mBAAmB,MAC1B,cAAc,MAAM,KAAG,MAAM,GAAG,SA6BhC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { CustomFrameSpec } from "../types/custom-frame-spec";
2
+ /**
3
+ * Builds the package validator for a declared device.
4
+ *
5
+ * The buffer must start with the declared header. The SDK never scans forward for it,
6
+ * because every declared byte index is absolute: a buffer that arrived misaligned is left
7
+ * to the stuck-data timeout instead of being decoded at a shifted offset.
8
+ */
9
+ export declare const createFrameValidator: (frame: CustomFrameSpec) => (pkg: string[]) => boolean;
10
+ //# sourceMappingURL=create-frame-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-frame-validator.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/create-frame-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAoB7D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC9B,OAAO,eAAe,MACtB,KAAK,MAAM,EAAE,KAAG,OAqBhB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * IEEE-11073 personal-health float decoding, shared by SFLOAT (16 bit) and FLOAT (32 bit).
3
+ *
4
+ * Both encodings reserve five mantissa values for NaN, NRes, the two infinities and one
5
+ * reserved code. They are returned as undefined rather than as a number: a device that
6
+ * reports "no result" must not turn into a plausible reading.
7
+ */
8
+ export declare const decodeMedicalFloat: (raw: number, exponentBits: number, mantissaBits: number) => number | undefined;
9
+ //# sourceMappingURL=decode-medical-float.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-medical-float.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/decode-medical-float.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,MAAM,EACX,cAAc,MAAM,EACpB,cAAc,MAAM,KACnB,MAAM,GAAG,SA4BX,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { AcceptedDevice } from "../types/accepted-device";
2
+ import { CustomDeviceDefinition } from "../types/custom-device-definition";
3
+ /**
4
+ * True only for the output of defineCustomDevice. A hand-assembled object that never went
5
+ * through registration validation is not accepted, so no declaration can reach the decoder
6
+ * without having been checked.
7
+ */
8
+ export declare const isCustomDeviceDefinition: (entry: AcceptedDevice | undefined) => entry is CustomDeviceDefinition;
9
+ //# sourceMappingURL=is-custom-device-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-custom-device-definition.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/is-custom-device-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,cAAc,GAAG,SAAS,KAChC,KAAK,IAAI,sBAGqD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"android-health-sync.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/android/android-health-sync.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,eAAO,MAAM,iBAAiB,6EACqB,sBAAsB,UAoExE,CAAC"}
1
+ {"version":3,"file":"android-health-sync.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/android/android-health-sync.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,eAAO,MAAM,iBAAiB,6EACqB,sBAAsB,UA+ExE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apple-health-sync.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/apple/apple-health-sync.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,eAAO,MAAM,eAAe,6EACuB,oBAAoB,UAoEtE,CAAC"}
1
+ {"version":3,"file":"apple-health-sync.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/apple/apple-health-sync.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,eAAO,MAAM,eAAe,6EACuB,oBAAoB,UAqGtE,CAAC"}
@@ -23,7 +23,9 @@ export declare abstract class BaseHealthSyncService<TDataToSync extends AndroidH
23
23
  protected abstract getTotalCountsFunction(): (props: GetTotalCountProps<TTypeIdentifier>) => Promise<number>;
24
24
  protected abstract getDataFromProviderFunction(): (props: GetDataFromProviderProps<TTypeIdentifier>) => Promise<DataFromProviderResult<TDataFromProvider, TTypeIdentifier>>;
25
25
  protected abstract getConverterFunction(): (props: ConvertDataProps<TDataFromProvider>) => Promise<Observation[]>;
26
+ /** One run at a time; see `SyncStateManager.once` for why that matters. */
26
27
  startSync(): Promise<void>;
28
+ private runSync;
27
29
  stopSync(): Promise<void>;
28
30
  pauseSync(): Promise<void>;
29
31
  private initializeSync;
@@ -1 +1 @@
1
- {"version":3,"file":"base-health-sync-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/base-health-sync-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ1D,8BAAsB,qBAAqB,CACzC,WAAW,SACP,sBAAsB,CAAC,YAAY,CAAC,GACpC,oBAAoB,CAAC,YAAY,CAAC,EACtC,eAAe,SAAS,wBAAwB,GAAG,UAAU,EAC7D,iBAAiB,GAAG,eAAe,SAAS,UAAU,GAClD,YAAY,CAAC,eAAe,CAAC,GAC7B,eAAe,SAAS,wBAAwB,GAC9C,gBAAgB,CAAC,eAAe,CAAC,GACjC,KAAK;IAEX,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyB;IAErD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAI5B;gBAEU,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC;IA2BhD,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,cAAc;IAEpD,SAAS,CAAC,QAAQ,CAAC,sBAAsB,IAAI,CAC3C,KAAK,EAAE,kBAAkB,CAAC,eAAe,CAAC,KACvC,OAAO,CAAC,MAAM,CAAC;IAEpB,SAAS,CAAC,QAAQ,CAAC,2BAA2B,IAAI,CAChD,KAAK,EAAE,wBAAwB,CAAC,eAAe,CAAC,KAC7C,OAAO,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IAExE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,CACzC,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,KACvC,OAAO,CAAC,WAAW,EAAE,CAAC;IAEd,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA6B1B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;YAIzB,cAAc;YAUd,oBAAoB;YAuBpB,mBAAmB;YAqBnB,cAAc;IAoD5B,OAAO,CAAC,yBAAyB;CAGlC"}
1
+ {"version":3,"file":"base-health-sync-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/base-health-sync-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ1D,8BAAsB,qBAAqB,CACzC,WAAW,SACP,sBAAsB,CAAC,YAAY,CAAC,GACpC,oBAAoB,CAAC,YAAY,CAAC,EACtC,eAAe,SAAS,wBAAwB,GAAG,UAAU,EAC7D,iBAAiB,GAAG,eAAe,SAAS,UAAU,GAClD,YAAY,CAAC,eAAe,CAAC,GAC7B,eAAe,SAAS,wBAAwB,GAC9C,gBAAgB,CAAC,eAAe,CAAC,GACjC,KAAK;IAEX,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyB;IAErD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAI5B;gBAEU,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC;IA2BhD,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,cAAc;IAEpD,SAAS,CAAC,QAAQ,CAAC,sBAAsB,IAAI,CAC3C,KAAK,EAAE,kBAAkB,CAAC,eAAe,CAAC,KACvC,OAAO,CAAC,MAAM,CAAC;IAEpB,SAAS,CAAC,QAAQ,CAAC,2BAA2B,IAAI,CAChD,KAAK,EAAE,wBAAwB,CAAC,eAAe,CAAC,KAC7C,OAAO,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IAExE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,CACzC,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,KACvC,OAAO,CAAC,WAAW,EAAE,CAAC;IAE3B,2EAA2E;IAC9D,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;YAIzB,OAAO;IA6BR,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;YAIzB,cAAc;YAUd,oBAAoB;YAuBpB,mBAAmB;YAqBnB,cAAc;IAoD5B,OAAO,CAAC,yBAAyB;CAGlC"}
@@ -5,10 +5,30 @@ import { saveBundleObservations } from "../../utils/save-bundle-observations";
5
5
  export declare class StorageManager {
6
6
  private client;
7
7
  private provider;
8
+ /**
9
+ * Where an anchor goes when the host client has no storage.
10
+ *
11
+ * `clientStorage` is assigned from `OvokClient`'s `storage` option and from
12
+ * nowhere else, so a host that constructs its client without one leaves it
13
+ * `undefined` — and the `?.` below then swallowed every write while
14
+ * `getAnchor` answered `undefined` for ever. That is not a lost
15
+ * optimisation: `getObservationBodiesForType` reports `hasAnchor` from the
16
+ * anchor the provider just returned, and `syncDataByType` loops while it is
17
+ * true. An anchor that never advances means the next read starts from the
18
+ * beginning again, returns the same first chunk and the same anchor, and
19
+ * uploads it — for ever.
20
+ *
21
+ * The sync must not depend on what the host passed. This map keeps the
22
+ * anchor for the life of the service instance, which is what lets the loop
23
+ * end; when the host DOES provide storage the anchor also survives a
24
+ * restart, which is what keeps the next cold start short.
25
+ */
26
+ private readonly inMemoryAnchors;
8
27
  constructor(client: OvokClient, provider: HealthProvider);
9
28
  saveObservations(entries: Parameters<typeof saveBundleObservations>[0]["entries"]): Promise<Bundle<Observation>>;
10
29
  saveAnchor(typeIdentifier: string, anchor: string): void;
11
30
  getAnchor(typeIdentifier: string): string | undefined;
31
+ private anchorKey;
12
32
  saveAnchors(anchors: Array<{
13
33
  typeIdentifier: string;
14
34
  anchor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"storage-manager.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/storage-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,qBAAa,cAAc;IAEvB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;gBADR,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,cAAc;IAG5B,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/D,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAO/B,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAOxD,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAMrD,WAAW,CACT,OAAO,EAAE,KAAK,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,GACzD,IAAI;CAKR"}
1
+ {"version":3,"file":"storage-manager.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/storage-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,qBAAa,cAAc;IAsBvB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;IAtBlB;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6B;gBAGnD,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,cAAc;IAG5B,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/D,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAO/B,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAYxD,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQrD,OAAO,CAAC,SAAS;IAIjB,WAAW,CACT,OAAO,EAAE,KAAK,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,GACzD,IAAI;CAKR"}
@@ -15,7 +15,7 @@ export declare class SyncProgressManager<TDataToSync extends AndroidHealthSyncPr
15
15
  setTotalObservations(measurementTypeKey: HealthSyncKeys, total: number): void;
16
16
  incrementSyncedObservations(measurementTypeKey: HealthSyncKeys, count: number): void;
17
17
  setStatus(measurementTypeKey: HealthSyncKeys, status: SyncProgress["status"]): void;
18
- getStatus(measurementTypeKey: HealthSyncKeys): "paused" | "completed" | "started" | "idle" | "syncing";
18
+ getStatus(measurementTypeKey: HealthSyncKeys): "idle" | "paused" | "completed" | "started" | "syncing";
19
19
  resetAll(): void;
20
20
  private notifyProgress;
21
21
  }