@tryvital/vital-node 3.0.9 → 3.1.1

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 (643) hide show
  1. package/api/resources/activity/client/Client.js +2 -2
  2. package/api/resources/body/client/Client.js +2 -2
  3. package/api/resources/devices/client/Client.js +1 -1
  4. package/api/resources/insurance/client/Client.js +2 -2
  5. package/api/resources/introspect/client/Client.js +2 -2
  6. package/api/resources/labTests/client/Client.js +24 -24
  7. package/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +2 -0
  8. package/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +1 -1
  9. package/api/resources/link/client/Client.js +13 -13
  10. package/api/resources/meal/client/Client.js +1 -1
  11. package/api/resources/profile/client/Client.js +2 -2
  12. package/api/resources/providers/client/Client.js +1 -1
  13. package/api/resources/sleep/client/Client.js +4 -4
  14. package/api/resources/team/client/Client.js +7 -7
  15. package/api/resources/testkit/client/Client.js +2 -2
  16. package/api/resources/user/client/Client.d.ts +4 -0
  17. package/api/resources/user/client/Client.js +78 -11
  18. package/api/resources/user/client/requests/UserCreateBody.d.ts +2 -0
  19. package/api/resources/user/client/requests/UserPatchBody.d.ts +2 -0
  20. package/api/resources/user/client/requests/UserUndoDeleteRequest.d.ts +13 -0
  21. package/api/resources/user/client/requests/index.d.ts +1 -0
  22. package/api/resources/vitals/client/Client.d.ts +249 -29
  23. package/api/resources/vitals/client/Client.js +2074 -57
  24. package/api/resources/vitals/client/requests/VitalsBloodOxygenGroupedRequest.d.ts +27 -0
  25. package/api/resources/vitals/client/requests/VitalsBloodPressureGroupedRequest.d.ts +27 -0
  26. package/api/resources/vitals/client/requests/VitalsBloodPressureGroupedRequest.js +5 -0
  27. package/api/resources/vitals/client/requests/VitalsBodyFatGroupedRequest.d.ts +27 -0
  28. package/api/resources/vitals/client/requests/VitalsBodyFatGroupedRequest.js +5 -0
  29. package/api/resources/vitals/client/requests/{VitalsTriglyceridesRequest.d.ts → VitalsBodyFatRequest.d.ts} +1 -1
  30. package/api/resources/vitals/client/requests/VitalsBodyFatRequest.js +5 -0
  31. package/api/resources/vitals/client/requests/VitalsBodyWeightGroupedRequest.d.ts +27 -0
  32. package/api/resources/vitals/client/requests/VitalsBodyWeightGroupedRequest.js +5 -0
  33. package/{dist/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts → api/resources/vitals/client/requests/VitalsBodyWeightRequest.d.ts} +1 -1
  34. package/api/resources/vitals/client/requests/VitalsBodyWeightRequest.js +5 -0
  35. package/api/resources/vitals/client/requests/VitalsCaffeineGroupedRequest.d.ts +27 -0
  36. package/api/resources/vitals/client/requests/VitalsCaffeineGroupedRequest.js +5 -0
  37. package/api/resources/vitals/client/requests/VitalsCaloriesActiveGroupedRequest.d.ts +27 -0
  38. package/api/resources/vitals/client/requests/VitalsCaloriesActiveGroupedRequest.js +5 -0
  39. package/api/resources/vitals/client/requests/VitalsCaloriesBasalGroupedRequest.d.ts +27 -0
  40. package/api/resources/vitals/client/requests/VitalsCaloriesBasalGroupedRequest.js +5 -0
  41. package/api/resources/vitals/client/requests/VitalsCholesterolGroupedRequest.d.ts +27 -0
  42. package/api/resources/vitals/client/requests/VitalsCholesterolGroupedRequest.js +5 -0
  43. package/api/resources/vitals/client/requests/VitalsCholesterolTriglyceridesRequest.d.ts +23 -0
  44. package/api/resources/vitals/client/requests/VitalsCholesterolTriglyceridesRequest.js +5 -0
  45. package/api/resources/vitals/client/requests/VitalsDistanceGroupedRequest.d.ts +27 -0
  46. package/api/resources/vitals/client/requests/VitalsDistanceGroupedRequest.js +5 -0
  47. package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageGroupedRequest.d.ts +27 -0
  48. package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageGroupedRequest.js +5 -0
  49. package/api/resources/vitals/client/requests/VitalsFloorsClimbedGroupedRequest.d.ts +27 -0
  50. package/api/resources/vitals/client/requests/VitalsFloorsClimbedGroupedRequest.js +5 -0
  51. package/api/resources/vitals/client/requests/VitalsGlucoseGroupedRequest.d.ts +27 -0
  52. package/api/resources/vitals/client/requests/VitalsGlucoseGroupedRequest.js +5 -0
  53. package/api/resources/vitals/client/requests/VitalsHeartrateGroupedRequest.d.ts +27 -0
  54. package/api/resources/vitals/client/requests/VitalsHeartrateGroupedRequest.js +5 -0
  55. package/api/resources/vitals/client/requests/VitalsHrvGroupedRequest.d.ts +27 -0
  56. package/api/resources/vitals/client/requests/VitalsHrvGroupedRequest.js +5 -0
  57. package/api/resources/vitals/client/requests/VitalsHypnogramGroupedRequest.d.ts +27 -0
  58. package/api/resources/vitals/client/requests/VitalsHypnogramGroupedRequest.js +5 -0
  59. package/api/resources/vitals/client/requests/VitalsIgeGroupedRequest.d.ts +27 -0
  60. package/api/resources/vitals/client/requests/VitalsIgeGroupedRequest.js +5 -0
  61. package/api/resources/vitals/client/requests/VitalsIggGroupedRequest.d.ts +27 -0
  62. package/api/resources/vitals/client/requests/VitalsIggGroupedRequest.js +5 -0
  63. package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesGroupedRequest.d.ts +27 -0
  64. package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesGroupedRequest.js +5 -0
  65. package/api/resources/vitals/client/requests/VitalsRespiratoryRateGroupedRequest.d.ts +27 -0
  66. package/api/resources/vitals/client/requests/VitalsRespiratoryRateGroupedRequest.js +5 -0
  67. package/api/resources/vitals/client/requests/VitalsStepsGroupedRequest.d.ts +27 -0
  68. package/api/resources/vitals/client/requests/VitalsStepsGroupedRequest.js +5 -0
  69. package/api/resources/vitals/client/requests/VitalsStressLevelGroupedRequest.d.ts +27 -0
  70. package/api/resources/vitals/client/requests/VitalsStressLevelGroupedRequest.js +5 -0
  71. package/api/resources/vitals/client/requests/VitalsStressLevelRequest.d.ts +23 -0
  72. package/api/resources/vitals/client/requests/VitalsStressLevelRequest.js +5 -0
  73. package/api/resources/vitals/client/requests/VitalsVo2MaxGroupedRequest.d.ts +27 -0
  74. package/api/resources/vitals/client/requests/VitalsVo2MaxGroupedRequest.js +5 -0
  75. package/api/resources/vitals/client/requests/VitalsVo2MaxRequest.d.ts +23 -0
  76. package/api/resources/vitals/client/requests/VitalsVo2MaxRequest.js +5 -0
  77. package/api/resources/vitals/client/requests/VitalsWaterGroupedRequest.d.ts +27 -0
  78. package/api/resources/vitals/client/requests/VitalsWaterGroupedRequest.js +5 -0
  79. package/api/resources/vitals/client/requests/index.d.ts +29 -2
  80. package/api/resources/workouts/client/Client.js +3 -3
  81. package/api/types/ClientFacingBodyFatTimeseries.d.ts +17 -0
  82. package/api/types/ClientFacingBodyFatTimeseries.js +5 -0
  83. package/api/types/ClientFacingBodyWeightTimeseries.d.ts +17 -0
  84. package/api/types/ClientFacingBodyWeightTimeseries.js +5 -0
  85. package/api/types/ClientFacingOrder.d.ts +2 -0
  86. package/api/types/ClientFacingResult.d.ts +1 -0
  87. package/api/types/ClientFacingStressLevelTimeseries.d.ts +16 -0
  88. package/api/types/ClientFacingStressLevelTimeseries.js +5 -0
  89. package/api/types/ClientFacingUser.d.ts +2 -0
  90. package/api/types/ClientFacingVo2MaxTimeseries.d.ts +21 -0
  91. package/api/types/ClientFacingVo2MaxTimeseries.js +5 -0
  92. package/api/types/FallbackBirthDate.d.ts +10 -0
  93. package/api/types/FallbackBirthDate.js +5 -0
  94. package/api/types/GroupedBloodOxygen.d.ts +8 -0
  95. package/api/types/GroupedBloodOxygen.js +5 -0
  96. package/api/types/GroupedBloodOxygenResponse.d.ts +10 -0
  97. package/api/types/GroupedBloodOxygenResponse.js +5 -0
  98. package/api/types/GroupedBloodPressure.d.ts +8 -0
  99. package/api/types/GroupedBloodPressure.js +5 -0
  100. package/api/types/GroupedBloodPressureResponse.d.ts +10 -0
  101. package/api/types/GroupedBloodPressureResponse.js +5 -0
  102. package/api/types/GroupedBodyFat.d.ts +8 -0
  103. package/api/types/GroupedBodyFat.js +5 -0
  104. package/api/types/GroupedBodyFatResponse.d.ts +10 -0
  105. package/api/types/GroupedBodyFatResponse.js +5 -0
  106. package/api/types/GroupedBodyWeight.d.ts +8 -0
  107. package/api/types/GroupedBodyWeight.js +5 -0
  108. package/api/types/GroupedBodyWeightResponse.d.ts +10 -0
  109. package/api/types/GroupedBodyWeightResponse.js +5 -0
  110. package/api/types/GroupedCaffeine.d.ts +8 -0
  111. package/api/types/GroupedCaffeine.js +5 -0
  112. package/api/types/GroupedCaffeineResponse.d.ts +10 -0
  113. package/api/types/GroupedCaffeineResponse.js +5 -0
  114. package/api/types/GroupedCaloriesActive.d.ts +8 -0
  115. package/api/types/GroupedCaloriesActive.js +5 -0
  116. package/api/types/GroupedCaloriesActiveResponse.d.ts +10 -0
  117. package/api/types/GroupedCaloriesActiveResponse.js +5 -0
  118. package/api/types/GroupedCaloriesBasal.d.ts +8 -0
  119. package/api/types/GroupedCaloriesBasal.js +5 -0
  120. package/api/types/GroupedCaloriesBasalResponse.d.ts +10 -0
  121. package/api/types/GroupedCaloriesBasalResponse.js +5 -0
  122. package/api/types/GroupedCholesterol.d.ts +8 -0
  123. package/api/types/GroupedCholesterol.js +5 -0
  124. package/api/types/GroupedCholesterolResponse.d.ts +10 -0
  125. package/api/types/GroupedCholesterolResponse.js +5 -0
  126. package/api/types/GroupedDistance.d.ts +8 -0
  127. package/api/types/GroupedDistance.js +5 -0
  128. package/api/types/GroupedDistanceResponse.d.ts +10 -0
  129. package/api/types/GroupedDistanceResponse.js +5 -0
  130. package/api/types/GroupedElectrocardiogramVoltage.d.ts +8 -0
  131. package/api/types/GroupedElectrocardiogramVoltage.js +5 -0
  132. package/api/types/GroupedElectrocardiogramVoltageResponse.d.ts +10 -0
  133. package/api/types/GroupedElectrocardiogramVoltageResponse.js +5 -0
  134. package/api/types/GroupedFloorsClimbed.d.ts +8 -0
  135. package/api/types/GroupedFloorsClimbed.js +5 -0
  136. package/api/types/GroupedFloorsClimbedResponse.d.ts +10 -0
  137. package/api/types/GroupedFloorsClimbedResponse.js +5 -0
  138. package/api/types/GroupedGlucose.d.ts +8 -0
  139. package/api/types/GroupedGlucose.js +5 -0
  140. package/api/types/GroupedGlucoseResponse.d.ts +10 -0
  141. package/api/types/GroupedGlucoseResponse.js +5 -0
  142. package/api/types/GroupedHeartRate.d.ts +8 -0
  143. package/api/types/GroupedHeartRate.js +5 -0
  144. package/api/types/GroupedHeartRateResponse.d.ts +10 -0
  145. package/api/types/GroupedHeartRateResponse.js +5 -0
  146. package/api/types/GroupedHrv.d.ts +8 -0
  147. package/api/types/GroupedHrv.js +5 -0
  148. package/api/types/GroupedHrvResponse.d.ts +10 -0
  149. package/api/types/GroupedHrvResponse.js +5 -0
  150. package/api/types/GroupedHypnogram.d.ts +8 -0
  151. package/api/types/GroupedHypnogram.js +5 -0
  152. package/api/types/GroupedHypnogramResponse.d.ts +10 -0
  153. package/api/types/GroupedHypnogramResponse.js +5 -0
  154. package/api/types/GroupedIge.d.ts +8 -0
  155. package/api/types/GroupedIge.js +5 -0
  156. package/api/types/GroupedIgeResponse.d.ts +10 -0
  157. package/api/types/GroupedIgeResponse.js +5 -0
  158. package/api/types/GroupedIgg.d.ts +8 -0
  159. package/api/types/GroupedIgg.js +5 -0
  160. package/api/types/GroupedIggResponse.d.ts +10 -0
  161. package/api/types/GroupedIggResponse.js +5 -0
  162. package/api/types/GroupedMindfulnessMinutes.d.ts +8 -0
  163. package/api/types/GroupedMindfulnessMinutes.js +5 -0
  164. package/api/types/GroupedMindfulnessMinutesResponse.d.ts +10 -0
  165. package/api/types/GroupedMindfulnessMinutesResponse.js +5 -0
  166. package/api/types/GroupedRespiratoryRate.d.ts +8 -0
  167. package/api/types/GroupedRespiratoryRate.js +5 -0
  168. package/api/types/GroupedRespiratoryRateResponse.d.ts +10 -0
  169. package/api/types/GroupedRespiratoryRateResponse.js +5 -0
  170. package/api/types/GroupedSteps.d.ts +8 -0
  171. package/api/types/GroupedSteps.js +5 -0
  172. package/api/types/GroupedStepsResponse.d.ts +10 -0
  173. package/api/types/GroupedStepsResponse.js +5 -0
  174. package/api/types/GroupedStressLevel.d.ts +8 -0
  175. package/api/types/GroupedStressLevel.js +5 -0
  176. package/api/types/GroupedStressLevelResponse.d.ts +10 -0
  177. package/api/types/GroupedStressLevelResponse.js +5 -0
  178. package/api/types/GroupedVo2Max.d.ts +8 -0
  179. package/api/types/GroupedVo2Max.js +5 -0
  180. package/api/types/GroupedVo2MaxResponse.d.ts +10 -0
  181. package/api/types/GroupedVo2MaxResponse.js +5 -0
  182. package/api/types/GroupedWater.d.ts +8 -0
  183. package/api/types/GroupedWater.js +5 -0
  184. package/api/types/GroupedWaterResponse.d.ts +10 -0
  185. package/api/types/GroupedWaterResponse.js +5 -0
  186. package/api/types/TimeseriesResource.d.ts +3 -4
  187. package/api/types/TimeseriesResource.js +2 -3
  188. package/api/types/index.d.ts +51 -0
  189. package/api/types/index.js +51 -0
  190. package/dist/api/resources/activity/client/Client.js +2 -2
  191. package/dist/api/resources/body/client/Client.js +2 -2
  192. package/dist/api/resources/devices/client/Client.js +1 -1
  193. package/dist/api/resources/insurance/client/Client.js +2 -2
  194. package/dist/api/resources/introspect/client/Client.js +2 -2
  195. package/dist/api/resources/labTests/client/Client.js +24 -24
  196. package/dist/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +2 -0
  197. package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +1 -1
  198. package/dist/api/resources/link/client/Client.js +13 -13
  199. package/dist/api/resources/meal/client/Client.js +1 -1
  200. package/dist/api/resources/profile/client/Client.js +2 -2
  201. package/dist/api/resources/providers/client/Client.js +1 -1
  202. package/dist/api/resources/sleep/client/Client.js +4 -4
  203. package/dist/api/resources/team/client/Client.js +7 -7
  204. package/dist/api/resources/testkit/client/Client.js +2 -2
  205. package/dist/api/resources/user/client/Client.d.ts +4 -0
  206. package/dist/api/resources/user/client/Client.js +78 -11
  207. package/dist/api/resources/user/client/requests/UserCreateBody.d.ts +2 -0
  208. package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +2 -0
  209. package/dist/api/resources/user/client/requests/UserUndoDeleteRequest.d.ts +13 -0
  210. package/dist/api/resources/user/client/requests/UserUndoDeleteRequest.js +5 -0
  211. package/dist/api/resources/user/client/requests/index.d.ts +1 -0
  212. package/dist/api/resources/vitals/client/Client.d.ts +249 -29
  213. package/dist/api/resources/vitals/client/Client.js +2074 -57
  214. package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenGroupedRequest.d.ts +27 -0
  215. package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenGroupedRequest.js +5 -0
  216. package/dist/api/resources/vitals/client/requests/VitalsBloodPressureGroupedRequest.d.ts +27 -0
  217. package/dist/api/resources/vitals/client/requests/VitalsBloodPressureGroupedRequest.js +5 -0
  218. package/dist/api/resources/vitals/client/requests/VitalsBodyFatGroupedRequest.d.ts +27 -0
  219. package/dist/api/resources/vitals/client/requests/VitalsBodyFatGroupedRequest.js +5 -0
  220. package/dist/api/resources/vitals/client/requests/VitalsBodyFatRequest.d.ts +23 -0
  221. package/dist/api/resources/vitals/client/requests/VitalsBodyFatRequest.js +5 -0
  222. package/dist/api/resources/vitals/client/requests/VitalsBodyWeightGroupedRequest.d.ts +27 -0
  223. package/dist/api/resources/vitals/client/requests/VitalsBodyWeightGroupedRequest.js +5 -0
  224. package/dist/api/resources/vitals/client/requests/VitalsBodyWeightRequest.d.ts +23 -0
  225. package/dist/api/resources/vitals/client/requests/VitalsBodyWeightRequest.js +5 -0
  226. package/dist/api/resources/vitals/client/requests/VitalsCaffeineGroupedRequest.d.ts +27 -0
  227. package/dist/api/resources/vitals/client/requests/VitalsCaffeineGroupedRequest.js +5 -0
  228. package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveGroupedRequest.d.ts +27 -0
  229. package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveGroupedRequest.js +5 -0
  230. package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalGroupedRequest.d.ts +27 -0
  231. package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalGroupedRequest.js +5 -0
  232. package/dist/api/resources/vitals/client/requests/VitalsCholesterolGroupedRequest.d.ts +27 -0
  233. package/dist/api/resources/vitals/client/requests/VitalsCholesterolGroupedRequest.js +5 -0
  234. package/dist/api/resources/vitals/client/requests/VitalsCholesterolTriglyceridesRequest.d.ts +23 -0
  235. package/dist/api/resources/vitals/client/requests/VitalsCholesterolTriglyceridesRequest.js +5 -0
  236. package/dist/api/resources/vitals/client/requests/VitalsDistanceGroupedRequest.d.ts +27 -0
  237. package/dist/api/resources/vitals/client/requests/VitalsDistanceGroupedRequest.js +5 -0
  238. package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageGroupedRequest.d.ts +27 -0
  239. package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageGroupedRequest.js +5 -0
  240. package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedGroupedRequest.d.ts +27 -0
  241. package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedGroupedRequest.js +5 -0
  242. package/dist/api/resources/vitals/client/requests/VitalsGlucoseGroupedRequest.d.ts +27 -0
  243. package/dist/api/resources/vitals/client/requests/VitalsGlucoseGroupedRequest.js +5 -0
  244. package/dist/api/resources/vitals/client/requests/VitalsHeartrateGroupedRequest.d.ts +27 -0
  245. package/dist/api/resources/vitals/client/requests/VitalsHeartrateGroupedRequest.js +5 -0
  246. package/dist/api/resources/vitals/client/requests/VitalsHrvGroupedRequest.d.ts +27 -0
  247. package/dist/api/resources/vitals/client/requests/VitalsHrvGroupedRequest.js +5 -0
  248. package/dist/api/resources/vitals/client/requests/VitalsHypnogramGroupedRequest.d.ts +27 -0
  249. package/dist/api/resources/vitals/client/requests/VitalsHypnogramGroupedRequest.js +5 -0
  250. package/dist/api/resources/vitals/client/requests/VitalsIgeGroupedRequest.d.ts +27 -0
  251. package/dist/api/resources/vitals/client/requests/VitalsIgeGroupedRequest.js +5 -0
  252. package/dist/api/resources/vitals/client/requests/VitalsIggGroupedRequest.d.ts +27 -0
  253. package/dist/api/resources/vitals/client/requests/VitalsIggGroupedRequest.js +5 -0
  254. package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesGroupedRequest.d.ts +27 -0
  255. package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesGroupedRequest.js +5 -0
  256. package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateGroupedRequest.d.ts +27 -0
  257. package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateGroupedRequest.js +5 -0
  258. package/dist/api/resources/vitals/client/requests/VitalsStepsGroupedRequest.d.ts +27 -0
  259. package/dist/api/resources/vitals/client/requests/VitalsStepsGroupedRequest.js +5 -0
  260. package/dist/api/resources/vitals/client/requests/VitalsStressLevelGroupedRequest.d.ts +27 -0
  261. package/dist/api/resources/vitals/client/requests/VitalsStressLevelGroupedRequest.js +5 -0
  262. package/dist/api/resources/vitals/client/requests/VitalsStressLevelRequest.d.ts +23 -0
  263. package/dist/api/resources/vitals/client/requests/VitalsStressLevelRequest.js +5 -0
  264. package/dist/api/resources/vitals/client/requests/VitalsVo2MaxGroupedRequest.d.ts +27 -0
  265. package/dist/api/resources/vitals/client/requests/VitalsVo2MaxGroupedRequest.js +5 -0
  266. package/dist/api/resources/vitals/client/requests/VitalsVo2MaxRequest.d.ts +23 -0
  267. package/dist/api/resources/vitals/client/requests/VitalsVo2MaxRequest.js +5 -0
  268. package/dist/api/resources/vitals/client/requests/VitalsWaterGroupedRequest.d.ts +27 -0
  269. package/dist/api/resources/vitals/client/requests/VitalsWaterGroupedRequest.js +5 -0
  270. package/dist/api/resources/vitals/client/requests/index.d.ts +29 -2
  271. package/dist/api/resources/workouts/client/Client.js +3 -3
  272. package/dist/api/types/ClientFacingBodyFatTimeseries.d.ts +17 -0
  273. package/dist/api/types/ClientFacingBodyFatTimeseries.js +5 -0
  274. package/dist/api/types/ClientFacingBodyWeightTimeseries.d.ts +17 -0
  275. package/dist/api/types/ClientFacingBodyWeightTimeseries.js +5 -0
  276. package/dist/api/types/ClientFacingOrder.d.ts +2 -0
  277. package/dist/api/types/ClientFacingResult.d.ts +1 -0
  278. package/dist/api/types/ClientFacingStressLevelTimeseries.d.ts +16 -0
  279. package/dist/api/types/ClientFacingStressLevelTimeseries.js +5 -0
  280. package/dist/api/types/ClientFacingUser.d.ts +2 -0
  281. package/dist/api/types/ClientFacingVo2MaxTimeseries.d.ts +21 -0
  282. package/dist/api/types/ClientFacingVo2MaxTimeseries.js +5 -0
  283. package/dist/api/types/FallbackBirthDate.d.ts +10 -0
  284. package/dist/api/types/FallbackBirthDate.js +5 -0
  285. package/dist/api/types/GroupedBloodOxygen.d.ts +8 -0
  286. package/dist/api/types/GroupedBloodOxygen.js +5 -0
  287. package/dist/api/types/GroupedBloodOxygenResponse.d.ts +10 -0
  288. package/dist/api/types/GroupedBloodOxygenResponse.js +5 -0
  289. package/dist/api/types/GroupedBloodPressure.d.ts +8 -0
  290. package/dist/api/types/GroupedBloodPressure.js +5 -0
  291. package/dist/api/types/GroupedBloodPressureResponse.d.ts +10 -0
  292. package/dist/api/types/GroupedBloodPressureResponse.js +5 -0
  293. package/dist/api/types/GroupedBodyFat.d.ts +8 -0
  294. package/dist/api/types/GroupedBodyFat.js +5 -0
  295. package/dist/api/types/GroupedBodyFatResponse.d.ts +10 -0
  296. package/dist/api/types/GroupedBodyFatResponse.js +5 -0
  297. package/dist/api/types/GroupedBodyWeight.d.ts +8 -0
  298. package/dist/api/types/GroupedBodyWeight.js +5 -0
  299. package/dist/api/types/GroupedBodyWeightResponse.d.ts +10 -0
  300. package/dist/api/types/GroupedBodyWeightResponse.js +5 -0
  301. package/dist/api/types/GroupedCaffeine.d.ts +8 -0
  302. package/dist/api/types/GroupedCaffeine.js +5 -0
  303. package/dist/api/types/GroupedCaffeineResponse.d.ts +10 -0
  304. package/dist/api/types/GroupedCaffeineResponse.js +5 -0
  305. package/dist/api/types/GroupedCaloriesActive.d.ts +8 -0
  306. package/dist/api/types/GroupedCaloriesActive.js +5 -0
  307. package/dist/api/types/GroupedCaloriesActiveResponse.d.ts +10 -0
  308. package/dist/api/types/GroupedCaloriesActiveResponse.js +5 -0
  309. package/dist/api/types/GroupedCaloriesBasal.d.ts +8 -0
  310. package/dist/api/types/GroupedCaloriesBasal.js +5 -0
  311. package/dist/api/types/GroupedCaloriesBasalResponse.d.ts +10 -0
  312. package/dist/api/types/GroupedCaloriesBasalResponse.js +5 -0
  313. package/dist/api/types/GroupedCholesterol.d.ts +8 -0
  314. package/dist/api/types/GroupedCholesterol.js +5 -0
  315. package/dist/api/types/GroupedCholesterolResponse.d.ts +10 -0
  316. package/dist/api/types/GroupedCholesterolResponse.js +5 -0
  317. package/dist/api/types/GroupedDistance.d.ts +8 -0
  318. package/dist/api/types/GroupedDistance.js +5 -0
  319. package/dist/api/types/GroupedDistanceResponse.d.ts +10 -0
  320. package/dist/api/types/GroupedDistanceResponse.js +5 -0
  321. package/dist/api/types/GroupedElectrocardiogramVoltage.d.ts +8 -0
  322. package/dist/api/types/GroupedElectrocardiogramVoltage.js +5 -0
  323. package/dist/api/types/GroupedElectrocardiogramVoltageResponse.d.ts +10 -0
  324. package/dist/api/types/GroupedElectrocardiogramVoltageResponse.js +5 -0
  325. package/dist/api/types/GroupedFloorsClimbed.d.ts +8 -0
  326. package/dist/api/types/GroupedFloorsClimbed.js +5 -0
  327. package/dist/api/types/GroupedFloorsClimbedResponse.d.ts +10 -0
  328. package/dist/api/types/GroupedFloorsClimbedResponse.js +5 -0
  329. package/dist/api/types/GroupedGlucose.d.ts +8 -0
  330. package/dist/api/types/GroupedGlucose.js +5 -0
  331. package/dist/api/types/GroupedGlucoseResponse.d.ts +10 -0
  332. package/dist/api/types/GroupedGlucoseResponse.js +5 -0
  333. package/dist/api/types/GroupedHeartRate.d.ts +8 -0
  334. package/dist/api/types/GroupedHeartRate.js +5 -0
  335. package/dist/api/types/GroupedHeartRateResponse.d.ts +10 -0
  336. package/dist/api/types/GroupedHeartRateResponse.js +5 -0
  337. package/dist/api/types/GroupedHrv.d.ts +8 -0
  338. package/dist/api/types/GroupedHrv.js +5 -0
  339. package/dist/api/types/GroupedHrvResponse.d.ts +10 -0
  340. package/dist/api/types/GroupedHrvResponse.js +5 -0
  341. package/dist/api/types/GroupedHypnogram.d.ts +8 -0
  342. package/dist/api/types/GroupedHypnogram.js +5 -0
  343. package/dist/api/types/GroupedHypnogramResponse.d.ts +10 -0
  344. package/dist/api/types/GroupedHypnogramResponse.js +5 -0
  345. package/dist/api/types/GroupedIge.d.ts +8 -0
  346. package/dist/api/types/GroupedIge.js +5 -0
  347. package/dist/api/types/GroupedIgeResponse.d.ts +10 -0
  348. package/dist/api/types/GroupedIgeResponse.js +5 -0
  349. package/dist/api/types/GroupedIgg.d.ts +8 -0
  350. package/dist/api/types/GroupedIgg.js +5 -0
  351. package/dist/api/types/GroupedIggResponse.d.ts +10 -0
  352. package/dist/api/types/GroupedIggResponse.js +5 -0
  353. package/dist/api/types/GroupedMindfulnessMinutes.d.ts +8 -0
  354. package/dist/api/types/GroupedMindfulnessMinutes.js +5 -0
  355. package/dist/api/types/GroupedMindfulnessMinutesResponse.d.ts +10 -0
  356. package/dist/api/types/GroupedMindfulnessMinutesResponse.js +5 -0
  357. package/dist/api/types/GroupedRespiratoryRate.d.ts +8 -0
  358. package/dist/api/types/GroupedRespiratoryRate.js +5 -0
  359. package/dist/api/types/GroupedRespiratoryRateResponse.d.ts +10 -0
  360. package/dist/api/types/GroupedRespiratoryRateResponse.js +5 -0
  361. package/dist/api/types/GroupedSteps.d.ts +8 -0
  362. package/dist/api/types/GroupedSteps.js +5 -0
  363. package/dist/api/types/GroupedStepsResponse.d.ts +10 -0
  364. package/dist/api/types/GroupedStepsResponse.js +5 -0
  365. package/dist/api/types/GroupedStressLevel.d.ts +8 -0
  366. package/dist/api/types/GroupedStressLevel.js +5 -0
  367. package/dist/api/types/GroupedStressLevelResponse.d.ts +10 -0
  368. package/dist/api/types/GroupedStressLevelResponse.js +5 -0
  369. package/dist/api/types/GroupedVo2Max.d.ts +8 -0
  370. package/dist/api/types/GroupedVo2Max.js +5 -0
  371. package/dist/api/types/GroupedVo2MaxResponse.d.ts +10 -0
  372. package/dist/api/types/GroupedVo2MaxResponse.js +5 -0
  373. package/dist/api/types/GroupedWater.d.ts +8 -0
  374. package/dist/api/types/GroupedWater.js +5 -0
  375. package/dist/api/types/GroupedWaterResponse.d.ts +10 -0
  376. package/dist/api/types/GroupedWaterResponse.js +5 -0
  377. package/dist/api/types/TimeseriesResource.d.ts +3 -4
  378. package/dist/api/types/TimeseriesResource.js +2 -3
  379. package/dist/api/types/index.d.ts +51 -0
  380. package/dist/api/types/index.js +51 -0
  381. package/dist/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -0
  382. package/dist/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.js +1 -0
  383. package/dist/serialization/resources/user/client/requests/UserCreateBody.d.ts +1 -0
  384. package/dist/serialization/resources/user/client/requests/UserCreateBody.js +1 -0
  385. package/dist/serialization/resources/user/client/requests/UserPatchBody.d.ts +1 -0
  386. package/dist/serialization/resources/user/client/requests/UserPatchBody.js +1 -0
  387. package/dist/serialization/resources/vitals/client/bodyFat.d.ts +10 -0
  388. package/dist/serialization/resources/vitals/client/bodyFat.js +40 -0
  389. package/dist/serialization/resources/vitals/client/bodyWeight.d.ts +10 -0
  390. package/dist/serialization/resources/vitals/client/bodyWeight.js +40 -0
  391. package/dist/serialization/resources/vitals/client/{triglycerides.d.ts → cholesterolTriglycerides.d.ts} +1 -1
  392. package/dist/serialization/resources/vitals/client/index.d.ts +6 -2
  393. package/dist/serialization/resources/vitals/client/index.js +7 -3
  394. package/dist/serialization/resources/vitals/client/stressLevel.d.ts +10 -0
  395. package/dist/serialization/resources/vitals/client/stressLevel.js +40 -0
  396. package/dist/serialization/resources/vitals/client/vo2Max.d.ts +10 -0
  397. package/dist/serialization/resources/vitals/client/vo2Max.js +40 -0
  398. package/dist/serialization/types/ClientFacingBodyFatTimeseries.d.ts +17 -0
  399. package/dist/serialization/types/ClientFacingBodyFatTimeseries.js +38 -0
  400. package/dist/serialization/types/ClientFacingBodyWeightTimeseries.d.ts +17 -0
  401. package/dist/serialization/types/ClientFacingBodyWeightTimeseries.js +38 -0
  402. package/dist/serialization/types/ClientFacingOrder.d.ts +1 -0
  403. package/dist/serialization/types/ClientFacingOrder.js +1 -0
  404. package/dist/serialization/types/ClientFacingResult.d.ts +1 -0
  405. package/dist/serialization/types/ClientFacingResult.js +1 -0
  406. package/dist/serialization/types/ClientFacingStressLevelTimeseries.d.ts +17 -0
  407. package/dist/serialization/types/ClientFacingStressLevelTimeseries.js +38 -0
  408. package/dist/serialization/types/ClientFacingUser.d.ts +1 -0
  409. package/dist/serialization/types/ClientFacingUser.js +1 -0
  410. package/dist/serialization/types/ClientFacingVo2MaxTimeseries.d.ts +19 -0
  411. package/dist/serialization/types/ClientFacingVo2MaxTimeseries.js +40 -0
  412. package/dist/serialization/types/FallbackBirthDate.d.ts +14 -0
  413. package/dist/serialization/types/FallbackBirthDate.js +35 -0
  414. package/dist/serialization/types/GroupedBloodOxygen.d.ts +13 -0
  415. package/dist/serialization/types/GroupedBloodOxygen.js +43 -0
  416. package/dist/serialization/types/GroupedBloodOxygenResponse.d.ts +13 -0
  417. package/dist/serialization/types/GroupedBloodOxygenResponse.js +43 -0
  418. package/dist/serialization/types/GroupedBloodPressure.d.ts +13 -0
  419. package/dist/serialization/types/GroupedBloodPressure.js +43 -0
  420. package/dist/serialization/types/GroupedBloodPressureResponse.d.ts +13 -0
  421. package/dist/serialization/types/GroupedBloodPressureResponse.js +43 -0
  422. package/dist/serialization/types/GroupedBodyFat.d.ts +13 -0
  423. package/dist/serialization/types/GroupedBodyFat.js +43 -0
  424. package/dist/serialization/types/GroupedBodyFatResponse.d.ts +13 -0
  425. package/dist/serialization/types/GroupedBodyFatResponse.js +43 -0
  426. package/dist/serialization/types/GroupedBodyWeight.d.ts +13 -0
  427. package/dist/serialization/types/GroupedBodyWeight.js +43 -0
  428. package/dist/serialization/types/GroupedBodyWeightResponse.d.ts +13 -0
  429. package/dist/serialization/types/GroupedBodyWeightResponse.js +43 -0
  430. package/dist/serialization/types/GroupedCaffeine.d.ts +13 -0
  431. package/dist/serialization/types/GroupedCaffeine.js +43 -0
  432. package/dist/serialization/types/GroupedCaffeineResponse.d.ts +13 -0
  433. package/dist/serialization/types/GroupedCaffeineResponse.js +43 -0
  434. package/dist/serialization/types/GroupedCaloriesActive.d.ts +13 -0
  435. package/dist/serialization/types/GroupedCaloriesActive.js +43 -0
  436. package/dist/serialization/types/GroupedCaloriesActiveResponse.d.ts +13 -0
  437. package/dist/serialization/types/GroupedCaloriesActiveResponse.js +43 -0
  438. package/dist/serialization/types/GroupedCaloriesBasal.d.ts +13 -0
  439. package/dist/serialization/types/GroupedCaloriesBasal.js +43 -0
  440. package/dist/serialization/types/GroupedCaloriesBasalResponse.d.ts +13 -0
  441. package/dist/serialization/types/GroupedCaloriesBasalResponse.js +43 -0
  442. package/dist/serialization/types/GroupedCholesterol.d.ts +13 -0
  443. package/dist/serialization/types/GroupedCholesterol.js +43 -0
  444. package/dist/serialization/types/GroupedCholesterolResponse.d.ts +13 -0
  445. package/dist/serialization/types/GroupedCholesterolResponse.js +43 -0
  446. package/dist/serialization/types/GroupedDistance.d.ts +13 -0
  447. package/dist/serialization/types/GroupedDistance.js +43 -0
  448. package/dist/serialization/types/GroupedDistanceResponse.d.ts +13 -0
  449. package/dist/serialization/types/GroupedDistanceResponse.js +43 -0
  450. package/dist/serialization/types/GroupedElectrocardiogramVoltage.d.ts +13 -0
  451. package/dist/serialization/types/GroupedElectrocardiogramVoltage.js +43 -0
  452. package/dist/serialization/types/GroupedElectrocardiogramVoltageResponse.d.ts +13 -0
  453. package/dist/serialization/types/GroupedElectrocardiogramVoltageResponse.js +43 -0
  454. package/dist/serialization/types/GroupedFloorsClimbed.d.ts +13 -0
  455. package/dist/serialization/types/GroupedFloorsClimbed.js +43 -0
  456. package/dist/serialization/types/GroupedFloorsClimbedResponse.d.ts +13 -0
  457. package/dist/serialization/types/GroupedFloorsClimbedResponse.js +43 -0
  458. package/dist/serialization/types/GroupedGlucose.d.ts +13 -0
  459. package/dist/serialization/types/GroupedGlucose.js +43 -0
  460. package/dist/serialization/types/GroupedGlucoseResponse.d.ts +13 -0
  461. package/dist/serialization/types/GroupedGlucoseResponse.js +43 -0
  462. package/dist/serialization/types/GroupedHeartRate.d.ts +13 -0
  463. package/dist/serialization/types/GroupedHeartRate.js +43 -0
  464. package/dist/serialization/types/GroupedHeartRateResponse.d.ts +13 -0
  465. package/dist/serialization/types/GroupedHeartRateResponse.js +43 -0
  466. package/dist/serialization/types/GroupedHrv.d.ts +13 -0
  467. package/dist/serialization/types/GroupedHrv.js +43 -0
  468. package/dist/serialization/types/GroupedHrvResponse.d.ts +13 -0
  469. package/dist/serialization/types/GroupedHrvResponse.js +43 -0
  470. package/dist/serialization/types/GroupedHypnogram.d.ts +13 -0
  471. package/dist/serialization/types/GroupedHypnogram.js +43 -0
  472. package/dist/serialization/types/GroupedHypnogramResponse.d.ts +13 -0
  473. package/dist/serialization/types/GroupedHypnogramResponse.js +43 -0
  474. package/dist/serialization/types/GroupedIge.d.ts +13 -0
  475. package/dist/serialization/types/GroupedIge.js +43 -0
  476. package/dist/serialization/types/GroupedIgeResponse.d.ts +13 -0
  477. package/dist/serialization/types/GroupedIgeResponse.js +43 -0
  478. package/dist/serialization/types/GroupedIgg.d.ts +13 -0
  479. package/dist/serialization/types/GroupedIgg.js +43 -0
  480. package/dist/serialization/types/GroupedIggResponse.d.ts +13 -0
  481. package/dist/serialization/types/GroupedIggResponse.js +43 -0
  482. package/dist/serialization/types/GroupedMindfulnessMinutes.d.ts +13 -0
  483. package/dist/serialization/types/GroupedMindfulnessMinutes.js +43 -0
  484. package/dist/serialization/types/GroupedMindfulnessMinutesResponse.d.ts +13 -0
  485. package/dist/serialization/types/GroupedMindfulnessMinutesResponse.js +43 -0
  486. package/dist/serialization/types/GroupedRespiratoryRate.d.ts +13 -0
  487. package/dist/serialization/types/GroupedRespiratoryRate.js +43 -0
  488. package/dist/serialization/types/GroupedRespiratoryRateResponse.d.ts +13 -0
  489. package/dist/serialization/types/GroupedRespiratoryRateResponse.js +43 -0
  490. package/dist/serialization/types/GroupedSteps.d.ts +13 -0
  491. package/dist/serialization/types/GroupedSteps.js +43 -0
  492. package/dist/serialization/types/GroupedStepsResponse.d.ts +13 -0
  493. package/dist/serialization/types/GroupedStepsResponse.js +43 -0
  494. package/dist/serialization/types/GroupedStressLevel.d.ts +13 -0
  495. package/dist/serialization/types/GroupedStressLevel.js +43 -0
  496. package/dist/serialization/types/GroupedStressLevelResponse.d.ts +13 -0
  497. package/dist/serialization/types/GroupedStressLevelResponse.js +43 -0
  498. package/dist/serialization/types/GroupedVo2Max.d.ts +13 -0
  499. package/dist/serialization/types/GroupedVo2Max.js +43 -0
  500. package/dist/serialization/types/GroupedVo2MaxResponse.d.ts +13 -0
  501. package/dist/serialization/types/GroupedVo2MaxResponse.js +43 -0
  502. package/dist/serialization/types/GroupedWater.d.ts +13 -0
  503. package/dist/serialization/types/GroupedWater.js +43 -0
  504. package/dist/serialization/types/GroupedWaterResponse.d.ts +13 -0
  505. package/dist/serialization/types/GroupedWaterResponse.js +43 -0
  506. package/dist/serialization/types/TimeseriesResource.d.ts +1 -1
  507. package/dist/serialization/types/TimeseriesResource.js +2 -3
  508. package/dist/serialization/types/index.d.ts +51 -0
  509. package/dist/serialization/types/index.js +51 -0
  510. package/package.json +1 -1
  511. package/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -0
  512. package/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.js +1 -0
  513. package/serialization/resources/user/client/requests/UserCreateBody.d.ts +1 -0
  514. package/serialization/resources/user/client/requests/UserCreateBody.js +1 -0
  515. package/serialization/resources/user/client/requests/UserPatchBody.d.ts +1 -0
  516. package/serialization/resources/user/client/requests/UserPatchBody.js +1 -0
  517. package/serialization/resources/vitals/client/bodyFat.d.ts +10 -0
  518. package/serialization/resources/vitals/client/bodyFat.js +40 -0
  519. package/serialization/resources/vitals/client/bodyWeight.d.ts +10 -0
  520. package/serialization/resources/vitals/client/bodyWeight.js +40 -0
  521. package/serialization/resources/vitals/client/{triglycerides.d.ts → cholesterolTriglycerides.d.ts} +1 -1
  522. package/serialization/resources/vitals/client/index.d.ts +6 -2
  523. package/serialization/resources/vitals/client/index.js +7 -3
  524. package/serialization/resources/vitals/client/stressLevel.d.ts +10 -0
  525. package/serialization/resources/vitals/client/stressLevel.js +40 -0
  526. package/serialization/resources/vitals/client/vo2Max.d.ts +10 -0
  527. package/serialization/resources/vitals/client/vo2Max.js +40 -0
  528. package/serialization/types/ClientFacingBodyFatTimeseries.d.ts +17 -0
  529. package/serialization/types/ClientFacingBodyFatTimeseries.js +38 -0
  530. package/serialization/types/ClientFacingBodyWeightTimeseries.d.ts +17 -0
  531. package/serialization/types/ClientFacingBodyWeightTimeseries.js +38 -0
  532. package/serialization/types/ClientFacingOrder.d.ts +1 -0
  533. package/serialization/types/ClientFacingOrder.js +1 -0
  534. package/serialization/types/ClientFacingResult.d.ts +1 -0
  535. package/serialization/types/ClientFacingResult.js +1 -0
  536. package/serialization/types/ClientFacingStressLevelTimeseries.d.ts +17 -0
  537. package/serialization/types/ClientFacingStressLevelTimeseries.js +38 -0
  538. package/serialization/types/ClientFacingUser.d.ts +1 -0
  539. package/serialization/types/ClientFacingUser.js +1 -0
  540. package/serialization/types/ClientFacingVo2MaxTimeseries.d.ts +19 -0
  541. package/serialization/types/ClientFacingVo2MaxTimeseries.js +40 -0
  542. package/serialization/types/FallbackBirthDate.d.ts +14 -0
  543. package/serialization/types/FallbackBirthDate.js +35 -0
  544. package/serialization/types/GroupedBloodOxygen.d.ts +13 -0
  545. package/serialization/types/GroupedBloodOxygen.js +43 -0
  546. package/serialization/types/GroupedBloodOxygenResponse.d.ts +13 -0
  547. package/serialization/types/GroupedBloodOxygenResponse.js +43 -0
  548. package/serialization/types/GroupedBloodPressure.d.ts +13 -0
  549. package/serialization/types/GroupedBloodPressure.js +43 -0
  550. package/serialization/types/GroupedBloodPressureResponse.d.ts +13 -0
  551. package/serialization/types/GroupedBloodPressureResponse.js +43 -0
  552. package/serialization/types/GroupedBodyFat.d.ts +13 -0
  553. package/serialization/types/GroupedBodyFat.js +43 -0
  554. package/serialization/types/GroupedBodyFatResponse.d.ts +13 -0
  555. package/serialization/types/GroupedBodyFatResponse.js +43 -0
  556. package/serialization/types/GroupedBodyWeight.d.ts +13 -0
  557. package/serialization/types/GroupedBodyWeight.js +43 -0
  558. package/serialization/types/GroupedBodyWeightResponse.d.ts +13 -0
  559. package/serialization/types/GroupedBodyWeightResponse.js +43 -0
  560. package/serialization/types/GroupedCaffeine.d.ts +13 -0
  561. package/serialization/types/GroupedCaffeine.js +43 -0
  562. package/serialization/types/GroupedCaffeineResponse.d.ts +13 -0
  563. package/serialization/types/GroupedCaffeineResponse.js +43 -0
  564. package/serialization/types/GroupedCaloriesActive.d.ts +13 -0
  565. package/serialization/types/GroupedCaloriesActive.js +43 -0
  566. package/serialization/types/GroupedCaloriesActiveResponse.d.ts +13 -0
  567. package/serialization/types/GroupedCaloriesActiveResponse.js +43 -0
  568. package/serialization/types/GroupedCaloriesBasal.d.ts +13 -0
  569. package/serialization/types/GroupedCaloriesBasal.js +43 -0
  570. package/serialization/types/GroupedCaloriesBasalResponse.d.ts +13 -0
  571. package/serialization/types/GroupedCaloriesBasalResponse.js +43 -0
  572. package/serialization/types/GroupedCholesterol.d.ts +13 -0
  573. package/serialization/types/GroupedCholesterol.js +43 -0
  574. package/serialization/types/GroupedCholesterolResponse.d.ts +13 -0
  575. package/serialization/types/GroupedCholesterolResponse.js +43 -0
  576. package/serialization/types/GroupedDistance.d.ts +13 -0
  577. package/serialization/types/GroupedDistance.js +43 -0
  578. package/serialization/types/GroupedDistanceResponse.d.ts +13 -0
  579. package/serialization/types/GroupedDistanceResponse.js +43 -0
  580. package/serialization/types/GroupedElectrocardiogramVoltage.d.ts +13 -0
  581. package/serialization/types/GroupedElectrocardiogramVoltage.js +43 -0
  582. package/serialization/types/GroupedElectrocardiogramVoltageResponse.d.ts +13 -0
  583. package/serialization/types/GroupedElectrocardiogramVoltageResponse.js +43 -0
  584. package/serialization/types/GroupedFloorsClimbed.d.ts +13 -0
  585. package/serialization/types/GroupedFloorsClimbed.js +43 -0
  586. package/serialization/types/GroupedFloorsClimbedResponse.d.ts +13 -0
  587. package/serialization/types/GroupedFloorsClimbedResponse.js +43 -0
  588. package/serialization/types/GroupedGlucose.d.ts +13 -0
  589. package/serialization/types/GroupedGlucose.js +43 -0
  590. package/serialization/types/GroupedGlucoseResponse.d.ts +13 -0
  591. package/serialization/types/GroupedGlucoseResponse.js +43 -0
  592. package/serialization/types/GroupedHeartRate.d.ts +13 -0
  593. package/serialization/types/GroupedHeartRate.js +43 -0
  594. package/serialization/types/GroupedHeartRateResponse.d.ts +13 -0
  595. package/serialization/types/GroupedHeartRateResponse.js +43 -0
  596. package/serialization/types/GroupedHrv.d.ts +13 -0
  597. package/serialization/types/GroupedHrv.js +43 -0
  598. package/serialization/types/GroupedHrvResponse.d.ts +13 -0
  599. package/serialization/types/GroupedHrvResponse.js +43 -0
  600. package/serialization/types/GroupedHypnogram.d.ts +13 -0
  601. package/serialization/types/GroupedHypnogram.js +43 -0
  602. package/serialization/types/GroupedHypnogramResponse.d.ts +13 -0
  603. package/serialization/types/GroupedHypnogramResponse.js +43 -0
  604. package/serialization/types/GroupedIge.d.ts +13 -0
  605. package/serialization/types/GroupedIge.js +43 -0
  606. package/serialization/types/GroupedIgeResponse.d.ts +13 -0
  607. package/serialization/types/GroupedIgeResponse.js +43 -0
  608. package/serialization/types/GroupedIgg.d.ts +13 -0
  609. package/serialization/types/GroupedIgg.js +43 -0
  610. package/serialization/types/GroupedIggResponse.d.ts +13 -0
  611. package/serialization/types/GroupedIggResponse.js +43 -0
  612. package/serialization/types/GroupedMindfulnessMinutes.d.ts +13 -0
  613. package/serialization/types/GroupedMindfulnessMinutes.js +43 -0
  614. package/serialization/types/GroupedMindfulnessMinutesResponse.d.ts +13 -0
  615. package/serialization/types/GroupedMindfulnessMinutesResponse.js +43 -0
  616. package/serialization/types/GroupedRespiratoryRate.d.ts +13 -0
  617. package/serialization/types/GroupedRespiratoryRate.js +43 -0
  618. package/serialization/types/GroupedRespiratoryRateResponse.d.ts +13 -0
  619. package/serialization/types/GroupedRespiratoryRateResponse.js +43 -0
  620. package/serialization/types/GroupedSteps.d.ts +13 -0
  621. package/serialization/types/GroupedSteps.js +43 -0
  622. package/serialization/types/GroupedStepsResponse.d.ts +13 -0
  623. package/serialization/types/GroupedStepsResponse.js +43 -0
  624. package/serialization/types/GroupedStressLevel.d.ts +13 -0
  625. package/serialization/types/GroupedStressLevel.js +43 -0
  626. package/serialization/types/GroupedStressLevelResponse.d.ts +13 -0
  627. package/serialization/types/GroupedStressLevelResponse.js +43 -0
  628. package/serialization/types/GroupedVo2Max.d.ts +13 -0
  629. package/serialization/types/GroupedVo2Max.js +43 -0
  630. package/serialization/types/GroupedVo2MaxResponse.d.ts +13 -0
  631. package/serialization/types/GroupedVo2MaxResponse.js +43 -0
  632. package/serialization/types/GroupedWater.d.ts +13 -0
  633. package/serialization/types/GroupedWater.js +43 -0
  634. package/serialization/types/GroupedWaterResponse.d.ts +13 -0
  635. package/serialization/types/GroupedWaterResponse.js +43 -0
  636. package/serialization/types/TimeseriesResource.d.ts +1 -1
  637. package/serialization/types/TimeseriesResource.js +2 -3
  638. package/serialization/types/index.d.ts +51 -0
  639. package/serialization/types/index.js +51 -0
  640. /package/api/resources/{vitals/client/requests/VitalsTriglyceridesRequest.js → user/client/requests/UserUndoDeleteRequest.js} +0 -0
  641. /package/{dist/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.js → api/resources/vitals/client/requests/VitalsBloodOxygenGroupedRequest.js} +0 -0
  642. /package/dist/serialization/resources/vitals/client/{triglycerides.js → cholesterolTriglycerides.js} +0 -0
  643. /package/serialization/resources/vitals/client/{triglycerides.js → cholesterolTriglycerides.js} +0 -0
@@ -50,7 +50,1900 @@ class Vitals {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Get timeseries data for user
53
+ * @throws {@link Vital.UnprocessableEntityError}
54
+ *
55
+ * @example
56
+ * await vital.vitals.vo2MaxGrouped("user-id", {
57
+ * startDate: "start-date"
58
+ * })
59
+ */
60
+ vo2MaxGrouped(userId, request, requestOptions) {
61
+ var _a;
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const { cursor, provider, startDate, endDate } = request;
64
+ const _queryParams = {};
65
+ if (cursor != null) {
66
+ _queryParams["cursor"] = cursor;
67
+ }
68
+ if (provider != null) {
69
+ _queryParams["provider"] = provider;
70
+ }
71
+ _queryParams["start_date"] = startDate;
72
+ if (endDate != null) {
73
+ _queryParams["end_date"] = endDate;
74
+ }
75
+ const _response = yield core.fetcher({
76
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/vo2_max/grouped`),
77
+ method: "GET",
78
+ headers: {
79
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
80
+ "X-Fern-Language": "JavaScript",
81
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
82
+ "X-Fern-SDK-Version": "3.1.1",
83
+ },
84
+ contentType: "application/json",
85
+ queryParameters: _queryParams,
86
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
87
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
88
+ });
89
+ if (_response.ok) {
90
+ return yield serializers.GroupedVo2MaxResponse.parseOrThrow(_response.body, {
91
+ unrecognizedObjectKeys: "passthrough",
92
+ allowUnrecognizedUnionMembers: true,
93
+ allowUnrecognizedEnumValues: true,
94
+ breadcrumbsPrefix: ["response"],
95
+ });
96
+ }
97
+ if (_response.error.reason === "status-code") {
98
+ switch (_response.error.statusCode) {
99
+ case 422:
100
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
101
+ unrecognizedObjectKeys: "passthrough",
102
+ allowUnrecognizedUnionMembers: true,
103
+ allowUnrecognizedEnumValues: true,
104
+ breadcrumbsPrefix: ["response"],
105
+ }));
106
+ default:
107
+ throw new errors.VitalError({
108
+ statusCode: _response.error.statusCode,
109
+ body: _response.error.body,
110
+ });
111
+ }
112
+ }
113
+ switch (_response.error.reason) {
114
+ case "non-json":
115
+ throw new errors.VitalError({
116
+ statusCode: _response.error.statusCode,
117
+ body: _response.error.rawBody,
118
+ });
119
+ case "timeout":
120
+ throw new errors.VitalTimeoutError();
121
+ case "unknown":
122
+ throw new errors.VitalError({
123
+ message: _response.error.errorMessage,
124
+ });
125
+ }
126
+ });
127
+ }
128
+ /**
129
+ * @throws {@link Vital.UnprocessableEntityError}
130
+ *
131
+ * @example
132
+ * await vital.vitals.stressLevelGrouped("user-id", {
133
+ * startDate: "start-date"
134
+ * })
135
+ */
136
+ stressLevelGrouped(userId, request, requestOptions) {
137
+ var _a;
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const { cursor, provider, startDate, endDate } = request;
140
+ const _queryParams = {};
141
+ if (cursor != null) {
142
+ _queryParams["cursor"] = cursor;
143
+ }
144
+ if (provider != null) {
145
+ _queryParams["provider"] = provider;
146
+ }
147
+ _queryParams["start_date"] = startDate;
148
+ if (endDate != null) {
149
+ _queryParams["end_date"] = endDate;
150
+ }
151
+ const _response = yield core.fetcher({
152
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/stress_level/grouped`),
153
+ method: "GET",
154
+ headers: {
155
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
156
+ "X-Fern-Language": "JavaScript",
157
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
158
+ "X-Fern-SDK-Version": "3.1.1",
159
+ },
160
+ contentType: "application/json",
161
+ queryParameters: _queryParams,
162
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
163
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
164
+ });
165
+ if (_response.ok) {
166
+ return yield serializers.GroupedStressLevelResponse.parseOrThrow(_response.body, {
167
+ unrecognizedObjectKeys: "passthrough",
168
+ allowUnrecognizedUnionMembers: true,
169
+ allowUnrecognizedEnumValues: true,
170
+ breadcrumbsPrefix: ["response"],
171
+ });
172
+ }
173
+ if (_response.error.reason === "status-code") {
174
+ switch (_response.error.statusCode) {
175
+ case 422:
176
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
177
+ unrecognizedObjectKeys: "passthrough",
178
+ allowUnrecognizedUnionMembers: true,
179
+ allowUnrecognizedEnumValues: true,
180
+ breadcrumbsPrefix: ["response"],
181
+ }));
182
+ default:
183
+ throw new errors.VitalError({
184
+ statusCode: _response.error.statusCode,
185
+ body: _response.error.body,
186
+ });
187
+ }
188
+ }
189
+ switch (_response.error.reason) {
190
+ case "non-json":
191
+ throw new errors.VitalError({
192
+ statusCode: _response.error.statusCode,
193
+ body: _response.error.rawBody,
194
+ });
195
+ case "timeout":
196
+ throw new errors.VitalTimeoutError();
197
+ case "unknown":
198
+ throw new errors.VitalError({
199
+ message: _response.error.errorMessage,
200
+ });
201
+ }
202
+ });
203
+ }
204
+ /**
205
+ * @throws {@link Vital.UnprocessableEntityError}
206
+ *
207
+ * @example
208
+ * await vital.vitals.mindfulnessMinutesGrouped("user-id", {
209
+ * startDate: "start-date"
210
+ * })
211
+ */
212
+ mindfulnessMinutesGrouped(userId, request, requestOptions) {
213
+ var _a;
214
+ return __awaiter(this, void 0, void 0, function* () {
215
+ const { cursor, provider, startDate, endDate } = request;
216
+ const _queryParams = {};
217
+ if (cursor != null) {
218
+ _queryParams["cursor"] = cursor;
219
+ }
220
+ if (provider != null) {
221
+ _queryParams["provider"] = provider;
222
+ }
223
+ _queryParams["start_date"] = startDate;
224
+ if (endDate != null) {
225
+ _queryParams["end_date"] = endDate;
226
+ }
227
+ const _response = yield core.fetcher({
228
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/mindfulness_minutes/grouped`),
229
+ method: "GET",
230
+ headers: {
231
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
232
+ "X-Fern-Language": "JavaScript",
233
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
234
+ "X-Fern-SDK-Version": "3.1.1",
235
+ },
236
+ contentType: "application/json",
237
+ queryParameters: _queryParams,
238
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
239
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
240
+ });
241
+ if (_response.ok) {
242
+ return yield serializers.GroupedMindfulnessMinutesResponse.parseOrThrow(_response.body, {
243
+ unrecognizedObjectKeys: "passthrough",
244
+ allowUnrecognizedUnionMembers: true,
245
+ allowUnrecognizedEnumValues: true,
246
+ breadcrumbsPrefix: ["response"],
247
+ });
248
+ }
249
+ if (_response.error.reason === "status-code") {
250
+ switch (_response.error.statusCode) {
251
+ case 422:
252
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
253
+ unrecognizedObjectKeys: "passthrough",
254
+ allowUnrecognizedUnionMembers: true,
255
+ allowUnrecognizedEnumValues: true,
256
+ breadcrumbsPrefix: ["response"],
257
+ }));
258
+ default:
259
+ throw new errors.VitalError({
260
+ statusCode: _response.error.statusCode,
261
+ body: _response.error.body,
262
+ });
263
+ }
264
+ }
265
+ switch (_response.error.reason) {
266
+ case "non-json":
267
+ throw new errors.VitalError({
268
+ statusCode: _response.error.statusCode,
269
+ body: _response.error.rawBody,
270
+ });
271
+ case "timeout":
272
+ throw new errors.VitalTimeoutError();
273
+ case "unknown":
274
+ throw new errors.VitalError({
275
+ message: _response.error.errorMessage,
276
+ });
277
+ }
278
+ });
279
+ }
280
+ /**
281
+ * @throws {@link Vital.UnprocessableEntityError}
282
+ *
283
+ * @example
284
+ * await vital.vitals.caffeineGrouped("user-id", {
285
+ * startDate: "start-date"
286
+ * })
287
+ */
288
+ caffeineGrouped(userId, request, requestOptions) {
289
+ var _a;
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ const { cursor, provider, startDate, endDate } = request;
292
+ const _queryParams = {};
293
+ if (cursor != null) {
294
+ _queryParams["cursor"] = cursor;
295
+ }
296
+ if (provider != null) {
297
+ _queryParams["provider"] = provider;
298
+ }
299
+ _queryParams["start_date"] = startDate;
300
+ if (endDate != null) {
301
+ _queryParams["end_date"] = endDate;
302
+ }
303
+ const _response = yield core.fetcher({
304
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/caffeine/grouped`),
305
+ method: "GET",
306
+ headers: {
307
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
308
+ "X-Fern-Language": "JavaScript",
309
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
310
+ "X-Fern-SDK-Version": "3.1.1",
311
+ },
312
+ contentType: "application/json",
313
+ queryParameters: _queryParams,
314
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
315
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
316
+ });
317
+ if (_response.ok) {
318
+ return yield serializers.GroupedCaffeineResponse.parseOrThrow(_response.body, {
319
+ unrecognizedObjectKeys: "passthrough",
320
+ allowUnrecognizedUnionMembers: true,
321
+ allowUnrecognizedEnumValues: true,
322
+ breadcrumbsPrefix: ["response"],
323
+ });
324
+ }
325
+ if (_response.error.reason === "status-code") {
326
+ switch (_response.error.statusCode) {
327
+ case 422:
328
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
329
+ unrecognizedObjectKeys: "passthrough",
330
+ allowUnrecognizedUnionMembers: true,
331
+ allowUnrecognizedEnumValues: true,
332
+ breadcrumbsPrefix: ["response"],
333
+ }));
334
+ default:
335
+ throw new errors.VitalError({
336
+ statusCode: _response.error.statusCode,
337
+ body: _response.error.body,
338
+ });
339
+ }
340
+ }
341
+ switch (_response.error.reason) {
342
+ case "non-json":
343
+ throw new errors.VitalError({
344
+ statusCode: _response.error.statusCode,
345
+ body: _response.error.rawBody,
346
+ });
347
+ case "timeout":
348
+ throw new errors.VitalTimeoutError();
349
+ case "unknown":
350
+ throw new errors.VitalError({
351
+ message: _response.error.errorMessage,
352
+ });
353
+ }
354
+ });
355
+ }
356
+ /**
357
+ * @throws {@link Vital.UnprocessableEntityError}
358
+ *
359
+ * @example
360
+ * await vital.vitals.waterGrouped("user-id", {
361
+ * startDate: "start-date"
362
+ * })
363
+ */
364
+ waterGrouped(userId, request, requestOptions) {
365
+ var _a;
366
+ return __awaiter(this, void 0, void 0, function* () {
367
+ const { cursor, provider, startDate, endDate } = request;
368
+ const _queryParams = {};
369
+ if (cursor != null) {
370
+ _queryParams["cursor"] = cursor;
371
+ }
372
+ if (provider != null) {
373
+ _queryParams["provider"] = provider;
374
+ }
375
+ _queryParams["start_date"] = startDate;
376
+ if (endDate != null) {
377
+ _queryParams["end_date"] = endDate;
378
+ }
379
+ const _response = yield core.fetcher({
380
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/water/grouped`),
381
+ method: "GET",
382
+ headers: {
383
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
384
+ "X-Fern-Language": "JavaScript",
385
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
386
+ "X-Fern-SDK-Version": "3.1.1",
387
+ },
388
+ contentType: "application/json",
389
+ queryParameters: _queryParams,
390
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
391
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
392
+ });
393
+ if (_response.ok) {
394
+ return yield serializers.GroupedWaterResponse.parseOrThrow(_response.body, {
395
+ unrecognizedObjectKeys: "passthrough",
396
+ allowUnrecognizedUnionMembers: true,
397
+ allowUnrecognizedEnumValues: true,
398
+ breadcrumbsPrefix: ["response"],
399
+ });
400
+ }
401
+ if (_response.error.reason === "status-code") {
402
+ switch (_response.error.statusCode) {
403
+ case 422:
404
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
405
+ unrecognizedObjectKeys: "passthrough",
406
+ allowUnrecognizedUnionMembers: true,
407
+ allowUnrecognizedEnumValues: true,
408
+ breadcrumbsPrefix: ["response"],
409
+ }));
410
+ default:
411
+ throw new errors.VitalError({
412
+ statusCode: _response.error.statusCode,
413
+ body: _response.error.body,
414
+ });
415
+ }
416
+ }
417
+ switch (_response.error.reason) {
418
+ case "non-json":
419
+ throw new errors.VitalError({
420
+ statusCode: _response.error.statusCode,
421
+ body: _response.error.rawBody,
422
+ });
423
+ case "timeout":
424
+ throw new errors.VitalTimeoutError();
425
+ case "unknown":
426
+ throw new errors.VitalError({
427
+ message: _response.error.errorMessage,
428
+ });
429
+ }
430
+ });
431
+ }
432
+ /**
433
+ * @throws {@link Vital.UnprocessableEntityError}
434
+ *
435
+ * @example
436
+ * await vital.vitals.stepsGrouped("user-id", {
437
+ * startDate: "start-date"
438
+ * })
439
+ */
440
+ stepsGrouped(userId, request, requestOptions) {
441
+ var _a;
442
+ return __awaiter(this, void 0, void 0, function* () {
443
+ const { cursor, provider, startDate, endDate } = request;
444
+ const _queryParams = {};
445
+ if (cursor != null) {
446
+ _queryParams["cursor"] = cursor;
447
+ }
448
+ if (provider != null) {
449
+ _queryParams["provider"] = provider;
450
+ }
451
+ _queryParams["start_date"] = startDate;
452
+ if (endDate != null) {
453
+ _queryParams["end_date"] = endDate;
454
+ }
455
+ const _response = yield core.fetcher({
456
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/steps/grouped`),
457
+ method: "GET",
458
+ headers: {
459
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
460
+ "X-Fern-Language": "JavaScript",
461
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
462
+ "X-Fern-SDK-Version": "3.1.1",
463
+ },
464
+ contentType: "application/json",
465
+ queryParameters: _queryParams,
466
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
467
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
468
+ });
469
+ if (_response.ok) {
470
+ return yield serializers.GroupedStepsResponse.parseOrThrow(_response.body, {
471
+ unrecognizedObjectKeys: "passthrough",
472
+ allowUnrecognizedUnionMembers: true,
473
+ allowUnrecognizedEnumValues: true,
474
+ breadcrumbsPrefix: ["response"],
475
+ });
476
+ }
477
+ if (_response.error.reason === "status-code") {
478
+ switch (_response.error.statusCode) {
479
+ case 422:
480
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
481
+ unrecognizedObjectKeys: "passthrough",
482
+ allowUnrecognizedUnionMembers: true,
483
+ allowUnrecognizedEnumValues: true,
484
+ breadcrumbsPrefix: ["response"],
485
+ }));
486
+ default:
487
+ throw new errors.VitalError({
488
+ statusCode: _response.error.statusCode,
489
+ body: _response.error.body,
490
+ });
491
+ }
492
+ }
493
+ switch (_response.error.reason) {
494
+ case "non-json":
495
+ throw new errors.VitalError({
496
+ statusCode: _response.error.statusCode,
497
+ body: _response.error.rawBody,
498
+ });
499
+ case "timeout":
500
+ throw new errors.VitalTimeoutError();
501
+ case "unknown":
502
+ throw new errors.VitalError({
503
+ message: _response.error.errorMessage,
504
+ });
505
+ }
506
+ });
507
+ }
508
+ /**
509
+ * @throws {@link Vital.UnprocessableEntityError}
510
+ *
511
+ * @example
512
+ * await vital.vitals.floorsClimbedGrouped("user-id", {
513
+ * startDate: "start-date"
514
+ * })
515
+ */
516
+ floorsClimbedGrouped(userId, request, requestOptions) {
517
+ var _a;
518
+ return __awaiter(this, void 0, void 0, function* () {
519
+ const { cursor, provider, startDate, endDate } = request;
520
+ const _queryParams = {};
521
+ if (cursor != null) {
522
+ _queryParams["cursor"] = cursor;
523
+ }
524
+ if (provider != null) {
525
+ _queryParams["provider"] = provider;
526
+ }
527
+ _queryParams["start_date"] = startDate;
528
+ if (endDate != null) {
529
+ _queryParams["end_date"] = endDate;
530
+ }
531
+ const _response = yield core.fetcher({
532
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/floors_climbed/grouped`),
533
+ method: "GET",
534
+ headers: {
535
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
536
+ "X-Fern-Language": "JavaScript",
537
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
538
+ "X-Fern-SDK-Version": "3.1.1",
539
+ },
540
+ contentType: "application/json",
541
+ queryParameters: _queryParams,
542
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
543
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
544
+ });
545
+ if (_response.ok) {
546
+ return yield serializers.GroupedFloorsClimbedResponse.parseOrThrow(_response.body, {
547
+ unrecognizedObjectKeys: "passthrough",
548
+ allowUnrecognizedUnionMembers: true,
549
+ allowUnrecognizedEnumValues: true,
550
+ breadcrumbsPrefix: ["response"],
551
+ });
552
+ }
553
+ if (_response.error.reason === "status-code") {
554
+ switch (_response.error.statusCode) {
555
+ case 422:
556
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
557
+ unrecognizedObjectKeys: "passthrough",
558
+ allowUnrecognizedUnionMembers: true,
559
+ allowUnrecognizedEnumValues: true,
560
+ breadcrumbsPrefix: ["response"],
561
+ }));
562
+ default:
563
+ throw new errors.VitalError({
564
+ statusCode: _response.error.statusCode,
565
+ body: _response.error.body,
566
+ });
567
+ }
568
+ }
569
+ switch (_response.error.reason) {
570
+ case "non-json":
571
+ throw new errors.VitalError({
572
+ statusCode: _response.error.statusCode,
573
+ body: _response.error.rawBody,
574
+ });
575
+ case "timeout":
576
+ throw new errors.VitalTimeoutError();
577
+ case "unknown":
578
+ throw new errors.VitalError({
579
+ message: _response.error.errorMessage,
580
+ });
581
+ }
582
+ });
583
+ }
584
+ /**
585
+ * @throws {@link Vital.UnprocessableEntityError}
586
+ *
587
+ * @example
588
+ * await vital.vitals.distanceGrouped("user-id", {
589
+ * startDate: "start-date"
590
+ * })
591
+ */
592
+ distanceGrouped(userId, request, requestOptions) {
593
+ var _a;
594
+ return __awaiter(this, void 0, void 0, function* () {
595
+ const { cursor, provider, startDate, endDate } = request;
596
+ const _queryParams = {};
597
+ if (cursor != null) {
598
+ _queryParams["cursor"] = cursor;
599
+ }
600
+ if (provider != null) {
601
+ _queryParams["provider"] = provider;
602
+ }
603
+ _queryParams["start_date"] = startDate;
604
+ if (endDate != null) {
605
+ _queryParams["end_date"] = endDate;
606
+ }
607
+ const _response = yield core.fetcher({
608
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/distance/grouped`),
609
+ method: "GET",
610
+ headers: {
611
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
612
+ "X-Fern-Language": "JavaScript",
613
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
614
+ "X-Fern-SDK-Version": "3.1.1",
615
+ },
616
+ contentType: "application/json",
617
+ queryParameters: _queryParams,
618
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
619
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
620
+ });
621
+ if (_response.ok) {
622
+ return yield serializers.GroupedDistanceResponse.parseOrThrow(_response.body, {
623
+ unrecognizedObjectKeys: "passthrough",
624
+ allowUnrecognizedUnionMembers: true,
625
+ allowUnrecognizedEnumValues: true,
626
+ breadcrumbsPrefix: ["response"],
627
+ });
628
+ }
629
+ if (_response.error.reason === "status-code") {
630
+ switch (_response.error.statusCode) {
631
+ case 422:
632
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
633
+ unrecognizedObjectKeys: "passthrough",
634
+ allowUnrecognizedUnionMembers: true,
635
+ allowUnrecognizedEnumValues: true,
636
+ breadcrumbsPrefix: ["response"],
637
+ }));
638
+ default:
639
+ throw new errors.VitalError({
640
+ statusCode: _response.error.statusCode,
641
+ body: _response.error.body,
642
+ });
643
+ }
644
+ }
645
+ switch (_response.error.reason) {
646
+ case "non-json":
647
+ throw new errors.VitalError({
648
+ statusCode: _response.error.statusCode,
649
+ body: _response.error.rawBody,
650
+ });
651
+ case "timeout":
652
+ throw new errors.VitalTimeoutError();
653
+ case "unknown":
654
+ throw new errors.VitalError({
655
+ message: _response.error.errorMessage,
656
+ });
657
+ }
658
+ });
659
+ }
660
+ /**
661
+ * @throws {@link Vital.UnprocessableEntityError}
662
+ *
663
+ * @example
664
+ * await vital.vitals.caloriesBasalGrouped("user-id", {
665
+ * startDate: "start-date"
666
+ * })
667
+ */
668
+ caloriesBasalGrouped(userId, request, requestOptions) {
669
+ var _a;
670
+ return __awaiter(this, void 0, void 0, function* () {
671
+ const { cursor, provider, startDate, endDate } = request;
672
+ const _queryParams = {};
673
+ if (cursor != null) {
674
+ _queryParams["cursor"] = cursor;
675
+ }
676
+ if (provider != null) {
677
+ _queryParams["provider"] = provider;
678
+ }
679
+ _queryParams["start_date"] = startDate;
680
+ if (endDate != null) {
681
+ _queryParams["end_date"] = endDate;
682
+ }
683
+ const _response = yield core.fetcher({
684
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/calories_basal/grouped`),
685
+ method: "GET",
686
+ headers: {
687
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
688
+ "X-Fern-Language": "JavaScript",
689
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
690
+ "X-Fern-SDK-Version": "3.1.1",
691
+ },
692
+ contentType: "application/json",
693
+ queryParameters: _queryParams,
694
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
695
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
696
+ });
697
+ if (_response.ok) {
698
+ return yield serializers.GroupedCaloriesBasalResponse.parseOrThrow(_response.body, {
699
+ unrecognizedObjectKeys: "passthrough",
700
+ allowUnrecognizedUnionMembers: true,
701
+ allowUnrecognizedEnumValues: true,
702
+ breadcrumbsPrefix: ["response"],
703
+ });
704
+ }
705
+ if (_response.error.reason === "status-code") {
706
+ switch (_response.error.statusCode) {
707
+ case 422:
708
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
709
+ unrecognizedObjectKeys: "passthrough",
710
+ allowUnrecognizedUnionMembers: true,
711
+ allowUnrecognizedEnumValues: true,
712
+ breadcrumbsPrefix: ["response"],
713
+ }));
714
+ default:
715
+ throw new errors.VitalError({
716
+ statusCode: _response.error.statusCode,
717
+ body: _response.error.body,
718
+ });
719
+ }
720
+ }
721
+ switch (_response.error.reason) {
722
+ case "non-json":
723
+ throw new errors.VitalError({
724
+ statusCode: _response.error.statusCode,
725
+ body: _response.error.rawBody,
726
+ });
727
+ case "timeout":
728
+ throw new errors.VitalTimeoutError();
729
+ case "unknown":
730
+ throw new errors.VitalError({
731
+ message: _response.error.errorMessage,
732
+ });
733
+ }
734
+ });
735
+ }
736
+ /**
737
+ * @throws {@link Vital.UnprocessableEntityError}
738
+ *
739
+ * @example
740
+ * await vital.vitals.caloriesActiveGrouped("user-id", {
741
+ * startDate: "start-date"
742
+ * })
743
+ */
744
+ caloriesActiveGrouped(userId, request, requestOptions) {
745
+ var _a;
746
+ return __awaiter(this, void 0, void 0, function* () {
747
+ const { cursor, provider, startDate, endDate } = request;
748
+ const _queryParams = {};
749
+ if (cursor != null) {
750
+ _queryParams["cursor"] = cursor;
751
+ }
752
+ if (provider != null) {
753
+ _queryParams["provider"] = provider;
754
+ }
755
+ _queryParams["start_date"] = startDate;
756
+ if (endDate != null) {
757
+ _queryParams["end_date"] = endDate;
758
+ }
759
+ const _response = yield core.fetcher({
760
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/calories_active/grouped`),
761
+ method: "GET",
762
+ headers: {
763
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
764
+ "X-Fern-Language": "JavaScript",
765
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
766
+ "X-Fern-SDK-Version": "3.1.1",
767
+ },
768
+ contentType: "application/json",
769
+ queryParameters: _queryParams,
770
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
771
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
772
+ });
773
+ if (_response.ok) {
774
+ return yield serializers.GroupedCaloriesActiveResponse.parseOrThrow(_response.body, {
775
+ unrecognizedObjectKeys: "passthrough",
776
+ allowUnrecognizedUnionMembers: true,
777
+ allowUnrecognizedEnumValues: true,
778
+ breadcrumbsPrefix: ["response"],
779
+ });
780
+ }
781
+ if (_response.error.reason === "status-code") {
782
+ switch (_response.error.statusCode) {
783
+ case 422:
784
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
785
+ unrecognizedObjectKeys: "passthrough",
786
+ allowUnrecognizedUnionMembers: true,
787
+ allowUnrecognizedEnumValues: true,
788
+ breadcrumbsPrefix: ["response"],
789
+ }));
790
+ default:
791
+ throw new errors.VitalError({
792
+ statusCode: _response.error.statusCode,
793
+ body: _response.error.body,
794
+ });
795
+ }
796
+ }
797
+ switch (_response.error.reason) {
798
+ case "non-json":
799
+ throw new errors.VitalError({
800
+ statusCode: _response.error.statusCode,
801
+ body: _response.error.rawBody,
802
+ });
803
+ case "timeout":
804
+ throw new errors.VitalTimeoutError();
805
+ case "unknown":
806
+ throw new errors.VitalError({
807
+ message: _response.error.errorMessage,
808
+ });
809
+ }
810
+ });
811
+ }
812
+ /**
813
+ * @throws {@link Vital.UnprocessableEntityError}
814
+ *
815
+ * @example
816
+ * await vital.vitals.respiratoryRateGrouped("user-id", {
817
+ * startDate: "start-date"
818
+ * })
819
+ */
820
+ respiratoryRateGrouped(userId, request, requestOptions) {
821
+ var _a;
822
+ return __awaiter(this, void 0, void 0, function* () {
823
+ const { cursor, provider, startDate, endDate } = request;
824
+ const _queryParams = {};
825
+ if (cursor != null) {
826
+ _queryParams["cursor"] = cursor;
827
+ }
828
+ if (provider != null) {
829
+ _queryParams["provider"] = provider;
830
+ }
831
+ _queryParams["start_date"] = startDate;
832
+ if (endDate != null) {
833
+ _queryParams["end_date"] = endDate;
834
+ }
835
+ const _response = yield core.fetcher({
836
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/respiratory_rate/grouped`),
837
+ method: "GET",
838
+ headers: {
839
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
840
+ "X-Fern-Language": "JavaScript",
841
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
842
+ "X-Fern-SDK-Version": "3.1.1",
843
+ },
844
+ contentType: "application/json",
845
+ queryParameters: _queryParams,
846
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
847
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
848
+ });
849
+ if (_response.ok) {
850
+ return yield serializers.GroupedRespiratoryRateResponse.parseOrThrow(_response.body, {
851
+ unrecognizedObjectKeys: "passthrough",
852
+ allowUnrecognizedUnionMembers: true,
853
+ allowUnrecognizedEnumValues: true,
854
+ breadcrumbsPrefix: ["response"],
855
+ });
856
+ }
857
+ if (_response.error.reason === "status-code") {
858
+ switch (_response.error.statusCode) {
859
+ case 422:
860
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
861
+ unrecognizedObjectKeys: "passthrough",
862
+ allowUnrecognizedUnionMembers: true,
863
+ allowUnrecognizedEnumValues: true,
864
+ breadcrumbsPrefix: ["response"],
865
+ }));
866
+ default:
867
+ throw new errors.VitalError({
868
+ statusCode: _response.error.statusCode,
869
+ body: _response.error.body,
870
+ });
871
+ }
872
+ }
873
+ switch (_response.error.reason) {
874
+ case "non-json":
875
+ throw new errors.VitalError({
876
+ statusCode: _response.error.statusCode,
877
+ body: _response.error.rawBody,
878
+ });
879
+ case "timeout":
880
+ throw new errors.VitalTimeoutError();
881
+ case "unknown":
882
+ throw new errors.VitalError({
883
+ message: _response.error.errorMessage,
884
+ });
885
+ }
886
+ });
887
+ }
888
+ /**
889
+ * @throws {@link Vital.UnprocessableEntityError}
890
+ *
891
+ * @example
892
+ * await vital.vitals.igeGrouped("user-id", {
893
+ * startDate: "start-date"
894
+ * })
895
+ */
896
+ igeGrouped(userId, request, requestOptions) {
897
+ var _a;
898
+ return __awaiter(this, void 0, void 0, function* () {
899
+ const { cursor, provider, startDate, endDate } = request;
900
+ const _queryParams = {};
901
+ if (cursor != null) {
902
+ _queryParams["cursor"] = cursor;
903
+ }
904
+ if (provider != null) {
905
+ _queryParams["provider"] = provider;
906
+ }
907
+ _queryParams["start_date"] = startDate;
908
+ if (endDate != null) {
909
+ _queryParams["end_date"] = endDate;
910
+ }
911
+ const _response = yield core.fetcher({
912
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/ige/grouped`),
913
+ method: "GET",
914
+ headers: {
915
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
916
+ "X-Fern-Language": "JavaScript",
917
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
918
+ "X-Fern-SDK-Version": "3.1.1",
919
+ },
920
+ contentType: "application/json",
921
+ queryParameters: _queryParams,
922
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
923
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
924
+ });
925
+ if (_response.ok) {
926
+ return yield serializers.GroupedIgeResponse.parseOrThrow(_response.body, {
927
+ unrecognizedObjectKeys: "passthrough",
928
+ allowUnrecognizedUnionMembers: true,
929
+ allowUnrecognizedEnumValues: true,
930
+ breadcrumbsPrefix: ["response"],
931
+ });
932
+ }
933
+ if (_response.error.reason === "status-code") {
934
+ switch (_response.error.statusCode) {
935
+ case 422:
936
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
937
+ unrecognizedObjectKeys: "passthrough",
938
+ allowUnrecognizedUnionMembers: true,
939
+ allowUnrecognizedEnumValues: true,
940
+ breadcrumbsPrefix: ["response"],
941
+ }));
942
+ default:
943
+ throw new errors.VitalError({
944
+ statusCode: _response.error.statusCode,
945
+ body: _response.error.body,
946
+ });
947
+ }
948
+ }
949
+ switch (_response.error.reason) {
950
+ case "non-json":
951
+ throw new errors.VitalError({
952
+ statusCode: _response.error.statusCode,
953
+ body: _response.error.rawBody,
954
+ });
955
+ case "timeout":
956
+ throw new errors.VitalTimeoutError();
957
+ case "unknown":
958
+ throw new errors.VitalError({
959
+ message: _response.error.errorMessage,
960
+ });
961
+ }
962
+ });
963
+ }
964
+ /**
965
+ * @throws {@link Vital.UnprocessableEntityError}
966
+ *
967
+ * @example
968
+ * await vital.vitals.iggGrouped("user-id", {
969
+ * startDate: "start-date"
970
+ * })
971
+ */
972
+ iggGrouped(userId, request, requestOptions) {
973
+ var _a;
974
+ return __awaiter(this, void 0, void 0, function* () {
975
+ const { cursor, provider, startDate, endDate } = request;
976
+ const _queryParams = {};
977
+ if (cursor != null) {
978
+ _queryParams["cursor"] = cursor;
979
+ }
980
+ if (provider != null) {
981
+ _queryParams["provider"] = provider;
982
+ }
983
+ _queryParams["start_date"] = startDate;
984
+ if (endDate != null) {
985
+ _queryParams["end_date"] = endDate;
986
+ }
987
+ const _response = yield core.fetcher({
988
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/igg/grouped`),
989
+ method: "GET",
990
+ headers: {
991
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
992
+ "X-Fern-Language": "JavaScript",
993
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
994
+ "X-Fern-SDK-Version": "3.1.1",
995
+ },
996
+ contentType: "application/json",
997
+ queryParameters: _queryParams,
998
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
999
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1000
+ });
1001
+ if (_response.ok) {
1002
+ return yield serializers.GroupedIggResponse.parseOrThrow(_response.body, {
1003
+ unrecognizedObjectKeys: "passthrough",
1004
+ allowUnrecognizedUnionMembers: true,
1005
+ allowUnrecognizedEnumValues: true,
1006
+ breadcrumbsPrefix: ["response"],
1007
+ });
1008
+ }
1009
+ if (_response.error.reason === "status-code") {
1010
+ switch (_response.error.statusCode) {
1011
+ case 422:
1012
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1013
+ unrecognizedObjectKeys: "passthrough",
1014
+ allowUnrecognizedUnionMembers: true,
1015
+ allowUnrecognizedEnumValues: true,
1016
+ breadcrumbsPrefix: ["response"],
1017
+ }));
1018
+ default:
1019
+ throw new errors.VitalError({
1020
+ statusCode: _response.error.statusCode,
1021
+ body: _response.error.body,
1022
+ });
1023
+ }
1024
+ }
1025
+ switch (_response.error.reason) {
1026
+ case "non-json":
1027
+ throw new errors.VitalError({
1028
+ statusCode: _response.error.statusCode,
1029
+ body: _response.error.rawBody,
1030
+ });
1031
+ case "timeout":
1032
+ throw new errors.VitalTimeoutError();
1033
+ case "unknown":
1034
+ throw new errors.VitalError({
1035
+ message: _response.error.errorMessage,
1036
+ });
1037
+ }
1038
+ });
1039
+ }
1040
+ /**
1041
+ * @throws {@link Vital.UnprocessableEntityError}
1042
+ *
1043
+ * @example
1044
+ * await vital.vitals.hypnogramGrouped("user-id", {
1045
+ * startDate: "start-date"
1046
+ * })
1047
+ */
1048
+ hypnogramGrouped(userId, request, requestOptions) {
1049
+ var _a;
1050
+ return __awaiter(this, void 0, void 0, function* () {
1051
+ const { cursor, provider, startDate, endDate } = request;
1052
+ const _queryParams = {};
1053
+ if (cursor != null) {
1054
+ _queryParams["cursor"] = cursor;
1055
+ }
1056
+ if (provider != null) {
1057
+ _queryParams["provider"] = provider;
1058
+ }
1059
+ _queryParams["start_date"] = startDate;
1060
+ if (endDate != null) {
1061
+ _queryParams["end_date"] = endDate;
1062
+ }
1063
+ const _response = yield core.fetcher({
1064
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/hypnogram/grouped`),
1065
+ method: "GET",
1066
+ headers: {
1067
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1068
+ "X-Fern-Language": "JavaScript",
1069
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1070
+ "X-Fern-SDK-Version": "3.1.1",
1071
+ },
1072
+ contentType: "application/json",
1073
+ queryParameters: _queryParams,
1074
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1075
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1076
+ });
1077
+ if (_response.ok) {
1078
+ return yield serializers.GroupedHypnogramResponse.parseOrThrow(_response.body, {
1079
+ unrecognizedObjectKeys: "passthrough",
1080
+ allowUnrecognizedUnionMembers: true,
1081
+ allowUnrecognizedEnumValues: true,
1082
+ breadcrumbsPrefix: ["response"],
1083
+ });
1084
+ }
1085
+ if (_response.error.reason === "status-code") {
1086
+ switch (_response.error.statusCode) {
1087
+ case 422:
1088
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1089
+ unrecognizedObjectKeys: "passthrough",
1090
+ allowUnrecognizedUnionMembers: true,
1091
+ allowUnrecognizedEnumValues: true,
1092
+ breadcrumbsPrefix: ["response"],
1093
+ }));
1094
+ default:
1095
+ throw new errors.VitalError({
1096
+ statusCode: _response.error.statusCode,
1097
+ body: _response.error.body,
1098
+ });
1099
+ }
1100
+ }
1101
+ switch (_response.error.reason) {
1102
+ case "non-json":
1103
+ throw new errors.VitalError({
1104
+ statusCode: _response.error.statusCode,
1105
+ body: _response.error.rawBody,
1106
+ });
1107
+ case "timeout":
1108
+ throw new errors.VitalTimeoutError();
1109
+ case "unknown":
1110
+ throw new errors.VitalError({
1111
+ message: _response.error.errorMessage,
1112
+ });
1113
+ }
1114
+ });
1115
+ }
1116
+ /**
1117
+ * @throws {@link Vital.UnprocessableEntityError}
1118
+ *
1119
+ * @example
1120
+ * await vital.vitals.hrvGrouped("user-id", {
1121
+ * startDate: "start-date"
1122
+ * })
1123
+ */
1124
+ hrvGrouped(userId, request, requestOptions) {
1125
+ var _a;
1126
+ return __awaiter(this, void 0, void 0, function* () {
1127
+ const { cursor, provider, startDate, endDate } = request;
1128
+ const _queryParams = {};
1129
+ if (cursor != null) {
1130
+ _queryParams["cursor"] = cursor;
1131
+ }
1132
+ if (provider != null) {
1133
+ _queryParams["provider"] = provider;
1134
+ }
1135
+ _queryParams["start_date"] = startDate;
1136
+ if (endDate != null) {
1137
+ _queryParams["end_date"] = endDate;
1138
+ }
1139
+ const _response = yield core.fetcher({
1140
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/hrv/grouped`),
1141
+ method: "GET",
1142
+ headers: {
1143
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1144
+ "X-Fern-Language": "JavaScript",
1145
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1146
+ "X-Fern-SDK-Version": "3.1.1",
1147
+ },
1148
+ contentType: "application/json",
1149
+ queryParameters: _queryParams,
1150
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1151
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1152
+ });
1153
+ if (_response.ok) {
1154
+ return yield serializers.GroupedHrvResponse.parseOrThrow(_response.body, {
1155
+ unrecognizedObjectKeys: "passthrough",
1156
+ allowUnrecognizedUnionMembers: true,
1157
+ allowUnrecognizedEnumValues: true,
1158
+ breadcrumbsPrefix: ["response"],
1159
+ });
1160
+ }
1161
+ if (_response.error.reason === "status-code") {
1162
+ switch (_response.error.statusCode) {
1163
+ case 422:
1164
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1165
+ unrecognizedObjectKeys: "passthrough",
1166
+ allowUnrecognizedUnionMembers: true,
1167
+ allowUnrecognizedEnumValues: true,
1168
+ breadcrumbsPrefix: ["response"],
1169
+ }));
1170
+ default:
1171
+ throw new errors.VitalError({
1172
+ statusCode: _response.error.statusCode,
1173
+ body: _response.error.body,
1174
+ });
1175
+ }
1176
+ }
1177
+ switch (_response.error.reason) {
1178
+ case "non-json":
1179
+ throw new errors.VitalError({
1180
+ statusCode: _response.error.statusCode,
1181
+ body: _response.error.rawBody,
1182
+ });
1183
+ case "timeout":
1184
+ throw new errors.VitalTimeoutError();
1185
+ case "unknown":
1186
+ throw new errors.VitalError({
1187
+ message: _response.error.errorMessage,
1188
+ });
1189
+ }
1190
+ });
1191
+ }
1192
+ /**
1193
+ * @throws {@link Vital.UnprocessableEntityError}
1194
+ *
1195
+ * @example
1196
+ * await vital.vitals.heartrateGrouped("user-id", {
1197
+ * startDate: "start-date"
1198
+ * })
1199
+ */
1200
+ heartrateGrouped(userId, request, requestOptions) {
1201
+ var _a;
1202
+ return __awaiter(this, void 0, void 0, function* () {
1203
+ const { cursor, provider, startDate, endDate } = request;
1204
+ const _queryParams = {};
1205
+ if (cursor != null) {
1206
+ _queryParams["cursor"] = cursor;
1207
+ }
1208
+ if (provider != null) {
1209
+ _queryParams["provider"] = provider;
1210
+ }
1211
+ _queryParams["start_date"] = startDate;
1212
+ if (endDate != null) {
1213
+ _queryParams["end_date"] = endDate;
1214
+ }
1215
+ const _response = yield core.fetcher({
1216
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/heartrate/grouped`),
1217
+ method: "GET",
1218
+ headers: {
1219
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1220
+ "X-Fern-Language": "JavaScript",
1221
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1222
+ "X-Fern-SDK-Version": "3.1.1",
1223
+ },
1224
+ contentType: "application/json",
1225
+ queryParameters: _queryParams,
1226
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1227
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1228
+ });
1229
+ if (_response.ok) {
1230
+ return yield serializers.GroupedHeartRateResponse.parseOrThrow(_response.body, {
1231
+ unrecognizedObjectKeys: "passthrough",
1232
+ allowUnrecognizedUnionMembers: true,
1233
+ allowUnrecognizedEnumValues: true,
1234
+ breadcrumbsPrefix: ["response"],
1235
+ });
1236
+ }
1237
+ if (_response.error.reason === "status-code") {
1238
+ switch (_response.error.statusCode) {
1239
+ case 422:
1240
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1241
+ unrecognizedObjectKeys: "passthrough",
1242
+ allowUnrecognizedUnionMembers: true,
1243
+ allowUnrecognizedEnumValues: true,
1244
+ breadcrumbsPrefix: ["response"],
1245
+ }));
1246
+ default:
1247
+ throw new errors.VitalError({
1248
+ statusCode: _response.error.statusCode,
1249
+ body: _response.error.body,
1250
+ });
1251
+ }
1252
+ }
1253
+ switch (_response.error.reason) {
1254
+ case "non-json":
1255
+ throw new errors.VitalError({
1256
+ statusCode: _response.error.statusCode,
1257
+ body: _response.error.rawBody,
1258
+ });
1259
+ case "timeout":
1260
+ throw new errors.VitalTimeoutError();
1261
+ case "unknown":
1262
+ throw new errors.VitalError({
1263
+ message: _response.error.errorMessage,
1264
+ });
1265
+ }
1266
+ });
1267
+ }
1268
+ /**
1269
+ * @throws {@link Vital.UnprocessableEntityError}
1270
+ *
1271
+ * @example
1272
+ * await vital.vitals.glucoseGrouped("user-id", {
1273
+ * startDate: "start-date"
1274
+ * })
1275
+ */
1276
+ glucoseGrouped(userId, request, requestOptions) {
1277
+ var _a;
1278
+ return __awaiter(this, void 0, void 0, function* () {
1279
+ const { cursor, provider, startDate, endDate } = request;
1280
+ const _queryParams = {};
1281
+ if (cursor != null) {
1282
+ _queryParams["cursor"] = cursor;
1283
+ }
1284
+ if (provider != null) {
1285
+ _queryParams["provider"] = provider;
1286
+ }
1287
+ _queryParams["start_date"] = startDate;
1288
+ if (endDate != null) {
1289
+ _queryParams["end_date"] = endDate;
1290
+ }
1291
+ const _response = yield core.fetcher({
1292
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/glucose/grouped`),
1293
+ method: "GET",
1294
+ headers: {
1295
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1296
+ "X-Fern-Language": "JavaScript",
1297
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1298
+ "X-Fern-SDK-Version": "3.1.1",
1299
+ },
1300
+ contentType: "application/json",
1301
+ queryParameters: _queryParams,
1302
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1303
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1304
+ });
1305
+ if (_response.ok) {
1306
+ return yield serializers.GroupedGlucoseResponse.parseOrThrow(_response.body, {
1307
+ unrecognizedObjectKeys: "passthrough",
1308
+ allowUnrecognizedUnionMembers: true,
1309
+ allowUnrecognizedEnumValues: true,
1310
+ breadcrumbsPrefix: ["response"],
1311
+ });
1312
+ }
1313
+ if (_response.error.reason === "status-code") {
1314
+ switch (_response.error.statusCode) {
1315
+ case 422:
1316
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1317
+ unrecognizedObjectKeys: "passthrough",
1318
+ allowUnrecognizedUnionMembers: true,
1319
+ allowUnrecognizedEnumValues: true,
1320
+ breadcrumbsPrefix: ["response"],
1321
+ }));
1322
+ default:
1323
+ throw new errors.VitalError({
1324
+ statusCode: _response.error.statusCode,
1325
+ body: _response.error.body,
1326
+ });
1327
+ }
1328
+ }
1329
+ switch (_response.error.reason) {
1330
+ case "non-json":
1331
+ throw new errors.VitalError({
1332
+ statusCode: _response.error.statusCode,
1333
+ body: _response.error.rawBody,
1334
+ });
1335
+ case "timeout":
1336
+ throw new errors.VitalTimeoutError();
1337
+ case "unknown":
1338
+ throw new errors.VitalError({
1339
+ message: _response.error.errorMessage,
1340
+ });
1341
+ }
1342
+ });
1343
+ }
1344
+ /**
1345
+ * @throws {@link Vital.UnprocessableEntityError}
1346
+ *
1347
+ * @example
1348
+ * await vital.vitals.cholesterolGrouped("user-id", {
1349
+ * startDate: "start-date"
1350
+ * })
1351
+ */
1352
+ cholesterolGrouped(userId, request, requestOptions) {
1353
+ var _a;
1354
+ return __awaiter(this, void 0, void 0, function* () {
1355
+ const { cursor, provider, startDate, endDate } = request;
1356
+ const _queryParams = {};
1357
+ if (cursor != null) {
1358
+ _queryParams["cursor"] = cursor;
1359
+ }
1360
+ if (provider != null) {
1361
+ _queryParams["provider"] = provider;
1362
+ }
1363
+ _queryParams["start_date"] = startDate;
1364
+ if (endDate != null) {
1365
+ _queryParams["end_date"] = endDate;
1366
+ }
1367
+ const _response = yield core.fetcher({
1368
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/grouped`),
1369
+ method: "GET",
1370
+ headers: {
1371
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1372
+ "X-Fern-Language": "JavaScript",
1373
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1374
+ "X-Fern-SDK-Version": "3.1.1",
1375
+ },
1376
+ contentType: "application/json",
1377
+ queryParameters: _queryParams,
1378
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1379
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1380
+ });
1381
+ if (_response.ok) {
1382
+ return yield serializers.GroupedCholesterolResponse.parseOrThrow(_response.body, {
1383
+ unrecognizedObjectKeys: "passthrough",
1384
+ allowUnrecognizedUnionMembers: true,
1385
+ allowUnrecognizedEnumValues: true,
1386
+ breadcrumbsPrefix: ["response"],
1387
+ });
1388
+ }
1389
+ if (_response.error.reason === "status-code") {
1390
+ switch (_response.error.statusCode) {
1391
+ case 422:
1392
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1393
+ unrecognizedObjectKeys: "passthrough",
1394
+ allowUnrecognizedUnionMembers: true,
1395
+ allowUnrecognizedEnumValues: true,
1396
+ breadcrumbsPrefix: ["response"],
1397
+ }));
1398
+ default:
1399
+ throw new errors.VitalError({
1400
+ statusCode: _response.error.statusCode,
1401
+ body: _response.error.body,
1402
+ });
1403
+ }
1404
+ }
1405
+ switch (_response.error.reason) {
1406
+ case "non-json":
1407
+ throw new errors.VitalError({
1408
+ statusCode: _response.error.statusCode,
1409
+ body: _response.error.rawBody,
1410
+ });
1411
+ case "timeout":
1412
+ throw new errors.VitalTimeoutError();
1413
+ case "unknown":
1414
+ throw new errors.VitalError({
1415
+ message: _response.error.errorMessage,
1416
+ });
1417
+ }
1418
+ });
1419
+ }
1420
+ /**
1421
+ * @throws {@link Vital.UnprocessableEntityError}
1422
+ *
1423
+ * @example
1424
+ * await vital.vitals.bodyWeightGrouped("user-id", {
1425
+ * startDate: "start-date"
1426
+ * })
1427
+ */
1428
+ bodyWeightGrouped(userId, request, requestOptions) {
1429
+ var _a;
1430
+ return __awaiter(this, void 0, void 0, function* () {
1431
+ const { cursor, provider, startDate, endDate } = request;
1432
+ const _queryParams = {};
1433
+ if (cursor != null) {
1434
+ _queryParams["cursor"] = cursor;
1435
+ }
1436
+ if (provider != null) {
1437
+ _queryParams["provider"] = provider;
1438
+ }
1439
+ _queryParams["start_date"] = startDate;
1440
+ if (endDate != null) {
1441
+ _queryParams["end_date"] = endDate;
1442
+ }
1443
+ const _response = yield core.fetcher({
1444
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_weight/grouped`),
1445
+ method: "GET",
1446
+ headers: {
1447
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1448
+ "X-Fern-Language": "JavaScript",
1449
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1450
+ "X-Fern-SDK-Version": "3.1.1",
1451
+ },
1452
+ contentType: "application/json",
1453
+ queryParameters: _queryParams,
1454
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1455
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1456
+ });
1457
+ if (_response.ok) {
1458
+ return yield serializers.GroupedBodyWeightResponse.parseOrThrow(_response.body, {
1459
+ unrecognizedObjectKeys: "passthrough",
1460
+ allowUnrecognizedUnionMembers: true,
1461
+ allowUnrecognizedEnumValues: true,
1462
+ breadcrumbsPrefix: ["response"],
1463
+ });
1464
+ }
1465
+ if (_response.error.reason === "status-code") {
1466
+ switch (_response.error.statusCode) {
1467
+ case 422:
1468
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1469
+ unrecognizedObjectKeys: "passthrough",
1470
+ allowUnrecognizedUnionMembers: true,
1471
+ allowUnrecognizedEnumValues: true,
1472
+ breadcrumbsPrefix: ["response"],
1473
+ }));
1474
+ default:
1475
+ throw new errors.VitalError({
1476
+ statusCode: _response.error.statusCode,
1477
+ body: _response.error.body,
1478
+ });
1479
+ }
1480
+ }
1481
+ switch (_response.error.reason) {
1482
+ case "non-json":
1483
+ throw new errors.VitalError({
1484
+ statusCode: _response.error.statusCode,
1485
+ body: _response.error.rawBody,
1486
+ });
1487
+ case "timeout":
1488
+ throw new errors.VitalTimeoutError();
1489
+ case "unknown":
1490
+ throw new errors.VitalError({
1491
+ message: _response.error.errorMessage,
1492
+ });
1493
+ }
1494
+ });
1495
+ }
1496
+ /**
1497
+ * @throws {@link Vital.UnprocessableEntityError}
1498
+ *
1499
+ * @example
1500
+ * await vital.vitals.bodyFatGrouped("user-id", {
1501
+ * startDate: "start-date"
1502
+ * })
1503
+ */
1504
+ bodyFatGrouped(userId, request, requestOptions) {
1505
+ var _a;
1506
+ return __awaiter(this, void 0, void 0, function* () {
1507
+ const { cursor, provider, startDate, endDate } = request;
1508
+ const _queryParams = {};
1509
+ if (cursor != null) {
1510
+ _queryParams["cursor"] = cursor;
1511
+ }
1512
+ if (provider != null) {
1513
+ _queryParams["provider"] = provider;
1514
+ }
1515
+ _queryParams["start_date"] = startDate;
1516
+ if (endDate != null) {
1517
+ _queryParams["end_date"] = endDate;
1518
+ }
1519
+ const _response = yield core.fetcher({
1520
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_fat/grouped`),
1521
+ method: "GET",
1522
+ headers: {
1523
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1524
+ "X-Fern-Language": "JavaScript",
1525
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1526
+ "X-Fern-SDK-Version": "3.1.1",
1527
+ },
1528
+ contentType: "application/json",
1529
+ queryParameters: _queryParams,
1530
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1531
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1532
+ });
1533
+ if (_response.ok) {
1534
+ return yield serializers.GroupedBodyFatResponse.parseOrThrow(_response.body, {
1535
+ unrecognizedObjectKeys: "passthrough",
1536
+ allowUnrecognizedUnionMembers: true,
1537
+ allowUnrecognizedEnumValues: true,
1538
+ breadcrumbsPrefix: ["response"],
1539
+ });
1540
+ }
1541
+ if (_response.error.reason === "status-code") {
1542
+ switch (_response.error.statusCode) {
1543
+ case 422:
1544
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1545
+ unrecognizedObjectKeys: "passthrough",
1546
+ allowUnrecognizedUnionMembers: true,
1547
+ allowUnrecognizedEnumValues: true,
1548
+ breadcrumbsPrefix: ["response"],
1549
+ }));
1550
+ default:
1551
+ throw new errors.VitalError({
1552
+ statusCode: _response.error.statusCode,
1553
+ body: _response.error.body,
1554
+ });
1555
+ }
1556
+ }
1557
+ switch (_response.error.reason) {
1558
+ case "non-json":
1559
+ throw new errors.VitalError({
1560
+ statusCode: _response.error.statusCode,
1561
+ body: _response.error.rawBody,
1562
+ });
1563
+ case "timeout":
1564
+ throw new errors.VitalTimeoutError();
1565
+ case "unknown":
1566
+ throw new errors.VitalError({
1567
+ message: _response.error.errorMessage,
1568
+ });
1569
+ }
1570
+ });
1571
+ }
1572
+ /**
1573
+ * @throws {@link Vital.UnprocessableEntityError}
1574
+ *
1575
+ * @example
1576
+ * await vital.vitals.bloodOxygenGrouped("user-id", {
1577
+ * startDate: "start-date"
1578
+ * })
1579
+ */
1580
+ bloodOxygenGrouped(userId, request, requestOptions) {
1581
+ var _a;
1582
+ return __awaiter(this, void 0, void 0, function* () {
1583
+ const { cursor, provider, startDate, endDate } = request;
1584
+ const _queryParams = {};
1585
+ if (cursor != null) {
1586
+ _queryParams["cursor"] = cursor;
1587
+ }
1588
+ if (provider != null) {
1589
+ _queryParams["provider"] = provider;
1590
+ }
1591
+ _queryParams["start_date"] = startDate;
1592
+ if (endDate != null) {
1593
+ _queryParams["end_date"] = endDate;
1594
+ }
1595
+ const _response = yield core.fetcher({
1596
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/blood_oxygen/grouped`),
1597
+ method: "GET",
1598
+ headers: {
1599
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1600
+ "X-Fern-Language": "JavaScript",
1601
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1602
+ "X-Fern-SDK-Version": "3.1.1",
1603
+ },
1604
+ contentType: "application/json",
1605
+ queryParameters: _queryParams,
1606
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1607
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1608
+ });
1609
+ if (_response.ok) {
1610
+ return yield serializers.GroupedBloodOxygenResponse.parseOrThrow(_response.body, {
1611
+ unrecognizedObjectKeys: "passthrough",
1612
+ allowUnrecognizedUnionMembers: true,
1613
+ allowUnrecognizedEnumValues: true,
1614
+ breadcrumbsPrefix: ["response"],
1615
+ });
1616
+ }
1617
+ if (_response.error.reason === "status-code") {
1618
+ switch (_response.error.statusCode) {
1619
+ case 422:
1620
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1621
+ unrecognizedObjectKeys: "passthrough",
1622
+ allowUnrecognizedUnionMembers: true,
1623
+ allowUnrecognizedEnumValues: true,
1624
+ breadcrumbsPrefix: ["response"],
1625
+ }));
1626
+ default:
1627
+ throw new errors.VitalError({
1628
+ statusCode: _response.error.statusCode,
1629
+ body: _response.error.body,
1630
+ });
1631
+ }
1632
+ }
1633
+ switch (_response.error.reason) {
1634
+ case "non-json":
1635
+ throw new errors.VitalError({
1636
+ statusCode: _response.error.statusCode,
1637
+ body: _response.error.rawBody,
1638
+ });
1639
+ case "timeout":
1640
+ throw new errors.VitalTimeoutError();
1641
+ case "unknown":
1642
+ throw new errors.VitalError({
1643
+ message: _response.error.errorMessage,
1644
+ });
1645
+ }
1646
+ });
1647
+ }
1648
+ /**
1649
+ * @throws {@link Vital.UnprocessableEntityError}
1650
+ *
1651
+ * @example
1652
+ * await vital.vitals.electrocardiogramVoltageGrouped("user-id", {
1653
+ * startDate: "start-date"
1654
+ * })
1655
+ */
1656
+ electrocardiogramVoltageGrouped(userId, request, requestOptions) {
1657
+ var _a;
1658
+ return __awaiter(this, void 0, void 0, function* () {
1659
+ const { cursor, provider, startDate, endDate } = request;
1660
+ const _queryParams = {};
1661
+ if (cursor != null) {
1662
+ _queryParams["cursor"] = cursor;
1663
+ }
1664
+ if (provider != null) {
1665
+ _queryParams["provider"] = provider;
1666
+ }
1667
+ _queryParams["start_date"] = startDate;
1668
+ if (endDate != null) {
1669
+ _queryParams["end_date"] = endDate;
1670
+ }
1671
+ const _response = yield core.fetcher({
1672
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/electrocardiogram_voltage/grouped`),
1673
+ method: "GET",
1674
+ headers: {
1675
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1676
+ "X-Fern-Language": "JavaScript",
1677
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1678
+ "X-Fern-SDK-Version": "3.1.1",
1679
+ },
1680
+ contentType: "application/json",
1681
+ queryParameters: _queryParams,
1682
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1683
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1684
+ });
1685
+ if (_response.ok) {
1686
+ return yield serializers.GroupedElectrocardiogramVoltageResponse.parseOrThrow(_response.body, {
1687
+ unrecognizedObjectKeys: "passthrough",
1688
+ allowUnrecognizedUnionMembers: true,
1689
+ allowUnrecognizedEnumValues: true,
1690
+ breadcrumbsPrefix: ["response"],
1691
+ });
1692
+ }
1693
+ if (_response.error.reason === "status-code") {
1694
+ switch (_response.error.statusCode) {
1695
+ case 422:
1696
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1697
+ unrecognizedObjectKeys: "passthrough",
1698
+ allowUnrecognizedUnionMembers: true,
1699
+ allowUnrecognizedEnumValues: true,
1700
+ breadcrumbsPrefix: ["response"],
1701
+ }));
1702
+ default:
1703
+ throw new errors.VitalError({
1704
+ statusCode: _response.error.statusCode,
1705
+ body: _response.error.body,
1706
+ });
1707
+ }
1708
+ }
1709
+ switch (_response.error.reason) {
1710
+ case "non-json":
1711
+ throw new errors.VitalError({
1712
+ statusCode: _response.error.statusCode,
1713
+ body: _response.error.rawBody,
1714
+ });
1715
+ case "timeout":
1716
+ throw new errors.VitalTimeoutError();
1717
+ case "unknown":
1718
+ throw new errors.VitalError({
1719
+ message: _response.error.errorMessage,
1720
+ });
1721
+ }
1722
+ });
1723
+ }
1724
+ /**
1725
+ * @throws {@link Vital.UnprocessableEntityError}
1726
+ *
1727
+ * @example
1728
+ * await vital.vitals.bloodPressureGrouped("user-id", {
1729
+ * startDate: "start-date"
1730
+ * })
1731
+ */
1732
+ bloodPressureGrouped(userId, request, requestOptions) {
1733
+ var _a;
1734
+ return __awaiter(this, void 0, void 0, function* () {
1735
+ const { cursor, provider, startDate, endDate } = request;
1736
+ const _queryParams = {};
1737
+ if (cursor != null) {
1738
+ _queryParams["cursor"] = cursor;
1739
+ }
1740
+ if (provider != null) {
1741
+ _queryParams["provider"] = provider;
1742
+ }
1743
+ _queryParams["start_date"] = startDate;
1744
+ if (endDate != null) {
1745
+ _queryParams["end_date"] = endDate;
1746
+ }
1747
+ const _response = yield core.fetcher({
1748
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/blood_pressure/grouped`),
1749
+ method: "GET",
1750
+ headers: {
1751
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1752
+ "X-Fern-Language": "JavaScript",
1753
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1754
+ "X-Fern-SDK-Version": "3.1.1",
1755
+ },
1756
+ contentType: "application/json",
1757
+ queryParameters: _queryParams,
1758
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1759
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1760
+ });
1761
+ if (_response.ok) {
1762
+ return yield serializers.GroupedBloodPressureResponse.parseOrThrow(_response.body, {
1763
+ unrecognizedObjectKeys: "passthrough",
1764
+ allowUnrecognizedUnionMembers: true,
1765
+ allowUnrecognizedEnumValues: true,
1766
+ breadcrumbsPrefix: ["response"],
1767
+ });
1768
+ }
1769
+ if (_response.error.reason === "status-code") {
1770
+ switch (_response.error.statusCode) {
1771
+ case 422:
1772
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1773
+ unrecognizedObjectKeys: "passthrough",
1774
+ allowUnrecognizedUnionMembers: true,
1775
+ allowUnrecognizedEnumValues: true,
1776
+ breadcrumbsPrefix: ["response"],
1777
+ }));
1778
+ default:
1779
+ throw new errors.VitalError({
1780
+ statusCode: _response.error.statusCode,
1781
+ body: _response.error.body,
1782
+ });
1783
+ }
1784
+ }
1785
+ switch (_response.error.reason) {
1786
+ case "non-json":
1787
+ throw new errors.VitalError({
1788
+ statusCode: _response.error.statusCode,
1789
+ body: _response.error.rawBody,
1790
+ });
1791
+ case "timeout":
1792
+ throw new errors.VitalTimeoutError();
1793
+ case "unknown":
1794
+ throw new errors.VitalError({
1795
+ message: _response.error.errorMessage,
1796
+ });
1797
+ }
1798
+ });
1799
+ }
1800
+ /**
1801
+ * @throws {@link Vital.UnprocessableEntityError}
1802
+ *
1803
+ * @example
1804
+ * await vital.vitals.vo2Max("user-id", {
1805
+ * startDate: "start-date"
1806
+ * })
1807
+ */
1808
+ vo2Max(userId, request, requestOptions) {
1809
+ var _a;
1810
+ return __awaiter(this, void 0, void 0, function* () {
1811
+ const { provider, startDate, endDate } = request;
1812
+ const _queryParams = {};
1813
+ if (provider != null) {
1814
+ _queryParams["provider"] = provider;
1815
+ }
1816
+ _queryParams["start_date"] = startDate;
1817
+ if (endDate != null) {
1818
+ _queryParams["end_date"] = endDate;
1819
+ }
1820
+ const _response = yield core.fetcher({
1821
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/vo2_max`),
1822
+ method: "GET",
1823
+ headers: {
1824
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1825
+ "X-Fern-Language": "JavaScript",
1826
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1827
+ "X-Fern-SDK-Version": "3.1.1",
1828
+ },
1829
+ contentType: "application/json",
1830
+ queryParameters: _queryParams,
1831
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1832
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1833
+ });
1834
+ if (_response.ok) {
1835
+ return yield serializers.vitals.vo2Max.Response.parseOrThrow(_response.body, {
1836
+ unrecognizedObjectKeys: "passthrough",
1837
+ allowUnrecognizedUnionMembers: true,
1838
+ allowUnrecognizedEnumValues: true,
1839
+ breadcrumbsPrefix: ["response"],
1840
+ });
1841
+ }
1842
+ if (_response.error.reason === "status-code") {
1843
+ switch (_response.error.statusCode) {
1844
+ case 422:
1845
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1846
+ unrecognizedObjectKeys: "passthrough",
1847
+ allowUnrecognizedUnionMembers: true,
1848
+ allowUnrecognizedEnumValues: true,
1849
+ breadcrumbsPrefix: ["response"],
1850
+ }));
1851
+ default:
1852
+ throw new errors.VitalError({
1853
+ statusCode: _response.error.statusCode,
1854
+ body: _response.error.body,
1855
+ });
1856
+ }
1857
+ }
1858
+ switch (_response.error.reason) {
1859
+ case "non-json":
1860
+ throw new errors.VitalError({
1861
+ statusCode: _response.error.statusCode,
1862
+ body: _response.error.rawBody,
1863
+ });
1864
+ case "timeout":
1865
+ throw new errors.VitalTimeoutError();
1866
+ case "unknown":
1867
+ throw new errors.VitalError({
1868
+ message: _response.error.errorMessage,
1869
+ });
1870
+ }
1871
+ });
1872
+ }
1873
+ /**
1874
+ * @throws {@link Vital.UnprocessableEntityError}
1875
+ *
1876
+ * @example
1877
+ * await vital.vitals.stressLevel("user-id", {
1878
+ * startDate: "start-date"
1879
+ * })
1880
+ */
1881
+ stressLevel(userId, request, requestOptions) {
1882
+ var _a;
1883
+ return __awaiter(this, void 0, void 0, function* () {
1884
+ const { provider, startDate, endDate } = request;
1885
+ const _queryParams = {};
1886
+ if (provider != null) {
1887
+ _queryParams["provider"] = provider;
1888
+ }
1889
+ _queryParams["start_date"] = startDate;
1890
+ if (endDate != null) {
1891
+ _queryParams["end_date"] = endDate;
1892
+ }
1893
+ const _response = yield core.fetcher({
1894
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/stress_level`),
1895
+ method: "GET",
1896
+ headers: {
1897
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1898
+ "X-Fern-Language": "JavaScript",
1899
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
1900
+ "X-Fern-SDK-Version": "3.1.1",
1901
+ },
1902
+ contentType: "application/json",
1903
+ queryParameters: _queryParams,
1904
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1905
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1906
+ });
1907
+ if (_response.ok) {
1908
+ return yield serializers.vitals.stressLevel.Response.parseOrThrow(_response.body, {
1909
+ unrecognizedObjectKeys: "passthrough",
1910
+ allowUnrecognizedUnionMembers: true,
1911
+ allowUnrecognizedEnumValues: true,
1912
+ breadcrumbsPrefix: ["response"],
1913
+ });
1914
+ }
1915
+ if (_response.error.reason === "status-code") {
1916
+ switch (_response.error.statusCode) {
1917
+ case 422:
1918
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1919
+ unrecognizedObjectKeys: "passthrough",
1920
+ allowUnrecognizedUnionMembers: true,
1921
+ allowUnrecognizedEnumValues: true,
1922
+ breadcrumbsPrefix: ["response"],
1923
+ }));
1924
+ default:
1925
+ throw new errors.VitalError({
1926
+ statusCode: _response.error.statusCode,
1927
+ body: _response.error.body,
1928
+ });
1929
+ }
1930
+ }
1931
+ switch (_response.error.reason) {
1932
+ case "non-json":
1933
+ throw new errors.VitalError({
1934
+ statusCode: _response.error.statusCode,
1935
+ body: _response.error.rawBody,
1936
+ });
1937
+ case "timeout":
1938
+ throw new errors.VitalTimeoutError();
1939
+ case "unknown":
1940
+ throw new errors.VitalError({
1941
+ message: _response.error.errorMessage,
1942
+ });
1943
+ }
1944
+ });
1945
+ }
1946
+ /**
54
1947
  * @throws {@link Vital.UnprocessableEntityError}
55
1948
  *
56
1949
  * @example
@@ -77,7 +1970,7 @@ class Vitals {
77
1970
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
78
1971
  "X-Fern-Language": "JavaScript",
79
1972
  "X-Fern-SDK-Name": "@tryvital/vital-node",
80
- "X-Fern-SDK-Version": "3.0.9",
1973
+ "X-Fern-SDK-Version": "3.1.1",
81
1974
  },
82
1975
  contentType: "application/json",
83
1976
  queryParameters: _queryParams,
@@ -124,7 +2017,6 @@ class Vitals {
124
2017
  });
125
2018
  }
126
2019
  /**
127
- * Get timeseries data for user
128
2020
  * @throws {@link Vital.UnprocessableEntityError}
129
2021
  *
130
2022
  * @example
@@ -151,7 +2043,7 @@ class Vitals {
151
2043
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
152
2044
  "X-Fern-Language": "JavaScript",
153
2045
  "X-Fern-SDK-Name": "@tryvital/vital-node",
154
- "X-Fern-SDK-Version": "3.0.9",
2046
+ "X-Fern-SDK-Version": "3.1.1",
155
2047
  },
156
2048
  contentType: "application/json",
157
2049
  queryParameters: _queryParams,
@@ -198,7 +2090,6 @@ class Vitals {
198
2090
  });
199
2091
  }
200
2092
  /**
201
- * Get timeseries data for user
202
2093
  * @throws {@link Vital.UnprocessableEntityError}
203
2094
  *
204
2095
  * @example
@@ -225,7 +2116,7 @@ class Vitals {
225
2116
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
226
2117
  "X-Fern-Language": "JavaScript",
227
2118
  "X-Fern-SDK-Name": "@tryvital/vital-node",
228
- "X-Fern-SDK-Version": "3.0.9",
2119
+ "X-Fern-SDK-Version": "3.1.1",
229
2120
  },
230
2121
  contentType: "application/json",
231
2122
  queryParameters: _queryParams,
@@ -272,7 +2163,6 @@ class Vitals {
272
2163
  });
273
2164
  }
274
2165
  /**
275
- * Get timeseries data for user
276
2166
  * @throws {@link Vital.UnprocessableEntityError}
277
2167
  *
278
2168
  * @example
@@ -299,7 +2189,7 @@ class Vitals {
299
2189
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
300
2190
  "X-Fern-Language": "JavaScript",
301
2191
  "X-Fern-SDK-Name": "@tryvital/vital-node",
302
- "X-Fern-SDK-Version": "3.0.9",
2192
+ "X-Fern-SDK-Version": "3.1.1",
303
2193
  },
304
2194
  contentType: "application/json",
305
2195
  queryParameters: _queryParams,
@@ -346,7 +2236,6 @@ class Vitals {
346
2236
  });
347
2237
  }
348
2238
  /**
349
- * Get timeseries data for user
350
2239
  * @throws {@link Vital.UnprocessableEntityError}
351
2240
  *
352
2241
  * @example
@@ -373,7 +2262,7 @@ class Vitals {
373
2262
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
374
2263
  "X-Fern-Language": "JavaScript",
375
2264
  "X-Fern-SDK-Name": "@tryvital/vital-node",
376
- "X-Fern-SDK-Version": "3.0.9",
2265
+ "X-Fern-SDK-Version": "3.1.1",
377
2266
  },
378
2267
  contentType: "application/json",
379
2268
  queryParameters: _queryParams,
@@ -420,7 +2309,6 @@ class Vitals {
420
2309
  });
421
2310
  }
422
2311
  /**
423
- * Get timeseries data for user
424
2312
  * @throws {@link Vital.UnprocessableEntityError}
425
2313
  *
426
2314
  * @example
@@ -447,7 +2335,7 @@ class Vitals {
447
2335
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
448
2336
  "X-Fern-Language": "JavaScript",
449
2337
  "X-Fern-SDK-Name": "@tryvital/vital-node",
450
- "X-Fern-SDK-Version": "3.0.9",
2338
+ "X-Fern-SDK-Version": "3.1.1",
451
2339
  },
452
2340
  contentType: "application/json",
453
2341
  queryParameters: _queryParams,
@@ -494,7 +2382,6 @@ class Vitals {
494
2382
  });
495
2383
  }
496
2384
  /**
497
- * Get timeseries data for user
498
2385
  * @throws {@link Vital.UnprocessableEntityError}
499
2386
  *
500
2387
  * @example
@@ -521,7 +2408,7 @@ class Vitals {
521
2408
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
522
2409
  "X-Fern-Language": "JavaScript",
523
2410
  "X-Fern-SDK-Name": "@tryvital/vital-node",
524
- "X-Fern-SDK-Version": "3.0.9",
2411
+ "X-Fern-SDK-Version": "3.1.1",
525
2412
  },
526
2413
  contentType: "application/json",
527
2414
  queryParameters: _queryParams,
@@ -568,7 +2455,6 @@ class Vitals {
568
2455
  });
569
2456
  }
570
2457
  /**
571
- * Get timeseries data for user
572
2458
  * @throws {@link Vital.UnprocessableEntityError}
573
2459
  *
574
2460
  * @example
@@ -595,7 +2481,7 @@ class Vitals {
595
2481
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
596
2482
  "X-Fern-Language": "JavaScript",
597
2483
  "X-Fern-SDK-Name": "@tryvital/vital-node",
598
- "X-Fern-SDK-Version": "3.0.9",
2484
+ "X-Fern-SDK-Version": "3.1.1",
599
2485
  },
600
2486
  contentType: "application/json",
601
2487
  queryParameters: _queryParams,
@@ -642,7 +2528,6 @@ class Vitals {
642
2528
  });
643
2529
  }
644
2530
  /**
645
- * Get timeseries data for user
646
2531
  * @throws {@link Vital.UnprocessableEntityError}
647
2532
  *
648
2533
  * @example
@@ -669,7 +2554,7 @@ class Vitals {
669
2554
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
670
2555
  "X-Fern-Language": "JavaScript",
671
2556
  "X-Fern-SDK-Name": "@tryvital/vital-node",
672
- "X-Fern-SDK-Version": "3.0.9",
2557
+ "X-Fern-SDK-Version": "3.1.1",
673
2558
  },
674
2559
  contentType: "application/json",
675
2560
  queryParameters: _queryParams,
@@ -716,7 +2601,6 @@ class Vitals {
716
2601
  });
717
2602
  }
718
2603
  /**
719
- * Get timeseries data for user
720
2604
  * @throws {@link Vital.UnprocessableEntityError}
721
2605
  *
722
2606
  * @example
@@ -743,7 +2627,7 @@ class Vitals {
743
2627
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
744
2628
  "X-Fern-Language": "JavaScript",
745
2629
  "X-Fern-SDK-Name": "@tryvital/vital-node",
746
- "X-Fern-SDK-Version": "3.0.9",
2630
+ "X-Fern-SDK-Version": "3.1.1",
747
2631
  },
748
2632
  contentType: "application/json",
749
2633
  queryParameters: _queryParams,
@@ -790,7 +2674,6 @@ class Vitals {
790
2674
  });
791
2675
  }
792
2676
  /**
793
- * Get timeseries data for user
794
2677
  * @throws {@link Vital.UnprocessableEntityError}
795
2678
  *
796
2679
  * @example
@@ -817,7 +2700,7 @@ class Vitals {
817
2700
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
818
2701
  "X-Fern-Language": "JavaScript",
819
2702
  "X-Fern-SDK-Name": "@tryvital/vital-node",
820
- "X-Fern-SDK-Version": "3.0.9",
2703
+ "X-Fern-SDK-Version": "3.1.1",
821
2704
  },
822
2705
  contentType: "application/json",
823
2706
  queryParameters: _queryParams,
@@ -864,7 +2747,6 @@ class Vitals {
864
2747
  });
865
2748
  }
866
2749
  /**
867
- * Get timeseries data for user
868
2750
  * @throws {@link Vital.UnprocessableEntityError}
869
2751
  *
870
2752
  * @example
@@ -891,7 +2773,7 @@ class Vitals {
891
2773
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
892
2774
  "X-Fern-Language": "JavaScript",
893
2775
  "X-Fern-SDK-Name": "@tryvital/vital-node",
894
- "X-Fern-SDK-Version": "3.0.9",
2776
+ "X-Fern-SDK-Version": "3.1.1",
895
2777
  },
896
2778
  contentType: "application/json",
897
2779
  queryParameters: _queryParams,
@@ -938,7 +2820,6 @@ class Vitals {
938
2820
  });
939
2821
  }
940
2822
  /**
941
- * Get timeseries data for user
942
2823
  * @throws {@link Vital.UnprocessableEntityError}
943
2824
  *
944
2825
  * @example
@@ -965,7 +2846,7 @@ class Vitals {
965
2846
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
966
2847
  "X-Fern-Language": "JavaScript",
967
2848
  "X-Fern-SDK-Name": "@tryvital/vital-node",
968
- "X-Fern-SDK-Version": "3.0.9",
2849
+ "X-Fern-SDK-Version": "3.1.1",
969
2850
  },
970
2851
  contentType: "application/json",
971
2852
  queryParameters: _queryParams,
@@ -1012,7 +2893,6 @@ class Vitals {
1012
2893
  });
1013
2894
  }
1014
2895
  /**
1015
- * Get timeseries data for user
1016
2896
  * @throws {@link Vital.UnprocessableEntityError}
1017
2897
  *
1018
2898
  * @example
@@ -1039,7 +2919,7 @@ class Vitals {
1039
2919
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1040
2920
  "X-Fern-Language": "JavaScript",
1041
2921
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1042
- "X-Fern-SDK-Version": "3.0.9",
2922
+ "X-Fern-SDK-Version": "3.1.1",
1043
2923
  },
1044
2924
  contentType: "application/json",
1045
2925
  queryParameters: _queryParams,
@@ -1086,7 +2966,6 @@ class Vitals {
1086
2966
  });
1087
2967
  }
1088
2968
  /**
1089
- * Get timeseries data for user
1090
2969
  * @throws {@link Vital.UnprocessableEntityError}
1091
2970
  *
1092
2971
  * @example
@@ -1113,7 +2992,7 @@ class Vitals {
1113
2992
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1114
2993
  "X-Fern-Language": "JavaScript",
1115
2994
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1116
- "X-Fern-SDK-Version": "3.0.9",
2995
+ "X-Fern-SDK-Version": "3.1.1",
1117
2996
  },
1118
2997
  contentType: "application/json",
1119
2998
  queryParameters: _queryParams,
@@ -1160,15 +3039,14 @@ class Vitals {
1160
3039
  });
1161
3040
  }
1162
3041
  /**
1163
- * Get timeseries data for user
1164
3042
  * @throws {@link Vital.UnprocessableEntityError}
1165
3043
  *
1166
3044
  * @example
1167
- * await vital.vitals.triglycerides("user-id", {
3045
+ * await vital.vitals.cholesterolTriglycerides("user-id", {
1168
3046
  * startDate: "start-date"
1169
3047
  * })
1170
3048
  */
1171
- triglycerides(userId, request, requestOptions) {
3049
+ cholesterolTriglycerides(userId, request, requestOptions) {
1172
3050
  var _a;
1173
3051
  return __awaiter(this, void 0, void 0, function* () {
1174
3052
  const { provider, startDate, endDate } = request;
@@ -1187,7 +3065,7 @@ class Vitals {
1187
3065
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1188
3066
  "X-Fern-Language": "JavaScript",
1189
3067
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1190
- "X-Fern-SDK-Version": "3.0.9",
3068
+ "X-Fern-SDK-Version": "3.1.1",
1191
3069
  },
1192
3070
  contentType: "application/json",
1193
3071
  queryParameters: _queryParams,
@@ -1195,7 +3073,7 @@ class Vitals {
1195
3073
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1196
3074
  });
1197
3075
  if (_response.ok) {
1198
- return yield serializers.vitals.triglycerides.Response.parseOrThrow(_response.body, {
3076
+ return yield serializers.vitals.cholesterolTriglycerides.Response.parseOrThrow(_response.body, {
1199
3077
  unrecognizedObjectKeys: "passthrough",
1200
3078
  allowUnrecognizedUnionMembers: true,
1201
3079
  allowUnrecognizedEnumValues: true,
@@ -1234,7 +3112,6 @@ class Vitals {
1234
3112
  });
1235
3113
  }
1236
3114
  /**
1237
- * Get timeseries data for user
1238
3115
  * @throws {@link Vital.UnprocessableEntityError}
1239
3116
  *
1240
3117
  * @example
@@ -1261,7 +3138,7 @@ class Vitals {
1261
3138
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1262
3139
  "X-Fern-Language": "JavaScript",
1263
3140
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1264
- "X-Fern-SDK-Version": "3.0.9",
3141
+ "X-Fern-SDK-Version": "3.1.1",
1265
3142
  },
1266
3143
  contentType: "application/json",
1267
3144
  queryParameters: _queryParams,
@@ -1308,15 +3185,14 @@ class Vitals {
1308
3185
  });
1309
3186
  }
1310
3187
  /**
1311
- * Get timeseries data for user
1312
3188
  * @throws {@link Vital.UnprocessableEntityError}
1313
3189
  *
1314
3190
  * @example
1315
- * await vital.vitals.cholesterolHdl("user-id", {
3191
+ * await vital.vitals.cholesterolLdl("user-id", {
1316
3192
  * startDate: "start-date"
1317
3193
  * })
1318
3194
  */
1319
- cholesterolHdl(userId, request, requestOptions) {
3195
+ cholesterolLdl(userId, request, requestOptions) {
1320
3196
  var _a;
1321
3197
  return __awaiter(this, void 0, void 0, function* () {
1322
3198
  const { provider, startDate, endDate } = request;
@@ -1329,13 +3205,13 @@ class Vitals {
1329
3205
  _queryParams["end_date"] = endDate;
1330
3206
  }
1331
3207
  const _response = yield core.fetcher({
1332
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/hdl`),
3208
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/ldl`),
1333
3209
  method: "GET",
1334
3210
  headers: {
1335
3211
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1336
3212
  "X-Fern-Language": "JavaScript",
1337
3213
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1338
- "X-Fern-SDK-Version": "3.0.9",
3214
+ "X-Fern-SDK-Version": "3.1.1",
1339
3215
  },
1340
3216
  contentType: "application/json",
1341
3217
  queryParameters: _queryParams,
@@ -1343,7 +3219,7 @@ class Vitals {
1343
3219
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1344
3220
  });
1345
3221
  if (_response.ok) {
1346
- return yield serializers.vitals.cholesterolHdl.Response.parseOrThrow(_response.body, {
3222
+ return yield serializers.vitals.cholesterolLdl.Response.parseOrThrow(_response.body, {
1347
3223
  unrecognizedObjectKeys: "passthrough",
1348
3224
  allowUnrecognizedUnionMembers: true,
1349
3225
  allowUnrecognizedEnumValues: true,
@@ -1382,15 +3258,14 @@ class Vitals {
1382
3258
  });
1383
3259
  }
1384
3260
  /**
1385
- * Get timeseries data for user
1386
3261
  * @throws {@link Vital.UnprocessableEntityError}
1387
3262
  *
1388
3263
  * @example
1389
- * await vital.vitals.cholesterolLdl("user-id", {
3264
+ * await vital.vitals.cholesterolHdl("user-id", {
1390
3265
  * startDate: "start-date"
1391
3266
  * })
1392
3267
  */
1393
- cholesterolLdl(userId, request, requestOptions) {
3268
+ cholesterolHdl(userId, request, requestOptions) {
1394
3269
  var _a;
1395
3270
  return __awaiter(this, void 0, void 0, function* () {
1396
3271
  const { provider, startDate, endDate } = request;
@@ -1403,13 +3278,13 @@ class Vitals {
1403
3278
  _queryParams["end_date"] = endDate;
1404
3279
  }
1405
3280
  const _response = yield core.fetcher({
1406
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/ldl`),
3281
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/hdl`),
1407
3282
  method: "GET",
1408
3283
  headers: {
1409
3284
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1410
3285
  "X-Fern-Language": "JavaScript",
1411
3286
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1412
- "X-Fern-SDK-Version": "3.0.9",
3287
+ "X-Fern-SDK-Version": "3.1.1",
1413
3288
  },
1414
3289
  contentType: "application/json",
1415
3290
  queryParameters: _queryParams,
@@ -1417,7 +3292,7 @@ class Vitals {
1417
3292
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1418
3293
  });
1419
3294
  if (_response.ok) {
1420
- return yield serializers.vitals.cholesterolLdl.Response.parseOrThrow(_response.body, {
3295
+ return yield serializers.vitals.cholesterolHdl.Response.parseOrThrow(_response.body, {
1421
3296
  unrecognizedObjectKeys: "passthrough",
1422
3297
  allowUnrecognizedUnionMembers: true,
1423
3298
  allowUnrecognizedEnumValues: true,
@@ -1456,7 +3331,6 @@ class Vitals {
1456
3331
  });
1457
3332
  }
1458
3333
  /**
1459
- * Get timeseries data for user
1460
3334
  * @throws {@link Vital.UnprocessableEntityError}
1461
3335
  *
1462
3336
  * @example
@@ -1483,7 +3357,7 @@ class Vitals {
1483
3357
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1484
3358
  "X-Fern-Language": "JavaScript",
1485
3359
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1486
- "X-Fern-SDK-Version": "3.0.9",
3360
+ "X-Fern-SDK-Version": "3.1.1",
1487
3361
  },
1488
3362
  contentType: "application/json",
1489
3363
  queryParameters: _queryParams,
@@ -1530,7 +3404,152 @@ class Vitals {
1530
3404
  });
1531
3405
  }
1532
3406
  /**
1533
- * Get timeseries data for user
3407
+ * @throws {@link Vital.UnprocessableEntityError}
3408
+ *
3409
+ * @example
3410
+ * await vital.vitals.bodyWeight("user-id", {
3411
+ * startDate: "start-date"
3412
+ * })
3413
+ */
3414
+ bodyWeight(userId, request, requestOptions) {
3415
+ var _a;
3416
+ return __awaiter(this, void 0, void 0, function* () {
3417
+ const { provider, startDate, endDate } = request;
3418
+ const _queryParams = {};
3419
+ if (provider != null) {
3420
+ _queryParams["provider"] = provider;
3421
+ }
3422
+ _queryParams["start_date"] = startDate;
3423
+ if (endDate != null) {
3424
+ _queryParams["end_date"] = endDate;
3425
+ }
3426
+ const _response = yield core.fetcher({
3427
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_weight`),
3428
+ method: "GET",
3429
+ headers: {
3430
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
3431
+ "X-Fern-Language": "JavaScript",
3432
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
3433
+ "X-Fern-SDK-Version": "3.1.1",
3434
+ },
3435
+ contentType: "application/json",
3436
+ queryParameters: _queryParams,
3437
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
3438
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
3439
+ });
3440
+ if (_response.ok) {
3441
+ return yield serializers.vitals.bodyWeight.Response.parseOrThrow(_response.body, {
3442
+ unrecognizedObjectKeys: "passthrough",
3443
+ allowUnrecognizedUnionMembers: true,
3444
+ allowUnrecognizedEnumValues: true,
3445
+ breadcrumbsPrefix: ["response"],
3446
+ });
3447
+ }
3448
+ if (_response.error.reason === "status-code") {
3449
+ switch (_response.error.statusCode) {
3450
+ case 422:
3451
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
3452
+ unrecognizedObjectKeys: "passthrough",
3453
+ allowUnrecognizedUnionMembers: true,
3454
+ allowUnrecognizedEnumValues: true,
3455
+ breadcrumbsPrefix: ["response"],
3456
+ }));
3457
+ default:
3458
+ throw new errors.VitalError({
3459
+ statusCode: _response.error.statusCode,
3460
+ body: _response.error.body,
3461
+ });
3462
+ }
3463
+ }
3464
+ switch (_response.error.reason) {
3465
+ case "non-json":
3466
+ throw new errors.VitalError({
3467
+ statusCode: _response.error.statusCode,
3468
+ body: _response.error.rawBody,
3469
+ });
3470
+ case "timeout":
3471
+ throw new errors.VitalTimeoutError();
3472
+ case "unknown":
3473
+ throw new errors.VitalError({
3474
+ message: _response.error.errorMessage,
3475
+ });
3476
+ }
3477
+ });
3478
+ }
3479
+ /**
3480
+ * @throws {@link Vital.UnprocessableEntityError}
3481
+ *
3482
+ * @example
3483
+ * await vital.vitals.bodyFat("user-id", {
3484
+ * startDate: "start-date"
3485
+ * })
3486
+ */
3487
+ bodyFat(userId, request, requestOptions) {
3488
+ var _a;
3489
+ return __awaiter(this, void 0, void 0, function* () {
3490
+ const { provider, startDate, endDate } = request;
3491
+ const _queryParams = {};
3492
+ if (provider != null) {
3493
+ _queryParams["provider"] = provider;
3494
+ }
3495
+ _queryParams["start_date"] = startDate;
3496
+ if (endDate != null) {
3497
+ _queryParams["end_date"] = endDate;
3498
+ }
3499
+ const _response = yield core.fetcher({
3500
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_fat`),
3501
+ method: "GET",
3502
+ headers: {
3503
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
3504
+ "X-Fern-Language": "JavaScript",
3505
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
3506
+ "X-Fern-SDK-Version": "3.1.1",
3507
+ },
3508
+ contentType: "application/json",
3509
+ queryParameters: _queryParams,
3510
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
3511
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
3512
+ });
3513
+ if (_response.ok) {
3514
+ return yield serializers.vitals.bodyFat.Response.parseOrThrow(_response.body, {
3515
+ unrecognizedObjectKeys: "passthrough",
3516
+ allowUnrecognizedUnionMembers: true,
3517
+ allowUnrecognizedEnumValues: true,
3518
+ breadcrumbsPrefix: ["response"],
3519
+ });
3520
+ }
3521
+ if (_response.error.reason === "status-code") {
3522
+ switch (_response.error.statusCode) {
3523
+ case 422:
3524
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
3525
+ unrecognizedObjectKeys: "passthrough",
3526
+ allowUnrecognizedUnionMembers: true,
3527
+ allowUnrecognizedEnumValues: true,
3528
+ breadcrumbsPrefix: ["response"],
3529
+ }));
3530
+ default:
3531
+ throw new errors.VitalError({
3532
+ statusCode: _response.error.statusCode,
3533
+ body: _response.error.body,
3534
+ });
3535
+ }
3536
+ }
3537
+ switch (_response.error.reason) {
3538
+ case "non-json":
3539
+ throw new errors.VitalError({
3540
+ statusCode: _response.error.statusCode,
3541
+ body: _response.error.rawBody,
3542
+ });
3543
+ case "timeout":
3544
+ throw new errors.VitalTimeoutError();
3545
+ case "unknown":
3546
+ throw new errors.VitalError({
3547
+ message: _response.error.errorMessage,
3548
+ });
3549
+ }
3550
+ });
3551
+ }
3552
+ /**
1534
3553
  * @throws {@link Vital.UnprocessableEntityError}
1535
3554
  *
1536
3555
  * @example
@@ -1557,7 +3576,7 @@ class Vitals {
1557
3576
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1558
3577
  "X-Fern-Language": "JavaScript",
1559
3578
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1560
- "X-Fern-SDK-Version": "3.0.9",
3579
+ "X-Fern-SDK-Version": "3.1.1",
1561
3580
  },
1562
3581
  contentType: "application/json",
1563
3582
  queryParameters: _queryParams,
@@ -1604,7 +3623,6 @@ class Vitals {
1604
3623
  });
1605
3624
  }
1606
3625
  /**
1607
- * Get timeseries data for user
1608
3626
  * @throws {@link Vital.UnprocessableEntityError}
1609
3627
  *
1610
3628
  * @example
@@ -1631,7 +3649,7 @@ class Vitals {
1631
3649
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1632
3650
  "X-Fern-Language": "JavaScript",
1633
3651
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1634
- "X-Fern-SDK-Version": "3.0.9",
3652
+ "X-Fern-SDK-Version": "3.1.1",
1635
3653
  },
1636
3654
  contentType: "application/json",
1637
3655
  queryParameters: _queryParams,
@@ -1678,7 +3696,6 @@ class Vitals {
1678
3696
  });
1679
3697
  }
1680
3698
  /**
1681
- * Get timeseries data for user
1682
3699
  * @throws {@link Vital.UnprocessableEntityError}
1683
3700
  *
1684
3701
  * @example
@@ -1705,7 +3722,7 @@ class Vitals {
1705
3722
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1706
3723
  "X-Fern-Language": "JavaScript",
1707
3724
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1708
- "X-Fern-SDK-Version": "3.0.9",
3725
+ "X-Fern-SDK-Version": "3.1.1",
1709
3726
  },
1710
3727
  contentType: "application/json",
1711
3728
  queryParameters: _queryParams,