@tryvital/vital-node 3.1.2 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (935) hide show
  1. package/Client.d.ts +1 -0
  2. package/api/errors/BadRequestError.d.ts +1 -2
  3. package/api/resources/activity/client/Client.d.ts +4 -0
  4. package/api/resources/activity/client/Client.js +8 -12
  5. package/api/resources/body/client/Client.d.ts +4 -0
  6. package/api/resources/body/client/Client.js +8 -12
  7. package/api/resources/devices/client/Client.d.ts +5 -1
  8. package/api/resources/devices/client/Client.js +8 -7
  9. package/api/resources/insurance/client/Client.d.ts +4 -0
  10. package/api/resources/insurance/client/Client.js +8 -12
  11. package/api/resources/introspect/client/Client.d.ts +4 -0
  12. package/api/resources/introspect/client/Client.js +8 -12
  13. package/api/resources/labTests/client/Client.d.ts +7 -3
  14. package/api/resources/labTests/client/Client.js +33 -147
  15. package/api/resources/link/client/Client.d.ts +11 -14
  16. package/api/resources/link/client/Client.js +30 -111
  17. package/api/resources/link/client/requests/EmailAuthLink.d.ts +0 -1
  18. package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +0 -1
  19. package/api/resources/link/client/requests/IndividualProviderData.d.ts +0 -1
  20. package/api/resources/link/client/requests/PasswordAuthLink.d.ts +0 -2
  21. package/api/resources/link/client/requests/index.d.ts +0 -3
  22. package/api/resources/meal/client/Client.d.ts +4 -0
  23. package/api/resources/meal/client/Client.js +7 -6
  24. package/api/resources/profile/client/Client.d.ts +4 -0
  25. package/api/resources/profile/client/Client.js +8 -12
  26. package/api/resources/providers/client/Client.d.ts +4 -0
  27. package/api/resources/providers/client/Client.js +7 -6
  28. package/api/resources/sleep/client/Client.d.ts +4 -0
  29. package/api/resources/sleep/client/Client.js +10 -24
  30. package/api/resources/team/client/Client.d.ts +8 -4
  31. package/api/resources/team/client/Client.js +17 -48
  32. package/api/resources/team/client/requests/index.d.ts +0 -1
  33. package/api/resources/testkit/client/Client.d.ts +4 -0
  34. package/api/resources/testkit/client/Client.js +8 -12
  35. package/api/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +1 -0
  36. package/api/resources/user/client/Client.d.ts +6 -1
  37. package/api/resources/user/client/Client.js +23 -79
  38. package/api/resources/user/client/requests/UserCreateBody.d.ts +4 -0
  39. package/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
  40. package/api/resources/vitals/client/Client.d.ts +4 -0
  41. package/api/resources/vitals/client/Client.js +56 -300
  42. package/api/resources/workouts/client/Client.d.ts +4 -0
  43. package/api/resources/workouts/client/Client.js +9 -18
  44. package/api/types/Availability.d.ts +11 -0
  45. package/api/types/Availability.js +10 -0
  46. package/api/types/ClientFacingProviderWithStatus.d.ts +2 -0
  47. package/api/types/ClientFacingTeam.d.ts +7 -1
  48. package/api/types/ClientFacingUser.d.ts +4 -0
  49. package/api/types/ClientUserIdConflict.d.ts +9 -0
  50. package/api/types/ConnectionStatus.d.ts +4 -0
  51. package/api/types/ConnectionStatusState.d.ts +8 -0
  52. package/api/types/ConnectionStatusState.js +10 -0
  53. package/api/types/LibreConfig.d.ts +1 -0
  54. package/api/types/OrderStatus.d.ts +2 -1
  55. package/api/types/OrderStatus.js +1 -0
  56. package/api/types/ProviderLinkResponse.d.ts +3 -0
  57. package/api/types/ProviderLinkResponseState.d.ts +8 -0
  58. package/api/types/ProviderLinkResponseState.js +10 -0
  59. package/api/types/Region.d.ts +2 -1
  60. package/api/types/Region.js +1 -0
  61. package/api/types/ResourceAvailability.d.ts +8 -0
  62. package/api/types/ScopeRequirementsGrants.d.ts +8 -0
  63. package/api/types/ScopeRequirementsStr.d.ts +7 -0
  64. package/api/types/TeamConfig.d.ts +1 -0
  65. package/api/types/index.d.ts +7 -0
  66. package/api/types/index.js +7 -0
  67. package/core/fetcher/Fetcher.d.ts +1 -1
  68. package/core/fetcher/Fetcher.js +32 -18
  69. package/core/index.d.ts +1 -0
  70. package/core/index.js +1 -0
  71. package/core/runtime/index.d.ts +1 -0
  72. package/core/runtime/index.js +5 -0
  73. package/core/runtime/runtime.d.ts +8 -0
  74. package/core/runtime/runtime.js +82 -0
  75. package/core/schemas/builders/object/object.js +11 -15
  76. package/dist/Client.d.ts +1 -0
  77. package/dist/api/errors/BadRequestError.d.ts +1 -2
  78. package/dist/api/resources/activity/client/Client.d.ts +4 -0
  79. package/dist/api/resources/activity/client/Client.js +8 -12
  80. package/dist/api/resources/body/client/Client.d.ts +4 -0
  81. package/dist/api/resources/body/client/Client.js +8 -12
  82. package/dist/api/resources/devices/client/Client.d.ts +5 -1
  83. package/dist/api/resources/devices/client/Client.js +8 -7
  84. package/dist/api/resources/insurance/client/Client.d.ts +4 -0
  85. package/dist/api/resources/insurance/client/Client.js +8 -12
  86. package/dist/api/resources/introspect/client/Client.d.ts +4 -0
  87. package/dist/api/resources/introspect/client/Client.js +8 -12
  88. package/dist/api/resources/labTests/client/Client.d.ts +7 -3
  89. package/dist/api/resources/labTests/client/Client.js +33 -147
  90. package/dist/api/resources/link/client/Client.d.ts +11 -14
  91. package/dist/api/resources/link/client/Client.js +30 -111
  92. package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +0 -1
  93. package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +0 -1
  94. package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +0 -1
  95. package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +0 -2
  96. package/dist/api/resources/link/client/requests/index.d.ts +0 -3
  97. package/dist/api/resources/meal/client/Client.d.ts +4 -0
  98. package/dist/api/resources/meal/client/Client.js +7 -6
  99. package/dist/api/resources/profile/client/Client.d.ts +4 -0
  100. package/dist/api/resources/profile/client/Client.js +8 -12
  101. package/dist/api/resources/providers/client/Client.d.ts +4 -0
  102. package/dist/api/resources/providers/client/Client.js +7 -6
  103. package/dist/api/resources/sleep/client/Client.d.ts +4 -0
  104. package/dist/api/resources/sleep/client/Client.js +10 -24
  105. package/dist/api/resources/team/client/Client.d.ts +8 -4
  106. package/dist/api/resources/team/client/Client.js +17 -48
  107. package/dist/api/resources/team/client/requests/index.d.ts +0 -1
  108. package/dist/api/resources/testkit/client/Client.d.ts +4 -0
  109. package/dist/api/resources/testkit/client/Client.js +8 -12
  110. package/dist/api/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +1 -0
  111. package/dist/api/resources/user/client/Client.d.ts +6 -1
  112. package/dist/api/resources/user/client/Client.js +23 -79
  113. package/dist/api/resources/user/client/requests/UserCreateBody.d.ts +4 -0
  114. package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
  115. package/dist/api/resources/vitals/client/Client.d.ts +4 -0
  116. package/dist/api/resources/vitals/client/Client.js +56 -300
  117. package/dist/api/resources/workouts/client/Client.d.ts +4 -0
  118. package/dist/api/resources/workouts/client/Client.js +9 -18
  119. package/dist/api/types/Availability.d.ts +11 -0
  120. package/dist/api/types/Availability.js +10 -0
  121. package/dist/api/types/ClientFacingProviderWithStatus.d.ts +2 -0
  122. package/dist/api/types/ClientFacingTeam.d.ts +7 -1
  123. package/dist/api/types/ClientFacingUser.d.ts +4 -0
  124. package/dist/api/types/ClientUserIdConflict.d.ts +9 -0
  125. package/dist/api/types/ConnectionStatus.d.ts +4 -0
  126. package/dist/api/types/ConnectionStatusState.d.ts +8 -0
  127. package/dist/api/types/ConnectionStatusState.js +10 -0
  128. package/dist/api/types/LibreConfig.d.ts +1 -0
  129. package/dist/api/types/OrderStatus.d.ts +2 -1
  130. package/dist/api/types/OrderStatus.js +1 -0
  131. package/dist/api/types/ProviderLinkResponse.d.ts +3 -0
  132. package/dist/api/types/ProviderLinkResponseState.d.ts +8 -0
  133. package/dist/api/types/ProviderLinkResponseState.js +10 -0
  134. package/dist/api/types/Region.d.ts +2 -1
  135. package/dist/api/types/Region.js +1 -0
  136. package/dist/api/types/ResourceAvailability.d.ts +8 -0
  137. package/dist/api/types/ScopeRequirementsGrants.d.ts +8 -0
  138. package/dist/api/types/ScopeRequirementsStr.d.ts +7 -0
  139. package/dist/api/types/TeamConfig.d.ts +1 -0
  140. package/dist/api/types/index.d.ts +7 -0
  141. package/dist/api/types/index.js +7 -0
  142. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  143. package/dist/core/fetcher/Fetcher.js +32 -18
  144. package/dist/core/index.d.ts +1 -0
  145. package/dist/core/index.js +1 -0
  146. package/dist/core/runtime/index.d.ts +1 -0
  147. package/dist/core/runtime/index.js +5 -0
  148. package/dist/core/runtime/runtime.d.ts +8 -0
  149. package/dist/core/runtime/runtime.js +82 -0
  150. package/dist/core/schemas/builders/object/object.js +11 -15
  151. package/dist/serialization/resources/insurance/client/searchDiagnosis.d.ts +2 -1
  152. package/dist/serialization/resources/insurance/client/searchDiagnosis.js +2 -10
  153. package/dist/serialization/resources/insurance/client/searchPayorInfo.d.ts +2 -1
  154. package/dist/serialization/resources/insurance/client/searchPayorInfo.js +2 -10
  155. package/dist/serialization/resources/labTests/client/get.d.ts +2 -1
  156. package/dist/serialization/resources/labTests/client/get.js +2 -10
  157. package/dist/serialization/resources/labTests/client/getLabs.d.ts +2 -1
  158. package/dist/serialization/resources/labTests/client/getLabs.js +2 -10
  159. package/dist/serialization/resources/labTests/client/getPhlebotomyAppointmentCancellationReason.d.ts +2 -1
  160. package/dist/serialization/resources/labTests/client/getPhlebotomyAppointmentCancellationReason.js +2 -10
  161. package/dist/serialization/resources/labTests/client/requests/CreateLabTestRequest.d.ts +4 -2
  162. package/dist/serialization/resources/labTests/client/requests/CreateLabTestRequest.js +4 -11
  163. package/dist/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +10 -5
  164. package/dist/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.js +10 -18
  165. package/dist/serialization/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +4 -2
  166. package/dist/serialization/resources/labTests/client/requests/RequestAppointmentRequest.js +4 -11
  167. package/dist/serialization/resources/link/client/getAllProviders.d.ts +2 -1
  168. package/dist/serialization/resources/link/client/getAllProviders.js +2 -10
  169. package/dist/serialization/resources/link/client/requests/BeginLinkTokenRequest.d.ts +2 -1
  170. package/dist/serialization/resources/link/client/requests/BeginLinkTokenRequest.js +2 -10
  171. package/dist/serialization/resources/link/client/requests/DemoConnectionCreationPayload.d.ts +2 -1
  172. package/dist/serialization/resources/link/client/requests/DemoConnectionCreationPayload.js +2 -10
  173. package/dist/serialization/resources/link/client/requests/EmailAuthLink.d.ts +7 -4
  174. package/dist/serialization/resources/link/client/requests/EmailAuthLink.js +6 -12
  175. package/dist/serialization/resources/link/client/requests/EmailProviderAuthLink.d.ts +5 -3
  176. package/dist/serialization/resources/link/client/requests/EmailProviderAuthLink.js +4 -11
  177. package/dist/serialization/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  178. package/dist/serialization/resources/link/client/requests/LinkTokenExchange.d.ts +3 -2
  179. package/dist/serialization/resources/link/client/requests/LinkTokenExchange.js +3 -13
  180. package/dist/serialization/resources/link/client/requests/PasswordAuthLink.d.ts +5 -3
  181. package/dist/serialization/resources/link/client/requests/PasswordAuthLink.js +4 -11
  182. package/dist/serialization/resources/providers/client/getAll.d.ts +2 -1
  183. package/dist/serialization/resources/providers/client/getAll.js +2 -10
  184. package/dist/serialization/resources/team/client/getPhysicians.d.ts +2 -1
  185. package/dist/serialization/resources/team/client/getPhysicians.js +2 -10
  186. package/dist/serialization/resources/team/client/getUserById.d.ts +2 -1
  187. package/dist/serialization/resources/team/client/getUserById.js +2 -10
  188. package/dist/serialization/resources/testkit/client/requests/CreateRegistrableTestkitOrderRequest.d.ts +2 -1
  189. package/dist/serialization/resources/testkit/client/requests/CreateRegistrableTestkitOrderRequest.js +2 -10
  190. package/dist/serialization/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +10 -4
  191. package/dist/serialization/resources/testkit/client/requests/RegisterTestkitRequest.js +10 -17
  192. package/dist/serialization/resources/user/client/getConnectedProviders.d.ts +2 -1
  193. package/dist/serialization/resources/user/client/getConnectedProviders.js +2 -10
  194. package/dist/serialization/resources/user/client/requests/UserCreateBody.d.ts +2 -0
  195. package/dist/serialization/resources/user/client/requests/UserCreateBody.js +2 -0
  196. package/dist/serialization/resources/user/client/requests/UserPatchBody.d.ts +2 -0
  197. package/dist/serialization/resources/user/client/requests/UserPatchBody.js +2 -0
  198. package/dist/serialization/resources/vitals/client/bloodOxygen.d.ts +2 -1
  199. package/dist/serialization/resources/vitals/client/bloodOxygen.js +2 -10
  200. package/dist/serialization/resources/vitals/client/bloodPressure.d.ts +2 -1
  201. package/dist/serialization/resources/vitals/client/bloodPressure.js +2 -10
  202. package/dist/serialization/resources/vitals/client/bodyFat.d.ts +2 -1
  203. package/dist/serialization/resources/vitals/client/bodyFat.js +2 -10
  204. package/dist/serialization/resources/vitals/client/bodyWeight.d.ts +2 -1
  205. package/dist/serialization/resources/vitals/client/bodyWeight.js +2 -10
  206. package/dist/serialization/resources/vitals/client/caffeine.d.ts +2 -1
  207. package/dist/serialization/resources/vitals/client/caffeine.js +2 -10
  208. package/dist/serialization/resources/vitals/client/caloriesActive.d.ts +2 -1
  209. package/dist/serialization/resources/vitals/client/caloriesActive.js +2 -10
  210. package/dist/serialization/resources/vitals/client/caloriesBasal.d.ts +2 -1
  211. package/dist/serialization/resources/vitals/client/caloriesBasal.js +2 -10
  212. package/dist/serialization/resources/vitals/client/cholesterol.d.ts +2 -1
  213. package/dist/serialization/resources/vitals/client/cholesterol.js +2 -10
  214. package/dist/serialization/resources/vitals/client/cholesterolHdl.d.ts +2 -1
  215. package/dist/serialization/resources/vitals/client/cholesterolHdl.js +2 -10
  216. package/dist/serialization/resources/vitals/client/cholesterolLdl.d.ts +2 -1
  217. package/dist/serialization/resources/vitals/client/cholesterolLdl.js +2 -10
  218. package/dist/serialization/resources/vitals/client/cholesterolTotal.d.ts +2 -1
  219. package/dist/serialization/resources/vitals/client/cholesterolTotal.js +2 -10
  220. package/dist/serialization/resources/vitals/client/cholesterolTriglycerides.d.ts +2 -1
  221. package/dist/serialization/resources/vitals/client/cholesterolTriglycerides.js +2 -10
  222. package/dist/serialization/resources/vitals/client/distance.d.ts +2 -1
  223. package/dist/serialization/resources/vitals/client/distance.js +2 -10
  224. package/dist/serialization/resources/vitals/client/electrocardiogramVoltage.d.ts +2 -1
  225. package/dist/serialization/resources/vitals/client/electrocardiogramVoltage.js +2 -10
  226. package/dist/serialization/resources/vitals/client/floorsClimbed.d.ts +2 -1
  227. package/dist/serialization/resources/vitals/client/floorsClimbed.js +2 -10
  228. package/dist/serialization/resources/vitals/client/glucose.d.ts +2 -1
  229. package/dist/serialization/resources/vitals/client/glucose.js +2 -10
  230. package/dist/serialization/resources/vitals/client/heartrate.d.ts +2 -1
  231. package/dist/serialization/resources/vitals/client/heartrate.js +2 -10
  232. package/dist/serialization/resources/vitals/client/hrv.d.ts +2 -1
  233. package/dist/serialization/resources/vitals/client/hrv.js +2 -10
  234. package/dist/serialization/resources/vitals/client/hypnogram.d.ts +2 -1
  235. package/dist/serialization/resources/vitals/client/hypnogram.js +2 -10
  236. package/dist/serialization/resources/vitals/client/ige.d.ts +2 -1
  237. package/dist/serialization/resources/vitals/client/ige.js +2 -10
  238. package/dist/serialization/resources/vitals/client/igg.d.ts +2 -1
  239. package/dist/serialization/resources/vitals/client/igg.js +2 -10
  240. package/dist/serialization/resources/vitals/client/mindfulnessMinutes.d.ts +2 -1
  241. package/dist/serialization/resources/vitals/client/mindfulnessMinutes.js +2 -10
  242. package/dist/serialization/resources/vitals/client/respiratoryRate.d.ts +2 -1
  243. package/dist/serialization/resources/vitals/client/respiratoryRate.js +2 -10
  244. package/dist/serialization/resources/vitals/client/steps.d.ts +2 -1
  245. package/dist/serialization/resources/vitals/client/steps.js +2 -10
  246. package/dist/serialization/resources/vitals/client/stressLevel.d.ts +2 -1
  247. package/dist/serialization/resources/vitals/client/stressLevel.js +2 -10
  248. package/dist/serialization/resources/vitals/client/vo2Max.d.ts +2 -1
  249. package/dist/serialization/resources/vitals/client/vo2Max.js +2 -10
  250. package/dist/serialization/resources/vitals/client/water.d.ts +2 -1
  251. package/dist/serialization/resources/vitals/client/water.js +2 -10
  252. package/dist/serialization/types/ActivityV2InDb.d.ts +2 -1
  253. package/dist/serialization/types/ActivityV2InDb.js +2 -10
  254. package/dist/serialization/types/AppointmentAvailabilitySlots.d.ts +2 -1
  255. package/dist/serialization/types/AppointmentAvailabilitySlots.js +2 -10
  256. package/dist/serialization/types/AreaInfo.d.ts +2 -1
  257. package/dist/serialization/types/AreaInfo.js +2 -10
  258. package/dist/serialization/types/Availability.d.ts +10 -0
  259. package/dist/serialization/types/Availability.js +31 -0
  260. package/dist/serialization/types/BiomarkerResult.d.ts +2 -1
  261. package/dist/serialization/types/BiomarkerResult.js +2 -10
  262. package/dist/serialization/types/BodyV2InDb.d.ts +2 -1
  263. package/dist/serialization/types/BodyV2InDb.js +2 -10
  264. package/dist/serialization/types/ClientActivityResponse.d.ts +2 -1
  265. package/dist/serialization/types/ClientActivityResponse.js +2 -10
  266. package/dist/serialization/types/ClientBodyResponse.d.ts +2 -1
  267. package/dist/serialization/types/ClientBodyResponse.js +2 -10
  268. package/dist/serialization/types/ClientFacingActivity.d.ts +4 -2
  269. package/dist/serialization/types/ClientFacingActivity.js +4 -11
  270. package/dist/serialization/types/ClientFacingAppointment.d.ts +14 -7
  271. package/dist/serialization/types/ClientFacingAppointment.js +14 -16
  272. package/dist/serialization/types/ClientFacingAppointmentEvent.d.ts +2 -1
  273. package/dist/serialization/types/ClientFacingAppointmentEvent.js +2 -10
  274. package/dist/serialization/types/ClientFacingAtHomePhlebotomyOrderDetails.d.ts +2 -1
  275. package/dist/serialization/types/ClientFacingAtHomePhlebotomyOrderDetails.js +2 -10
  276. package/dist/serialization/types/ClientFacingBody.d.ts +2 -1
  277. package/dist/serialization/types/ClientFacingBody.js +2 -10
  278. package/dist/serialization/types/ClientFacingFood.d.ts +6 -3
  279. package/dist/serialization/types/ClientFacingFood.js +6 -12
  280. package/dist/serialization/types/ClientFacingLab.d.ts +4 -2
  281. package/dist/serialization/types/ClientFacingLab.js +4 -11
  282. package/dist/serialization/types/ClientFacingLabTest.d.ts +10 -5
  283. package/dist/serialization/types/ClientFacingLabTest.js +10 -16
  284. package/dist/serialization/types/ClientFacingMarker.d.ts +2 -1
  285. package/dist/serialization/types/ClientFacingMarker.js +2 -10
  286. package/dist/serialization/types/ClientFacingMarkerComplete.d.ts +4 -2
  287. package/dist/serialization/types/ClientFacingMarkerComplete.js +4 -11
  288. package/dist/serialization/types/ClientFacingMealResponse.d.ts +2 -1
  289. package/dist/serialization/types/ClientFacingMealResponse.js +2 -10
  290. package/dist/serialization/types/ClientFacingOrder.d.ts +16 -8
  291. package/dist/serialization/types/ClientFacingOrder.js +16 -17
  292. package/dist/serialization/types/ClientFacingOrderDetails.d.ts +6 -3
  293. package/dist/serialization/types/ClientFacingOrderDetails.js +6 -12
  294. package/dist/serialization/types/ClientFacingOrderEvent.d.ts +2 -1
  295. package/dist/serialization/types/ClientFacingOrderEvent.js +2 -10
  296. package/dist/serialization/types/ClientFacingPayorSearchResponse.d.ts +2 -1
  297. package/dist/serialization/types/ClientFacingPayorSearchResponse.js +2 -10
  298. package/dist/serialization/types/ClientFacingProfile.d.ts +2 -1
  299. package/dist/serialization/types/ClientFacingProfile.js +2 -10
  300. package/dist/serialization/types/ClientFacingProviderDetailed.d.ts +4 -2
  301. package/dist/serialization/types/ClientFacingProviderDetailed.js +4 -13
  302. package/dist/serialization/types/ClientFacingProviderWithStatus.d.ts +2 -0
  303. package/dist/serialization/types/ClientFacingProviderWithStatus.js +2 -0
  304. package/dist/serialization/types/ClientFacingResult.d.ts +2 -1
  305. package/dist/serialization/types/ClientFacingResult.js +2 -10
  306. package/dist/serialization/types/ClientFacingSleep.d.ts +4 -2
  307. package/dist/serialization/types/ClientFacingSleep.js +4 -11
  308. package/dist/serialization/types/ClientFacingSleepStream.d.ts +8 -4
  309. package/dist/serialization/types/ClientFacingSleepStream.js +8 -21
  310. package/dist/serialization/types/ClientFacingTeam.d.ts +7 -4
  311. package/dist/serialization/types/ClientFacingTeam.js +7 -15
  312. package/dist/serialization/types/ClientFacingTestKitOrderDetails.d.ts +2 -1
  313. package/dist/serialization/types/ClientFacingTestKitOrderDetails.js +2 -10
  314. package/dist/serialization/types/ClientFacingTestkitOrder.d.ts +2 -1
  315. package/dist/serialization/types/ClientFacingTestkitOrder.js +2 -10
  316. package/dist/serialization/types/ClientFacingUser.d.ts +8 -3
  317. package/dist/serialization/types/ClientFacingUser.js +8 -12
  318. package/dist/serialization/types/ClientFacingWalkInOrderDetails.d.ts +2 -1
  319. package/dist/serialization/types/ClientFacingWalkInOrderDetails.js +2 -10
  320. package/dist/serialization/types/ClientFacingWorkout.d.ts +4 -2
  321. package/dist/serialization/types/ClientFacingWorkout.js +4 -11
  322. package/dist/serialization/types/ClientSleepResponse.d.ts +2 -1
  323. package/dist/serialization/types/ClientSleepResponse.js +2 -10
  324. package/dist/serialization/types/ClientUserIdConflict.d.ts +15 -0
  325. package/dist/serialization/types/ClientUserIdConflict.js +36 -0
  326. package/dist/serialization/types/ClientWorkoutResponse.d.ts +2 -1
  327. package/dist/serialization/types/ClientWorkoutResponse.js +2 -10
  328. package/dist/serialization/types/ConnectedSourceClientFacing.d.ts +3 -2
  329. package/dist/serialization/types/ConnectedSourceClientFacing.js +3 -11
  330. package/dist/serialization/types/ConnectionStatus.d.ts +4 -0
  331. package/dist/serialization/types/ConnectionStatus.js +4 -0
  332. package/dist/serialization/types/ConnectionStatusState.d.ts +10 -0
  333. package/dist/serialization/types/ConnectionStatusState.js +31 -0
  334. package/dist/serialization/types/Consent.d.ts +2 -1
  335. package/dist/serialization/types/Consent.js +2 -10
  336. package/dist/serialization/types/DaySlots.d.ts +2 -1
  337. package/dist/serialization/types/DaySlots.js +2 -10
  338. package/dist/serialization/types/DeviceV2InDb.d.ts +2 -1
  339. package/dist/serialization/types/DeviceV2InDb.js +2 -10
  340. package/dist/serialization/types/EventDestinationPreferences.d.ts +4 -2
  341. package/dist/serialization/types/EventDestinationPreferences.js +4 -11
  342. package/dist/serialization/types/GetMarkersResponse.d.ts +2 -1
  343. package/dist/serialization/types/GetMarkersResponse.js +2 -10
  344. package/dist/serialization/types/GetOrdersResponse.d.ts +2 -1
  345. package/dist/serialization/types/GetOrdersResponse.js +2 -10
  346. package/dist/serialization/types/GroupedBloodOxygen.d.ts +4 -2
  347. package/dist/serialization/types/GroupedBloodOxygen.js +4 -11
  348. package/dist/serialization/types/GroupedBloodOxygenResponse.d.ts +2 -1
  349. package/dist/serialization/types/GroupedBloodOxygenResponse.js +2 -10
  350. package/dist/serialization/types/GroupedBloodPressure.d.ts +4 -2
  351. package/dist/serialization/types/GroupedBloodPressure.js +4 -11
  352. package/dist/serialization/types/GroupedBloodPressureResponse.d.ts +2 -1
  353. package/dist/serialization/types/GroupedBloodPressureResponse.js +2 -10
  354. package/dist/serialization/types/GroupedBodyFat.d.ts +4 -2
  355. package/dist/serialization/types/GroupedBodyFat.js +4 -11
  356. package/dist/serialization/types/GroupedBodyFatResponse.d.ts +2 -1
  357. package/dist/serialization/types/GroupedBodyFatResponse.js +2 -10
  358. package/dist/serialization/types/GroupedBodyWeight.d.ts +4 -2
  359. package/dist/serialization/types/GroupedBodyWeight.js +4 -11
  360. package/dist/serialization/types/GroupedBodyWeightResponse.d.ts +2 -1
  361. package/dist/serialization/types/GroupedBodyWeightResponse.js +2 -10
  362. package/dist/serialization/types/GroupedCaffeine.d.ts +4 -2
  363. package/dist/serialization/types/GroupedCaffeine.js +4 -11
  364. package/dist/serialization/types/GroupedCaffeineResponse.d.ts +2 -1
  365. package/dist/serialization/types/GroupedCaffeineResponse.js +2 -10
  366. package/dist/serialization/types/GroupedCaloriesActive.d.ts +4 -2
  367. package/dist/serialization/types/GroupedCaloriesActive.js +4 -11
  368. package/dist/serialization/types/GroupedCaloriesActiveResponse.d.ts +2 -1
  369. package/dist/serialization/types/GroupedCaloriesActiveResponse.js +2 -10
  370. package/dist/serialization/types/GroupedCaloriesBasal.d.ts +4 -2
  371. package/dist/serialization/types/GroupedCaloriesBasal.js +4 -11
  372. package/dist/serialization/types/GroupedCaloriesBasalResponse.d.ts +2 -1
  373. package/dist/serialization/types/GroupedCaloriesBasalResponse.js +2 -10
  374. package/dist/serialization/types/GroupedCholesterol.d.ts +4 -2
  375. package/dist/serialization/types/GroupedCholesterol.js +4 -11
  376. package/dist/serialization/types/GroupedCholesterolResponse.d.ts +2 -1
  377. package/dist/serialization/types/GroupedCholesterolResponse.js +2 -10
  378. package/dist/serialization/types/GroupedDistance.d.ts +4 -2
  379. package/dist/serialization/types/GroupedDistance.js +4 -11
  380. package/dist/serialization/types/GroupedDistanceResponse.d.ts +2 -1
  381. package/dist/serialization/types/GroupedDistanceResponse.js +2 -10
  382. package/dist/serialization/types/GroupedElectrocardiogramVoltage.d.ts +4 -2
  383. package/dist/serialization/types/GroupedElectrocardiogramVoltage.js +4 -11
  384. package/dist/serialization/types/GroupedElectrocardiogramVoltageResponse.d.ts +2 -1
  385. package/dist/serialization/types/GroupedElectrocardiogramVoltageResponse.js +2 -10
  386. package/dist/serialization/types/GroupedFloorsClimbed.d.ts +4 -2
  387. package/dist/serialization/types/GroupedFloorsClimbed.js +4 -11
  388. package/dist/serialization/types/GroupedFloorsClimbedResponse.d.ts +2 -1
  389. package/dist/serialization/types/GroupedFloorsClimbedResponse.js +2 -10
  390. package/dist/serialization/types/GroupedGlucose.d.ts +4 -2
  391. package/dist/serialization/types/GroupedGlucose.js +4 -11
  392. package/dist/serialization/types/GroupedGlucoseResponse.d.ts +2 -1
  393. package/dist/serialization/types/GroupedGlucoseResponse.js +2 -10
  394. package/dist/serialization/types/GroupedHeartRate.d.ts +4 -2
  395. package/dist/serialization/types/GroupedHeartRate.js +4 -11
  396. package/dist/serialization/types/GroupedHeartRateResponse.d.ts +2 -1
  397. package/dist/serialization/types/GroupedHeartRateResponse.js +2 -10
  398. package/dist/serialization/types/GroupedHrv.d.ts +4 -2
  399. package/dist/serialization/types/GroupedHrv.js +4 -11
  400. package/dist/serialization/types/GroupedHrvResponse.d.ts +2 -1
  401. package/dist/serialization/types/GroupedHrvResponse.js +2 -10
  402. package/dist/serialization/types/GroupedHypnogram.d.ts +4 -2
  403. package/dist/serialization/types/GroupedHypnogram.js +4 -11
  404. package/dist/serialization/types/GroupedHypnogramResponse.d.ts +2 -1
  405. package/dist/serialization/types/GroupedHypnogramResponse.js +2 -10
  406. package/dist/serialization/types/GroupedIge.d.ts +4 -2
  407. package/dist/serialization/types/GroupedIge.js +4 -11
  408. package/dist/serialization/types/GroupedIgeResponse.d.ts +2 -1
  409. package/dist/serialization/types/GroupedIgeResponse.js +2 -10
  410. package/dist/serialization/types/GroupedIgg.d.ts +4 -2
  411. package/dist/serialization/types/GroupedIgg.js +4 -11
  412. package/dist/serialization/types/GroupedIggResponse.d.ts +2 -1
  413. package/dist/serialization/types/GroupedIggResponse.js +2 -10
  414. package/dist/serialization/types/GroupedMindfulnessMinutes.d.ts +4 -2
  415. package/dist/serialization/types/GroupedMindfulnessMinutes.js +4 -11
  416. package/dist/serialization/types/GroupedMindfulnessMinutesResponse.d.ts +2 -1
  417. package/dist/serialization/types/GroupedMindfulnessMinutesResponse.js +2 -10
  418. package/dist/serialization/types/GroupedRespiratoryRate.d.ts +4 -2
  419. package/dist/serialization/types/GroupedRespiratoryRate.js +4 -11
  420. package/dist/serialization/types/GroupedRespiratoryRateResponse.d.ts +2 -1
  421. package/dist/serialization/types/GroupedRespiratoryRateResponse.js +2 -10
  422. package/dist/serialization/types/GroupedSteps.d.ts +4 -2
  423. package/dist/serialization/types/GroupedSteps.js +4 -11
  424. package/dist/serialization/types/GroupedStepsResponse.d.ts +2 -1
  425. package/dist/serialization/types/GroupedStepsResponse.js +2 -10
  426. package/dist/serialization/types/GroupedStressLevel.d.ts +4 -2
  427. package/dist/serialization/types/GroupedStressLevel.js +4 -11
  428. package/dist/serialization/types/GroupedStressLevelResponse.d.ts +2 -1
  429. package/dist/serialization/types/GroupedStressLevelResponse.js +2 -10
  430. package/dist/serialization/types/GroupedVo2Max.d.ts +4 -2
  431. package/dist/serialization/types/GroupedVo2Max.js +4 -11
  432. package/dist/serialization/types/GroupedVo2MaxResponse.d.ts +2 -1
  433. package/dist/serialization/types/GroupedVo2MaxResponse.js +2 -10
  434. package/dist/serialization/types/GroupedWater.d.ts +4 -2
  435. package/dist/serialization/types/GroupedWater.js +4 -11
  436. package/dist/serialization/types/GroupedWaterResponse.d.ts +2 -1
  437. package/dist/serialization/types/GroupedWaterResponse.js +2 -10
  438. package/dist/serialization/types/HealthInsuranceCreateRequest.d.ts +10 -5
  439. package/dist/serialization/types/HealthInsuranceCreateRequest.js +10 -16
  440. package/dist/serialization/types/HealthInsuranceCreateRequestBackImage.d.ts +4 -2
  441. package/dist/serialization/types/HealthInsuranceCreateRequestBackImage.js +4 -11
  442. package/dist/serialization/types/HealthInsuranceCreateRequestFrontImage.d.ts +4 -2
  443. package/dist/serialization/types/HealthInsuranceCreateRequestFrontImage.js +4 -11
  444. package/dist/serialization/types/HealthInsuranceCreateRequestPatientSignatureImage.d.ts +4 -2
  445. package/dist/serialization/types/HealthInsuranceCreateRequestPatientSignatureImage.js +4 -11
  446. package/dist/serialization/types/HttpValidationError.d.ts +2 -1
  447. package/dist/serialization/types/HttpValidationError.js +2 -12
  448. package/dist/serialization/types/LabResultsRaw.d.ts +4 -2
  449. package/dist/serialization/types/LabResultsRaw.js +4 -11
  450. package/dist/serialization/types/LabResultsRawResults.d.ts +2 -1
  451. package/dist/serialization/types/LabResultsRawResults.js +2 -10
  452. package/dist/serialization/types/LastAttempt.d.ts +2 -1
  453. package/dist/serialization/types/LastAttempt.js +2 -10
  454. package/dist/serialization/types/LibreConfig.d.ts +1 -0
  455. package/dist/serialization/types/LibreConfig.js +1 -0
  456. package/dist/serialization/types/Macros.d.ts +2 -1
  457. package/dist/serialization/types/Macros.js +2 -10
  458. package/dist/serialization/types/MealInDbBaseClientFacingSource.d.ts +10 -5
  459. package/dist/serialization/types/MealInDbBaseClientFacingSource.js +10 -16
  460. package/dist/serialization/types/MetricsResult.d.ts +2 -1
  461. package/dist/serialization/types/MetricsResult.js +2 -12
  462. package/dist/serialization/types/OrderStatus.d.ts +1 -1
  463. package/dist/serialization/types/OrderStatus.js +1 -0
  464. package/dist/serialization/types/PaginatedUsersResponse.d.ts +2 -1
  465. package/dist/serialization/types/PaginatedUsersResponse.js +2 -10
  466. package/dist/serialization/types/PatientDetails.d.ts +2 -1
  467. package/dist/serialization/types/PatientDetails.js +2 -10
  468. package/dist/serialization/types/PersonDetails.d.ts +2 -1
  469. package/dist/serialization/types/PersonDetails.js +2 -10
  470. package/dist/serialization/types/PhlebotomyAreaInfo.d.ts +2 -1
  471. package/dist/serialization/types/PhlebotomyAreaInfo.js +2 -10
  472. package/dist/serialization/types/PhlebotomyProviderInfo.d.ts +4 -2
  473. package/dist/serialization/types/PhlebotomyProviderInfo.js +4 -11
  474. package/dist/serialization/types/PhysicianCreateRequest.d.ts +2 -1
  475. package/dist/serialization/types/PhysicianCreateRequest.js +2 -10
  476. package/dist/serialization/types/PhysicianCreateRequestSignatureImage.d.ts +4 -2
  477. package/dist/serialization/types/PhysicianCreateRequestSignatureImage.js +4 -11
  478. package/dist/serialization/types/PostOrderResponse.d.ts +2 -1
  479. package/dist/serialization/types/PostOrderResponse.js +2 -10
  480. package/dist/serialization/types/ProfileInDb.d.ts +2 -1
  481. package/dist/serialization/types/ProfileInDb.js +2 -10
  482. package/dist/serialization/types/ProviderLinkResponse.d.ts +6 -1
  483. package/dist/serialization/types/ProviderLinkResponse.js +6 -10
  484. package/dist/serialization/types/ProviderLinkResponseState.d.ts +10 -0
  485. package/dist/serialization/types/ProviderLinkResponseState.js +31 -0
  486. package/dist/serialization/types/RawActivity.d.ts +2 -1
  487. package/dist/serialization/types/RawActivity.js +2 -10
  488. package/dist/serialization/types/RawBody.d.ts +2 -1
  489. package/dist/serialization/types/RawBody.js +2 -10
  490. package/dist/serialization/types/RawDevices.d.ts +2 -1
  491. package/dist/serialization/types/RawDevices.js +2 -10
  492. package/dist/serialization/types/RawProfile.d.ts +2 -1
  493. package/dist/serialization/types/RawProfile.js +2 -10
  494. package/dist/serialization/types/RawSleep.d.ts +2 -1
  495. package/dist/serialization/types/RawSleep.js +2 -10
  496. package/dist/serialization/types/RawWorkout.d.ts +2 -1
  497. package/dist/serialization/types/RawWorkout.js +2 -10
  498. package/dist/serialization/types/Region.d.ts +1 -1
  499. package/dist/serialization/types/Region.js +1 -0
  500. package/dist/serialization/types/ResourceAvailability.d.ts +15 -0
  501. package/dist/serialization/types/ResourceAvailability.js +36 -0
  502. package/dist/serialization/types/ScopeRequirementsGrants.d.ts +14 -0
  503. package/dist/serialization/types/ScopeRequirementsGrants.js +35 -0
  504. package/dist/serialization/types/ScopeRequirementsStr.d.ts +13 -0
  505. package/dist/serialization/types/ScopeRequirementsStr.js +34 -0
  506. package/dist/serialization/types/SingleHistoricalPullStatistics.d.ts +2 -1
  507. package/dist/serialization/types/SingleHistoricalPullStatistics.js +2 -10
  508. package/dist/serialization/types/SingleProviderHistoricalPullResponse.d.ts +4 -2
  509. package/dist/serialization/types/SingleProviderHistoricalPullResponse.js +4 -11
  510. package/dist/serialization/types/SingleResourceStatistics.d.ts +2 -1
  511. package/dist/serialization/types/SingleResourceStatistics.js +2 -10
  512. package/dist/serialization/types/SingleUserHistoricalPullResponse.d.ts +2 -1
  513. package/dist/serialization/types/SingleUserHistoricalPullResponse.js +2 -10
  514. package/dist/serialization/types/SingleUserResourceResponse.d.ts +2 -1
  515. package/dist/serialization/types/SingleUserResourceResponse.js +2 -10
  516. package/dist/serialization/types/SleepV2InDb.d.ts +2 -1
  517. package/dist/serialization/types/SleepV2InDb.js +2 -10
  518. package/dist/serialization/types/Source.d.ts +4 -2
  519. package/dist/serialization/types/Source.js +4 -11
  520. package/dist/serialization/types/SourceLink.d.ts +2 -1
  521. package/dist/serialization/types/SourceLink.js +2 -10
  522. package/dist/serialization/types/TeamConfig.d.ts +5 -2
  523. package/dist/serialization/types/TeamConfig.js +5 -11
  524. package/dist/serialization/types/UserHistoricalPullsResponse.d.ts +2 -1
  525. package/dist/serialization/types/UserHistoricalPullsResponse.js +2 -10
  526. package/dist/serialization/types/UserResourcesResponse.d.ts +2 -1
  527. package/dist/serialization/types/UserResourcesResponse.js +2 -10
  528. package/dist/serialization/types/ValidationError.d.ts +2 -1
  529. package/dist/serialization/types/ValidationError.js +2 -10
  530. package/dist/serialization/types/WorkoutV2InDb.d.ts +4 -2
  531. package/dist/serialization/types/WorkoutV2InDb.js +4 -11
  532. package/dist/serialization/types/index.d.ts +7 -0
  533. package/dist/serialization/types/index.js +7 -0
  534. package/jest.config.js +5 -0
  535. package/package.json +6 -2
  536. package/serialization/resources/insurance/client/searchDiagnosis.d.ts +2 -1
  537. package/serialization/resources/insurance/client/searchDiagnosis.js +2 -10
  538. package/serialization/resources/insurance/client/searchPayorInfo.d.ts +2 -1
  539. package/serialization/resources/insurance/client/searchPayorInfo.js +2 -10
  540. package/serialization/resources/labTests/client/get.d.ts +2 -1
  541. package/serialization/resources/labTests/client/get.js +2 -10
  542. package/serialization/resources/labTests/client/getLabs.d.ts +2 -1
  543. package/serialization/resources/labTests/client/getLabs.js +2 -10
  544. package/serialization/resources/labTests/client/getPhlebotomyAppointmentCancellationReason.d.ts +2 -1
  545. package/serialization/resources/labTests/client/getPhlebotomyAppointmentCancellationReason.js +2 -10
  546. package/serialization/resources/labTests/client/requests/CreateLabTestRequest.d.ts +4 -2
  547. package/serialization/resources/labTests/client/requests/CreateLabTestRequest.js +4 -11
  548. package/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +10 -5
  549. package/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.js +10 -18
  550. package/serialization/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +4 -2
  551. package/serialization/resources/labTests/client/requests/RequestAppointmentRequest.js +4 -11
  552. package/serialization/resources/link/client/getAllProviders.d.ts +2 -1
  553. package/serialization/resources/link/client/getAllProviders.js +2 -10
  554. package/serialization/resources/link/client/requests/BeginLinkTokenRequest.d.ts +2 -1
  555. package/serialization/resources/link/client/requests/BeginLinkTokenRequest.js +2 -10
  556. package/serialization/resources/link/client/requests/DemoConnectionCreationPayload.d.ts +2 -1
  557. package/serialization/resources/link/client/requests/DemoConnectionCreationPayload.js +2 -10
  558. package/serialization/resources/link/client/requests/EmailAuthLink.d.ts +7 -4
  559. package/serialization/resources/link/client/requests/EmailAuthLink.js +6 -12
  560. package/serialization/resources/link/client/requests/EmailProviderAuthLink.d.ts +5 -3
  561. package/serialization/resources/link/client/requests/EmailProviderAuthLink.js +4 -11
  562. package/serialization/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  563. package/serialization/resources/link/client/requests/LinkTokenExchange.d.ts +3 -2
  564. package/serialization/resources/link/client/requests/LinkTokenExchange.js +3 -13
  565. package/serialization/resources/link/client/requests/PasswordAuthLink.d.ts +5 -3
  566. package/serialization/resources/link/client/requests/PasswordAuthLink.js +4 -11
  567. package/serialization/resources/providers/client/getAll.d.ts +2 -1
  568. package/serialization/resources/providers/client/getAll.js +2 -10
  569. package/serialization/resources/team/client/getPhysicians.d.ts +2 -1
  570. package/serialization/resources/team/client/getPhysicians.js +2 -10
  571. package/serialization/resources/team/client/getUserById.d.ts +2 -1
  572. package/serialization/resources/team/client/getUserById.js +2 -10
  573. package/serialization/resources/testkit/client/requests/CreateRegistrableTestkitOrderRequest.d.ts +2 -1
  574. package/serialization/resources/testkit/client/requests/CreateRegistrableTestkitOrderRequest.js +2 -10
  575. package/serialization/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +10 -4
  576. package/serialization/resources/testkit/client/requests/RegisterTestkitRequest.js +10 -17
  577. package/serialization/resources/user/client/getConnectedProviders.d.ts +2 -1
  578. package/serialization/resources/user/client/getConnectedProviders.js +2 -10
  579. package/serialization/resources/user/client/requests/UserCreateBody.d.ts +2 -0
  580. package/serialization/resources/user/client/requests/UserCreateBody.js +2 -0
  581. package/serialization/resources/user/client/requests/UserPatchBody.d.ts +2 -0
  582. package/serialization/resources/user/client/requests/UserPatchBody.js +2 -0
  583. package/serialization/resources/vitals/client/bloodOxygen.d.ts +2 -1
  584. package/serialization/resources/vitals/client/bloodOxygen.js +2 -10
  585. package/serialization/resources/vitals/client/bloodPressure.d.ts +2 -1
  586. package/serialization/resources/vitals/client/bloodPressure.js +2 -10
  587. package/serialization/resources/vitals/client/bodyFat.d.ts +2 -1
  588. package/serialization/resources/vitals/client/bodyFat.js +2 -10
  589. package/serialization/resources/vitals/client/bodyWeight.d.ts +2 -1
  590. package/serialization/resources/vitals/client/bodyWeight.js +2 -10
  591. package/serialization/resources/vitals/client/caffeine.d.ts +2 -1
  592. package/serialization/resources/vitals/client/caffeine.js +2 -10
  593. package/serialization/resources/vitals/client/caloriesActive.d.ts +2 -1
  594. package/serialization/resources/vitals/client/caloriesActive.js +2 -10
  595. package/serialization/resources/vitals/client/caloriesBasal.d.ts +2 -1
  596. package/serialization/resources/vitals/client/caloriesBasal.js +2 -10
  597. package/serialization/resources/vitals/client/cholesterol.d.ts +2 -1
  598. package/serialization/resources/vitals/client/cholesterol.js +2 -10
  599. package/serialization/resources/vitals/client/cholesterolHdl.d.ts +2 -1
  600. package/serialization/resources/vitals/client/cholesterolHdl.js +2 -10
  601. package/serialization/resources/vitals/client/cholesterolLdl.d.ts +2 -1
  602. package/serialization/resources/vitals/client/cholesterolLdl.js +2 -10
  603. package/serialization/resources/vitals/client/cholesterolTotal.d.ts +2 -1
  604. package/serialization/resources/vitals/client/cholesterolTotal.js +2 -10
  605. package/serialization/resources/vitals/client/cholesterolTriglycerides.d.ts +2 -1
  606. package/serialization/resources/vitals/client/cholesterolTriglycerides.js +2 -10
  607. package/serialization/resources/vitals/client/distance.d.ts +2 -1
  608. package/serialization/resources/vitals/client/distance.js +2 -10
  609. package/serialization/resources/vitals/client/electrocardiogramVoltage.d.ts +2 -1
  610. package/serialization/resources/vitals/client/electrocardiogramVoltage.js +2 -10
  611. package/serialization/resources/vitals/client/floorsClimbed.d.ts +2 -1
  612. package/serialization/resources/vitals/client/floorsClimbed.js +2 -10
  613. package/serialization/resources/vitals/client/glucose.d.ts +2 -1
  614. package/serialization/resources/vitals/client/glucose.js +2 -10
  615. package/serialization/resources/vitals/client/heartrate.d.ts +2 -1
  616. package/serialization/resources/vitals/client/heartrate.js +2 -10
  617. package/serialization/resources/vitals/client/hrv.d.ts +2 -1
  618. package/serialization/resources/vitals/client/hrv.js +2 -10
  619. package/serialization/resources/vitals/client/hypnogram.d.ts +2 -1
  620. package/serialization/resources/vitals/client/hypnogram.js +2 -10
  621. package/serialization/resources/vitals/client/ige.d.ts +2 -1
  622. package/serialization/resources/vitals/client/ige.js +2 -10
  623. package/serialization/resources/vitals/client/igg.d.ts +2 -1
  624. package/serialization/resources/vitals/client/igg.js +2 -10
  625. package/serialization/resources/vitals/client/mindfulnessMinutes.d.ts +2 -1
  626. package/serialization/resources/vitals/client/mindfulnessMinutes.js +2 -10
  627. package/serialization/resources/vitals/client/respiratoryRate.d.ts +2 -1
  628. package/serialization/resources/vitals/client/respiratoryRate.js +2 -10
  629. package/serialization/resources/vitals/client/steps.d.ts +2 -1
  630. package/serialization/resources/vitals/client/steps.js +2 -10
  631. package/serialization/resources/vitals/client/stressLevel.d.ts +2 -1
  632. package/serialization/resources/vitals/client/stressLevel.js +2 -10
  633. package/serialization/resources/vitals/client/vo2Max.d.ts +2 -1
  634. package/serialization/resources/vitals/client/vo2Max.js +2 -10
  635. package/serialization/resources/vitals/client/water.d.ts +2 -1
  636. package/serialization/resources/vitals/client/water.js +2 -10
  637. package/serialization/types/ActivityV2InDb.d.ts +2 -1
  638. package/serialization/types/ActivityV2InDb.js +2 -10
  639. package/serialization/types/AppointmentAvailabilitySlots.d.ts +2 -1
  640. package/serialization/types/AppointmentAvailabilitySlots.js +2 -10
  641. package/serialization/types/AreaInfo.d.ts +2 -1
  642. package/serialization/types/AreaInfo.js +2 -10
  643. package/serialization/types/Availability.d.ts +10 -0
  644. package/serialization/types/Availability.js +31 -0
  645. package/serialization/types/BiomarkerResult.d.ts +2 -1
  646. package/serialization/types/BiomarkerResult.js +2 -10
  647. package/serialization/types/BodyV2InDb.d.ts +2 -1
  648. package/serialization/types/BodyV2InDb.js +2 -10
  649. package/serialization/types/ClientActivityResponse.d.ts +2 -1
  650. package/serialization/types/ClientActivityResponse.js +2 -10
  651. package/serialization/types/ClientBodyResponse.d.ts +2 -1
  652. package/serialization/types/ClientBodyResponse.js +2 -10
  653. package/serialization/types/ClientFacingActivity.d.ts +4 -2
  654. package/serialization/types/ClientFacingActivity.js +4 -11
  655. package/serialization/types/ClientFacingAppointment.d.ts +14 -7
  656. package/serialization/types/ClientFacingAppointment.js +14 -16
  657. package/serialization/types/ClientFacingAppointmentEvent.d.ts +2 -1
  658. package/serialization/types/ClientFacingAppointmentEvent.js +2 -10
  659. package/serialization/types/ClientFacingAtHomePhlebotomyOrderDetails.d.ts +2 -1
  660. package/serialization/types/ClientFacingAtHomePhlebotomyOrderDetails.js +2 -10
  661. package/serialization/types/ClientFacingBody.d.ts +2 -1
  662. package/serialization/types/ClientFacingBody.js +2 -10
  663. package/serialization/types/ClientFacingFood.d.ts +6 -3
  664. package/serialization/types/ClientFacingFood.js +6 -12
  665. package/serialization/types/ClientFacingLab.d.ts +4 -2
  666. package/serialization/types/ClientFacingLab.js +4 -11
  667. package/serialization/types/ClientFacingLabTest.d.ts +10 -5
  668. package/serialization/types/ClientFacingLabTest.js +10 -16
  669. package/serialization/types/ClientFacingMarker.d.ts +2 -1
  670. package/serialization/types/ClientFacingMarker.js +2 -10
  671. package/serialization/types/ClientFacingMarkerComplete.d.ts +4 -2
  672. package/serialization/types/ClientFacingMarkerComplete.js +4 -11
  673. package/serialization/types/ClientFacingMealResponse.d.ts +2 -1
  674. package/serialization/types/ClientFacingMealResponse.js +2 -10
  675. package/serialization/types/ClientFacingOrder.d.ts +16 -8
  676. package/serialization/types/ClientFacingOrder.js +16 -17
  677. package/serialization/types/ClientFacingOrderDetails.d.ts +6 -3
  678. package/serialization/types/ClientFacingOrderDetails.js +6 -12
  679. package/serialization/types/ClientFacingOrderEvent.d.ts +2 -1
  680. package/serialization/types/ClientFacingOrderEvent.js +2 -10
  681. package/serialization/types/ClientFacingPayorSearchResponse.d.ts +2 -1
  682. package/serialization/types/ClientFacingPayorSearchResponse.js +2 -10
  683. package/serialization/types/ClientFacingProfile.d.ts +2 -1
  684. package/serialization/types/ClientFacingProfile.js +2 -10
  685. package/serialization/types/ClientFacingProviderDetailed.d.ts +4 -2
  686. package/serialization/types/ClientFacingProviderDetailed.js +4 -13
  687. package/serialization/types/ClientFacingProviderWithStatus.d.ts +2 -0
  688. package/serialization/types/ClientFacingProviderWithStatus.js +2 -0
  689. package/serialization/types/ClientFacingResult.d.ts +2 -1
  690. package/serialization/types/ClientFacingResult.js +2 -10
  691. package/serialization/types/ClientFacingSleep.d.ts +4 -2
  692. package/serialization/types/ClientFacingSleep.js +4 -11
  693. package/serialization/types/ClientFacingSleepStream.d.ts +8 -4
  694. package/serialization/types/ClientFacingSleepStream.js +8 -21
  695. package/serialization/types/ClientFacingTeam.d.ts +7 -4
  696. package/serialization/types/ClientFacingTeam.js +7 -15
  697. package/serialization/types/ClientFacingTestKitOrderDetails.d.ts +2 -1
  698. package/serialization/types/ClientFacingTestKitOrderDetails.js +2 -10
  699. package/serialization/types/ClientFacingTestkitOrder.d.ts +2 -1
  700. package/serialization/types/ClientFacingTestkitOrder.js +2 -10
  701. package/serialization/types/ClientFacingUser.d.ts +8 -3
  702. package/serialization/types/ClientFacingUser.js +8 -12
  703. package/serialization/types/ClientFacingWalkInOrderDetails.d.ts +2 -1
  704. package/serialization/types/ClientFacingWalkInOrderDetails.js +2 -10
  705. package/serialization/types/ClientFacingWorkout.d.ts +4 -2
  706. package/serialization/types/ClientFacingWorkout.js +4 -11
  707. package/serialization/types/ClientSleepResponse.d.ts +2 -1
  708. package/serialization/types/ClientSleepResponse.js +2 -10
  709. package/serialization/types/ClientUserIdConflict.d.ts +15 -0
  710. package/serialization/types/ClientUserIdConflict.js +36 -0
  711. package/serialization/types/ClientWorkoutResponse.d.ts +2 -1
  712. package/serialization/types/ClientWorkoutResponse.js +2 -10
  713. package/serialization/types/ConnectedSourceClientFacing.d.ts +3 -2
  714. package/serialization/types/ConnectedSourceClientFacing.js +3 -11
  715. package/serialization/types/ConnectionStatus.d.ts +4 -0
  716. package/serialization/types/ConnectionStatus.js +4 -0
  717. package/serialization/types/ConnectionStatusState.d.ts +10 -0
  718. package/serialization/types/ConnectionStatusState.js +31 -0
  719. package/serialization/types/Consent.d.ts +2 -1
  720. package/serialization/types/Consent.js +2 -10
  721. package/serialization/types/DaySlots.d.ts +2 -1
  722. package/serialization/types/DaySlots.js +2 -10
  723. package/serialization/types/DeviceV2InDb.d.ts +2 -1
  724. package/serialization/types/DeviceV2InDb.js +2 -10
  725. package/serialization/types/EventDestinationPreferences.d.ts +4 -2
  726. package/serialization/types/EventDestinationPreferences.js +4 -11
  727. package/serialization/types/GetMarkersResponse.d.ts +2 -1
  728. package/serialization/types/GetMarkersResponse.js +2 -10
  729. package/serialization/types/GetOrdersResponse.d.ts +2 -1
  730. package/serialization/types/GetOrdersResponse.js +2 -10
  731. package/serialization/types/GroupedBloodOxygen.d.ts +4 -2
  732. package/serialization/types/GroupedBloodOxygen.js +4 -11
  733. package/serialization/types/GroupedBloodOxygenResponse.d.ts +2 -1
  734. package/serialization/types/GroupedBloodOxygenResponse.js +2 -10
  735. package/serialization/types/GroupedBloodPressure.d.ts +4 -2
  736. package/serialization/types/GroupedBloodPressure.js +4 -11
  737. package/serialization/types/GroupedBloodPressureResponse.d.ts +2 -1
  738. package/serialization/types/GroupedBloodPressureResponse.js +2 -10
  739. package/serialization/types/GroupedBodyFat.d.ts +4 -2
  740. package/serialization/types/GroupedBodyFat.js +4 -11
  741. package/serialization/types/GroupedBodyFatResponse.d.ts +2 -1
  742. package/serialization/types/GroupedBodyFatResponse.js +2 -10
  743. package/serialization/types/GroupedBodyWeight.d.ts +4 -2
  744. package/serialization/types/GroupedBodyWeight.js +4 -11
  745. package/serialization/types/GroupedBodyWeightResponse.d.ts +2 -1
  746. package/serialization/types/GroupedBodyWeightResponse.js +2 -10
  747. package/serialization/types/GroupedCaffeine.d.ts +4 -2
  748. package/serialization/types/GroupedCaffeine.js +4 -11
  749. package/serialization/types/GroupedCaffeineResponse.d.ts +2 -1
  750. package/serialization/types/GroupedCaffeineResponse.js +2 -10
  751. package/serialization/types/GroupedCaloriesActive.d.ts +4 -2
  752. package/serialization/types/GroupedCaloriesActive.js +4 -11
  753. package/serialization/types/GroupedCaloriesActiveResponse.d.ts +2 -1
  754. package/serialization/types/GroupedCaloriesActiveResponse.js +2 -10
  755. package/serialization/types/GroupedCaloriesBasal.d.ts +4 -2
  756. package/serialization/types/GroupedCaloriesBasal.js +4 -11
  757. package/serialization/types/GroupedCaloriesBasalResponse.d.ts +2 -1
  758. package/serialization/types/GroupedCaloriesBasalResponse.js +2 -10
  759. package/serialization/types/GroupedCholesterol.d.ts +4 -2
  760. package/serialization/types/GroupedCholesterol.js +4 -11
  761. package/serialization/types/GroupedCholesterolResponse.d.ts +2 -1
  762. package/serialization/types/GroupedCholesterolResponse.js +2 -10
  763. package/serialization/types/GroupedDistance.d.ts +4 -2
  764. package/serialization/types/GroupedDistance.js +4 -11
  765. package/serialization/types/GroupedDistanceResponse.d.ts +2 -1
  766. package/serialization/types/GroupedDistanceResponse.js +2 -10
  767. package/serialization/types/GroupedElectrocardiogramVoltage.d.ts +4 -2
  768. package/serialization/types/GroupedElectrocardiogramVoltage.js +4 -11
  769. package/serialization/types/GroupedElectrocardiogramVoltageResponse.d.ts +2 -1
  770. package/serialization/types/GroupedElectrocardiogramVoltageResponse.js +2 -10
  771. package/serialization/types/GroupedFloorsClimbed.d.ts +4 -2
  772. package/serialization/types/GroupedFloorsClimbed.js +4 -11
  773. package/serialization/types/GroupedFloorsClimbedResponse.d.ts +2 -1
  774. package/serialization/types/GroupedFloorsClimbedResponse.js +2 -10
  775. package/serialization/types/GroupedGlucose.d.ts +4 -2
  776. package/serialization/types/GroupedGlucose.js +4 -11
  777. package/serialization/types/GroupedGlucoseResponse.d.ts +2 -1
  778. package/serialization/types/GroupedGlucoseResponse.js +2 -10
  779. package/serialization/types/GroupedHeartRate.d.ts +4 -2
  780. package/serialization/types/GroupedHeartRate.js +4 -11
  781. package/serialization/types/GroupedHeartRateResponse.d.ts +2 -1
  782. package/serialization/types/GroupedHeartRateResponse.js +2 -10
  783. package/serialization/types/GroupedHrv.d.ts +4 -2
  784. package/serialization/types/GroupedHrv.js +4 -11
  785. package/serialization/types/GroupedHrvResponse.d.ts +2 -1
  786. package/serialization/types/GroupedHrvResponse.js +2 -10
  787. package/serialization/types/GroupedHypnogram.d.ts +4 -2
  788. package/serialization/types/GroupedHypnogram.js +4 -11
  789. package/serialization/types/GroupedHypnogramResponse.d.ts +2 -1
  790. package/serialization/types/GroupedHypnogramResponse.js +2 -10
  791. package/serialization/types/GroupedIge.d.ts +4 -2
  792. package/serialization/types/GroupedIge.js +4 -11
  793. package/serialization/types/GroupedIgeResponse.d.ts +2 -1
  794. package/serialization/types/GroupedIgeResponse.js +2 -10
  795. package/serialization/types/GroupedIgg.d.ts +4 -2
  796. package/serialization/types/GroupedIgg.js +4 -11
  797. package/serialization/types/GroupedIggResponse.d.ts +2 -1
  798. package/serialization/types/GroupedIggResponse.js +2 -10
  799. package/serialization/types/GroupedMindfulnessMinutes.d.ts +4 -2
  800. package/serialization/types/GroupedMindfulnessMinutes.js +4 -11
  801. package/serialization/types/GroupedMindfulnessMinutesResponse.d.ts +2 -1
  802. package/serialization/types/GroupedMindfulnessMinutesResponse.js +2 -10
  803. package/serialization/types/GroupedRespiratoryRate.d.ts +4 -2
  804. package/serialization/types/GroupedRespiratoryRate.js +4 -11
  805. package/serialization/types/GroupedRespiratoryRateResponse.d.ts +2 -1
  806. package/serialization/types/GroupedRespiratoryRateResponse.js +2 -10
  807. package/serialization/types/GroupedSteps.d.ts +4 -2
  808. package/serialization/types/GroupedSteps.js +4 -11
  809. package/serialization/types/GroupedStepsResponse.d.ts +2 -1
  810. package/serialization/types/GroupedStepsResponse.js +2 -10
  811. package/serialization/types/GroupedStressLevel.d.ts +4 -2
  812. package/serialization/types/GroupedStressLevel.js +4 -11
  813. package/serialization/types/GroupedStressLevelResponse.d.ts +2 -1
  814. package/serialization/types/GroupedStressLevelResponse.js +2 -10
  815. package/serialization/types/GroupedVo2Max.d.ts +4 -2
  816. package/serialization/types/GroupedVo2Max.js +4 -11
  817. package/serialization/types/GroupedVo2MaxResponse.d.ts +2 -1
  818. package/serialization/types/GroupedVo2MaxResponse.js +2 -10
  819. package/serialization/types/GroupedWater.d.ts +4 -2
  820. package/serialization/types/GroupedWater.js +4 -11
  821. package/serialization/types/GroupedWaterResponse.d.ts +2 -1
  822. package/serialization/types/GroupedWaterResponse.js +2 -10
  823. package/serialization/types/HealthInsuranceCreateRequest.d.ts +10 -5
  824. package/serialization/types/HealthInsuranceCreateRequest.js +10 -16
  825. package/serialization/types/HealthInsuranceCreateRequestBackImage.d.ts +4 -2
  826. package/serialization/types/HealthInsuranceCreateRequestBackImage.js +4 -11
  827. package/serialization/types/HealthInsuranceCreateRequestFrontImage.d.ts +4 -2
  828. package/serialization/types/HealthInsuranceCreateRequestFrontImage.js +4 -11
  829. package/serialization/types/HealthInsuranceCreateRequestPatientSignatureImage.d.ts +4 -2
  830. package/serialization/types/HealthInsuranceCreateRequestPatientSignatureImage.js +4 -11
  831. package/serialization/types/HttpValidationError.d.ts +2 -1
  832. package/serialization/types/HttpValidationError.js +2 -12
  833. package/serialization/types/LabResultsRaw.d.ts +4 -2
  834. package/serialization/types/LabResultsRaw.js +4 -11
  835. package/serialization/types/LabResultsRawResults.d.ts +2 -1
  836. package/serialization/types/LabResultsRawResults.js +2 -10
  837. package/serialization/types/LastAttempt.d.ts +2 -1
  838. package/serialization/types/LastAttempt.js +2 -10
  839. package/serialization/types/LibreConfig.d.ts +1 -0
  840. package/serialization/types/LibreConfig.js +1 -0
  841. package/serialization/types/Macros.d.ts +2 -1
  842. package/serialization/types/Macros.js +2 -10
  843. package/serialization/types/MealInDbBaseClientFacingSource.d.ts +10 -5
  844. package/serialization/types/MealInDbBaseClientFacingSource.js +10 -16
  845. package/serialization/types/MetricsResult.d.ts +2 -1
  846. package/serialization/types/MetricsResult.js +2 -12
  847. package/serialization/types/OrderStatus.d.ts +1 -1
  848. package/serialization/types/OrderStatus.js +1 -0
  849. package/serialization/types/PaginatedUsersResponse.d.ts +2 -1
  850. package/serialization/types/PaginatedUsersResponse.js +2 -10
  851. package/serialization/types/PatientDetails.d.ts +2 -1
  852. package/serialization/types/PatientDetails.js +2 -10
  853. package/serialization/types/PersonDetails.d.ts +2 -1
  854. package/serialization/types/PersonDetails.js +2 -10
  855. package/serialization/types/PhlebotomyAreaInfo.d.ts +2 -1
  856. package/serialization/types/PhlebotomyAreaInfo.js +2 -10
  857. package/serialization/types/PhlebotomyProviderInfo.d.ts +4 -2
  858. package/serialization/types/PhlebotomyProviderInfo.js +4 -11
  859. package/serialization/types/PhysicianCreateRequest.d.ts +2 -1
  860. package/serialization/types/PhysicianCreateRequest.js +2 -10
  861. package/serialization/types/PhysicianCreateRequestSignatureImage.d.ts +4 -2
  862. package/serialization/types/PhysicianCreateRequestSignatureImage.js +4 -11
  863. package/serialization/types/PostOrderResponse.d.ts +2 -1
  864. package/serialization/types/PostOrderResponse.js +2 -10
  865. package/serialization/types/ProfileInDb.d.ts +2 -1
  866. package/serialization/types/ProfileInDb.js +2 -10
  867. package/serialization/types/ProviderLinkResponse.d.ts +6 -1
  868. package/serialization/types/ProviderLinkResponse.js +6 -10
  869. package/serialization/types/ProviderLinkResponseState.d.ts +10 -0
  870. package/serialization/types/ProviderLinkResponseState.js +31 -0
  871. package/serialization/types/RawActivity.d.ts +2 -1
  872. package/serialization/types/RawActivity.js +2 -10
  873. package/serialization/types/RawBody.d.ts +2 -1
  874. package/serialization/types/RawBody.js +2 -10
  875. package/serialization/types/RawDevices.d.ts +2 -1
  876. package/serialization/types/RawDevices.js +2 -10
  877. package/serialization/types/RawProfile.d.ts +2 -1
  878. package/serialization/types/RawProfile.js +2 -10
  879. package/serialization/types/RawSleep.d.ts +2 -1
  880. package/serialization/types/RawSleep.js +2 -10
  881. package/serialization/types/RawWorkout.d.ts +2 -1
  882. package/serialization/types/RawWorkout.js +2 -10
  883. package/serialization/types/Region.d.ts +1 -1
  884. package/serialization/types/Region.js +1 -0
  885. package/serialization/types/ResourceAvailability.d.ts +15 -0
  886. package/serialization/types/ResourceAvailability.js +36 -0
  887. package/serialization/types/ScopeRequirementsGrants.d.ts +14 -0
  888. package/serialization/types/ScopeRequirementsGrants.js +35 -0
  889. package/serialization/types/ScopeRequirementsStr.d.ts +13 -0
  890. package/serialization/types/ScopeRequirementsStr.js +34 -0
  891. package/serialization/types/SingleHistoricalPullStatistics.d.ts +2 -1
  892. package/serialization/types/SingleHistoricalPullStatistics.js +2 -10
  893. package/serialization/types/SingleProviderHistoricalPullResponse.d.ts +4 -2
  894. package/serialization/types/SingleProviderHistoricalPullResponse.js +4 -11
  895. package/serialization/types/SingleResourceStatistics.d.ts +2 -1
  896. package/serialization/types/SingleResourceStatistics.js +2 -10
  897. package/serialization/types/SingleUserHistoricalPullResponse.d.ts +2 -1
  898. package/serialization/types/SingleUserHistoricalPullResponse.js +2 -10
  899. package/serialization/types/SingleUserResourceResponse.d.ts +2 -1
  900. package/serialization/types/SingleUserResourceResponse.js +2 -10
  901. package/serialization/types/SleepV2InDb.d.ts +2 -1
  902. package/serialization/types/SleepV2InDb.js +2 -10
  903. package/serialization/types/Source.d.ts +4 -2
  904. package/serialization/types/Source.js +4 -11
  905. package/serialization/types/SourceLink.d.ts +2 -1
  906. package/serialization/types/SourceLink.js +2 -10
  907. package/serialization/types/TeamConfig.d.ts +5 -2
  908. package/serialization/types/TeamConfig.js +5 -11
  909. package/serialization/types/UserHistoricalPullsResponse.d.ts +2 -1
  910. package/serialization/types/UserHistoricalPullsResponse.js +2 -10
  911. package/serialization/types/UserResourcesResponse.d.ts +2 -1
  912. package/serialization/types/UserResourcesResponse.js +2 -10
  913. package/serialization/types/ValidationError.d.ts +2 -1
  914. package/serialization/types/ValidationError.js +2 -10
  915. package/serialization/types/WorkoutV2InDb.d.ts +4 -2
  916. package/serialization/types/WorkoutV2InDb.js +4 -11
  917. package/serialization/types/index.d.ts +7 -0
  918. package/serialization/types/index.js +7 -0
  919. package/tests/client.test.ts +11 -0
  920. package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +0 -6
  921. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +0 -10
  922. package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +0 -10
  923. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +0 -10
  924. package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +0 -6
  925. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +0 -10
  926. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +0 -10
  927. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +0 -10
  928. /package/api/{resources/link/client/requests/LinkGenerateOauthLinkRequest.js → types/ClientUserIdConflict.js} +0 -0
  929. /package/api/{resources/link/client/requests/LinkGetAllProvidersRequest.js → types/ResourceAvailability.js} +0 -0
  930. /package/api/{resources/link/client/requests/LinkTokenStateRequest.js → types/ScopeRequirementsGrants.js} +0 -0
  931. /package/api/{resources/team/client/requests/TeamGetLinkConfigRequest.js → types/ScopeRequirementsStr.js} +0 -0
  932. /package/dist/api/{resources/link/client/requests/LinkGenerateOauthLinkRequest.js → types/ClientUserIdConflict.js} +0 -0
  933. /package/dist/api/{resources/link/client/requests/LinkGetAllProvidersRequest.js → types/ResourceAvailability.js} +0 -0
  934. /package/dist/api/{resources/link/client/requests/LinkTokenStateRequest.js → types/ScopeRequirementsGrants.js} +0 -0
  935. /package/dist/api/{resources/team/client/requests/TeamGetLinkConfigRequest.js → types/ScopeRequirementsStr.js} +0 -0
@@ -8,6 +8,7 @@ export declare namespace Workouts {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.VitalEnvironment | string>;
10
10
  apiKey: core.Supplier<string>;
11
+ vitalLinkToken: core.Supplier<string>;
11
12
  }
12
13
  interface RequestOptions {
13
14
  timeoutInSeconds?: number;
@@ -44,4 +45,7 @@ export declare class Workouts {
44
45
  * await vital.workouts.getByWorkoutId("workout-id")
45
46
  */
46
47
  getByWorkoutId(workoutId: string, requestOptions?: Workouts.RequestOptions): Promise<Vital.ClientFacingStream>;
48
+ protected _getCustomAuthorizationHeaders(): Promise<{
49
+ "x-vital-api-key": string;
50
+ }>;
47
51
  }
@@ -73,12 +73,7 @@ class Workouts {
73
73
  const _response = yield core.fetcher({
74
74
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${userId}`),
75
75
  method: "GET",
76
- headers: {
77
- "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
78
- "X-Fern-Language": "JavaScript",
79
- "X-Fern-SDK-Name": "@tryvital/vital-node",
80
- "X-Fern-SDK-Version": "3.1.2",
81
- },
76
+ headers: Object.assign({ "x-vital-link-token": yield core.Supplier.get(this._options.vitalLinkToken), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
77
  contentType: "application/json",
83
78
  queryParameters: _queryParams,
84
79
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -147,12 +142,7 @@ class Workouts {
147
142
  const _response = yield core.fetcher({
148
143
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${userId}/raw`),
149
144
  method: "GET",
150
- headers: {
151
- "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
152
- "X-Fern-Language": "JavaScript",
153
- "X-Fern-SDK-Name": "@tryvital/vital-node",
154
- "X-Fern-SDK-Version": "3.1.2",
155
- },
145
+ headers: Object.assign({ "x-vital-link-token": yield core.Supplier.get(this._options.vitalLinkToken), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
156
146
  contentType: "application/json",
157
147
  queryParameters: _queryParams,
158
148
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -209,12 +199,7 @@ class Workouts {
209
199
  const _response = yield core.fetcher({
210
200
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/workouts/${workoutId}/stream`),
211
201
  method: "GET",
212
- headers: {
213
- "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
214
- "X-Fern-Language": "JavaScript",
215
- "X-Fern-SDK-Name": "@tryvital/vital-node",
216
- "X-Fern-SDK-Version": "3.1.2",
217
- },
202
+ headers: Object.assign({ "x-vital-link-token": yield core.Supplier.get(this._options.vitalLinkToken), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
218
203
  contentType: "application/json",
219
204
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
220
205
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -258,5 +243,11 @@ class Workouts {
258
243
  }
259
244
  });
260
245
  }
246
+ _getCustomAuthorizationHeaders() {
247
+ return __awaiter(this, void 0, void 0, function* () {
248
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
249
+ return { "x-vital-api-key": apiKeyValue };
250
+ });
251
+ }
261
252
  }
262
253
  exports.Workouts = Workouts;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * An enumeration.
6
+ */
7
+ export declare type Availability = "available" | "unavailable";
8
+ export declare const Availability: {
9
+ readonly Available: "available";
10
+ readonly Unavailable: "unavailable";
11
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Availability = void 0;
7
+ exports.Availability = {
8
+ Available: "available",
9
+ Unavailable: "unavailable",
10
+ };
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Vital from "..";
4
5
  export interface ClientFacingProviderWithStatus {
5
6
  /** Name of source of information */
6
7
  name: string;
@@ -10,4 +11,5 @@ export interface ClientFacingProviderWithStatus {
10
11
  logo: string;
11
12
  /** Status of source, either error or connected */
12
13
  status: string;
14
+ resourceAvailability: Record<string, Vital.ResourceAvailability>;
13
15
  }
@@ -2,9 +2,15 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vital from "..";
5
+ /**
6
+ * [Deprecated] GET /v2/team is in the process of being removed.
7
+ * Neither customers nor Dashboard should retrieve team settings and metadata directly.
8
+ *
9
+ * All must migrate to the Team endpoints of the Org Management API.
10
+ */
5
11
  export interface ClientFacingTeam {
6
12
  id: string;
7
- orgId?: string;
13
+ orgId: string;
8
14
  name: string;
9
15
  svixAppId?: string;
10
16
  clientId?: string;
@@ -20,4 +20,8 @@ export interface ClientFacingUser {
20
20
  fallbackTimeZone?: Vital.FallbackTimeZone;
21
21
  /** Fallback date of birth of the user, in YYYY-mm-dd format. Used for calculating max heartrate for providers that don not provide users' age. */
22
22
  fallbackBirthDate?: Vital.FallbackBirthDate;
23
+ /** Starting bound for user data ingestion. Data older than this date will not be ingested. */
24
+ ingestionStart?: string;
25
+ /** Ending bound for user data ingestion. Data newer than this date will not be ingested and the connection deregistered. */
26
+ ingestionEnd?: string;
23
27
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ClientUserIdConflict {
5
+ errorType: string;
6
+ errorMessage: string;
7
+ userId: string;
8
+ createdOn: Date;
9
+ }
@@ -1,7 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Vital from "..";
4
5
  export interface ConnectionStatus {
5
6
  success: boolean;
6
7
  redirectUrl?: string;
8
+ state: Vital.ConnectionStatusState;
9
+ errorType?: string;
10
+ error?: string;
7
11
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type ConnectionStatusState = "success" | "error";
5
+ export declare const ConnectionStatusState: {
6
+ readonly Success: "success";
7
+ readonly Error: "error";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ConnectionStatusState = void 0;
7
+ exports.ConnectionStatusState = {
8
+ Success: "success",
9
+ Error: "error",
10
+ };
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export interface LibreConfig {
5
5
  practiceId: Record<string, unknown>;
6
+ stripTz?: boolean;
6
7
  }
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * An enumeration.
6
6
  */
7
- export declare type OrderStatus = "received.walk_in_test.ordered" | "received.walk_in_test.requisition_created" | "completed.walk_in_test.completed" | "sample_with_lab.walk_in_test.partial_results" | "failed.walk_in_test.sample_error" | "cancelled.walk_in_test.cancelled" | "received.at_home_phlebotomy.ordered" | "received.at_home_phlebotomy.requisition_created" | "collecting_sample.at_home_phlebotomy.appointment_pending" | "collecting_sample.at_home_phlebotomy.appointment_scheduled" | "collecting_sample.at_home_phlebotomy.draw_completed" | "collecting_sample.at_home_phlebotomy.appointment_cancelled" | "completed.at_home_phlebotomy.completed" | "sample_with_lab.at_home_phlebotomy.partial_results" | "cancelled.at_home_phlebotomy.cancelled" | "received.testkit.ordered" | "received.testkit.awaiting_registration" | "received.testkit.requisition_created" | "received.testkit.registered" | "collecting_sample.testkit.transit_customer" | "collecting_sample.testkit.out_for_delivery" | "collecting_sample.testkit.with_customer" | "collecting_sample.testkit.transit_lab" | "sample_with_lab.testkit.delivered_to_lab" | "completed.testkit.completed" | "failed.testkit.failure_to_deliver_to_customer" | "failed.testkit.failure_to_deliver_to_lab" | "failed.testkit.sample_error" | "failed.testkit.lost" | "cancelled.testkit.cancelled" | "cancelled.testkit.do_not_process";
7
+ export declare type OrderStatus = "received.walk_in_test.ordered" | "received.walk_in_test.requisition_created" | "completed.walk_in_test.completed" | "sample_with_lab.walk_in_test.partial_results" | "failed.walk_in_test.sample_error" | "cancelled.walk_in_test.cancelled" | "received.at_home_phlebotomy.ordered" | "received.at_home_phlebotomy.requisition_created" | "collecting_sample.at_home_phlebotomy.appointment_pending" | "collecting_sample.at_home_phlebotomy.appointment_scheduled" | "collecting_sample.at_home_phlebotomy.draw_completed" | "collecting_sample.at_home_phlebotomy.appointment_cancelled" | "completed.at_home_phlebotomy.completed" | "sample_with_lab.at_home_phlebotomy.partial_results" | "cancelled.at_home_phlebotomy.cancelled" | "failed.at_home_phlebotomy.sample_error" | "received.testkit.ordered" | "received.testkit.awaiting_registration" | "received.testkit.requisition_created" | "received.testkit.registered" | "collecting_sample.testkit.transit_customer" | "collecting_sample.testkit.out_for_delivery" | "collecting_sample.testkit.with_customer" | "collecting_sample.testkit.transit_lab" | "sample_with_lab.testkit.delivered_to_lab" | "completed.testkit.completed" | "failed.testkit.failure_to_deliver_to_customer" | "failed.testkit.failure_to_deliver_to_lab" | "failed.testkit.sample_error" | "failed.testkit.lost" | "cancelled.testkit.cancelled" | "cancelled.testkit.do_not_process";
8
8
  export declare const OrderStatus: {
9
9
  readonly ReceivedWalkInTestOrdered: "received.walk_in_test.ordered";
10
10
  readonly ReceivedWalkInTestRequisitionCreated: "received.walk_in_test.requisition_created";
@@ -21,6 +21,7 @@ export declare const OrderStatus: {
21
21
  readonly CompletedAtHomePhlebotomyCompleted: "completed.at_home_phlebotomy.completed";
22
22
  readonly SampleWithLabAtHomePhlebotomyPartialResults: "sample_with_lab.at_home_phlebotomy.partial_results";
23
23
  readonly CancelledAtHomePhlebotomyCancelled: "cancelled.at_home_phlebotomy.cancelled";
24
+ readonly FailedAtHomePhlebotomySampleError: "failed.at_home_phlebotomy.sample_error";
24
25
  readonly ReceivedTestkitOrdered: "received.testkit.ordered";
25
26
  readonly ReceivedTestkitAwaitingRegistration: "received.testkit.awaiting_registration";
26
27
  readonly ReceivedTestkitRequisitionCreated: "received.testkit.requisition_created";
@@ -20,6 +20,7 @@ exports.OrderStatus = {
20
20
  CompletedAtHomePhlebotomyCompleted: "completed.at_home_phlebotomy.completed",
21
21
  SampleWithLabAtHomePhlebotomyPartialResults: "sample_with_lab.at_home_phlebotomy.partial_results",
22
22
  CancelledAtHomePhlebotomyCancelled: "cancelled.at_home_phlebotomy.cancelled",
23
+ FailedAtHomePhlebotomySampleError: "failed.at_home_phlebotomy.sample_error",
23
24
  ReceivedTestkitOrdered: "received.testkit.ordered",
24
25
  ReceivedTestkitAwaitingRegistration: "received.testkit.awaiting_registration",
25
26
  ReceivedTestkitRequisitionCreated: "received.testkit.requisition_created",
@@ -6,4 +6,7 @@ export interface ProviderLinkResponse {
6
6
  provider: Vital.PasswordProviders;
7
7
  connected: boolean;
8
8
  providerId?: string;
9
+ state: Vital.ProviderLinkResponseState;
10
+ errorType?: string;
11
+ error?: string;
9
12
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type ProviderLinkResponseState = "success" | "error";
5
+ export declare const ProviderLinkResponseState: {
6
+ readonly Success: "success";
7
+ readonly Error: "error";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ProviderLinkResponseState = void 0;
7
+ exports.ProviderLinkResponseState = {
8
+ Success: "success",
9
+ Error: "error",
10
+ };
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * An enumeration.
6
6
  */
7
- export declare type Region = "us" | "eu" | "sg" | "de" | "au" | "br" | "nl" | "fr" | "ca";
7
+ export declare type Region = "us" | "eu" | "sg" | "de" | "au" | "br" | "nl" | "fr" | "ca" | "in";
8
8
  export declare const Region: {
9
9
  readonly Us: "us";
10
10
  readonly Eu: "eu";
@@ -15,4 +15,5 @@ export declare const Region: {
15
15
  readonly Nl: "nl";
16
16
  readonly Fr: "fr";
17
17
  readonly Ca: "ca";
18
+ readonly In: "in";
18
19
  };
@@ -14,4 +14,5 @@ exports.Region = {
14
14
  Nl: "nl",
15
15
  Fr: "fr",
16
16
  Ca: "ca",
17
+ In: "in",
17
18
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "..";
5
+ export interface ResourceAvailability {
6
+ status: Vital.Availability;
7
+ scopeRequirements?: Vital.ScopeRequirementsGrants;
8
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "..";
5
+ export interface ScopeRequirementsGrants {
6
+ userGranted: Vital.ScopeRequirementsStr;
7
+ userDenied: Vital.ScopeRequirementsStr;
8
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ScopeRequirementsStr {
5
+ required: string[];
6
+ optional: string[];
7
+ }
@@ -7,6 +7,7 @@ export interface TeamConfig {
7
7
  textsEnabled?: boolean;
8
8
  pushHistoricalData?: boolean;
9
9
  providerRawData?: boolean;
10
+ rejectDuplicateConnection?: boolean;
10
11
  edsPreferences?: Vital.EventDestinationPreferences;
11
12
  eventTypePrefixes?: string[];
12
13
  }
@@ -9,6 +9,7 @@ export * from "./AppointmentType";
9
9
  export * from "./AreaInfo";
10
10
  export * from "./AttemptStatus";
11
11
  export * from "./AuthType";
12
+ export * from "./Availability";
12
13
  export * from "./BiomarkerResult";
13
14
  export * from "./BodyV2InDb";
14
15
  export * from "./ClientActivityResponse";
@@ -80,8 +81,10 @@ export * from "./ClientFacingWalkInTestOrder";
80
81
  export * from "./ClientFacingWaterTimeseries";
81
82
  export * from "./ClientFacingWorkout";
82
83
  export * from "./ClientSleepResponse";
84
+ export * from "./ClientUserIdConflict";
83
85
  export * from "./ClientWorkoutResponse";
84
86
  export * from "./ConnectedSourceClientFacing";
87
+ export * from "./ConnectionStatusState";
85
88
  export * from "./ConnectionStatus";
86
89
  export * from "./Consent";
87
90
  export * from "./ConsentType";
@@ -186,6 +189,7 @@ export * from "./PhysicianCreateRequestBase";
186
189
  export * from "./Png";
187
190
  export * from "./PostOrderResponse";
188
191
  export * from "./ProfileInDb";
192
+ export * from "./ProviderLinkResponseState";
189
193
  export * from "./ProviderLinkResponse";
190
194
  export * from "./Providers";
191
195
  export * from "./RawActivity";
@@ -195,8 +199,11 @@ export * from "./RawProfile";
195
199
  export * from "./RawSleep";
196
200
  export * from "./RawWorkout";
197
201
  export * from "./Region";
202
+ export * from "./ResourceAvailability";
198
203
  export * from "./ResponsibleRelationship";
199
204
  export * from "./ResultType";
205
+ export * from "./ScopeRequirementsGrants";
206
+ export * from "./ScopeRequirementsStr";
200
207
  export * from "./ShippingAddress";
201
208
  export * from "./SingleHistoricalPullStatistics";
202
209
  export * from "./SingleProviderHistoricalPullResponse";
@@ -25,6 +25,7 @@ __exportStar(require("./AppointmentType"), exports);
25
25
  __exportStar(require("./AreaInfo"), exports);
26
26
  __exportStar(require("./AttemptStatus"), exports);
27
27
  __exportStar(require("./AuthType"), exports);
28
+ __exportStar(require("./Availability"), exports);
28
29
  __exportStar(require("./BiomarkerResult"), exports);
29
30
  __exportStar(require("./BodyV2InDb"), exports);
30
31
  __exportStar(require("./ClientActivityResponse"), exports);
@@ -96,8 +97,10 @@ __exportStar(require("./ClientFacingWalkInTestOrder"), exports);
96
97
  __exportStar(require("./ClientFacingWaterTimeseries"), exports);
97
98
  __exportStar(require("./ClientFacingWorkout"), exports);
98
99
  __exportStar(require("./ClientSleepResponse"), exports);
100
+ __exportStar(require("./ClientUserIdConflict"), exports);
99
101
  __exportStar(require("./ClientWorkoutResponse"), exports);
100
102
  __exportStar(require("./ConnectedSourceClientFacing"), exports);
103
+ __exportStar(require("./ConnectionStatusState"), exports);
101
104
  __exportStar(require("./ConnectionStatus"), exports);
102
105
  __exportStar(require("./Consent"), exports);
103
106
  __exportStar(require("./ConsentType"), exports);
@@ -202,6 +205,7 @@ __exportStar(require("./PhysicianCreateRequestBase"), exports);
202
205
  __exportStar(require("./Png"), exports);
203
206
  __exportStar(require("./PostOrderResponse"), exports);
204
207
  __exportStar(require("./ProfileInDb"), exports);
208
+ __exportStar(require("./ProviderLinkResponseState"), exports);
205
209
  __exportStar(require("./ProviderLinkResponse"), exports);
206
210
  __exportStar(require("./Providers"), exports);
207
211
  __exportStar(require("./RawActivity"), exports);
@@ -211,8 +215,11 @@ __exportStar(require("./RawProfile"), exports);
211
215
  __exportStar(require("./RawSleep"), exports);
212
216
  __exportStar(require("./RawWorkout"), exports);
213
217
  __exportStar(require("./Region"), exports);
218
+ __exportStar(require("./ResourceAvailability"), exports);
214
219
  __exportStar(require("./ResponsibleRelationship"), exports);
215
220
  __exportStar(require("./ResultType"), exports);
221
+ __exportStar(require("./ScopeRequirementsGrants"), exports);
222
+ __exportStar(require("./ScopeRequirementsStr"), exports);
216
223
  __exportStar(require("./ShippingAddress"), exports);
217
224
  __exportStar(require("./SingleHistoricalPullStatistics"), exports);
218
225
  __exportStar(require("./SingleProviderHistoricalPullResponse"), exports);
@@ -6,7 +6,7 @@ export declare namespace Fetcher {
6
6
  method: string;
7
7
  contentType?: string;
8
8
  headers?: Record<string, string | undefined>;
9
- queryParameters?: Record<string, string | string[]>;
9
+ queryParameters?: Record<string, string | string[] | object | object[]>;
10
10
  body?: unknown;
11
11
  timeoutMs?: number;
12
12
  maxRetries?: number;
@@ -15,9 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.fetcher = void 0;
16
16
  const form_data_1 = __importDefault(require("form-data"));
17
17
  const qs_1 = __importDefault(require("qs"));
18
- if (typeof window === "undefined") {
19
- global.fetch = require("node-fetch");
20
- }
18
+ const runtime_1 = require("../runtime");
21
19
  const INITIAL_RETRY_DELAY = 1;
22
20
  const MAX_RETRY_DELAY = 60;
23
21
  const DEFAULT_MAX_RETRIES = 2;
@@ -43,21 +41,34 @@ function fetcherImpl(args) {
43
41
  // @ts-expect-error
44
42
  body = args.body;
45
43
  }
44
+ else if (args.body instanceof Uint8Array) {
45
+ body = args.body;
46
+ }
46
47
  else {
47
48
  body = JSON.stringify(args.body);
48
49
  }
50
+ // In Node.js environments, the SDK always uses`node-fetch`.
51
+ // If not in Node.js the SDK uses global fetch if available,
52
+ // and falls back to node-fetch.
53
+ const fetchFn = runtime_1.RUNTIME.type === "node"
54
+ ? // `.default` is required due to this issue:
55
+ // https://github.com/node-fetch/node-fetch/issues/450#issuecomment-387045223
56
+ require("node-fetch").default
57
+ : typeof fetch == "function"
58
+ ? fetch
59
+ : require("node-fetch").default;
49
60
  const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
50
61
  const controller = new AbortController();
51
62
  let abortId = undefined;
52
63
  if (args.timeoutMs != null) {
53
64
  abortId = setTimeout(() => controller.abort(), args.timeoutMs);
54
65
  }
55
- const response = yield fetch(url, {
66
+ const response = yield fetchFn(url, {
56
67
  method: args.method,
57
68
  headers,
58
69
  body,
59
70
  signal: controller.signal,
60
- credentials: args.withCredentials ? "same-origin" : undefined,
71
+ credentials: args.withCredentials ? "include" : undefined,
61
72
  });
62
73
  if (abortId != null) {
63
74
  clearTimeout(abortId);
@@ -86,19 +97,22 @@ function fetcherImpl(args) {
86
97
  else if (response.body != null && args.responseType === "streaming") {
87
98
  body = response.body;
88
99
  }
89
- else if (response.body != null) {
90
- try {
91
- body = yield response.json();
92
- }
93
- catch (err) {
94
- return {
95
- ok: false,
96
- error: {
97
- reason: "non-json",
98
- statusCode: response.status,
99
- rawBody: yield response.text(),
100
- },
101
- };
100
+ else {
101
+ const text = yield response.text();
102
+ if (text.length > 0) {
103
+ try {
104
+ body = JSON.parse(text);
105
+ }
106
+ catch (err) {
107
+ return {
108
+ ok: false,
109
+ error: {
110
+ reason: "non-json",
111
+ statusCode: response.status,
112
+ rawBody: text,
113
+ },
114
+ };
115
+ }
102
116
  }
103
117
  }
104
118
  if (response.status >= 200 && response.status < 400) {
@@ -1,2 +1,3 @@
1
1
  export * from "./fetcher";
2
+ export * from "./runtime";
2
3
  export * as serialization from "./schemas";
@@ -28,4 +28,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.serialization = void 0;
30
30
  __exportStar(require("./fetcher"), exports);
31
+ __exportStar(require("./runtime"), exports);
31
32
  exports.serialization = __importStar(require("./schemas"));
@@ -0,0 +1 @@
1
+ export { RUNTIME } from "./runtime";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RUNTIME = void 0;
4
+ var runtime_1 = require("./runtime");
5
+ Object.defineProperty(exports, "RUNTIME", { enumerable: true, get: function () { return runtime_1.RUNTIME; } });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A constant that indicates which environment and version the SDK is running in.
3
+ */
4
+ export declare const RUNTIME: Runtime;
5
+ export interface Runtime {
6
+ type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown";
7
+ version?: string;
8
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var _a, _b, _c, _d;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RUNTIME = void 0;
5
+ /**
6
+ * A constant that indicates whether the environment the code is running is a Web Browser.
7
+ */
8
+ const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
9
+ /**
10
+ * A constant that indicates whether the environment the code is running is a Web Worker.
11
+ */
12
+ const isWebWorker = typeof self === "object" &&
13
+ // @ts-ignore
14
+ typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
15
+ (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" ||
16
+ ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" ||
17
+ ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope");
18
+ /**
19
+ * A constant that indicates whether the environment the code is running is Deno.
20
+ */
21
+ const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
22
+ /**
23
+ * A constant that indicates whether the environment the code is running is Bun.sh.
24
+ */
25
+ const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
26
+ /**
27
+ * A constant that indicates whether the environment the code is running is Node.JS.
28
+ */
29
+ const isNode = typeof process !== "undefined" &&
30
+ Boolean(process.version) &&
31
+ Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node) &&
32
+ // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
33
+ !isDeno &&
34
+ !isBun;
35
+ /**
36
+ * A constant that indicates whether the environment the code is running is in React-Native.
37
+ * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
38
+ */
39
+ const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
40
+ /**
41
+ * A constant that indicates which environment and version the SDK is running in.
42
+ */
43
+ exports.RUNTIME = evaluateRuntime();
44
+ function evaluateRuntime() {
45
+ if (isBrowser) {
46
+ return {
47
+ type: "browser",
48
+ version: window.navigator.userAgent,
49
+ };
50
+ }
51
+ if (isWebWorker) {
52
+ return {
53
+ type: "web-worker",
54
+ };
55
+ }
56
+ if (isDeno) {
57
+ return {
58
+ type: "deno",
59
+ version: Deno.version.deno,
60
+ };
61
+ }
62
+ if (isBun) {
63
+ return {
64
+ type: "bun",
65
+ version: Bun.version,
66
+ };
67
+ }
68
+ if (isNode) {
69
+ return {
70
+ type: "node",
71
+ version: process.versions.node,
72
+ };
73
+ }
74
+ if (isReactNative) {
75
+ return {
76
+ type: "react-native",
77
+ };
78
+ }
79
+ return {
80
+ type: "unknown",
81
+ };
82
+ }