@tryvital/vital-node 3.1.7 → 3.1.9
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/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/resources/activity/client/Client.d.ts +4 -4
- package/api/resources/activity/client/Client.js +6 -6
- package/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +1 -1
- package/api/resources/activity/client/requests/ActivityGetRequest.d.ts +1 -1
- package/api/resources/body/client/Client.d.ts +4 -4
- package/api/resources/body/client/Client.js +6 -6
- package/api/resources/body/client/requests/BodyGetRawRequest.d.ts +1 -1
- package/api/resources/body/client/requests/BodyGetRequest.d.ts +1 -1
- package/api/resources/devices/client/Client.d.ts +1 -1
- package/api/resources/devices/client/Client.js +2 -2
- package/api/resources/insurance/client/Client.d.ts +6 -1
- package/api/resources/insurance/client/Client.js +8 -3
- package/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +1 -1
- package/api/resources/insurance/client/requests/PayorSearchRequest.d.ts +6 -0
- package/api/resources/introspect/client/Client.d.ts +2 -6
- package/api/resources/introspect/client/Client.js +4 -8
- package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +1 -3
- package/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +1 -3
- package/api/resources/labTests/client/Client.d.ts +70 -1
- package/api/resources/labTests/client/Client.js +122 -33
- package/api/resources/labTests/client/requests/AppointmentBookingRequest.d.ts +6 -0
- package/api/resources/labTests/client/requests/AppointmentCancelRequest.d.ts +6 -0
- package/api/resources/labTests/client/requests/AppointmentRescheduleRequest.d.ts +6 -0
- package/api/resources/labTests/client/requests/CreateLabTestRequest.d.ts +11 -0
- package/api/resources/labTests/client/requests/LabTestsGetAreaInfoRequest.d.ts +6 -0
- package/api/resources/labTests/client/requests/LabTestsSimulateOrderProcessRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +12 -0
- package/api/resources/link/client/Client.d.ts +71 -0
- package/api/resources/link/client/Client.js +138 -14
- package/api/resources/link/client/requests/BeginLinkTokenRequest.d.ts +7 -0
- package/api/resources/link/client/requests/CompletePasswordProviderMfaBody.d.ts +13 -0
- package/api/resources/link/client/requests/CompletePasswordProviderMfaBody.js +5 -0
- package/api/resources/link/client/requests/DemoConnectionCreationPayload.d.ts +7 -0
- package/api/resources/link/client/requests/EmailAuthLink.d.ts +8 -0
- package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +6 -0
- package/api/resources/link/client/requests/IndividualProviderData.d.ts +9 -1
- package/api/resources/link/client/requests/LinkCodeCreateRequest.d.ts +6 -0
- package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +4 -0
- package/api/resources/link/client/requests/LinkTokenBase.d.ts +6 -0
- package/api/resources/link/client/requests/LinkTokenExchange.d.ts +6 -0
- package/api/resources/link/client/requests/ManualConnectionData.d.ts +6 -0
- package/api/resources/link/client/requests/PasswordAuthLink.d.ts +9 -0
- package/api/resources/link/client/requests/index.d.ts +1 -0
- package/api/resources/meal/client/Client.d.ts +2 -2
- package/api/resources/meal/client/Client.js +3 -3
- package/api/resources/meal/client/requests/MealGetRequest.d.ts +1 -1
- package/api/resources/profile/client/Client.d.ts +6 -0
- package/api/resources/profile/client/Client.js +8 -2
- package/api/resources/profile/client/requests/ProfileGetRawRequest.d.ts +4 -0
- package/api/resources/profile/client/requests/ProfileGetRequest.d.ts +4 -0
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.d.ts +7 -7
- package/api/resources/sleep/client/Client.js +11 -11
- package/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +1 -1
- package/api/resources/sleep/client/requests/SleepGetRequest.d.ts +1 -1
- package/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +1 -1
- package/api/resources/team/client/Client.d.ts +5 -2
- package/api/resources/team/client/Client.js +12 -9
- package/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +1 -1
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.d.ts +34 -2
- package/api/resources/user/client/Client.js +46 -14
- package/api/resources/user/client/requests/UserCreateBody.d.ts +7 -1
- package/api/resources/user/client/requests/UserGetAllRequest.d.ts +4 -0
- package/api/resources/user/client/requests/UserPatchBody.d.ts +1 -1
- package/api/resources/user/client/requests/UserRefreshRequest.d.ts +4 -0
- package/api/resources/user/client/requests/UserUndoDeleteRequest.d.ts +4 -0
- package/api/resources/vitals/client/Client.d.ts +100 -100
- package/api/resources/vitals/client/Client.js +150 -150
- package/api/resources/vitals/client/requests/VitalsBloodOxygenGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBloodPressureGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBodyFatGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBodyFatRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBodyWeightGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsBodyWeightRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCaffeineGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCaloriesActiveGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCaloriesBasalGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCholesterolGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsCholesterolTriglyceridesRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsDistanceGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsFloorsClimbedGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsGlucoseGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsHeartrateGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsHrvGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsHypnogramGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsIgeGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsIggGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsRespiratoryRateGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsStepsGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsStressLevelGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsStressLevelRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsVo2MaxGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsVo2MaxRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsWaterGroupedRequest.d.ts +1 -1
- package/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +1 -1
- package/api/resources/workouts/client/Client.d.ts +5 -5
- package/api/resources/workouts/client/Client.js +8 -8
- package/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +1 -1
- package/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +1 -1
- package/api/types/AppointmentType.d.ts +3 -0
- package/api/types/ClientFacingCaloriesActiveTimeseries.d.ts +1 -0
- package/api/types/ClientFacingCaloriesBasalTimeseries.d.ts +1 -0
- package/api/types/ClientFacingDistanceTimeseries.d.ts +1 -0
- package/api/types/ClientFacingFloorsClimbedTimeseries.d.ts +1 -0
- package/api/types/ClientFacingStepsTimeseries.d.ts +1 -0
- package/api/types/ClientFacingUser.d.ts +1 -1
- package/api/types/ConnectionStatus.d.ts +3 -2
- package/api/types/ConnectionStatusState.d.ts +2 -1
- package/api/types/ConnectionStatusState.js +1 -0
- package/api/types/EmailProviders.d.ts +3 -0
- package/api/types/PasswordProviders.d.ts +2 -1
- package/api/types/PasswordProviders.js +1 -0
- package/api/types/ProfileInDb.d.ts +1 -1
- package/api/types/ProviderLinkResponse.d.ts +5 -3
- package/api/types/ProviderLinkResponseState.d.ts +2 -1
- package/api/types/ProviderLinkResponseState.js +1 -0
- package/api/types/ProviderMfaRequest.d.ts +8 -0
- package/api/types/ProviderMfaRequest.js +5 -0
- package/api/types/ProviderMfaRequestMethod.d.ts +8 -0
- package/api/types/ProviderMfaRequestMethod.js +10 -0
- package/api/types/Providers.d.ts +2 -1
- package/api/types/Providers.js +1 -0
- package/api/types/UserRefreshErrorResponse.d.ts +1 -1
- package/api/types/UserRefreshSuccessResponse.d.ts +1 -1
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/errors/index.d.ts +1 -1
- package/dist/api/errors/index.js +1 -1
- package/dist/api/resources/activity/client/Client.d.ts +4 -4
- package/dist/api/resources/activity/client/Client.js +6 -6
- package/dist/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +1 -1
- package/dist/api/resources/activity/client/requests/ActivityGetRequest.d.ts +1 -1
- package/dist/api/resources/body/client/Client.d.ts +4 -4
- package/dist/api/resources/body/client/Client.js +6 -6
- package/dist/api/resources/body/client/requests/BodyGetRawRequest.d.ts +1 -1
- package/dist/api/resources/body/client/requests/BodyGetRequest.d.ts +1 -1
- package/dist/api/resources/devices/client/Client.d.ts +1 -1
- package/dist/api/resources/devices/client/Client.js +2 -2
- package/dist/api/resources/insurance/client/Client.d.ts +6 -1
- package/dist/api/resources/insurance/client/Client.js +8 -3
- package/dist/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +1 -1
- package/dist/api/resources/insurance/client/requests/PayorSearchRequest.d.ts +6 -0
- package/dist/api/resources/introspect/client/Client.d.ts +2 -6
- package/dist/api/resources/introspect/client/Client.js +4 -8
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +1 -3
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +1 -3
- package/dist/api/resources/labTests/client/Client.d.ts +70 -1
- package/dist/api/resources/labTests/client/Client.js +122 -33
- package/dist/api/resources/labTests/client/requests/AppointmentBookingRequest.d.ts +6 -0
- package/dist/api/resources/labTests/client/requests/AppointmentCancelRequest.d.ts +6 -0
- package/dist/api/resources/labTests/client/requests/AppointmentRescheduleRequest.d.ts +6 -0
- package/dist/api/resources/labTests/client/requests/CreateLabTestRequest.d.ts +11 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetAreaInfoRequest.d.ts +6 -0
- package/dist/api/resources/labTests/client/requests/LabTestsSimulateOrderProcessRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +12 -0
- package/dist/api/resources/link/client/Client.d.ts +71 -0
- package/dist/api/resources/link/client/Client.js +138 -14
- package/dist/api/resources/link/client/requests/BeginLinkTokenRequest.d.ts +7 -0
- package/dist/api/resources/link/client/requests/CompletePasswordProviderMfaBody.d.ts +13 -0
- package/dist/api/resources/link/client/requests/CompletePasswordProviderMfaBody.js +5 -0
- package/dist/api/resources/link/client/requests/DemoConnectionCreationPayload.d.ts +7 -0
- package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +8 -0
- package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +6 -0
- package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +9 -1
- package/dist/api/resources/link/client/requests/LinkCodeCreateRequest.d.ts +6 -0
- package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +4 -0
- package/dist/api/resources/link/client/requests/LinkTokenBase.d.ts +6 -0
- package/dist/api/resources/link/client/requests/LinkTokenExchange.d.ts +6 -0
- package/dist/api/resources/link/client/requests/ManualConnectionData.d.ts +6 -0
- package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +9 -0
- package/dist/api/resources/link/client/requests/index.d.ts +1 -0
- package/dist/api/resources/meal/client/Client.d.ts +2 -2
- package/dist/api/resources/meal/client/Client.js +3 -3
- package/dist/api/resources/meal/client/requests/MealGetRequest.d.ts +1 -1
- package/dist/api/resources/profile/client/Client.d.ts +6 -0
- package/dist/api/resources/profile/client/Client.js +8 -2
- package/dist/api/resources/profile/client/requests/ProfileGetRawRequest.d.ts +4 -0
- package/dist/api/resources/profile/client/requests/ProfileGetRequest.d.ts +4 -0
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.d.ts +7 -7
- package/dist/api/resources/sleep/client/Client.js +11 -11
- package/dist/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +1 -1
- package/dist/api/resources/sleep/client/requests/SleepGetRequest.d.ts +1 -1
- package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +1 -1
- package/dist/api/resources/team/client/Client.d.ts +5 -2
- package/dist/api/resources/team/client/Client.js +12 -9
- package/dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +1 -1
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.d.ts +34 -2
- package/dist/api/resources/user/client/Client.js +46 -14
- package/dist/api/resources/user/client/requests/UserCreateBody.d.ts +7 -1
- package/dist/api/resources/user/client/requests/UserGetAllRequest.d.ts +4 -0
- package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +1 -1
- package/dist/api/resources/user/client/requests/UserRefreshRequest.d.ts +4 -0
- package/dist/api/resources/user/client/requests/UserUndoDeleteRequest.d.ts +4 -0
- package/dist/api/resources/vitals/client/Client.d.ts +100 -100
- package/dist/api/resources/vitals/client/Client.js +150 -150
- package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBloodPressureGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBodyFatGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBodyFatRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBodyWeightGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsBodyWeightRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCaffeineGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolTriglyceridesRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsDistanceGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsGlucoseGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsHeartrateGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsHrvGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsHypnogramGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsIgeGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsIggGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsStepsGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsStressLevelGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsStressLevelRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsVo2MaxGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsVo2MaxRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsWaterGroupedRequest.d.ts +1 -1
- package/dist/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +1 -1
- package/dist/api/resources/workouts/client/Client.d.ts +5 -5
- package/dist/api/resources/workouts/client/Client.js +8 -8
- package/dist/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +1 -1
- package/dist/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +1 -1
- package/dist/api/types/AppointmentType.d.ts +3 -0
- package/dist/api/types/ClientFacingCaloriesActiveTimeseries.d.ts +1 -0
- package/dist/api/types/ClientFacingCaloriesBasalTimeseries.d.ts +1 -0
- package/dist/api/types/ClientFacingDistanceTimeseries.d.ts +1 -0
- package/dist/api/types/ClientFacingFloorsClimbedTimeseries.d.ts +1 -0
- package/dist/api/types/ClientFacingStepsTimeseries.d.ts +1 -0
- package/dist/api/types/ClientFacingUser.d.ts +1 -1
- package/dist/api/types/ConnectionStatus.d.ts +3 -2
- package/dist/api/types/ConnectionStatusState.d.ts +2 -1
- package/dist/api/types/ConnectionStatusState.js +1 -0
- package/dist/api/types/EmailProviders.d.ts +3 -0
- package/dist/api/types/PasswordProviders.d.ts +2 -1
- package/dist/api/types/PasswordProviders.js +1 -0
- package/dist/api/types/ProfileInDb.d.ts +1 -1
- package/dist/api/types/ProviderLinkResponse.d.ts +5 -3
- package/dist/api/types/ProviderLinkResponseState.d.ts +2 -1
- package/dist/api/types/ProviderLinkResponseState.js +1 -0
- package/dist/api/types/ProviderMfaRequest.d.ts +8 -0
- package/dist/api/types/ProviderMfaRequest.js +5 -0
- package/dist/api/types/ProviderMfaRequestMethod.d.ts +8 -0
- package/dist/api/types/ProviderMfaRequestMethod.js +10 -0
- package/dist/api/types/Providers.d.ts +2 -1
- package/dist/api/types/Providers.js +1 -0
- package/dist/api/types/UserRefreshErrorResponse.d.ts +1 -1
- package/dist/api/types/UserRefreshSuccessResponse.d.ts +1 -1
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/resources/link/client/requests/CompletePasswordProviderMfaBody.d.ts +12 -0
- package/dist/serialization/resources/link/client/requests/CompletePasswordProviderMfaBody.js +33 -0
- package/dist/serialization/resources/link/client/requests/IndividualProviderData.d.ts +3 -1
- package/dist/serialization/resources/link/client/requests/IndividualProviderData.js +2 -0
- package/dist/serialization/resources/link/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/link/client/requests/index.js +3 -1
- package/dist/serialization/types/ConnectionStatus.d.ts +4 -2
- package/dist/serialization/types/ConnectionStatus.js +4 -2
- package/dist/serialization/types/ConnectionStatusState.d.ts +1 -1
- package/dist/serialization/types/ConnectionStatusState.js +1 -1
- package/dist/serialization/types/PasswordProviders.d.ts +1 -1
- package/dist/serialization/types/PasswordProviders.js +1 -0
- package/dist/serialization/types/ProfileInDb.d.ts +1 -1
- package/dist/serialization/types/ProfileInDb.js +1 -1
- package/dist/serialization/types/ProviderLinkResponse.d.ts +7 -4
- package/dist/serialization/types/ProviderLinkResponse.js +7 -4
- package/dist/serialization/types/ProviderLinkResponseState.d.ts +1 -1
- package/dist/serialization/types/ProviderLinkResponseState.js +1 -1
- package/dist/serialization/types/ProviderMfaRequest.d.ts +14 -0
- package/dist/serialization/types/ProviderMfaRequest.js +35 -0
- package/dist/serialization/types/ProviderMfaRequestMethod.d.ts +10 -0
- package/dist/serialization/types/ProviderMfaRequestMethod.js +31 -0
- package/dist/serialization/types/Providers.d.ts +1 -1
- package/dist/serialization/types/Providers.js +1 -0
- package/dist/serialization/types/UserRefreshErrorResponse.d.ts +1 -1
- package/dist/serialization/types/UserRefreshErrorResponse.js +1 -1
- package/dist/serialization/types/UserRefreshSuccessResponse.d.ts +1 -1
- package/dist/serialization/types/UserRefreshSuccessResponse.js +1 -1
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/package.json +1 -1
- package/serialization/resources/link/client/requests/CompletePasswordProviderMfaBody.d.ts +12 -0
- package/serialization/resources/link/client/requests/CompletePasswordProviderMfaBody.js +33 -0
- package/serialization/resources/link/client/requests/IndividualProviderData.d.ts +3 -1
- package/serialization/resources/link/client/requests/IndividualProviderData.js +2 -0
- package/serialization/resources/link/client/requests/index.d.ts +1 -0
- package/serialization/resources/link/client/requests/index.js +3 -1
- package/serialization/types/ConnectionStatus.d.ts +4 -2
- package/serialization/types/ConnectionStatus.js +4 -2
- package/serialization/types/ConnectionStatusState.d.ts +1 -1
- package/serialization/types/ConnectionStatusState.js +1 -1
- package/serialization/types/PasswordProviders.d.ts +1 -1
- package/serialization/types/PasswordProviders.js +1 -0
- package/serialization/types/ProfileInDb.d.ts +1 -1
- package/serialization/types/ProfileInDb.js +1 -1
- package/serialization/types/ProviderLinkResponse.d.ts +7 -4
- package/serialization/types/ProviderLinkResponse.js +7 -4
- package/serialization/types/ProviderLinkResponseState.d.ts +1 -1
- package/serialization/types/ProviderLinkResponseState.js +1 -1
- package/serialization/types/ProviderMfaRequest.d.ts +14 -0
- package/serialization/types/ProviderMfaRequest.js +35 -0
- package/serialization/types/ProviderMfaRequestMethod.d.ts +10 -0
- package/serialization/types/ProviderMfaRequestMethod.js +31 -0
- package/serialization/types/Providers.d.ts +1 -1
- package/serialization/types/Providers.js +1 -0
- package/serialization/types/UserRefreshErrorResponse.d.ts +1 -1
- package/serialization/types/UserRefreshErrorResponse.js +1 -1
- package/serialization/types/UserRefreshSuccessResponse.d.ts +1 -1
- package/serialization/types/UserRefreshSuccessResponse.js +1 -1
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
@@ -28,6 +28,16 @@ export declare class LabTests {
|
|
28
28
|
get(requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingLabTest[]>;
|
29
29
|
/**
|
30
30
|
* @throws {@link Vital.UnprocessableEntityError}
|
31
|
+
*
|
32
|
+
* @example
|
33
|
+
* await vital.labTests.create({
|
34
|
+
* markerIds: [1],
|
35
|
+
* labId: 1,
|
36
|
+
* name: "name",
|
37
|
+
* method: Vital.LabTestCollectionMethod.Testkit,
|
38
|
+
* sampleType: Vital.LabTestSampleType.DriedBloodSpot,
|
39
|
+
* description: "description"
|
40
|
+
* })
|
31
41
|
*/
|
32
42
|
create(request: Vital.CreateLabTestRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingLabTest>;
|
33
43
|
/**
|
@@ -42,12 +52,15 @@ export declare class LabTests {
|
|
42
52
|
* @throws {@link Vital.UnprocessableEntityError}
|
43
53
|
*
|
44
54
|
* @example
|
45
|
-
* await vital.labTests.getMarkersForLabTest("
|
55
|
+
* await vital.labTests.getMarkersForLabTest("lab_test_id")
|
46
56
|
*/
|
47
57
|
getMarkersForLabTest(labTestId: string, request?: Vital.LabTestsGetMarkersForLabTestRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.GetMarkersResponse>;
|
48
58
|
/**
|
49
59
|
* GET a specific marker for the given lab and provider_id
|
50
60
|
* @throws {@link Vital.UnprocessableEntityError}
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* await vital.labTests.getMarkersByLabAndProviderId("provider_id", 1)
|
51
64
|
*/
|
52
65
|
getMarkersByLabAndProviderId(providerId: string, labId: number, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingMarker>;
|
53
66
|
/**
|
@@ -60,32 +73,69 @@ export declare class LabTests {
|
|
60
73
|
/**
|
61
74
|
* GET all the lab tests the team has access to.
|
62
75
|
* @throws {@link Vital.UnprocessableEntityError}
|
76
|
+
*
|
77
|
+
* @example
|
78
|
+
* await vital.labTests.getById("lab_test_id")
|
63
79
|
*/
|
64
80
|
getById(labTestId: string, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingLabTest>;
|
65
81
|
/**
|
66
82
|
* Return the available time slots to book an appointment with a phlebotomist
|
67
83
|
* for the given address and order.
|
68
84
|
* @throws {@link Vital.UnprocessableEntityError}
|
85
|
+
*
|
86
|
+
* @example
|
87
|
+
* await vital.labTests.getPhlebotomyAppointmentAvailability({
|
88
|
+
* firstLine: "first_line",
|
89
|
+
* city: "city",
|
90
|
+
* state: "state",
|
91
|
+
* zipCode: "zip_code"
|
92
|
+
* })
|
69
93
|
*/
|
70
94
|
getPhlebotomyAppointmentAvailability(request: Vital.UsAddress, requestOptions?: LabTests.RequestOptions): Promise<Vital.AppointmentAvailabilitySlots>;
|
71
95
|
/**
|
72
96
|
* Book an at-home phlebotomy appointment.
|
73
97
|
* @throws {@link Vital.UnprocessableEntityError}
|
98
|
+
*
|
99
|
+
* @example
|
100
|
+
* await vital.labTests.bookPhlebotomyAppointment("order_id", {
|
101
|
+
* bookingKey: "booking_key"
|
102
|
+
* })
|
74
103
|
*/
|
75
104
|
bookPhlebotomyAppointment(orderId: string, request: Vital.AppointmentBookingRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
76
105
|
/**
|
77
106
|
* Request an at-home phlebotomy appointment.
|
78
107
|
* @throws {@link Vital.UnprocessableEntityError}
|
108
|
+
*
|
109
|
+
* @example
|
110
|
+
* await vital.labTests.requestPhlebotomyAppointment("order_id", {
|
111
|
+
* address: {
|
112
|
+
* firstLine: "first_line",
|
113
|
+
* city: "city",
|
114
|
+
* state: "state",
|
115
|
+
* zipCode: "zip_code"
|
116
|
+
* },
|
117
|
+
* provider: Vital.AppointmentProvider.Getlabs
|
118
|
+
* })
|
79
119
|
*/
|
80
120
|
requestPhlebotomyAppointment(orderId: string, request: Vital.RequestAppointmentRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
81
121
|
/**
|
82
122
|
* Reschedule a previously booked at-home phlebotomy appointment.
|
83
123
|
* @throws {@link Vital.UnprocessableEntityError}
|
124
|
+
*
|
125
|
+
* @example
|
126
|
+
* await vital.labTests.reschedulePhlebotomyAppointment("order_id", {
|
127
|
+
* bookingKey: "booking_key"
|
128
|
+
* })
|
84
129
|
*/
|
85
130
|
reschedulePhlebotomyAppointment(orderId: string, request: Vital.AppointmentRescheduleRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
86
131
|
/**
|
87
132
|
* Cancel a previously booked at-home phlebotomy appointment.
|
88
133
|
* @throws {@link Vital.UnprocessableEntityError}
|
134
|
+
*
|
135
|
+
* @example
|
136
|
+
* await vital.labTests.cancelPhlebotomyAppointment("order_id", {
|
137
|
+
* cancellationReasonId: "cancellation_reason_id"
|
138
|
+
* })
|
89
139
|
*/
|
90
140
|
cancelPhlebotomyAppointment(orderId: string, request: Vital.AppointmentCancelRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
91
141
|
/**
|
@@ -98,6 +148,9 @@ export declare class LabTests {
|
|
98
148
|
/**
|
99
149
|
* Get the appointment associated with an order.
|
100
150
|
* @throws {@link Vital.UnprocessableEntityError}
|
151
|
+
*
|
152
|
+
* @example
|
153
|
+
* await vital.labTests.getPhlebotomyAppointment("order_id")
|
101
154
|
*/
|
102
155
|
getPhlebotomyAppointment(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
103
156
|
/**
|
@@ -107,25 +160,38 @@ export declare class LabTests {
|
|
107
160
|
*
|
108
161
|
* - Whether a given zip code is served by our Phlebotomy network.
|
109
162
|
* @throws {@link Vital.UnprocessableEntityError}
|
163
|
+
*
|
164
|
+
* @example
|
165
|
+
* await vital.labTests.getAreaInfo({
|
166
|
+
* zipCode: "zip_code"
|
167
|
+
* })
|
110
168
|
*/
|
111
169
|
getAreaInfo(request: Vital.LabTestsGetAreaInfoRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.AreaInfo>;
|
112
170
|
/**
|
113
171
|
* This endpoint returns the lab results for the order.
|
172
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
114
173
|
*/
|
115
174
|
getResultPdf(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<stream.Readable>;
|
116
175
|
/**
|
117
176
|
* Return metadata related to order results, such as lab metadata,
|
118
177
|
* provider and sample dates.
|
119
178
|
* @throws {@link Vital.UnprocessableEntityError}
|
179
|
+
*
|
180
|
+
* @example
|
181
|
+
* await vital.labTests.getResultMetadata("order_id")
|
120
182
|
*/
|
121
183
|
getResultMetadata(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<Vital.LabResultsMetadata>;
|
122
184
|
/**
|
123
185
|
* Return both metadata and raw json test data
|
124
186
|
* @throws {@link Vital.UnprocessableEntityError}
|
187
|
+
*
|
188
|
+
* @example
|
189
|
+
* await vital.labTests.getResultRaw("order_id")
|
125
190
|
*/
|
126
191
|
getResultRaw(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<Vital.LabResultsRaw>;
|
127
192
|
/**
|
128
193
|
* GET requisition pdf for an order
|
194
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
129
195
|
*/
|
130
196
|
getOrderRequistionPdf(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<stream.Readable>;
|
131
197
|
/**
|
@@ -146,6 +212,9 @@ export declare class LabTests {
|
|
146
212
|
/**
|
147
213
|
* Get available test kits.
|
148
214
|
* @throws {@link Vital.UnprocessableEntityError}
|
215
|
+
*
|
216
|
+
* @example
|
217
|
+
* await vital.labTests.simulateOrderProcess("order_id")
|
149
218
|
*/
|
150
219
|
simulateOrderProcess(orderId: string, request?: Vital.LabTestsSimulateOrderProcessRequest, requestOptions?: LabTests.RequestOptions): Promise<unknown>;
|
151
220
|
/**
|
@@ -61,7 +61,7 @@ class LabTests {
|
|
61
61
|
const _response = yield core.fetcher({
|
62
62
|
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"),
|
63
63
|
method: "GET",
|
64
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
64
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
65
65
|
contentType: "application/json",
|
66
66
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
67
67
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -97,6 +97,16 @@ class LabTests {
|
|
97
97
|
}
|
98
98
|
/**
|
99
99
|
* @throws {@link Vital.UnprocessableEntityError}
|
100
|
+
*
|
101
|
+
* @example
|
102
|
+
* await vital.labTests.create({
|
103
|
+
* markerIds: [1],
|
104
|
+
* labId: 1,
|
105
|
+
* name: "name",
|
106
|
+
* method: Vital.LabTestCollectionMethod.Testkit,
|
107
|
+
* sampleType: Vital.LabTestSampleType.DriedBloodSpot,
|
108
|
+
* description: "description"
|
109
|
+
* })
|
100
110
|
*/
|
101
111
|
create(request, requestOptions) {
|
102
112
|
var _a;
|
@@ -104,7 +114,7 @@ class LabTests {
|
|
104
114
|
const _response = yield core.fetcher({
|
105
115
|
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"),
|
106
116
|
method: "POST",
|
107
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
117
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
108
118
|
contentType: "application/json",
|
109
119
|
body: yield serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
110
120
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -181,7 +191,7 @@ class LabTests {
|
|
181
191
|
const _response = yield core.fetcher({
|
182
192
|
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"),
|
183
193
|
method: "GET",
|
184
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
194
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
185
195
|
contentType: "application/json",
|
186
196
|
queryParameters: _queryParams,
|
187
197
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -230,7 +240,7 @@ class LabTests {
|
|
230
240
|
* @throws {@link Vital.UnprocessableEntityError}
|
231
241
|
*
|
232
242
|
* @example
|
233
|
-
* await vital.labTests.getMarkersForLabTest("
|
243
|
+
* await vital.labTests.getMarkersForLabTest("lab_test_id")
|
234
244
|
*/
|
235
245
|
getMarkersForLabTest(labTestId, request = {}, requestOptions) {
|
236
246
|
var _a;
|
@@ -246,7 +256,7 @@ class LabTests {
|
|
246
256
|
const _response = yield core.fetcher({
|
247
257
|
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/${labTestId}/markers`),
|
248
258
|
method: "GET",
|
249
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
259
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
250
260
|
contentType: "application/json",
|
251
261
|
queryParameters: _queryParams,
|
252
262
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -294,6 +304,9 @@ class LabTests {
|
|
294
304
|
/**
|
295
305
|
* GET a specific marker for the given lab and provider_id
|
296
306
|
* @throws {@link Vital.UnprocessableEntityError}
|
307
|
+
*
|
308
|
+
* @example
|
309
|
+
* await vital.labTests.getMarkersByLabAndProviderId("provider_id", 1)
|
297
310
|
*/
|
298
311
|
getMarkersByLabAndProviderId(providerId, labId, requestOptions) {
|
299
312
|
var _a;
|
@@ -301,7 +314,7 @@ class LabTests {
|
|
301
314
|
const _response = yield core.fetcher({
|
302
315
|
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/${labId}/markers/${providerId}`),
|
303
316
|
method: "GET",
|
304
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
317
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
305
318
|
contentType: "application/json",
|
306
319
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
307
320
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -357,7 +370,7 @@ class LabTests {
|
|
357
370
|
const _response = yield core.fetcher({
|
358
371
|
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"),
|
359
372
|
method: "GET",
|
360
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
373
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
361
374
|
contentType: "application/json",
|
362
375
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
363
376
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -394,6 +407,9 @@ class LabTests {
|
|
394
407
|
/**
|
395
408
|
* GET all the lab tests the team has access to.
|
396
409
|
* @throws {@link Vital.UnprocessableEntityError}
|
410
|
+
*
|
411
|
+
* @example
|
412
|
+
* await vital.labTests.getById("lab_test_id")
|
397
413
|
*/
|
398
414
|
getById(labTestId, requestOptions) {
|
399
415
|
var _a;
|
@@ -401,7 +417,7 @@ class LabTests {
|
|
401
417
|
const _response = yield core.fetcher({
|
402
418
|
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/${labTestId}`),
|
403
419
|
method: "GET",
|
404
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
420
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
405
421
|
contentType: "application/json",
|
406
422
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
407
423
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -449,6 +465,14 @@ class LabTests {
|
|
449
465
|
* Return the available time slots to book an appointment with a phlebotomist
|
450
466
|
* for the given address and order.
|
451
467
|
* @throws {@link Vital.UnprocessableEntityError}
|
468
|
+
*
|
469
|
+
* @example
|
470
|
+
* await vital.labTests.getPhlebotomyAppointmentAvailability({
|
471
|
+
* firstLine: "first_line",
|
472
|
+
* city: "city",
|
473
|
+
* state: "state",
|
474
|
+
* zipCode: "zip_code"
|
475
|
+
* })
|
452
476
|
*/
|
453
477
|
getPhlebotomyAppointmentAvailability(request, requestOptions) {
|
454
478
|
var _a;
|
@@ -456,7 +480,7 @@ class LabTests {
|
|
456
480
|
const _response = yield core.fetcher({
|
457
481
|
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"),
|
458
482
|
method: "POST",
|
459
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
483
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
460
484
|
contentType: "application/json",
|
461
485
|
body: yield serializers.UsAddress.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
462
486
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -504,6 +528,11 @@ class LabTests {
|
|
504
528
|
/**
|
505
529
|
* Book an at-home phlebotomy appointment.
|
506
530
|
* @throws {@link Vital.UnprocessableEntityError}
|
531
|
+
*
|
532
|
+
* @example
|
533
|
+
* await vital.labTests.bookPhlebotomyAppointment("order_id", {
|
534
|
+
* bookingKey: "booking_key"
|
535
|
+
* })
|
507
536
|
*/
|
508
537
|
bookPhlebotomyAppointment(orderId, request, requestOptions) {
|
509
538
|
var _a;
|
@@ -511,7 +540,7 @@ class LabTests {
|
|
511
540
|
const _response = yield core.fetcher({
|
512
541
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/phlebotomy/appointment/book`),
|
513
542
|
method: "POST",
|
514
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
543
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
515
544
|
contentType: "application/json",
|
516
545
|
body: yield serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
517
546
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -559,6 +588,17 @@ class LabTests {
|
|
559
588
|
/**
|
560
589
|
* Request an at-home phlebotomy appointment.
|
561
590
|
* @throws {@link Vital.UnprocessableEntityError}
|
591
|
+
*
|
592
|
+
* @example
|
593
|
+
* await vital.labTests.requestPhlebotomyAppointment("order_id", {
|
594
|
+
* address: {
|
595
|
+
* firstLine: "first_line",
|
596
|
+
* city: "city",
|
597
|
+
* state: "state",
|
598
|
+
* zipCode: "zip_code"
|
599
|
+
* },
|
600
|
+
* provider: Vital.AppointmentProvider.Getlabs
|
601
|
+
* })
|
562
602
|
*/
|
563
603
|
requestPhlebotomyAppointment(orderId, request, requestOptions) {
|
564
604
|
var _a;
|
@@ -566,7 +606,7 @@ class LabTests {
|
|
566
606
|
const _response = yield core.fetcher({
|
567
607
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/phlebotomy/appointment/request`),
|
568
608
|
method: "POST",
|
569
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
609
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
570
610
|
contentType: "application/json",
|
571
611
|
body: yield serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
572
612
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -614,6 +654,11 @@ class LabTests {
|
|
614
654
|
/**
|
615
655
|
* Reschedule a previously booked at-home phlebotomy appointment.
|
616
656
|
* @throws {@link Vital.UnprocessableEntityError}
|
657
|
+
*
|
658
|
+
* @example
|
659
|
+
* await vital.labTests.reschedulePhlebotomyAppointment("order_id", {
|
660
|
+
* bookingKey: "booking_key"
|
661
|
+
* })
|
617
662
|
*/
|
618
663
|
reschedulePhlebotomyAppointment(orderId, request, requestOptions) {
|
619
664
|
var _a;
|
@@ -621,7 +666,7 @@ class LabTests {
|
|
621
666
|
const _response = yield core.fetcher({
|
622
667
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/phlebotomy/appointment/reschedule`),
|
623
668
|
method: "PATCH",
|
624
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
669
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
625
670
|
contentType: "application/json",
|
626
671
|
body: yield serializers.AppointmentRescheduleRequest.jsonOrThrow(request, {
|
627
672
|
unrecognizedObjectKeys: "strip",
|
@@ -671,6 +716,11 @@ class LabTests {
|
|
671
716
|
/**
|
672
717
|
* Cancel a previously booked at-home phlebotomy appointment.
|
673
718
|
* @throws {@link Vital.UnprocessableEntityError}
|
719
|
+
*
|
720
|
+
* @example
|
721
|
+
* await vital.labTests.cancelPhlebotomyAppointment("order_id", {
|
722
|
+
* cancellationReasonId: "cancellation_reason_id"
|
723
|
+
* })
|
674
724
|
*/
|
675
725
|
cancelPhlebotomyAppointment(orderId, request, requestOptions) {
|
676
726
|
var _a;
|
@@ -678,7 +728,7 @@ class LabTests {
|
|
678
728
|
const _response = yield core.fetcher({
|
679
729
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/phlebotomy/appointment/cancel`),
|
680
730
|
method: "PATCH",
|
681
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
731
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
682
732
|
contentType: "application/json",
|
683
733
|
body: yield serializers.AppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
684
734
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -735,7 +785,7 @@ class LabTests {
|
|
735
785
|
const _response = yield core.fetcher({
|
736
786
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/cancellation-reasons"),
|
737
787
|
method: "GET",
|
738
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
788
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
739
789
|
contentType: "application/json",
|
740
790
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
741
791
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -772,6 +822,9 @@ class LabTests {
|
|
772
822
|
/**
|
773
823
|
* Get the appointment associated with an order.
|
774
824
|
* @throws {@link Vital.UnprocessableEntityError}
|
825
|
+
*
|
826
|
+
* @example
|
827
|
+
* await vital.labTests.getPhlebotomyAppointment("order_id")
|
775
828
|
*/
|
776
829
|
getPhlebotomyAppointment(orderId, requestOptions) {
|
777
830
|
var _a;
|
@@ -779,7 +832,7 @@ class LabTests {
|
|
779
832
|
const _response = yield core.fetcher({
|
780
833
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/phlebotomy/appointment`),
|
781
834
|
method: "GET",
|
782
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
835
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
783
836
|
contentType: "application/json",
|
784
837
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
785
838
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -830,6 +883,11 @@ class LabTests {
|
|
830
883
|
*
|
831
884
|
* - Whether a given zip code is served by our Phlebotomy network.
|
832
885
|
* @throws {@link Vital.UnprocessableEntityError}
|
886
|
+
*
|
887
|
+
* @example
|
888
|
+
* await vital.labTests.getAreaInfo({
|
889
|
+
* zipCode: "zip_code"
|
890
|
+
* })
|
833
891
|
*/
|
834
892
|
getAreaInfo(request, requestOptions) {
|
835
893
|
var _a;
|
@@ -840,7 +898,7 @@ class LabTests {
|
|
840
898
|
const _response = yield core.fetcher({
|
841
899
|
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"),
|
842
900
|
method: "GET",
|
843
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
901
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
844
902
|
contentType: "application/json",
|
845
903
|
queryParameters: _queryParams,
|
846
904
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -887,6 +945,7 @@ class LabTests {
|
|
887
945
|
}
|
888
946
|
/**
|
889
947
|
* This endpoint returns the lab results for the order.
|
948
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
890
949
|
*/
|
891
950
|
getResultPdf(orderId, requestOptions) {
|
892
951
|
var _a;
|
@@ -894,7 +953,7 @@ class LabTests {
|
|
894
953
|
const _response = yield core.fetcher({
|
895
954
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/result/pdf`),
|
896
955
|
method: "GET",
|
897
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
956
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
898
957
|
contentType: "application/json",
|
899
958
|
responseType: "streaming",
|
900
959
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -904,10 +963,20 @@ class LabTests {
|
|
904
963
|
return _response.body;
|
905
964
|
}
|
906
965
|
if (_response.error.reason === "status-code") {
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
966
|
+
switch (_response.error.statusCode) {
|
967
|
+
case 422:
|
968
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
969
|
+
unrecognizedObjectKeys: "passthrough",
|
970
|
+
allowUnrecognizedUnionMembers: true,
|
971
|
+
allowUnrecognizedEnumValues: true,
|
972
|
+
breadcrumbsPrefix: ["response"],
|
973
|
+
}));
|
974
|
+
default:
|
975
|
+
throw new errors.VitalError({
|
976
|
+
statusCode: _response.error.statusCode,
|
977
|
+
body: _response.error.body,
|
978
|
+
});
|
979
|
+
}
|
911
980
|
}
|
912
981
|
switch (_response.error.reason) {
|
913
982
|
case "non-json":
|
@@ -928,6 +997,9 @@ class LabTests {
|
|
928
997
|
* Return metadata related to order results, such as lab metadata,
|
929
998
|
* provider and sample dates.
|
930
999
|
* @throws {@link Vital.UnprocessableEntityError}
|
1000
|
+
*
|
1001
|
+
* @example
|
1002
|
+
* await vital.labTests.getResultMetadata("order_id")
|
931
1003
|
*/
|
932
1004
|
getResultMetadata(orderId, requestOptions) {
|
933
1005
|
var _a;
|
@@ -935,7 +1007,7 @@ class LabTests {
|
|
935
1007
|
const _response = yield core.fetcher({
|
936
1008
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/result/metadata`),
|
937
1009
|
method: "GET",
|
938
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1010
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
939
1011
|
contentType: "application/json",
|
940
1012
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
941
1013
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -982,6 +1054,9 @@ class LabTests {
|
|
982
1054
|
/**
|
983
1055
|
* Return both metadata and raw json test data
|
984
1056
|
* @throws {@link Vital.UnprocessableEntityError}
|
1057
|
+
*
|
1058
|
+
* @example
|
1059
|
+
* await vital.labTests.getResultRaw("order_id")
|
985
1060
|
*/
|
986
1061
|
getResultRaw(orderId, requestOptions) {
|
987
1062
|
var _a;
|
@@ -989,7 +1064,7 @@ class LabTests {
|
|
989
1064
|
const _response = yield core.fetcher({
|
990
1065
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/result`),
|
991
1066
|
method: "GET",
|
992
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1067
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
993
1068
|
contentType: "application/json",
|
994
1069
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
995
1070
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1035,6 +1110,7 @@ class LabTests {
|
|
1035
1110
|
}
|
1036
1111
|
/**
|
1037
1112
|
* GET requisition pdf for an order
|
1113
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1038
1114
|
*/
|
1039
1115
|
getOrderRequistionPdf(orderId, requestOptions) {
|
1040
1116
|
var _a;
|
@@ -1042,7 +1118,7 @@ class LabTests {
|
|
1042
1118
|
const _response = yield core.fetcher({
|
1043
1119
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/requisition/pdf`),
|
1044
1120
|
method: "GET",
|
1045
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1121
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1046
1122
|
contentType: "application/json",
|
1047
1123
|
responseType: "streaming",
|
1048
1124
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1052,10 +1128,20 @@ class LabTests {
|
|
1052
1128
|
return _response.body;
|
1053
1129
|
}
|
1054
1130
|
if (_response.error.reason === "status-code") {
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1131
|
+
switch (_response.error.statusCode) {
|
1132
|
+
case 422:
|
1133
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1134
|
+
unrecognizedObjectKeys: "passthrough",
|
1135
|
+
allowUnrecognizedUnionMembers: true,
|
1136
|
+
allowUnrecognizedEnumValues: true,
|
1137
|
+
breadcrumbsPrefix: ["response"],
|
1138
|
+
}));
|
1139
|
+
default:
|
1140
|
+
throw new errors.VitalError({
|
1141
|
+
statusCode: _response.error.statusCode,
|
1142
|
+
body: _response.error.body,
|
1143
|
+
});
|
1144
|
+
}
|
1059
1145
|
}
|
1060
1146
|
switch (_response.error.reason) {
|
1061
1147
|
case "non-json":
|
@@ -1082,7 +1168,7 @@ class LabTests {
|
|
1082
1168
|
const _response = yield core.fetcher({
|
1083
1169
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}`),
|
1084
1170
|
method: "GET",
|
1085
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1171
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1086
1172
|
contentType: "application/json",
|
1087
1173
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1088
1174
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1136,7 +1222,7 @@ class LabTests {
|
|
1136
1222
|
const _response = yield core.fetcher({
|
1137
1223
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
|
1138
1224
|
method: "POST",
|
1139
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1225
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1140
1226
|
contentType: "application/json",
|
1141
1227
|
body: yield serializers.CreateOrderRequestCompatible.jsonOrThrow(request, {
|
1142
1228
|
unrecognizedObjectKeys: "strip",
|
@@ -1193,7 +1279,7 @@ class LabTests {
|
|
1193
1279
|
const _response = yield core.fetcher({
|
1194
1280
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/cancel`),
|
1195
1281
|
method: "POST",
|
1196
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1282
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1197
1283
|
contentType: "application/json",
|
1198
1284
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1199
1285
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1240,6 +1326,9 @@ class LabTests {
|
|
1240
1326
|
/**
|
1241
1327
|
* Get available test kits.
|
1242
1328
|
* @throws {@link Vital.UnprocessableEntityError}
|
1329
|
+
*
|
1330
|
+
* @example
|
1331
|
+
* await vital.labTests.simulateOrderProcess("order_id")
|
1243
1332
|
*/
|
1244
1333
|
simulateOrderProcess(orderId, request = {}, requestOptions) {
|
1245
1334
|
var _a;
|
@@ -1255,7 +1344,7 @@ class LabTests {
|
|
1255
1344
|
const _response = yield core.fetcher({
|
1256
1345
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/test`),
|
1257
1346
|
method: "POST",
|
1258
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1347
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1259
1348
|
contentType: "application/json",
|
1260
1349
|
queryParameters: _queryParams,
|
1261
1350
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1336,7 +1425,7 @@ class LabTests {
|
|
1336
1425
|
const _response = yield core.fetcher({
|
1337
1426
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
|
1338
1427
|
method: "GET",
|
1339
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1428
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1340
1429
|
contentType: "application/json",
|
1341
1430
|
queryParameters: _queryParams,
|
1342
1431
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|