@tryvital/vital-node 3.1.183 → 3.1.185

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 (166) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +9 -4
  3. package/api/resources/activity/client/Client.js +2 -2
  4. package/api/resources/aggregate/client/Client.js +2 -2
  5. package/api/resources/body/client/Client.js +2 -2
  6. package/api/resources/devices/client/Client.js +1 -1
  7. package/api/resources/electrocardiogram/client/Client.js +1 -1
  8. package/api/resources/index.d.ts +2 -0
  9. package/api/resources/index.js +3 -1
  10. package/api/resources/insurance/client/Client.js +3 -3
  11. package/api/resources/introspect/client/Client.js +2 -2
  12. package/api/resources/labTests/client/Client.d.ts +27 -13
  13. package/api/resources/labTests/client/Client.js +192 -101
  14. package/api/resources/labTests/client/requests/LabTestsGetRequest.d.ts +26 -0
  15. package/api/resources/labTests/client/requests/UpdateLabTestRequest.d.ts +11 -0
  16. package/api/resources/labTests/client/requests/index.d.ts +2 -0
  17. package/api/resources/link/client/Client.d.ts +25 -0
  18. package/api/resources/link/client/Client.js +140 -16
  19. package/api/{types → resources/link/client/requests}/BulkExportConnectionsBody.d.ts +8 -1
  20. package/api/{types → resources/link/client/requests}/BulkPauseConnectionsBody.d.ts +8 -1
  21. package/api/resources/link/client/requests/index.d.ts +2 -0
  22. package/api/resources/meal/client/Client.js +1 -1
  23. package/api/resources/menstrualCycle/client/Client.js +1 -1
  24. package/api/resources/order/client/Client.d.ts +39 -0
  25. package/api/resources/order/client/Client.js +123 -0
  26. package/api/resources/order/client/index.d.ts +1 -0
  27. package/api/resources/order/client/index.js +17 -0
  28. package/api/resources/order/client/requests/ResendWebhookBody.d.ts +12 -0
  29. package/api/resources/order/client/requests/ResendWebhookBody.js +5 -0
  30. package/api/resources/order/client/requests/index.d.ts +1 -0
  31. package/api/resources/order/client/requests/index.js +2 -0
  32. package/api/resources/order/index.d.ts +1 -0
  33. package/api/resources/order/index.js +17 -0
  34. package/api/resources/profile/client/Client.js +2 -2
  35. package/api/resources/providers/client/Client.js +1 -1
  36. package/api/resources/sleep/client/Client.js +4 -4
  37. package/api/resources/sleepCycle/client/Client.js +1 -1
  38. package/api/resources/team/client/Client.js +7 -7
  39. package/api/resources/testkit/client/Client.js +2 -2
  40. package/api/resources/user/client/Client.js +16 -16
  41. package/api/resources/vitals/client/Client.js +58 -58
  42. package/api/resources/workouts/client/Client.js +3 -3
  43. package/api/types/LabTestGenerationMethodFilter.d.ts +9 -0
  44. package/api/types/LabTestGenerationMethodFilter.js +11 -0
  45. package/api/types/ResendWebhookResponse.d.ts +6 -0
  46. package/api/types/ResendWebhookResponse.js +5 -0
  47. package/api/types/index.d.ts +2 -2
  48. package/api/types/index.js +2 -2
  49. package/dist/Client.d.ts +3 -0
  50. package/dist/Client.js +9 -4
  51. package/dist/api/resources/activity/client/Client.js +2 -2
  52. package/dist/api/resources/aggregate/client/Client.js +2 -2
  53. package/dist/api/resources/body/client/Client.js +2 -2
  54. package/dist/api/resources/devices/client/Client.js +1 -1
  55. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  56. package/dist/api/resources/index.d.ts +2 -0
  57. package/dist/api/resources/index.js +3 -1
  58. package/dist/api/resources/insurance/client/Client.js +3 -3
  59. package/dist/api/resources/introspect/client/Client.js +2 -2
  60. package/dist/api/resources/labTests/client/Client.d.ts +27 -13
  61. package/dist/api/resources/labTests/client/Client.js +192 -101
  62. package/dist/api/resources/labTests/client/requests/LabTestsGetRequest.d.ts +26 -0
  63. package/dist/api/resources/labTests/client/requests/LabTestsGetRequest.js +5 -0
  64. package/dist/api/resources/labTests/client/requests/UpdateLabTestRequest.d.ts +11 -0
  65. package/dist/api/resources/labTests/client/requests/UpdateLabTestRequest.js +5 -0
  66. package/dist/api/resources/labTests/client/requests/index.d.ts +2 -0
  67. package/dist/api/resources/link/client/Client.d.ts +25 -0
  68. package/dist/api/resources/link/client/Client.js +140 -16
  69. package/dist/api/{types → resources/link/client/requests}/BulkExportConnectionsBody.d.ts +8 -1
  70. package/dist/api/resources/link/client/requests/BulkExportConnectionsBody.js +5 -0
  71. package/dist/api/{types → resources/link/client/requests}/BulkPauseConnectionsBody.d.ts +8 -1
  72. package/dist/api/resources/link/client/requests/BulkPauseConnectionsBody.js +5 -0
  73. package/dist/api/resources/link/client/requests/index.d.ts +2 -0
  74. package/dist/api/resources/meal/client/Client.js +1 -1
  75. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  76. package/dist/api/resources/order/client/Client.d.ts +39 -0
  77. package/dist/api/resources/order/client/Client.js +123 -0
  78. package/dist/api/resources/order/client/index.d.ts +1 -0
  79. package/dist/api/resources/order/client/index.js +17 -0
  80. package/dist/api/resources/order/client/requests/ResendWebhookBody.d.ts +12 -0
  81. package/dist/api/resources/order/client/requests/ResendWebhookBody.js +5 -0
  82. package/dist/api/resources/order/client/requests/index.d.ts +1 -0
  83. package/dist/api/resources/order/client/requests/index.js +2 -0
  84. package/dist/api/resources/order/index.d.ts +1 -0
  85. package/dist/api/resources/order/index.js +17 -0
  86. package/dist/api/resources/profile/client/Client.js +2 -2
  87. package/dist/api/resources/providers/client/Client.js +1 -1
  88. package/dist/api/resources/sleep/client/Client.js +4 -4
  89. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  90. package/dist/api/resources/team/client/Client.js +7 -7
  91. package/dist/api/resources/testkit/client/Client.js +2 -2
  92. package/dist/api/resources/user/client/Client.js +16 -16
  93. package/dist/api/resources/vitals/client/Client.js +58 -58
  94. package/dist/api/resources/workouts/client/Client.js +3 -3
  95. package/dist/api/types/LabTestGenerationMethodFilter.d.ts +9 -0
  96. package/dist/api/types/LabTestGenerationMethodFilter.js +11 -0
  97. package/dist/api/types/ResendWebhookResponse.d.ts +6 -0
  98. package/dist/api/types/ResendWebhookResponse.js +5 -0
  99. package/dist/api/types/index.d.ts +2 -2
  100. package/dist/api/types/index.js +2 -2
  101. package/dist/serialization/resources/index.d.ts +2 -0
  102. package/dist/serialization/resources/index.js +3 -1
  103. package/dist/serialization/resources/labTests/client/requests/UpdateLabTestRequest.d.ts +13 -0
  104. package/dist/serialization/resources/labTests/client/requests/UpdateLabTestRequest.js +34 -0
  105. package/dist/serialization/resources/labTests/client/requests/index.d.ts +1 -0
  106. package/dist/serialization/resources/labTests/client/requests/index.js +3 -1
  107. package/dist/serialization/resources/link/client/requests/BulkExportConnectionsBody.d.ts +15 -0
  108. package/{serialization/types → dist/serialization/resources/link/client/requests}/BulkExportConnectionsBody.js +3 -2
  109. package/dist/serialization/resources/link/client/requests/BulkPauseConnectionsBody.d.ts +14 -0
  110. package/dist/serialization/{types → resources/link/client/requests}/BulkPauseConnectionsBody.js +2 -2
  111. package/dist/serialization/resources/link/client/requests/index.d.ts +2 -0
  112. package/dist/serialization/resources/link/client/requests/index.js +5 -1
  113. package/dist/serialization/resources/order/client/index.d.ts +1 -0
  114. package/dist/serialization/resources/order/client/index.js +17 -0
  115. package/dist/serialization/resources/order/client/requests/ResendWebhookBody.d.ts +14 -0
  116. package/dist/serialization/resources/order/client/requests/ResendWebhookBody.js +35 -0
  117. package/dist/serialization/resources/order/client/requests/index.d.ts +1 -0
  118. package/dist/serialization/resources/order/client/requests/index.js +5 -0
  119. package/dist/serialization/resources/order/index.d.ts +1 -0
  120. package/dist/serialization/resources/order/index.js +17 -0
  121. package/dist/serialization/types/LabTestGenerationMethodFilter.d.ts +10 -0
  122. package/dist/serialization/types/LabTestGenerationMethodFilter.js +31 -0
  123. package/dist/serialization/types/ResendWebhookResponse.d.ts +12 -0
  124. package/dist/serialization/types/ResendWebhookResponse.js +33 -0
  125. package/dist/serialization/types/index.d.ts +2 -2
  126. package/dist/serialization/types/index.js +2 -2
  127. package/dist/version.d.ts +1 -1
  128. package/dist/version.js +1 -1
  129. package/package.json +1 -1
  130. package/reference.md +268 -38
  131. package/serialization/resources/index.d.ts +2 -0
  132. package/serialization/resources/index.js +3 -1
  133. package/serialization/resources/labTests/client/requests/UpdateLabTestRequest.d.ts +13 -0
  134. package/serialization/resources/labTests/client/requests/UpdateLabTestRequest.js +34 -0
  135. package/serialization/resources/labTests/client/requests/index.d.ts +1 -0
  136. package/serialization/resources/labTests/client/requests/index.js +3 -1
  137. package/serialization/resources/link/client/requests/BulkExportConnectionsBody.d.ts +15 -0
  138. package/{dist/serialization/types → serialization/resources/link/client/requests}/BulkExportConnectionsBody.js +3 -2
  139. package/serialization/resources/link/client/requests/BulkPauseConnectionsBody.d.ts +14 -0
  140. package/serialization/{types → resources/link/client/requests}/BulkPauseConnectionsBody.js +2 -2
  141. package/serialization/resources/link/client/requests/index.d.ts +2 -0
  142. package/serialization/resources/link/client/requests/index.js +5 -1
  143. package/serialization/resources/order/client/index.d.ts +1 -0
  144. package/serialization/resources/order/client/index.js +17 -0
  145. package/serialization/resources/order/client/requests/ResendWebhookBody.d.ts +14 -0
  146. package/serialization/resources/order/client/requests/ResendWebhookBody.js +35 -0
  147. package/serialization/resources/order/client/requests/index.d.ts +1 -0
  148. package/serialization/resources/order/client/requests/index.js +5 -0
  149. package/serialization/resources/order/index.d.ts +1 -0
  150. package/serialization/resources/order/index.js +17 -0
  151. package/serialization/types/LabTestGenerationMethodFilter.d.ts +10 -0
  152. package/serialization/types/LabTestGenerationMethodFilter.js +31 -0
  153. package/serialization/types/ResendWebhookResponse.d.ts +12 -0
  154. package/serialization/types/ResendWebhookResponse.js +33 -0
  155. package/serialization/types/index.d.ts +2 -2
  156. package/serialization/types/index.js +2 -2
  157. package/version.d.ts +1 -1
  158. package/version.js +1 -1
  159. package/dist/serialization/types/BulkExportConnectionsBody.d.ts +0 -14
  160. package/dist/serialization/types/BulkPauseConnectionsBody.d.ts +0 -14
  161. package/serialization/types/BulkExportConnectionsBody.d.ts +0 -14
  162. package/serialization/types/BulkPauseConnectionsBody.d.ts +0 -14
  163. /package/api/{types/BulkExportConnectionsBody.js → resources/labTests/client/requests/LabTestsGetRequest.js} +0 -0
  164. /package/api/{types/BulkPauseConnectionsBody.js → resources/labTests/client/requests/UpdateLabTestRequest.js} +0 -0
  165. /package/{dist/api/types → api/resources/link/client/requests}/BulkExportConnectionsBody.js +0 -0
  166. /package/{dist/api/types → api/resources/link/client/requests}/BulkPauseConnectionsBody.js +0 -0
@@ -52,19 +52,37 @@ class LabTests {
52
52
  /**
53
53
  * GET all the lab tests the team has access to.
54
54
  *
55
+ * @param {Vital.LabTestsGetRequest} request
55
56
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
56
57
  *
58
+ * @throws {@link Vital.UnprocessableEntityError}
59
+ *
57
60
  * @example
58
61
  * await client.labTests.get()
59
62
  */
60
- get(requestOptions) {
63
+ get(request = {}, requestOptions) {
61
64
  var _a;
62
65
  return __awaiter(this, void 0, void 0, function* () {
66
+ const { generationMethod, labSlug, collectionMethod, status } = request;
67
+ const _queryParams = {};
68
+ if (generationMethod != null) {
69
+ _queryParams["generation_method"] = generationMethod;
70
+ }
71
+ if (labSlug != null) {
72
+ _queryParams["lab_slug"] = labSlug;
73
+ }
74
+ if (collectionMethod != null) {
75
+ _queryParams["collection_method"] = collectionMethod;
76
+ }
77
+ if (status != null) {
78
+ _queryParams["status"] = status;
79
+ }
63
80
  const _response = yield core.fetcher({
64
81
  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"),
65
82
  method: "GET",
66
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
83
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
67
84
  contentType: "application/json",
85
+ queryParameters: _queryParams,
68
86
  requestType: "json",
69
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
70
88
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -79,10 +97,20 @@ class LabTests {
79
97
  });
80
98
  }
81
99
  if (_response.error.reason === "status-code") {
82
- throw new errors.VitalError({
83
- statusCode: _response.error.statusCode,
84
- body: _response.error.body,
85
- });
100
+ switch (_response.error.statusCode) {
101
+ case 422:
102
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
103
+ unrecognizedObjectKeys: "passthrough",
104
+ allowUnrecognizedUnionMembers: true,
105
+ allowUnrecognizedEnumValues: true,
106
+ breadcrumbsPrefix: ["response"],
107
+ }));
108
+ default:
109
+ throw new errors.VitalError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.body,
112
+ });
113
+ }
86
114
  }
87
115
  switch (_response.error.reason) {
88
116
  case "non-json":
@@ -118,7 +146,7 @@ class LabTests {
118
146
  const _response = yield core.fetcher({
119
147
  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"),
120
148
  method: "POST",
121
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
149
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
122
150
  contentType: "application/json",
123
151
  requestType: "json",
124
152
  body: serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -165,6 +193,132 @@ class LabTests {
165
193
  }
166
194
  });
167
195
  }
196
+ /**
197
+ * GET all the lab tests the team has access to.
198
+ *
199
+ * @param {string} labTestId
200
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
201
+ *
202
+ * @throws {@link Vital.UnprocessableEntityError}
203
+ *
204
+ * @example
205
+ * await client.labTests.getById("lab_test_id")
206
+ */
207
+ getById(labTestId, requestOptions) {
208
+ var _a;
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ const _response = yield core.fetcher({
211
+ 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/${encodeURIComponent(labTestId)}`),
212
+ method: "GET",
213
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
214
+ contentType: "application/json",
215
+ requestType: "json",
216
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
217
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
218
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
219
+ });
220
+ if (_response.ok) {
221
+ return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
222
+ unrecognizedObjectKeys: "passthrough",
223
+ allowUnrecognizedUnionMembers: true,
224
+ allowUnrecognizedEnumValues: true,
225
+ breadcrumbsPrefix: ["response"],
226
+ });
227
+ }
228
+ if (_response.error.reason === "status-code") {
229
+ switch (_response.error.statusCode) {
230
+ case 422:
231
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
232
+ unrecognizedObjectKeys: "passthrough",
233
+ allowUnrecognizedUnionMembers: true,
234
+ allowUnrecognizedEnumValues: true,
235
+ breadcrumbsPrefix: ["response"],
236
+ }));
237
+ default:
238
+ throw new errors.VitalError({
239
+ statusCode: _response.error.statusCode,
240
+ body: _response.error.body,
241
+ });
242
+ }
243
+ }
244
+ switch (_response.error.reason) {
245
+ case "non-json":
246
+ throw new errors.VitalError({
247
+ statusCode: _response.error.statusCode,
248
+ body: _response.error.rawBody,
249
+ });
250
+ case "timeout":
251
+ throw new errors.VitalTimeoutError();
252
+ case "unknown":
253
+ throw new errors.VitalError({
254
+ message: _response.error.errorMessage,
255
+ });
256
+ }
257
+ });
258
+ }
259
+ /**
260
+ * @param {string} labTestId
261
+ * @param {Vital.UpdateLabTestRequest} request
262
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
263
+ *
264
+ * @throws {@link Vital.UnprocessableEntityError}
265
+ *
266
+ * @example
267
+ * await client.labTests.updateLabTest("lab_test_id")
268
+ */
269
+ updateLabTest(labTestId, request = {}, requestOptions) {
270
+ var _a;
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const _response = yield core.fetcher({
273
+ 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/${encodeURIComponent(labTestId)}`),
274
+ method: "PATCH",
275
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
276
+ contentType: "application/json",
277
+ requestType: "json",
278
+ body: serializers.UpdateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
279
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
280
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
281
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
282
+ });
283
+ if (_response.ok) {
284
+ return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
285
+ unrecognizedObjectKeys: "passthrough",
286
+ allowUnrecognizedUnionMembers: true,
287
+ allowUnrecognizedEnumValues: true,
288
+ breadcrumbsPrefix: ["response"],
289
+ });
290
+ }
291
+ if (_response.error.reason === "status-code") {
292
+ switch (_response.error.statusCode) {
293
+ case 422:
294
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
295
+ unrecognizedObjectKeys: "passthrough",
296
+ allowUnrecognizedUnionMembers: true,
297
+ allowUnrecognizedEnumValues: true,
298
+ breadcrumbsPrefix: ["response"],
299
+ }));
300
+ default:
301
+ throw new errors.VitalError({
302
+ statusCode: _response.error.statusCode,
303
+ body: _response.error.body,
304
+ });
305
+ }
306
+ }
307
+ switch (_response.error.reason) {
308
+ case "non-json":
309
+ throw new errors.VitalError({
310
+ statusCode: _response.error.statusCode,
311
+ body: _response.error.rawBody,
312
+ });
313
+ case "timeout":
314
+ throw new errors.VitalTimeoutError();
315
+ case "unknown":
316
+ throw new errors.VitalError({
317
+ message: _response.error.errorMessage,
318
+ });
319
+ }
320
+ });
321
+ }
168
322
  /**
169
323
  * GET all the markers for the given lab.
170
324
  *
@@ -204,7 +358,7 @@ class LabTests {
204
358
  const _response = yield core.fetcher({
205
359
  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"),
206
360
  method: "GET",
207
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
361
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
208
362
  contentType: "application/json",
209
363
  queryParameters: _queryParams,
210
364
  requestType: "json",
@@ -276,7 +430,7 @@ class LabTests {
276
430
  const _response = yield core.fetcher({
277
431
  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/list_order_set_markers"),
278
432
  method: "POST",
279
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
433
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
280
434
  contentType: "application/json",
281
435
  queryParameters: _queryParams,
282
436
  requestType: "json",
@@ -348,7 +502,7 @@ class LabTests {
348
502
  const _response = yield core.fetcher({
349
503
  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/${encodeURIComponent(labTestId)}/markers`),
350
504
  method: "GET",
351
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
505
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
352
506
  contentType: "application/json",
353
507
  queryParameters: _queryParams,
354
508
  requestType: "json",
@@ -413,7 +567,7 @@ class LabTests {
413
567
  const _response = yield core.fetcher({
414
568
  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/${encodeURIComponent(labId)}/markers/${encodeURIComponent(providerId)}`),
415
569
  method: "GET",
416
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
570
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
417
571
  contentType: "application/json",
418
572
  requestType: "json",
419
573
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -473,7 +627,7 @@ class LabTests {
473
627
  const _response = yield core.fetcher({
474
628
  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/labs"),
475
629
  method: "GET",
476
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
630
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
477
631
  contentType: "application/json",
478
632
  requestType: "json",
479
633
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -509,69 +663,6 @@ class LabTests {
509
663
  }
510
664
  });
511
665
  }
512
- /**
513
- * GET all the lab tests the team has access to.
514
- *
515
- * @param {string} labTestId
516
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
517
- *
518
- * @throws {@link Vital.UnprocessableEntityError}
519
- *
520
- * @example
521
- * await client.labTests.getById("lab_test_id")
522
- */
523
- getById(labTestId, requestOptions) {
524
- var _a;
525
- return __awaiter(this, void 0, void 0, function* () {
526
- const _response = yield core.fetcher({
527
- 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/${encodeURIComponent(labTestId)}`),
528
- method: "GET",
529
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
530
- contentType: "application/json",
531
- requestType: "json",
532
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
533
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
534
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
535
- });
536
- if (_response.ok) {
537
- return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
538
- unrecognizedObjectKeys: "passthrough",
539
- allowUnrecognizedUnionMembers: true,
540
- allowUnrecognizedEnumValues: true,
541
- breadcrumbsPrefix: ["response"],
542
- });
543
- }
544
- if (_response.error.reason === "status-code") {
545
- switch (_response.error.statusCode) {
546
- case 422:
547
- throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
548
- unrecognizedObjectKeys: "passthrough",
549
- allowUnrecognizedUnionMembers: true,
550
- allowUnrecognizedEnumValues: true,
551
- breadcrumbsPrefix: ["response"],
552
- }));
553
- default:
554
- throw new errors.VitalError({
555
- statusCode: _response.error.statusCode,
556
- body: _response.error.body,
557
- });
558
- }
559
- }
560
- switch (_response.error.reason) {
561
- case "non-json":
562
- throw new errors.VitalError({
563
- statusCode: _response.error.statusCode,
564
- body: _response.error.rawBody,
565
- });
566
- case "timeout":
567
- throw new errors.VitalTimeoutError();
568
- case "unknown":
569
- throw new errors.VitalError({
570
- message: _response.error.errorMessage,
571
- });
572
- }
573
- });
574
- }
575
666
  /**
576
667
  * Return the available time slots to book an appointment with a phlebotomist
577
668
  * for the given address and order.
@@ -602,7 +693,7 @@ class LabTests {
602
693
  const _response = yield core.fetcher({
603
694
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/availability"),
604
695
  method: "POST",
605
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
696
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
606
697
  contentType: "application/json",
607
698
  queryParameters: _queryParams,
608
699
  requestType: "json",
@@ -670,7 +761,7 @@ class LabTests {
670
761
  const _response = yield core.fetcher({
671
762
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/book`),
672
763
  method: "POST",
673
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
764
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
674
765
  contentType: "application/json",
675
766
  requestType: "json",
676
767
  body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -743,7 +834,7 @@ class LabTests {
743
834
  const _response = yield core.fetcher({
744
835
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/request`),
745
836
  method: "POST",
746
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
837
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
747
838
  contentType: "application/json",
748
839
  requestType: "json",
749
840
  body: serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -810,7 +901,7 @@ class LabTests {
810
901
  const _response = yield core.fetcher({
811
902
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/reschedule`),
812
903
  method: "PATCH",
813
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
904
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
814
905
  contentType: "application/json",
815
906
  requestType: "json",
816
907
  body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -877,7 +968,7 @@ class LabTests {
877
968
  const _response = yield core.fetcher({
878
969
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/cancel`),
879
970
  method: "PATCH",
880
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
971
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
881
972
  contentType: "application/json",
882
973
  requestType: "json",
883
974
  body: serializers.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -938,7 +1029,7 @@ class LabTests {
938
1029
  const _response = yield core.fetcher({
939
1030
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/cancellation-reasons"),
940
1031
  method: "GET",
941
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1032
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
942
1033
  contentType: "application/json",
943
1034
  requestType: "json",
944
1035
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -991,7 +1082,7 @@ class LabTests {
991
1082
  const _response = yield core.fetcher({
992
1083
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment`),
993
1084
  method: "GET",
994
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1085
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
995
1086
  contentType: "application/json",
996
1087
  requestType: "json",
997
1088
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1070,7 +1161,7 @@ class LabTests {
1070
1161
  const _response = yield core.fetcher({
1071
1162
  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"),
1072
1163
  method: "GET",
1073
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1164
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1074
1165
  contentType: "application/json",
1075
1166
  queryParameters: _queryParams,
1076
1167
  requestType: "json",
@@ -1142,7 +1233,7 @@ class LabTests {
1142
1233
  const _response = yield core.fetcher({
1143
1234
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/info"),
1144
1235
  method: "GET",
1145
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1236
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1146
1237
  contentType: "application/json",
1147
1238
  queryParameters: _queryParams,
1148
1239
  requestType: "json",
@@ -1210,7 +1301,7 @@ class LabTests {
1210
1301
  const _response = yield core.fetcher({
1211
1302
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/info`),
1212
1303
  method: "GET",
1213
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1304
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1214
1305
  contentType: "application/json",
1215
1306
  queryParameters: _queryParams,
1216
1307
  requestType: "json",
@@ -1267,7 +1358,7 @@ class LabTests {
1267
1358
  const _response = yield core.fetcher({
1268
1359
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/result/pdf`),
1269
1360
  method: "GET",
1270
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1361
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1271
1362
  contentType: "application/json",
1272
1363
  requestType: "json",
1273
1364
  responseType: "streaming",
@@ -1327,7 +1418,7 @@ class LabTests {
1327
1418
  const _response = yield core.fetcher({
1328
1419
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/result/metadata`),
1329
1420
  method: "GET",
1330
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1421
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1331
1422
  contentType: "application/json",
1332
1423
  requestType: "json",
1333
1424
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1390,7 +1481,7 @@ class LabTests {
1390
1481
  const _response = yield core.fetcher({
1391
1482
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/result`),
1392
1483
  method: "GET",
1393
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1484
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1394
1485
  contentType: "application/json",
1395
1486
  requestType: "json",
1396
1487
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1452,7 +1543,7 @@ class LabTests {
1452
1543
  const _response = yield core.fetcher({
1453
1544
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/labels/pdf`),
1454
1545
  method: "GET",
1455
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1546
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1456
1547
  contentType: "application/json",
1457
1548
  queryParameters: _queryParams,
1458
1549
  requestType: "json",
@@ -1532,7 +1623,7 @@ class LabTests {
1532
1623
  const _response = yield core.fetcher({
1533
1624
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/appointment/availability"),
1534
1625
  method: "POST",
1535
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1626
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1536
1627
  contentType: "application/json",
1537
1628
  queryParameters: _queryParams,
1538
1629
  requestType: "json",
@@ -1597,7 +1688,7 @@ class LabTests {
1597
1688
  const _response = yield core.fetcher({
1598
1689
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment/book`),
1599
1690
  method: "POST",
1600
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1691
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1601
1692
  contentType: "application/json",
1602
1693
  requestType: "json",
1603
1694
  body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1662,7 +1753,7 @@ class LabTests {
1662
1753
  const _response = yield core.fetcher({
1663
1754
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment/reschedule`),
1664
1755
  method: "PATCH",
1665
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1756
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1666
1757
  contentType: "application/json",
1667
1758
  requestType: "json",
1668
1759
  body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1727,7 +1818,7 @@ class LabTests {
1727
1818
  const _response = yield core.fetcher({
1728
1819
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment/cancel`),
1729
1820
  method: "PATCH",
1730
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1821
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1731
1822
  contentType: "application/json",
1732
1823
  requestType: "json",
1733
1824
  body: serializers.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.jsonOrThrow(request, {
@@ -1788,7 +1879,7 @@ class LabTests {
1788
1879
  const _response = yield core.fetcher({
1789
1880
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/appointment/cancellation-reasons"),
1790
1881
  method: "GET",
1791
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1882
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1792
1883
  contentType: "application/json",
1793
1884
  requestType: "json",
1794
1885
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1841,7 +1932,7 @@ class LabTests {
1841
1932
  const _response = yield core.fetcher({
1842
1933
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment`),
1843
1934
  method: "GET",
1844
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1935
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1845
1936
  contentType: "application/json",
1846
1937
  requestType: "json",
1847
1938
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1897,7 +1988,7 @@ class LabTests {
1897
1988
  const _response = yield core.fetcher({
1898
1989
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/requisition/pdf`),
1899
1990
  method: "GET",
1900
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1991
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1901
1992
  contentType: "application/json",
1902
1993
  requestType: "json",
1903
1994
  responseType: "streaming",
@@ -1956,7 +2047,7 @@ class LabTests {
1956
2047
  const _response = yield core.fetcher({
1957
2048
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}`),
1958
2049
  method: "GET",
1959
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2050
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1960
2051
  contentType: "application/json",
1961
2052
  requestType: "json",
1962
2053
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2036,7 +2127,7 @@ class LabTests {
2036
2127
  const _response = yield core.fetcher({
2037
2128
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
2038
2129
  method: "POST",
2039
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2130
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2040
2131
  contentType: "application/json",
2041
2132
  requestType: "json",
2042
2133
  body: serializers.CreateOrderRequestCompatible.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2100,7 +2191,7 @@ class LabTests {
2100
2191
  const _response = yield core.fetcher({
2101
2192
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/cancel`),
2102
2193
  method: "POST",
2103
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2194
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2104
2195
  contentType: "application/json",
2105
2196
  requestType: "json",
2106
2197
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2172,7 +2263,7 @@ class LabTests {
2172
2263
  const _response = yield core.fetcher({
2173
2264
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/test`),
2174
2265
  method: "POST",
2175
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2266
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2176
2267
  contentType: "application/json",
2177
2268
  queryParameters: _queryParams,
2178
2269
  requestType: "json",
@@ -2277,7 +2368,7 @@ class LabTests {
2277
2368
  const _response = yield core.fetcher({
2278
2369
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
2279
2370
  method: "GET",
2280
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.183", "User-Agent": "@tryvital/vital-node/3.1.183", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2371
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.185", "User-Agent": "@tryvital/vital-node/3.1.185", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2281
2372
  contentType: "application/json",
2282
2373
  queryParameters: _queryParams,
2283
2374
  requestType: "json",
@@ -0,0 +1,26 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface LabTestsGetRequest {
10
+ /**
11
+ * Filter on whether auto-generated lab tests created by Vital, manually created lab tests, or all lab tests should be returned.
12
+ */
13
+ generationMethod?: Vital.LabTestGenerationMethodFilter;
14
+ /**
15
+ * Filter by the slug of the lab for these lab tests.
16
+ */
17
+ labSlug?: string;
18
+ /**
19
+ * Filter by the collection method for these lab tests.
20
+ */
21
+ collectionMethod?: Vital.LabTestCollectionMethod;
22
+ /**
23
+ * Filter by the status of these lab tests.
24
+ */
25
+ status?: Vital.LabTestStatus;
26
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });