@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
@@ -25,21 +25,42 @@ export declare class Link {
|
|
25
25
|
* like to redirect to a custom url after successful or error connection,
|
26
26
|
* pass in your own custom redirect_url parameter.
|
27
27
|
* @throws {@link Vital.UnprocessableEntityError}
|
28
|
+
*
|
29
|
+
* @example
|
30
|
+
* await vital.link.token({
|
31
|
+
* userId: "user_id"
|
32
|
+
* })
|
28
33
|
*/
|
29
34
|
token(request: Vital.LinkTokenExchange, requestOptions?: Link.RequestOptions): Promise<Vital.LinkTokenExchangeResponse>;
|
30
35
|
/**
|
31
36
|
* @throws {@link Vital.UnprocessableEntityError}
|
37
|
+
*
|
38
|
+
* @example
|
39
|
+
* await vital.link.isTokenValid({
|
40
|
+
* token: "token"
|
41
|
+
* })
|
32
42
|
*/
|
33
43
|
isTokenValid(request: Vital.LinkTokenBase, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
|
34
44
|
/**
|
35
45
|
* Generate a token to invite a user of Vital mobile app to your team
|
36
46
|
* @throws {@link Vital.UnprocessableEntityError}
|
47
|
+
*
|
48
|
+
* @example
|
49
|
+
* await vital.link.codeCreate({
|
50
|
+
* userId: "user_id"
|
51
|
+
* })
|
37
52
|
*/
|
38
53
|
codeCreate(request: Vital.LinkCodeCreateRequest, requestOptions?: Link.RequestOptions): Promise<Vital.VitalTokenCreatedResponse>;
|
39
54
|
/**
|
40
55
|
* REQUEST_SOURCE: VITAL-LINK
|
41
56
|
* Start link token process
|
42
57
|
* @throws {@link Vital.UnprocessableEntityError}
|
58
|
+
*
|
59
|
+
* @example
|
60
|
+
* await vital.link.startConnect({
|
61
|
+
* linkToken: "link_token",
|
62
|
+
* provider: Vital.Providers.Oura
|
63
|
+
* })
|
43
64
|
*/
|
44
65
|
startConnect(request: Vital.BeginLinkTokenRequest, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
|
45
66
|
/**
|
@@ -54,26 +75,65 @@ export declare class Link {
|
|
54
75
|
/**
|
55
76
|
* Deprecated. Use `POST /v2/link/provider/email/{provider}` instead.
|
56
77
|
* @throws {@link Vital.UnprocessableEntityError}
|
78
|
+
*
|
79
|
+
* @example
|
80
|
+
* await vital.link.emailAuth({
|
81
|
+
* email: "email",
|
82
|
+
* provider: Vital.Providers.Oura,
|
83
|
+
* authType: Vital.AuthType.Password
|
84
|
+
* })
|
57
85
|
*/
|
58
86
|
emailAuth(request: Vital.EmailAuthLink, requestOptions?: Link.RequestOptions): Promise<Vital.ConnectionStatus>;
|
59
87
|
/**
|
60
88
|
* Deprecated. Use `POST /v2/link/provider/password/{provider}` instead.
|
61
89
|
* @throws {@link Vital.UnprocessableEntityError}
|
90
|
+
*
|
91
|
+
* @example
|
92
|
+
* await vital.link.passwordAuth({
|
93
|
+
* username: "username",
|
94
|
+
* password: "password",
|
95
|
+
* provider: Vital.Providers.Oura,
|
96
|
+
* authType: Vital.AuthType.Password
|
97
|
+
* })
|
62
98
|
*/
|
63
99
|
passwordAuth(request: Vital.PasswordAuthLink, requestOptions?: Link.RequestOptions): Promise<Vital.ConnectionStatus>;
|
64
100
|
/**
|
65
101
|
* This endpoint generates an OAuth link for oauth provider
|
66
102
|
* @throws {@link Vital.UnprocessableEntityError}
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* await vital.link.generateOauthLink(Vital.OAuthProviders.Oura)
|
67
106
|
*/
|
68
107
|
generateOauthLink(oauthProvider: Vital.OAuthProviders, request?: Vital.LinkGenerateOauthLinkRequest, requestOptions?: Link.RequestOptions): Promise<Vital.Source>;
|
69
108
|
/**
|
70
109
|
* This connects auth providers that are password based.
|
71
110
|
* @throws {@link Vital.UnprocessableEntityError}
|
111
|
+
*
|
112
|
+
* @example
|
113
|
+
* await vital.link.connectPasswordProvider(Vital.PasswordProviders.Whoop, {
|
114
|
+
* username: "username",
|
115
|
+
* password: "password"
|
116
|
+
* })
|
72
117
|
*/
|
73
118
|
connectPasswordProvider(provider: Vital.PasswordProviders, request: Vital.IndividualProviderData, requestOptions?: Link.RequestOptions): Promise<Vital.ProviderLinkResponse>;
|
119
|
+
/**
|
120
|
+
* This connects auth providers that are password based.
|
121
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
122
|
+
*
|
123
|
+
* @example
|
124
|
+
* await vital.link.completePasswordProviderMfa(Vital.PasswordProviders.Whoop, {
|
125
|
+
* mfaCode: "mfa_code"
|
126
|
+
* })
|
127
|
+
*/
|
128
|
+
completePasswordProviderMfa(provider: Vital.PasswordProviders, request: Vital.CompletePasswordProviderMfaBody, requestOptions?: Link.RequestOptions): Promise<Vital.ProviderLinkResponse>;
|
74
129
|
/**
|
75
130
|
* This connects auth providers that are email based.
|
76
131
|
* @throws {@link Vital.UnprocessableEntityError}
|
132
|
+
*
|
133
|
+
* @example
|
134
|
+
* await vital.link.connectEmailAuthProvider("freestyle_libre", {
|
135
|
+
* email: "email"
|
136
|
+
* })
|
77
137
|
*/
|
78
138
|
connectEmailAuthProvider(provider: Vital.EmailProviders, request: Vital.EmailProviderAuthLink, requestOptions?: Link.RequestOptions): Promise<Vital.ConnectionStatus>;
|
79
139
|
/**
|
@@ -86,11 +146,22 @@ export declare class Link {
|
|
86
146
|
getAllProviders(request?: Vital.LinkGetAllProvidersRequest, requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
|
87
147
|
/**
|
88
148
|
* @throws {@link Vital.UnprocessableEntityError}
|
149
|
+
*
|
150
|
+
* @example
|
151
|
+
* await vital.link.connectManualProvider(Vital.ManualProviders.BeurerBle, {
|
152
|
+
* userId: "user_id"
|
153
|
+
* })
|
89
154
|
*/
|
90
155
|
connectManualProvider(provider: Vital.ManualProviders, request: Vital.ManualConnectionData, requestOptions?: Link.RequestOptions): Promise<Record<string, boolean>>;
|
91
156
|
/**
|
92
157
|
* POST Connect the given Vital user to a demo provider.
|
93
158
|
* @throws {@link Vital.UnprocessableEntityError}
|
159
|
+
*
|
160
|
+
* @example
|
161
|
+
* await vital.link.connectDemoProvider({
|
162
|
+
* userId: "user_id",
|
163
|
+
* provider: Vital.DemoProviders.AppleHealthKit
|
164
|
+
* })
|
94
165
|
*/
|
95
166
|
connectDemoProvider(request: Vital.DemoConnectionCreationPayload, requestOptions?: Link.RequestOptions): Promise<Vital.DemoConnectionStatus>;
|
96
167
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
@@ -68,6 +68,11 @@ class Link {
|
|
68
68
|
* like to redirect to a custom url after successful or error connection,
|
69
69
|
* pass in your own custom redirect_url parameter.
|
70
70
|
* @throws {@link Vital.UnprocessableEntityError}
|
71
|
+
*
|
72
|
+
* @example
|
73
|
+
* await vital.link.token({
|
74
|
+
* userId: "user_id"
|
75
|
+
* })
|
71
76
|
*/
|
72
77
|
token(request, requestOptions) {
|
73
78
|
var _a;
|
@@ -75,7 +80,7 @@ class Link {
|
|
75
80
|
const _response = yield core.fetcher({
|
76
81
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/token"),
|
77
82
|
method: "POST",
|
78
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
83
|
+
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())),
|
79
84
|
contentType: "application/json",
|
80
85
|
body: yield serializers.LinkTokenExchange.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
81
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -122,6 +127,11 @@ class Link {
|
|
122
127
|
}
|
123
128
|
/**
|
124
129
|
* @throws {@link Vital.UnprocessableEntityError}
|
130
|
+
*
|
131
|
+
* @example
|
132
|
+
* await vital.link.isTokenValid({
|
133
|
+
* token: "token"
|
134
|
+
* })
|
125
135
|
*/
|
126
136
|
isTokenValid(request, requestOptions) {
|
127
137
|
var _a;
|
@@ -129,7 +139,7 @@ class Link {
|
|
129
139
|
const _response = yield core.fetcher({
|
130
140
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/token/isValid"),
|
131
141
|
method: "POST",
|
132
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
142
|
+
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())),
|
133
143
|
contentType: "application/json",
|
134
144
|
body: yield serializers.LinkTokenBase.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
135
145
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -177,6 +187,11 @@ class Link {
|
|
177
187
|
/**
|
178
188
|
* Generate a token to invite a user of Vital mobile app to your team
|
179
189
|
* @throws {@link Vital.UnprocessableEntityError}
|
190
|
+
*
|
191
|
+
* @example
|
192
|
+
* await vital.link.codeCreate({
|
193
|
+
* userId: "user_id"
|
194
|
+
* })
|
180
195
|
*/
|
181
196
|
codeCreate(request, requestOptions) {
|
182
197
|
var _a;
|
@@ -190,7 +205,7 @@ class Link {
|
|
190
205
|
const _response = yield core.fetcher({
|
191
206
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/code/create"),
|
192
207
|
method: "POST",
|
193
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
208
|
+
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())),
|
194
209
|
contentType: "application/json",
|
195
210
|
queryParameters: _queryParams,
|
196
211
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -239,6 +254,12 @@ class Link {
|
|
239
254
|
* REQUEST_SOURCE: VITAL-LINK
|
240
255
|
* Start link token process
|
241
256
|
* @throws {@link Vital.UnprocessableEntityError}
|
257
|
+
*
|
258
|
+
* @example
|
259
|
+
* await vital.link.startConnect({
|
260
|
+
* linkToken: "link_token",
|
261
|
+
* provider: Vital.Providers.Oura
|
262
|
+
* })
|
242
263
|
*/
|
243
264
|
startConnect(request, requestOptions) {
|
244
265
|
var _a;
|
@@ -246,7 +267,7 @@ class Link {
|
|
246
267
|
const _response = yield core.fetcher({
|
247
268
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/start"),
|
248
269
|
method: "POST",
|
249
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
270
|
+
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
271
|
contentType: "application/json",
|
251
272
|
body: yield serializers.BeginLinkTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
252
273
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -306,7 +327,7 @@ class Link {
|
|
306
327
|
const _response = yield core.fetcher({
|
307
328
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/state"),
|
308
329
|
method: "GET",
|
309
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
330
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
310
331
|
contentType: "application/json",
|
311
332
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
312
333
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -353,6 +374,13 @@ class Link {
|
|
353
374
|
/**
|
354
375
|
* Deprecated. Use `POST /v2/link/provider/email/{provider}` instead.
|
355
376
|
* @throws {@link Vital.UnprocessableEntityError}
|
377
|
+
*
|
378
|
+
* @example
|
379
|
+
* await vital.link.emailAuth({
|
380
|
+
* email: "email",
|
381
|
+
* provider: Vital.Providers.Oura,
|
382
|
+
* authType: Vital.AuthType.Password
|
383
|
+
* })
|
356
384
|
*/
|
357
385
|
emailAuth(request, requestOptions) {
|
358
386
|
var _a;
|
@@ -361,7 +389,7 @@ class Link {
|
|
361
389
|
const _response = yield core.fetcher({
|
362
390
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth/email"),
|
363
391
|
method: "POST",
|
364
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
392
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
365
393
|
contentType: "application/json",
|
366
394
|
body: yield serializers.EmailAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
367
395
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -409,6 +437,14 @@ class Link {
|
|
409
437
|
/**
|
410
438
|
* Deprecated. Use `POST /v2/link/provider/password/{provider}` instead.
|
411
439
|
* @throws {@link Vital.UnprocessableEntityError}
|
440
|
+
*
|
441
|
+
* @example
|
442
|
+
* await vital.link.passwordAuth({
|
443
|
+
* username: "username",
|
444
|
+
* password: "password",
|
445
|
+
* provider: Vital.Providers.Oura,
|
446
|
+
* authType: Vital.AuthType.Password
|
447
|
+
* })
|
412
448
|
*/
|
413
449
|
passwordAuth(request, requestOptions) {
|
414
450
|
var _a;
|
@@ -417,7 +453,7 @@ class Link {
|
|
417
453
|
const _response = yield core.fetcher({
|
418
454
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth"),
|
419
455
|
method: "POST",
|
420
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
456
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
421
457
|
contentType: "application/json",
|
422
458
|
body: yield serializers.PasswordAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
423
459
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -465,6 +501,9 @@ class Link {
|
|
465
501
|
/**
|
466
502
|
* This endpoint generates an OAuth link for oauth provider
|
467
503
|
* @throws {@link Vital.UnprocessableEntityError}
|
504
|
+
*
|
505
|
+
* @example
|
506
|
+
* await vital.link.generateOauthLink(Vital.OAuthProviders.Oura)
|
468
507
|
*/
|
469
508
|
generateOauthLink(oauthProvider, request = {}, requestOptions) {
|
470
509
|
var _a;
|
@@ -473,7 +512,7 @@ class Link {
|
|
473
512
|
const _response = yield core.fetcher({
|
474
513
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/oauth/${yield serializers.OAuthProviders.jsonOrThrow(oauthProvider)}`),
|
475
514
|
method: "GET",
|
476
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
515
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
477
516
|
contentType: "application/json",
|
478
517
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
479
518
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -520,15 +559,21 @@ class Link {
|
|
520
559
|
/**
|
521
560
|
* This connects auth providers that are password based.
|
522
561
|
* @throws {@link Vital.UnprocessableEntityError}
|
562
|
+
*
|
563
|
+
* @example
|
564
|
+
* await vital.link.connectPasswordProvider(Vital.PasswordProviders.Whoop, {
|
565
|
+
* username: "username",
|
566
|
+
* password: "password"
|
567
|
+
* })
|
523
568
|
*/
|
524
569
|
connectPasswordProvider(provider, request, requestOptions) {
|
525
570
|
var _a;
|
526
571
|
return __awaiter(this, void 0, void 0, function* () {
|
527
|
-
const {
|
572
|
+
const { vitalLinkToken } = request, _body = __rest(request, ["vitalLinkToken"]);
|
528
573
|
const _response = yield core.fetcher({
|
529
574
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${yield serializers.PasswordProviders.jsonOrThrow(provider)}`),
|
530
575
|
method: "POST",
|
531
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
576
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
532
577
|
contentType: "application/json",
|
533
578
|
body: yield serializers.IndividualProviderData.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
534
579
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -573,9 +618,77 @@ class Link {
|
|
573
618
|
}
|
574
619
|
});
|
575
620
|
}
|
621
|
+
/**
|
622
|
+
* This connects auth providers that are password based.
|
623
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
624
|
+
*
|
625
|
+
* @example
|
626
|
+
* await vital.link.completePasswordProviderMfa(Vital.PasswordProviders.Whoop, {
|
627
|
+
* mfaCode: "mfa_code"
|
628
|
+
* })
|
629
|
+
*/
|
630
|
+
completePasswordProviderMfa(provider, request, requestOptions) {
|
631
|
+
var _a;
|
632
|
+
return __awaiter(this, void 0, void 0, function* () {
|
633
|
+
const { vitalLinkToken } = request, _body = __rest(request, ["vitalLinkToken"]);
|
634
|
+
const _response = yield core.fetcher({
|
635
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${yield serializers.PasswordProviders.jsonOrThrow(provider)}/complete_mfa`),
|
636
|
+
method: "POST",
|
637
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
638
|
+
contentType: "application/json",
|
639
|
+
body: yield serializers.CompletePasswordProviderMfaBody.jsonOrThrow(_body, {
|
640
|
+
unrecognizedObjectKeys: "strip",
|
641
|
+
}),
|
642
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
643
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
644
|
+
});
|
645
|
+
if (_response.ok) {
|
646
|
+
return yield serializers.ProviderLinkResponse.parseOrThrow(_response.body, {
|
647
|
+
unrecognizedObjectKeys: "passthrough",
|
648
|
+
allowUnrecognizedUnionMembers: true,
|
649
|
+
allowUnrecognizedEnumValues: true,
|
650
|
+
breadcrumbsPrefix: ["response"],
|
651
|
+
});
|
652
|
+
}
|
653
|
+
if (_response.error.reason === "status-code") {
|
654
|
+
switch (_response.error.statusCode) {
|
655
|
+
case 422:
|
656
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
657
|
+
unrecognizedObjectKeys: "passthrough",
|
658
|
+
allowUnrecognizedUnionMembers: true,
|
659
|
+
allowUnrecognizedEnumValues: true,
|
660
|
+
breadcrumbsPrefix: ["response"],
|
661
|
+
}));
|
662
|
+
default:
|
663
|
+
throw new errors.VitalError({
|
664
|
+
statusCode: _response.error.statusCode,
|
665
|
+
body: _response.error.body,
|
666
|
+
});
|
667
|
+
}
|
668
|
+
}
|
669
|
+
switch (_response.error.reason) {
|
670
|
+
case "non-json":
|
671
|
+
throw new errors.VitalError({
|
672
|
+
statusCode: _response.error.statusCode,
|
673
|
+
body: _response.error.rawBody,
|
674
|
+
});
|
675
|
+
case "timeout":
|
676
|
+
throw new errors.VitalTimeoutError();
|
677
|
+
case "unknown":
|
678
|
+
throw new errors.VitalError({
|
679
|
+
message: _response.error.errorMessage,
|
680
|
+
});
|
681
|
+
}
|
682
|
+
});
|
683
|
+
}
|
576
684
|
/**
|
577
685
|
* This connects auth providers that are email based.
|
578
686
|
* @throws {@link Vital.UnprocessableEntityError}
|
687
|
+
*
|
688
|
+
* @example
|
689
|
+
* await vital.link.connectEmailAuthProvider("freestyle_libre", {
|
690
|
+
* email: "email"
|
691
|
+
* })
|
579
692
|
*/
|
580
693
|
connectEmailAuthProvider(provider, request, requestOptions) {
|
581
694
|
var _a;
|
@@ -584,7 +697,7 @@ class Link {
|
|
584
697
|
const _response = yield core.fetcher({
|
585
698
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/email/${yield serializers.EmailProviders.jsonOrThrow(provider)}`),
|
586
699
|
method: "POST",
|
587
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
700
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
588
701
|
contentType: "application/json",
|
589
702
|
body: yield serializers.EmailProviderAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
590
703
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -643,7 +756,7 @@ class Link {
|
|
643
756
|
const _response = yield core.fetcher({
|
644
757
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/providers"),
|
645
758
|
method: "GET",
|
646
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
759
|
+
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, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
647
760
|
contentType: "application/json",
|
648
761
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
649
762
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -689,6 +802,11 @@ class Link {
|
|
689
802
|
}
|
690
803
|
/**
|
691
804
|
* @throws {@link Vital.UnprocessableEntityError}
|
805
|
+
*
|
806
|
+
* @example
|
807
|
+
* await vital.link.connectManualProvider(Vital.ManualProviders.BeurerBle, {
|
808
|
+
* userId: "user_id"
|
809
|
+
* })
|
692
810
|
*/
|
693
811
|
connectManualProvider(provider, request, requestOptions) {
|
694
812
|
var _a;
|
@@ -696,7 +814,7 @@ class Link {
|
|
696
814
|
const _response = yield core.fetcher({
|
697
815
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/manual/${yield serializers.ManualProviders.jsonOrThrow(provider)}`),
|
698
816
|
method: "POST",
|
699
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
817
|
+
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())),
|
700
818
|
contentType: "application/json",
|
701
819
|
body: yield serializers.ManualConnectionData.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
702
820
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -744,6 +862,12 @@ class Link {
|
|
744
862
|
/**
|
745
863
|
* POST Connect the given Vital user to a demo provider.
|
746
864
|
* @throws {@link Vital.UnprocessableEntityError}
|
865
|
+
*
|
866
|
+
* @example
|
867
|
+
* await vital.link.connectDemoProvider({
|
868
|
+
* userId: "user_id",
|
869
|
+
* provider: Vital.DemoProviders.AppleHealthKit
|
870
|
+
* })
|
747
871
|
*/
|
748
872
|
connectDemoProvider(request, requestOptions) {
|
749
873
|
var _a;
|
@@ -751,7 +875,7 @@ class Link {
|
|
751
875
|
const _response = yield core.fetcher({
|
752
876
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/connect/demo"),
|
753
877
|
method: "POST",
|
754
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
878
|
+
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())),
|
755
879
|
contentType: "application/json",
|
756
880
|
body: yield serializers.DemoConnectionCreationPayload.jsonOrThrow(request, {
|
757
881
|
unrecognizedObjectKeys: "strip",
|
@@ -2,6 +2,13 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
import * as Vital from "../../../..";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* linkToken: "link_token",
|
9
|
+
* provider: Vital.Providers.Oura
|
10
|
+
* }
|
11
|
+
*/
|
5
12
|
export interface BeginLinkTokenRequest {
|
6
13
|
linkToken: string;
|
7
14
|
provider: Vital.Providers;
|
@@ -2,6 +2,13 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
import * as Vital from "../../../..";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* userId: "user_id",
|
9
|
+
* provider: Vital.DemoProviders.AppleHealthKit
|
10
|
+
* }
|
11
|
+
*/
|
5
12
|
export interface DemoConnectionCreationPayload {
|
6
13
|
/** Vital user ID */
|
7
14
|
userId: string;
|
@@ -2,6 +2,14 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
import * as Vital from "../../../..";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* email: "email",
|
9
|
+
* provider: Vital.Providers.Oura,
|
10
|
+
* authType: Vital.AuthType.Password
|
11
|
+
* }
|
12
|
+
*/
|
5
13
|
export interface EmailAuthLink {
|
6
14
|
vitalLinkToken?: string;
|
7
15
|
email: string;
|
@@ -1,11 +1,19 @@
|
|
1
1
|
/**
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
|
+
import * as Vital from "../../../..";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* username: "username",
|
9
|
+
* password: "password"
|
10
|
+
* }
|
11
|
+
*/
|
4
12
|
export interface IndividualProviderData {
|
5
|
-
vitalLinkClientRegion?: string;
|
6
13
|
vitalLinkToken?: string;
|
7
14
|
/** Username for provider */
|
8
15
|
username: string;
|
9
16
|
/** Password for provider */
|
10
17
|
password: string;
|
18
|
+
region?: Vital.Region;
|
11
19
|
}
|
@@ -2,6 +2,12 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
import * as Vital from "../../../..";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* userId: "user_id"
|
9
|
+
* }
|
10
|
+
*/
|
5
11
|
export interface LinkTokenExchange {
|
6
12
|
/** User id returned by vital create user request. This id should be stored in your database against the user and used for all interactions with the vital api. */
|
7
13
|
userId: string;
|
@@ -2,6 +2,15 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
import * as Vital from "../../../..";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* username: "username",
|
9
|
+
* password: "password",
|
10
|
+
* provider: Vital.Providers.Oura,
|
11
|
+
* authType: Vital.AuthType.Password
|
12
|
+
* }
|
13
|
+
*/
|
5
14
|
export interface PasswordAuthLink {
|
6
15
|
vitalLinkToken?: string;
|
7
16
|
username: string;
|
@@ -7,6 +7,7 @@ export { EmailAuthLink } from "./EmailAuthLink";
|
|
7
7
|
export { PasswordAuthLink } from "./PasswordAuthLink";
|
8
8
|
export { LinkGenerateOauthLinkRequest } from "./LinkGenerateOauthLinkRequest";
|
9
9
|
export { IndividualProviderData } from "./IndividualProviderData";
|
10
|
+
export { CompletePasswordProviderMfaBody } from "./CompletePasswordProviderMfaBody";
|
10
11
|
export { EmailProviderAuthLink } from "./EmailProviderAuthLink";
|
11
12
|
export { LinkGetAllProvidersRequest } from "./LinkGetAllProvidersRequest";
|
12
13
|
export { ManualConnectionData } from "./ManualConnectionData";
|