@tryvital/vital-node 3.1.84 → 3.1.86
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/api/resources/activity/client/Client.js +2 -2
- package/api/resources/aggregate/client/Client.js +1 -1
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/insurance/client/Client.js +2 -2
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.d.ts +60 -2
- package/api/resources/labTests/client/Client.js +359 -30
- package/{dist/api/resources/labTests/client/requests/AppointmentCancelRequest.d.ts → api/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.d.ts} +1 -1
- package/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.d.ts +32 -0
- package/api/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.d.ts +13 -0
- package/api/resources/labTests/client/requests/index.d.ts +3 -3
- package/api/resources/link/client/Client.js +14 -14
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/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.js +4 -4
- 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 +16 -16
- package/api/resources/vitals/client/Client.js +56 -56
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/{resources/labTests/client/requests → types}/AppointmentBookingRequest.d.ts +0 -6
- package/api/types/AppointmentLocation.d.ts +10 -0
- package/api/types/AppointmentProvider.d.ts +2 -1
- package/api/types/AppointmentProvider.js +1 -0
- package/api/types/AppointmentPscLabs.d.ts +4 -0
- package/{dist/api/resources/labTests/client/requests → api/types}/AppointmentRescheduleRequest.d.ts +0 -6
- package/api/types/AppointmentRescheduleRequest.js +5 -0
- package/api/types/AppointmentType.d.ts +5 -1
- package/api/types/AppointmentType.js +5 -0
- package/api/types/ClientFacingWalkInTestOrder.d.ts +1 -0
- package/api/types/DaySlots.d.ts +1 -0
- package/api/types/OAuthProviders.d.ts +2 -1
- package/api/types/OAuthProviders.js +1 -0
- package/api/types/OrderStatus.d.ts +4 -1
- package/api/types/OrderStatus.js +3 -0
- package/api/types/Providers.d.ts +2 -1
- package/api/types/Providers.js +1 -0
- package/api/types/index.d.ts +4 -0
- package/api/types/index.js +4 -0
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/aggregate/client/Client.js +1 -1
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/insurance/client/Client.js +2 -2
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.d.ts +60 -2
- package/dist/api/resources/labTests/client/Client.js +359 -30
- package/{api/resources/labTests/client/requests/AppointmentCancelRequest.d.ts → dist/api/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.d.ts} +1 -1
- package/dist/api/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.js +5 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.d.ts +32 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.js +5 -0
- package/dist/api/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.d.ts +13 -0
- package/dist/api/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.js +5 -0
- package/dist/api/resources/labTests/client/requests/index.d.ts +3 -3
- package/dist/api/resources/link/client/Client.js +14 -14
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/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.js +4 -4
- 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 +16 -16
- package/dist/api/resources/vitals/client/Client.js +56 -56
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/{resources/labTests/client/requests → types}/AppointmentBookingRequest.d.ts +0 -6
- package/dist/api/types/AppointmentBookingRequest.js +5 -0
- package/dist/api/types/AppointmentLocation.d.ts +10 -0
- package/dist/api/types/AppointmentLocation.js +5 -0
- package/dist/api/types/AppointmentProvider.d.ts +2 -1
- package/dist/api/types/AppointmentProvider.js +1 -0
- package/dist/api/types/AppointmentPscLabs.d.ts +4 -0
- package/dist/api/types/AppointmentPscLabs.js +5 -0
- package/{api/resources/labTests/client/requests → dist/api/types}/AppointmentRescheduleRequest.d.ts +0 -6
- package/dist/api/types/AppointmentRescheduleRequest.js +5 -0
- package/dist/api/types/AppointmentType.d.ts +5 -1
- package/dist/api/types/AppointmentType.js +5 -0
- package/dist/api/types/ClientFacingWalkInTestOrder.d.ts +1 -0
- package/dist/api/types/DaySlots.d.ts +1 -0
- package/dist/api/types/OAuthProviders.d.ts +2 -1
- package/dist/api/types/OAuthProviders.js +1 -0
- package/dist/api/types/OrderStatus.d.ts +4 -1
- package/dist/api/types/OrderStatus.js +3 -0
- package/dist/api/types/Providers.d.ts +2 -1
- package/dist/api/types/Providers.js +1 -0
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/dist/serialization/resources/labTests/client/getPscAppointmentCancellationReason.d.ts +11 -0
- package/dist/serialization/resources/labTests/client/getPscAppointmentCancellationReason.js +32 -0
- package/dist/serialization/resources/labTests/client/index.d.ts +1 -0
- package/dist/serialization/resources/labTests/client/index.js +2 -1
- package/dist/serialization/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.d.ts +13 -0
- package/{serialization/resources/labTests/client/requests/AppointmentCancelRequest.js → dist/serialization/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.js} +2 -2
- package/dist/serialization/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.d.ts +13 -0
- package/dist/serialization/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.js +34 -0
- package/dist/serialization/resources/labTests/client/requests/index.d.ts +2 -3
- package/dist/serialization/resources/labTests/client/requests/index.js +5 -7
- package/dist/serialization/{resources/labTests/client/requests → types}/AppointmentBookingRequest.d.ts +4 -4
- package/{serialization/resources/labTests/client/requests → dist/serialization/types}/AppointmentBookingRequest.js +1 -1
- package/dist/serialization/types/AppointmentLocation.d.ts +17 -0
- package/dist/serialization/types/AppointmentLocation.js +38 -0
- package/dist/serialization/types/AppointmentProvider.d.ts +1 -1
- package/dist/serialization/types/AppointmentProvider.js +1 -1
- package/dist/serialization/types/AppointmentPscLabs.d.ts +10 -0
- package/dist/serialization/types/AppointmentPscLabs.js +31 -0
- package/dist/serialization/{resources/labTests/client/requests → types}/AppointmentRescheduleRequest.d.ts +4 -4
- package/dist/serialization/{resources/labTests/client/requests → types}/AppointmentRescheduleRequest.js +1 -1
- package/dist/serialization/types/AppointmentType.d.ts +1 -1
- package/dist/serialization/types/AppointmentType.js +1 -1
- package/dist/serialization/types/ClientFacingWalkInTestOrder.d.ts +1 -0
- package/dist/serialization/types/ClientFacingWalkInTestOrder.js +1 -0
- package/dist/serialization/types/DaySlots.d.ts +2 -0
- package/dist/serialization/types/DaySlots.js +2 -0
- package/dist/serialization/types/OAuthProviders.d.ts +1 -1
- package/dist/serialization/types/OAuthProviders.js +1 -0
- package/dist/serialization/types/OrderStatus.d.ts +1 -1
- package/dist/serialization/types/OrderStatus.js +3 -0
- package/dist/serialization/types/Providers.d.ts +1 -1
- package/dist/serialization/types/Providers.js +1 -0
- package/dist/serialization/types/index.d.ts +4 -0
- package/dist/serialization/types/index.js +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +265 -1
- package/serialization/resources/labTests/client/getPscAppointmentCancellationReason.d.ts +11 -0
- package/serialization/resources/labTests/client/getPscAppointmentCancellationReason.js +32 -0
- package/serialization/resources/labTests/client/index.d.ts +1 -0
- package/serialization/resources/labTests/client/index.js +2 -1
- package/serialization/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.d.ts +13 -0
- package/{dist/serialization/resources/labTests/client/requests/AppointmentCancelRequest.js → serialization/resources/labTests/client/requests/ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.js} +2 -2
- package/serialization/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.d.ts +13 -0
- package/serialization/resources/labTests/client/requests/VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.js +34 -0
- package/serialization/resources/labTests/client/requests/index.d.ts +2 -3
- package/serialization/resources/labTests/client/requests/index.js +5 -7
- package/serialization/{resources/labTests/client/requests → types}/AppointmentBookingRequest.d.ts +4 -4
- package/{dist/serialization/resources/labTests/client/requests → serialization/types}/AppointmentBookingRequest.js +1 -1
- package/serialization/types/AppointmentLocation.d.ts +17 -0
- package/serialization/types/AppointmentLocation.js +38 -0
- package/serialization/types/AppointmentProvider.d.ts +1 -1
- package/serialization/types/AppointmentProvider.js +1 -1
- package/serialization/types/AppointmentPscLabs.d.ts +10 -0
- package/serialization/types/AppointmentPscLabs.js +31 -0
- package/serialization/{resources/labTests/client/requests → types}/AppointmentRescheduleRequest.d.ts +4 -4
- package/serialization/{resources/labTests/client/requests → types}/AppointmentRescheduleRequest.js +1 -1
- package/serialization/types/AppointmentType.d.ts +1 -1
- package/serialization/types/AppointmentType.js +1 -1
- package/serialization/types/ClientFacingWalkInTestOrder.d.ts +1 -0
- package/serialization/types/ClientFacingWalkInTestOrder.js +1 -0
- package/serialization/types/DaySlots.d.ts +2 -0
- package/serialization/types/DaySlots.js +2 -0
- package/serialization/types/OAuthProviders.d.ts +1 -1
- package/serialization/types/OAuthProviders.js +1 -0
- package/serialization/types/OrderStatus.d.ts +1 -1
- package/serialization/types/OrderStatus.js +3 -0
- package/serialization/types/Providers.d.ts +1 -1
- package/serialization/types/Providers.js +1 -0
- package/serialization/types/index.d.ts +4 -0
- package/serialization/types/index.js +4 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/dist/serialization/resources/labTests/client/requests/AppointmentCancelRequest.d.ts +0 -13
- package/serialization/resources/labTests/client/requests/AppointmentCancelRequest.d.ts +0 -13
- /package/api/resources/labTests/client/requests/{AppointmentBookingRequest.js → ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.js} +0 -0
- /package/api/resources/labTests/client/requests/{AppointmentCancelRequest.js → LabTestsGetPscAppointmentAvailabilityRequest.js} +0 -0
- /package/api/resources/labTests/client/requests/{AppointmentRescheduleRequest.js → VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.js} +0 -0
- /package/{dist/api/resources/labTests/client/requests → api/types}/AppointmentBookingRequest.js +0 -0
- /package/{dist/api/resources/labTests/client/requests/AppointmentCancelRequest.js → api/types/AppointmentLocation.js} +0 -0
- /package/{dist/api/resources/labTests/client/requests/AppointmentRescheduleRequest.js → api/types/AppointmentPscLabs.js} +0 -0
@@ -63,7 +63,7 @@ class LabTests {
|
|
63
63
|
const _response = yield core.fetcher({
|
64
64
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests"),
|
65
65
|
method: "GET",
|
66
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
66
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
67
67
|
contentType: "application/json",
|
68
68
|
requestType: "json",
|
69
69
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -118,7 +118,7 @@ class LabTests {
|
|
118
118
|
const _response = yield core.fetcher({
|
119
119
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests"),
|
120
120
|
method: "POST",
|
121
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
121
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
122
122
|
contentType: "application/json",
|
123
123
|
requestType: "json",
|
124
124
|
body: serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -204,7 +204,7 @@ class LabTests {
|
|
204
204
|
const _response = yield core.fetcher({
|
205
205
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/markers"),
|
206
206
|
method: "GET",
|
207
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
207
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
208
208
|
contentType: "application/json",
|
209
209
|
queryParameters: _queryParams,
|
210
210
|
requestType: "json",
|
@@ -276,7 +276,7 @@ class LabTests {
|
|
276
276
|
const _response = yield core.fetcher({
|
277
277
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/list_order_set_markers"),
|
278
278
|
method: "POST",
|
279
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
279
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
280
280
|
contentType: "application/json",
|
281
281
|
queryParameters: _queryParams,
|
282
282
|
requestType: "json",
|
@@ -348,7 +348,7 @@ class LabTests {
|
|
348
348
|
const _response = yield core.fetcher({
|
349
349
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${encodeURIComponent(labTestId)}/markers`),
|
350
350
|
method: "GET",
|
351
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
351
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
352
352
|
contentType: "application/json",
|
353
353
|
queryParameters: _queryParams,
|
354
354
|
requestType: "json",
|
@@ -413,7 +413,7 @@ class LabTests {
|
|
413
413
|
const _response = yield core.fetcher({
|
414
414
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${encodeURIComponent(labId)}/markers/${encodeURIComponent(providerId)}`),
|
415
415
|
method: "GET",
|
416
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
416
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
417
417
|
contentType: "application/json",
|
418
418
|
requestType: "json",
|
419
419
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -473,7 +473,7 @@ class LabTests {
|
|
473
473
|
const _response = yield core.fetcher({
|
474
474
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/labs"),
|
475
475
|
method: "GET",
|
476
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
476
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
477
477
|
contentType: "application/json",
|
478
478
|
requestType: "json",
|
479
479
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -526,7 +526,7 @@ class LabTests {
|
|
526
526
|
const _response = yield core.fetcher({
|
527
527
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${encodeURIComponent(labTestId)}`),
|
528
528
|
method: "GET",
|
529
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
529
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
530
530
|
contentType: "application/json",
|
531
531
|
requestType: "json",
|
532
532
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -602,7 +602,7 @@ class LabTests {
|
|
602
602
|
const _response = yield core.fetcher({
|
603
603
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/availability"),
|
604
604
|
method: "POST",
|
605
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
605
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
606
606
|
contentType: "application/json",
|
607
607
|
queryParameters: _queryParams,
|
608
608
|
requestType: "json",
|
@@ -670,7 +670,7 @@ class LabTests {
|
|
670
670
|
const _response = yield core.fetcher({
|
671
671
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/book`),
|
672
672
|
method: "POST",
|
673
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
673
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
674
674
|
contentType: "application/json",
|
675
675
|
requestType: "json",
|
676
676
|
body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -743,7 +743,7 @@ class LabTests {
|
|
743
743
|
const _response = yield core.fetcher({
|
744
744
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/request`),
|
745
745
|
method: "POST",
|
746
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
746
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
747
747
|
contentType: "application/json",
|
748
748
|
requestType: "json",
|
749
749
|
body: serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -810,7 +810,7 @@ class LabTests {
|
|
810
810
|
const _response = yield core.fetcher({
|
811
811
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/reschedule`),
|
812
812
|
method: "PATCH",
|
813
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
813
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
814
814
|
contentType: "application/json",
|
815
815
|
requestType: "json",
|
816
816
|
body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -861,7 +861,7 @@ class LabTests {
|
|
861
861
|
* Cancel a previously booked at-home phlebotomy appointment.
|
862
862
|
*
|
863
863
|
* @param {string} orderId - Your Order ID.
|
864
|
-
* @param {Vital.
|
864
|
+
* @param {Vital.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest} request
|
865
865
|
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
866
866
|
*
|
867
867
|
* @throws {@link Vital.UnprocessableEntityError}
|
@@ -877,10 +877,10 @@ class LabTests {
|
|
877
877
|
const _response = yield core.fetcher({
|
878
878
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment/cancel`),
|
879
879
|
method: "PATCH",
|
880
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
880
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
881
881
|
contentType: "application/json",
|
882
882
|
requestType: "json",
|
883
|
-
body: serializers.
|
883
|
+
body: serializers.ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
884
884
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
885
885
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
886
886
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
@@ -938,7 +938,7 @@ class LabTests {
|
|
938
938
|
const _response = yield core.fetcher({
|
939
939
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/cancellation-reasons"),
|
940
940
|
method: "GET",
|
941
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
941
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
942
942
|
contentType: "application/json",
|
943
943
|
requestType: "json",
|
944
944
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -991,7 +991,7 @@ class LabTests {
|
|
991
991
|
const _response = yield core.fetcher({
|
992
992
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/phlebotomy/appointment`),
|
993
993
|
method: "GET",
|
994
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
994
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
995
995
|
contentType: "application/json",
|
996
996
|
requestType: "json",
|
997
997
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1070,7 +1070,7 @@ class LabTests {
|
|
1070
1070
|
const _response = yield core.fetcher({
|
1071
1071
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/area/info"),
|
1072
1072
|
method: "GET",
|
1073
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1073
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1074
1074
|
contentType: "application/json",
|
1075
1075
|
queryParameters: _queryParams,
|
1076
1076
|
requestType: "json",
|
@@ -1142,7 +1142,7 @@ class LabTests {
|
|
1142
1142
|
const _response = yield core.fetcher({
|
1143
1143
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/info"),
|
1144
1144
|
method: "GET",
|
1145
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1145
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1146
1146
|
contentType: "application/json",
|
1147
1147
|
queryParameters: _queryParams,
|
1148
1148
|
requestType: "json",
|
@@ -1210,7 +1210,7 @@ class LabTests {
|
|
1210
1210
|
const _response = yield core.fetcher({
|
1211
1211
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/info`),
|
1212
1212
|
method: "GET",
|
1213
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1213
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1214
1214
|
contentType: "application/json",
|
1215
1215
|
queryParameters: _queryParams,
|
1216
1216
|
requestType: "json",
|
@@ -1267,7 +1267,7 @@ class LabTests {
|
|
1267
1267
|
const _response = yield core.fetcher({
|
1268
1268
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/result/pdf`),
|
1269
1269
|
method: "GET",
|
1270
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1270
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1271
1271
|
contentType: "application/json",
|
1272
1272
|
requestType: "json",
|
1273
1273
|
responseType: "streaming",
|
@@ -1327,7 +1327,7 @@ class LabTests {
|
|
1327
1327
|
const _response = yield core.fetcher({
|
1328
1328
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/result/metadata`),
|
1329
1329
|
method: "GET",
|
1330
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1330
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1331
1331
|
contentType: "application/json",
|
1332
1332
|
requestType: "json",
|
1333
1333
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1390,7 +1390,7 @@ class LabTests {
|
|
1390
1390
|
const _response = yield core.fetcher({
|
1391
1391
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/result`),
|
1392
1392
|
method: "GET",
|
1393
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1393
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1394
1394
|
contentType: "application/json",
|
1395
1395
|
requestType: "json",
|
1396
1396
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1452,7 +1452,7 @@ class LabTests {
|
|
1452
1452
|
const _response = yield core.fetcher({
|
1453
1453
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/labels/pdf`),
|
1454
1454
|
method: "GET",
|
1455
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1455
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1456
1456
|
contentType: "application/json",
|
1457
1457
|
queryParameters: _queryParams,
|
1458
1458
|
requestType: "json",
|
@@ -1495,6 +1495,335 @@ class LabTests {
|
|
1495
1495
|
}
|
1496
1496
|
});
|
1497
1497
|
}
|
1498
|
+
/**
|
1499
|
+
* @param {Vital.LabTestsGetPscAppointmentAvailabilityRequest} request
|
1500
|
+
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
1501
|
+
*
|
1502
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1503
|
+
*
|
1504
|
+
* @example
|
1505
|
+
* await client.labTests.getPscAppointmentAvailability({
|
1506
|
+
* lab: "quest"
|
1507
|
+
* })
|
1508
|
+
*/
|
1509
|
+
getPscAppointmentAvailability(request, requestOptions) {
|
1510
|
+
var _a;
|
1511
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1512
|
+
const { lab, startDate, siteCodes, zipCode, radius } = request;
|
1513
|
+
const _queryParams = {};
|
1514
|
+
_queryParams["lab"] = lab;
|
1515
|
+
if (startDate != null) {
|
1516
|
+
_queryParams["start_date"] = startDate;
|
1517
|
+
}
|
1518
|
+
if (siteCodes != null) {
|
1519
|
+
if (Array.isArray(siteCodes)) {
|
1520
|
+
_queryParams["site_codes"] = siteCodes.map((item) => item);
|
1521
|
+
}
|
1522
|
+
else {
|
1523
|
+
_queryParams["site_codes"] = siteCodes;
|
1524
|
+
}
|
1525
|
+
}
|
1526
|
+
if (zipCode != null) {
|
1527
|
+
_queryParams["zip_code"] = zipCode;
|
1528
|
+
}
|
1529
|
+
if (radius != null) {
|
1530
|
+
_queryParams["radius"] = radius;
|
1531
|
+
}
|
1532
|
+
const _response = yield core.fetcher({
|
1533
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/appointment/availability"),
|
1534
|
+
method: "GET",
|
1535
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1536
|
+
contentType: "application/json",
|
1537
|
+
queryParameters: _queryParams,
|
1538
|
+
requestType: "json",
|
1539
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1540
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1541
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1542
|
+
});
|
1543
|
+
if (_response.ok) {
|
1544
|
+
return serializers.AppointmentAvailabilitySlots.parseOrThrow(_response.body, {
|
1545
|
+
unrecognizedObjectKeys: "passthrough",
|
1546
|
+
allowUnrecognizedUnionMembers: true,
|
1547
|
+
allowUnrecognizedEnumValues: true,
|
1548
|
+
breadcrumbsPrefix: ["response"],
|
1549
|
+
});
|
1550
|
+
}
|
1551
|
+
if (_response.error.reason === "status-code") {
|
1552
|
+
switch (_response.error.statusCode) {
|
1553
|
+
case 422:
|
1554
|
+
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1555
|
+
unrecognizedObjectKeys: "passthrough",
|
1556
|
+
allowUnrecognizedUnionMembers: true,
|
1557
|
+
allowUnrecognizedEnumValues: true,
|
1558
|
+
breadcrumbsPrefix: ["response"],
|
1559
|
+
}));
|
1560
|
+
default:
|
1561
|
+
throw new errors.VitalError({
|
1562
|
+
statusCode: _response.error.statusCode,
|
1563
|
+
body: _response.error.body,
|
1564
|
+
});
|
1565
|
+
}
|
1566
|
+
}
|
1567
|
+
switch (_response.error.reason) {
|
1568
|
+
case "non-json":
|
1569
|
+
throw new errors.VitalError({
|
1570
|
+
statusCode: _response.error.statusCode,
|
1571
|
+
body: _response.error.rawBody,
|
1572
|
+
});
|
1573
|
+
case "timeout":
|
1574
|
+
throw new errors.VitalTimeoutError();
|
1575
|
+
case "unknown":
|
1576
|
+
throw new errors.VitalError({
|
1577
|
+
message: _response.error.errorMessage,
|
1578
|
+
});
|
1579
|
+
}
|
1580
|
+
});
|
1581
|
+
}
|
1582
|
+
/**
|
1583
|
+
* @param {string} orderId - Your Order ID.
|
1584
|
+
* @param {Vital.AppointmentBookingRequest} request
|
1585
|
+
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
1586
|
+
*
|
1587
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1588
|
+
*
|
1589
|
+
* @example
|
1590
|
+
* await client.labTests.bookPscAppointment("order_id", {
|
1591
|
+
* bookingKey: "booking_key"
|
1592
|
+
* })
|
1593
|
+
*/
|
1594
|
+
bookPscAppointment(orderId, request, requestOptions) {
|
1595
|
+
var _a;
|
1596
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1597
|
+
const _response = yield core.fetcher({
|
1598
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment/book`),
|
1599
|
+
method: "POST",
|
1600
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1601
|
+
contentType: "application/json",
|
1602
|
+
requestType: "json",
|
1603
|
+
body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
1604
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1605
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1606
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1607
|
+
});
|
1608
|
+
if (_response.ok) {
|
1609
|
+
return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
|
1610
|
+
unrecognizedObjectKeys: "passthrough",
|
1611
|
+
allowUnrecognizedUnionMembers: true,
|
1612
|
+
allowUnrecognizedEnumValues: true,
|
1613
|
+
breadcrumbsPrefix: ["response"],
|
1614
|
+
});
|
1615
|
+
}
|
1616
|
+
if (_response.error.reason === "status-code") {
|
1617
|
+
switch (_response.error.statusCode) {
|
1618
|
+
case 422:
|
1619
|
+
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1620
|
+
unrecognizedObjectKeys: "passthrough",
|
1621
|
+
allowUnrecognizedUnionMembers: true,
|
1622
|
+
allowUnrecognizedEnumValues: true,
|
1623
|
+
breadcrumbsPrefix: ["response"],
|
1624
|
+
}));
|
1625
|
+
default:
|
1626
|
+
throw new errors.VitalError({
|
1627
|
+
statusCode: _response.error.statusCode,
|
1628
|
+
body: _response.error.body,
|
1629
|
+
});
|
1630
|
+
}
|
1631
|
+
}
|
1632
|
+
switch (_response.error.reason) {
|
1633
|
+
case "non-json":
|
1634
|
+
throw new errors.VitalError({
|
1635
|
+
statusCode: _response.error.statusCode,
|
1636
|
+
body: _response.error.rawBody,
|
1637
|
+
});
|
1638
|
+
case "timeout":
|
1639
|
+
throw new errors.VitalTimeoutError();
|
1640
|
+
case "unknown":
|
1641
|
+
throw new errors.VitalError({
|
1642
|
+
message: _response.error.errorMessage,
|
1643
|
+
});
|
1644
|
+
}
|
1645
|
+
});
|
1646
|
+
}
|
1647
|
+
/**
|
1648
|
+
* @param {string} orderId - Your Order ID.
|
1649
|
+
* @param {Vital.AppointmentRescheduleRequest} request
|
1650
|
+
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
1651
|
+
*
|
1652
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1653
|
+
*
|
1654
|
+
* @example
|
1655
|
+
* await client.labTests.reschedulePscAppointment("order_id", {
|
1656
|
+
* bookingKey: "booking_key"
|
1657
|
+
* })
|
1658
|
+
*/
|
1659
|
+
reschedulePscAppointment(orderId, request, requestOptions) {
|
1660
|
+
var _a;
|
1661
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1662
|
+
const _response = yield core.fetcher({
|
1663
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment/reschedule`),
|
1664
|
+
method: "PATCH",
|
1665
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1666
|
+
contentType: "application/json",
|
1667
|
+
requestType: "json",
|
1668
|
+
body: serializers.AppointmentRescheduleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
1669
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1670
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1671
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1672
|
+
});
|
1673
|
+
if (_response.ok) {
|
1674
|
+
return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
|
1675
|
+
unrecognizedObjectKeys: "passthrough",
|
1676
|
+
allowUnrecognizedUnionMembers: true,
|
1677
|
+
allowUnrecognizedEnumValues: true,
|
1678
|
+
breadcrumbsPrefix: ["response"],
|
1679
|
+
});
|
1680
|
+
}
|
1681
|
+
if (_response.error.reason === "status-code") {
|
1682
|
+
switch (_response.error.statusCode) {
|
1683
|
+
case 422:
|
1684
|
+
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1685
|
+
unrecognizedObjectKeys: "passthrough",
|
1686
|
+
allowUnrecognizedUnionMembers: true,
|
1687
|
+
allowUnrecognizedEnumValues: true,
|
1688
|
+
breadcrumbsPrefix: ["response"],
|
1689
|
+
}));
|
1690
|
+
default:
|
1691
|
+
throw new errors.VitalError({
|
1692
|
+
statusCode: _response.error.statusCode,
|
1693
|
+
body: _response.error.body,
|
1694
|
+
});
|
1695
|
+
}
|
1696
|
+
}
|
1697
|
+
switch (_response.error.reason) {
|
1698
|
+
case "non-json":
|
1699
|
+
throw new errors.VitalError({
|
1700
|
+
statusCode: _response.error.statusCode,
|
1701
|
+
body: _response.error.rawBody,
|
1702
|
+
});
|
1703
|
+
case "timeout":
|
1704
|
+
throw new errors.VitalTimeoutError();
|
1705
|
+
case "unknown":
|
1706
|
+
throw new errors.VitalError({
|
1707
|
+
message: _response.error.errorMessage,
|
1708
|
+
});
|
1709
|
+
}
|
1710
|
+
});
|
1711
|
+
}
|
1712
|
+
/**
|
1713
|
+
* @param {string} orderId - Your Order ID.
|
1714
|
+
* @param {Vital.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest} request
|
1715
|
+
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
1716
|
+
*
|
1717
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1718
|
+
*
|
1719
|
+
* @example
|
1720
|
+
* await client.labTests.cancelPscAppointment("order_id", {
|
1721
|
+
* cancellationReasonId: "cancellationReasonId"
|
1722
|
+
* })
|
1723
|
+
*/
|
1724
|
+
cancelPscAppointment(orderId, request, requestOptions) {
|
1725
|
+
var _a;
|
1726
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1727
|
+
const _response = yield core.fetcher({
|
1728
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${encodeURIComponent(orderId)}/psc/appointment/cancel`),
|
1729
|
+
method: "PATCH",
|
1730
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1731
|
+
contentType: "application/json",
|
1732
|
+
requestType: "json",
|
1733
|
+
body: serializers.VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest.jsonOrThrow(request, {
|
1734
|
+
unrecognizedObjectKeys: "strip",
|
1735
|
+
}),
|
1736
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1737
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1738
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1739
|
+
});
|
1740
|
+
if (_response.ok) {
|
1741
|
+
return serializers.ClientFacingAppointment.parseOrThrow(_response.body, {
|
1742
|
+
unrecognizedObjectKeys: "passthrough",
|
1743
|
+
allowUnrecognizedUnionMembers: true,
|
1744
|
+
allowUnrecognizedEnumValues: true,
|
1745
|
+
breadcrumbsPrefix: ["response"],
|
1746
|
+
});
|
1747
|
+
}
|
1748
|
+
if (_response.error.reason === "status-code") {
|
1749
|
+
switch (_response.error.statusCode) {
|
1750
|
+
case 422:
|
1751
|
+
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1752
|
+
unrecognizedObjectKeys: "passthrough",
|
1753
|
+
allowUnrecognizedUnionMembers: true,
|
1754
|
+
allowUnrecognizedEnumValues: true,
|
1755
|
+
breadcrumbsPrefix: ["response"],
|
1756
|
+
}));
|
1757
|
+
default:
|
1758
|
+
throw new errors.VitalError({
|
1759
|
+
statusCode: _response.error.statusCode,
|
1760
|
+
body: _response.error.body,
|
1761
|
+
});
|
1762
|
+
}
|
1763
|
+
}
|
1764
|
+
switch (_response.error.reason) {
|
1765
|
+
case "non-json":
|
1766
|
+
throw new errors.VitalError({
|
1767
|
+
statusCode: _response.error.statusCode,
|
1768
|
+
body: _response.error.rawBody,
|
1769
|
+
});
|
1770
|
+
case "timeout":
|
1771
|
+
throw new errors.VitalTimeoutError();
|
1772
|
+
case "unknown":
|
1773
|
+
throw new errors.VitalError({
|
1774
|
+
message: _response.error.errorMessage,
|
1775
|
+
});
|
1776
|
+
}
|
1777
|
+
});
|
1778
|
+
}
|
1779
|
+
/**
|
1780
|
+
* @param {LabTests.RequestOptions} requestOptions - Request-specific configuration.
|
1781
|
+
*
|
1782
|
+
* @example
|
1783
|
+
* await client.labTests.getPscAppointmentCancellationReason()
|
1784
|
+
*/
|
1785
|
+
getPscAppointmentCancellationReason(requestOptions) {
|
1786
|
+
var _a;
|
1787
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1788
|
+
const _response = yield core.fetcher({
|
1789
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/appointment/cancellation-reasons"),
|
1790
|
+
method: "GET",
|
1791
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1792
|
+
contentType: "application/json",
|
1793
|
+
requestType: "json",
|
1794
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1795
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1796
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1797
|
+
});
|
1798
|
+
if (_response.ok) {
|
1799
|
+
return serializers.labTests.getPscAppointmentCancellationReason.Response.parseOrThrow(_response.body, {
|
1800
|
+
unrecognizedObjectKeys: "passthrough",
|
1801
|
+
allowUnrecognizedUnionMembers: true,
|
1802
|
+
allowUnrecognizedEnumValues: true,
|
1803
|
+
breadcrumbsPrefix: ["response"],
|
1804
|
+
});
|
1805
|
+
}
|
1806
|
+
if (_response.error.reason === "status-code") {
|
1807
|
+
throw new errors.VitalError({
|
1808
|
+
statusCode: _response.error.statusCode,
|
1809
|
+
body: _response.error.body,
|
1810
|
+
});
|
1811
|
+
}
|
1812
|
+
switch (_response.error.reason) {
|
1813
|
+
case "non-json":
|
1814
|
+
throw new errors.VitalError({
|
1815
|
+
statusCode: _response.error.statusCode,
|
1816
|
+
body: _response.error.rawBody,
|
1817
|
+
});
|
1818
|
+
case "timeout":
|
1819
|
+
throw new errors.VitalTimeoutError();
|
1820
|
+
case "unknown":
|
1821
|
+
throw new errors.VitalError({
|
1822
|
+
message: _response.error.errorMessage,
|
1823
|
+
});
|
1824
|
+
}
|
1825
|
+
});
|
1826
|
+
}
|
1498
1827
|
/**
|
1499
1828
|
* GET requisition pdf for an order
|
1500
1829
|
* @throws {@link Vital.UnprocessableEntityError}
|
@@ -1505,7 +1834,7 @@ class LabTests {
|
|
1505
1834
|
const _response = yield core.fetcher({
|
1506
1835
|
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`),
|
1507
1836
|
method: "GET",
|
1508
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1837
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1509
1838
|
contentType: "application/json",
|
1510
1839
|
requestType: "json",
|
1511
1840
|
responseType: "streaming",
|
@@ -1564,7 +1893,7 @@ class LabTests {
|
|
1564
1893
|
const _response = yield core.fetcher({
|
1565
1894
|
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)}`),
|
1566
1895
|
method: "GET",
|
1567
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1896
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1568
1897
|
contentType: "application/json",
|
1569
1898
|
requestType: "json",
|
1570
1899
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1644,7 +1973,7 @@ class LabTests {
|
|
1644
1973
|
const _response = yield core.fetcher({
|
1645
1974
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
|
1646
1975
|
method: "POST",
|
1647
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1976
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1648
1977
|
contentType: "application/json",
|
1649
1978
|
requestType: "json",
|
1650
1979
|
body: serializers.CreateOrderRequestCompatible.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1708,7 +2037,7 @@ class LabTests {
|
|
1708
2037
|
const _response = yield core.fetcher({
|
1709
2038
|
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`),
|
1710
2039
|
method: "POST",
|
1711
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2040
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1712
2041
|
contentType: "application/json",
|
1713
2042
|
requestType: "json",
|
1714
2043
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1780,7 +2109,7 @@ class LabTests {
|
|
1780
2109
|
const _response = yield core.fetcher({
|
1781
2110
|
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`),
|
1782
2111
|
method: "POST",
|
1783
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2112
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1784
2113
|
contentType: "application/json",
|
1785
2114
|
queryParameters: _queryParams,
|
1786
2115
|
requestType: "json",
|
@@ -1885,7 +2214,7 @@ class LabTests {
|
|
1885
2214
|
const _response = yield core.fetcher({
|
1886
2215
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
|
1887
2216
|
method: "GET",
|
1888
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2217
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.86", "User-Agent": "@tryvital/vital-node/3.1.86", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1889
2218
|
contentType: "application/json",
|
1890
2219
|
queryParameters: _queryParams,
|
1891
2220
|
requestType: "json",
|