@tryvital/vital-node 3.1.391 → 3.1.392

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 (74) hide show
  1. package/Client.d.ts +12 -12
  2. package/Client.js +40 -40
  3. package/api/resources/activity/client/Client.js +2 -2
  4. package/api/resources/aggregate/client/Client.js +3 -3
  5. package/api/resources/body/client/Client.js +2 -2
  6. package/api/resources/devices/client/Client.js +1 -1
  7. package/api/resources/electrocardiogram/client/Client.js +1 -1
  8. package/api/resources/index.d.ts +8 -8
  9. package/api/resources/index.js +9 -9
  10. package/api/resources/insurance/client/Client.js +3 -3
  11. package/api/resources/introspect/client/Client.js +2 -2
  12. package/api/resources/labTests/client/Client.d.ts +12 -12
  13. package/api/resources/labTests/client/Client.js +181 -181
  14. package/api/resources/labTests/client/requests/index.d.ts +1 -1
  15. package/api/resources/labTests/types/index.d.ts +2 -2
  16. package/api/resources/labTests/types/index.js +2 -2
  17. package/api/resources/link/client/Client.js +19 -19
  18. package/api/resources/meal/client/Client.js +1 -1
  19. package/api/resources/menstrualCycle/client/Client.js +1 -1
  20. package/api/resources/order/client/Client.js +1 -1
  21. package/api/resources/payor/client/Client.js +1 -1
  22. package/api/resources/profile/client/Client.js +2 -2
  23. package/api/resources/providers/client/Client.js +1 -1
  24. package/api/resources/sleep/client/Client.js +3 -3
  25. package/api/resources/sleepCycle/client/Client.js +1 -1
  26. package/api/resources/team/client/Client.js +7 -7
  27. package/api/resources/testkit/client/Client.js +2 -2
  28. package/api/resources/user/client/Client.js +18 -18
  29. package/api/resources/vitals/client/Client.js +78 -78
  30. package/api/resources/workouts/client/Client.js +3 -3
  31. package/dist/Client.d.ts +12 -12
  32. package/dist/Client.js +40 -40
  33. package/dist/api/resources/activity/client/Client.js +2 -2
  34. package/dist/api/resources/aggregate/client/Client.js +3 -3
  35. package/dist/api/resources/body/client/Client.js +2 -2
  36. package/dist/api/resources/devices/client/Client.js +1 -1
  37. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  38. package/dist/api/resources/index.d.ts +8 -8
  39. package/dist/api/resources/index.js +9 -9
  40. package/dist/api/resources/insurance/client/Client.js +3 -3
  41. package/dist/api/resources/introspect/client/Client.js +2 -2
  42. package/dist/api/resources/labTests/client/Client.d.ts +12 -12
  43. package/dist/api/resources/labTests/client/Client.js +181 -181
  44. package/dist/api/resources/labTests/client/requests/index.d.ts +1 -1
  45. package/dist/api/resources/labTests/types/index.d.ts +2 -2
  46. package/dist/api/resources/labTests/types/index.js +2 -2
  47. package/dist/api/resources/link/client/Client.js +19 -19
  48. package/dist/api/resources/meal/client/Client.js +1 -1
  49. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  50. package/dist/api/resources/order/client/Client.js +1 -1
  51. package/dist/api/resources/payor/client/Client.js +1 -1
  52. package/dist/api/resources/profile/client/Client.js +2 -2
  53. package/dist/api/resources/providers/client/Client.js +1 -1
  54. package/dist/api/resources/sleep/client/Client.js +3 -3
  55. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  56. package/dist/api/resources/team/client/Client.js +7 -7
  57. package/dist/api/resources/testkit/client/Client.js +2 -2
  58. package/dist/api/resources/user/client/Client.js +18 -18
  59. package/dist/api/resources/vitals/client/Client.js +78 -78
  60. package/dist/api/resources/workouts/client/Client.js +3 -3
  61. package/dist/serialization/resources/index.d.ts +4 -4
  62. package/dist/serialization/resources/index.js +5 -5
  63. package/dist/serialization/resources/labTests/types/index.d.ts +2 -2
  64. package/dist/serialization/resources/labTests/types/index.js +2 -2
  65. package/dist/version.d.ts +1 -1
  66. package/dist/version.js +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +1524 -1524
  69. package/serialization/resources/index.d.ts +4 -4
  70. package/serialization/resources/index.js +5 -5
  71. package/serialization/resources/labTests/types/index.d.ts +2 -2
  72. package/serialization/resources/labTests/types/index.js +2 -2
  73. package/version.d.ts +1 -1
  74. package/version.js +1 -1
@@ -53,13 +53,153 @@ exports.LabTests = void 0;
53
53
  const environments = __importStar(require("../../../../environments"));
54
54
  const core = __importStar(require("../../../../core"));
55
55
  const Vital = __importStar(require("../../../index"));
56
- const serializers = __importStar(require("../../../../serialization/index"));
57
56
  const url_join_1 = __importDefault(require("url-join"));
57
+ const serializers = __importStar(require("../../../../serialization/index"));
58
58
  const errors = __importStar(require("../../../../errors/index"));
59
59
  class LabTests {
60
60
  constructor(_options = {}) {
61
61
  this._options = _options;
62
62
  }
63
+ /**
64
+ * GET many orders with filters.
65
+ *
66
+ * @param {Vital.LabTestsGetOrdersRequest} request
67
+ * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Vital.UnprocessableEntityError}
70
+ *
71
+ * @example
72
+ * await client.labTests.getOrders()
73
+ */
74
+ getOrders(request = {}, requestOptions) {
75
+ var _a;
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const { searchInput, startDate, endDate, updatedStartDate, updatedEndDate, status, orderKey, orderDirection, orderType, isCritical, interpretation, orderActivationTypes, userId, patientName, shippingRecipientName, orderIds, page, size, } = request;
78
+ const _queryParams = {};
79
+ if (searchInput != null) {
80
+ _queryParams["search_input"] = searchInput;
81
+ }
82
+ if (startDate != null) {
83
+ _queryParams["start_date"] = startDate.toISOString();
84
+ }
85
+ if (endDate != null) {
86
+ _queryParams["end_date"] = endDate.toISOString();
87
+ }
88
+ if (updatedStartDate != null) {
89
+ _queryParams["updated_start_date"] = updatedStartDate.toISOString();
90
+ }
91
+ if (updatedEndDate != null) {
92
+ _queryParams["updated_end_date"] = updatedEndDate.toISOString();
93
+ }
94
+ if (status != null) {
95
+ if (Array.isArray(status)) {
96
+ _queryParams["status"] = status.map((item) => item);
97
+ }
98
+ else {
99
+ _queryParams["status"] = status;
100
+ }
101
+ }
102
+ if (orderKey != null) {
103
+ _queryParams["order_key"] = orderKey;
104
+ }
105
+ if (orderDirection != null) {
106
+ _queryParams["order_direction"] = orderDirection;
107
+ }
108
+ if (orderType != null) {
109
+ if (Array.isArray(orderType)) {
110
+ _queryParams["order_type"] = orderType.map((item) => item);
111
+ }
112
+ else {
113
+ _queryParams["order_type"] = orderType;
114
+ }
115
+ }
116
+ if (isCritical != null) {
117
+ _queryParams["is_critical"] = isCritical.toString();
118
+ }
119
+ if (interpretation != null) {
120
+ _queryParams["interpretation"] = interpretation;
121
+ }
122
+ if (orderActivationTypes != null) {
123
+ if (Array.isArray(orderActivationTypes)) {
124
+ _queryParams["order_activation_types"] = orderActivationTypes.map((item) => item);
125
+ }
126
+ else {
127
+ _queryParams["order_activation_types"] = orderActivationTypes;
128
+ }
129
+ }
130
+ if (userId != null) {
131
+ _queryParams["user_id"] = userId;
132
+ }
133
+ if (patientName != null) {
134
+ _queryParams["patient_name"] = patientName;
135
+ }
136
+ if (shippingRecipientName != null) {
137
+ _queryParams["shipping_recipient_name"] = shippingRecipientName;
138
+ }
139
+ if (orderIds != null) {
140
+ if (Array.isArray(orderIds)) {
141
+ _queryParams["order_ids"] = orderIds.map((item) => item);
142
+ }
143
+ else {
144
+ _queryParams["order_ids"] = orderIds;
145
+ }
146
+ }
147
+ if (page != null) {
148
+ _queryParams["page"] = page.toString();
149
+ }
150
+ if (size != null) {
151
+ _queryParams["size"] = size.toString();
152
+ }
153
+ const _response = yield core.fetcher({
154
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
155
+ method: "GET",
156
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ contentType: "application/json",
158
+ queryParameters: _queryParams,
159
+ requestType: "json",
160
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
161
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
162
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
163
+ });
164
+ if (_response.ok) {
165
+ return serializers.GetOrdersResponse.parseOrThrow(_response.body, {
166
+ unrecognizedObjectKeys: "passthrough",
167
+ allowUnrecognizedUnionMembers: true,
168
+ allowUnrecognizedEnumValues: true,
169
+ breadcrumbsPrefix: ["response"],
170
+ });
171
+ }
172
+ if (_response.error.reason === "status-code") {
173
+ switch (_response.error.statusCode) {
174
+ case 422:
175
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
176
+ unrecognizedObjectKeys: "passthrough",
177
+ allowUnrecognizedUnionMembers: true,
178
+ allowUnrecognizedEnumValues: true,
179
+ breadcrumbsPrefix: ["response"],
180
+ }));
181
+ default:
182
+ throw new errors.VitalError({
183
+ statusCode: _response.error.statusCode,
184
+ body: _response.error.body,
185
+ });
186
+ }
187
+ }
188
+ switch (_response.error.reason) {
189
+ case "non-json":
190
+ throw new errors.VitalError({
191
+ statusCode: _response.error.statusCode,
192
+ body: _response.error.rawBody,
193
+ });
194
+ case "timeout":
195
+ throw new errors.VitalTimeoutError();
196
+ case "unknown":
197
+ throw new errors.VitalError({
198
+ message: _response.error.errorMessage,
199
+ });
200
+ }
201
+ });
202
+ }
63
203
  /**
64
204
  * Return the available time slots to book an appointment with a phlebotomist
65
205
  * for the given address and order.
@@ -90,7 +230,7 @@ class LabTests {
90
230
  const _response = yield core.fetcher({
91
231
  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"),
92
232
  method: "POST",
93
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
233
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
94
234
  contentType: "application/json",
95
235
  queryParameters: _queryParams,
96
236
  requestType: "json",
@@ -158,7 +298,7 @@ class LabTests {
158
298
  const _response = yield core.fetcher({
159
299
  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`),
160
300
  method: "POST",
161
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
301
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
162
302
  contentType: "application/json",
163
303
  requestType: "json",
164
304
  body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -231,7 +371,7 @@ class LabTests {
231
371
  const _response = yield core.fetcher({
232
372
  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`),
233
373
  method: "POST",
234
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
374
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
235
375
  contentType: "application/json",
236
376
  requestType: "json",
237
377
  body: serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -298,7 +438,7 @@ class LabTests {
298
438
  const _response = yield core.fetcher({
299
439
  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`),
300
440
  method: "PATCH",
301
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
441
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
302
442
  contentType: "application/json",
303
443
  requestType: "json",
304
444
  body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -365,7 +505,7 @@ class LabTests {
365
505
  const _response = yield core.fetcher({
366
506
  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`),
367
507
  method: "PATCH",
368
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
508
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
369
509
  contentType: "application/json",
370
510
  requestType: "json",
371
511
  body: serializers.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -426,7 +566,7 @@ class LabTests {
426
566
  const _response = yield core.fetcher({
427
567
  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"),
428
568
  method: "GET",
429
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
569
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
430
570
  contentType: "application/json",
431
571
  requestType: "json",
432
572
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -479,7 +619,7 @@ class LabTests {
479
619
  const _response = yield core.fetcher({
480
620
  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`),
481
621
  method: "GET",
482
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
622
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
483
623
  contentType: "application/json",
484
624
  requestType: "json",
485
625
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -565,7 +705,7 @@ class LabTests {
565
705
  const _response = yield core.fetcher({
566
706
  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"),
567
707
  method: "GET",
568
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
708
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
569
709
  contentType: "application/json",
570
710
  queryParameters: _queryParams,
571
711
  requestType: "json",
@@ -645,7 +785,7 @@ class LabTests {
645
785
  const _response = yield core.fetcher({
646
786
  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"),
647
787
  method: "GET",
648
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
788
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
649
789
  contentType: "application/json",
650
790
  queryParameters: _queryParams,
651
791
  requestType: "json",
@@ -721,7 +861,7 @@ class LabTests {
721
861
  const _response = yield core.fetcher({
722
862
  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`),
723
863
  method: "GET",
724
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
864
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
725
865
  contentType: "application/json",
726
866
  queryParameters: _queryParams,
727
867
  requestType: "json",
@@ -778,7 +918,7 @@ class LabTests {
778
918
  const _response = yield core.fetcher({
779
919
  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`),
780
920
  method: "GET",
781
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
921
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
782
922
  contentType: "application/json",
783
923
  requestType: "json",
784
924
  responseType: "streaming",
@@ -838,7 +978,7 @@ class LabTests {
838
978
  const _response = yield core.fetcher({
839
979
  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`),
840
980
  method: "GET",
841
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
981
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
842
982
  contentType: "application/json",
843
983
  requestType: "json",
844
984
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -901,7 +1041,7 @@ class LabTests {
901
1041
  const _response = yield core.fetcher({
902
1042
  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`),
903
1043
  method: "GET",
904
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1044
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
905
1045
  contentType: "application/json",
906
1046
  requestType: "json",
907
1047
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -963,7 +1103,7 @@ class LabTests {
963
1103
  const _response = yield core.fetcher({
964
1104
  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`),
965
1105
  method: "GET",
966
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1106
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
967
1107
  contentType: "application/json",
968
1108
  queryParameters: _queryParams,
969
1109
  requestType: "json",
@@ -1043,7 +1183,7 @@ class LabTests {
1043
1183
  const _response = yield core.fetcher({
1044
1184
  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"),
1045
1185
  method: "POST",
1046
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1186
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1047
1187
  contentType: "application/json",
1048
1188
  queryParameters: _queryParams,
1049
1189
  requestType: "json",
@@ -1108,7 +1248,7 @@ class LabTests {
1108
1248
  const _response = yield core.fetcher({
1109
1249
  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`),
1110
1250
  method: "POST",
1111
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1251
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1112
1252
  contentType: "application/json",
1113
1253
  requestType: "json",
1114
1254
  body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1173,7 +1313,7 @@ class LabTests {
1173
1313
  const _response = yield core.fetcher({
1174
1314
  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`),
1175
1315
  method: "PATCH",
1176
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1316
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1177
1317
  contentType: "application/json",
1178
1318
  requestType: "json",
1179
1319
  body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1238,7 +1378,7 @@ class LabTests {
1238
1378
  const _response = yield core.fetcher({
1239
1379
  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`),
1240
1380
  method: "PATCH",
1241
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1381
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1242
1382
  contentType: "application/json",
1243
1383
  requestType: "json",
1244
1384
  body: serializers.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.jsonOrThrow(request, {
@@ -1299,7 +1439,7 @@ class LabTests {
1299
1439
  const _response = yield core.fetcher({
1300
1440
  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"),
1301
1441
  method: "GET",
1302
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1442
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1303
1443
  contentType: "application/json",
1304
1444
  requestType: "json",
1305
1445
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1352,7 +1492,7 @@ class LabTests {
1352
1492
  const _response = yield core.fetcher({
1353
1493
  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`),
1354
1494
  method: "GET",
1355
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1495
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1356
1496
  contentType: "application/json",
1357
1497
  requestType: "json",
1358
1498
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1408,7 +1548,7 @@ class LabTests {
1408
1548
  const _response = yield core.fetcher({
1409
1549
  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`),
1410
1550
  method: "GET",
1411
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1551
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1412
1552
  contentType: "application/json",
1413
1553
  requestType: "json",
1414
1554
  responseType: "streaming",
@@ -1460,7 +1600,7 @@ class LabTests {
1460
1600
  const _response = yield core.fetcher({
1461
1601
  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`),
1462
1602
  method: "GET",
1463
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1603
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1464
1604
  contentType: "application/json",
1465
1605
  requestType: "json",
1466
1606
  responseType: "streaming",
@@ -1512,7 +1652,7 @@ class LabTests {
1512
1652
  const _response = yield core.fetcher({
1513
1653
  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`),
1514
1654
  method: "GET",
1515
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1655
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1516
1656
  contentType: "application/json",
1517
1657
  requestType: "json",
1518
1658
  responseType: "streaming",
@@ -1571,7 +1711,7 @@ class LabTests {
1571
1711
  const _response = yield core.fetcher({
1572
1712
  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)}`),
1573
1713
  method: "GET",
1574
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1714
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1575
1715
  contentType: "application/json",
1576
1716
  requestType: "json",
1577
1717
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1650,7 +1790,7 @@ class LabTests {
1650
1790
  const _response = yield core.fetcher({
1651
1791
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
1652
1792
  method: "POST",
1653
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())),
1793
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())),
1654
1794
  contentType: "application/json",
1655
1795
  requestType: "json",
1656
1796
  body: serializers.CreateOrderRequestCompatible.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1734,7 +1874,7 @@ class LabTests {
1734
1874
  const _response = yield core.fetcher({
1735
1875
  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"),
1736
1876
  method: "POST",
1737
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1877
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1738
1878
  contentType: "application/json",
1739
1879
  requestType: "json",
1740
1880
  body: serializers.ImportOrderBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1798,7 +1938,7 @@ class LabTests {
1798
1938
  const _response = yield core.fetcher({
1799
1939
  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`),
1800
1940
  method: "POST",
1801
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1941
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1802
1942
  contentType: "application/json",
1803
1943
  requestType: "json",
1804
1944
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1872,7 +2012,7 @@ class LabTests {
1872
2012
  const _response = yield core.fetcher({
1873
2013
  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`),
1874
2014
  method: "POST",
1875
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2015
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1876
2016
  contentType: "application/json",
1877
2017
  queryParameters: _queryParams,
1878
2018
  requestType: "json",
@@ -1936,7 +2076,7 @@ class LabTests {
1936
2076
  const _response = yield core.fetcher({
1937
2077
  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`),
1938
2078
  method: "PATCH",
1939
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2079
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1940
2080
  contentType: "application/json",
1941
2081
  requestType: "json",
1942
2082
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2038,7 +2178,7 @@ class LabTests {
2038
2178
  const _response = yield core.fetcher({
2039
2179
  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"),
2040
2180
  method: "GET",
2041
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2181
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2042
2182
  contentType: "application/json",
2043
2183
  queryParameters: _queryParams,
2044
2184
  requestType: "json",
@@ -2104,7 +2244,7 @@ class LabTests {
2104
2244
  const _response = yield core.fetcher({
2105
2245
  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"),
2106
2246
  method: "POST",
2107
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2247
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2108
2248
  contentType: "application/json",
2109
2249
  requestType: "json",
2110
2250
  body: serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2168,7 +2308,7 @@ class LabTests {
2168
2308
  const _response = yield core.fetcher({
2169
2309
  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)}`),
2170
2310
  method: "GET",
2171
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2311
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2172
2312
  contentType: "application/json",
2173
2313
  requestType: "json",
2174
2314
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2230,7 +2370,7 @@ class LabTests {
2230
2370
  const _response = yield core.fetcher({
2231
2371
  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)}`),
2232
2372
  method: "PATCH",
2233
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2373
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2234
2374
  contentType: "application/json",
2235
2375
  requestType: "json",
2236
2376
  body: serializers.UpdateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2316,7 +2456,7 @@ class LabTests {
2316
2456
  const _response = yield core.fetcher({
2317
2457
  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"),
2318
2458
  method: "GET",
2319
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2459
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2320
2460
  contentType: "application/json",
2321
2461
  queryParameters: _queryParams,
2322
2462
  requestType: "json",
@@ -2388,7 +2528,7 @@ class LabTests {
2388
2528
  const _response = yield core.fetcher({
2389
2529
  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"),
2390
2530
  method: "POST",
2391
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2531
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2392
2532
  contentType: "application/json",
2393
2533
  queryParameters: _queryParams,
2394
2534
  requestType: "json",
@@ -2460,7 +2600,7 @@ class LabTests {
2460
2600
  const _response = yield core.fetcher({
2461
2601
  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`),
2462
2602
  method: "GET",
2463
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2603
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2464
2604
  contentType: "application/json",
2465
2605
  queryParameters: _queryParams,
2466
2606
  requestType: "json",
@@ -2525,7 +2665,7 @@ class LabTests {
2525
2665
  const _response = yield core.fetcher({
2526
2666
  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)}`),
2527
2667
  method: "GET",
2528
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2668
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2529
2669
  contentType: "application/json",
2530
2670
  requestType: "json",
2531
2671
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2585,7 +2725,7 @@ class LabTests {
2585
2725
  const _response = yield core.fetcher({
2586
2726
  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"),
2587
2727
  method: "GET",
2588
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2728
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2589
2729
  contentType: "application/json",
2590
2730
  requestType: "json",
2591
2731
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2683,7 +2823,7 @@ class LabTests {
2683
2823
  const _response = yield core.fetcher({
2684
2824
  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"),
2685
2825
  method: "GET",
2686
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2826
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2687
2827
  contentType: "application/json",
2688
2828
  queryParameters: _queryParams,
2689
2829
  requestType: "json",
@@ -2739,7 +2879,7 @@ class LabTests {
2739
2879
  const _response = yield core.fetcher({
2740
2880
  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`),
2741
2881
  method: "GET",
2742
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2882
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.392", "User-Agent": "@tryvital/vital-node/3.1.392", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2743
2883
  contentType: "application/json",
2744
2884
  requestType: "json",
2745
2885
  responseType: "streaming",
@@ -2781,146 +2921,6 @@ class LabTests {
2781
2921
  }
2782
2922
  });
2783
2923
  }
2784
- /**
2785
- * GET many orders with filters.
2786
- *
2787
- * @param {Vital.LabTestsGetOrdersRequest} request
2788
- * @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
2789
- *
2790
- * @throws {@link Vital.UnprocessableEntityError}
2791
- *
2792
- * @example
2793
- * await client.labTests.getOrders()
2794
- */
2795
- getOrders(request = {}, requestOptions) {
2796
- var _a;
2797
- return __awaiter(this, void 0, void 0, function* () {
2798
- const { searchInput, startDate, endDate, updatedStartDate, updatedEndDate, status, orderKey, orderDirection, orderType, isCritical, interpretation, orderActivationTypes, userId, patientName, shippingRecipientName, orderIds, page, size, } = request;
2799
- const _queryParams = {};
2800
- if (searchInput != null) {
2801
- _queryParams["search_input"] = searchInput;
2802
- }
2803
- if (startDate != null) {
2804
- _queryParams["start_date"] = startDate.toISOString();
2805
- }
2806
- if (endDate != null) {
2807
- _queryParams["end_date"] = endDate.toISOString();
2808
- }
2809
- if (updatedStartDate != null) {
2810
- _queryParams["updated_start_date"] = updatedStartDate.toISOString();
2811
- }
2812
- if (updatedEndDate != null) {
2813
- _queryParams["updated_end_date"] = updatedEndDate.toISOString();
2814
- }
2815
- if (status != null) {
2816
- if (Array.isArray(status)) {
2817
- _queryParams["status"] = status.map((item) => item);
2818
- }
2819
- else {
2820
- _queryParams["status"] = status;
2821
- }
2822
- }
2823
- if (orderKey != null) {
2824
- _queryParams["order_key"] = orderKey;
2825
- }
2826
- if (orderDirection != null) {
2827
- _queryParams["order_direction"] = orderDirection;
2828
- }
2829
- if (orderType != null) {
2830
- if (Array.isArray(orderType)) {
2831
- _queryParams["order_type"] = orderType.map((item) => item);
2832
- }
2833
- else {
2834
- _queryParams["order_type"] = orderType;
2835
- }
2836
- }
2837
- if (isCritical != null) {
2838
- _queryParams["is_critical"] = isCritical.toString();
2839
- }
2840
- if (interpretation != null) {
2841
- _queryParams["interpretation"] = interpretation;
2842
- }
2843
- if (orderActivationTypes != null) {
2844
- if (Array.isArray(orderActivationTypes)) {
2845
- _queryParams["order_activation_types"] = orderActivationTypes.map((item) => item);
2846
- }
2847
- else {
2848
- _queryParams["order_activation_types"] = orderActivationTypes;
2849
- }
2850
- }
2851
- if (userId != null) {
2852
- _queryParams["user_id"] = userId;
2853
- }
2854
- if (patientName != null) {
2855
- _queryParams["patient_name"] = patientName;
2856
- }
2857
- if (shippingRecipientName != null) {
2858
- _queryParams["shipping_recipient_name"] = shippingRecipientName;
2859
- }
2860
- if (orderIds != null) {
2861
- if (Array.isArray(orderIds)) {
2862
- _queryParams["order_ids"] = orderIds.map((item) => item);
2863
- }
2864
- else {
2865
- _queryParams["order_ids"] = orderIds;
2866
- }
2867
- }
2868
- if (page != null) {
2869
- _queryParams["page"] = page.toString();
2870
- }
2871
- if (size != null) {
2872
- _queryParams["size"] = size.toString();
2873
- }
2874
- const _response = yield core.fetcher({
2875
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
2876
- method: "GET",
2877
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
2878
- contentType: "application/json",
2879
- queryParameters: _queryParams,
2880
- requestType: "json",
2881
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
2882
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
2883
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
2884
- });
2885
- if (_response.ok) {
2886
- return serializers.GetOrdersResponse.parseOrThrow(_response.body, {
2887
- unrecognizedObjectKeys: "passthrough",
2888
- allowUnrecognizedUnionMembers: true,
2889
- allowUnrecognizedEnumValues: true,
2890
- breadcrumbsPrefix: ["response"],
2891
- });
2892
- }
2893
- if (_response.error.reason === "status-code") {
2894
- switch (_response.error.statusCode) {
2895
- case 422:
2896
- throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
2897
- unrecognizedObjectKeys: "passthrough",
2898
- allowUnrecognizedUnionMembers: true,
2899
- allowUnrecognizedEnumValues: true,
2900
- breadcrumbsPrefix: ["response"],
2901
- }));
2902
- default:
2903
- throw new errors.VitalError({
2904
- statusCode: _response.error.statusCode,
2905
- body: _response.error.body,
2906
- });
2907
- }
2908
- }
2909
- switch (_response.error.reason) {
2910
- case "non-json":
2911
- throw new errors.VitalError({
2912
- statusCode: _response.error.statusCode,
2913
- body: _response.error.rawBody,
2914
- });
2915
- case "timeout":
2916
- throw new errors.VitalTimeoutError();
2917
- case "unknown":
2918
- throw new errors.VitalError({
2919
- message: _response.error.errorMessage,
2920
- });
2921
- }
2922
- });
2923
- }
2924
2924
  _getCustomAuthorizationHeaders() {
2925
2925
  return __awaiter(this, void 0, void 0, function* () {
2926
2926
  const apiKeyValue = yield core.Supplier.get(this._options.apiKey);