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

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 (244) hide show
  1. package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
  2. package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
  3. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
  4. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  5. package/lib/commonjs/modules/auth/index.js +21 -10
  6. package/lib/commonjs/modules/auth/index.js.map +1 -1
  7. package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
  8. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
  9. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  10. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  11. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
  12. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  13. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  14. package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
  15. package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
  16. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
  17. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  18. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
  19. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  20. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
  21. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  22. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
  23. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
  24. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +3 -2
  25. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  26. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
  27. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  28. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
  29. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
  30. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
  31. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
  32. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +12 -7
  33. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  34. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +16 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  36. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +10 -2
  37. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  38. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
  39. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +2 -2
  41. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  42. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  43. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +74 -17
  44. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +4 -4
  46. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
  48. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
  49. package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js +23 -0
  50. package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
  52. package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
  53. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +7 -7
  54. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  55. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +8 -3
  56. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  57. package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +47 -0
  58. package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
  59. package/lib/commonjs/modules/data-sync/utils/health-units.js +6 -1
  60. package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
  61. package/lib/module/modules/auth/google-return-page/index.js +21 -0
  62. package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
  63. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
  64. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  65. package/lib/module/modules/auth/index.js +2 -1
  66. package/lib/module/modules/auth/index.js.map +1 -1
  67. package/lib/module/modules/auth/session/logout-session.js +1 -1
  68. package/lib/module/modules/auth/session/logout-session.js.map +1 -1
  69. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
  70. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  71. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  72. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
  73. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
  74. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  75. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  76. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
  77. package/lib/module/modules/auth/sign-in/index.js +2 -0
  78. package/lib/module/modules/auth/sign-in/index.js.map +1 -1
  79. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
  80. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  81. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
  82. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  83. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
  84. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  85. package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
  86. package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
  87. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +3 -2
  88. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  89. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
  90. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  91. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
  92. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
  93. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
  94. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
  95. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +12 -7
  96. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  97. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +16 -1
  98. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  99. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +10 -2
  100. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  101. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
  102. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  103. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +2 -2
  104. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  105. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  106. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +74 -17
  107. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
  108. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +4 -4
  109. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  110. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
  111. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
  112. package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js +18 -0
  113. package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
  114. package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
  115. package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
  116. package/lib/module/modules/data-sync/services/managers/data-processor.js +7 -7
  117. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  118. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +8 -3
  119. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  120. package/lib/module/modules/data-sync/utils/default-health-coding.js +44 -0
  121. package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
  122. package/lib/module/modules/data-sync/utils/health-units.js +6 -1
  123. package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
  124. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
  125. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  127. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
  129. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
  131. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  132. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  133. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  135. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  136. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  138. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  139. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
  140. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  142. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  144. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  146. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  148. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  150. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  152. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
  156. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
  158. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +7 -1
  161. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  163. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +2 -1
  167. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  168. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
  169. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
  170. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +5 -2
  172. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
  174. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
  176. package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  178. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
  179. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
  182. package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  184. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
  185. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  186. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  187. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  188. package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
  189. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  190. package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
  191. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  192. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  193. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  194. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  195. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  196. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  197. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  198. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  199. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
  200. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
  201. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  202. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  203. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  204. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  205. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  206. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  207. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  208. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  209. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  210. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  211. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  212. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  213. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  214. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  215. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
  216. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
  217. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
  218. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
  219. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  220. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +7 -1
  221. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  222. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  223. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  224. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
  225. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  226. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +2 -1
  227. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  228. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
  229. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
  230. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
  231. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +5 -2
  232. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  233. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
  234. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
  235. package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
  236. package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
  237. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  238. package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
  239. package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
  240. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  241. package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
  242. package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
  243. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  244. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["isAggregatedHealthData","isSeriesHealthData","LOINC_SYSTEM","UCUM_SYSTEM","getHealthObservationDevice","HEALTH_RECORD_DATA_EXTENSION","HEALTHKIT_BODY_MASS_INDEX","convertGenericHealthDataToObservation","data","patientId","mode","typeIdentifier","configuredTypeIdentifier","typeIdentifierCodes","typeIdentifierCodeSystems","typeIdentifierCodeDisplays","first","value","String","quantityType","categoryType","recordType","configuredCode","code","configuredSystem","system","isLoincCode","undefined","interval","getInterval","measurement","getMeasurement","metadata","getMetadata","device","observationDate","start","getDate","observation","resourceType","id","getStableObservationId","date","status","subject","reference","coding","display","extension","url","valueString","JSON","stringify","map","toPortableRecordData","effectivePeriod","toISOString","end","effectiveDateTime","component","minimum","unit","maximum","stageComponents","getSleepStageComponents","length","test","OMITTED_RECORD_FIELDS","Set","Date","Array","isArray","Object","fromEntries","entries","filter","key","has","child","raw","valueSampledData","origin","quantity","period","periodMs","dimensions","values","slot","Number","toFixed","join","number","kind","average","valueQuantity","getTime","extracted","extractValue","candidates","containerKey","valueKey","fallbackUnit","container","normalizeUnit","scalarCandidates","intervals","item","startValue","startDate","startTime","time","endDate","endTime","endValue","isNaN","Boolean","Math","min","max","parsed","sourceRevision","source","manufacturer","dataOrigin","model","sourceApp","name","recordingMethod","flatMap","stages","duration","isFinite","stage","label","text","getUcumCode","includes","normalized","kilometers","meters","miles","count","steps","kilograms","grams","milligrams","kilocalories","calories","minutes","seconds","beatsPerMinute","bpm","mmHg","degC","UCUM_CODES","replace","slice"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-generic-health-data.ts"],"mappings":";;AAAA;;AAKA,SAASA,sBAAsB,EAAEC,kBAAkB,QAAQ,yBAAsB;AAGjF,SAASC,YAAY,EAAEC,WAAW,QAAQ,mBAAgB;AAC1D,SAASC,0BAA0B,QAAQ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RECORD_DATA_EXTENSION","HEALTHKIT_BODY_MASS_INDEX","convertGenericHealthDataToObservation","data","patientId","mode","typeIdentifier","configuredTypeIdentifier","typeIdentifierCodes","typeIdentifierCodeSystems","typeIdentifierCodeDisplays","first","value","String","quantityType","categoryType","recordType","configuredCode","code","configuredSystem","system","isLoincCode","undefined","interval","getInterval","measurement","getMeasurement","metadata","getMetadata","device","observationDate","start","getDate","observation","resourceType","id","getStableObservationId","date","status","subject","reference","coding","display","extension","url","valueString","JSON","stringify","map","toPortableRecordData","effectivePeriod","toISOString","end","effectiveDateTime","component","minimum","unit","maximum","stageComponents","getSleepStageComponents","length","test","OMITTED_RECORD_FIELDS","Set","Date","Array","isArray","Object","fromEntries","entries","filter","key","has","child","raw","valueSampledData","origin","quantity","period","periodMs","dimensions","values","slot","Number","toFixed","join","number","kind","average","valueQuantity","getTime","extracted","extractValue","candidates","containerKey","valueKey","fallbackUnit","container","normalizeUnit","scalarCandidates","intervals","item","startValue","startDate","startTime","time","endDate","endTime","endValue","isNaN","Boolean","Math","min","max","parsed","sourceRevision","source","manufacturer","dataOrigin","model","sourceApp","name","recordingMethod","flatMap","stages","duration","isFinite","stage","label","text","getUcumCode","includes","normalized","kilometers","meters","miles","count","steps","kilograms","grams","milligrams","kilocalories","calories","minutes","seconds","beatsPerMinute","bpm","mmHg","degC","UCUM_CODES","parts","replace","slice"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-generic-health-data.ts"],"mappings":";;AAAA;;AAKA,SAASA,sBAAsB,EAAEC,kBAAkB,QAAQ,yBAAsB;AAGjF,SAASC,YAAY,EAAEC,WAAW,QAAQ,mBAAgB;AAC1D,SAASC,0BAA0B,QAAQ,gCAA6B;AAOxE,MAAMC,4BAA4B,GAChC,kEAAkE;AAEpE,MAAMC,yBAAyB,GAAG,uCAAuC;AAEzE,MAAMC,qCAAqC,GAAG,MAAAA,CAAO;EACnDC,IAAI;EACJC,SAAS;EACTC,IAAI;EACJC,cAAc,EAAEC,w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,44 @@
1
+ "use strict";
2
+
3
+ import { ObservationCode } from "@ovok/core/next";
4
+ import { LOINC_SYSTEM } from "./fhir-systems.js";
5
+ import { getHealthDataCoding } from "./health-data-catalog.js";
6
+ import { isCoreMeasurementTypeKey } from "./to-core-health-observations.js";
7
+
8
+ /** The code @ovok/core gives each core measurement, by the Apple Health or Health Connect type it is imported from. */
9
+ const CORE_MEASUREMENT_CODES = {
10
+ HKQuantityTypeIdentifierBloodPressureSystolic: ObservationCode.SYSTOLIC_BLOOD_PRESSURE,
11
+ HKQuantityTypeIdentifierBloodPressureDiastolic: ObservationCode.DIASTOLIC_BLOOD_PRESSURE,
12
+ HKQuantityTypeIdentifierHeartRate: ObservationCode.HEART_RATE,
13
+ HKQuantityTypeIdentifierBloodGlucose: ObservationCode.BLOOD_GLUCOSE,
14
+ HKQuantityTypeIdentifierBodyMass: ObservationCode.BODY_WEIGHT,
15
+ HKQuantityTypeIdentifierOxygenSaturation: ObservationCode.OXYGEN_SATURATION,
16
+ HKQuantityTypeIdentifierRespiratoryRate: ObservationCode.RESPIRATORY_RATE,
17
+ HKQuantityTypeIdentifierBodyTemperature: ObservationCode.BODY_TEMPERATURE,
18
+ HKQuantityTypeIdentifierStepCount: ObservationCode.STEPS,
19
+ HKQuantityTypeIdentifierHeartRateVariabilitySDNN: ObservationCode.HEART_RATE_VARIABILITY,
20
+ HKQuantityTypeIdentifierRestingHeartRate: ObservationCode.RESTING_HEART_RATE,
21
+ HKQuantityTypeIdentifierWalkingHeartRateAverage: ObservationCode.WALKING_HEART_RATE_AVERAGE,
22
+ HKQuantityTypeIdentifierVO2Max: ObservationCode.VO2_MAX,
23
+ BloodPressure: ObservationCode.SYSTOLIC_BLOOD_PRESSURE,
24
+ HeartRate: ObservationCode.HEART_RATE,
25
+ BloodGlucose: ObservationCode.BLOOD_GLUCOSE,
26
+ Weight: ObservationCode.BODY_WEIGHT,
27
+ OxygenSaturation: ObservationCode.OXYGEN_SATURATION,
28
+ RespiratoryRate: ObservationCode.RESPIRATORY_RATE,
29
+ BodyTemperature: ObservationCode.BODY_TEMPERATURE,
30
+ Steps: ObservationCode.STEPS,
31
+ RestingHeartRate: ObservationCode.RESTING_HEART_RATE,
32
+ Vo2Max: ObservationCode.VO2_MAX
33
+ };
34
+
35
+ /** The coding a type is saved under when the app names none: core's own code for a core measurement, else the catalog's. */
36
+ const getDefaultHealthCoding = (provider, key, identifier, mode) => {
37
+ const coreCode = isCoreMeasurementTypeKey(key) ? CORE_MEASUREMENT_CODES[identifier] : undefined;
38
+ return coreCode ? {
39
+ code: coreCode,
40
+ system: LOINC_SYSTEM
41
+ } : getHealthDataCoding(provider, identifier, mode);
42
+ };
43
+ export { getDefaultHealthCoding };
44
+ //# sourceMappingURL=default-health-coding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ObservationCode","LOINC_SYSTEM","getHealthDataCoding","isCoreMeasurementTypeKey","CORE_MEASUREMENT_CODES","HKQuantityTypeIdentifierBloodPressureSystolic","SYSTOLIC_BLOOD_PRESSURE","HKQuantityTypeIdentifierBloodPressureDiastolic","DIASTOLIC_BLOOD_PRESSURE","HKQuantityTypeIdentifierHeartRate","HEART_RATE","HKQuantityTypeIdentifierBloodGlucose","BLOOD_GLUCOSE","HKQuantityTypeIdentifierBodyMass","BODY_WEIGHT","HKQuantityTypeIdentifierOxygenSaturation","OXYGEN_SATURATION","HKQuantityTypeIdentifierRespiratoryRate","RESPIRATORY_RATE","HKQuantityTypeIdentifierBodyTemperature","BODY_TEMPERATURE","HKQuantityTypeIdentifierStepCount","STEPS","HKQuantityTypeIdentifierHeartRateVariabilitySDNN","HEART_RATE_VARIABILITY","HKQuantityTypeIdentifierRestingHeartRate","RESTING_HEART_RATE","HKQuantityTypeIdentifierWalkingHeartRateAverage","WALKING_HEART_RATE_AVERAGE","HKQuantityTypeIdentifierVO2Max","VO2_MAX","BloodPressure","HeartRate","BloodGlucose","Weight","OxygenSaturation","RespiratoryRate","BodyTemperature","Steps","RestingHeartRate","Vo2Max","getDefaultHealthCoding","provider","key","identifier","mode","coreCode","undefined","code","system"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/default-health-coding.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,iBAAiB;AAKjD,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,wBAAwB,QAAQ,kCAA+B;;AAExE;AACA,MAAMC,sBAA0E,GAAG;EACjFC,6CAA6C,EAAEL,eAAe,CAACM,uBAAuB;EACtFC,8CAA8C,EAAEP,eAAe,CAACQ,wBAAwB;EACxFC,iCAAiC,EAAET,eAAe,CAACU,UAAU;EAC7DC,oCAAoC,EAAEX,eAAe,CAACY,aAAa;EACnEC,gCAAgC,EAAEb,eAAe,CAACc,WAAW;EAC7DC,wCAAwC,EAAEf,eAAe,CAACgB,iBAAiB;EAC3EC,uCAAuC,EAAEjB,eAAe,CAACkB,gBAAgB;EACzEC,uCAAuC,EAAEnB,eAAe,CAACoB,gBAAgB;EACzEC,iCAAiC,EAAErB,eAAe,CAACsB,KAAK;EACxDC,gDAAgD,EAAEvB,eAAe,CAACwB,sBAAsB;EACxFC,wCAAwC,EAAEzB,eAAe,CAAC0B,kBAAkB;EAC5EC,+CAA+C,EAAE3B,eAAe,CAAC4B,0BAA0B;EAC3FC,8BAA8B,EAAE7B,eAAe,CAAC8B,OAAO;EACvDC,aAAa,EAAE/B,eAAe,CAACM,uBAAuB;EACtD0B,SAAS,EAAEhC,eAAe,CAACU,UAAU;EACrCuB,YAAY,EAAEjC,eAAe,CAACY,aAAa;EAC3CsB,MAAM,EAAElC,eAAe,CAACc,WAAW;EACnCqB,gBAAgB,EAAEnC,eAAe,CAACgB,iBAAiB;EACnDoB,eAAe,EAAEpC,eAAe,CAACkB,gBAAgB;EACjDmB,eAAe,EAAErC,eAAe,CAACoB,gBAAgB;EACjDkB,KAAK,EAAEtC,eAAe,CAACsB,KAAK;EAC5BiB,gBAAgB,EAAEvC,eAAe,CAAC0B,kBAAkB;EACpDc,MAAM,EAAExC,eAAe,CAAC8B;AAC1B,CAAC;;AAED;AACA,MAAMW,sBAAsB,GAAGA,CAC7BC,QAAwB,EACxBC,GAAkB,EAClBC,UAAkB,EAClBC,IAAoB,KACmC;EACvD,MAAMC,QAAQ,GAAG3C,wBAAwB,CAACwC,GAAG,CAAC,GAAGvC,sBAAsB,CAACwC,UAAU,CAAC,GAAGG,SAAS;EAE/F,OAAOD,QAAQ,GAAG;IAAEE,IAAI,EAAEF,QAAQ;IAAEG,MAAM,EAAEhD;EAAa,CAAC,GAAGC,mBAAmB,CAACwC,QAAQ,EAAEE,UAAU,EAAEC,IAAI,CAAC;AAC9G,CAAC;AAED,SAASJ,sBAAsB","ignoreList":[]}
@@ -14,7 +14,12 @@ const HEALTH_UNITS = {
14
14
  HKQuantityTypeIdentifierHeartRateVariabilitySDNN: "ms",
15
15
  HKQuantityTypeIdentifierRestingHeartRate: "count/min",
16
16
  HKQuantityTypeIdentifierRespiratoryRate: "count/min",
17
- HKQuantityTypeIdentifierWalkingHeartRateAverage: "count/min"
17
+ HKQuantityTypeIdentifierWalkingHeartRateAverage: "count/min",
18
+ HKQuantityTypeIdentifierLeanBodyMass: "kg",
19
+ HKQuantityTypeIdentifierDistanceWalkingRunning: "km",
20
+ HKQuantityTypeIdentifierActiveEnergyBurned: "kcal",
21
+ HKQuantityTypeIdentifierAppleExerciseTime: "min",
22
+ HKQuantityTypeIdentifierFlightsClimbed: "count"
18
23
  };
19
24
  export const healthUnitFor = typeIdentifier => HEALTH_UNITS[typeIdentifier];
20
25
  //# sourceMappingURL=health-units.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["HEALTH_UNITS","HKQuantityTypeIdentifierHeight","HKQuantityTypeIdentifierBodyMass","HKQuantityTypeIdentifierBodyFatPercentage","HKQuantityTypeIdentifierBodyTemperature","HKQuantityTypeIdentifierBasalBodyTemperature","HKQuantityTypeIdentifierBloodPressureSystolic","HKQuantityTypeIdentifierBloodPressureDiastolic","HKQuantityTypeIdentifierBloodGlucose","HKQuantityTypeIdentifierOxygenSaturation","HKQuantityTypeIdentifierHeartRate","HKQuantityTypeIdentifierHeartRateVariabilitySDNN","HKQuantityTypeIdentifierRestingHeartRate","HKQuantityTypeIdentifierRespiratoryRate","HKQuantityTypeIdentifierWalkingHeartRateAverage","healthUnitFor","typeIdentifier"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/health-units.ts"],"mappings":";;AAKA,MAAMA,YAA8C,GAAG;EACrDC,8BAA8B,EAAE,GAAG;EACnCC,gCAAgC,EAAE,IAAI;EACtCC,yCAAyC,EAAE,GAAG;EAC9CC,uCAAuC,EAAE,MAAM;EAC/CC,4CAA4C,EAAE,MAAM;EACpDC,6CAA6C,EAAE,MAAM;EACrDC,8CAA8C,EAAE,MAAM;EACtDC,oCAAoC,EAAE,OAAO;EAC7CC,wCAAwC,EAAE,GAAG;EAC7CC,iCAAiC,EAAE,WAAW;EAC9CC,gDAAgD,EAAE,IAAI;EACtDC,wCAAwC,EAAE,WAAW;EACrDC,uCAAuC,EAAE,WAAW;EACpDC,+CAA+C,EAAE;AACnD,CAAC;AAED,OAAO,MAAMC,aAAa,GACxBC,cAAiB,IAEjBhB,YAAY,CAACgB,cAAc,CAAqC","ignoreList":[]}
1
+ {"version":3,"names":["HEALTH_UNITS","HKQuantityTypeIdentifierHeight","HKQuantityTypeIdentifierBodyMass","HKQuantityTypeIdentifierBodyFatPercentage","HKQuantityTypeIdentifierBodyTemperature","HKQuantityTypeIdentifierBasalBodyTemperature","HKQuantityTypeIdentifierBloodPressureSystolic","HKQuantityTypeIdentifierBloodPressureDiastolic","HKQuantityTypeIdentifierBloodGlucose","HKQuantityTypeIdentifierOxygenSaturation","HKQuantityTypeIdentifierHeartRate","HKQuantityTypeIdentifierHeartRateVariabilitySDNN","HKQuantityTypeIdentifierRestingHeartRate","HKQuantityTypeIdentifierRespiratoryRate","HKQuantityTypeIdentifierWalkingHeartRateAverage","HKQuantityTypeIdentifierLeanBodyMass","HKQuantityTypeIdentifierDistanceWalkingRunning","HKQuantityTypeIdentifierActiveEnergyBurned","HKQuantityTypeIdentifierAppleExerciseTime","HKQuantityTypeIdentifierFlightsClimbed","healthUnitFor","typeIdentifier"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/health-units.ts"],"mappings":";;AAKA,MAAMA,YAA8C,GAAG;EACrDC,8BAA8B,EAAE,GAAG;EACnCC,gCAAgC,EAAE,IAAI;EACtCC,yCAAyC,EAAE,GAAG;EAC9CC,uCAAuC,EAAE,MAAM;EAC/CC,4CAA4C,EAAE,MAAM;EACpDC,6CAA6C,EAAE,MAAM;EACrDC,8CAA8C,EAAE,MAAM;EACtDC,oCAAoC,EAAE,OAAO;EAC7CC,wCAAwC,EAAE,GAAG;EAC7CC,iCAAiC,EAAE,WAAW;EAC9CC,gDAAgD,EAAE,IAAI;EACtDC,wCAAwC,EAAE,WAAW;EACrDC,uCAAuC,EAAE,WAAW;EACpDC,+CAA+C,EAAE,WAAW;EAC5DC,oCAAoC,EAAE,IAAI;EAC1CC,8CAA8C,EAAE,IAAI;EACpDC,0CAA0C,EAAE,MAAM;EAClDC,yCAAyC,EAAE,KAAK;EAChDC,sCAAsC,EAAE;AAC1C,CAAC;AAED,OAAO,MAAMC,aAAa,GACxBC,cAAiB,IAEjBrB,YAAY,CAACqB,cAAc,CAAqC","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The page Google returns to when `GoogleLogin` signs in on the web.
3
+ *
4
+ * Serve it as a static file at the redirect URI, by default `/oauth/google.html`. It keeps Google's answer
5
+ * for this tab and sends the tab back to the sign-in screen, so the token never stays in the address.
6
+ */
7
+ export declare const GOOGLE_RETURN_PAGE_HTML: string;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/google-return-page/index.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MASrC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { SocialSignInOptions } from "./use-social-sign-in";
2
+ import type { Session } from "@ovok/core/next";
3
+ /** Rejects: the web signs in through the `SignIn.SocialLogins` buttons, which leave and return to the page. */
4
+ export declare const useSocialSignIn: (_options: SocialSignInOptions) => Omit<import("./use-auth-action").AuthActionState<Session>, "run"> & {
5
+ run: () => Promise<Session>;
6
+ };
7
+ //# sourceMappingURL=use-social-sign-in.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-social-sign-in.web.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-social-sign-in.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAO/C,+GAA+G;AAC/G,eAAO,MAAM,eAAe,GAAI,UAAU,mBAAmB;;CAGzD,CAAC"}
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import "./default-translation";
9
9
  export * from "./sign-in";
10
+ export * from "./google-return-page";
10
11
  export * from "./register";
11
12
  export * from "./profile";
12
13
  export * from "./delete-account-button";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,uBAAuB,CAAC;AAE/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,uBAAuB,CAAC;AAE/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
@@ -28,13 +28,13 @@ export declare const Register: {
28
28
  /** Container for the social sign-up buttons. */
29
29
  SocialLogins: {
30
30
  ({ children, style, testID, }: React.PropsWithChildren<import("../..").SocialLoginsProps>): import("react").JSX.Element;
31
- GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../../sign-in/types/google-login-props").GoogleLoginProps>) => import("react").JSX.Element) & {
31
+ GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => import("react").JSX.Element) & {
32
32
  Icon: import("react").FC<import("../../sign-in/types/google-icon-props").GoogleIconProps>;
33
33
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
34
34
  children?: React.ReactNode;
35
35
  }) => import("react").JSX.Element;
36
36
  };
37
- AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../../sign-in/types/apple-login-props").AppleLoginProps>) => import("react").JSX.Element | null) & {
37
+ AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => import("react").JSX.Element | null) & {
38
38
  Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
39
39
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
40
40
  children?: React.ReactNode;
@@ -33,13 +33,13 @@ export declare const SignIn: {
33
33
  /** Container for the social sign-in buttons. */
34
34
  SocialLogins: {
35
35
  ({ children, style, testID, }: React.PropsWithChildren<import("..").SocialLoginsProps>): import("react").JSX.Element;
36
- GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../types/google-login-props").GoogleLoginProps>) => import("react").JSX.Element) & {
36
+ GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("..").GoogleLoginProps>) => import("react").JSX.Element) & {
37
37
  Icon: import("react").FC<import("../types/google-icon-props").GoogleIconProps>;
38
38
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
39
39
  children?: React.ReactNode;
40
40
  }) => import("react").JSX.Element;
41
41
  };
42
- AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../types/apple-login-props").AppleLoginProps>) => import("react").JSX.Element | null) & {
42
+ AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("..").AppleLoginProps>) => import("react").JSX.Element | null) & {
43
43
  Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
44
44
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
45
45
  children?: React.ReactNode;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { AppleLoginProps } from "../../types/apple-login-props";
3
+ /** Sign in with Apple in a popup, for the Services ID registered for this site; renders nothing without one. */
4
+ export declare const AppleLoginButton: ({ appleServicesId, ...props }: React.PropsWithChildren<AppleLoginProps>) => React.JSX.Element | null;
5
+ //# sourceMappingURL=apple-login-button.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-login-button.web.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/apple-login-button.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAqEhE,gHAAgH;AAChH,eAAO,MAAM,gBAAgB,GAAI,+BAG9B,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,6BAGjC,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @group Components
5
5
  */
6
- export declare const AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../../types/apple-login-props").AppleLoginProps>) => import("react").JSX.Element | null) & {
6
+ export declare const AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => import("react").JSX.Element | null) & {
7
7
  /** Apple icon. */
8
8
  Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
9
9
  /** Button label. */
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { GoogleLoginProps } from "../../types/google-login-props";
3
+ /** Google's sign-in page in this tab; back on the sign-in screen, the ID token it sent signs the user in. */
4
+ export declare const GoogleLoginButton: ({ googleIosClientId: _googleIosClientId, googleWebClientId, googleRedirectUri, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<GoogleLoginProps>) => React.JSX.Element;
5
+ //# sourceMappingURL=google-login-button.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-login-button.web.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/google-login-button.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAQlE,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,GAAI,8JAY/B,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,sBAmD3C,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @group Components
5
5
  */
6
- export declare const GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../../types/google-login-props").GoogleLoginProps>) => import("react").JSX.Element) & {
6
+ export declare const GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => import("react").JSX.Element) & {
7
7
  /** Google icon. */
8
8
  Icon: import("react").FC<import("../../types/google-icon-props").GoogleIconProps>;
9
9
  /** Button label. */
@@ -8,14 +8,14 @@ import { SocialLoginsProps } from "../../types/social-logins-props";
8
8
  export declare const SocialLogins: {
9
9
  ({ children, style, testID, }: React.PropsWithChildren<SocialLoginsProps>): React.JSX.Element;
10
10
  /** Sign in with Google button. */
11
- GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../../types/google-login-props").GoogleLoginProps>) => React.JSX.Element) & {
11
+ GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => React.JSX.Element) & {
12
12
  Icon: React.FC<import("../../types/google-icon-props").GoogleIconProps>;
13
13
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
14
14
  children?: React.ReactNode;
15
15
  }) => React.JSX.Element;
16
16
  };
17
17
  /** Sign in with Apple button. */
18
- AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../../types/apple-login-props").AppleLoginProps>) => React.JSX.Element | null) & {
18
+ AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => React.JSX.Element | null) & {
19
19
  Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => React.JSX.Element;
20
20
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
21
21
  children?: React.ReactNode;
@@ -7,5 +7,7 @@ export * from "./types/spacing-props";
7
7
  export * from "./types/signin-form-forgot-password-props";
8
8
  export * from "./types/login-with-separator-props";
9
9
  export * from "./types/social-logins-props";
10
+ export * from "./types/google-login-props";
11
+ export * from "./types/apple-login-props";
10
12
  export * from "./types/footer-props";
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/sign-in/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/sign-in/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
@@ -1,10 +1,23 @@
1
1
  import { TouchableOpacityProps } from "react-native";
2
2
  import type { Session } from "@ovok/core/next";
3
+ /** Props of `SignIn.SocialLogins.AppleLogin`. */
3
4
  export type AppleLoginProps = Omit<TouchableOpacityProps, "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "children"> & {
5
+ /** The `external-auth-internal-id` of the Apple entry on the ClientApplication; the web needs its own entry. */
4
6
  internalId: string;
7
+ /** Web only: the Services ID Apple signs the user in for. Without it the button renders nothing on the web. */
8
+ appleServicesId?: string;
9
+ /**
10
+ * Web only: a Return URL registered for the Services ID.
11
+ * Defaults to this site's origin.
12
+ */
13
+ appleRedirectUri?: string;
14
+ /** Test identifier of the button. */
5
15
  testID?: string;
16
+ /** Called with the session once the user has signed in. */
6
17
  onSuccess?: (loginResponse: Session) => void;
18
+ /** Called when sign-in fails; a cancelled sign-in is not an error. */
7
19
  onError?: (error: Error) => void;
20
+ /** Button content, usually `AppleLogin.Icon` and `AppleLogin.Text`. */
8
21
  children: React.ReactNode;
9
22
  };
10
23
  //# sourceMappingURL=apple-login-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/apple-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"apple-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/apple-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IAEF,gHAAgH;IAChH,UAAU,EAAE,MAAM,CAAC;IAEnB,+GAA+G;IAC/G,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,uEAAuE;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
@@ -1,12 +1,25 @@
1
1
  import { TouchableOpacityProps } from "react-native";
2
2
  import type { Session } from "@ovok/core/next";
3
+ /** Props of `SignIn.SocialLogins.GoogleLogin`. */
3
4
  export type GoogleLoginProps = Omit<TouchableOpacityProps, "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "children"> & {
5
+ /** Google OAuth client ID for iOS; the web ignores it. */
4
6
  googleIosClientId: string;
7
+ /** Google OAuth web client ID. On the web it is the client ID the sign-in page asks Google for. */
5
8
  googleWebClientId: string;
9
+ /**
10
+ * Web only: the redirect URI Google returns to, which must be an Authorized redirect URI of the web client.
11
+ * Defaults to `/oauth/google.html` on this site, where the app serves `GOOGLE_RETURN_PAGE_HTML`.
12
+ */
13
+ googleRedirectUri?: string;
14
+ /** The `external-auth-internal-id` of the Google entry on the ClientApplication. */
6
15
  internalId: string;
16
+ /** Test identifier of the button. */
7
17
  testID?: string;
18
+ /** Called with the session once the user has signed in. */
8
19
  onSuccess?: (loginResponse: Session) => void;
20
+ /** Called when sign-in fails; a cancelled sign-in is not an error. */
9
21
  onError?: (error: Error) => void;
22
+ /** Button content, usually `GoogleLogin.Icon` and `GoogleLogin.Text`. */
10
23
  children: React.ReactNode;
11
24
  };
12
25
  //# sourceMappingURL=google-login-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/google-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"google-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/google-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IAEF,0DAA0D;IAC1D,iBAAiB,EAAE,MAAM,CAAC;IAE1B,mGAAmG;IACnG,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IAEnB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,yEAAyE;IACzE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { SocialCredentials } from "@ovok/core/next";
2
+ /** The Apple credentials Ovok takes, without the `internalId` of the sign-in entry. */
3
+ type AppleWebCredentials = Omit<SocialCredentials["apple"], "internalId">;
4
+ /** The Services ID Apple signs the user in for, and the return URL registered for it. */
5
+ type AppleWebOptions = {
6
+ servicesId: string;
7
+ /** Defaults to this site's origin. */
8
+ redirectUri?: string;
9
+ };
10
+ /** Loads Sign in with Apple JS once; a failed load is tried again on the next call. */
11
+ declare const loadAppleScript: () => Promise<void>;
12
+ /** Opens Apple's sign-in popup; it must run from a user gesture such as a tap. */
13
+ declare const signInWithApple: ({ servicesId, redirectUri, }: AppleWebOptions) => Promise<AppleWebCredentials>;
14
+ /** Whether the user closed Apple's popup or declined, which is not an error to report. */
15
+ declare const isAppleCancel: (cause: unknown) => boolean;
16
+ export { isAppleCancel, loadAppleScript, signInWithApple, type AppleWebCredentials, type AppleWebOptions, };
17
+ //# sourceMappingURL=apple-web-sign-in.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-web-sign-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/apple-web-sign-in.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAUzD,uFAAuF;AACvF,KAAK,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC;AAE1E,yFAAyF;AACzF,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoCF,uFAAuF;AACvF,QAAA,MAAM,eAAe,QAAO,OAAO,CAAC,IAAI,CAgBvC,CAAC;AAmCF,kFAAkF;AAClF,QAAA,MAAM,eAAe,GAAU,8BAG5B,eAAe,KAAG,OAAO,CAAC,mBAAmB,CAa/C,CAAC;AAEF,0FAA0F;AAC1F,QAAA,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,OAG4B,CAAC;AAErE,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ declare const GOOGLE_REQUEST_KEY = "ovok.google-sign-in";
2
+ declare const GOOGLE_ANSWER_KEY = "ovok.google-sign-in.answer";
3
+ /** Where the tab goes for the ID token, and which address Google returns it to. */
4
+ type GoogleRedirectOptions = {
5
+ clientId: string;
6
+ /** Defaults to the return page at `/oauth/google.html` on this site. */
7
+ redirectUri?: string;
8
+ };
9
+ /** Sends this tab to Google's sign-in page, remembering the request its answer must match. */
10
+ declare const startGoogleSignIn: ({ clientId, redirectUri }: GoogleRedirectOptions) => void;
11
+ /** The ID token Google sent back for this tab's own request; the request and the answer are forgotten either way. */
12
+ declare const takeGoogleIdToken: () => string | undefined;
13
+ export { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY, startGoogleSignIn, takeGoogleIdToken, type GoogleRedirectOptions, };
14
+ //# sourceMappingURL=google-redirect-sign-in.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-redirect-sign-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/google-redirect-sign-in.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,kBAAkB,wBAAwB,CAAC;AACjD,QAAA,MAAM,iBAAiB,+BAA+B,CAAC;AAWvD,mFAAmF;AACnF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IAEjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoCF,8FAA8F;AAC9F,QAAA,MAAM,iBAAiB,GAAI,2BAA2B,qBAAqB,KAAG,IAgB7E,CAAC;AAoBF,qHAAqH;AACrH,QAAA,MAAM,iBAAiB,QAAO,MAAM,GAAG,SActC,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,qBAAqB,GAC3B,CAAC"}
@@ -0,0 +1,9 @@
1
+ /** The claims web sign-in reads from a provider's JWT. */
2
+ type JwtClaims = {
3
+ sub?: string;
4
+ nonce?: string;
5
+ };
6
+ /** A JWT's claims, read without checking the signature; Ovok verifies the token itself. */
7
+ declare const jwtClaims: (jwt: string) => JwtClaims;
8
+ export { jwtClaims, type JwtClaims };
9
+ //# sourceMappingURL=jwt-claims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jwt-claims.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/jwt-claims.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,KAAK,SAAS,GAAG;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAKF,2FAA2F;AAC3F,QAAA,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,SAQhC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The web keeps no Google account in the app, so there is nothing to clear. */
2
+ export declare const signOutGoogleIfNeeded: () => Promise<void>;
3
+ //# sourceMappingURL=sign-out-google.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-out-google.web.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/utils/sign-out-google.web.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,IAAI,CAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"compile-custom-lepu.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/custom/compile-custom-lepu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAuK9D;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,IAAI,MAAM,EACV,MAAM,gBAAgB,EACtB,cAAc,SAAS,MAAM,EAAE,KAC9B,cAAc,GAAG,SAyGnB,CAAC"}
1
+ {"version":3,"file":"compile-custom-lepu.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/custom/compile-custom-lepu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAyK9D;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,IAAI,MAAM,EACV,MAAM,gBAAgB,EACtB,cAAc,SAAS,MAAM,EAAE,KAC9B,cAAc,GAAG,SA4GnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"blood-glucose.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAavD,KAAK,aAAa,GACd,iBAAiB,CAAC,cAAc,GAChC,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,GAAG,CAAC;AA8D1B,gFAAgF;AAChF,qBAAa,kBAAmB,SAAQ,eAAe,CAAC,aAAa,CAAC;IACpE,SAAS,CAAC,gBAAgB,SAAU;IACpC,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAC;gBAGjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,CAAC,aAAa,CAAC;IAM3C,SAAS,CAAC,eAAe,GAAI,KAAK,MAAM,EAAE,KAAG,OAAO,CACsB;IAE1E,SAAS,CAAC,mBAAmB,CAC3B,MAAM,EAAE,uBAAuB,CAAC,yBAAyB,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAC3E,KAAK,EAAE,MAAM,EAAE,GACd,IAAI;CAeR"}
1
+ {"version":3,"file":"blood-glucose.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAcvD,KAAK,aAAa,GACd,iBAAiB,CAAC,cAAc,GAChC,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,GAAG,CAAC;AAmE1B,gFAAgF;AAChF,qBAAa,kBAAmB,SAAQ,eAAe,CAAC,aAAa,CAAC;IACpE,SAAS,CAAC,gBAAgB,SAAU;IACpC,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAC;gBAGjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,CAAC,aAAa,CAAC;IAoB3C,SAAS,CAAC,eAAe,GAAI,KAAK,MAAM,EAAE,KAAG,OAAO,CAAoB;IAExE,SAAS,CAAC,mBAAmB,CAC3B,MAAM,EAAE,uBAAuB,CAAC,yBAAyB,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAC3E,KAAK,EAAE,MAAM,EAAE,GACd,IAAI;CAYR"}
@@ -0,0 +1,34 @@
1
+ import { FrameReadResult } from "../../../types/frame-read-result";
2
+ import { FrameReader } from "../../../types/frame-reader";
3
+ export declare const TELEBGM_SERVICE = "0003cdd0-0000-1000-8000-00805f9b0131";
4
+ export declare const TELEBGM_NOTIFY = "0003cdd1-0000-1000-8000-00805f9b0131";
5
+ export declare const TELEBGM_WRITE = "0003cdd2-0000-1000-8000-00805f9b0131";
6
+ /** Command byte of a frame; the meter answers a request with the same byte. */
7
+ export declare const TELEBGM_COMMAND: {
8
+ readonly testStatus: 18;
9
+ readonly setTime: 68;
10
+ readonly softwareVersion: 102;
11
+ readonly serial: 119;
12
+ readonly units: 170;
13
+ readonly historyEnd: 209;
14
+ readonly history: 221;
15
+ readonly transferEnd: 242;
16
+ };
17
+ /** Parameter byte of a request, a clock write and an acknowledgement. */
18
+ export declare const TELEBGM_PARAMETER: {
19
+ readonly request: 85;
20
+ readonly write: 102;
21
+ readonly ack: 153;
22
+ };
23
+ /** `7B 01 10 01 20 <command> <parameter> <length, 2 bytes> <payload> <CRC nibbles> 7D`. */
24
+ export declare const telebgmFrame: (command: number, parameter: number, payload?: readonly number[]) => string[];
25
+ /** A frame's command byte and payload. */
26
+ export declare const unframe: (frame: readonly string[]) => {
27
+ command?: number;
28
+ payload: number[];
29
+ };
30
+ /** Reads frames by their length field, a record being longer than one notification, and checks their CRC. */
31
+ export declare class TeleBgmFrameReader implements FrameReader {
32
+ readFrame(buffer: readonly string[]): FrameReadResult;
33
+ }
34
+ //# sourceMappingURL=telebgm.protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telebgm.protocol.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM1D,eAAO,MAAM,eAAe,yCAAyC,CAAC;AACtE,eAAO,MAAM,cAAc,yCAAyC,CAAC;AACrE,eAAO,MAAM,aAAa,yCAAyC,CAAC;AAEpE,+EAA+E;AAC/E,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC;AAEX,yEAAyE;AACzE,eAAO,MAAM,iBAAiB;;;;CAAqD,CAAC;AAsBpF,2FAA2F;AAC3F,eAAO,MAAM,YAAY,GACvB,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,UAAS,SAAS,MAAM,EAAO,KAC9B,MAAM,EAIR,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,OAAO,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAIvF,CAAC;AAWF,6GAA6G;AAC7G,qBAAa,kBAAmB,YAAW,WAAW;IAC7C,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe;CA2B7D"}
@@ -0,0 +1,32 @@
1
+ import { ClockSyncOptions } from "../../../types/clock-sync";
2
+ import { CommandSequencer } from "../../../types/command-sequencer";
3
+ import { DeviceCommand } from "../../../types/device-command";
4
+ interface TeleBgmSequencerParams {
5
+ onResult: (result: Record<string, unknown>) => void;
6
+ /** True when the write characteristic takes only writes without response. */
7
+ writesWithoutResponse: () => Promise<boolean>;
8
+ clockSync?: ClockSyncOptions;
9
+ }
10
+ /**
11
+ * TeleBGM Gen1: reads the serial, version and units, sets the clock, then downloads the stored
12
+ * readings. The meter sends a reading only when asked for its history, and expects every
13
+ * test-status frame and the end of a transfer to be acknowledged.
14
+ */
15
+ export declare class TeleBgmSequencer implements CommandSequencer {
16
+ private readonly params;
17
+ private withoutResponse;
18
+ private reportsMmol;
19
+ private finished;
20
+ constructor(params: TeleBgmSequencerParams);
21
+ initialCommands: () => Promise<readonly DeviceCommand[]>;
22
+ isHistoryTransfer: () => boolean;
23
+ isNormalDisconnect: () => boolean;
24
+ nextCommand: (frame: readonly string[]) => readonly DeviceCommand[] | undefined;
25
+ private report;
26
+ private setClock;
27
+ private request;
28
+ private acknowledge;
29
+ private command;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=telebgm.sequencer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telebgm.sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,gBAAgB,EAIjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAsB9D,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAEpD,6EAA6E;IAC7E,qBAAqB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AA6BD;;;;GAIG;AACH,qBAAa,gBAAiB,YAAW,gBAAgB;IAKpC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJ1C,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAS;gBAEW,MAAM,EAAE,sBAAsB;IAE3D,eAAe,QAAa,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAIlE;IAEK,iBAAiB,QAAO,OAAO,CAAS;IAExC,kBAAkB,QAAO,OAAO,CAAkB;IAElD,W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,CAAC,SAAS,CAAyD;IACnF,OAAO,CAAC,cAAc,CAGlB;IACJ,OAAO,CAAC,iBAAiB,CAAqB;IAE9C,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAmB;IACrD,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAS;gBAGzC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,GAAG,CAAC;IAUnD,SAAS,CAAC,aAAa,EAAE,MAAM,IAAI,CAKjC;IAEF,SAAS,CAAC,sBAAsB,QAAO,gBAAgB,CA0BrD;IAEF,SAAS,CAAC,WAAW,EAAE,cAAc,CAAwB;IAC7D,SAAS,CAAC,YAAY,EAAE,MAAM,CAAiB;IAE/C,SAAS,CAAC,mBAAmB,CAC3B,aAAa,EAAE,uBAAuB,CACpC,yBAAyB,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CACnD,EACD,eAAe,EAAE,MAAM,EAAE,GACxB,IAAI,GAAG,OAAO;IA0BjB,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,eAAe;IA2CvB,OAAO,CAAC,yBAAyB;IAwBjC,OAAO,CAAC,kBAAkB,CASxB;IAEF,OAAO,CAAC,+BAA+B;IAiDvC,OAAO,CAAC,kBAAkB,CAYxB;IAEF,OAAO,CAAC,YAAY,CAiBF;IAElB,OAAO,CAAC,iBAAiB,CA4CvB;IAEF,OAAO,CAAC,oBAAoB,CAwB1B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,oBAAoB,CAO1B;IAEF,OAAO,CAAC,qBAAqB;CAoD9B;AAED,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC"}
1
+ {"version":3,"file":"bp2.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.device.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQ9C,OAAO,EA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YAAY,EAAE,MAAM,CAAiB;IAE/C,SAAS,CAAC,mBAAmB,CAC3B,aAAa,EAAE,uBAAuB,CACpC,yBAAyB,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CACnD,EACD,eAAe,EAAE,MAAM,EAAE,GACxB,IAAI,GAAG,OAAO;IA0BjB,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,eAAe;IA2CvB,OAAO,CAAC,yBAAyB;IAwBjC,OAAO,CAAC,kBAAkB,CASxB;IAEF,OAAO,CAAC,+BAA+B;IAiDvC,OAAO,CAAC,kBAAkB,CAYxB;IAEF,OAAO,CAAC,YAAY,CAiBF;IAElB,OAAO,CAAC,iBAAiB,CA6CvB;IAEF,OAAO,CAAC,oBAAoB,CAwB1B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,oBAAoB,CAO1B;IAEF,OAAO,CAAC,qBAAqB;CAmD9B;AAED,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { ClockSyncOptions } from "../../../types/clock-sync";
2
- import { CommandSequencer } from "../../../types/command-sequencer";
2
+ import { CommandSequencer, CommandTimeoutResult } from "../../../types/command-sequencer";
3
3
  import { DeviceCommand } from "../../../types/device-command";
4
4
  import { LepuFile } from "../lepu/lepu.file-transfer";
5
5
  declare const BP2_REALTIME_COMMAND = 8;
@@ -26,9 +26,15 @@ declare class BP2HistorySequencer implements CommandSequencer {
26
26
  constructor(params: BP2HistorySequencerParams);
27
27
  initialCommands: () => readonly DeviceCommand[];
28
28
  isHistoryTransfer: () => boolean;
29
+ commandTimeoutMs: () => number | undefined;
30
+ /** The BP2 can drop a poll while it starts measuring, so a missing answer is asked for again. */
31
+ onCommandTimeout: () => CommandTimeoutResult;
32
+ /** Only the realtime answer settles a poll; any other frame leaves its timeout running. */
33
+ commandProgress: (frame: readonly string[]) => "ignored" | "complete";
29
34
  nextCommand: (frame: readonly string[]) => readonly DeviceCommand[] | undefined;
30
35
  private startTransfer;
31
36
  private finishTransfer;
37
+ private isPolling;
32
38
  private pollCommand;
33
39
  private isResultFrame;
34
40
  private isIdleFrame;