@tryvital/vital-node 3.0.7 → 3.0.9

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 (271) hide show
  1. package/Client.d.ts +1 -0
  2. package/api/errors/BadRequestError.js +1 -0
  3. package/api/errors/UnprocessableEntityError.js +1 -0
  4. package/api/resources/activity/client/Client.d.ts +11 -0
  5. package/api/resources/activity/client/Client.js +22 -11
  6. package/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
  7. package/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
  8. package/api/resources/body/client/Client.d.ts +11 -0
  9. package/api/resources/body/client/Client.js +22 -11
  10. package/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
  11. package/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
  12. package/api/resources/devices/client/Client.d.ts +4 -0
  13. package/api/resources/devices/client/Client.js +7 -4
  14. package/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
  15. package/api/resources/insurance/client/Client.d.ts +6 -0
  16. package/api/resources/insurance/client/Client.js +11 -5
  17. package/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
  18. package/api/resources/introspect/client/Client.d.ts +11 -0
  19. package/api/resources/introspect/client/Client.js +24 -13
  20. package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
  21. package/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
  22. package/api/resources/labTests/client/Client.d.ts +21 -1
  23. package/api/resources/labTests/client/Client.js +115 -59
  24. package/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
  25. package/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
  26. package/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
  27. package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
  28. package/api/resources/link/client/Client.d.ts +7 -0
  29. package/api/resources/link/client/Client.js +35 -17
  30. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
  31. package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
  32. package/api/resources/meal/client/Client.d.ts +6 -0
  33. package/api/resources/meal/client/Client.js +11 -6
  34. package/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
  35. package/api/resources/profile/client/Client.d.ts +1 -0
  36. package/api/resources/profile/client/Client.js +8 -7
  37. package/api/resources/providers/client/Client.d.ts +4 -0
  38. package/api/resources/providers/client/Client.js +5 -1
  39. package/api/resources/sleep/client/Client.d.ts +19 -0
  40. package/api/resources/sleep/client/Client.js +38 -17
  41. package/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
  42. package/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
  43. package/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
  44. package/api/resources/team/client/Client.d.ts +18 -0
  45. package/api/resources/team/client/Client.js +37 -14
  46. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
  47. package/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
  48. package/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
  49. package/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
  50. package/api/resources/testkit/client/Client.d.ts +1 -0
  51. package/api/resources/testkit/client/Client.js +4 -2
  52. package/api/resources/user/client/Client.d.ts +7 -0
  53. package/api/resources/user/client/Client.js +33 -17
  54. package/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
  55. package/api/resources/vitals/client/Client.d.ts +116 -0
  56. package/api/resources/vitals/client/Client.js +253 -116
  57. package/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
  58. package/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
  59. package/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
  60. package/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
  61. package/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
  62. package/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
  63. package/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
  64. package/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
  65. package/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
  66. package/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
  67. package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
  68. package/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
  69. package/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
  70. package/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
  71. package/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
  72. package/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
  73. package/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
  74. package/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
  75. package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
  76. package/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
  77. package/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
  78. package/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
  79. package/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
  80. package/api/resources/workouts/client/Client.d.ts +14 -0
  81. package/api/resources/workouts/client/Client.js +27 -12
  82. package/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
  83. package/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
  84. package/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
  85. package/api/types/ClientFacingLabTest.d.ts +1 -1
  86. package/api/types/ClientFacingOrder.d.ts +1 -1
  87. package/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
  88. package/api/types/ClientFacingSleep.d.ts +1 -1
  89. package/api/types/ClientFacingTeam.d.ts +1 -0
  90. package/api/types/ClientFacingUser.d.ts +0 -1
  91. package/api/types/DeviceV2InDb.d.ts +1 -1
  92. package/api/types/FallbackTimeZone.d.ts +0 -1
  93. package/api/types/OAuthProviders.d.ts +2 -1
  94. package/api/types/OAuthProviders.js +1 -0
  95. package/api/types/Providers.d.ts +2 -1
  96. package/api/types/Providers.js +1 -0
  97. package/api/types/TeamConfig.d.ts +1 -0
  98. package/api/types/index.d.ts +7 -7
  99. package/api/types/index.js +7 -7
  100. package/core/fetcher/APIResponse.d.ts +1 -0
  101. package/core/fetcher/Fetcher.d.ts +3 -6
  102. package/core/fetcher/Fetcher.js +70 -26
  103. package/core/fetcher/getHeader.d.ts +1 -0
  104. package/{dist/core/streaming-fetcher → core/fetcher}/getHeader.js +2 -2
  105. package/core/fetcher/index.d.ts +1 -0
  106. package/core/fetcher/index.js +3 -1
  107. package/core/index.d.ts +0 -1
  108. package/core/index.js +0 -1
  109. package/core/schemas/Schema.d.ts +1 -0
  110. package/core/schemas/Schema.js +1 -0
  111. package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  112. package/core/schemas/builders/literals/booleanLiteral.js +29 -0
  113. package/core/schemas/builders/literals/index.d.ts +1 -0
  114. package/core/schemas/builders/literals/index.js +3 -1
  115. package/core/schemas/builders/object/index.d.ts +2 -0
  116. package/core/schemas/builders/object/index.js +3 -1
  117. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  118. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  119. package/dist/Client.d.ts +1 -0
  120. package/dist/api/errors/BadRequestError.js +1 -0
  121. package/dist/api/errors/UnprocessableEntityError.js +1 -0
  122. package/dist/api/resources/activity/client/Client.d.ts +11 -0
  123. package/dist/api/resources/activity/client/Client.js +22 -11
  124. package/dist/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
  125. package/dist/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
  126. package/dist/api/resources/body/client/Client.d.ts +11 -0
  127. package/dist/api/resources/body/client/Client.js +22 -11
  128. package/dist/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
  129. package/dist/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
  130. package/dist/api/resources/devices/client/Client.d.ts +4 -0
  131. package/dist/api/resources/devices/client/Client.js +7 -4
  132. package/dist/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
  133. package/dist/api/resources/insurance/client/Client.d.ts +6 -0
  134. package/dist/api/resources/insurance/client/Client.js +11 -5
  135. package/dist/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
  136. package/dist/api/resources/introspect/client/Client.d.ts +11 -0
  137. package/dist/api/resources/introspect/client/Client.js +24 -13
  138. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
  139. package/dist/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
  140. package/dist/api/resources/labTests/client/Client.d.ts +21 -1
  141. package/dist/api/resources/labTests/client/Client.js +115 -59
  142. package/dist/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
  143. package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
  144. package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
  145. package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
  146. package/dist/api/resources/link/client/Client.d.ts +7 -0
  147. package/dist/api/resources/link/client/Client.js +35 -17
  148. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
  149. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
  150. package/dist/api/resources/meal/client/Client.d.ts +6 -0
  151. package/dist/api/resources/meal/client/Client.js +11 -6
  152. package/dist/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
  153. package/dist/api/resources/profile/client/Client.d.ts +1 -0
  154. package/dist/api/resources/profile/client/Client.js +8 -7
  155. package/dist/api/resources/providers/client/Client.d.ts +4 -0
  156. package/dist/api/resources/providers/client/Client.js +5 -1
  157. package/dist/api/resources/sleep/client/Client.d.ts +19 -0
  158. package/dist/api/resources/sleep/client/Client.js +38 -17
  159. package/dist/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
  160. package/dist/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
  161. package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
  162. package/dist/api/resources/team/client/Client.d.ts +18 -0
  163. package/dist/api/resources/team/client/Client.js +37 -14
  164. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
  165. package/dist/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
  166. package/dist/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
  167. package/dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
  168. package/dist/api/resources/testkit/client/Client.d.ts +1 -0
  169. package/dist/api/resources/testkit/client/Client.js +4 -2
  170. package/dist/api/resources/user/client/Client.d.ts +7 -0
  171. package/dist/api/resources/user/client/Client.js +33 -17
  172. package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
  173. package/dist/api/resources/vitals/client/Client.d.ts +116 -0
  174. package/dist/api/resources/vitals/client/Client.js +253 -116
  175. package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
  176. package/dist/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
  177. package/dist/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
  178. package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
  179. package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
  180. package/dist/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
  181. package/dist/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
  182. package/dist/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
  183. package/dist/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
  184. package/dist/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
  185. package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
  186. package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
  187. package/dist/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
  188. package/dist/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
  189. package/dist/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
  190. package/dist/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
  191. package/dist/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
  192. package/dist/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
  193. package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
  194. package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
  195. package/dist/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
  196. package/dist/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
  197. package/dist/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
  198. package/dist/api/resources/workouts/client/Client.d.ts +14 -0
  199. package/dist/api/resources/workouts/client/Client.js +27 -12
  200. package/dist/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
  201. package/dist/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
  202. package/dist/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
  203. package/dist/api/types/ClientFacingLabTest.d.ts +1 -1
  204. package/dist/api/types/ClientFacingOrder.d.ts +1 -1
  205. package/dist/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
  206. package/dist/api/types/ClientFacingSleep.d.ts +1 -1
  207. package/dist/api/types/ClientFacingTeam.d.ts +1 -0
  208. package/dist/api/types/ClientFacingUser.d.ts +0 -1
  209. package/dist/api/types/DeviceV2InDb.d.ts +1 -1
  210. package/dist/api/types/FallbackTimeZone.d.ts +0 -1
  211. package/dist/api/types/OAuthProviders.d.ts +2 -1
  212. package/dist/api/types/OAuthProviders.js +1 -0
  213. package/dist/api/types/Providers.d.ts +2 -1
  214. package/dist/api/types/Providers.js +1 -0
  215. package/dist/api/types/TeamConfig.d.ts +1 -0
  216. package/dist/api/types/index.d.ts +7 -7
  217. package/dist/api/types/index.js +7 -7
  218. package/dist/core/fetcher/APIResponse.d.ts +1 -0
  219. package/dist/core/fetcher/Fetcher.d.ts +3 -6
  220. package/dist/core/fetcher/Fetcher.js +70 -26
  221. package/dist/core/fetcher/getHeader.d.ts +1 -0
  222. package/{core/streaming-fetcher → dist/core/fetcher}/getHeader.js +2 -2
  223. package/dist/core/fetcher/index.d.ts +1 -0
  224. package/dist/core/fetcher/index.js +3 -1
  225. package/dist/core/index.d.ts +0 -1
  226. package/dist/core/index.js +0 -1
  227. package/dist/core/schemas/Schema.d.ts +1 -0
  228. package/dist/core/schemas/Schema.js +1 -0
  229. package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  230. package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
  231. package/dist/core/schemas/builders/literals/index.d.ts +1 -0
  232. package/dist/core/schemas/builders/literals/index.js +3 -1
  233. package/dist/core/schemas/builders/object/index.d.ts +2 -0
  234. package/dist/core/schemas/builders/object/index.js +3 -1
  235. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  236. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  237. package/dist/serialization/types/ClientFacingTeam.d.ts +1 -0
  238. package/dist/serialization/types/ClientFacingTeam.js +1 -0
  239. package/dist/serialization/types/DeviceV2InDb.d.ts +1 -1
  240. package/dist/serialization/types/DeviceV2InDb.js +1 -1
  241. package/dist/serialization/types/OAuthProviders.d.ts +1 -1
  242. package/dist/serialization/types/OAuthProviders.js +1 -0
  243. package/dist/serialization/types/Providers.d.ts +1 -1
  244. package/dist/serialization/types/Providers.js +1 -0
  245. package/dist/serialization/types/TeamConfig.d.ts +1 -0
  246. package/dist/serialization/types/TeamConfig.js +1 -0
  247. package/dist/serialization/types/index.d.ts +7 -7
  248. package/dist/serialization/types/index.js +7 -7
  249. package/package.json +7 -4
  250. package/serialization/types/ClientFacingTeam.d.ts +1 -0
  251. package/serialization/types/ClientFacingTeam.js +1 -0
  252. package/serialization/types/DeviceV2InDb.d.ts +1 -1
  253. package/serialization/types/DeviceV2InDb.js +1 -1
  254. package/serialization/types/OAuthProviders.d.ts +1 -1
  255. package/serialization/types/OAuthProviders.js +1 -0
  256. package/serialization/types/Providers.d.ts +1 -1
  257. package/serialization/types/Providers.js +1 -0
  258. package/serialization/types/TeamConfig.d.ts +1 -0
  259. package/serialization/types/TeamConfig.js +1 -0
  260. package/serialization/types/index.d.ts +7 -7
  261. package/serialization/types/index.js +7 -7
  262. package/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
  263. package/core/streaming-fetcher/StreamingFetcher.js +0 -79
  264. package/core/streaming-fetcher/getHeader.d.ts +0 -2
  265. package/core/streaming-fetcher/index.d.ts +0 -3
  266. package/core/streaming-fetcher/index.js +0 -7
  267. package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
  268. package/dist/core/streaming-fetcher/StreamingFetcher.js +0 -79
  269. package/dist/core/streaming-fetcher/getHeader.d.ts +0 -2
  270. package/dist/core/streaming-fetcher/index.d.ts +0 -3
  271. package/dist/core/streaming-fetcher/index.js +0 -7
@@ -45,13 +45,15 @@ const Vital = __importStar(require("../../.."));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const serializers = __importStar(require("../../../../serialization"));
47
47
  const errors = __importStar(require("../../../../errors"));
48
- const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
49
48
  class LabTests {
50
49
  constructor(_options) {
51
50
  this._options = _options;
52
51
  }
53
52
  /**
54
53
  * GET all the lab tests the team has access to.
54
+ *
55
+ * @example
56
+ * await vital.labTests.get()
55
57
  */
56
58
  get(requestOptions) {
57
59
  var _a;
@@ -63,10 +65,11 @@ class LabTests {
63
65
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
64
66
  "X-Fern-Language": "JavaScript",
65
67
  "X-Fern-SDK-Name": "@tryvital/vital-node",
66
- "X-Fern-SDK-Version": "3.0.7",
68
+ "X-Fern-SDK-Version": "3.0.9",
67
69
  },
68
70
  contentType: "application/json",
69
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
72
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
70
73
  });
71
74
  if (_response.ok) {
72
75
  return yield serializers.labTests.get.Response.parseOrThrow(_response.body, {
@@ -110,11 +113,12 @@ class LabTests {
110
113
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
111
114
  "X-Fern-Language": "JavaScript",
112
115
  "X-Fern-SDK-Name": "@tryvital/vital-node",
113
- "X-Fern-SDK-Version": "3.0.7",
116
+ "X-Fern-SDK-Version": "3.0.9",
114
117
  },
115
118
  contentType: "application/json",
116
119
  body: yield serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
117
120
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
121
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
118
122
  });
119
123
  if (_response.ok) {
120
124
  return yield serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
@@ -158,30 +162,31 @@ class LabTests {
158
162
  /**
159
163
  * GET all the markers for the given lab.
160
164
  * @throws {@link Vital.UnprocessableEntityError}
165
+ *
166
+ * @example
167
+ * await vital.labTests.getMarkers({})
161
168
  */
162
169
  getMarkers(request = {}, requestOptions) {
163
170
  var _a;
164
171
  return __awaiter(this, void 0, void 0, function* () {
165
172
  const { labId, name, page, size } = request;
166
- const _queryParams = new url_search_params_1.default();
173
+ const _queryParams = {};
167
174
  if (labId != null) {
168
175
  if (Array.isArray(labId)) {
169
- for (const _item of labId) {
170
- _queryParams.append("lab_id", _item.toString());
171
- }
176
+ _queryParams["lab_id"] = labId.map((item) => item.toString());
172
177
  }
173
178
  else {
174
- _queryParams.append("lab_id", labId.toString());
179
+ _queryParams["lab_id"] = labId.toString();
175
180
  }
176
181
  }
177
182
  if (name != null) {
178
- _queryParams.append("name", name);
183
+ _queryParams["name"] = name;
179
184
  }
180
185
  if (page != null) {
181
- _queryParams.append("page", page.toString());
186
+ _queryParams["page"] = page.toString();
182
187
  }
183
188
  if (size != null) {
184
- _queryParams.append("size", size.toString());
189
+ _queryParams["size"] = size.toString();
185
190
  }
186
191
  const _response = yield core.fetcher({
187
192
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/markers"),
@@ -190,11 +195,12 @@ class LabTests {
190
195
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
191
196
  "X-Fern-Language": "JavaScript",
192
197
  "X-Fern-SDK-Name": "@tryvital/vital-node",
193
- "X-Fern-SDK-Version": "3.0.7",
198
+ "X-Fern-SDK-Version": "3.0.9",
194
199
  },
195
200
  contentType: "application/json",
196
201
  queryParameters: _queryParams,
197
202
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
203
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
198
204
  });
199
205
  if (_response.ok) {
200
206
  return yield serializers.GetMarkersResponse.parseOrThrow(_response.body, {
@@ -237,17 +243,20 @@ class LabTests {
237
243
  }
238
244
  /**
239
245
  * @throws {@link Vital.UnprocessableEntityError}
246
+ *
247
+ * @example
248
+ * await vital.labTests.getMarkersForLabTest("lab-test-id", {})
240
249
  */
241
250
  getMarkersForLabTest(labTestId, request = {}, requestOptions) {
242
251
  var _a;
243
252
  return __awaiter(this, void 0, void 0, function* () {
244
253
  const { page, size } = request;
245
- const _queryParams = new url_search_params_1.default();
254
+ const _queryParams = {};
246
255
  if (page != null) {
247
- _queryParams.append("page", page.toString());
256
+ _queryParams["page"] = page.toString();
248
257
  }
249
258
  if (size != null) {
250
- _queryParams.append("size", size.toString());
259
+ _queryParams["size"] = size.toString();
251
260
  }
252
261
  const _response = yield core.fetcher({
253
262
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${labTestId}/markers`),
@@ -256,11 +265,12 @@ class LabTests {
256
265
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
257
266
  "X-Fern-Language": "JavaScript",
258
267
  "X-Fern-SDK-Name": "@tryvital/vital-node",
259
- "X-Fern-SDK-Version": "3.0.7",
268
+ "X-Fern-SDK-Version": "3.0.9",
260
269
  },
261
270
  contentType: "application/json",
262
271
  queryParameters: _queryParams,
263
272
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
273
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
264
274
  });
265
275
  if (_response.ok) {
266
276
  return yield serializers.GetMarkersResponse.parseOrThrow(_response.body, {
@@ -315,10 +325,11 @@ class LabTests {
315
325
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
316
326
  "X-Fern-Language": "JavaScript",
317
327
  "X-Fern-SDK-Name": "@tryvital/vital-node",
318
- "X-Fern-SDK-Version": "3.0.7",
328
+ "X-Fern-SDK-Version": "3.0.9",
319
329
  },
320
330
  contentType: "application/json",
321
331
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
332
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
322
333
  });
323
334
  if (_response.ok) {
324
335
  return yield serializers.ClientFacingMarker.parseOrThrow(_response.body, {
@@ -361,6 +372,9 @@ class LabTests {
361
372
  }
362
373
  /**
363
374
  * GET all the labs.
375
+ *
376
+ * @example
377
+ * await vital.labTests.getLabs()
364
378
  */
365
379
  getLabs(requestOptions) {
366
380
  var _a;
@@ -372,10 +386,11 @@ class LabTests {
372
386
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
373
387
  "X-Fern-Language": "JavaScript",
374
388
  "X-Fern-SDK-Name": "@tryvital/vital-node",
375
- "X-Fern-SDK-Version": "3.0.7",
389
+ "X-Fern-SDK-Version": "3.0.9",
376
390
  },
377
391
  contentType: "application/json",
378
392
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
393
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
379
394
  });
380
395
  if (_response.ok) {
381
396
  return yield serializers.labTests.getLabs.Response.parseOrThrow(_response.body, {
@@ -420,10 +435,11 @@ class LabTests {
420
435
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
421
436
  "X-Fern-Language": "JavaScript",
422
437
  "X-Fern-SDK-Name": "@tryvital/vital-node",
423
- "X-Fern-SDK-Version": "3.0.7",
438
+ "X-Fern-SDK-Version": "3.0.9",
424
439
  },
425
440
  contentType: "application/json",
426
441
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
442
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
427
443
  });
428
444
  if (_response.ok) {
429
445
  return yield serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
@@ -479,11 +495,12 @@ class LabTests {
479
495
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
480
496
  "X-Fern-Language": "JavaScript",
481
497
  "X-Fern-SDK-Name": "@tryvital/vital-node",
482
- "X-Fern-SDK-Version": "3.0.7",
498
+ "X-Fern-SDK-Version": "3.0.9",
483
499
  },
484
500
  contentType: "application/json",
485
501
  body: yield serializers.UsAddress.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
486
502
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
503
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
487
504
  });
488
505
  if (_response.ok) {
489
506
  return yield serializers.AppointmentAvailabilitySlots.parseOrThrow(_response.body, {
@@ -538,11 +555,12 @@ class LabTests {
538
555
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
539
556
  "X-Fern-Language": "JavaScript",
540
557
  "X-Fern-SDK-Name": "@tryvital/vital-node",
541
- "X-Fern-SDK-Version": "3.0.7",
558
+ "X-Fern-SDK-Version": "3.0.9",
542
559
  },
543
560
  contentType: "application/json",
544
561
  body: yield serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
545
562
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
563
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
546
564
  });
547
565
  if (_response.ok) {
548
566
  return yield serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
@@ -597,11 +615,12 @@ class LabTests {
597
615
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
598
616
  "X-Fern-Language": "JavaScript",
599
617
  "X-Fern-SDK-Name": "@tryvital/vital-node",
600
- "X-Fern-SDK-Version": "3.0.7",
618
+ "X-Fern-SDK-Version": "3.0.9",
601
619
  },
602
620
  contentType: "application/json",
603
621
  body: yield serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
604
622
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
623
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
605
624
  });
606
625
  if (_response.ok) {
607
626
  return yield serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
@@ -656,13 +675,14 @@ class LabTests {
656
675
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
657
676
  "X-Fern-Language": "JavaScript",
658
677
  "X-Fern-SDK-Name": "@tryvital/vital-node",
659
- "X-Fern-SDK-Version": "3.0.7",
678
+ "X-Fern-SDK-Version": "3.0.9",
660
679
  },
661
680
  contentType: "application/json",
662
681
  body: yield serializers.AppointmentRescheduleRequest.jsonOrThrow(request, {
663
682
  unrecognizedObjectKeys: "strip",
664
683
  }),
665
684
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
685
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
666
686
  });
667
687
  if (_response.ok) {
668
688
  return yield serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
@@ -717,11 +737,12 @@ class LabTests {
717
737
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
718
738
  "X-Fern-Language": "JavaScript",
719
739
  "X-Fern-SDK-Name": "@tryvital/vital-node",
720
- "X-Fern-SDK-Version": "3.0.7",
740
+ "X-Fern-SDK-Version": "3.0.9",
721
741
  },
722
742
  contentType: "application/json",
723
743
  body: yield serializers.AppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
724
744
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
745
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
725
746
  });
726
747
  if (_response.ok) {
727
748
  return yield serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
@@ -764,6 +785,9 @@ class LabTests {
764
785
  }
765
786
  /**
766
787
  * Get the list of reasons for cancelling an at-home phlebotomy appointment.
788
+ *
789
+ * @example
790
+ * await vital.labTests.getPhlebotomyAppointmentCancellationReason()
767
791
  */
768
792
  getPhlebotomyAppointmentCancellationReason(requestOptions) {
769
793
  var _a;
@@ -775,10 +799,11 @@ class LabTests {
775
799
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
776
800
  "X-Fern-Language": "JavaScript",
777
801
  "X-Fern-SDK-Name": "@tryvital/vital-node",
778
- "X-Fern-SDK-Version": "3.0.7",
802
+ "X-Fern-SDK-Version": "3.0.9",
779
803
  },
780
804
  contentType: "application/json",
781
805
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
806
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
782
807
  });
783
808
  if (_response.ok) {
784
809
  return yield serializers.labTests.getPhlebotomyAppointmentCancellationReason.Response.parseOrThrow(_response.body, {
@@ -823,10 +848,11 @@ class LabTests {
823
848
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
824
849
  "X-Fern-Language": "JavaScript",
825
850
  "X-Fern-SDK-Name": "@tryvital/vital-node",
826
- "X-Fern-SDK-Version": "3.0.7",
851
+ "X-Fern-SDK-Version": "3.0.9",
827
852
  },
828
853
  contentType: "application/json",
829
854
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
855
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
830
856
  });
831
857
  if (_response.ok) {
832
858
  return yield serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
@@ -871,15 +897,16 @@ class LabTests {
871
897
  * GET information about an area with respect to lab-testing.
872
898
  *
873
899
  * Information returned:
874
- * * Whether a given zip code is served by our Phlebotomy network.
900
+ *
901
+ * - Whether a given zip code is served by our Phlebotomy network.
875
902
  * @throws {@link Vital.UnprocessableEntityError}
876
903
  */
877
904
  getAreaInfo(request, requestOptions) {
878
905
  var _a;
879
906
  return __awaiter(this, void 0, void 0, function* () {
880
907
  const { zipCode } = request;
881
- const _queryParams = new url_search_params_1.default();
882
- _queryParams.append("zip_code", zipCode);
908
+ const _queryParams = {};
909
+ _queryParams["zip_code"] = zipCode;
883
910
  const _response = yield core.fetcher({
884
911
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/area/info"),
885
912
  method: "GET",
@@ -887,11 +914,12 @@ class LabTests {
887
914
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
888
915
  "X-Fern-Language": "JavaScript",
889
916
  "X-Fern-SDK-Name": "@tryvital/vital-node",
890
- "X-Fern-SDK-Version": "3.0.7",
917
+ "X-Fern-SDK-Version": "3.0.9",
891
918
  },
892
919
  contentType: "application/json",
893
920
  queryParameters: _queryParams,
894
921
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
922
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
895
923
  });
896
924
  if (_response.ok) {
897
925
  return yield serializers.AreaInfo.parseOrThrow(_response.body, {
@@ -938,23 +966,42 @@ class LabTests {
938
966
  getResultPdf(orderId, requestOptions) {
939
967
  var _a;
940
968
  return __awaiter(this, void 0, void 0, function* () {
941
- const _response = yield core.streamingFetcher({
969
+ const _response = yield core.fetcher({
942
970
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/result/pdf`),
943
971
  method: "GET",
944
972
  headers: {
945
973
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
946
974
  "X-Fern-Language": "JavaScript",
947
975
  "X-Fern-SDK-Name": "@tryvital/vital-node",
948
- "X-Fern-SDK-Version": "3.0.7",
976
+ "X-Fern-SDK-Version": "3.0.9",
949
977
  },
978
+ contentType: "application/json",
979
+ responseType: "streaming",
950
980
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
951
- onError: (error) => {
981
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
982
+ });
983
+ if (_response.ok) {
984
+ return _response.body;
985
+ }
986
+ if (_response.error.reason === "status-code") {
987
+ throw new errors.VitalError({
988
+ statusCode: _response.error.statusCode,
989
+ body: _response.error.body,
990
+ });
991
+ }
992
+ switch (_response.error.reason) {
993
+ case "non-json":
952
994
  throw new errors.VitalError({
953
- message: error === null || error === void 0 ? void 0 : error.message,
995
+ statusCode: _response.error.statusCode,
996
+ body: _response.error.rawBody,
954
997
  });
955
- },
956
- });
957
- return _response.data;
998
+ case "timeout":
999
+ throw new errors.VitalTimeoutError();
1000
+ case "unknown":
1001
+ throw new errors.VitalError({
1002
+ message: _response.error.errorMessage,
1003
+ });
1004
+ }
958
1005
  });
959
1006
  }
960
1007
  /**
@@ -972,10 +1019,11 @@ class LabTests {
972
1019
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
973
1020
  "X-Fern-Language": "JavaScript",
974
1021
  "X-Fern-SDK-Name": "@tryvital/vital-node",
975
- "X-Fern-SDK-Version": "3.0.7",
1022
+ "X-Fern-SDK-Version": "3.0.9",
976
1023
  },
977
1024
  contentType: "application/json",
978
1025
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1026
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
979
1027
  });
980
1028
  if (_response.ok) {
981
1029
  return yield serializers.LabResultsMetadata.parseOrThrow(_response.body, {
@@ -1030,10 +1078,11 @@ class LabTests {
1030
1078
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1031
1079
  "X-Fern-Language": "JavaScript",
1032
1080
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1033
- "X-Fern-SDK-Version": "3.0.7",
1081
+ "X-Fern-SDK-Version": "3.0.9",
1034
1082
  },
1035
1083
  contentType: "application/json",
1036
1084
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1085
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1037
1086
  });
1038
1087
  if (_response.ok) {
1039
1088
  return yield serializers.LabResultsRaw.parseOrThrow(_response.body, {
@@ -1088,10 +1137,11 @@ class LabTests {
1088
1137
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1089
1138
  "X-Fern-Language": "JavaScript",
1090
1139
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1091
- "X-Fern-SDK-Version": "3.0.7",
1140
+ "X-Fern-SDK-Version": "3.0.9",
1092
1141
  },
1093
1142
  contentType: "application/json",
1094
1143
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1144
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1095
1145
  });
1096
1146
  if (_response.ok) {
1097
1147
  return _response.body;
@@ -1141,10 +1191,11 @@ class LabTests {
1141
1191
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1142
1192
  "X-Fern-Language": "JavaScript",
1143
1193
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1144
- "X-Fern-SDK-Version": "3.0.7",
1194
+ "X-Fern-SDK-Version": "3.0.9",
1145
1195
  },
1146
1196
  contentType: "application/json",
1147
1197
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1198
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1148
1199
  });
1149
1200
  if (_response.ok) {
1150
1201
  return yield serializers.ClientFacingOrder.parseOrThrow(_response.body, {
@@ -1199,13 +1250,14 @@ class LabTests {
1199
1250
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1200
1251
  "X-Fern-Language": "JavaScript",
1201
1252
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1202
- "X-Fern-SDK-Version": "3.0.7",
1253
+ "X-Fern-SDK-Version": "3.0.9",
1203
1254
  },
1204
1255
  contentType: "application/json",
1205
1256
  body: yield serializers.CreateOrderRequestCompatible.jsonOrThrow(request, {
1206
1257
  unrecognizedObjectKeys: "strip",
1207
1258
  }),
1208
1259
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1260
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1209
1261
  });
1210
1262
  if (_response.ok) {
1211
1263
  return yield serializers.PostOrderResponse.parseOrThrow(_response.body, {
@@ -1260,10 +1312,11 @@ class LabTests {
1260
1312
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1261
1313
  "X-Fern-Language": "JavaScript",
1262
1314
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1263
- "X-Fern-SDK-Version": "3.0.7",
1315
+ "X-Fern-SDK-Version": "3.0.9",
1264
1316
  },
1265
1317
  contentType: "application/json",
1266
1318
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1319
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1267
1320
  });
1268
1321
  if (_response.ok) {
1269
1322
  return yield serializers.PostOrderResponse.parseOrThrow(_response.body, {
@@ -1312,12 +1365,12 @@ class LabTests {
1312
1365
  var _a;
1313
1366
  return __awaiter(this, void 0, void 0, function* () {
1314
1367
  const { finalStatus, delay } = request;
1315
- const _queryParams = new url_search_params_1.default();
1368
+ const _queryParams = {};
1316
1369
  if (finalStatus != null) {
1317
- _queryParams.append("final_status", finalStatus);
1370
+ _queryParams["final_status"] = finalStatus;
1318
1371
  }
1319
1372
  if (delay != null) {
1320
- _queryParams.append("delay", delay.toString());
1373
+ _queryParams["delay"] = delay.toString();
1321
1374
  }
1322
1375
  const _response = yield core.fetcher({
1323
1376
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/test`),
@@ -1326,11 +1379,12 @@ class LabTests {
1326
1379
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1327
1380
  "X-Fern-Language": "JavaScript",
1328
1381
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1329
- "X-Fern-SDK-Version": "3.0.7",
1382
+ "X-Fern-SDK-Version": "3.0.9",
1330
1383
  },
1331
1384
  contentType: "application/json",
1332
1385
  queryParameters: _queryParams,
1333
1386
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1387
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1334
1388
  });
1335
1389
  if (_response.ok) {
1336
1390
  return _response.body;
@@ -1369,39 +1423,40 @@ class LabTests {
1369
1423
  /**
1370
1424
  * GET many orders with filters.
1371
1425
  * @throws {@link Vital.UnprocessableEntityError}
1426
+ *
1427
+ * @example
1428
+ * await vital.labTests.getOrders({})
1372
1429
  */
1373
1430
  getOrders(request = {}, requestOptions) {
1374
1431
  var _a;
1375
1432
  return __awaiter(this, void 0, void 0, function* () {
1376
1433
  const { startDate, endDate, userId, patientName, orderIds, page, size } = request;
1377
- const _queryParams = new url_search_params_1.default();
1434
+ const _queryParams = {};
1378
1435
  if (startDate != null) {
1379
- _queryParams.append("start_date", startDate.toISOString());
1436
+ _queryParams["start_date"] = startDate.toISOString();
1380
1437
  }
1381
1438
  if (endDate != null) {
1382
- _queryParams.append("end_date", endDate.toISOString());
1439
+ _queryParams["end_date"] = endDate.toISOString();
1383
1440
  }
1384
1441
  if (userId != null) {
1385
- _queryParams.append("user_id", userId);
1442
+ _queryParams["user_id"] = userId;
1386
1443
  }
1387
1444
  if (patientName != null) {
1388
- _queryParams.append("patient_name", patientName);
1445
+ _queryParams["patient_name"] = patientName;
1389
1446
  }
1390
1447
  if (orderIds != null) {
1391
1448
  if (Array.isArray(orderIds)) {
1392
- for (const _item of orderIds) {
1393
- _queryParams.append("order_ids", _item);
1394
- }
1449
+ _queryParams["order_ids"] = orderIds.map((item) => item);
1395
1450
  }
1396
1451
  else {
1397
- _queryParams.append("order_ids", orderIds);
1452
+ _queryParams["order_ids"] = orderIds;
1398
1453
  }
1399
1454
  }
1400
1455
  if (page != null) {
1401
- _queryParams.append("page", page.toString());
1456
+ _queryParams["page"] = page.toString();
1402
1457
  }
1403
1458
  if (size != null) {
1404
- _queryParams.append("size", size.toString());
1459
+ _queryParams["size"] = size.toString();
1405
1460
  }
1406
1461
  const _response = yield core.fetcher({
1407
1462
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
@@ -1410,11 +1465,12 @@ class LabTests {
1410
1465
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1411
1466
  "X-Fern-Language": "JavaScript",
1412
1467
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1413
- "X-Fern-SDK-Version": "3.0.7",
1468
+ "X-Fern-SDK-Version": "3.0.9",
1414
1469
  },
1415
1470
  contentType: "application/json",
1416
1471
  queryParameters: _queryParams,
1417
1472
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1473
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1418
1474
  });
1419
1475
  if (_response.ok) {
1420
1476
  return yield serializers.GetOrdersResponse.parseOrThrow(_response.body, {
@@ -7,7 +7,7 @@ export interface CreateOrderRequestCompatible {
7
7
  labTestId: string;
8
8
  physician?: Vital.PhysicianCreateRequest;
9
9
  healthInsurance?: Vital.HealthInsuranceCreateRequest;
10
- /** Defines whether order is priority or not. Only available for Labcorp. For Labcorp, this corresponds to a STAT order. */
10
+ /** Defines whether order is priority or not. For some labs, this refers to a STAT order. */
11
11
  priority?: boolean;
12
12
  consents?: Vital.Consent[];
13
13
  patientDetails: Vital.PatientDetails;
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
4
8
  export interface LabTestsGetMarkersForLabTestRequest {
5
9
  page?: number;
6
10
  size?: number;
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
4
8
  export interface LabTestsGetMarkersRequest {
5
9
  /**
6
10
  * The identifier Vital assigned to a lab partner.
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
4
8
  export interface LabTestsGetOrdersRequest {
5
9
  /**
6
10
  * Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00
@@ -11,6 +11,7 @@ export declare namespace Link {
11
11
  }
12
12
  interface RequestOptions {
13
13
  timeoutInSeconds?: number;
14
+ maxRetries?: number;
14
15
  }
15
16
  }
16
17
  export declare class Link {
@@ -45,6 +46,9 @@ export declare class Link {
45
46
  * REQUEST_SOURCE: VITAL-LINK
46
47
  * Check link token state - can be hit continuously used as heartbeat
47
48
  * @throws {@link Vital.UnprocessableEntityError}
49
+ *
50
+ * @example
51
+ * await vital.link.tokenState({})
48
52
  */
49
53
  tokenState(request?: Vital.LinkTokenStateRequest, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
50
54
  /**
@@ -79,6 +83,9 @@ export declare class Link {
79
83
  /**
80
84
  * GET List of all available providers given the generated link token.
81
85
  * @throws {@link Vital.UnprocessableEntityError}
86
+ *
87
+ * @example
88
+ * await vital.link.getAllProviders({})
82
89
  */
83
90
  getAllProviders(request?: Vital.LinkGetAllProvidersRequest, requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
84
91
  /**