@tryvital/vital-node 3.1.380 → 3.1.382

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 (136) hide show
  1. package/Client.d.ts +12 -12
  2. package/Client.js +41 -41
  3. package/api/resources/activity/client/Client.js +2 -2
  4. package/api/resources/aggregate/client/Client.d.ts +1 -1
  5. package/api/resources/aggregate/client/Client.js +4 -4
  6. package/api/resources/aggregate/client/requests/QueryBatch.d.ts +1 -1
  7. package/api/resources/body/client/Client.js +2 -2
  8. package/api/resources/devices/client/Client.js +1 -1
  9. package/api/resources/electrocardiogram/client/Client.js +1 -1
  10. package/api/resources/index.d.ts +6 -6
  11. package/api/resources/index.js +7 -7
  12. package/api/resources/insurance/client/Client.js +3 -3
  13. package/api/resources/introspect/client/Client.js +2 -2
  14. package/api/resources/labTests/client/Client.d.ts +106 -107
  15. package/api/resources/labTests/client/Client.js +745 -746
  16. package/api/resources/labTests/client/requests/index.d.ts +6 -6
  17. package/api/resources/labTests/types/index.d.ts +2 -2
  18. package/api/resources/labTests/types/index.js +2 -2
  19. package/api/resources/link/client/Client.js +19 -19
  20. package/api/resources/meal/client/Client.js +1 -1
  21. package/api/resources/menstrualCycle/client/Client.js +1 -1
  22. package/api/resources/order/client/Client.js +1 -1
  23. package/api/resources/payor/client/Client.js +1 -1
  24. package/api/resources/profile/client/Client.js +2 -2
  25. package/api/resources/providers/client/Client.js +1 -1
  26. package/api/resources/sleep/client/Client.js +3 -3
  27. package/api/resources/sleepCycle/client/Client.js +1 -1
  28. package/api/resources/team/client/Client.js +7 -7
  29. package/api/resources/testkit/client/Client.js +2 -2
  30. package/api/resources/user/client/Client.js +18 -18
  31. package/api/resources/vitals/client/Client.js +78 -78
  32. package/api/resources/workouts/client/Client.js +3 -3
  33. package/api/types/AggregateExprArg.d.ts +1 -1
  34. package/api/types/AsleepAtValueMacroExpr.d.ts +7 -0
  35. package/api/types/AsleepAtValueMacroExpr.js +5 -0
  36. package/api/types/AwakeAtValueMacroExpr.d.ts +7 -0
  37. package/api/types/AwakeAtValueMacroExpr.js +5 -0
  38. package/api/types/QueryGroupByItem.d.ts +1 -1
  39. package/api/types/QuerySelectItem.d.ts +1 -1
  40. package/api/types/SleepColumnExprSleep.d.ts +2 -1
  41. package/api/types/SleepColumnExprSleep.js +1 -0
  42. package/api/types/index.d.ts +2 -0
  43. package/api/types/index.js +2 -0
  44. package/dist/Client.d.ts +12 -12
  45. package/dist/Client.js +41 -41
  46. package/dist/api/resources/activity/client/Client.js +2 -2
  47. package/dist/api/resources/aggregate/client/Client.d.ts +1 -1
  48. package/dist/api/resources/aggregate/client/Client.js +4 -4
  49. package/dist/api/resources/aggregate/client/requests/QueryBatch.d.ts +1 -1
  50. package/dist/api/resources/body/client/Client.js +2 -2
  51. package/dist/api/resources/devices/client/Client.js +1 -1
  52. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  53. package/dist/api/resources/index.d.ts +6 -6
  54. package/dist/api/resources/index.js +7 -7
  55. package/dist/api/resources/insurance/client/Client.js +3 -3
  56. package/dist/api/resources/introspect/client/Client.js +2 -2
  57. package/dist/api/resources/labTests/client/Client.d.ts +106 -107
  58. package/dist/api/resources/labTests/client/Client.js +745 -746
  59. package/dist/api/resources/labTests/client/requests/index.d.ts +6 -6
  60. package/dist/api/resources/labTests/types/index.d.ts +2 -2
  61. package/dist/api/resources/labTests/types/index.js +2 -2
  62. package/dist/api/resources/link/client/Client.js +19 -19
  63. package/dist/api/resources/meal/client/Client.js +1 -1
  64. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  65. package/dist/api/resources/order/client/Client.js +1 -1
  66. package/dist/api/resources/payor/client/Client.js +1 -1
  67. package/dist/api/resources/profile/client/Client.js +2 -2
  68. package/dist/api/resources/providers/client/Client.js +1 -1
  69. package/dist/api/resources/sleep/client/Client.js +3 -3
  70. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  71. package/dist/api/resources/team/client/Client.js +7 -7
  72. package/dist/api/resources/testkit/client/Client.js +2 -2
  73. package/dist/api/resources/user/client/Client.js +18 -18
  74. package/dist/api/resources/vitals/client/Client.js +78 -78
  75. package/dist/api/resources/workouts/client/Client.js +3 -3
  76. package/dist/api/types/AggregateExprArg.d.ts +1 -1
  77. package/dist/api/types/AsleepAtValueMacroExpr.d.ts +7 -0
  78. package/dist/api/types/AsleepAtValueMacroExpr.js +5 -0
  79. package/dist/api/types/AwakeAtValueMacroExpr.d.ts +7 -0
  80. package/dist/api/types/AwakeAtValueMacroExpr.js +5 -0
  81. package/dist/api/types/QueryGroupByItem.d.ts +1 -1
  82. package/dist/api/types/QuerySelectItem.d.ts +1 -1
  83. package/dist/api/types/SleepColumnExprSleep.d.ts +2 -1
  84. package/dist/api/types/SleepColumnExprSleep.js +1 -0
  85. package/dist/api/types/index.d.ts +2 -0
  86. package/dist/api/types/index.js +2 -0
  87. package/dist/serialization/resources/index.d.ts +2 -2
  88. package/dist/serialization/resources/index.js +2 -2
  89. package/dist/serialization/resources/labTests/client/index.d.ts +2 -2
  90. package/dist/serialization/resources/labTests/client/index.js +3 -3
  91. package/dist/serialization/resources/labTests/client/requests/index.d.ts +2 -2
  92. package/dist/serialization/resources/labTests/client/requests/index.js +5 -5
  93. package/dist/serialization/resources/labTests/types/index.d.ts +2 -2
  94. package/dist/serialization/resources/labTests/types/index.js +2 -2
  95. package/dist/serialization/types/AggregateExprArg.d.ts +3 -1
  96. package/dist/serialization/types/AggregateExprArg.js +4 -0
  97. package/dist/serialization/types/AsleepAtValueMacroExpr.d.ts +13 -0
  98. package/dist/serialization/types/AsleepAtValueMacroExpr.js +34 -0
  99. package/dist/serialization/types/AwakeAtValueMacroExpr.d.ts +13 -0
  100. package/dist/serialization/types/AwakeAtValueMacroExpr.js +34 -0
  101. package/dist/serialization/types/QueryGroupByItem.d.ts +3 -1
  102. package/dist/serialization/types/QueryGroupByItem.js +4 -0
  103. package/dist/serialization/types/QuerySelectItem.d.ts +3 -1
  104. package/dist/serialization/types/QuerySelectItem.js +4 -0
  105. package/dist/serialization/types/SleepColumnExprSleep.d.ts +1 -1
  106. package/dist/serialization/types/SleepColumnExprSleep.js +1 -0
  107. package/dist/serialization/types/index.d.ts +2 -0
  108. package/dist/serialization/types/index.js +2 -0
  109. package/dist/version.d.ts +1 -1
  110. package/dist/version.js +1 -1
  111. package/package.json +1 -1
  112. package/reference.md +1101 -1101
  113. package/serialization/resources/index.d.ts +2 -2
  114. package/serialization/resources/index.js +2 -2
  115. package/serialization/resources/labTests/client/index.d.ts +2 -2
  116. package/serialization/resources/labTests/client/index.js +3 -3
  117. package/serialization/resources/labTests/client/requests/index.d.ts +2 -2
  118. package/serialization/resources/labTests/client/requests/index.js +5 -5
  119. package/serialization/resources/labTests/types/index.d.ts +2 -2
  120. package/serialization/resources/labTests/types/index.js +2 -2
  121. package/serialization/types/AggregateExprArg.d.ts +3 -1
  122. package/serialization/types/AggregateExprArg.js +4 -0
  123. package/serialization/types/AsleepAtValueMacroExpr.d.ts +13 -0
  124. package/serialization/types/AsleepAtValueMacroExpr.js +34 -0
  125. package/serialization/types/AwakeAtValueMacroExpr.d.ts +13 -0
  126. package/serialization/types/AwakeAtValueMacroExpr.js +34 -0
  127. package/serialization/types/QueryGroupByItem.d.ts +3 -1
  128. package/serialization/types/QueryGroupByItem.js +4 -0
  129. package/serialization/types/QuerySelectItem.d.ts +3 -1
  130. package/serialization/types/QuerySelectItem.js +4 -0
  131. package/serialization/types/SleepColumnExprSleep.d.ts +1 -1
  132. package/serialization/types/SleepColumnExprSleep.js +1 -0
  133. package/serialization/types/index.d.ts +2 -0
  134. package/serialization/types/index.js +2 -0
  135. package/version.d.ts +1 -1
  136. package/version.js +1 -1
@@ -42,79 +42,54 @@ exports.LabTests = void 0;
42
42
  const environments = __importStar(require("../../../../environments"));
43
43
  const core = __importStar(require("../../../../core"));
44
44
  const Vital = __importStar(require("../../../index"));
45
- const url_join_1 = __importDefault(require("url-join"));
46
45
  const serializers = __importStar(require("../../../../serialization/index"));
46
+ const url_join_1 = __importDefault(require("url-join"));
47
47
  const errors = __importStar(require("../../../../errors/index"));
48
48
  class LabTests {
49
49
  constructor(_options = {}) {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * GET all the lab tests the team has access to.
53
+ * Return the available time slots to book an appointment with a phlebotomist
54
+ * for the given address and order.
54
55
  *
55
- * @param {Vital.LabTestsGetRequest} request
56
+ * @param {Vital.LabTestsGetPhlebotomyAppointmentAvailabilityRequest} request
56
57
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
57
58
  *
58
59
  * @throws {@link Vital.UnprocessableEntityError}
59
60
  *
60
61
  * @example
61
- * await client.labTests.get()
62
+ * await client.labTests.getPhlebotomyAppointmentAvailability({
63
+ * body: {
64
+ * firstLine: "first_line",
65
+ * city: "city",
66
+ * state: "state",
67
+ * zipCode: "zip_code"
68
+ * }
69
+ * })
62
70
  */
63
- get(request = {}, requestOptions) {
71
+ getPhlebotomyAppointmentAvailability(request, requestOptions) {
64
72
  var _a;
65
73
  return __awaiter(this, void 0, void 0, function* () {
66
- const { generationMethod, labSlug, collectionMethod, status, markerIds, providerIds, name, orderKey, orderDirection, } = request;
74
+ const { startDate, body: _body } = request;
67
75
  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
- }
80
- if (markerIds != null) {
81
- if (Array.isArray(markerIds)) {
82
- _queryParams["marker_ids"] = markerIds.map((item) => item.toString());
83
- }
84
- else {
85
- _queryParams["marker_ids"] = markerIds.toString();
86
- }
87
- }
88
- if (providerIds != null) {
89
- if (Array.isArray(providerIds)) {
90
- _queryParams["provider_ids"] = providerIds.map((item) => item);
91
- }
92
- else {
93
- _queryParams["provider_ids"] = providerIds;
94
- }
95
- }
96
- if (name != null) {
97
- _queryParams["name"] = name;
98
- }
99
- if (orderKey != null) {
100
- _queryParams["order_key"] = orderKey;
101
- }
102
- if (orderDirection != null) {
103
- _queryParams["order_direction"] = orderDirection;
76
+ if (startDate != null) {
77
+ _queryParams["start_date"] = startDate;
104
78
  }
105
79
  const _response = yield core.fetcher({
106
- 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"),
107
- method: "GET",
108
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
+ 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"),
81
+ method: "POST",
82
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
109
83
  contentType: "application/json",
110
84
  queryParameters: _queryParams,
111
85
  requestType: "json",
86
+ body: serializers.UsAddress.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
112
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
113
88
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
114
89
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
115
90
  });
116
91
  if (_response.ok) {
117
- return serializers.labTests.get.Response.parseOrThrow(_response.body, {
92
+ return serializers.AppointmentAvailabilitySlots.parseOrThrow(_response.body, {
118
93
  unrecognizedObjectKeys: "passthrough",
119
94
  allowUnrecognizedUnionMembers: true,
120
95
  allowUnrecognizedEnumValues: true,
@@ -153,34 +128,35 @@ class LabTests {
153
128
  });
154
129
  }
155
130
  /**
156
- * @param {Vital.CreateLabTestRequest} request
131
+ * Book an at-home phlebotomy appointment.
132
+ *
133
+ * @param {string} orderId - Your Order ID.
134
+ * @param {Vital.AppointmentBookingRequest} request
157
135
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
158
136
  *
159
137
  * @throws {@link Vital.UnprocessableEntityError}
160
138
  *
161
139
  * @example
162
- * await client.labTests.create({
163
- * name: "name",
164
- * method: "testkit",
165
- * description: "description"
140
+ * await client.labTests.bookPhlebotomyAppointment("order_id", {
141
+ * bookingKey: "booking_key"
166
142
  * })
167
143
  */
168
- create(request, requestOptions) {
144
+ bookPhlebotomyAppointment(orderId, request, requestOptions) {
169
145
  var _a;
170
146
  return __awaiter(this, void 0, void 0, function* () {
171
147
  const _response = yield core.fetcher({
172
- 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"),
148
+ 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`),
173
149
  method: "POST",
174
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
150
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
175
151
  contentType: "application/json",
176
152
  requestType: "json",
177
- body: serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
153
+ body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
178
154
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
179
155
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
180
156
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
181
157
  });
182
158
  if (_response.ok) {
183
- return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
159
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
184
160
  unrecognizedObjectKeys: "passthrough",
185
161
  allowUnrecognizedUnionMembers: true,
186
162
  allowUnrecognizedEnumValues: true,
@@ -219,31 +195,41 @@ class LabTests {
219
195
  });
220
196
  }
221
197
  /**
222
- * GET all the lab tests the team has access to.
198
+ * Request an at-home phlebotomy appointment.
223
199
  *
224
- * @param {string} labTestId
200
+ * @param {string} orderId - Your Order ID.
201
+ * @param {Vital.RequestAppointmentRequest} request
225
202
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
226
203
  *
227
204
  * @throws {@link Vital.UnprocessableEntityError}
228
205
  *
229
206
  * @example
230
- * await client.labTests.getById("lab_test_id")
207
+ * await client.labTests.requestPhlebotomyAppointment("order_id", {
208
+ * address: {
209
+ * firstLine: "first_line",
210
+ * city: "city",
211
+ * state: "state",
212
+ * zipCode: "zip_code"
213
+ * },
214
+ * provider: "getlabs"
215
+ * })
231
216
  */
232
- getById(labTestId, requestOptions) {
217
+ requestPhlebotomyAppointment(orderId, request, requestOptions) {
233
218
  var _a;
234
219
  return __awaiter(this, void 0, void 0, function* () {
235
220
  const _response = yield core.fetcher({
236
- 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)}`),
237
- method: "GET",
238
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
221
+ 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`),
222
+ method: "POST",
223
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
239
224
  contentType: "application/json",
240
225
  requestType: "json",
226
+ body: serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
241
227
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
242
228
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
243
229
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
244
230
  });
245
231
  if (_response.ok) {
246
- return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
232
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
247
233
  unrecognizedObjectKeys: "passthrough",
248
234
  allowUnrecognizedUnionMembers: true,
249
235
  allowUnrecognizedEnumValues: true,
@@ -282,31 +268,35 @@ class LabTests {
282
268
  });
283
269
  }
284
270
  /**
285
- * @param {string} labTestId
286
- * @param {Vital.UpdateLabTestRequest} request
271
+ * Reschedule a previously booked at-home phlebotomy appointment.
272
+ *
273
+ * @param {string} orderId - Your Order ID.
274
+ * @param {Vital.AppointmentRescheduleRequest} request
287
275
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
288
276
  *
289
277
  * @throws {@link Vital.UnprocessableEntityError}
290
278
  *
291
279
  * @example
292
- * await client.labTests.updateLabTest("lab_test_id")
280
+ * await client.labTests.reschedulePhlebotomyAppointment("order_id", {
281
+ * bookingKey: "booking_key"
282
+ * })
293
283
  */
294
- updateLabTest(labTestId, request = {}, requestOptions) {
284
+ reschedulePhlebotomyAppointment(orderId, request, requestOptions) {
295
285
  var _a;
296
286
  return __awaiter(this, void 0, void 0, function* () {
297
287
  const _response = yield core.fetcher({
298
- 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)}`),
288
+ 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`),
299
289
  method: "PATCH",
300
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
290
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
301
291
  contentType: "application/json",
302
292
  requestType: "json",
303
- body: serializers.UpdateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
293
+ body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
304
294
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
305
295
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
306
296
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
307
297
  });
308
298
  if (_response.ok) {
309
- return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
299
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
310
300
  unrecognizedObjectKeys: "passthrough",
311
301
  allowUnrecognizedUnionMembers: true,
312
302
  allowUnrecognizedEnumValues: true,
@@ -345,54 +335,35 @@ class LabTests {
345
335
  });
346
336
  }
347
337
  /**
348
- * GET all the markers for the given lab.
338
+ * Cancel a previously booked at-home phlebotomy appointment.
349
339
  *
350
- * @param {Vital.LabTestsGetMarkersRequest} request
340
+ * @param {string} orderId - Your Order ID.
341
+ * @param {Vital.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest} request
351
342
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
352
343
  *
353
344
  * @throws {@link Vital.UnprocessableEntityError}
354
345
  *
355
346
  * @example
356
- * await client.labTests.getMarkers()
347
+ * await client.labTests.cancelPhlebotomyAppointment("order_id", {
348
+ * cancellationReasonId: "cancellation_reason_id"
349
+ * })
357
350
  */
358
- getMarkers(request = {}, requestOptions) {
351
+ cancelPhlebotomyAppointment(orderId, request, requestOptions) {
359
352
  var _a;
360
353
  return __awaiter(this, void 0, void 0, function* () {
361
- const { labId, name, aLaCarteEnabled, page, size } = request;
362
- const _queryParams = {};
363
- if (labId != null) {
364
- if (Array.isArray(labId)) {
365
- _queryParams["lab_id"] = labId.map((item) => item.toString());
366
- }
367
- else {
368
- _queryParams["lab_id"] = labId.toString();
369
- }
370
- }
371
- if (name != null) {
372
- _queryParams["name"] = name;
373
- }
374
- if (aLaCarteEnabled != null) {
375
- _queryParams["a_la_carte_enabled"] = aLaCarteEnabled.toString();
376
- }
377
- if (page != null) {
378
- _queryParams["page"] = page.toString();
379
- }
380
- if (size != null) {
381
- _queryParams["size"] = size.toString();
382
- }
383
354
  const _response = yield core.fetcher({
384
- 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"),
385
- method: "GET",
386
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
355
+ 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`),
356
+ method: "PATCH",
357
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
387
358
  contentType: "application/json",
388
- queryParameters: _queryParams,
389
359
  requestType: "json",
360
+ body: serializers.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
390
361
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
391
362
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
392
363
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
393
364
  });
394
365
  if (_response.ok) {
395
- return serializers.GetMarkersResponse.parseOrThrow(_response.body, {
366
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
396
367
  unrecognizedObjectKeys: "passthrough",
397
368
  allowUnrecognizedUnionMembers: true,
398
369
  allowUnrecognizedEnumValues: true,
@@ -431,41 +402,28 @@ class LabTests {
431
402
  });
432
403
  }
433
404
  /**
434
- * @param {Vital.LabTestsGetMarkersForOrderSetRequest} request
435
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
405
+ * Get the list of reasons for cancelling an at-home phlebotomy appointment.
436
406
  *
437
- * @throws {@link Vital.UnprocessableEntityError}
407
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
438
408
  *
439
409
  * @example
440
- * await client.labTests.getMarkersForOrderSet({
441
- * body: {}
442
- * })
410
+ * await client.labTests.getPhlebotomyAppointmentCancellationReason()
443
411
  */
444
- getMarkersForOrderSet(request, requestOptions) {
412
+ getPhlebotomyAppointmentCancellationReason(requestOptions) {
445
413
  var _a;
446
414
  return __awaiter(this, void 0, void 0, function* () {
447
- const { page, size, body: _body } = request;
448
- const _queryParams = {};
449
- if (page != null) {
450
- _queryParams["page"] = page.toString();
451
- }
452
- if (size != null) {
453
- _queryParams["size"] = size.toString();
454
- }
455
415
  const _response = yield core.fetcher({
456
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/list_order_set_markers"),
457
- method: "POST",
458
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
416
+ 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"),
417
+ method: "GET",
418
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
459
419
  contentType: "application/json",
460
- queryParameters: _queryParams,
461
420
  requestType: "json",
462
- body: serializers.OrderSetRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
463
421
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
464
422
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
465
423
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
466
424
  });
467
425
  if (_response.ok) {
468
- return serializers.GetMarkersResponse.parseOrThrow(_response.body, {
426
+ return serializers.labTests.getPhlebotomyAppointmentCancellationReason.Response.parseOrThrow(_response.body, {
469
427
  unrecognizedObjectKeys: "passthrough",
470
428
  allowUnrecognizedUnionMembers: true,
471
429
  allowUnrecognizedEnumValues: true,
@@ -473,20 +431,10 @@ class LabTests {
473
431
  });
474
432
  }
475
433
  if (_response.error.reason === "status-code") {
476
- switch (_response.error.statusCode) {
477
- case 422:
478
- throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
479
- unrecognizedObjectKeys: "passthrough",
480
- allowUnrecognizedUnionMembers: true,
481
- allowUnrecognizedEnumValues: true,
482
- breadcrumbsPrefix: ["response"],
483
- }));
484
- default:
485
- throw new errors.VitalError({
486
- statusCode: _response.error.statusCode,
487
- body: _response.error.body,
488
- });
489
- }
434
+ throw new errors.VitalError({
435
+ statusCode: _response.error.statusCode,
436
+ body: _response.error.body,
437
+ });
490
438
  }
491
439
  switch (_response.error.reason) {
492
440
  case "non-json":
@@ -504,39 +452,31 @@ class LabTests {
504
452
  });
505
453
  }
506
454
  /**
507
- * @param {string} labTestId
508
- * @param {Vital.LabTestsGetMarkersForLabTestRequest} request
455
+ * Get the appointment associated with an order.
456
+ *
457
+ * @param {string} orderId - Your Order ID.
509
458
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
510
459
  *
511
460
  * @throws {@link Vital.UnprocessableEntityError}
512
461
  *
513
462
  * @example
514
- * await client.labTests.getMarkersForLabTest("lab_test_id")
463
+ * await client.labTests.getPhlebotomyAppointment("order_id")
515
464
  */
516
- getMarkersForLabTest(labTestId, request = {}, requestOptions) {
465
+ getPhlebotomyAppointment(orderId, requestOptions) {
517
466
  var _a;
518
467
  return __awaiter(this, void 0, void 0, function* () {
519
- const { page, size } = request;
520
- const _queryParams = {};
521
- if (page != null) {
522
- _queryParams["page"] = page.toString();
523
- }
524
- if (size != null) {
525
- _queryParams["size"] = size.toString();
526
- }
527
468
  const _response = yield core.fetcher({
528
- 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`),
469
+ 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`),
529
470
  method: "GET",
530
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
471
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
531
472
  contentType: "application/json",
532
- queryParameters: _queryParams,
533
473
  requestType: "json",
534
474
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
535
475
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
536
476
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
537
477
  });
538
478
  if (_response.ok) {
539
- return serializers.GetMarkersResponse.parseOrThrow(_response.body, {
479
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
540
480
  unrecognizedObjectKeys: "passthrough",
541
481
  allowUnrecognizedUnionMembers: true,
542
482
  allowUnrecognizedEnumValues: true,
@@ -575,32 +515,55 @@ class LabTests {
575
515
  });
576
516
  }
577
517
  /**
578
- * GET a specific marker for the given lab and provider_id
518
+ * GET information about an area with respect to lab-testing.
579
519
  *
580
- * @param {string} providerId
581
- * @param {number} labId
520
+ * Information returned:
521
+ * * Whether a given zip code is served by our Phlebotomy network.
522
+ * * List of Lab locations in the area.
523
+ *
524
+ * @param {Vital.LabTestsGetAreaInfoRequest} request
582
525
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
583
526
  *
584
527
  * @throws {@link Vital.UnprocessableEntityError}
585
528
  *
586
529
  * @example
587
- * await client.labTests.getMarkersByLabAndProviderId("provider_id", 1)
530
+ * await client.labTests.getAreaInfo({
531
+ * zipCode: "zip_code"
532
+ * })
588
533
  */
589
- getMarkersByLabAndProviderId(providerId, labId, requestOptions) {
534
+ getAreaInfo(request, requestOptions) {
590
535
  var _a;
591
536
  return __awaiter(this, void 0, void 0, function* () {
592
- const _response = yield core.fetcher({
593
- 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)}`),
594
- method: "GET",
595
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
596
- contentType: "application/json",
597
- requestType: "json",
598
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
599
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
537
+ const { zipCode, radius, lab, labs } = request;
538
+ const _queryParams = {};
539
+ _queryParams["zip_code"] = zipCode;
540
+ if (radius != null) {
541
+ _queryParams["radius"] = radius;
542
+ }
543
+ if (lab != null) {
544
+ _queryParams["lab"] = lab;
545
+ }
546
+ if (labs != null) {
547
+ if (Array.isArray(labs)) {
548
+ _queryParams["labs"] = labs.map((item) => item);
549
+ }
550
+ else {
551
+ _queryParams["labs"] = labs;
552
+ }
553
+ }
554
+ const _response = yield core.fetcher({
555
+ 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"),
556
+ method: "GET",
557
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
558
+ contentType: "application/json",
559
+ queryParameters: _queryParams,
560
+ requestType: "json",
561
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
562
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
600
563
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
601
564
  });
602
565
  if (_response.ok) {
603
- return serializers.ClientFacingMarker.parseOrThrow(_response.body, {
566
+ return serializers.AreaInfo.parseOrThrow(_response.body, {
604
567
  unrecognizedObjectKeys: "passthrough",
605
568
  allowUnrecognizedUnionMembers: true,
606
569
  allowUnrecognizedEnumValues: true,
@@ -639,28 +602,48 @@ class LabTests {
639
602
  });
640
603
  }
641
604
  /**
642
- * GET all the labs.
643
- *
605
+ * @param {Vital.LabTestsGetPscInfoRequest} request
644
606
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
645
607
  *
608
+ * @throws {@link Vital.UnprocessableEntityError}
609
+ *
646
610
  * @example
647
- * await client.labTests.getLabs()
611
+ * await client.labTests.getPscInfo({
612
+ * zipCode: "zip_code",
613
+ * labId: 1
614
+ * })
648
615
  */
649
- getLabs(requestOptions) {
616
+ getPscInfo(request, requestOptions) {
650
617
  var _a;
651
618
  return __awaiter(this, void 0, void 0, function* () {
619
+ const { zipCode, labId, radius, capabilities } = request;
620
+ const _queryParams = {};
621
+ _queryParams["zip_code"] = zipCode;
622
+ _queryParams["lab_id"] = labId.toString();
623
+ if (radius != null) {
624
+ _queryParams["radius"] = radius;
625
+ }
626
+ if (capabilities != null) {
627
+ if (Array.isArray(capabilities)) {
628
+ _queryParams["capabilities"] = capabilities.map((item) => item);
629
+ }
630
+ else {
631
+ _queryParams["capabilities"] = capabilities;
632
+ }
633
+ }
652
634
  const _response = yield core.fetcher({
653
- 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"),
635
+ 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"),
654
636
  method: "GET",
655
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
637
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
656
638
  contentType: "application/json",
639
+ queryParameters: _queryParams,
657
640
  requestType: "json",
658
641
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
659
642
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
660
643
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
661
644
  });
662
645
  if (_response.ok) {
663
- return serializers.labTests.getLabs.Response.parseOrThrow(_response.body, {
646
+ return serializers.PscInfo.parseOrThrow(_response.body, {
664
647
  unrecognizedObjectKeys: "passthrough",
665
648
  allowUnrecognizedUnionMembers: true,
666
649
  allowUnrecognizedEnumValues: true,
@@ -668,10 +651,20 @@ class LabTests {
668
651
  });
669
652
  }
670
653
  if (_response.error.reason === "status-code") {
671
- throw new errors.VitalError({
672
- statusCode: _response.error.statusCode,
673
- body: _response.error.body,
674
- });
654
+ switch (_response.error.statusCode) {
655
+ case 422:
656
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
657
+ unrecognizedObjectKeys: "passthrough",
658
+ allowUnrecognizedUnionMembers: true,
659
+ allowUnrecognizedEnumValues: true,
660
+ breadcrumbsPrefix: ["response"],
661
+ }));
662
+ default:
663
+ throw new errors.VitalError({
664
+ statusCode: _response.error.statusCode,
665
+ body: _response.error.body,
666
+ });
667
+ }
675
668
  }
676
669
  switch (_response.error.reason) {
677
670
  case "non-json":
@@ -689,46 +682,44 @@ class LabTests {
689
682
  });
690
683
  }
691
684
  /**
692
- * Return the available time slots to book an appointment with a phlebotomist
693
- * for the given address and order.
694
- *
695
- * @param {Vital.LabTestsGetPhlebotomyAppointmentAvailabilityRequest} request
685
+ * @param {string} orderId - Your Order ID.
686
+ * @param {Vital.LabTestsGetOrderPscInfoRequest} request
696
687
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
697
688
  *
698
689
  * @throws {@link Vital.UnprocessableEntityError}
699
690
  *
700
691
  * @example
701
- * await client.labTests.getPhlebotomyAppointmentAvailability({
702
- * body: {
703
- * firstLine: "first_line",
704
- * city: "city",
705
- * state: "state",
706
- * zipCode: "zip_code"
707
- * }
708
- * })
692
+ * await client.labTests.getOrderPscInfo("order_id")
709
693
  */
710
- getPhlebotomyAppointmentAvailability(request, requestOptions) {
694
+ getOrderPscInfo(orderId, request = {}, requestOptions) {
711
695
  var _a;
712
696
  return __awaiter(this, void 0, void 0, function* () {
713
- const { startDate, body: _body } = request;
697
+ const { radius, capabilities } = request;
714
698
  const _queryParams = {};
715
- if (startDate != null) {
716
- _queryParams["start_date"] = startDate;
699
+ if (radius != null) {
700
+ _queryParams["radius"] = radius;
701
+ }
702
+ if (capabilities != null) {
703
+ if (Array.isArray(capabilities)) {
704
+ _queryParams["capabilities"] = capabilities.map((item) => item);
705
+ }
706
+ else {
707
+ _queryParams["capabilities"] = capabilities;
708
+ }
717
709
  }
718
710
  const _response = yield core.fetcher({
719
- 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"),
720
- method: "POST",
721
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
711
+ 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`),
712
+ method: "GET",
713
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
722
714
  contentType: "application/json",
723
715
  queryParameters: _queryParams,
724
716
  requestType: "json",
725
- body: serializers.UsAddress.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
726
717
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
727
718
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
728
719
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
729
720
  });
730
721
  if (_response.ok) {
731
- return serializers.AppointmentAvailabilitySlots.parseOrThrow(_response.body, {
722
+ return serializers.PscInfo.parseOrThrow(_response.body, {
732
723
  unrecognizedObjectKeys: "passthrough",
733
724
  allowUnrecognizedUnionMembers: true,
734
725
  allowUnrecognizedEnumValues: true,
@@ -767,40 +758,25 @@ class LabTests {
767
758
  });
768
759
  }
769
760
  /**
770
- * Book an at-home phlebotomy appointment.
771
- *
772
- * @param {string} orderId - Your Order ID.
773
- * @param {Vital.AppointmentBookingRequest} request
774
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
775
- *
761
+ * This endpoint returns the lab results for the order.
776
762
  * @throws {@link Vital.UnprocessableEntityError}
777
- *
778
- * @example
779
- * await client.labTests.bookPhlebotomyAppointment("order_id", {
780
- * bookingKey: "booking_key"
781
- * })
782
763
  */
783
- bookPhlebotomyAppointment(orderId, request, requestOptions) {
764
+ getResultPdf(orderId, requestOptions) {
784
765
  var _a;
785
766
  return __awaiter(this, void 0, void 0, function* () {
786
767
  const _response = yield core.fetcher({
787
- 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`),
788
- method: "POST",
789
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
768
+ 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`),
769
+ method: "GET",
770
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
790
771
  contentType: "application/json",
791
772
  requestType: "json",
792
- body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
773
+ responseType: "streaming",
793
774
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
794
775
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
795
776
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
796
777
  });
797
778
  if (_response.ok) {
798
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
799
- unrecognizedObjectKeys: "passthrough",
800
- allowUnrecognizedUnionMembers: true,
801
- allowUnrecognizedEnumValues: true,
802
- breadcrumbsPrefix: ["response"],
803
- });
779
+ return _response.body;
804
780
  }
805
781
  if (_response.error.reason === "status-code") {
806
782
  switch (_response.error.statusCode) {
@@ -834,41 +810,32 @@ class LabTests {
834
810
  });
835
811
  }
836
812
  /**
837
- * Request an at-home phlebotomy appointment.
813
+ * Return metadata related to order results, such as lab metadata,
814
+ * provider and sample dates.
838
815
  *
839
- * @param {string} orderId - Your Order ID.
840
- * @param {Vital.RequestAppointmentRequest} request
816
+ * @param {string} orderId
841
817
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
842
818
  *
843
819
  * @throws {@link Vital.UnprocessableEntityError}
844
820
  *
845
821
  * @example
846
- * await client.labTests.requestPhlebotomyAppointment("order_id", {
847
- * address: {
848
- * firstLine: "first_line",
849
- * city: "city",
850
- * state: "state",
851
- * zipCode: "zip_code"
852
- * },
853
- * provider: "getlabs"
854
- * })
822
+ * await client.labTests.getResultMetadata("order_id")
855
823
  */
856
- requestPhlebotomyAppointment(orderId, request, requestOptions) {
824
+ getResultMetadata(orderId, requestOptions) {
857
825
  var _a;
858
826
  return __awaiter(this, void 0, void 0, function* () {
859
827
  const _response = yield core.fetcher({
860
- 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`),
861
- method: "POST",
862
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
828
+ 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`),
829
+ method: "GET",
830
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
863
831
  contentType: "application/json",
864
832
  requestType: "json",
865
- body: serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
866
833
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
867
834
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
868
835
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
869
836
  });
870
837
  if (_response.ok) {
871
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
838
+ return serializers.LabResultsMetadata.parseOrThrow(_response.body, {
872
839
  unrecognizedObjectKeys: "passthrough",
873
840
  allowUnrecognizedUnionMembers: true,
874
841
  allowUnrecognizedEnumValues: true,
@@ -907,35 +874,31 @@ class LabTests {
907
874
  });
908
875
  }
909
876
  /**
910
- * Reschedule a previously booked at-home phlebotomy appointment.
877
+ * Return both metadata and raw json test data
911
878
  *
912
- * @param {string} orderId - Your Order ID.
913
- * @param {Vital.AppointmentRescheduleRequest} request
879
+ * @param {string} orderId
914
880
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
915
881
  *
916
882
  * @throws {@link Vital.UnprocessableEntityError}
917
883
  *
918
884
  * @example
919
- * await client.labTests.reschedulePhlebotomyAppointment("order_id", {
920
- * bookingKey: "booking_key"
921
- * })
885
+ * await client.labTests.getResultRaw("order_id")
922
886
  */
923
- reschedulePhlebotomyAppointment(orderId, request, requestOptions) {
887
+ getResultRaw(orderId, requestOptions) {
924
888
  var _a;
925
889
  return __awaiter(this, void 0, void 0, function* () {
926
890
  const _response = yield core.fetcher({
927
- 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`),
928
- method: "PATCH",
929
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
891
+ 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`),
892
+ method: "GET",
893
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
930
894
  contentType: "application/json",
931
895
  requestType: "json",
932
- body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
933
896
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
934
897
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
935
898
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
936
899
  });
937
900
  if (_response.ok) {
938
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
901
+ return serializers.LabResultsRaw.parseOrThrow(_response.body, {
939
902
  unrecognizedObjectKeys: "passthrough",
940
903
  allowUnrecognizedUnionMembers: true,
941
904
  allowUnrecognizedEnumValues: true,
@@ -974,40 +937,32 @@ class LabTests {
974
937
  });
975
938
  }
976
939
  /**
977
- * Cancel a previously booked at-home phlebotomy appointment.
978
- *
979
- * @param {string} orderId - Your Order ID.
980
- * @param {Vital.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest} request
981
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
982
- *
940
+ * This endpoint returns the printed labels for the order.
983
941
  * @throws {@link Vital.UnprocessableEntityError}
984
- *
985
- * @example
986
- * await client.labTests.cancelPhlebotomyAppointment("order_id", {
987
- * cancellationReasonId: "cancellation_reason_id"
988
- * })
989
942
  */
990
- cancelPhlebotomyAppointment(orderId, request, requestOptions) {
943
+ getLabelsPdf(orderId, request, requestOptions) {
991
944
  var _a;
992
945
  return __awaiter(this, void 0, void 0, function* () {
946
+ const { numberOfLabels, collectionDate } = request;
947
+ const _queryParams = {};
948
+ if (numberOfLabels != null) {
949
+ _queryParams["number_of_labels"] = numberOfLabels.toString();
950
+ }
951
+ _queryParams["collection_date"] = collectionDate.toISOString();
993
952
  const _response = yield core.fetcher({
994
- 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`),
995
- method: "PATCH",
996
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
953
+ 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`),
954
+ method: "GET",
955
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
997
956
  contentType: "application/json",
957
+ queryParameters: _queryParams,
998
958
  requestType: "json",
999
- body: serializers.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
959
+ responseType: "streaming",
1000
960
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1001
961
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1002
962
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1003
963
  });
1004
964
  if (_response.ok) {
1005
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1006
- unrecognizedObjectKeys: "passthrough",
1007
- allowUnrecognizedUnionMembers: true,
1008
- allowUnrecognizedEnumValues: true,
1009
- breadcrumbsPrefix: ["response"],
1010
- });
965
+ return _response.body;
1011
966
  }
1012
967
  if (_response.error.reason === "status-code") {
1013
968
  switch (_response.error.statusCode) {
@@ -1041,28 +996,52 @@ class LabTests {
1041
996
  });
1042
997
  }
1043
998
  /**
1044
- * Get the list of reasons for cancelling an at-home phlebotomy appointment.
1045
- *
999
+ * @param {Vital.LabTestsGetPscAppointmentAvailabilityRequest} request
1046
1000
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1047
1001
  *
1002
+ * @throws {@link Vital.UnprocessableEntityError}
1003
+ *
1048
1004
  * @example
1049
- * await client.labTests.getPhlebotomyAppointmentCancellationReason()
1005
+ * await client.labTests.getPscAppointmentAvailability({
1006
+ * lab: "quest"
1007
+ * })
1050
1008
  */
1051
- getPhlebotomyAppointmentCancellationReason(requestOptions) {
1009
+ getPscAppointmentAvailability(request, requestOptions) {
1052
1010
  var _a;
1053
1011
  return __awaiter(this, void 0, void 0, function* () {
1012
+ const { lab, startDate, siteCodes, zipCode, radius } = request;
1013
+ const _queryParams = {};
1014
+ _queryParams["lab"] = lab;
1015
+ if (startDate != null) {
1016
+ _queryParams["start_date"] = startDate;
1017
+ }
1018
+ if (siteCodes != null) {
1019
+ if (Array.isArray(siteCodes)) {
1020
+ _queryParams["site_codes"] = siteCodes.map((item) => item);
1021
+ }
1022
+ else {
1023
+ _queryParams["site_codes"] = siteCodes;
1024
+ }
1025
+ }
1026
+ if (zipCode != null) {
1027
+ _queryParams["zip_code"] = zipCode;
1028
+ }
1029
+ if (radius != null) {
1030
+ _queryParams["radius"] = radius;
1031
+ }
1054
1032
  const _response = yield core.fetcher({
1055
- 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"),
1056
- method: "GET",
1057
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1033
+ 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"),
1034
+ method: "POST",
1035
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1058
1036
  contentType: "application/json",
1037
+ queryParameters: _queryParams,
1059
1038
  requestType: "json",
1060
1039
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1061
1040
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1062
1041
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1063
1042
  });
1064
1043
  if (_response.ok) {
1065
- return serializers.labTests.getPhlebotomyAppointmentCancellationReason.Response.parseOrThrow(_response.body, {
1044
+ return serializers.AppointmentAvailabilitySlots.parseOrThrow(_response.body, {
1066
1045
  unrecognizedObjectKeys: "passthrough",
1067
1046
  allowUnrecognizedUnionMembers: true,
1068
1047
  allowUnrecognizedEnumValues: true,
@@ -1070,10 +1049,20 @@ class LabTests {
1070
1049
  });
1071
1050
  }
1072
1051
  if (_response.error.reason === "status-code") {
1073
- throw new errors.VitalError({
1074
- statusCode: _response.error.statusCode,
1075
- body: _response.error.body,
1076
- });
1052
+ switch (_response.error.statusCode) {
1053
+ case 422:
1054
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1055
+ unrecognizedObjectKeys: "passthrough",
1056
+ allowUnrecognizedUnionMembers: true,
1057
+ allowUnrecognizedEnumValues: true,
1058
+ breadcrumbsPrefix: ["response"],
1059
+ }));
1060
+ default:
1061
+ throw new errors.VitalError({
1062
+ statusCode: _response.error.statusCode,
1063
+ body: _response.error.body,
1064
+ });
1065
+ }
1077
1066
  }
1078
1067
  switch (_response.error.reason) {
1079
1068
  case "non-json":
@@ -1091,25 +1080,27 @@ class LabTests {
1091
1080
  });
1092
1081
  }
1093
1082
  /**
1094
- * Get the appointment associated with an order.
1095
- *
1096
1083
  * @param {string} orderId - Your Order ID.
1084
+ * @param {Vital.AppointmentBookingRequest} request
1097
1085
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1098
1086
  *
1099
1087
  * @throws {@link Vital.UnprocessableEntityError}
1100
1088
  *
1101
1089
  * @example
1102
- * await client.labTests.getPhlebotomyAppointment("order_id")
1090
+ * await client.labTests.bookPscAppointment("order_id", {
1091
+ * bookingKey: "booking_key"
1092
+ * })
1103
1093
  */
1104
- getPhlebotomyAppointment(orderId, requestOptions) {
1094
+ bookPscAppointment(orderId, request, requestOptions) {
1105
1095
  var _a;
1106
1096
  return __awaiter(this, void 0, void 0, function* () {
1107
1097
  const _response = yield core.fetcher({
1108
- 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`),
1109
- method: "GET",
1110
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1098
+ 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`),
1099
+ method: "POST",
1100
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1111
1101
  contentType: "application/json",
1112
1102
  requestType: "json",
1103
+ body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1113
1104
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1114
1105
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1115
1106
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1154,55 +1145,33 @@ class LabTests {
1154
1145
  });
1155
1146
  }
1156
1147
  /**
1157
- * GET information about an area with respect to lab-testing.
1158
- *
1159
- * Information returned:
1160
- * * Whether a given zip code is served by our Phlebotomy network.
1161
- * * List of Lab locations in the area.
1162
- *
1163
- * @param {Vital.LabTestsGetAreaInfoRequest} request
1148
+ * @param {string} orderId - Your Order ID.
1149
+ * @param {Vital.AppointmentRescheduleRequest} request
1164
1150
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1165
1151
  *
1166
1152
  * @throws {@link Vital.UnprocessableEntityError}
1167
1153
  *
1168
1154
  * @example
1169
- * await client.labTests.getAreaInfo({
1170
- * zipCode: "zip_code"
1155
+ * await client.labTests.reschedulePscAppointment("order_id", {
1156
+ * bookingKey: "booking_key"
1171
1157
  * })
1172
1158
  */
1173
- getAreaInfo(request, requestOptions) {
1159
+ reschedulePscAppointment(orderId, request, requestOptions) {
1174
1160
  var _a;
1175
1161
  return __awaiter(this, void 0, void 0, function* () {
1176
- const { zipCode, radius, lab, labs } = request;
1177
- const _queryParams = {};
1178
- _queryParams["zip_code"] = zipCode;
1179
- if (radius != null) {
1180
- _queryParams["radius"] = radius;
1181
- }
1182
- if (lab != null) {
1183
- _queryParams["lab"] = lab;
1184
- }
1185
- if (labs != null) {
1186
- if (Array.isArray(labs)) {
1187
- _queryParams["labs"] = labs.map((item) => item);
1188
- }
1189
- else {
1190
- _queryParams["labs"] = labs;
1191
- }
1192
- }
1193
1162
  const _response = yield core.fetcher({
1194
- 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"),
1195
- method: "GET",
1196
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1163
+ 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`),
1164
+ method: "PATCH",
1165
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1197
1166
  contentType: "application/json",
1198
- queryParameters: _queryParams,
1199
1167
  requestType: "json",
1168
+ body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1200
1169
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1201
1170
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1202
1171
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1203
1172
  });
1204
1173
  if (_response.ok) {
1205
- return serializers.AreaInfo.parseOrThrow(_response.body, {
1174
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1206
1175
  unrecognizedObjectKeys: "passthrough",
1207
1176
  allowUnrecognizedUnionMembers: true,
1208
1177
  allowUnrecognizedEnumValues: true,
@@ -1241,48 +1210,35 @@ class LabTests {
1241
1210
  });
1242
1211
  }
1243
1212
  /**
1244
- * @param {Vital.LabTestsGetPscInfoRequest} request
1213
+ * @param {string} orderId - Your Order ID.
1214
+ * @param {Vital.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest} request
1245
1215
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1246
1216
  *
1247
1217
  * @throws {@link Vital.UnprocessableEntityError}
1248
1218
  *
1249
1219
  * @example
1250
- * await client.labTests.getPscInfo({
1251
- * zipCode: "zip_code",
1252
- * labId: 1
1220
+ * await client.labTests.cancelPscAppointment("order_id", {
1221
+ * cancellationReasonId: "cancellationReasonId"
1253
1222
  * })
1254
1223
  */
1255
- getPscInfo(request, requestOptions) {
1224
+ cancelPscAppointment(orderId, request, requestOptions) {
1256
1225
  var _a;
1257
1226
  return __awaiter(this, void 0, void 0, function* () {
1258
- const { zipCode, labId, radius, capabilities } = request;
1259
- const _queryParams = {};
1260
- _queryParams["zip_code"] = zipCode;
1261
- _queryParams["lab_id"] = labId.toString();
1262
- if (radius != null) {
1263
- _queryParams["radius"] = radius;
1264
- }
1265
- if (capabilities != null) {
1266
- if (Array.isArray(capabilities)) {
1267
- _queryParams["capabilities"] = capabilities.map((item) => item);
1268
- }
1269
- else {
1270
- _queryParams["capabilities"] = capabilities;
1271
- }
1272
- }
1273
1227
  const _response = yield core.fetcher({
1274
- 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"),
1275
- method: "GET",
1276
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1228
+ 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`),
1229
+ method: "PATCH",
1230
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1277
1231
  contentType: "application/json",
1278
- queryParameters: _queryParams,
1279
1232
  requestType: "json",
1233
+ body: serializers.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.jsonOrThrow(request, {
1234
+ unrecognizedObjectKeys: "strip",
1235
+ }),
1280
1236
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1281
1237
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1282
1238
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1283
1239
  });
1284
1240
  if (_response.ok) {
1285
- return serializers.PscInfo.parseOrThrow(_response.body, {
1241
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1286
1242
  unrecognizedObjectKeys: "passthrough",
1287
1243
  allowUnrecognizedUnionMembers: true,
1288
1244
  allowUnrecognizedEnumValues: true,
@@ -1321,44 +1277,26 @@ class LabTests {
1321
1277
  });
1322
1278
  }
1323
1279
  /**
1324
- * @param {string} orderId - Your Order ID.
1325
- * @param {Vital.LabTestsGetOrderPscInfoRequest} request
1326
1280
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1327
1281
  *
1328
- * @throws {@link Vital.UnprocessableEntityError}
1329
- *
1330
1282
  * @example
1331
- * await client.labTests.getOrderPscInfo("order_id")
1283
+ * await client.labTests.getPscAppointmentCancellationReason()
1332
1284
  */
1333
- getOrderPscInfo(orderId, request = {}, requestOptions) {
1285
+ getPscAppointmentCancellationReason(requestOptions) {
1334
1286
  var _a;
1335
1287
  return __awaiter(this, void 0, void 0, function* () {
1336
- const { radius, capabilities } = request;
1337
- const _queryParams = {};
1338
- if (radius != null) {
1339
- _queryParams["radius"] = radius;
1340
- }
1341
- if (capabilities != null) {
1342
- if (Array.isArray(capabilities)) {
1343
- _queryParams["capabilities"] = capabilities.map((item) => item);
1344
- }
1345
- else {
1346
- _queryParams["capabilities"] = capabilities;
1347
- }
1348
- }
1349
1288
  const _response = yield core.fetcher({
1350
- 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`),
1289
+ 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"),
1351
1290
  method: "GET",
1352
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1291
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1353
1292
  contentType: "application/json",
1354
- queryParameters: _queryParams,
1355
1293
  requestType: "json",
1356
1294
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1357
1295
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1358
1296
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1359
1297
  });
1360
1298
  if (_response.ok) {
1361
- return serializers.PscInfo.parseOrThrow(_response.body, {
1299
+ return serializers.labTests.getPscAppointmentCancellationReason.Response.parseOrThrow(_response.body, {
1362
1300
  unrecognizedObjectKeys: "passthrough",
1363
1301
  allowUnrecognizedUnionMembers: true,
1364
1302
  allowUnrecognizedEnumValues: true,
@@ -1366,20 +1304,10 @@ class LabTests {
1366
1304
  });
1367
1305
  }
1368
1306
  if (_response.error.reason === "status-code") {
1369
- switch (_response.error.statusCode) {
1370
- case 422:
1371
- throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1372
- unrecognizedObjectKeys: "passthrough",
1373
- allowUnrecognizedUnionMembers: true,
1374
- allowUnrecognizedEnumValues: true,
1375
- breadcrumbsPrefix: ["response"],
1376
- }));
1377
- default:
1378
- throw new errors.VitalError({
1379
- statusCode: _response.error.statusCode,
1380
- body: _response.error.body,
1381
- });
1382
- }
1307
+ throw new errors.VitalError({
1308
+ statusCode: _response.error.statusCode,
1309
+ body: _response.error.body,
1310
+ });
1383
1311
  }
1384
1312
  switch (_response.error.reason) {
1385
1313
  case "non-json":
@@ -1397,25 +1325,36 @@ class LabTests {
1397
1325
  });
1398
1326
  }
1399
1327
  /**
1400
- * This endpoint returns the lab results for the order.
1328
+ * Get the appointment associated with an order.
1329
+ *
1330
+ * @param {string} orderId - Your Order ID.
1331
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1332
+ *
1401
1333
  * @throws {@link Vital.UnprocessableEntityError}
1334
+ *
1335
+ * @example
1336
+ * await client.labTests.getPscAppointment("order_id")
1402
1337
  */
1403
- getResultPdf(orderId, requestOptions) {
1338
+ getPscAppointment(orderId, requestOptions) {
1404
1339
  var _a;
1405
1340
  return __awaiter(this, void 0, void 0, function* () {
1406
1341
  const _response = yield core.fetcher({
1407
- 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`),
1342
+ 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`),
1408
1343
  method: "GET",
1409
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1344
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1410
1345
  contentType: "application/json",
1411
1346
  requestType: "json",
1412
- responseType: "streaming",
1413
1347
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1414
1348
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1415
1349
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1416
1350
  });
1417
1351
  if (_response.ok) {
1418
- return _response.body;
1352
+ return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1353
+ unrecognizedObjectKeys: "passthrough",
1354
+ allowUnrecognizedUnionMembers: true,
1355
+ allowUnrecognizedEnumValues: true,
1356
+ breadcrumbsPrefix: ["response"],
1357
+ });
1419
1358
  }
1420
1359
  if (_response.error.reason === "status-code") {
1421
1360
  switch (_response.error.statusCode) {
@@ -1449,37 +1388,25 @@ class LabTests {
1449
1388
  });
1450
1389
  }
1451
1390
  /**
1452
- * Return metadata related to order results, such as lab metadata,
1453
- * provider and sample dates.
1454
- *
1455
- * @param {string} orderId
1456
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1457
- *
1391
+ * GET collection instructions for an order
1458
1392
  * @throws {@link Vital.UnprocessableEntityError}
1459
- *
1460
- * @example
1461
- * await client.labTests.getResultMetadata("order_id")
1462
1393
  */
1463
- getResultMetadata(orderId, requestOptions) {
1394
+ getOrderCollectionInstructionPdf(orderId, requestOptions) {
1464
1395
  var _a;
1465
1396
  return __awaiter(this, void 0, void 0, function* () {
1466
1397
  const _response = yield core.fetcher({
1467
- 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`),
1398
+ 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)}/collection_instruction_pdf`),
1468
1399
  method: "GET",
1469
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1400
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1470
1401
  contentType: "application/json",
1471
1402
  requestType: "json",
1403
+ responseType: "streaming",
1472
1404
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1473
1405
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1474
1406
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1475
1407
  });
1476
1408
  if (_response.ok) {
1477
- return serializers.LabResultsMetadata.parseOrThrow(_response.body, {
1478
- unrecognizedObjectKeys: "passthrough",
1479
- allowUnrecognizedUnionMembers: true,
1480
- allowUnrecognizedEnumValues: true,
1481
- breadcrumbsPrefix: ["response"],
1482
- });
1409
+ return _response.body;
1483
1410
  }
1484
1411
  if (_response.error.reason === "status-code") {
1485
1412
  switch (_response.error.statusCode) {
@@ -1513,36 +1440,25 @@ class LabTests {
1513
1440
  });
1514
1441
  }
1515
1442
  /**
1516
- * Return both metadata and raw json test data
1517
- *
1518
- * @param {string} orderId
1519
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1520
- *
1443
+ * GET requisition pdf for an order
1521
1444
  * @throws {@link Vital.UnprocessableEntityError}
1522
- *
1523
- * @example
1524
- * await client.labTests.getResultRaw("order_id")
1525
1445
  */
1526
- getResultRaw(orderId, requestOptions) {
1446
+ getOrderRequistionPdf(orderId, requestOptions) {
1527
1447
  var _a;
1528
1448
  return __awaiter(this, void 0, void 0, function* () {
1529
1449
  const _response = yield core.fetcher({
1530
- 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`),
1450
+ 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`),
1531
1451
  method: "GET",
1532
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1452
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1533
1453
  contentType: "application/json",
1534
1454
  requestType: "json",
1455
+ responseType: "streaming",
1535
1456
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1536
1457
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1537
1458
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1538
1459
  });
1539
1460
  if (_response.ok) {
1540
- return serializers.LabResultsRaw.parseOrThrow(_response.body, {
1541
- unrecognizedObjectKeys: "passthrough",
1542
- allowUnrecognizedUnionMembers: true,
1543
- allowUnrecognizedEnumValues: true,
1544
- breadcrumbsPrefix: ["response"],
1545
- });
1461
+ return _response.body;
1546
1462
  }
1547
1463
  if (_response.error.reason === "status-code") {
1548
1464
  switch (_response.error.statusCode) {
@@ -1576,24 +1492,17 @@ class LabTests {
1576
1492
  });
1577
1493
  }
1578
1494
  /**
1579
- * This endpoint returns the printed labels for the order.
1495
+ * GET ABN pdf for an order
1580
1496
  * @throws {@link Vital.UnprocessableEntityError}
1581
1497
  */
1582
- getLabelsPdf(orderId, request, requestOptions) {
1498
+ getOrderAbnPdf(orderId, requestOptions) {
1583
1499
  var _a;
1584
1500
  return __awaiter(this, void 0, void 0, function* () {
1585
- const { numberOfLabels, collectionDate } = request;
1586
- const _queryParams = {};
1587
- if (numberOfLabels != null) {
1588
- _queryParams["number_of_labels"] = numberOfLabels.toString();
1589
- }
1590
- _queryParams["collection_date"] = collectionDate.toISOString();
1591
1501
  const _response = yield core.fetcher({
1592
- 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`),
1502
+ 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)}/abn_pdf`),
1593
1503
  method: "GET",
1594
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1504
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1595
1505
  contentType: "application/json",
1596
- queryParameters: _queryParams,
1597
1506
  requestType: "json",
1598
1507
  responseType: "streaming",
1599
1508
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1635,52 +1544,31 @@ class LabTests {
1635
1544
  });
1636
1545
  }
1637
1546
  /**
1638
- * @param {Vital.LabTestsGetPscAppointmentAvailabilityRequest} request
1547
+ * GET individual order by ID.
1548
+ *
1549
+ * @param {string} orderId - Your Order ID.
1639
1550
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1640
1551
  *
1641
1552
  * @throws {@link Vital.UnprocessableEntityError}
1642
1553
  *
1643
1554
  * @example
1644
- * await client.labTests.getPscAppointmentAvailability({
1645
- * lab: "quest"
1646
- * })
1555
+ * await client.labTests.getOrder("order_id")
1647
1556
  */
1648
- getPscAppointmentAvailability(request, requestOptions) {
1557
+ getOrder(orderId, requestOptions) {
1649
1558
  var _a;
1650
1559
  return __awaiter(this, void 0, void 0, function* () {
1651
- const { lab, startDate, siteCodes, zipCode, radius } = request;
1652
- const _queryParams = {};
1653
- _queryParams["lab"] = lab;
1654
- if (startDate != null) {
1655
- _queryParams["start_date"] = startDate;
1656
- }
1657
- if (siteCodes != null) {
1658
- if (Array.isArray(siteCodes)) {
1659
- _queryParams["site_codes"] = siteCodes.map((item) => item);
1660
- }
1661
- else {
1662
- _queryParams["site_codes"] = siteCodes;
1663
- }
1664
- }
1665
- if (zipCode != null) {
1666
- _queryParams["zip_code"] = zipCode;
1667
- }
1668
- if (radius != null) {
1669
- _queryParams["radius"] = radius;
1670
- }
1671
1560
  const _response = yield core.fetcher({
1672
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/appointment/availability"),
1673
- method: "POST",
1674
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1561
+ 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)}`),
1562
+ method: "GET",
1563
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1675
1564
  contentType: "application/json",
1676
- queryParameters: _queryParams,
1677
1565
  requestType: "json",
1678
1566
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1679
1567
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1680
1568
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1681
1569
  });
1682
1570
  if (_response.ok) {
1683
- return serializers.AppointmentAvailabilitySlots.parseOrThrow(_response.body, {
1571
+ return serializers.ClientFacingOrder.parseOrThrow(_response.body, {
1684
1572
  unrecognizedObjectKeys: "passthrough",
1685
1573
  allowUnrecognizedUnionMembers: true,
1686
1574
  allowUnrecognizedEnumValues: true,
@@ -1719,33 +1607,47 @@ class LabTests {
1719
1607
  });
1720
1608
  }
1721
1609
  /**
1722
- * @param {string} orderId - Your Order ID.
1723
- * @param {Vital.AppointmentBookingRequest} request
1610
+ * @param {Vital.CreateOrderRequestCompatible} request
1724
1611
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1725
1612
  *
1726
1613
  * @throws {@link Vital.UnprocessableEntityError}
1727
1614
  *
1728
1615
  * @example
1729
- * await client.labTests.bookPscAppointment("order_id", {
1730
- * bookingKey: "booking_key"
1616
+ * await client.labTests.createOrder({
1617
+ * userId: "user_id",
1618
+ * patientDetails: {
1619
+ * firstName: "first_name",
1620
+ * lastName: "last_name",
1621
+ * dob: "dob",
1622
+ * gender: "female",
1623
+ * phoneNumber: "phone_number",
1624
+ * email: "email"
1625
+ * },
1626
+ * patientAddress: {
1627
+ * firstLine: "first_line",
1628
+ * city: "city",
1629
+ * state: "state",
1630
+ * zip: "zip",
1631
+ * country: "country"
1632
+ * }
1731
1633
  * })
1732
1634
  */
1733
- bookPscAppointment(orderId, request, requestOptions) {
1635
+ createOrder(request, requestOptions) {
1734
1636
  var _a;
1735
1637
  return __awaiter(this, void 0, void 0, function* () {
1736
1638
  const _response = yield core.fetcher({
1737
- 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`),
1639
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
1738
1640
  method: "POST",
1739
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1641
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1740
1642
  contentType: "application/json",
1741
1643
  requestType: "json",
1742
- body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1644
+ body: serializers.CreateOrderRequestCompatible.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1743
1645
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1744
1646
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1745
1647
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1746
1648
  });
1747
1649
  if (_response.ok) {
1748
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1650
+ return serializers.PostOrderResponse.parseOrThrow(_response.body, {
1749
1651
  unrecognizedObjectKeys: "passthrough",
1750
1652
  allowUnrecognizedUnionMembers: true,
1751
1653
  allowUnrecognizedEnumValues: true,
@@ -1784,33 +1686,52 @@ class LabTests {
1784
1686
  });
1785
1687
  }
1786
1688
  /**
1787
- * @param {string} orderId - Your Order ID.
1788
- * @param {Vital.AppointmentRescheduleRequest} request
1689
+ * @param {Vital.ImportOrderBody} request
1789
1690
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1790
1691
  *
1791
1692
  * @throws {@link Vital.UnprocessableEntityError}
1792
1693
  *
1793
1694
  * @example
1794
- * await client.labTests.reschedulePscAppointment("order_id", {
1795
- * bookingKey: "booking_key"
1695
+ * await client.labTests.importOrder({
1696
+ * userId: "user_id",
1697
+ * billingType: "client_bill",
1698
+ * orderSet: {},
1699
+ * collectionMethod: "testkit",
1700
+ * patientDetails: {
1701
+ * firstName: "first_name",
1702
+ * lastName: "last_name",
1703
+ * dob: "dob",
1704
+ * gender: "female",
1705
+ * phoneNumber: "phone_number",
1706
+ * email: "email"
1707
+ * },
1708
+ * patientAddress: {
1709
+ * receiverName: "receiver_name",
1710
+ * firstLine: "first_line",
1711
+ * city: "city",
1712
+ * state: "state",
1713
+ * zip: "zip",
1714
+ * country: "country"
1715
+ * },
1716
+ * sampleId: "sample_id"
1796
1717
  * })
1797
1718
  */
1798
- reschedulePscAppointment(orderId, request, requestOptions) {
1719
+ importOrder(request, requestOptions) {
1799
1720
  var _a;
1800
1721
  return __awaiter(this, void 0, void 0, function* () {
1801
1722
  const _response = yield core.fetcher({
1802
- 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`),
1803
- method: "PATCH",
1804
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1723
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/import"),
1724
+ method: "POST",
1725
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1805
1726
  contentType: "application/json",
1806
1727
  requestType: "json",
1807
- body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1728
+ body: serializers.ImportOrderBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1808
1729
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1809
1730
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1810
1731
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1811
1732
  });
1812
1733
  if (_response.ok) {
1813
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1734
+ return serializers.PostOrderResponse.parseOrThrow(_response.body, {
1814
1735
  unrecognizedObjectKeys: "passthrough",
1815
1736
  allowUnrecognizedUnionMembers: true,
1816
1737
  allowUnrecognizedEnumValues: true,
@@ -1849,35 +1770,31 @@ class LabTests {
1849
1770
  });
1850
1771
  }
1851
1772
  /**
1773
+ * POST cancel order
1774
+ *
1852
1775
  * @param {string} orderId - Your Order ID.
1853
- * @param {Vital.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest} request
1854
1776
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1855
1777
  *
1856
1778
  * @throws {@link Vital.UnprocessableEntityError}
1857
1779
  *
1858
1780
  * @example
1859
- * await client.labTests.cancelPscAppointment("order_id", {
1860
- * cancellationReasonId: "cancellationReasonId"
1861
- * })
1781
+ * await client.labTests.cancelOrder("order_id")
1862
1782
  */
1863
- cancelPscAppointment(orderId, request, requestOptions) {
1783
+ cancelOrder(orderId, requestOptions) {
1864
1784
  var _a;
1865
1785
  return __awaiter(this, void 0, void 0, function* () {
1866
1786
  const _response = yield core.fetcher({
1867
- 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`),
1868
- method: "PATCH",
1869
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1787
+ 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`),
1788
+ method: "POST",
1789
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1870
1790
  contentType: "application/json",
1871
1791
  requestType: "json",
1872
- body: serializers.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.jsonOrThrow(request, {
1873
- unrecognizedObjectKeys: "strip",
1874
- }),
1875
1792
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1876
1793
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1877
1794
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1878
1795
  });
1879
1796
  if (_response.ok) {
1880
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1797
+ return serializers.PostOrderResponse.parseOrThrow(_response.body, {
1881
1798
  unrecognizedObjectKeys: "passthrough",
1882
1799
  allowUnrecognizedUnionMembers: true,
1883
1800
  allowUnrecognizedEnumValues: true,
@@ -1916,37 +1833,64 @@ class LabTests {
1916
1833
  });
1917
1834
  }
1918
1835
  /**
1836
+ * Get available test kits.
1837
+ *
1838
+ * @param {string} orderId
1839
+ * @param {Vital.LabTestsSimulateOrderProcessRequest} request
1919
1840
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1920
1841
  *
1842
+ * @throws {@link Vital.UnprocessableEntityError}
1843
+ *
1921
1844
  * @example
1922
- * await client.labTests.getPscAppointmentCancellationReason()
1845
+ * await client.labTests.simulateOrderProcess("order_id", {
1846
+ * body: undefined
1847
+ * })
1923
1848
  */
1924
- getPscAppointmentCancellationReason(requestOptions) {
1849
+ simulateOrderProcess(orderId, request = {}, requestOptions) {
1925
1850
  var _a;
1926
1851
  return __awaiter(this, void 0, void 0, function* () {
1852
+ const { finalStatus, delay, body: _body } = request;
1853
+ const _queryParams = {};
1854
+ if (finalStatus != null) {
1855
+ _queryParams["final_status"] = finalStatus;
1856
+ }
1857
+ if (delay != null) {
1858
+ _queryParams["delay"] = delay.toString();
1859
+ }
1927
1860
  const _response = yield core.fetcher({
1928
- 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"),
1929
- method: "GET",
1930
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1861
+ 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`),
1862
+ method: "POST",
1863
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1931
1864
  contentType: "application/json",
1865
+ queryParameters: _queryParams,
1932
1866
  requestType: "json",
1867
+ body: _body != null
1868
+ ? serializers.labTests.simulateOrderProcess.Request.jsonOrThrow(_body, {
1869
+ unrecognizedObjectKeys: "strip",
1870
+ })
1871
+ : undefined,
1933
1872
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1934
1873
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1935
1874
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1936
1875
  });
1937
1876
  if (_response.ok) {
1938
- return serializers.labTests.getPscAppointmentCancellationReason.Response.parseOrThrow(_response.body, {
1939
- unrecognizedObjectKeys: "passthrough",
1940
- allowUnrecognizedUnionMembers: true,
1941
- allowUnrecognizedEnumValues: true,
1942
- breadcrumbsPrefix: ["response"],
1943
- });
1877
+ return _response.body;
1944
1878
  }
1945
1879
  if (_response.error.reason === "status-code") {
1946
- throw new errors.VitalError({
1947
- statusCode: _response.error.statusCode,
1948
- body: _response.error.body,
1949
- });
1880
+ switch (_response.error.statusCode) {
1881
+ case 422:
1882
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1883
+ unrecognizedObjectKeys: "passthrough",
1884
+ allowUnrecognizedUnionMembers: true,
1885
+ allowUnrecognizedEnumValues: true,
1886
+ breadcrumbsPrefix: ["response"],
1887
+ }));
1888
+ default:
1889
+ throw new errors.VitalError({
1890
+ statusCode: _response.error.statusCode,
1891
+ body: _response.error.body,
1892
+ });
1893
+ }
1950
1894
  }
1951
1895
  switch (_response.error.reason) {
1952
1896
  case "non-json":
@@ -1964,7 +1908,7 @@ class LabTests {
1964
1908
  });
1965
1909
  }
1966
1910
  /**
1967
- * Get the appointment associated with an order.
1911
+ * PATCH update on site collection order when draw is completed
1968
1912
  *
1969
1913
  * @param {string} orderId - Your Order ID.
1970
1914
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
@@ -1972,15 +1916,15 @@ class LabTests {
1972
1916
  * @throws {@link Vital.UnprocessableEntityError}
1973
1917
  *
1974
1918
  * @example
1975
- * await client.labTests.getPscAppointment("order_id")
1919
+ * await client.labTests.updateOnSiteCollectionOrderDrawCompleted("order_id")
1976
1920
  */
1977
- getPscAppointment(orderId, requestOptions) {
1921
+ updateOnSiteCollectionOrderDrawCompleted(orderId, requestOptions) {
1978
1922
  var _a;
1979
1923
  return __awaiter(this, void 0, void 0, function* () {
1980
1924
  const _response = yield core.fetcher({
1981
- 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`),
1982
- method: "GET",
1983
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1925
+ 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)}/draw_completed`),
1926
+ method: "PATCH",
1927
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1984
1928
  contentType: "application/json",
1985
1929
  requestType: "json",
1986
1930
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1988,7 +1932,7 @@ class LabTests {
1988
1932
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1989
1933
  });
1990
1934
  if (_response.ok) {
1991
- return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
1935
+ return serializers.PostOrderResponse.parseOrThrow(_response.body, {
1992
1936
  unrecognizedObjectKeys: "passthrough",
1993
1937
  allowUnrecognizedUnionMembers: true,
1994
1938
  allowUnrecognizedEnumValues: true,
@@ -2027,27 +1971,115 @@ class LabTests {
2027
1971
  });
2028
1972
  }
2029
1973
  /**
2030
- * GET collection instructions for an order
1974
+ * GET many orders with filters.
1975
+ *
1976
+ * @param {Vital.LabTestsGetOrdersRequest} request
1977
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
1978
+ *
2031
1979
  * @throws {@link Vital.UnprocessableEntityError}
1980
+ *
1981
+ * @example
1982
+ * await client.labTests.getOrders()
2032
1983
  */
2033
- getOrderCollectionInstructionPdf(orderId, requestOptions) {
1984
+ getOrders(request = {}, requestOptions) {
2034
1985
  var _a;
2035
1986
  return __awaiter(this, void 0, void 0, function* () {
1987
+ const { searchInput, startDate, endDate, updatedStartDate, updatedEndDate, status, orderKey, orderDirection, orderType, isCritical, interpretation, orderActivationTypes, userId, patientName, shippingRecipientName, orderIds, page, size, } = request;
1988
+ const _queryParams = {};
1989
+ if (searchInput != null) {
1990
+ _queryParams["search_input"] = searchInput;
1991
+ }
1992
+ if (startDate != null) {
1993
+ _queryParams["start_date"] = startDate.toISOString();
1994
+ }
1995
+ if (endDate != null) {
1996
+ _queryParams["end_date"] = endDate.toISOString();
1997
+ }
1998
+ if (updatedStartDate != null) {
1999
+ _queryParams["updated_start_date"] = updatedStartDate.toISOString();
2000
+ }
2001
+ if (updatedEndDate != null) {
2002
+ _queryParams["updated_end_date"] = updatedEndDate.toISOString();
2003
+ }
2004
+ if (status != null) {
2005
+ if (Array.isArray(status)) {
2006
+ _queryParams["status"] = status.map((item) => item);
2007
+ }
2008
+ else {
2009
+ _queryParams["status"] = status;
2010
+ }
2011
+ }
2012
+ if (orderKey != null) {
2013
+ _queryParams["order_key"] = orderKey;
2014
+ }
2015
+ if (orderDirection != null) {
2016
+ _queryParams["order_direction"] = orderDirection;
2017
+ }
2018
+ if (orderType != null) {
2019
+ if (Array.isArray(orderType)) {
2020
+ _queryParams["order_type"] = orderType.map((item) => item);
2021
+ }
2022
+ else {
2023
+ _queryParams["order_type"] = orderType;
2024
+ }
2025
+ }
2026
+ if (isCritical != null) {
2027
+ _queryParams["is_critical"] = isCritical.toString();
2028
+ }
2029
+ if (interpretation != null) {
2030
+ _queryParams["interpretation"] = interpretation;
2031
+ }
2032
+ if (orderActivationTypes != null) {
2033
+ if (Array.isArray(orderActivationTypes)) {
2034
+ _queryParams["order_activation_types"] = orderActivationTypes.map((item) => item);
2035
+ }
2036
+ else {
2037
+ _queryParams["order_activation_types"] = orderActivationTypes;
2038
+ }
2039
+ }
2040
+ if (userId != null) {
2041
+ _queryParams["user_id"] = userId;
2042
+ }
2043
+ if (patientName != null) {
2044
+ _queryParams["patient_name"] = patientName;
2045
+ }
2046
+ if (shippingRecipientName != null) {
2047
+ _queryParams["shipping_recipient_name"] = shippingRecipientName;
2048
+ }
2049
+ if (orderIds != null) {
2050
+ if (Array.isArray(orderIds)) {
2051
+ _queryParams["order_ids"] = orderIds.map((item) => item);
2052
+ }
2053
+ else {
2054
+ _queryParams["order_ids"] = orderIds;
2055
+ }
2056
+ }
2057
+ if (page != null) {
2058
+ _queryParams["page"] = page.toString();
2059
+ }
2060
+ if (size != null) {
2061
+ _queryParams["size"] = size.toString();
2062
+ }
2036
2063
  const _response = yield core.fetcher({
2037
- 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)}/collection_instruction_pdf`),
2064
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
2038
2065
  method: "GET",
2039
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2066
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2040
2067
  contentType: "application/json",
2068
+ queryParameters: _queryParams,
2041
2069
  requestType: "json",
2042
- responseType: "streaming",
2043
2070
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2044
2071
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2045
2072
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2046
2073
  });
2047
2074
  if (_response.ok) {
2048
- return _response.body;
2049
- }
2050
- if (_response.error.reason === "status-code") {
2075
+ return serializers.GetOrdersResponse.parseOrThrow(_response.body, {
2076
+ unrecognizedObjectKeys: "passthrough",
2077
+ allowUnrecognizedUnionMembers: true,
2078
+ allowUnrecognizedEnumValues: true,
2079
+ breadcrumbsPrefix: ["response"],
2080
+ });
2081
+ }
2082
+ if (_response.error.reason === "status-code") {
2051
2083
  switch (_response.error.statusCode) {
2052
2084
  case 422:
2053
2085
  throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
@@ -2079,25 +2111,76 @@ class LabTests {
2079
2111
  });
2080
2112
  }
2081
2113
  /**
2082
- * GET requisition pdf for an order
2114
+ * GET all the lab tests the team has access to.
2115
+ *
2116
+ * @param {Vital.LabTestsGetRequest} request
2117
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2118
+ *
2083
2119
  * @throws {@link Vital.UnprocessableEntityError}
2120
+ *
2121
+ * @example
2122
+ * await client.labTests.get()
2084
2123
  */
2085
- getOrderRequistionPdf(orderId, requestOptions) {
2124
+ get(request = {}, requestOptions) {
2086
2125
  var _a;
2087
2126
  return __awaiter(this, void 0, void 0, function* () {
2127
+ const { generationMethod, labSlug, collectionMethod, status, markerIds, providerIds, name, orderKey, orderDirection, } = request;
2128
+ const _queryParams = {};
2129
+ if (generationMethod != null) {
2130
+ _queryParams["generation_method"] = generationMethod;
2131
+ }
2132
+ if (labSlug != null) {
2133
+ _queryParams["lab_slug"] = labSlug;
2134
+ }
2135
+ if (collectionMethod != null) {
2136
+ _queryParams["collection_method"] = collectionMethod;
2137
+ }
2138
+ if (status != null) {
2139
+ _queryParams["status"] = status;
2140
+ }
2141
+ if (markerIds != null) {
2142
+ if (Array.isArray(markerIds)) {
2143
+ _queryParams["marker_ids"] = markerIds.map((item) => item.toString());
2144
+ }
2145
+ else {
2146
+ _queryParams["marker_ids"] = markerIds.toString();
2147
+ }
2148
+ }
2149
+ if (providerIds != null) {
2150
+ if (Array.isArray(providerIds)) {
2151
+ _queryParams["provider_ids"] = providerIds.map((item) => item);
2152
+ }
2153
+ else {
2154
+ _queryParams["provider_ids"] = providerIds;
2155
+ }
2156
+ }
2157
+ if (name != null) {
2158
+ _queryParams["name"] = name;
2159
+ }
2160
+ if (orderKey != null) {
2161
+ _queryParams["order_key"] = orderKey;
2162
+ }
2163
+ if (orderDirection != null) {
2164
+ _queryParams["order_direction"] = orderDirection;
2165
+ }
2088
2166
  const _response = yield core.fetcher({
2089
- 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`),
2167
+ 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"),
2090
2168
  method: "GET",
2091
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2169
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2092
2170
  contentType: "application/json",
2171
+ queryParameters: _queryParams,
2093
2172
  requestType: "json",
2094
- responseType: "streaming",
2095
2173
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2096
2174
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2097
2175
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2098
2176
  });
2099
2177
  if (_response.ok) {
2100
- return _response.body;
2178
+ return serializers.labTests.get.Response.parseOrThrow(_response.body, {
2179
+ unrecognizedObjectKeys: "passthrough",
2180
+ allowUnrecognizedUnionMembers: true,
2181
+ allowUnrecognizedEnumValues: true,
2182
+ breadcrumbsPrefix: ["response"],
2183
+ });
2101
2184
  }
2102
2185
  if (_response.error.reason === "status-code") {
2103
2186
  switch (_response.error.statusCode) {
@@ -2131,25 +2214,39 @@ class LabTests {
2131
2214
  });
2132
2215
  }
2133
2216
  /**
2134
- * GET ABN pdf for an order
2217
+ * @param {Vital.CreateLabTestRequest} request
2218
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2219
+ *
2135
2220
  * @throws {@link Vital.UnprocessableEntityError}
2221
+ *
2222
+ * @example
2223
+ * await client.labTests.create({
2224
+ * name: "name",
2225
+ * method: "testkit",
2226
+ * description: "description"
2227
+ * })
2136
2228
  */
2137
- getOrderAbnPdf(orderId, requestOptions) {
2229
+ create(request, requestOptions) {
2138
2230
  var _a;
2139
2231
  return __awaiter(this, void 0, void 0, function* () {
2140
2232
  const _response = yield core.fetcher({
2141
- 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)}/abn_pdf`),
2142
- method: "GET",
2143
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2233
+ 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"),
2234
+ method: "POST",
2235
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2144
2236
  contentType: "application/json",
2145
2237
  requestType: "json",
2146
- responseType: "streaming",
2238
+ body: serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2147
2239
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2148
2240
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2149
2241
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2150
2242
  });
2151
2243
  if (_response.ok) {
2152
- return _response.body;
2244
+ return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
2245
+ unrecognizedObjectKeys: "passthrough",
2246
+ allowUnrecognizedUnionMembers: true,
2247
+ allowUnrecognizedEnumValues: true,
2248
+ breadcrumbsPrefix: ["response"],
2249
+ });
2153
2250
  }
2154
2251
  if (_response.error.reason === "status-code") {
2155
2252
  switch (_response.error.statusCode) {
@@ -2183,23 +2280,23 @@ class LabTests {
2183
2280
  });
2184
2281
  }
2185
2282
  /**
2186
- * GET individual order by ID.
2283
+ * GET all the lab tests the team has access to.
2187
2284
  *
2188
- * @param {string} orderId - Your Order ID.
2285
+ * @param {string} labTestId
2189
2286
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2190
2287
  *
2191
2288
  * @throws {@link Vital.UnprocessableEntityError}
2192
2289
  *
2193
2290
  * @example
2194
- * await client.labTests.getOrder("order_id")
2291
+ * await client.labTests.getById("lab_test_id")
2195
2292
  */
2196
- getOrder(orderId, requestOptions) {
2293
+ getById(labTestId, requestOptions) {
2197
2294
  var _a;
2198
2295
  return __awaiter(this, void 0, void 0, function* () {
2199
2296
  const _response = yield core.fetcher({
2200
- 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)}`),
2297
+ 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)}`),
2201
2298
  method: "GET",
2202
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2299
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2203
2300
  contentType: "application/json",
2204
2301
  requestType: "json",
2205
2302
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2207,7 +2304,7 @@ class LabTests {
2207
2304
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2208
2305
  });
2209
2306
  if (_response.ok) {
2210
- return serializers.ClientFacingOrder.parseOrThrow(_response.body, {
2307
+ return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
2211
2308
  unrecognizedObjectKeys: "passthrough",
2212
2309
  allowUnrecognizedUnionMembers: true,
2213
2310
  allowUnrecognizedEnumValues: true,
@@ -2246,47 +2343,31 @@ class LabTests {
2246
2343
  });
2247
2344
  }
2248
2345
  /**
2249
- * @param {Vital.CreateOrderRequestCompatible} request
2346
+ * @param {string} labTestId
2347
+ * @param {Vital.UpdateLabTestRequest} request
2250
2348
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2251
2349
  *
2252
2350
  * @throws {@link Vital.UnprocessableEntityError}
2253
2351
  *
2254
2352
  * @example
2255
- * await client.labTests.createOrder({
2256
- * userId: "user_id",
2257
- * patientDetails: {
2258
- * firstName: "first_name",
2259
- * lastName: "last_name",
2260
- * dob: "dob",
2261
- * gender: "female",
2262
- * phoneNumber: "phone_number",
2263
- * email: "email"
2264
- * },
2265
- * patientAddress: {
2266
- * firstLine: "first_line",
2267
- * city: "city",
2268
- * state: "state",
2269
- * zip: "zip",
2270
- * country: "country"
2271
- * }
2272
- * })
2353
+ * await client.labTests.updateLabTest("lab_test_id")
2273
2354
  */
2274
- createOrder(request, requestOptions) {
2355
+ updateLabTest(labTestId, request = {}, requestOptions) {
2275
2356
  var _a;
2276
2357
  return __awaiter(this, void 0, void 0, function* () {
2277
2358
  const _response = yield core.fetcher({
2278
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
2279
- method: "POST",
2280
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2359
+ 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)}`),
2360
+ method: "PATCH",
2361
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2281
2362
  contentType: "application/json",
2282
2363
  requestType: "json",
2283
- body: serializers.CreateOrderRequestCompatible.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2364
+ body: serializers.UpdateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2284
2365
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2285
2366
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2286
2367
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2287
2368
  });
2288
2369
  if (_response.ok) {
2289
- return serializers.PostOrderResponse.parseOrThrow(_response.body, {
2370
+ return serializers.ClientFacingLabTest.parseOrThrow(_response.body, {
2290
2371
  unrecognizedObjectKeys: "passthrough",
2291
2372
  allowUnrecognizedUnionMembers: true,
2292
2373
  allowUnrecognizedEnumValues: true,
@@ -2325,52 +2406,54 @@ class LabTests {
2325
2406
  });
2326
2407
  }
2327
2408
  /**
2328
- * @param {Vital.ImportOrderBody} request
2409
+ * GET all the markers for the given lab.
2410
+ *
2411
+ * @param {Vital.LabTestsGetMarkersRequest} request
2329
2412
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2330
2413
  *
2331
2414
  * @throws {@link Vital.UnprocessableEntityError}
2332
2415
  *
2333
2416
  * @example
2334
- * await client.labTests.importOrder({
2335
- * userId: "user_id",
2336
- * billingType: "client_bill",
2337
- * orderSet: {},
2338
- * collectionMethod: "testkit",
2339
- * patientDetails: {
2340
- * firstName: "first_name",
2341
- * lastName: "last_name",
2342
- * dob: "dob",
2343
- * gender: "female",
2344
- * phoneNumber: "phone_number",
2345
- * email: "email"
2346
- * },
2347
- * patientAddress: {
2348
- * receiverName: "receiver_name",
2349
- * firstLine: "first_line",
2350
- * city: "city",
2351
- * state: "state",
2352
- * zip: "zip",
2353
- * country: "country"
2354
- * },
2355
- * sampleId: "sample_id"
2356
- * })
2417
+ * await client.labTests.getMarkers()
2357
2418
  */
2358
- importOrder(request, requestOptions) {
2419
+ getMarkers(request = {}, requestOptions) {
2359
2420
  var _a;
2360
2421
  return __awaiter(this, void 0, void 0, function* () {
2422
+ const { labId, name, aLaCarteEnabled, page, size } = request;
2423
+ const _queryParams = {};
2424
+ if (labId != null) {
2425
+ if (Array.isArray(labId)) {
2426
+ _queryParams["lab_id"] = labId.map((item) => item.toString());
2427
+ }
2428
+ else {
2429
+ _queryParams["lab_id"] = labId.toString();
2430
+ }
2431
+ }
2432
+ if (name != null) {
2433
+ _queryParams["name"] = name;
2434
+ }
2435
+ if (aLaCarteEnabled != null) {
2436
+ _queryParams["a_la_carte_enabled"] = aLaCarteEnabled.toString();
2437
+ }
2438
+ if (page != null) {
2439
+ _queryParams["page"] = page.toString();
2440
+ }
2441
+ if (size != null) {
2442
+ _queryParams["size"] = size.toString();
2443
+ }
2361
2444
  const _response = yield core.fetcher({
2362
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/import"),
2363
- method: "POST",
2364
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2445
+ 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"),
2446
+ method: "GET",
2447
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2365
2448
  contentType: "application/json",
2449
+ queryParameters: _queryParams,
2366
2450
  requestType: "json",
2367
- body: serializers.ImportOrderBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2368
2451
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2369
2452
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2370
2453
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2371
2454
  });
2372
2455
  if (_response.ok) {
2373
- return serializers.PostOrderResponse.parseOrThrow(_response.body, {
2456
+ return serializers.GetMarkersResponse.parseOrThrow(_response.body, {
2374
2457
  unrecognizedObjectKeys: "passthrough",
2375
2458
  allowUnrecognizedUnionMembers: true,
2376
2459
  allowUnrecognizedEnumValues: true,
@@ -2409,31 +2492,41 @@ class LabTests {
2409
2492
  });
2410
2493
  }
2411
2494
  /**
2412
- * POST cancel order
2413
- *
2414
- * @param {string} orderId - Your Order ID.
2495
+ * @param {Vital.LabTestsGetMarkersForOrderSetRequest} request
2415
2496
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2416
2497
  *
2417
2498
  * @throws {@link Vital.UnprocessableEntityError}
2418
2499
  *
2419
2500
  * @example
2420
- * await client.labTests.cancelOrder("order_id")
2501
+ * await client.labTests.getMarkersForOrderSet({
2502
+ * body: {}
2503
+ * })
2421
2504
  */
2422
- cancelOrder(orderId, requestOptions) {
2505
+ getMarkersForOrderSet(request, requestOptions) {
2423
2506
  var _a;
2424
2507
  return __awaiter(this, void 0, void 0, function* () {
2508
+ const { page, size, body: _body } = request;
2509
+ const _queryParams = {};
2510
+ if (page != null) {
2511
+ _queryParams["page"] = page.toString();
2512
+ }
2513
+ if (size != null) {
2514
+ _queryParams["size"] = size.toString();
2515
+ }
2425
2516
  const _response = yield core.fetcher({
2426
- 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`),
2517
+ 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"),
2427
2518
  method: "POST",
2428
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2519
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2429
2520
  contentType: "application/json",
2521
+ queryParameters: _queryParams,
2430
2522
  requestType: "json",
2523
+ body: serializers.OrderSetRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
2431
2524
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2432
2525
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2433
2526
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2434
2527
  });
2435
2528
  if (_response.ok) {
2436
- return serializers.PostOrderResponse.parseOrThrow(_response.body, {
2529
+ return serializers.GetMarkersResponse.parseOrThrow(_response.body, {
2437
2530
  unrecognizedObjectKeys: "passthrough",
2438
2531
  allowUnrecognizedUnionMembers: true,
2439
2532
  allowUnrecognizedEnumValues: true,
@@ -2472,48 +2565,44 @@ class LabTests {
2472
2565
  });
2473
2566
  }
2474
2567
  /**
2475
- * Get available test kits.
2476
- *
2477
- * @param {string} orderId
2478
- * @param {Vital.LabTestsSimulateOrderProcessRequest} request
2568
+ * @param {string} labTestId
2569
+ * @param {Vital.LabTestsGetMarkersForLabTestRequest} request
2479
2570
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2480
2571
  *
2481
2572
  * @throws {@link Vital.UnprocessableEntityError}
2482
2573
  *
2483
2574
  * @example
2484
- * await client.labTests.simulateOrderProcess("order_id", {
2485
- * body: undefined
2486
- * })
2575
+ * await client.labTests.getMarkersForLabTest("lab_test_id")
2487
2576
  */
2488
- simulateOrderProcess(orderId, request = {}, requestOptions) {
2577
+ getMarkersForLabTest(labTestId, request = {}, requestOptions) {
2489
2578
  var _a;
2490
2579
  return __awaiter(this, void 0, void 0, function* () {
2491
- const { finalStatus, delay, body: _body } = request;
2580
+ const { page, size } = request;
2492
2581
  const _queryParams = {};
2493
- if (finalStatus != null) {
2494
- _queryParams["final_status"] = finalStatus;
2582
+ if (page != null) {
2583
+ _queryParams["page"] = page.toString();
2495
2584
  }
2496
- if (delay != null) {
2497
- _queryParams["delay"] = delay.toString();
2585
+ if (size != null) {
2586
+ _queryParams["size"] = size.toString();
2498
2587
  }
2499
2588
  const _response = yield core.fetcher({
2500
- 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`),
2501
- method: "POST",
2502
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2589
+ 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`),
2590
+ method: "GET",
2591
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2503
2592
  contentType: "application/json",
2504
2593
  queryParameters: _queryParams,
2505
2594
  requestType: "json",
2506
- body: _body != null
2507
- ? serializers.labTests.simulateOrderProcess.Request.jsonOrThrow(_body, {
2508
- unrecognizedObjectKeys: "strip",
2509
- })
2510
- : undefined,
2511
2595
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2512
2596
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2513
2597
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2514
2598
  });
2515
2599
  if (_response.ok) {
2516
- return _response.body;
2600
+ return serializers.GetMarkersResponse.parseOrThrow(_response.body, {
2601
+ unrecognizedObjectKeys: "passthrough",
2602
+ allowUnrecognizedUnionMembers: true,
2603
+ allowUnrecognizedEnumValues: true,
2604
+ breadcrumbsPrefix: ["response"],
2605
+ });
2517
2606
  }
2518
2607
  if (_response.error.reason === "status-code") {
2519
2608
  switch (_response.error.statusCode) {
@@ -2547,23 +2636,24 @@ class LabTests {
2547
2636
  });
2548
2637
  }
2549
2638
  /**
2550
- * PATCH update on site collection order when draw is completed
2639
+ * GET a specific marker for the given lab and provider_id
2551
2640
  *
2552
- * @param {string} orderId - Your Order ID.
2641
+ * @param {string} providerId
2642
+ * @param {number} labId
2553
2643
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2554
2644
  *
2555
2645
  * @throws {@link Vital.UnprocessableEntityError}
2556
2646
  *
2557
2647
  * @example
2558
- * await client.labTests.updateOnSiteCollectionOrderDrawCompleted("order_id")
2648
+ * await client.labTests.getMarkersByLabAndProviderId("provider_id", 1)
2559
2649
  */
2560
- updateOnSiteCollectionOrderDrawCompleted(orderId, requestOptions) {
2650
+ getMarkersByLabAndProviderId(providerId, labId, requestOptions) {
2561
2651
  var _a;
2562
2652
  return __awaiter(this, void 0, void 0, function* () {
2563
2653
  const _response = yield core.fetcher({
2564
- 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)}/draw_completed`),
2565
- method: "PATCH",
2566
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2654
+ 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)}`),
2655
+ method: "GET",
2656
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2567
2657
  contentType: "application/json",
2568
2658
  requestType: "json",
2569
2659
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2571,7 +2661,7 @@ class LabTests {
2571
2661
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2572
2662
  });
2573
2663
  if (_response.ok) {
2574
- return serializers.PostOrderResponse.parseOrThrow(_response.body, {
2664
+ return serializers.ClientFacingMarker.parseOrThrow(_response.body, {
2575
2665
  unrecognizedObjectKeys: "passthrough",
2576
2666
  allowUnrecognizedUnionMembers: true,
2577
2667
  allowUnrecognizedEnumValues: true,
@@ -2610,108 +2700,28 @@ class LabTests {
2610
2700
  });
2611
2701
  }
2612
2702
  /**
2613
- * GET many orders with filters.
2703
+ * GET all the labs.
2614
2704
  *
2615
- * @param {Vital.LabTestsGetOrdersRequest} request
2616
2705
  * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2617
2706
  *
2618
- * @throws {@link Vital.UnprocessableEntityError}
2619
- *
2620
2707
  * @example
2621
- * await client.labTests.getOrders()
2708
+ * await client.labTests.getLabs()
2622
2709
  */
2623
- getOrders(request = {}, requestOptions) {
2710
+ getLabs(requestOptions) {
2624
2711
  var _a;
2625
2712
  return __awaiter(this, void 0, void 0, function* () {
2626
- const { searchInput, startDate, endDate, updatedStartDate, updatedEndDate, status, orderKey, orderDirection, orderType, isCritical, interpretation, orderActivationTypes, userId, patientName, shippingRecipientName, orderIds, page, size, } = request;
2627
- const _queryParams = {};
2628
- if (searchInput != null) {
2629
- _queryParams["search_input"] = searchInput;
2630
- }
2631
- if (startDate != null) {
2632
- _queryParams["start_date"] = startDate.toISOString();
2633
- }
2634
- if (endDate != null) {
2635
- _queryParams["end_date"] = endDate.toISOString();
2636
- }
2637
- if (updatedStartDate != null) {
2638
- _queryParams["updated_start_date"] = updatedStartDate.toISOString();
2639
- }
2640
- if (updatedEndDate != null) {
2641
- _queryParams["updated_end_date"] = updatedEndDate.toISOString();
2642
- }
2643
- if (status != null) {
2644
- if (Array.isArray(status)) {
2645
- _queryParams["status"] = status.map((item) => item);
2646
- }
2647
- else {
2648
- _queryParams["status"] = status;
2649
- }
2650
- }
2651
- if (orderKey != null) {
2652
- _queryParams["order_key"] = orderKey;
2653
- }
2654
- if (orderDirection != null) {
2655
- _queryParams["order_direction"] = orderDirection;
2656
- }
2657
- if (orderType != null) {
2658
- if (Array.isArray(orderType)) {
2659
- _queryParams["order_type"] = orderType.map((item) => item);
2660
- }
2661
- else {
2662
- _queryParams["order_type"] = orderType;
2663
- }
2664
- }
2665
- if (isCritical != null) {
2666
- _queryParams["is_critical"] = isCritical.toString();
2667
- }
2668
- if (interpretation != null) {
2669
- _queryParams["interpretation"] = interpretation;
2670
- }
2671
- if (orderActivationTypes != null) {
2672
- if (Array.isArray(orderActivationTypes)) {
2673
- _queryParams["order_activation_types"] = orderActivationTypes.map((item) => item);
2674
- }
2675
- else {
2676
- _queryParams["order_activation_types"] = orderActivationTypes;
2677
- }
2678
- }
2679
- if (userId != null) {
2680
- _queryParams["user_id"] = userId;
2681
- }
2682
- if (patientName != null) {
2683
- _queryParams["patient_name"] = patientName;
2684
- }
2685
- if (shippingRecipientName != null) {
2686
- _queryParams["shipping_recipient_name"] = shippingRecipientName;
2687
- }
2688
- if (orderIds != null) {
2689
- if (Array.isArray(orderIds)) {
2690
- _queryParams["order_ids"] = orderIds.map((item) => item);
2691
- }
2692
- else {
2693
- _queryParams["order_ids"] = orderIds;
2694
- }
2695
- }
2696
- if (page != null) {
2697
- _queryParams["page"] = page.toString();
2698
- }
2699
- if (size != null) {
2700
- _queryParams["size"] = size.toString();
2701
- }
2702
2713
  const _response = yield core.fetcher({
2703
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
2714
+ 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"),
2704
2715
  method: "GET",
2705
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2716
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2706
2717
  contentType: "application/json",
2707
- queryParameters: _queryParams,
2708
2718
  requestType: "json",
2709
2719
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2710
2720
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2711
2721
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2712
2722
  });
2713
2723
  if (_response.ok) {
2714
- return serializers.GetOrdersResponse.parseOrThrow(_response.body, {
2724
+ return serializers.labTests.getLabs.Response.parseOrThrow(_response.body, {
2715
2725
  unrecognizedObjectKeys: "passthrough",
2716
2726
  allowUnrecognizedUnionMembers: true,
2717
2727
  allowUnrecognizedEnumValues: true,
@@ -2719,20 +2729,10 @@ class LabTests {
2719
2729
  });
2720
2730
  }
2721
2731
  if (_response.error.reason === "status-code") {
2722
- switch (_response.error.statusCode) {
2723
- case 422:
2724
- throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
2725
- unrecognizedObjectKeys: "passthrough",
2726
- allowUnrecognizedUnionMembers: true,
2727
- allowUnrecognizedEnumValues: true,
2728
- breadcrumbsPrefix: ["response"],
2729
- }));
2730
- default:
2731
- throw new errors.VitalError({
2732
- statusCode: _response.error.statusCode,
2733
- body: _response.error.body,
2734
- });
2735
- }
2732
+ throw new errors.VitalError({
2733
+ statusCode: _response.error.statusCode,
2734
+ body: _response.error.body,
2735
+ });
2736
2736
  }
2737
2737
  switch (_response.error.reason) {
2738
2738
  case "non-json":
@@ -2811,7 +2811,7 @@ class LabTests {
2811
2811
  const _response = yield core.fetcher({
2812
2812
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_test"),
2813
2813
  method: "GET",
2814
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2814
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2815
2815
  contentType: "application/json",
2816
2816
  queryParameters: _queryParams,
2817
2817
  requestType: "json",
@@ -2859,7 +2859,6 @@ class LabTests {
2859
2859
  });
2860
2860
  }
2861
2861
  /**
2862
- * GET collection instructions for a lab test
2863
2862
  * @throws {@link Vital.UnprocessableEntityError}
2864
2863
  */
2865
2864
  getLabTestCollectionInstructionPdf(labTestId, requestOptions) {
@@ -2868,7 +2867,7 @@ class LabTests {
2868
2867
  const _response = yield core.fetcher({
2869
2868
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_test/${encodeURIComponent(labTestId)}/collection_instruction_pdf`),
2870
2869
  method: "GET",
2871
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.380", "User-Agent": "@tryvital/vital-node/3.1.380", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2870
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.382", "User-Agent": "@tryvital/vital-node/3.1.382", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2872
2871
  contentType: "application/json",
2873
2872
  requestType: "json",
2874
2873
  responseType: "streaming",