@tryvital/vital-node 3.1.385 → 3.1.387
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.
- package/Client.d.ts +24 -24
- package/Client.js +54 -54
- package/api/resources/activity/client/Client.js +2 -2
- package/api/resources/aggregate/client/Client.js +3 -3
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/electrocardiogram/client/Client.js +1 -1
- package/api/resources/index.d.ts +14 -14
- package/api/resources/index.js +15 -15
- package/api/resources/insurance/client/Client.js +3 -3
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.d.ts +12 -12
- package/api/resources/labTests/client/Client.js +181 -181
- package/api/resources/labTests/client/requests/index.d.ts +1 -1
- package/api/resources/labTests/types/index.d.ts +2 -2
- package/api/resources/labTests/types/index.js +2 -2
- package/api/resources/link/client/Client.js +19 -19
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/client/Client.js +1 -1
- package/api/resources/order/client/Client.js +1 -1
- package/api/resources/payor/client/Client.js +1 -1
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.d.ts +12 -12
- package/api/resources/sleep/client/Client.js +34 -34
- package/api/resources/sleepCycle/client/Client.js +1 -1
- package/api/resources/team/client/Client.js +7 -7
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +18 -18
- package/api/resources/vitals/client/Client.js +78 -78
- package/api/resources/workouts/client/Client.d.ts +10 -10
- package/api/resources/workouts/client/Client.js +34 -34
- package/api/types/Query.d.ts +8 -0
- package/dist/Client.d.ts +24 -24
- package/dist/Client.js +54 -54
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/aggregate/client/Client.js +3 -3
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +14 -14
- package/dist/api/resources/index.js +15 -15
- package/dist/api/resources/insurance/client/Client.js +3 -3
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.d.ts +12 -12
- package/dist/api/resources/labTests/client/Client.js +181 -181
- package/dist/api/resources/labTests/client/requests/index.d.ts +1 -1
- package/dist/api/resources/labTests/types/index.d.ts +2 -2
- package/dist/api/resources/labTests/types/index.js +2 -2
- package/dist/api/resources/link/client/Client.js +19 -19
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
- package/dist/api/resources/order/client/Client.js +1 -1
- package/dist/api/resources/payor/client/Client.js +1 -1
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.d.ts +12 -12
- package/dist/api/resources/sleep/client/Client.js +34 -34
- package/dist/api/resources/sleepCycle/client/Client.js +1 -1
- package/dist/api/resources/team/client/Client.js +7 -7
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +18 -18
- package/dist/api/resources/vitals/client/Client.js +78 -78
- package/dist/api/resources/workouts/client/Client.d.ts +10 -10
- package/dist/api/resources/workouts/client/Client.js +34 -34
- package/dist/api/types/Query.d.ts +8 -0
- package/dist/serialization/resources/index.d.ts +2 -2
- package/dist/serialization/resources/index.js +3 -3
- package/dist/serialization/resources/labTests/types/index.d.ts +2 -2
- package/dist/serialization/resources/labTests/types/index.js +2 -2
- package/dist/serialization/types/Query.d.ts +1 -0
- package/dist/serialization/types/Query.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +2078 -2078
- package/serialization/resources/index.d.ts +2 -2
- package/serialization/resources/index.js +3 -3
- package/serialization/resources/labTests/types/index.d.ts +2 -2
- package/serialization/resources/labTests/types/index.js +2 -2
- package/serialization/types/Query.d.ts +1 -0
- package/serialization/types/Query.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -42,153 +42,13 @@ 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
|
-
/**
|
|
53
|
-
* GET many orders with filters.
|
|
54
|
-
*
|
|
55
|
-
* @param {Vital.LabTestsGetOrdersRequest} request
|
|
56
|
-
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
-
*
|
|
58
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* await client.labTests.getOrders()
|
|
62
|
-
*/
|
|
63
|
-
getOrders(request = {}, requestOptions) {
|
|
64
|
-
var _a;
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const { searchInput, startDate, endDate, updatedStartDate, updatedEndDate, status, orderKey, orderDirection, orderType, isCritical, interpretation, orderActivationTypes, userId, patientName, shippingRecipientName, orderIds, page, size, } = request;
|
|
67
|
-
const _queryParams = {};
|
|
68
|
-
if (searchInput != null) {
|
|
69
|
-
_queryParams["search_input"] = searchInput;
|
|
70
|
-
}
|
|
71
|
-
if (startDate != null) {
|
|
72
|
-
_queryParams["start_date"] = startDate.toISOString();
|
|
73
|
-
}
|
|
74
|
-
if (endDate != null) {
|
|
75
|
-
_queryParams["end_date"] = endDate.toISOString();
|
|
76
|
-
}
|
|
77
|
-
if (updatedStartDate != null) {
|
|
78
|
-
_queryParams["updated_start_date"] = updatedStartDate.toISOString();
|
|
79
|
-
}
|
|
80
|
-
if (updatedEndDate != null) {
|
|
81
|
-
_queryParams["updated_end_date"] = updatedEndDate.toISOString();
|
|
82
|
-
}
|
|
83
|
-
if (status != null) {
|
|
84
|
-
if (Array.isArray(status)) {
|
|
85
|
-
_queryParams["status"] = status.map((item) => item);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
_queryParams["status"] = status;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (orderKey != null) {
|
|
92
|
-
_queryParams["order_key"] = orderKey;
|
|
93
|
-
}
|
|
94
|
-
if (orderDirection != null) {
|
|
95
|
-
_queryParams["order_direction"] = orderDirection;
|
|
96
|
-
}
|
|
97
|
-
if (orderType != null) {
|
|
98
|
-
if (Array.isArray(orderType)) {
|
|
99
|
-
_queryParams["order_type"] = orderType.map((item) => item);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
_queryParams["order_type"] = orderType;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (isCritical != null) {
|
|
106
|
-
_queryParams["is_critical"] = isCritical.toString();
|
|
107
|
-
}
|
|
108
|
-
if (interpretation != null) {
|
|
109
|
-
_queryParams["interpretation"] = interpretation;
|
|
110
|
-
}
|
|
111
|
-
if (orderActivationTypes != null) {
|
|
112
|
-
if (Array.isArray(orderActivationTypes)) {
|
|
113
|
-
_queryParams["order_activation_types"] = orderActivationTypes.map((item) => item);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
_queryParams["order_activation_types"] = orderActivationTypes;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
if (userId != null) {
|
|
120
|
-
_queryParams["user_id"] = userId;
|
|
121
|
-
}
|
|
122
|
-
if (patientName != null) {
|
|
123
|
-
_queryParams["patient_name"] = patientName;
|
|
124
|
-
}
|
|
125
|
-
if (shippingRecipientName != null) {
|
|
126
|
-
_queryParams["shipping_recipient_name"] = shippingRecipientName;
|
|
127
|
-
}
|
|
128
|
-
if (orderIds != null) {
|
|
129
|
-
if (Array.isArray(orderIds)) {
|
|
130
|
-
_queryParams["order_ids"] = orderIds.map((item) => item);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
_queryParams["order_ids"] = orderIds;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (page != null) {
|
|
137
|
-
_queryParams["page"] = page.toString();
|
|
138
|
-
}
|
|
139
|
-
if (size != null) {
|
|
140
|
-
_queryParams["size"] = size.toString();
|
|
141
|
-
}
|
|
142
|
-
const _response = yield core.fetcher({
|
|
143
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
|
|
144
|
-
method: "GET",
|
|
145
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.385", "User-Agent": "@tryvital/vital-node/3.1.385", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
146
|
-
contentType: "application/json",
|
|
147
|
-
queryParameters: _queryParams,
|
|
148
|
-
requestType: "json",
|
|
149
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
150
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
151
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
-
});
|
|
153
|
-
if (_response.ok) {
|
|
154
|
-
return serializers.GetOrdersResponse.parseOrThrow(_response.body, {
|
|
155
|
-
unrecognizedObjectKeys: "passthrough",
|
|
156
|
-
allowUnrecognizedUnionMembers: true,
|
|
157
|
-
allowUnrecognizedEnumValues: true,
|
|
158
|
-
breadcrumbsPrefix: ["response"],
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
if (_response.error.reason === "status-code") {
|
|
162
|
-
switch (_response.error.statusCode) {
|
|
163
|
-
case 422:
|
|
164
|
-
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
165
|
-
unrecognizedObjectKeys: "passthrough",
|
|
166
|
-
allowUnrecognizedUnionMembers: true,
|
|
167
|
-
allowUnrecognizedEnumValues: true,
|
|
168
|
-
breadcrumbsPrefix: ["response"],
|
|
169
|
-
}));
|
|
170
|
-
default:
|
|
171
|
-
throw new errors.VitalError({
|
|
172
|
-
statusCode: _response.error.statusCode,
|
|
173
|
-
body: _response.error.body,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
switch (_response.error.reason) {
|
|
178
|
-
case "non-json":
|
|
179
|
-
throw new errors.VitalError({
|
|
180
|
-
statusCode: _response.error.statusCode,
|
|
181
|
-
body: _response.error.rawBody,
|
|
182
|
-
});
|
|
183
|
-
case "timeout":
|
|
184
|
-
throw new errors.VitalTimeoutError();
|
|
185
|
-
case "unknown":
|
|
186
|
-
throw new errors.VitalError({
|
|
187
|
-
message: _response.error.errorMessage,
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
52
|
/**
|
|
193
53
|
* Return the available time slots to book an appointment with a phlebotomist
|
|
194
54
|
* for the given address and order.
|
|
@@ -219,7 +79,7 @@ class LabTests {
|
|
|
219
79
|
const _response = yield core.fetcher({
|
|
220
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"),
|
|
221
81
|
method: "POST",
|
|
222
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
82
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
223
83
|
contentType: "application/json",
|
|
224
84
|
queryParameters: _queryParams,
|
|
225
85
|
requestType: "json",
|
|
@@ -287,7 +147,7 @@ class LabTests {
|
|
|
287
147
|
const _response = yield core.fetcher({
|
|
288
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`),
|
|
289
149
|
method: "POST",
|
|
290
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
150
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
291
151
|
contentType: "application/json",
|
|
292
152
|
requestType: "json",
|
|
293
153
|
body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -360,7 +220,7 @@ class LabTests {
|
|
|
360
220
|
const _response = yield core.fetcher({
|
|
361
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`),
|
|
362
222
|
method: "POST",
|
|
363
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
223
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
364
224
|
contentType: "application/json",
|
|
365
225
|
requestType: "json",
|
|
366
226
|
body: serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -427,7 +287,7 @@ class LabTests {
|
|
|
427
287
|
const _response = yield core.fetcher({
|
|
428
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`),
|
|
429
289
|
method: "PATCH",
|
|
430
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
290
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
431
291
|
contentType: "application/json",
|
|
432
292
|
requestType: "json",
|
|
433
293
|
body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -494,7 +354,7 @@ class LabTests {
|
|
|
494
354
|
const _response = yield core.fetcher({
|
|
495
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`),
|
|
496
356
|
method: "PATCH",
|
|
497
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
357
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
498
358
|
contentType: "application/json",
|
|
499
359
|
requestType: "json",
|
|
500
360
|
body: serializers.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -555,7 +415,7 @@ class LabTests {
|
|
|
555
415
|
const _response = yield core.fetcher({
|
|
556
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"),
|
|
557
417
|
method: "GET",
|
|
558
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
418
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
559
419
|
contentType: "application/json",
|
|
560
420
|
requestType: "json",
|
|
561
421
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -608,7 +468,7 @@ class LabTests {
|
|
|
608
468
|
const _response = yield core.fetcher({
|
|
609
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`),
|
|
610
470
|
method: "GET",
|
|
611
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
471
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
612
472
|
contentType: "application/json",
|
|
613
473
|
requestType: "json",
|
|
614
474
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -694,7 +554,7 @@ class LabTests {
|
|
|
694
554
|
const _response = yield core.fetcher({
|
|
695
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"),
|
|
696
556
|
method: "GET",
|
|
697
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
557
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
698
558
|
contentType: "application/json",
|
|
699
559
|
queryParameters: _queryParams,
|
|
700
560
|
requestType: "json",
|
|
@@ -774,7 +634,7 @@ class LabTests {
|
|
|
774
634
|
const _response = yield core.fetcher({
|
|
775
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"),
|
|
776
636
|
method: "GET",
|
|
777
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
637
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
778
638
|
contentType: "application/json",
|
|
779
639
|
queryParameters: _queryParams,
|
|
780
640
|
requestType: "json",
|
|
@@ -850,7 +710,7 @@ class LabTests {
|
|
|
850
710
|
const _response = yield core.fetcher({
|
|
851
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`),
|
|
852
712
|
method: "GET",
|
|
853
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
713
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
854
714
|
contentType: "application/json",
|
|
855
715
|
queryParameters: _queryParams,
|
|
856
716
|
requestType: "json",
|
|
@@ -907,7 +767,7 @@ class LabTests {
|
|
|
907
767
|
const _response = yield core.fetcher({
|
|
908
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`),
|
|
909
769
|
method: "GET",
|
|
910
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
770
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
911
771
|
contentType: "application/json",
|
|
912
772
|
requestType: "json",
|
|
913
773
|
responseType: "streaming",
|
|
@@ -967,7 +827,7 @@ class LabTests {
|
|
|
967
827
|
const _response = yield core.fetcher({
|
|
968
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`),
|
|
969
829
|
method: "GET",
|
|
970
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
830
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
971
831
|
contentType: "application/json",
|
|
972
832
|
requestType: "json",
|
|
973
833
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1030,7 +890,7 @@ class LabTests {
|
|
|
1030
890
|
const _response = yield core.fetcher({
|
|
1031
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`),
|
|
1032
892
|
method: "GET",
|
|
1033
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
893
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1034
894
|
contentType: "application/json",
|
|
1035
895
|
requestType: "json",
|
|
1036
896
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1092,7 +952,7 @@ class LabTests {
|
|
|
1092
952
|
const _response = yield core.fetcher({
|
|
1093
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`),
|
|
1094
954
|
method: "GET",
|
|
1095
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
955
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1096
956
|
contentType: "application/json",
|
|
1097
957
|
queryParameters: _queryParams,
|
|
1098
958
|
requestType: "json",
|
|
@@ -1172,7 +1032,7 @@ class LabTests {
|
|
|
1172
1032
|
const _response = yield core.fetcher({
|
|
1173
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"),
|
|
1174
1034
|
method: "POST",
|
|
1175
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1035
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1176
1036
|
contentType: "application/json",
|
|
1177
1037
|
queryParameters: _queryParams,
|
|
1178
1038
|
requestType: "json",
|
|
@@ -1237,7 +1097,7 @@ class LabTests {
|
|
|
1237
1097
|
const _response = yield core.fetcher({
|
|
1238
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`),
|
|
1239
1099
|
method: "POST",
|
|
1240
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1100
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1241
1101
|
contentType: "application/json",
|
|
1242
1102
|
requestType: "json",
|
|
1243
1103
|
body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1302,7 +1162,7 @@ class LabTests {
|
|
|
1302
1162
|
const _response = yield core.fetcher({
|
|
1303
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`),
|
|
1304
1164
|
method: "PATCH",
|
|
1305
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1165
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1306
1166
|
contentType: "application/json",
|
|
1307
1167
|
requestType: "json",
|
|
1308
1168
|
body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1367,7 +1227,7 @@ class LabTests {
|
|
|
1367
1227
|
const _response = yield core.fetcher({
|
|
1368
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`),
|
|
1369
1229
|
method: "PATCH",
|
|
1370
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1230
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1371
1231
|
contentType: "application/json",
|
|
1372
1232
|
requestType: "json",
|
|
1373
1233
|
body: serializers.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.jsonOrThrow(request, {
|
|
@@ -1428,7 +1288,7 @@ class LabTests {
|
|
|
1428
1288
|
const _response = yield core.fetcher({
|
|
1429
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"),
|
|
1430
1290
|
method: "GET",
|
|
1431
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1291
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1432
1292
|
contentType: "application/json",
|
|
1433
1293
|
requestType: "json",
|
|
1434
1294
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1481,7 +1341,7 @@ class LabTests {
|
|
|
1481
1341
|
const _response = yield core.fetcher({
|
|
1482
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`),
|
|
1483
1343
|
method: "GET",
|
|
1484
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1344
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1485
1345
|
contentType: "application/json",
|
|
1486
1346
|
requestType: "json",
|
|
1487
1347
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1537,7 +1397,7 @@ class LabTests {
|
|
|
1537
1397
|
const _response = yield core.fetcher({
|
|
1538
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`),
|
|
1539
1399
|
method: "GET",
|
|
1540
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1400
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1541
1401
|
contentType: "application/json",
|
|
1542
1402
|
requestType: "json",
|
|
1543
1403
|
responseType: "streaming",
|
|
@@ -1589,7 +1449,7 @@ class LabTests {
|
|
|
1589
1449
|
const _response = yield core.fetcher({
|
|
1590
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`),
|
|
1591
1451
|
method: "GET",
|
|
1592
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1452
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1593
1453
|
contentType: "application/json",
|
|
1594
1454
|
requestType: "json",
|
|
1595
1455
|
responseType: "streaming",
|
|
@@ -1641,7 +1501,7 @@ class LabTests {
|
|
|
1641
1501
|
const _response = yield core.fetcher({
|
|
1642
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`),
|
|
1643
1503
|
method: "GET",
|
|
1644
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1504
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1645
1505
|
contentType: "application/json",
|
|
1646
1506
|
requestType: "json",
|
|
1647
1507
|
responseType: "streaming",
|
|
@@ -1700,7 +1560,7 @@ class LabTests {
|
|
|
1700
1560
|
const _response = yield core.fetcher({
|
|
1701
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)}`),
|
|
1702
1562
|
method: "GET",
|
|
1703
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1563
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1704
1564
|
contentType: "application/json",
|
|
1705
1565
|
requestType: "json",
|
|
1706
1566
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1778,7 +1638,7 @@ class LabTests {
|
|
|
1778
1638
|
const _response = yield core.fetcher({
|
|
1779
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"),
|
|
1780
1640
|
method: "POST",
|
|
1781
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1641
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1782
1642
|
contentType: "application/json",
|
|
1783
1643
|
requestType: "json",
|
|
1784
1644
|
body: serializers.CreateOrderRequestCompatible.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1862,7 +1722,7 @@ class LabTests {
|
|
|
1862
1722
|
const _response = yield core.fetcher({
|
|
1863
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"),
|
|
1864
1724
|
method: "POST",
|
|
1865
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1725
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1866
1726
|
contentType: "application/json",
|
|
1867
1727
|
requestType: "json",
|
|
1868
1728
|
body: serializers.ImportOrderBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1926,7 +1786,7 @@ class LabTests {
|
|
|
1926
1786
|
const _response = yield core.fetcher({
|
|
1927
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`),
|
|
1928
1788
|
method: "POST",
|
|
1929
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1789
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1930
1790
|
contentType: "application/json",
|
|
1931
1791
|
requestType: "json",
|
|
1932
1792
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2000,7 +1860,7 @@ class LabTests {
|
|
|
2000
1860
|
const _response = yield core.fetcher({
|
|
2001
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`),
|
|
2002
1862
|
method: "POST",
|
|
2003
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1863
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2004
1864
|
contentType: "application/json",
|
|
2005
1865
|
queryParameters: _queryParams,
|
|
2006
1866
|
requestType: "json",
|
|
@@ -2064,7 +1924,7 @@ class LabTests {
|
|
|
2064
1924
|
const _response = yield core.fetcher({
|
|
2065
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`),
|
|
2066
1926
|
method: "PATCH",
|
|
2067
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
1927
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2068
1928
|
contentType: "application/json",
|
|
2069
1929
|
requestType: "json",
|
|
2070
1930
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2166,7 +2026,7 @@ class LabTests {
|
|
|
2166
2026
|
const _response = yield core.fetcher({
|
|
2167
2027
|
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"),
|
|
2168
2028
|
method: "GET",
|
|
2169
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2029
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2170
2030
|
contentType: "application/json",
|
|
2171
2031
|
queryParameters: _queryParams,
|
|
2172
2032
|
requestType: "json",
|
|
@@ -2232,7 +2092,7 @@ class LabTests {
|
|
|
2232
2092
|
const _response = yield core.fetcher({
|
|
2233
2093
|
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
2094
|
method: "POST",
|
|
2235
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2095
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2236
2096
|
contentType: "application/json",
|
|
2237
2097
|
requestType: "json",
|
|
2238
2098
|
body: serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -2296,7 +2156,7 @@ class LabTests {
|
|
|
2296
2156
|
const _response = yield core.fetcher({
|
|
2297
2157
|
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)}`),
|
|
2298
2158
|
method: "GET",
|
|
2299
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2159
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2300
2160
|
contentType: "application/json",
|
|
2301
2161
|
requestType: "json",
|
|
2302
2162
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2358,7 +2218,7 @@ class LabTests {
|
|
|
2358
2218
|
const _response = yield core.fetcher({
|
|
2359
2219
|
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
2220
|
method: "PATCH",
|
|
2361
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2221
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2362
2222
|
contentType: "application/json",
|
|
2363
2223
|
requestType: "json",
|
|
2364
2224
|
body: serializers.UpdateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -2444,7 +2304,7 @@ class LabTests {
|
|
|
2444
2304
|
const _response = yield core.fetcher({
|
|
2445
2305
|
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
2306
|
method: "GET",
|
|
2447
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2307
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2448
2308
|
contentType: "application/json",
|
|
2449
2309
|
queryParameters: _queryParams,
|
|
2450
2310
|
requestType: "json",
|
|
@@ -2516,7 +2376,7 @@ class LabTests {
|
|
|
2516
2376
|
const _response = yield core.fetcher({
|
|
2517
2377
|
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"),
|
|
2518
2378
|
method: "POST",
|
|
2519
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2379
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2520
2380
|
contentType: "application/json",
|
|
2521
2381
|
queryParameters: _queryParams,
|
|
2522
2382
|
requestType: "json",
|
|
@@ -2588,7 +2448,7 @@ class LabTests {
|
|
|
2588
2448
|
const _response = yield core.fetcher({
|
|
2589
2449
|
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
2450
|
method: "GET",
|
|
2591
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2451
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2592
2452
|
contentType: "application/json",
|
|
2593
2453
|
queryParameters: _queryParams,
|
|
2594
2454
|
requestType: "json",
|
|
@@ -2653,7 +2513,7 @@ class LabTests {
|
|
|
2653
2513
|
const _response = yield core.fetcher({
|
|
2654
2514
|
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
2515
|
method: "GET",
|
|
2656
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2516
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2657
2517
|
contentType: "application/json",
|
|
2658
2518
|
requestType: "json",
|
|
2659
2519
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2713,7 +2573,7 @@ class LabTests {
|
|
|
2713
2573
|
const _response = yield core.fetcher({
|
|
2714
2574
|
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"),
|
|
2715
2575
|
method: "GET",
|
|
2716
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2576
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2717
2577
|
contentType: "application/json",
|
|
2718
2578
|
requestType: "json",
|
|
2719
2579
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2811,7 +2671,7 @@ class LabTests {
|
|
|
2811
2671
|
const _response = yield core.fetcher({
|
|
2812
2672
|
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
2673
|
method: "GET",
|
|
2814
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2674
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2815
2675
|
contentType: "application/json",
|
|
2816
2676
|
queryParameters: _queryParams,
|
|
2817
2677
|
requestType: "json",
|
|
@@ -2867,7 +2727,7 @@ class LabTests {
|
|
|
2867
2727
|
const _response = yield core.fetcher({
|
|
2868
2728
|
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`),
|
|
2869
2729
|
method: "GET",
|
|
2870
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
2730
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2871
2731
|
contentType: "application/json",
|
|
2872
2732
|
requestType: "json",
|
|
2873
2733
|
responseType: "streaming",
|
|
@@ -2909,6 +2769,146 @@ class LabTests {
|
|
|
2909
2769
|
}
|
|
2910
2770
|
});
|
|
2911
2771
|
}
|
|
2772
|
+
/**
|
|
2773
|
+
* GET many orders with filters.
|
|
2774
|
+
*
|
|
2775
|
+
* @param {Vital.LabTestsGetOrdersRequest} request
|
|
2776
|
+
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
|
2777
|
+
*
|
|
2778
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
|
2779
|
+
*
|
|
2780
|
+
* @example
|
|
2781
|
+
* await client.labTests.getOrders()
|
|
2782
|
+
*/
|
|
2783
|
+
getOrders(request = {}, requestOptions) {
|
|
2784
|
+
var _a;
|
|
2785
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2786
|
+
const { searchInput, startDate, endDate, updatedStartDate, updatedEndDate, status, orderKey, orderDirection, orderType, isCritical, interpretation, orderActivationTypes, userId, patientName, shippingRecipientName, orderIds, page, size, } = request;
|
|
2787
|
+
const _queryParams = {};
|
|
2788
|
+
if (searchInput != null) {
|
|
2789
|
+
_queryParams["search_input"] = searchInput;
|
|
2790
|
+
}
|
|
2791
|
+
if (startDate != null) {
|
|
2792
|
+
_queryParams["start_date"] = startDate.toISOString();
|
|
2793
|
+
}
|
|
2794
|
+
if (endDate != null) {
|
|
2795
|
+
_queryParams["end_date"] = endDate.toISOString();
|
|
2796
|
+
}
|
|
2797
|
+
if (updatedStartDate != null) {
|
|
2798
|
+
_queryParams["updated_start_date"] = updatedStartDate.toISOString();
|
|
2799
|
+
}
|
|
2800
|
+
if (updatedEndDate != null) {
|
|
2801
|
+
_queryParams["updated_end_date"] = updatedEndDate.toISOString();
|
|
2802
|
+
}
|
|
2803
|
+
if (status != null) {
|
|
2804
|
+
if (Array.isArray(status)) {
|
|
2805
|
+
_queryParams["status"] = status.map((item) => item);
|
|
2806
|
+
}
|
|
2807
|
+
else {
|
|
2808
|
+
_queryParams["status"] = status;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
if (orderKey != null) {
|
|
2812
|
+
_queryParams["order_key"] = orderKey;
|
|
2813
|
+
}
|
|
2814
|
+
if (orderDirection != null) {
|
|
2815
|
+
_queryParams["order_direction"] = orderDirection;
|
|
2816
|
+
}
|
|
2817
|
+
if (orderType != null) {
|
|
2818
|
+
if (Array.isArray(orderType)) {
|
|
2819
|
+
_queryParams["order_type"] = orderType.map((item) => item);
|
|
2820
|
+
}
|
|
2821
|
+
else {
|
|
2822
|
+
_queryParams["order_type"] = orderType;
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
if (isCritical != null) {
|
|
2826
|
+
_queryParams["is_critical"] = isCritical.toString();
|
|
2827
|
+
}
|
|
2828
|
+
if (interpretation != null) {
|
|
2829
|
+
_queryParams["interpretation"] = interpretation;
|
|
2830
|
+
}
|
|
2831
|
+
if (orderActivationTypes != null) {
|
|
2832
|
+
if (Array.isArray(orderActivationTypes)) {
|
|
2833
|
+
_queryParams["order_activation_types"] = orderActivationTypes.map((item) => item);
|
|
2834
|
+
}
|
|
2835
|
+
else {
|
|
2836
|
+
_queryParams["order_activation_types"] = orderActivationTypes;
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
if (userId != null) {
|
|
2840
|
+
_queryParams["user_id"] = userId;
|
|
2841
|
+
}
|
|
2842
|
+
if (patientName != null) {
|
|
2843
|
+
_queryParams["patient_name"] = patientName;
|
|
2844
|
+
}
|
|
2845
|
+
if (shippingRecipientName != null) {
|
|
2846
|
+
_queryParams["shipping_recipient_name"] = shippingRecipientName;
|
|
2847
|
+
}
|
|
2848
|
+
if (orderIds != null) {
|
|
2849
|
+
if (Array.isArray(orderIds)) {
|
|
2850
|
+
_queryParams["order_ids"] = orderIds.map((item) => item);
|
|
2851
|
+
}
|
|
2852
|
+
else {
|
|
2853
|
+
_queryParams["order_ids"] = orderIds;
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
if (page != null) {
|
|
2857
|
+
_queryParams["page"] = page.toString();
|
|
2858
|
+
}
|
|
2859
|
+
if (size != null) {
|
|
2860
|
+
_queryParams["size"] = size.toString();
|
|
2861
|
+
}
|
|
2862
|
+
const _response = yield core.fetcher({
|
|
2863
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
|
|
2864
|
+
method: "GET",
|
|
2865
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.387", "User-Agent": "@tryvital/vital-node/3.1.387", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
2866
|
+
contentType: "application/json",
|
|
2867
|
+
queryParameters: _queryParams,
|
|
2868
|
+
requestType: "json",
|
|
2869
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
2870
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
2871
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2872
|
+
});
|
|
2873
|
+
if (_response.ok) {
|
|
2874
|
+
return serializers.GetOrdersResponse.parseOrThrow(_response.body, {
|
|
2875
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2876
|
+
allowUnrecognizedUnionMembers: true,
|
|
2877
|
+
allowUnrecognizedEnumValues: true,
|
|
2878
|
+
breadcrumbsPrefix: ["response"],
|
|
2879
|
+
});
|
|
2880
|
+
}
|
|
2881
|
+
if (_response.error.reason === "status-code") {
|
|
2882
|
+
switch (_response.error.statusCode) {
|
|
2883
|
+
case 422:
|
|
2884
|
+
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
2885
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2886
|
+
allowUnrecognizedUnionMembers: true,
|
|
2887
|
+
allowUnrecognizedEnumValues: true,
|
|
2888
|
+
breadcrumbsPrefix: ["response"],
|
|
2889
|
+
}));
|
|
2890
|
+
default:
|
|
2891
|
+
throw new errors.VitalError({
|
|
2892
|
+
statusCode: _response.error.statusCode,
|
|
2893
|
+
body: _response.error.body,
|
|
2894
|
+
});
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
switch (_response.error.reason) {
|
|
2898
|
+
case "non-json":
|
|
2899
|
+
throw new errors.VitalError({
|
|
2900
|
+
statusCode: _response.error.statusCode,
|
|
2901
|
+
body: _response.error.rawBody,
|
|
2902
|
+
});
|
|
2903
|
+
case "timeout":
|
|
2904
|
+
throw new errors.VitalTimeoutError();
|
|
2905
|
+
case "unknown":
|
|
2906
|
+
throw new errors.VitalError({
|
|
2907
|
+
message: _response.error.errorMessage,
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2910
|
+
});
|
|
2911
|
+
}
|
|
2912
2912
|
_getCustomAuthorizationHeaders() {
|
|
2913
2913
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2914
2914
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|