@tryvital/vital-node 3.0.6 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +1 -0
- package/api/errors/BadRequestError.js +1 -0
- package/api/errors/UnprocessableEntityError.js +1 -0
- package/api/resources/activity/client/Client.d.ts +11 -0
- package/api/resources/activity/client/Client.js +22 -11
- package/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
- package/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
- package/api/resources/body/client/Client.d.ts +11 -0
- package/api/resources/body/client/Client.js +22 -11
- package/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
- package/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
- package/api/resources/devices/client/Client.d.ts +4 -0
- package/api/resources/devices/client/Client.js +7 -4
- package/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
- package/api/resources/insurance/client/Client.d.ts +6 -0
- package/api/resources/insurance/client/Client.js +11 -5
- package/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
- package/api/resources/introspect/client/Client.d.ts +11 -0
- package/api/resources/introspect/client/Client.js +24 -13
- package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
- package/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
- package/api/resources/labTests/client/Client.d.ts +26 -1
- package/api/resources/labTests/client/Client.js +173 -58
- package/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
- package/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +9 -0
- package/api/resources/labTests/client/requests/index.d.ts +1 -0
- package/api/resources/link/client/Client.d.ts +7 -0
- package/api/resources/link/client/Client.js +35 -17
- package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
- package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
- package/api/resources/meal/client/Client.d.ts +6 -0
- package/api/resources/meal/client/Client.js +11 -6
- package/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
- package/api/resources/profile/client/Client.d.ts +1 -0
- package/api/resources/profile/client/Client.js +8 -7
- package/api/resources/providers/client/Client.d.ts +4 -0
- package/api/resources/providers/client/Client.js +5 -1
- package/api/resources/sleep/client/Client.d.ts +19 -0
- package/api/resources/sleep/client/Client.js +38 -17
- package/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
- package/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
- package/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
- package/api/resources/team/client/Client.d.ts +18 -0
- package/api/resources/team/client/Client.js +37 -14
- package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
- package/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
- package/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
- package/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
- package/api/resources/testkit/client/Client.d.ts +1 -0
- package/api/resources/testkit/client/Client.js +4 -2
- package/api/resources/user/client/Client.d.ts +8 -1
- package/api/resources/user/client/Client.js +38 -16
- package/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
- package/api/resources/user/client/requests/UserRefreshRequest.d.ts +6 -0
- package/api/resources/user/client/requests/index.d.ts +1 -0
- package/api/resources/vitals/client/Client.d.ts +116 -0
- package/api/resources/vitals/client/Client.js +253 -116
- package/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
- package/api/resources/workouts/client/Client.d.ts +14 -0
- package/api/resources/workouts/client/Client.js +27 -12
- package/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
- package/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
- package/api/types/AppointmentEventStatus.d.ts +2 -1
- package/api/types/AppointmentEventStatus.js +1 -0
- package/api/types/AppointmentProvider.d.ts +2 -1
- package/api/types/AppointmentProvider.js +1 -0
- package/api/types/AppointmentServiceType.d.ts +11 -0
- package/api/types/AppointmentServiceType.js +10 -0
- package/api/types/ClientFacingAppointment.d.ts +3 -3
- package/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
- package/api/types/ClientFacingLabTest.d.ts +1 -1
- package/api/types/ClientFacingOrder.d.ts +1 -1
- package/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
- package/api/types/ClientFacingSleep.d.ts +1 -1
- package/api/types/ClientFacingUser.d.ts +0 -1
- package/api/types/FallbackTimeZone.d.ts +0 -1
- package/api/types/OrderStatus.d.ts +2 -1
- package/api/types/OrderStatus.js +1 -0
- package/api/types/PhlebotomyAreaInfo.d.ts +2 -0
- package/api/types/PhlebotomyProviderInfo.d.ts +8 -0
- package/api/types/UserRefreshSuccessResponse.d.ts +1 -0
- package/api/types/UserSignInTokenResponse.d.ts +1 -2
- package/api/types/index.d.ts +9 -9
- package/api/types/index.js +9 -9
- package/core/fetcher/APIResponse.d.ts +1 -0
- package/core/fetcher/Fetcher.d.ts +3 -6
- package/core/fetcher/Fetcher.js +70 -26
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/{streaming-fetcher → fetcher}/getHeader.js +2 -2
- package/core/fetcher/index.d.ts +1 -0
- package/core/fetcher/index.js +3 -1
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/core/schemas/Schema.d.ts +1 -0
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +1 -0
- package/core/schemas/builders/literals/index.js +3 -1
- package/core/schemas/builders/object/index.d.ts +2 -0
- package/core/schemas/builders/object/index.js +3 -1
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/Client.d.ts +1 -0
- package/dist/api/errors/BadRequestError.js +1 -0
- package/dist/api/errors/UnprocessableEntityError.js +1 -0
- package/dist/api/resources/activity/client/Client.d.ts +11 -0
- package/dist/api/resources/activity/client/Client.js +22 -11
- package/dist/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
- package/dist/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
- package/dist/api/resources/body/client/Client.d.ts +11 -0
- package/dist/api/resources/body/client/Client.js +22 -11
- package/dist/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
- package/dist/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
- package/dist/api/resources/devices/client/Client.d.ts +4 -0
- package/dist/api/resources/devices/client/Client.js +7 -4
- package/dist/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
- package/dist/api/resources/insurance/client/Client.d.ts +6 -0
- package/dist/api/resources/insurance/client/Client.js +11 -5
- package/dist/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
- package/dist/api/resources/introspect/client/Client.d.ts +11 -0
- package/dist/api/resources/introspect/client/Client.js +24 -13
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
- package/dist/api/resources/labTests/client/Client.d.ts +26 -1
- package/dist/api/resources/labTests/client/Client.js +173 -58
- package/dist/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +9 -0
- package/dist/api/resources/labTests/client/requests/index.d.ts +1 -0
- package/dist/api/resources/link/client/Client.d.ts +7 -0
- package/dist/api/resources/link/client/Client.js +35 -17
- package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
- package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
- package/dist/api/resources/meal/client/Client.d.ts +6 -0
- package/dist/api/resources/meal/client/Client.js +11 -6
- package/dist/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
- package/dist/api/resources/profile/client/Client.d.ts +1 -0
- package/dist/api/resources/profile/client/Client.js +8 -7
- package/dist/api/resources/providers/client/Client.d.ts +4 -0
- package/dist/api/resources/providers/client/Client.js +5 -1
- package/dist/api/resources/sleep/client/Client.d.ts +19 -0
- package/dist/api/resources/sleep/client/Client.js +38 -17
- package/dist/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
- package/dist/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
- package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
- package/dist/api/resources/team/client/Client.d.ts +18 -0
- package/dist/api/resources/team/client/Client.js +37 -14
- package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
- package/dist/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
- package/dist/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
- package/dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
- package/dist/api/resources/testkit/client/Client.d.ts +1 -0
- package/dist/api/resources/testkit/client/Client.js +4 -2
- package/dist/api/resources/user/client/Client.d.ts +8 -1
- package/dist/api/resources/user/client/Client.js +38 -16
- package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
- package/dist/api/resources/user/client/requests/UserRefreshRequest.d.ts +6 -0
- package/dist/api/resources/user/client/requests/UserRefreshRequest.js +5 -0
- package/dist/api/resources/user/client/requests/index.d.ts +1 -0
- package/dist/api/resources/vitals/client/Client.d.ts +116 -0
- package/dist/api/resources/vitals/client/Client.js +253 -116
- package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
- package/dist/api/resources/workouts/client/Client.d.ts +14 -0
- package/dist/api/resources/workouts/client/Client.js +27 -12
- package/dist/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
- package/dist/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
- package/dist/api/types/AppointmentEventStatus.d.ts +2 -1
- package/dist/api/types/AppointmentEventStatus.js +1 -0
- package/dist/api/types/AppointmentProvider.d.ts +2 -1
- package/dist/api/types/AppointmentProvider.js +1 -0
- package/dist/api/types/AppointmentServiceType.d.ts +11 -0
- package/dist/api/types/AppointmentServiceType.js +10 -0
- package/dist/api/types/ClientFacingAppointment.d.ts +3 -3
- package/dist/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
- package/dist/api/types/ClientFacingLabTest.d.ts +1 -1
- package/dist/api/types/ClientFacingOrder.d.ts +1 -1
- package/dist/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
- package/dist/api/types/ClientFacingSleep.d.ts +1 -1
- package/dist/api/types/ClientFacingUser.d.ts +0 -1
- package/dist/api/types/FallbackTimeZone.d.ts +0 -1
- package/dist/api/types/OrderStatus.d.ts +2 -1
- package/dist/api/types/OrderStatus.js +1 -0
- package/dist/api/types/PhlebotomyAreaInfo.d.ts +2 -0
- package/dist/api/types/PhlebotomyProviderInfo.d.ts +8 -0
- package/dist/api/types/PhlebotomyProviderInfo.js +5 -0
- package/dist/api/types/UserRefreshSuccessResponse.d.ts +1 -0
- package/dist/api/types/UserSignInTokenResponse.d.ts +1 -2
- package/dist/api/types/index.d.ts +9 -9
- package/dist/api/types/index.js +9 -9
- package/dist/core/fetcher/APIResponse.d.ts +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +3 -6
- package/dist/core/fetcher/Fetcher.js +70 -26
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/{streaming-fetcher → fetcher}/getHeader.js +2 -2
- package/dist/core/fetcher/index.d.ts +1 -0
- package/dist/core/fetcher/index.js +3 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/schemas/Schema.d.ts +1 -0
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +1 -0
- package/dist/core/schemas/builders/literals/index.js +3 -1
- package/dist/core/schemas/builders/object/index.d.ts +2 -0
- package/dist/core/schemas/builders/object/index.js +3 -1
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/serialization/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +13 -0
- package/dist/serialization/resources/labTests/client/requests/RequestAppointmentRequest.js +43 -0
- package/dist/serialization/resources/labTests/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/labTests/client/requests/index.js +3 -1
- package/dist/serialization/types/AppointmentEventStatus.d.ts +1 -1
- package/dist/serialization/types/AppointmentEventStatus.js +1 -1
- package/dist/serialization/types/AppointmentProvider.d.ts +1 -1
- package/dist/serialization/types/AppointmentProvider.js +1 -1
- package/dist/serialization/types/AppointmentServiceType.d.ts +10 -0
- package/{serialization/types/UserSignInToken.js → dist/serialization/types/AppointmentServiceType.js} +2 -5
- package/dist/serialization/types/ClientFacingAppointment.d.ts +3 -3
- package/dist/serialization/types/ClientFacingAppointment.js +3 -3
- package/dist/serialization/types/OrderStatus.d.ts +1 -1
- package/dist/serialization/types/OrderStatus.js +1 -0
- package/dist/serialization/types/PhlebotomyAreaInfo.d.ts +1 -0
- package/dist/serialization/types/PhlebotomyAreaInfo.js +10 -0
- package/dist/serialization/types/PhlebotomyProviderInfo.d.ts +13 -0
- package/{serialization/types/UserSignInTokenResponseSignInToken.js → dist/serialization/types/PhlebotomyProviderInfo.js} +5 -5
- package/dist/serialization/types/UserRefreshSuccessResponse.d.ts +1 -0
- package/dist/serialization/types/UserRefreshSuccessResponse.js +1 -0
- package/dist/serialization/types/UserSignInTokenResponse.d.ts +1 -1
- package/dist/serialization/types/UserSignInTokenResponse.js +1 -10
- package/dist/serialization/types/index.d.ts +9 -9
- package/dist/serialization/types/index.js +9 -9
- package/package.json +7 -4
- package/serialization/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +13 -0
- package/serialization/resources/labTests/client/requests/RequestAppointmentRequest.js +43 -0
- package/serialization/resources/labTests/client/requests/index.d.ts +1 -0
- package/serialization/resources/labTests/client/requests/index.js +3 -1
- package/serialization/types/AppointmentEventStatus.d.ts +1 -1
- package/serialization/types/AppointmentEventStatus.js +1 -1
- package/serialization/types/AppointmentProvider.d.ts +1 -1
- package/serialization/types/AppointmentProvider.js +1 -1
- package/serialization/types/AppointmentServiceType.d.ts +10 -0
- package/{dist/serialization/types/UserSignInToken.js → serialization/types/AppointmentServiceType.js} +2 -5
- package/serialization/types/ClientFacingAppointment.d.ts +3 -3
- package/serialization/types/ClientFacingAppointment.js +3 -3
- package/serialization/types/OrderStatus.d.ts +1 -1
- package/serialization/types/OrderStatus.js +1 -0
- package/serialization/types/PhlebotomyAreaInfo.d.ts +1 -0
- package/serialization/types/PhlebotomyAreaInfo.js +10 -0
- package/serialization/types/PhlebotomyProviderInfo.d.ts +13 -0
- package/{dist/serialization/types/UserSignInTokenResponseSignInToken.js → serialization/types/PhlebotomyProviderInfo.js} +5 -5
- package/serialization/types/UserRefreshSuccessResponse.d.ts +1 -0
- package/serialization/types/UserRefreshSuccessResponse.js +1 -0
- package/serialization/types/UserSignInTokenResponse.d.ts +1 -1
- package/serialization/types/UserSignInTokenResponse.js +1 -10
- package/serialization/types/index.d.ts +9 -9
- package/serialization/types/index.js +9 -9
- package/api/types/UserSignInToken.d.ts +0 -7
- package/api/types/UserSignInTokenResponseSignInToken.d.ts +0 -5
- package/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
- package/core/streaming-fetcher/StreamingFetcher.js +0 -79
- package/core/streaming-fetcher/getHeader.d.ts +0 -2
- package/core/streaming-fetcher/index.d.ts +0 -3
- package/core/streaming-fetcher/index.js +0 -7
- package/dist/api/types/UserSignInToken.d.ts +0 -7
- package/dist/api/types/UserSignInTokenResponseSignInToken.d.ts +0 -5
- package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
- package/dist/core/streaming-fetcher/StreamingFetcher.js +0 -79
- package/dist/core/streaming-fetcher/getHeader.d.ts +0 -2
- package/dist/core/streaming-fetcher/index.d.ts +0 -3
- package/dist/core/streaming-fetcher/index.js +0 -7
- package/dist/serialization/types/UserSignInToken.d.ts +0 -13
- package/dist/serialization/types/UserSignInTokenResponseSignInToken.d.ts +0 -10
- package/serialization/types/UserSignInToken.d.ts +0 -13
- package/serialization/types/UserSignInTokenResponseSignInToken.d.ts +0 -10
- /package/api/{types/UserSignInToken.js → resources/labTests/client/requests/RequestAppointmentRequest.js} +0 -0
- /package/api/{types/UserSignInTokenResponseSignInToken.js → resources/user/client/requests/UserRefreshRequest.js} +0 -0
- /package/{dist/api/types/UserSignInToken.js → api/types/PhlebotomyProviderInfo.js} +0 -0
- /package/dist/api/{types/UserSignInTokenResponseSignInToken.js → resources/labTests/client/requests/RequestAppointmentRequest.js} +0 -0
@@ -4,7 +4,7 @@
|
|
4
4
|
/**
|
5
5
|
* An enumeration.
|
6
6
|
*/
|
7
|
-
export declare type OrderStatus = "received.walk_in_test.ordered" | "received.walk_in_test.requisition_created" | "completed.walk_in_test.completed" | "sample_with_lab.walk_in_test.partial_results" | "failed.walk_in_test.sample_error" | "cancelled.walk_in_test.cancelled" | "received.at_home_phlebotomy.ordered" | "received.at_home_phlebotomy.requisition_created" | "collecting_sample.at_home_phlebotomy.appointment_scheduled" | "collecting_sample.at_home_phlebotomy.draw_completed" | "collecting_sample.at_home_phlebotomy.appointment_cancelled" | "completed.at_home_phlebotomy.completed" | "sample_with_lab.at_home_phlebotomy.partial_results" | "cancelled.at_home_phlebotomy.cancelled" | "received.testkit.ordered" | "received.testkit.awaiting_registration" | "received.testkit.requisition_created" | "received.testkit.registered" | "collecting_sample.testkit.transit_customer" | "collecting_sample.testkit.out_for_delivery" | "collecting_sample.testkit.with_customer" | "collecting_sample.testkit.transit_lab" | "sample_with_lab.testkit.delivered_to_lab" | "completed.testkit.completed" | "failed.testkit.failure_to_deliver_to_customer" | "failed.testkit.failure_to_deliver_to_lab" | "failed.testkit.sample_error" | "failed.testkit.lost" | "cancelled.testkit.cancelled" | "cancelled.testkit.do_not_process";
|
7
|
+
export declare type OrderStatus = "received.walk_in_test.ordered" | "received.walk_in_test.requisition_created" | "completed.walk_in_test.completed" | "sample_with_lab.walk_in_test.partial_results" | "failed.walk_in_test.sample_error" | "cancelled.walk_in_test.cancelled" | "received.at_home_phlebotomy.ordered" | "received.at_home_phlebotomy.requisition_created" | "collecting_sample.at_home_phlebotomy.appointment_pending" | "collecting_sample.at_home_phlebotomy.appointment_scheduled" | "collecting_sample.at_home_phlebotomy.draw_completed" | "collecting_sample.at_home_phlebotomy.appointment_cancelled" | "completed.at_home_phlebotomy.completed" | "sample_with_lab.at_home_phlebotomy.partial_results" | "cancelled.at_home_phlebotomy.cancelled" | "received.testkit.ordered" | "received.testkit.awaiting_registration" | "received.testkit.requisition_created" | "received.testkit.registered" | "collecting_sample.testkit.transit_customer" | "collecting_sample.testkit.out_for_delivery" | "collecting_sample.testkit.with_customer" | "collecting_sample.testkit.transit_lab" | "sample_with_lab.testkit.delivered_to_lab" | "completed.testkit.completed" | "failed.testkit.failure_to_deliver_to_customer" | "failed.testkit.failure_to_deliver_to_lab" | "failed.testkit.sample_error" | "failed.testkit.lost" | "cancelled.testkit.cancelled" | "cancelled.testkit.do_not_process";
|
8
8
|
export declare const OrderStatus: {
|
9
9
|
readonly ReceivedWalkInTestOrdered: "received.walk_in_test.ordered";
|
10
10
|
readonly ReceivedWalkInTestRequisitionCreated: "received.walk_in_test.requisition_created";
|
@@ -14,6 +14,7 @@ export declare const OrderStatus: {
|
|
14
14
|
readonly CancelledWalkInTestCancelled: "cancelled.walk_in_test.cancelled";
|
15
15
|
readonly ReceivedAtHomePhlebotomyOrdered: "received.at_home_phlebotomy.ordered";
|
16
16
|
readonly ReceivedAtHomePhlebotomyRequisitionCreated: "received.at_home_phlebotomy.requisition_created";
|
17
|
+
readonly CollectingSampleAtHomePhlebotomyAppointmentPending: "collecting_sample.at_home_phlebotomy.appointment_pending";
|
17
18
|
readonly CollectingSampleAtHomePhlebotomyAppointmentScheduled: "collecting_sample.at_home_phlebotomy.appointment_scheduled";
|
18
19
|
readonly CollectingSampleAtHomePhlebotomyDrawCompleted: "collecting_sample.at_home_phlebotomy.draw_completed";
|
19
20
|
readonly CollectingSampleAtHomePhlebotomyAppointmentCancelled: "collecting_sample.at_home_phlebotomy.appointment_cancelled";
|
@@ -13,6 +13,7 @@ exports.OrderStatus = {
|
|
13
13
|
CancelledWalkInTestCancelled: "cancelled.walk_in_test.cancelled",
|
14
14
|
ReceivedAtHomePhlebotomyOrdered: "received.at_home_phlebotomy.ordered",
|
15
15
|
ReceivedAtHomePhlebotomyRequisitionCreated: "received.at_home_phlebotomy.requisition_created",
|
16
|
+
CollectingSampleAtHomePhlebotomyAppointmentPending: "collecting_sample.at_home_phlebotomy.appointment_pending",
|
16
17
|
CollectingSampleAtHomePhlebotomyAppointmentScheduled: "collecting_sample.at_home_phlebotomy.appointment_scheduled",
|
17
18
|
CollectingSampleAtHomePhlebotomyDrawCompleted: "collecting_sample.at_home_phlebotomy.draw_completed",
|
18
19
|
CollectingSampleAtHomePhlebotomyAppointmentCancelled: "collecting_sample.at_home_phlebotomy.appointment_cancelled",
|
@@ -7,5 +7,6 @@ export interface UserRefreshSuccessResponse {
|
|
7
7
|
/** A unique ID representing the end user. Typically this will be a user ID from your application. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id. */
|
8
8
|
userId: string;
|
9
9
|
refreshedSources: string[];
|
10
|
+
inProgressSources: string[];
|
10
11
|
failedSources: string[];
|
11
12
|
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export * from "./UsAddress";
|
2
1
|
export * from "./ActivityV2InDb";
|
3
2
|
export * from "./Address";
|
4
3
|
export * from "./AppointmentAvailabilitySlots";
|
5
4
|
export * from "./AppointmentEventStatus";
|
6
5
|
export * from "./AppointmentProvider";
|
6
|
+
export * from "./AppointmentServiceType";
|
7
7
|
export * from "./AppointmentStatus";
|
8
8
|
export * from "./AppointmentType";
|
9
9
|
export * from "./AreaInfo";
|
@@ -46,8 +46,8 @@ export * from "./ClientFacingMarker";
|
|
46
46
|
export * from "./ClientFacingMarkerComplete";
|
47
47
|
export * from "./ClientFacingMealResponse";
|
48
48
|
export * from "./ClientFacingMindfulnessMinutesTimeseries";
|
49
|
-
export * from "./ClientFacingOrder";
|
50
49
|
export * from "./ClientFacingOrderDetails";
|
50
|
+
export * from "./ClientFacingOrder";
|
51
51
|
export * from "./ClientFacingOrderEvent";
|
52
52
|
export * from "./ClientFacingPatientDetailsCompatible";
|
53
53
|
export * from "./ClientFacingPayorSearchResponse";
|
@@ -88,24 +88,24 @@ export * from "./DemoProviders";
|
|
88
88
|
export * from "./DeviceV2InDb";
|
89
89
|
export * from "./EmailProviders";
|
90
90
|
export * from "./Energy";
|
91
|
-
export * from "./EventDestinationPreferences";
|
92
91
|
export * from "./EventDestinationPreferencesPreferred";
|
93
92
|
export * from "./EventDestinationPreferencesEnabledItem";
|
93
|
+
export * from "./EventDestinationPreferences";
|
94
94
|
export * from "./FallbackTimeZone";
|
95
95
|
export * from "./Fats";
|
96
96
|
export * from "./Gender";
|
97
97
|
export * from "./GetMarkersResponse";
|
98
98
|
export * from "./GetOrdersResponse";
|
99
99
|
export * from "./HttpValidationError";
|
100
|
-
export * from "./HealthInsuranceCreateRequest";
|
101
100
|
export * from "./HealthInsuranceCreateRequestFrontImage";
|
102
101
|
export * from "./HealthInsuranceCreateRequestBackImage";
|
103
102
|
export * from "./HealthInsuranceCreateRequestPatientSignatureImage";
|
103
|
+
export * from "./HealthInsuranceCreateRequest";
|
104
104
|
export * from "./HistoricalPullStatus";
|
105
105
|
export * from "./Jpeg";
|
106
106
|
export * from "./LabResultsMetadata";
|
107
|
-
export * from "./LabResultsRaw";
|
108
107
|
export * from "./LabResultsRawResults";
|
108
|
+
export * from "./LabResultsRaw";
|
109
109
|
export * from "./LabTestCollectionMethod";
|
110
110
|
export * from "./LabTestSampleType";
|
111
111
|
export * from "./LabTestStatus";
|
@@ -128,8 +128,9 @@ export * from "./PatientAddressCompatible";
|
|
128
128
|
export * from "./PatientDetails";
|
129
129
|
export * from "./PersonDetails";
|
130
130
|
export * from "./PhlebotomyAreaInfo";
|
131
|
-
export * from "./
|
131
|
+
export * from "./PhlebotomyProviderInfo";
|
132
132
|
export * from "./PhysicianCreateRequestSignatureImage";
|
133
|
+
export * from "./PhysicianCreateRequest";
|
133
134
|
export * from "./PhysicianCreateRequestBase";
|
134
135
|
export * from "./Png";
|
135
136
|
export * from "./PostOrderResponse";
|
@@ -160,15 +161,14 @@ export * from "./TeamConfig";
|
|
160
161
|
export * from "./TimeSlot";
|
161
162
|
export * from "./TimeseriesMetricPoint";
|
162
163
|
export * from "./TimeseriesResource";
|
164
|
+
export * from "./UsAddress";
|
163
165
|
export * from "./UserHistoricalPullsResponse";
|
164
166
|
export * from "./UserRefreshErrorResponse";
|
165
167
|
export * from "./UserRefreshSuccessResponse";
|
166
168
|
export * from "./UserResourcesResponse";
|
167
|
-
export * from "./UserSignInToken";
|
168
169
|
export * from "./UserSignInTokenResponse";
|
169
|
-
export * from "./UserSignInTokenResponseSignInToken";
|
170
170
|
export * from "./UserSuccessResponse";
|
171
|
-
export * from "./ValidationError";
|
172
171
|
export * from "./ValidationErrorLocItem";
|
172
|
+
export * from "./ValidationError";
|
173
173
|
export * from "./VitalTokenCreatedResponse";
|
174
174
|
export * from "./WorkoutV2InDb";
|
package/dist/api/types/index.js
CHANGED
@@ -14,12 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./UsAddress"), exports);
|
18
17
|
__exportStar(require("./ActivityV2InDb"), exports);
|
19
18
|
__exportStar(require("./Address"), exports);
|
20
19
|
__exportStar(require("./AppointmentAvailabilitySlots"), exports);
|
21
20
|
__exportStar(require("./AppointmentEventStatus"), exports);
|
22
21
|
__exportStar(require("./AppointmentProvider"), exports);
|
22
|
+
__exportStar(require("./AppointmentServiceType"), exports);
|
23
23
|
__exportStar(require("./AppointmentStatus"), exports);
|
24
24
|
__exportStar(require("./AppointmentType"), exports);
|
25
25
|
__exportStar(require("./AreaInfo"), exports);
|
@@ -62,8 +62,8 @@ __exportStar(require("./ClientFacingMarker"), exports);
|
|
62
62
|
__exportStar(require("./ClientFacingMarkerComplete"), exports);
|
63
63
|
__exportStar(require("./ClientFacingMealResponse"), exports);
|
64
64
|
__exportStar(require("./ClientFacingMindfulnessMinutesTimeseries"), exports);
|
65
|
-
__exportStar(require("./ClientFacingOrder"), exports);
|
66
65
|
__exportStar(require("./ClientFacingOrderDetails"), exports);
|
66
|
+
__exportStar(require("./ClientFacingOrder"), exports);
|
67
67
|
__exportStar(require("./ClientFacingOrderEvent"), exports);
|
68
68
|
__exportStar(require("./ClientFacingPatientDetailsCompatible"), exports);
|
69
69
|
__exportStar(require("./ClientFacingPayorSearchResponse"), exports);
|
@@ -104,24 +104,24 @@ __exportStar(require("./DemoProviders"), exports);
|
|
104
104
|
__exportStar(require("./DeviceV2InDb"), exports);
|
105
105
|
__exportStar(require("./EmailProviders"), exports);
|
106
106
|
__exportStar(require("./Energy"), exports);
|
107
|
-
__exportStar(require("./EventDestinationPreferences"), exports);
|
108
107
|
__exportStar(require("./EventDestinationPreferencesPreferred"), exports);
|
109
108
|
__exportStar(require("./EventDestinationPreferencesEnabledItem"), exports);
|
109
|
+
__exportStar(require("./EventDestinationPreferences"), exports);
|
110
110
|
__exportStar(require("./FallbackTimeZone"), exports);
|
111
111
|
__exportStar(require("./Fats"), exports);
|
112
112
|
__exportStar(require("./Gender"), exports);
|
113
113
|
__exportStar(require("./GetMarkersResponse"), exports);
|
114
114
|
__exportStar(require("./GetOrdersResponse"), exports);
|
115
115
|
__exportStar(require("./HttpValidationError"), exports);
|
116
|
-
__exportStar(require("./HealthInsuranceCreateRequest"), exports);
|
117
116
|
__exportStar(require("./HealthInsuranceCreateRequestFrontImage"), exports);
|
118
117
|
__exportStar(require("./HealthInsuranceCreateRequestBackImage"), exports);
|
119
118
|
__exportStar(require("./HealthInsuranceCreateRequestPatientSignatureImage"), exports);
|
119
|
+
__exportStar(require("./HealthInsuranceCreateRequest"), exports);
|
120
120
|
__exportStar(require("./HistoricalPullStatus"), exports);
|
121
121
|
__exportStar(require("./Jpeg"), exports);
|
122
122
|
__exportStar(require("./LabResultsMetadata"), exports);
|
123
|
-
__exportStar(require("./LabResultsRaw"), exports);
|
124
123
|
__exportStar(require("./LabResultsRawResults"), exports);
|
124
|
+
__exportStar(require("./LabResultsRaw"), exports);
|
125
125
|
__exportStar(require("./LabTestCollectionMethod"), exports);
|
126
126
|
__exportStar(require("./LabTestSampleType"), exports);
|
127
127
|
__exportStar(require("./LabTestStatus"), exports);
|
@@ -144,8 +144,9 @@ __exportStar(require("./PatientAddressCompatible"), exports);
|
|
144
144
|
__exportStar(require("./PatientDetails"), exports);
|
145
145
|
__exportStar(require("./PersonDetails"), exports);
|
146
146
|
__exportStar(require("./PhlebotomyAreaInfo"), exports);
|
147
|
-
__exportStar(require("./
|
147
|
+
__exportStar(require("./PhlebotomyProviderInfo"), exports);
|
148
148
|
__exportStar(require("./PhysicianCreateRequestSignatureImage"), exports);
|
149
|
+
__exportStar(require("./PhysicianCreateRequest"), exports);
|
149
150
|
__exportStar(require("./PhysicianCreateRequestBase"), exports);
|
150
151
|
__exportStar(require("./Png"), exports);
|
151
152
|
__exportStar(require("./PostOrderResponse"), exports);
|
@@ -176,15 +177,14 @@ __exportStar(require("./TeamConfig"), exports);
|
|
176
177
|
__exportStar(require("./TimeSlot"), exports);
|
177
178
|
__exportStar(require("./TimeseriesMetricPoint"), exports);
|
178
179
|
__exportStar(require("./TimeseriesResource"), exports);
|
180
|
+
__exportStar(require("./UsAddress"), exports);
|
179
181
|
__exportStar(require("./UserHistoricalPullsResponse"), exports);
|
180
182
|
__exportStar(require("./UserRefreshErrorResponse"), exports);
|
181
183
|
__exportStar(require("./UserRefreshSuccessResponse"), exports);
|
182
184
|
__exportStar(require("./UserResourcesResponse"), exports);
|
183
|
-
__exportStar(require("./UserSignInToken"), exports);
|
184
185
|
__exportStar(require("./UserSignInTokenResponse"), exports);
|
185
|
-
__exportStar(require("./UserSignInTokenResponseSignInToken"), exports);
|
186
186
|
__exportStar(require("./UserSuccessResponse"), exports);
|
187
|
-
__exportStar(require("./ValidationError"), exports);
|
188
187
|
__exportStar(require("./ValidationErrorLocItem"), exports);
|
188
|
+
__exportStar(require("./ValidationError"), exports);
|
189
189
|
__exportStar(require("./VitalTokenCreatedResponse"), exports);
|
190
190
|
__exportStar(require("./WorkoutV2InDb"), exports);
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import { default as URLSearchParams } from "@ungap/url-search-params";
|
2
|
-
import { AxiosAdapter } from "axios";
|
3
1
|
import { APIResponse } from "./APIResponse";
|
4
2
|
export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
5
3
|
export declare namespace Fetcher {
|
@@ -8,13 +6,12 @@ export declare namespace Fetcher {
|
|
8
6
|
method: string;
|
9
7
|
contentType?: string;
|
10
8
|
headers?: Record<string, string | undefined>;
|
11
|
-
queryParameters?:
|
9
|
+
queryParameters?: Record<string, string | string[]>;
|
12
10
|
body?: unknown;
|
13
11
|
timeoutMs?: number;
|
12
|
+
maxRetries?: number;
|
14
13
|
withCredentials?: boolean;
|
15
|
-
responseType?: "json" | "blob";
|
16
|
-
adapter?: AxiosAdapter;
|
17
|
-
onUploadProgress?: (event: ProgressEvent) => void;
|
14
|
+
responseType?: "json" | "blob" | "streaming";
|
18
15
|
}
|
19
16
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
20
17
|
interface FailedStatusCodeError {
|
@@ -13,7 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
exports.fetcher = void 0;
|
16
|
-
const
|
16
|
+
const form_data_1 = __importDefault(require("form-data"));
|
17
|
+
const qs_1 = __importDefault(require("qs"));
|
18
|
+
if (typeof window === "undefined") {
|
19
|
+
global.fetch = require("node-fetch");
|
20
|
+
}
|
21
|
+
const INITIAL_RETRY_DELAY = 1;
|
22
|
+
const MAX_RETRY_DELAY = 60;
|
23
|
+
const DEFAULT_MAX_RETRIES = 2;
|
17
24
|
function fetcherImpl(args) {
|
18
25
|
var _a, _b;
|
19
26
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -28,41 +35,68 @@ function fetcherImpl(args) {
|
|
28
35
|
}
|
29
36
|
}
|
30
37
|
}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
const url = Object.keys((_a = args.queryParameters) !== null && _a !== void 0 ? _a : {}).length > 0
|
39
|
+
? `${args.url}?${qs_1.default.stringify(args.queryParameters, { arrayFormat: "repeat" })}`
|
40
|
+
: args.url;
|
41
|
+
let body = undefined;
|
42
|
+
if (args.body instanceof form_data_1.default) {
|
43
|
+
// @ts-expect-error
|
44
|
+
body = args.body;
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
body = JSON.stringify(args.body);
|
48
|
+
}
|
49
|
+
const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
|
50
|
+
const controller = new AbortController();
|
51
|
+
let abortId = undefined;
|
52
|
+
if (args.timeoutMs != null) {
|
53
|
+
abortId = setTimeout(() => controller.abort(), args.timeoutMs);
|
54
|
+
}
|
55
|
+
const response = yield fetch(url, {
|
35
56
|
method: args.method,
|
36
57
|
headers,
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
timeout: args.timeoutMs,
|
41
|
-
transitional: {
|
42
|
-
clarifyTimeoutError: true,
|
43
|
-
},
|
44
|
-
withCredentials: args.withCredentials,
|
45
|
-
adapter: args.adapter,
|
46
|
-
onUploadProgress: args.onUploadProgress,
|
47
|
-
maxBodyLength: Infinity,
|
48
|
-
maxContentLength: Infinity,
|
49
|
-
responseType: (_a = args.responseType) !== null && _a !== void 0 ? _a : "json",
|
58
|
+
body,
|
59
|
+
signal: controller.signal,
|
60
|
+
credentials: args.withCredentials ? "same-origin" : undefined,
|
50
61
|
});
|
62
|
+
if (abortId != null) {
|
63
|
+
clearTimeout(abortId);
|
64
|
+
}
|
65
|
+
return response;
|
66
|
+
});
|
67
|
+
try {
|
68
|
+
let response = yield makeRequest();
|
69
|
+
for (let i = 0; i < ((_b = args.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_MAX_RETRIES); ++i) {
|
70
|
+
if (response.status === 408 ||
|
71
|
+
response.status === 409 ||
|
72
|
+
response.status === 429 ||
|
73
|
+
response.status >= 500) {
|
74
|
+
const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY);
|
75
|
+
yield new Promise((resolve) => setTimeout(resolve, delay));
|
76
|
+
response = yield makeRequest();
|
77
|
+
}
|
78
|
+
else {
|
79
|
+
break;
|
80
|
+
}
|
81
|
+
}
|
51
82
|
let body;
|
52
|
-
if (args.responseType === "blob") {
|
53
|
-
body = response.
|
83
|
+
if (response.body != null && args.responseType === "blob") {
|
84
|
+
body = yield response.blob();
|
85
|
+
}
|
86
|
+
else if (response.body != null && args.responseType === "streaming") {
|
87
|
+
body = response.body;
|
54
88
|
}
|
55
|
-
else if (response.
|
89
|
+
else if (response.body != null) {
|
56
90
|
try {
|
57
|
-
body =
|
91
|
+
body = yield response.json();
|
58
92
|
}
|
59
|
-
catch (
|
93
|
+
catch (err) {
|
60
94
|
return {
|
61
95
|
ok: false,
|
62
96
|
error: {
|
63
97
|
reason: "non-json",
|
64
98
|
statusCode: response.status,
|
65
|
-
rawBody: response.
|
99
|
+
rawBody: yield response.text(),
|
66
100
|
},
|
67
101
|
};
|
68
102
|
}
|
@@ -71,6 +105,7 @@ function fetcherImpl(args) {
|
|
71
105
|
return {
|
72
106
|
ok: true,
|
73
107
|
body: body,
|
108
|
+
headers: response.headers,
|
74
109
|
};
|
75
110
|
}
|
76
111
|
else {
|
@@ -85,7 +120,7 @@ function fetcherImpl(args) {
|
|
85
120
|
}
|
86
121
|
}
|
87
122
|
catch (error) {
|
88
|
-
if (error.
|
123
|
+
if (error instanceof Error && error.name === "AbortError") {
|
89
124
|
return {
|
90
125
|
ok: false,
|
91
126
|
error: {
|
@@ -93,11 +128,20 @@ function fetcherImpl(args) {
|
|
93
128
|
},
|
94
129
|
};
|
95
130
|
}
|
131
|
+
else if (error instanceof Error) {
|
132
|
+
return {
|
133
|
+
ok: false,
|
134
|
+
error: {
|
135
|
+
reason: "unknown",
|
136
|
+
errorMessage: error.message,
|
137
|
+
},
|
138
|
+
};
|
139
|
+
}
|
96
140
|
return {
|
97
141
|
ok: false,
|
98
142
|
error: {
|
99
143
|
reason: "unknown",
|
100
|
-
errorMessage: error
|
144
|
+
errorMessage: JSON.stringify(error),
|
101
145
|
},
|
102
146
|
};
|
103
147
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getHeader = void 0;
|
4
|
-
function getHeader(
|
5
|
-
for (const [headerKey, headerValue] of Object.entries(
|
4
|
+
function getHeader(headers, header) {
|
5
|
+
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
6
6
|
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
7
7
|
return headerValue;
|
8
8
|
}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Supplier = exports.fetcher = void 0;
|
3
|
+
exports.Supplier = exports.getHeader = exports.fetcher = void 0;
|
4
4
|
var Fetcher_1 = require("./Fetcher");
|
5
5
|
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_1.fetcher; } });
|
6
|
+
var getHeader_1 = require("./getHeader");
|
7
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
|
6
8
|
var Supplier_1 = require("./Supplier");
|
7
9
|
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_1.Supplier; } });
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.js
CHANGED
@@ -28,5 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.serialization = void 0;
|
30
30
|
__exportStar(require("./fetcher"), exports);
|
31
|
-
__exportStar(require("./streaming-fetcher"), exports);
|
32
31
|
exports.serialization = __importStar(require("./schemas"));
|
@@ -13,6 +13,7 @@ export declare const SchemaType: {
|
|
13
13
|
readonly ENUM: "enum";
|
14
14
|
readonly LIST: "list";
|
15
15
|
readonly STRING_LITERAL: "stringLiteral";
|
16
|
+
readonly BOOLEAN_LITERAL: "booleanLiteral";
|
16
17
|
readonly OBJECT: "object";
|
17
18
|
readonly ANY: "any";
|
18
19
|
readonly BOOLEAN: "boolean";
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.booleanLiteral = void 0;
|
4
|
+
const Schema_1 = require("../../Schema");
|
5
|
+
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
6
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
7
|
+
function booleanLiteral(literal) {
|
8
|
+
const schemaCreator = (0, createIdentitySchemaCreator_1.createIdentitySchemaCreator)(Schema_1.SchemaType.BOOLEAN_LITERAL, (value, { breadcrumbsPrefix = [] } = {}) => {
|
9
|
+
if (value === literal) {
|
10
|
+
return {
|
11
|
+
ok: true,
|
12
|
+
value: literal,
|
13
|
+
};
|
14
|
+
}
|
15
|
+
else {
|
16
|
+
return {
|
17
|
+
ok: false,
|
18
|
+
errors: [
|
19
|
+
{
|
20
|
+
path: breadcrumbsPrefix,
|
21
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, `${literal.toString()}`),
|
22
|
+
},
|
23
|
+
],
|
24
|
+
};
|
25
|
+
}
|
26
|
+
});
|
27
|
+
return schemaCreator();
|
28
|
+
}
|
29
|
+
exports.booleanLiteral = booleanLiteral;
|
@@ -1,5 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.stringLiteral = void 0;
|
3
|
+
exports.booleanLiteral = exports.stringLiteral = void 0;
|
4
4
|
var stringLiteral_1 = require("./stringLiteral");
|
5
5
|
Object.defineProperty(exports, "stringLiteral", { enumerable: true, get: function () { return stringLiteral_1.stringLiteral; } });
|
6
|
+
var booleanLiteral_1 = require("./booleanLiteral");
|
7
|
+
Object.defineProperty(exports, "booleanLiteral", { enumerable: true, get: function () { return booleanLiteral_1.booleanLiteral; } });
|
@@ -1,4 +1,6 @@
|
|
1
1
|
export { getObjectUtils, object } from "./object";
|
2
|
+
export { objectWithoutOptionalProperties } from "./objectWithoutOptionalProperties";
|
3
|
+
export type { inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas, inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas, } from "./objectWithoutOptionalProperties";
|
2
4
|
export { isProperty, property } from "./property";
|
3
5
|
export type { Property } from "./property";
|
4
6
|
export type { BaseObjectSchema, inferObjectSchemaFromPropertySchemas, inferParsedObject, inferParsedObjectFromPropertySchemas, inferParsedPropertySchema, inferRawKey, inferRawObject, inferRawObjectFromPropertySchemas, inferRawPropertySchema, ObjectSchema, ObjectUtils, PropertySchemas, } from "./types";
|
@@ -1,9 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.property = exports.isProperty = exports.object = exports.getObjectUtils = void 0;
|
3
|
+
exports.property = exports.isProperty = exports.objectWithoutOptionalProperties = exports.object = exports.getObjectUtils = void 0;
|
4
4
|
var object_1 = require("./object");
|
5
5
|
Object.defineProperty(exports, "getObjectUtils", { enumerable: true, get: function () { return object_1.getObjectUtils; } });
|
6
6
|
Object.defineProperty(exports, "object", { enumerable: true, get: function () { return object_1.object; } });
|
7
|
+
var objectWithoutOptionalProperties_1 = require("./objectWithoutOptionalProperties");
|
8
|
+
Object.defineProperty(exports, "objectWithoutOptionalProperties", { enumerable: true, get: function () { return objectWithoutOptionalProperties_1.objectWithoutOptionalProperties; } });
|
7
9
|
var property_1 = require("./property");
|
8
10
|
Object.defineProperty(exports, "isProperty", { enumerable: true, get: function () { return property_1.isProperty; } });
|
9
11
|
Object.defineProperty(exports, "property", { enumerable: true, get: function () { return property_1.property; } });
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { inferParsedPropertySchema, inferRawObjectFromPropertySchemas, ObjectSchema, PropertySchemas } from "./types";
|
2
|
+
export declare function objectWithoutOptionalProperties<ParsedKeys extends string, T extends PropertySchemas<ParsedKeys>>(schemas: T): inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas<T>;
|
3
|
+
export declare type inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas<T extends PropertySchemas<keyof T>> = ObjectSchema<inferRawObjectFromPropertySchemas<T>, inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas<T>>;
|
4
|
+
export declare type inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas<T extends PropertySchemas<keyof T>> = {
|
5
|
+
[K in keyof T]: inferParsedPropertySchema<T[K]>;
|
6
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.objectWithoutOptionalProperties = void 0;
|
4
|
+
const object_1 = require("./object");
|
5
|
+
function objectWithoutOptionalProperties(schemas) {
|
6
|
+
return (0, object_1.object)(schemas);
|
7
|
+
}
|
8
|
+
exports.objectWithoutOptionalProperties = objectWithoutOptionalProperties;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../..";
|
5
|
+
import * as Vital from "../../../../../api";
|
6
|
+
import * as core from "../../../../../core";
|
7
|
+
export declare const RequestAppointmentRequest: core.serialization.Schema<serializers.RequestAppointmentRequest.Raw, Vital.RequestAppointmentRequest>;
|
8
|
+
export declare namespace RequestAppointmentRequest {
|
9
|
+
interface Raw {
|
10
|
+
address: serializers.UsAddress.Raw;
|
11
|
+
provider: serializers.AppointmentProvider.Raw;
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.RequestAppointmentRequest = void 0;
|
39
|
+
const core = __importStar(require("../../../../../core"));
|
40
|
+
exports.RequestAppointmentRequest = core.serialization.object({
|
41
|
+
address: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).UsAddress; })),
|
42
|
+
provider: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).AppointmentProvider; })),
|
43
|
+
});
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export { CreateLabTestRequest } from "./CreateLabTestRequest";
|
2
2
|
export { AppointmentBookingRequest } from "./AppointmentBookingRequest";
|
3
|
+
export { RequestAppointmentRequest } from "./RequestAppointmentRequest";
|
3
4
|
export { AppointmentRescheduleRequest } from "./AppointmentRescheduleRequest";
|
4
5
|
export { AppointmentCancelRequest } from "./AppointmentCancelRequest";
|
5
6
|
export { CreateOrderRequestCompatible } from "./CreateOrderRequestCompatible";
|