From aaaa9a58f840ade87fe0a23e279a6eb51209aeb6 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 22:32:52 +0000 Subject: [PATCH] SDK regeneration Unable to analyze changes with AI, incrementing PATCH version. --- .fern/metadata.json | 7 +- .fernignore | 1 + biome.json | 2 +- changelog.md | 4 + package.json | 7 +- pnpm-lock.yaml | 684 +++---- reference.md | 401 +++- src/BaseClient.ts | 4 +- src/Client.ts | 18 + src/api/resources/activity/client/Client.ts | 30 +- src/api/resources/aggregate/client/Client.ts | 13 +- src/api/resources/body/client/Client.ts | 30 +- src/api/resources/compendium/client/Client.ts | 191 ++ src/api/resources/compendium/client/index.ts | 1 + .../client/requests/ConvertCompendiumBody.ts | 17 + .../client/requests/SearchCompendiumBody.ts | 20 + .../compendium/client/requests/index.ts | 2 + src/api/resources/compendium/index.ts | 1 + src/api/resources/devices/client/Client.ts | 8 +- .../electrocardiogram/client/Client.ts | 15 +- src/api/resources/index.ts | 6 +- src/api/resources/insurance/client/Client.ts | 28 +- .../client/requests/PayorSearchRequest.ts | 1 + src/api/resources/introspect/client/Client.ts | 62 +- src/api/resources/labAccount/client/Client.ts | 114 ++ src/api/resources/labAccount/client/index.ts | 1 + .../LabAccountGetTeamLabAccountsRequest.ts | 15 + .../labAccount/client/requests/index.ts | 1 + src/api/resources/labAccount/index.ts | 1 + src/api/resources/labReport/client/Client.ts | 23 +- src/api/resources/labTests/client/Client.ts | 666 +++---- .../client/requests/CreateLabTestRequest.ts | 4 + .../requests/CreateOrderRequestCompatible.ts | 5 +- .../client/requests/ImportOrderBody.ts | 2 + .../LabTestsBookPscAppointmentRequest.ts | 19 + .../requests/LabTestsGetAreaInfoRequest.ts | 1 + .../requests/LabTestsGetMarkersRequest.ts | 4 + .../LabTestsGetOrderPscInfoRequest.ts | 3 +- .../requests/LabTestsGetOrdersRequest.ts | 7 + .../requests/LabTestsGetPaginatedRequest.ts | 2 + ...stsGetPscAppointmentAvailabilityRequest.ts | 8 +- .../requests/LabTestsGetPscInfoRequest.ts | 1 + .../client/requests/LabTestsGetRequest.ts | 2 + .../requests/RequestAppointmentRequest.ts | 2 + .../labTests/client/requests/index.ts | 1 + src/api/resources/link/client/Client.ts | 110 +- .../client/requests/BeginLinkTokenRequest.ts | 1 + .../requests/BulkExportConnectionsBody.ts | 3 +- .../requests/BulkImportConnectionsBody.ts | 3 +- .../requests/BulkPauseConnectionsBody.ts | 3 +- .../requests/BulkTriggerHistoricalPullBody.ts | 3 +- .../CompletePasswordProviderMfaBody.ts | 1 - .../requests/DemoConnectionCreationPayload.ts | 2 +- .../link/client/requests/EmailAuthLink.ts | 4 +- .../client/requests/EmailProviderAuthLink.ts | 3 +- .../client/requests/IndividualProviderData.ts | 3 +- .../requests/LinkGenerateOauthLinkRequest.ts | 4 +- .../requests/LinkGetAllProvidersRequest.ts | 4 +- .../client/requests/LinkListBulkOpsRequest.ts | 6 +- .../link/client/requests/LinkTokenExchange.ts | 1 + .../client/requests/LinkTokenStateRequest.ts | 4 +- .../client/requests/ManualConnectionData.ts | 3 + .../link/client/requests/PasswordAuthLink.ts | 3 +- src/api/resources/link/index.ts | 1 - .../link/types/LinkBulkExportRequestTeamId.ts | 7 - .../link/types/LinkBulkImportRequestTeamId.ts | 7 - .../link/types/LinkBulkPauseRequestTeamId.ts | 6 - ...kBulkTriggerHistoricalPullRequestTeamId.ts | 7 - .../types/LinkListBulkOpsRequestTeamId.ts | 7 - src/api/resources/link/types/index.ts | 5 - src/api/resources/meal/client/Client.ts | 15 +- .../resources/menstrualCycle/client/Client.ts | 15 +- .../orderTransaction/client/Client.ts | 261 +++ .../orderTransaction/client/index.ts | 1 + src/api/resources/orderTransaction/index.ts | 1 + .../payor/client/requests/CreatePayorBody.ts | 1 + src/api/resources/profile/client/Client.ts | 16 +- src/api/resources/providers/client/Client.ts | 8 +- src/api/resources/sleep/client/Client.ts | 30 +- src/api/resources/sleepCycle/client/Client.ts | 15 +- src/api/resources/team/client/Client.ts | 25 +- .../requests/TeamGetLinkConfigRequest.ts | 4 +- src/api/resources/user/client/Client.ts | 42 +- .../client/requests/CreateInsuranceRequest.ts | 1 + .../client/requests/UserInfoCreateRequest.ts | 6 +- src/api/resources/vitals/client/Client.ts | 1688 +++++------------ src/api/resources/workouts/client/Client.ts | 30 +- src/api/types/ActivityV2InDb.ts | 4 +- src/api/types/Address.ts | 1 + src/api/types/AggregateExprArg.ts | 7 +- src/api/types/AggregateFieldExpr.ts | 16 + src/api/types/AggregateFieldExprArg.ts | 16 + src/api/types/AggregateFieldExprFunc.ts | 15 + src/api/types/AppointmentBookingRequest.ts | 7 + src/api/types/AppointmentProvider.ts | 1 + src/api/types/AppointmentPscLabs.ts | 10 +- src/api/types/AppointmentRescheduleRequest.ts | 1 + src/api/types/AwakeningsValueMacroExpr.ts | 6 + src/api/types/BiomarkerResult.ts | 1 + src/api/types/BodyV2InDb.ts | 6 +- src/api/types/BulkOp.ts | 1 + src/api/types/CanonicalCandidate.ts | 14 + src/api/types/ClientFacingActivity.ts | 2 +- src/api/types/ClientFacingAppointment.ts | 6 + src/api/types/ClientFacingAppointmentEvent.ts | 1 + src/api/types/ClientFacingDeviceSourceType.ts | 1 + .../types/ClientFacingElectrocardiogram.ts | 1 + ...ntFacingElectrocardiogramSourceProvider.ts | 3 + ...ClientFacingElectrocardiogramSourceType.ts | 1 + .../ClientFacingInsulinInjectionSample.ts | 8 +- ...acingInsulinInjectionSampleBolusPurpose.ts | 10 + ...acingInsulinInjectionSampleDeliveryForm.ts | 8 + ...acingInsulinInjectionSampleDeliveryMode.ts | 8 + .../ClientFacingInsulinInjectionSampleType.ts | 2 +- src/api/types/ClientFacingInsurance.ts | 1 + src/api/types/ClientFacingLabAccount.ts | 20 + ...ntFacingLabReportParsingJobCreatedEvent.ts | 11 + ...ntFacingLabReportParsingJobUpdatedEvent.ts | 11 + src/api/types/ClientFacingLabTest.ts | 3 + src/api/types/ClientFacingLabs.ts | 1 + src/api/types/ClientFacingMarker.ts | 1 + src/api/types/ClientFacingMarkerComplete.ts | 1 + src/api/types/ClientFacingMenstrualCycle.ts | 1 + ...lientFacingMenstrualCycleSourceProvider.ts | 3 + .../ClientFacingMenstrualCycleSourceType.ts | 1 + src/api/types/ClientFacingOrder.ts | 10 +- src/api/types/ClientFacingOrderEvent.ts | 3 + .../types/ClientFacingOrderInTransaction.ts | 18 + src/api/types/ClientFacingOrderTransaction.ts | 13 + .../ClientFacingPatientDetailsCompatible.ts | 8 +- src/api/types/ClientFacingPayor.ts | 2 +- .../types/ClientFacingPayorSearchResponse.ts | 2 +- ...ientFacingPayorSearchResponseDeprecated.ts | 2 +- src/api/types/ClientFacingProfile.ts | 4 +- src/api/types/ClientFacingProviderDetailed.ts | 1 + src/api/types/ClientFacingResource.ts | 1 + src/api/types/ClientFacingSleep.ts | 5 +- src/api/types/ClientFacingSleepCycle.ts | 1 + .../ClientFacingSleepCycleSourceProvider.ts | 3 + .../types/ClientFacingSleepCycleSourceType.ts | 1 + src/api/types/ClientFacingTeam.ts | 1 + src/api/types/CompendiumSearchLabs.ts | 10 + src/api/types/Consent.ts | 1 + .../types/ContinuousQueryTaskHistoryEntry.ts | 1 + src/api/types/ContinuousQueryTaskStatus.ts | 1 + src/api/types/ConvertCompendiumResponse.ts | 14 + src/api/types/DerivedReadinessColumnExpr.ts | 8 + ...ivedReadinessColumnExprDerivedReadiness.ts | 15 + src/api/types/ElementFieldExpr.ts | 11 + src/api/types/GetOrderTransactionResponse.ts | 11 + src/api/types/GetTeamLabAccountsResponse.ts | 7 + src/api/types/HealthInsuranceCreateRequest.ts | 2 +- src/api/types/HistoricalPullCompleted.ts | 2 +- src/api/types/IndexColumnExprIndex.ts | 2 + .../types/InsulinInjectionTimeseriesExpr.ts | 9 + .../InsulinInjectionTimeseriesExprField.ts | 19 + .../types/IntervalTimeseriesExprTimeseries.ts | 1 - src/api/types/LabAccountDelegatedFlow.ts | 17 + src/api/types/LabAccountStatus.ts | 10 + src/api/types/LabReportResult.ts | 2 + src/api/types/LabResultsRaw.ts | 1 + src/api/types/LabTestSampleType.ts | 1 + src/api/types/Labs.ts | 2 + src/api/types/LastAttempt.ts | 1 + src/api/types/ManualProviders.ts | 1 + .../types/McBasalBodyTemperatureFieldExpr.ts | 9 + ...emperatureFieldExprBasalBodyTemperature.ts | 9 + src/api/types/McCervicalMucusFieldExpr.ts | 9 + .../McCervicalMucusFieldExprCervicalMucus.ts | 9 + src/api/types/McContraceptiveFieldExpr.ts | 9 + .../McContraceptiveFieldExprContraceptive.ts | 9 + .../types/McDetectedDeviationsFieldExpr.ts | 9 + ...edDeviationsFieldExprDetectedDeviations.ts | 9 + src/api/types/McHomePregnancyTestFieldExpr.ts | 9 + ...PregnancyTestFieldExprHomePregnancyTest.ts | 9 + .../types/McHomeProgesteroneTestFieldExpr.ts | 9 + ...teroneTestFieldExprHomeProgesteroneTest.ts | 9 + .../McIntermenstrualBleedingFieldExpr.ts | 6 + src/api/types/McMenstrualFlowFieldExpr.ts | 9 + .../McMenstrualFlowFieldExprMenstrualFlow.ts | 9 + src/api/types/McOvulationTestFieldExpr.ts | 9 + .../McOvulationTestFieldExprOvulationTest.ts | 9 + src/api/types/McSexualActivityFieldExpr.ts | 9 + ...McSexualActivityFieldExprSexualActivity.ts | 9 + src/api/types/MenstrualCycleColumnExpr.ts | 8 + .../MenstrualCycleColumnExprMenstrualCycle.ts | 25 + src/api/types/MissingBiomarkerResult.ts | 1 + src/api/types/OrderLowLevelStatus.ts | 2 + src/api/types/OrderOrigin.ts | 9 + src/api/types/OrderStatus.ts | 10 +- src/api/types/OrderStatusDetail.ts | 15 + src/api/types/OrderSummary.ts | 18 + src/api/types/OrderTransactionStatus.ts | 9 + src/api/types/ParsingJob.ts | 4 +- src/api/types/ParsingJobFailureReason.ts | 9 + src/api/types/PasswordProviders.ts | 1 + src/api/types/PatientAddress.ts | 1 + src/api/types/PatientAddressCompatible.ts | 1 + src/api/types/PatientAddressWithValidation.ts | 1 + src/api/types/PatientDetailsWithValidation.ts | 9 +- src/api/types/PayorCodeExternalProvider.ts | 2 + src/api/types/PerLabCandidate.ts | 19 + src/api/types/PhlebotomyProviderInfo.ts | 1 + src/api/types/Placeholder.ts | 2 +- src/api/types/ProviderIdConversionResponse.ts | 8 + src/api/types/ProviderLinkResponse.ts | 1 + src/api/types/Providers.ts | 2 + src/api/types/PscInfo.ts | 1 + src/api/types/QueryGroupByItem.ts | 4 + src/api/types/QuerySelectItem.ts | 5 + src/api/types/Question.ts | 1 + src/api/types/RelatedCandidate.ts | 10 + src/api/types/ResourceAvailability.ts | 1 + src/api/types/ResultMetadata.ts | 12 +- src/api/types/ResultMetadataGender.ts | 9 + src/api/types/ScalarOutputSubqueryExpr.ts | 12 + src/api/types/ScalarOutputSubqueryExprFrom.ts | 5 + .../types/ScalarOutputSubqueryExprSelect.ts | 5 + src/api/types/SearchCompendiumResponse.ts | 12 + src/api/types/SearchMode.ts | 8 + src/api/types/SimulationFlags.ts | 1 + .../types/SingleHistoricalPullStatistics.ts | 2 + ...gleHistoricalPullStatisticsErrorDetails.ts | 3 + src/api/types/SleepColumnExprSleep.ts | 1 + src/api/types/SleepV2InDb.ts | 6 +- src/api/types/Source.ts | 2 + src/api/types/SourceLink.ts | 1 + src/api/types/UnnestExpr.ts | 10 + src/api/types/UnnestExprUnnest.ts | 26 + src/api/types/UsAddress.ts | 1 + src/api/types/UsState.ts | 56 + src/api/types/UserAddress.ts | 11 + src/api/types/UserInfo.ts | 6 +- src/api/types/UserRefreshErrorResponse.ts | 2 +- src/api/types/UserRefreshSuccessResponse.ts | 2 +- src/api/types/ValidationError.ts | 2 + ...sDbSchemasLabTestInsurancePersonDetails.ts | 1 + src/api/types/WorkoutV2InDb.ts | 4 +- src/api/types/index.ts | 63 + src/core/fetcher/Fetcher.ts | 8 +- src/core/schemas/builders/list/list.ts | 38 +- .../object-like/getObjectLikeUtils.ts | 20 +- src/core/schemas/builders/object/object.ts | 202 +- src/core/schemas/builders/object/types.ts | 27 +- src/core/schemas/builders/record/record.ts | 67 +- src/core/schemas/builders/union/union.ts | 11 +- src/core/schemas/utils/isPlainObject.ts | 11 +- .../resources/compendium/client/index.ts | 1 + .../client/requests/ConvertCompendiumBody.ts | 28 + .../client/requests/SearchCompendiumBody.ts | 32 + .../compendium/client/requests/index.ts | 2 + .../resources/compendium/index.ts | 1 + src/serialization/resources/index.ts | 3 +- .../client/requests/CreateLabTestRequest.ts | 5 + .../requests/CreateOrderRequestCompatible.ts | 2 + .../requests/RequestAppointmentRequest.ts | 2 + .../requests/BulkExportConnectionsBody.ts | 2 +- .../requests/BulkImportConnectionsBody.ts | 2 +- .../requests/BulkPauseConnectionsBody.ts | 2 +- .../requests/BulkTriggerHistoricalPullBody.ts | 2 +- .../client/requests/ManualConnectionData.ts | 7 +- src/serialization/resources/link/index.ts | 1 - .../link/types/LinkBulkExportRequestTeamId.ts | 14 - .../link/types/LinkBulkImportRequestTeamId.ts | 14 - .../link/types/LinkBulkPauseRequestTeamId.ts | 14 - ...kBulkTriggerHistoricalPullRequestTeamId.ts | 14 - .../types/LinkListBulkOpsRequestTeamId.ts | 14 - .../resources/link/types/index.ts | 5 - .../client/requests/UserInfoCreateRequest.ts | 6 +- src/serialization/types/ActivityV2InDb.ts | 8 +- src/serialization/types/Address.ts | 2 + src/serialization/types/AggregateExprArg.ts | 17 +- src/serialization/types/AggregateFieldExpr.ts | 22 + .../types/AggregateFieldExprArg.ts | 48 + .../types/AggregateFieldExprFunc.ts | 14 + .../types/AppointmentBookingRequest.ts | 14 + .../types/AppointmentProvider.ts | 4 +- src/serialization/types/AppointmentPscLabs.ts | 4 +- .../types/AppointmentRescheduleRequest.ts | 2 + .../types/AwakeningsValueMacroExpr.ts | 20 + src/serialization/types/BodyV2InDb.ts | 12 +- src/serialization/types/CanonicalCandidate.ts | 48 + .../types/ClientFacingActivity.ts | 4 +- .../types/ClientFacingAppointment.ts | 4 + .../types/ClientFacingDeviceSourceType.ts | 2 + ...ClientFacingElectrocardiogramSourceType.ts | 2 + .../ClientFacingInsulinInjectionSample.ts | 18 + ...acingInsulinInjectionSampleBolusPurpose.ts | 14 + ...acingInsulinInjectionSampleDeliveryForm.ts | 14 + ...acingInsulinInjectionSampleDeliveryMode.ts | 14 + .../types/ClientFacingLabAccount.ts | 51 + ...ntFacingLabReportParsingJobCreatedEvent.ts | 30 + ...ntFacingLabReportParsingJobUpdatedEvent.ts | 30 + src/serialization/types/ClientFacingLabs.ts | 4 +- .../ClientFacingMenstrualCycleSourceType.ts | 2 + src/serialization/types/ClientFacingOrder.ts | 10 + .../types/ClientFacingOrderEvent.ts | 3 + .../types/ClientFacingOrderInTransaction.ts | 35 + .../types/ClientFacingOrderTransaction.ts | 24 + .../types/ClientFacingProfile.ts | 4 +- .../types/ClientFacingResource.ts | 2 + src/serialization/types/ClientFacingSleep.ts | 5 + .../types/ClientFacingSleepCycleSourceType.ts | 2 + .../types/CompendiumSearchLabs.ts | 14 + .../types/ContinuousQueryTaskStatus.ts | 4 +- .../types/ConvertCompendiumResponse.ts | 45 + .../types/DerivedReadinessColumnExpr.ts | 19 + ...ivedReadinessColumnExprDerivedReadiness.ts | 31 + src/serialization/types/ElementFieldExpr.ts | 18 + .../types/GetOrderTransactionResponse.ts | 26 + .../types/GetTeamLabAccountsResponse.ts | 19 + .../types/HistoricalPullCompleted.ts | 4 +- .../types/IndexColumnExprIndex.ts | 23 +- .../types/InsulinInjectionTimeseriesExpr.ts | 21 + .../InsulinInjectionTimeseriesExprField.ts | 39 + .../types/IntervalTimeseriesExprTimeseries.ts | 2 - .../types/LabAccountDelegatedFlow.ts | 14 + src/serialization/types/LabAccountStatus.ts | 12 + src/serialization/types/LabResultsRaw.ts | 3 + src/serialization/types/LabTestSampleType.ts | 4 +- src/serialization/types/Labs.ts | 6 +- src/serialization/types/ManualProviders.ts | 4 +- .../types/McBasalBodyTemperatureFieldExpr.ts | 24 + ...emperatureFieldExprBasalBodyTemperature.ts | 14 + .../types/McCervicalMucusFieldExpr.ts | 21 + .../McCervicalMucusFieldExprCervicalMucus.ts | 14 + .../types/McContraceptiveFieldExpr.ts | 21 + .../McContraceptiveFieldExprContraceptive.ts | 14 + .../types/McDetectedDeviationsFieldExpr.ts | 24 + ...edDeviationsFieldExprDetectedDeviations.ts | 14 + .../types/McHomePregnancyTestFieldExpr.ts | 24 + ...PregnancyTestFieldExprHomePregnancyTest.ts | 14 + .../types/McHomeProgesteroneTestFieldExpr.ts | 24 + ...teroneTestFieldExprHomeProgesteroneTest.ts | 14 + .../McIntermenstrualBleedingFieldExpr.ts | 23 + .../types/McMenstrualFlowFieldExpr.ts | 21 + .../McMenstrualFlowFieldExprMenstrualFlow.ts | 14 + .../types/McOvulationTestFieldExpr.ts | 21 + .../McOvulationTestFieldExprOvulationTest.ts | 14 + .../types/McSexualActivityFieldExpr.ts | 21 + ...McSexualActivityFieldExprSexualActivity.ts | 14 + .../types/MenstrualCycleColumnExpr.ts | 19 + .../MenstrualCycleColumnExprMenstrualCycle.ts | 51 + .../types/OrderLowLevelStatus.ts | 6 +- src/serialization/types/OrderOrigin.ts | 12 + src/serialization/types/OrderStatus.ts | 12 +- src/serialization/types/OrderStatusDetail.ts | 31 + src/serialization/types/OrderSummary.ts | 30 + .../types/OrderTransactionStatus.ts | 14 + src/serialization/types/ParsingJob.ts | 5 +- .../types/ParsingJobFailureReason.ts | 14 + src/serialization/types/PasswordProviders.ts | 4 +- src/serialization/types/PatientAddress.ts | 2 + .../types/PatientAddressCompatible.ts | 2 + .../types/PatientAddressWithValidation.ts | 2 + .../types/PayorCodeExternalProvider.ts | 4 +- src/serialization/types/PerLabCandidate.ts | 62 + src/serialization/types/Placeholder.ts | 4 +- .../types/ProviderIdConversionResponse.ts | 21 + src/serialization/types/Providers.ts | 4 + src/serialization/types/QueryGroupByItem.ts | 12 + src/serialization/types/QuerySelectItem.ts | 15 + src/serialization/types/RelatedCandidate.ts | 28 + src/serialization/types/ResultMetadata.ts | 19 +- .../types/ResultMetadataGender.ts | 14 + .../types/ScalarOutputSubqueryExpr.ts | 24 + .../types/ScalarOutputSubqueryExprFrom.ts | 16 + .../types/ScalarOutputSubqueryExprSelect.ts | 16 + .../types/SearchCompendiumResponse.ts | 36 + src/serialization/types/SearchMode.ts | 12 + .../types/SleepColumnExprSleep.ts | 2 + src/serialization/types/SleepV2InDb.ts | 12 +- src/serialization/types/UnnestExpr.ts | 17 + src/serialization/types/UnnestExprUnnest.ts | 76 + src/serialization/types/UsAddress.ts | 2 + src/serialization/types/UsState.ts | 112 ++ src/serialization/types/UserAddress.ts | 28 + src/serialization/types/UserInfo.ts | 6 +- .../types/UserRefreshErrorResponse.ts | 4 +- .../types/UserRefreshSuccessResponse.ts | 4 +- src/serialization/types/ValidationError.ts | 4 + src/serialization/types/WorkoutV2InDb.ts | 8 +- src/serialization/types/index.ts | 63 + src/version.ts | 2 +- tests/mock-server/mockEndpointBuilder.ts | 15 +- tests/mock-server/withJson.ts | 19 +- tests/unit/fetcher/Fetcher.test.ts | 8 +- tests/unit/file/file.test.ts | 5 +- tests/wire/activity.test.ts | 12 +- tests/wire/body.test.ts | 16 +- tests/wire/compendium.test.ts | 245 +++ tests/wire/insurance.test.ts | 4 + tests/wire/labAccount.test.ts | 79 + tests/wire/labReport.test.ts | 95 +- tests/wire/labTests.test.ts | 726 +++++-- tests/wire/link.test.ts | 46 +- tests/wire/orderTransaction.test.ts | 266 +++ tests/wire/payor.test.ts | 2 + tests/wire/sleep.test.ts | 287 +-- tests/wire/team.test.ts | 21 +- tests/wire/testkit.test.ts | 164 +- tests/wire/user.test.ts | 68 +- tests/wire/vitals.test.ts | 34 +- tests/wire/workouts.test.ts | 16 +- 404 files changed, 7305 insertions(+), 3199 deletions(-) create mode 100644 changelog.md create mode 100644 src/api/resources/compendium/client/Client.ts create mode 100644 src/api/resources/compendium/client/index.ts create mode 100644 src/api/resources/compendium/client/requests/ConvertCompendiumBody.ts create mode 100644 src/api/resources/compendium/client/requests/SearchCompendiumBody.ts create mode 100644 src/api/resources/compendium/client/requests/index.ts create mode 100644 src/api/resources/compendium/index.ts create mode 100644 src/api/resources/labAccount/client/Client.ts create mode 100644 src/api/resources/labAccount/client/index.ts create mode 100644 src/api/resources/labAccount/client/requests/LabAccountGetTeamLabAccountsRequest.ts create mode 100644 src/api/resources/labAccount/client/requests/index.ts create mode 100644 src/api/resources/labAccount/index.ts create mode 100644 src/api/resources/labTests/client/requests/LabTestsBookPscAppointmentRequest.ts delete mode 100644 src/api/resources/link/types/LinkBulkExportRequestTeamId.ts delete mode 100644 src/api/resources/link/types/LinkBulkImportRequestTeamId.ts delete mode 100644 src/api/resources/link/types/LinkBulkPauseRequestTeamId.ts delete mode 100644 src/api/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts delete mode 100644 src/api/resources/link/types/LinkListBulkOpsRequestTeamId.ts delete mode 100644 src/api/resources/link/types/index.ts create mode 100644 src/api/resources/orderTransaction/client/Client.ts create mode 100644 src/api/resources/orderTransaction/client/index.ts create mode 100644 src/api/resources/orderTransaction/index.ts create mode 100644 src/api/types/AggregateFieldExpr.ts create mode 100644 src/api/types/AggregateFieldExprArg.ts create mode 100644 src/api/types/AggregateFieldExprFunc.ts create mode 100644 src/api/types/AwakeningsValueMacroExpr.ts create mode 100644 src/api/types/CanonicalCandidate.ts create mode 100644 src/api/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts create mode 100644 src/api/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts create mode 100644 src/api/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts create mode 100644 src/api/types/ClientFacingLabAccount.ts create mode 100644 src/api/types/ClientFacingLabReportParsingJobCreatedEvent.ts create mode 100644 src/api/types/ClientFacingLabReportParsingJobUpdatedEvent.ts create mode 100644 src/api/types/ClientFacingOrderInTransaction.ts create mode 100644 src/api/types/ClientFacingOrderTransaction.ts create mode 100644 src/api/types/CompendiumSearchLabs.ts create mode 100644 src/api/types/ConvertCompendiumResponse.ts create mode 100644 src/api/types/DerivedReadinessColumnExpr.ts create mode 100644 src/api/types/DerivedReadinessColumnExprDerivedReadiness.ts create mode 100644 src/api/types/ElementFieldExpr.ts create mode 100644 src/api/types/GetOrderTransactionResponse.ts create mode 100644 src/api/types/GetTeamLabAccountsResponse.ts create mode 100644 src/api/types/InsulinInjectionTimeseriesExpr.ts create mode 100644 src/api/types/InsulinInjectionTimeseriesExprField.ts create mode 100644 src/api/types/LabAccountDelegatedFlow.ts create mode 100644 src/api/types/LabAccountStatus.ts create mode 100644 src/api/types/McBasalBodyTemperatureFieldExpr.ts create mode 100644 src/api/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts create mode 100644 src/api/types/McCervicalMucusFieldExpr.ts create mode 100644 src/api/types/McCervicalMucusFieldExprCervicalMucus.ts create mode 100644 src/api/types/McContraceptiveFieldExpr.ts create mode 100644 src/api/types/McContraceptiveFieldExprContraceptive.ts create mode 100644 src/api/types/McDetectedDeviationsFieldExpr.ts create mode 100644 src/api/types/McDetectedDeviationsFieldExprDetectedDeviations.ts create mode 100644 src/api/types/McHomePregnancyTestFieldExpr.ts create mode 100644 src/api/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts create mode 100644 src/api/types/McHomeProgesteroneTestFieldExpr.ts create mode 100644 src/api/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts create mode 100644 src/api/types/McIntermenstrualBleedingFieldExpr.ts create mode 100644 src/api/types/McMenstrualFlowFieldExpr.ts create mode 100644 src/api/types/McMenstrualFlowFieldExprMenstrualFlow.ts create mode 100644 src/api/types/McOvulationTestFieldExpr.ts create mode 100644 src/api/types/McOvulationTestFieldExprOvulationTest.ts create mode 100644 src/api/types/McSexualActivityFieldExpr.ts create mode 100644 src/api/types/McSexualActivityFieldExprSexualActivity.ts create mode 100644 src/api/types/MenstrualCycleColumnExpr.ts create mode 100644 src/api/types/MenstrualCycleColumnExprMenstrualCycle.ts create mode 100644 src/api/types/OrderOrigin.ts create mode 100644 src/api/types/OrderStatusDetail.ts create mode 100644 src/api/types/OrderSummary.ts create mode 100644 src/api/types/OrderTransactionStatus.ts create mode 100644 src/api/types/ParsingJobFailureReason.ts create mode 100644 src/api/types/PerLabCandidate.ts create mode 100644 src/api/types/ProviderIdConversionResponse.ts create mode 100644 src/api/types/RelatedCandidate.ts create mode 100644 src/api/types/ResultMetadataGender.ts create mode 100644 src/api/types/ScalarOutputSubqueryExpr.ts create mode 100644 src/api/types/ScalarOutputSubqueryExprFrom.ts create mode 100644 src/api/types/ScalarOutputSubqueryExprSelect.ts create mode 100644 src/api/types/SearchCompendiumResponse.ts create mode 100644 src/api/types/SearchMode.ts create mode 100644 src/api/types/UnnestExpr.ts create mode 100644 src/api/types/UnnestExprUnnest.ts create mode 100644 src/api/types/UsState.ts create mode 100644 src/api/types/UserAddress.ts create mode 100644 src/serialization/resources/compendium/client/index.ts create mode 100644 src/serialization/resources/compendium/client/requests/ConvertCompendiumBody.ts create mode 100644 src/serialization/resources/compendium/client/requests/SearchCompendiumBody.ts create mode 100644 src/serialization/resources/compendium/client/requests/index.ts create mode 100644 src/serialization/resources/compendium/index.ts delete mode 100644 src/serialization/resources/link/types/LinkBulkExportRequestTeamId.ts delete mode 100644 src/serialization/resources/link/types/LinkBulkImportRequestTeamId.ts delete mode 100644 src/serialization/resources/link/types/LinkBulkPauseRequestTeamId.ts delete mode 100644 src/serialization/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts delete mode 100644 src/serialization/resources/link/types/LinkListBulkOpsRequestTeamId.ts delete mode 100644 src/serialization/resources/link/types/index.ts create mode 100644 src/serialization/types/AggregateFieldExpr.ts create mode 100644 src/serialization/types/AggregateFieldExprArg.ts create mode 100644 src/serialization/types/AggregateFieldExprFunc.ts create mode 100644 src/serialization/types/AwakeningsValueMacroExpr.ts create mode 100644 src/serialization/types/CanonicalCandidate.ts create mode 100644 src/serialization/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts create mode 100644 src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts create mode 100644 src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts create mode 100644 src/serialization/types/ClientFacingLabAccount.ts create mode 100644 src/serialization/types/ClientFacingLabReportParsingJobCreatedEvent.ts create mode 100644 src/serialization/types/ClientFacingLabReportParsingJobUpdatedEvent.ts create mode 100644 src/serialization/types/ClientFacingOrderInTransaction.ts create mode 100644 src/serialization/types/ClientFacingOrderTransaction.ts create mode 100644 src/serialization/types/CompendiumSearchLabs.ts create mode 100644 src/serialization/types/ConvertCompendiumResponse.ts create mode 100644 src/serialization/types/DerivedReadinessColumnExpr.ts create mode 100644 src/serialization/types/DerivedReadinessColumnExprDerivedReadiness.ts create mode 100644 src/serialization/types/ElementFieldExpr.ts create mode 100644 src/serialization/types/GetOrderTransactionResponse.ts create mode 100644 src/serialization/types/GetTeamLabAccountsResponse.ts create mode 100644 src/serialization/types/InsulinInjectionTimeseriesExpr.ts create mode 100644 src/serialization/types/InsulinInjectionTimeseriesExprField.ts create mode 100644 src/serialization/types/LabAccountDelegatedFlow.ts create mode 100644 src/serialization/types/LabAccountStatus.ts create mode 100644 src/serialization/types/McBasalBodyTemperatureFieldExpr.ts create mode 100644 src/serialization/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts create mode 100644 src/serialization/types/McCervicalMucusFieldExpr.ts create mode 100644 src/serialization/types/McCervicalMucusFieldExprCervicalMucus.ts create mode 100644 src/serialization/types/McContraceptiveFieldExpr.ts create mode 100644 src/serialization/types/McContraceptiveFieldExprContraceptive.ts create mode 100644 src/serialization/types/McDetectedDeviationsFieldExpr.ts create mode 100644 src/serialization/types/McDetectedDeviationsFieldExprDetectedDeviations.ts create mode 100644 src/serialization/types/McHomePregnancyTestFieldExpr.ts create mode 100644 src/serialization/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts create mode 100644 src/serialization/types/McHomeProgesteroneTestFieldExpr.ts create mode 100644 src/serialization/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts create mode 100644 src/serialization/types/McIntermenstrualBleedingFieldExpr.ts create mode 100644 src/serialization/types/McMenstrualFlowFieldExpr.ts create mode 100644 src/serialization/types/McMenstrualFlowFieldExprMenstrualFlow.ts create mode 100644 src/serialization/types/McOvulationTestFieldExpr.ts create mode 100644 src/serialization/types/McOvulationTestFieldExprOvulationTest.ts create mode 100644 src/serialization/types/McSexualActivityFieldExpr.ts create mode 100644 src/serialization/types/McSexualActivityFieldExprSexualActivity.ts create mode 100644 src/serialization/types/MenstrualCycleColumnExpr.ts create mode 100644 src/serialization/types/MenstrualCycleColumnExprMenstrualCycle.ts create mode 100644 src/serialization/types/OrderOrigin.ts create mode 100644 src/serialization/types/OrderStatusDetail.ts create mode 100644 src/serialization/types/OrderSummary.ts create mode 100644 src/serialization/types/OrderTransactionStatus.ts create mode 100644 src/serialization/types/ParsingJobFailureReason.ts create mode 100644 src/serialization/types/PerLabCandidate.ts create mode 100644 src/serialization/types/ProviderIdConversionResponse.ts create mode 100644 src/serialization/types/RelatedCandidate.ts create mode 100644 src/serialization/types/ResultMetadataGender.ts create mode 100644 src/serialization/types/ScalarOutputSubqueryExpr.ts create mode 100644 src/serialization/types/ScalarOutputSubqueryExprFrom.ts create mode 100644 src/serialization/types/ScalarOutputSubqueryExprSelect.ts create mode 100644 src/serialization/types/SearchCompendiumResponse.ts create mode 100644 src/serialization/types/SearchMode.ts create mode 100644 src/serialization/types/UnnestExpr.ts create mode 100644 src/serialization/types/UnnestExprUnnest.ts create mode 100644 src/serialization/types/UsState.ts create mode 100644 src/serialization/types/UserAddress.ts create mode 100644 tests/wire/compendium.test.ts create mode 100644 tests/wire/labAccount.test.ts create mode 100644 tests/wire/orderTransaction.test.ts diff --git a/.fern/metadata.json b/.fern/metadata.json index 0c216a00f..462f95415 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "3.35.1", + "cliVersion": "4.94.3", "generatorName": "fernapi/fern-typescript-sdk", - "generatorVersion": "3.43.1", + "generatorVersion": "3.51.3", "generatorConfig": { "namespaceExport": "Vital", "inlineFileProperties": false, @@ -11,5 +11,6 @@ "omitUndefined": false, "skipResponseValidation": false }, - "sdkVersion": "3.1.551" + "originGitCommit": "c05f208934ec1439c0a40f8a48cf2d305559beca", + "sdkVersion": "3.1.552" } diff --git a/.fernignore b/.fernignore index 43ca0d22b..07281cd76 100644 --- a/.fernignore +++ b/.fernignore @@ -1,3 +1,4 @@ # Specify files that shouldn't be modified by Fern README.md +changelog.md diff --git a/biome.json b/biome.json index a777468e4..5084b70a9 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.1/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.3/schema.json", "root": true, "vcs": { "enabled": false diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000..4a02fcb59 --- /dev/null +++ b/changelog.md @@ -0,0 +1,4 @@ +## 3.1.552 - 2026-04-24 +* SDK regeneration +* Unable to analyze changes with AI, incrementing PATCH version. + diff --git a/package.json b/package.json index 55020f023..be0d8267f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tryvital/vital-node", - "version": "3.1.551", + "version": "3.1.552", "private": false, "repository": { "type": "git", @@ -65,13 +65,14 @@ "msw": "2.11.2", "@types/node": "^18.19.70", "typescript": "~5.7.2", - "@biomejs/biome": "2.3.1" + "@biomejs/biome": "2.4.3" }, "browser": { "fs": false, "os": false, "path": false, - "stream": false + "stream": false, + "crypto": false }, "packageManager": "pnpm@10.20.0", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7120f014f..6c717191a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: devDependencies: '@biomejs/biome': - specifier: 2.3.1 - version: 2.3.1 + specifier: 2.4.3 + version: 2.4.3 '@types/node': specifier: ^18.19.70 version: 18.19.130 @@ -19,68 +19,68 @@ importers: version: 2.11.2(@types/node@18.19.130)(typescript@5.7.3) ts-loader: specifier: ^9.5.1 - version: 9.5.4(typescript@5.7.3)(webpack@5.104.1) + version: 9.5.4(typescript@5.7.3)(webpack@5.105.2) typescript: specifier: ~5.7.2 version: 5.7.3 vitest: specifier: ^3.2.4 - version: 3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.44.1) + version: 3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.46.0) webpack: specifier: ^5.97.1 - version: 5.104.1 + version: 5.105.2 packages: - '@biomejs/biome@2.3.1': - resolution: {integrity: sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w==} + '@biomejs/biome@2.4.3': + resolution: {integrity: sha512-cBrjf6PNF6yfL8+kcNl85AjiK2YHNsbU0EvDOwiZjBPbMbQ5QcgVGFpjD0O52p8nec5O8NYw7PKw3xUR7fPAkQ==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.3.1': - resolution: {integrity: sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA==} + '@biomejs/cli-darwin-arm64@2.4.3': + resolution: {integrity: sha512-eOafSFlI/CF4id2tlwq9CVHgeEqvTL5SrhWff6ZORp6S3NL65zdsR3ugybItkgF8Pf4D9GSgtbB6sE3UNgOM9w==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.3.1': - resolution: {integrity: sha512-pcOfwyoQkrkbGvXxRvZNe5qgD797IowpJPovPX5biPk2FwMEV+INZqfCaz4G5bVq9hYnjwhRMamg11U4QsRXrQ==} + '@biomejs/cli-darwin-x64@2.4.3': + resolution: {integrity: sha512-V2+av4ilbWcBMNufTtMMXVW00nPwyIjI5qf7n9wSvUaZ+tt0EvMGk46g9sAFDJBEDOzSyoRXiSP6pCvKTOEbPA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.3.1': - resolution: {integrity: sha512-+DZYv8l7FlUtTrWs1Tdt1KcNCAmRO87PyOnxKGunbWm5HKg1oZBSbIIPkjrCtDZaeqSG1DiGx7qF+CPsquQRcg==} + '@biomejs/cli-linux-arm64-musl@2.4.3': + resolution: {integrity: sha512-QuFzvsGo8BA4Xm7jGX5idkw6BqFblcCPySMTvq0AhGYnhUej5VJIDJbmTKfHqwjHepZiC4fA+T5i6wmiZolZNw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@2.3.1': - resolution: {integrity: sha512-td5O8pFIgLs8H1sAZsD6v+5quODihyEw4nv2R8z7swUfIK1FKk+15e4eiYVLcAE4jUqngvh4j3JCNgg0Y4o4IQ==} + '@biomejs/cli-linux-arm64@2.4.3': + resolution: {integrity: sha512-0m+O0x9FgK99FAwDK+fiDtjs2wnqq7bvfj17KJVeCkTwT/liI+Q9njJG7lwXK0iSJVXeFNRIxukpVI3SifMYAA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@2.3.1': - resolution: {integrity: sha512-Y3Ob4nqgv38Mh+6EGHltuN+Cq8aj/gyMTJYzkFZV2AEj+9XzoXB9VNljz9pjfFNHUxvLEV4b55VWyxozQTBaUQ==} + '@biomejs/cli-linux-x64-musl@2.4.3': + resolution: {integrity: sha512-qEc0OCpj/uytruQ4wLM0yWNJLZy0Up8H1Er5MW3SrstqM6J2d4XqdNA86xzCy8MQCHpoVZ3lFye3GBlIL4/ljw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@2.3.1': - resolution: {integrity: sha512-PYWgEO7up7XYwSAArOpzsVCiqxBCXy53gsReAb1kKYIyXaoAlhBaBMvxR/k2Rm9aTuZ662locXUmPk/Aj+Xu+Q==} + '@biomejs/cli-linux-x64@2.4.3': + resolution: {integrity: sha512-NVqh0saIU0u5OfOp/0jFdlKRE59+XyMvWmtx0f6Nm/2OpdxBl04coRIftBbY9d1gfu+23JVv4CItAqPYrjYh5w==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@2.3.1': - resolution: {integrity: sha512-RHIG/zgo+69idUqVvV3n8+j58dKYABRpMyDmfWu2TITC+jwGPiEaT0Q3RKD+kQHiS80mpBrST0iUGeEXT0bU9A==} + '@biomejs/cli-win32-arm64@2.4.3': + resolution: {integrity: sha512-gRO96vrIARilv/Cp2ZnmNNL5LSZg3RO75GPp13hsLO3N4YVpE7saaMDp2bcyV48y2N2Pbit1brkGVGta0yd6VQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.3.1': - resolution: {integrity: sha512-izl30JJ5Dp10mi90Eko47zhxE6pYyWPcnX1NQxKpL/yMhXxf95oLTzfpu4q+MDBh/gemNqyJEwjBpe0MT5iWPA==} + '@biomejs/cli-win32-x64@2.4.3': + resolution: {integrity: sha512-vSm/vOJe06pf14aGHfHl3Ar91Nlx4YYmohElDJ+17UbRwe99n987S/MhAlQOkONqf1utJor04ChkCPmKb8SWdw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -91,158 +91,158 @@ packages: '@bundled-es-modules/statuses@1.0.1': resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} - '@esbuild/aix-ppc64@0.27.2': - resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} + '@esbuild/aix-ppc64@0.27.3': + resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.2': - resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==} + '@esbuild/android-arm64@0.27.3': + resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.2': - resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==} + '@esbuild/android-arm@0.27.3': + resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.2': - resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==} + '@esbuild/android-x64@0.27.3': + resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.2': - resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==} + '@esbuild/darwin-arm64@0.27.3': + resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.2': - resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==} + '@esbuild/darwin-x64@0.27.3': + resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.2': - resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==} + '@esbuild/freebsd-arm64@0.27.3': + resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.2': - resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==} + '@esbuild/freebsd-x64@0.27.3': + resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.2': - resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==} + '@esbuild/linux-arm64@0.27.3': + resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.2': - resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==} + '@esbuild/linux-arm@0.27.3': + resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.2': - resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==} + '@esbuild/linux-ia32@0.27.3': + resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.2': - resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==} + '@esbuild/linux-loong64@0.27.3': + resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.2': - resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==} + '@esbuild/linux-mips64el@0.27.3': + resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.2': - resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==} + '@esbuild/linux-ppc64@0.27.3': + resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.2': - resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==} + '@esbuild/linux-riscv64@0.27.3': + resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.2': - resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==} + '@esbuild/linux-s390x@0.27.3': + resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.2': - resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==} + '@esbuild/linux-x64@0.27.3': + resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.2': - resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==} + '@esbuild/netbsd-arm64@0.27.3': + resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.2': - resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==} + '@esbuild/netbsd-x64@0.27.3': + resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.2': - resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==} + '@esbuild/openbsd-arm64@0.27.3': + resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.2': - resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==} + '@esbuild/openbsd-x64@0.27.3': + resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.2': - resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==} + '@esbuild/openharmony-arm64@0.27.3': + resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.2': - resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==} + '@esbuild/sunos-x64@0.27.3': + resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.2': - resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==} + '@esbuild/win32-arm64@0.27.3': + resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.2': - resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==} + '@esbuild/win32-ia32@0.27.3': + resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.2': - resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==} + '@esbuild/win32-x64@0.27.3': + resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -311,113 +311,128 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@rollup/rollup-android-arm-eabi@4.54.0': - resolution: {integrity: sha512-OywsdRHrFvCdvsewAInDKCNyR3laPA2mc9bRYJ6LBp5IyvF3fvXbbNR0bSzHlZVFtn6E0xw2oZlyjg4rKCVcng==} + '@rollup/rollup-android-arm-eabi@4.59.0': + resolution: {integrity: sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.54.0': - resolution: {integrity: sha512-Skx39Uv+u7H224Af+bDgNinitlmHyQX1K/atIA32JP3JQw6hVODX5tkbi2zof/E69M1qH2UoN3Xdxgs90mmNYw==} + '@rollup/rollup-android-arm64@4.59.0': + resolution: {integrity: sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.54.0': - resolution: {integrity: sha512-k43D4qta/+6Fq+nCDhhv9yP2HdeKeP56QrUUTW7E6PhZP1US6NDqpJj4MY0jBHlJivVJD5P8NxrjuobZBJTCRw==} + '@rollup/rollup-darwin-arm64@4.59.0': + resolution: {integrity: sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.54.0': - resolution: {integrity: sha512-cOo7biqwkpawslEfox5Vs8/qj83M/aZCSSNIWpVzfU2CYHa2G3P1UN5WF01RdTHSgCkri7XOlTdtk17BezlV3A==} + '@rollup/rollup-darwin-x64@4.59.0': + resolution: {integrity: sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.54.0': - resolution: {integrity: sha512-miSvuFkmvFbgJ1BevMa4CPCFt5MPGw094knM64W9I0giUIMMmRYcGW/JWZDriaw/k1kOBtsWh1z6nIFV1vPNtA==} + '@rollup/rollup-freebsd-arm64@4.59.0': + resolution: {integrity: sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.54.0': - resolution: {integrity: sha512-KGXIs55+b/ZfZsq9aR026tmr/+7tq6VG6MsnrvF4H8VhwflTIuYh+LFUlIsRdQSgrgmtM3fVATzEAj4hBQlaqQ==} + '@rollup/rollup-freebsd-x64@4.59.0': + resolution: {integrity: sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.54.0': - resolution: {integrity: sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.59.0': + resolution: {integrity: sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.54.0': - resolution: {integrity: sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==} + '@rollup/rollup-linux-arm-musleabihf@4.59.0': + resolution: {integrity: sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.54.0': - resolution: {integrity: sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==} + '@rollup/rollup-linux-arm64-gnu@4.59.0': + resolution: {integrity: sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.54.0': - resolution: {integrity: sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==} + '@rollup/rollup-linux-arm64-musl@4.59.0': + resolution: {integrity: sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.54.0': - resolution: {integrity: sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==} + '@rollup/rollup-linux-loong64-gnu@4.59.0': + resolution: {integrity: sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.54.0': - resolution: {integrity: sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==} + '@rollup/rollup-linux-loong64-musl@4.59.0': + resolution: {integrity: sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.59.0': + resolution: {integrity: sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.59.0': + resolution: {integrity: sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.54.0': - resolution: {integrity: sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==} + '@rollup/rollup-linux-riscv64-gnu@4.59.0': + resolution: {integrity: sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.54.0': - resolution: {integrity: sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==} + '@rollup/rollup-linux-riscv64-musl@4.59.0': + resolution: {integrity: sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.54.0': - resolution: {integrity: sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==} + '@rollup/rollup-linux-s390x-gnu@4.59.0': + resolution: {integrity: sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.54.0': - resolution: {integrity: sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==} + '@rollup/rollup-linux-x64-gnu@4.59.0': + resolution: {integrity: sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.54.0': - resolution: {integrity: sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==} + '@rollup/rollup-linux-x64-musl@4.59.0': + resolution: {integrity: sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.54.0': - resolution: {integrity: sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==} + '@rollup/rollup-openbsd-x64@4.59.0': + resolution: {integrity: sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.59.0': + resolution: {integrity: sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.54.0': - resolution: {integrity: sha512-c2V0W1bsKIKfbLMBu/WGBz6Yci8nJ/ZJdheE0EwB73N3MvHYKiKGs3mVilX4Gs70eGeDaMqEob25Tw2Gb9Nqyw==} + '@rollup/rollup-win32-arm64-msvc@4.59.0': + resolution: {integrity: sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.54.0': - resolution: {integrity: sha512-woEHgqQqDCkAzrDhvDipnSirm5vxUXtSKDYTVpZG3nUdW/VVB5VdCYA2iReSj/u3yCZzXID4kuKG7OynPnB3WQ==} + '@rollup/rollup-win32-ia32-msvc@4.59.0': + resolution: {integrity: sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.54.0': - resolution: {integrity: sha512-dzAc53LOuFvHwbCEOS0rPbXp6SIhAf2txMP5p6mGyOXXw5mWY8NGGbPMPrs4P1WItkfApDathBj/NzMLUZ9rtQ==} + '@rollup/rollup-win32-x64-gnu@4.59.0': + resolution: {integrity: sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.54.0': - resolution: {integrity: sha512-hYT5d3YNdSh3mbCU1gwQyPgQd3T2ne0A3KG8KSBdav5TiBg6eInVmV+TeR5uHufiIgSFg0XsOWGW5/RhNcSvPg==} + '@rollup/rollup-win32-x64-msvc@4.59.0': + resolution: {integrity: sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==} cpu: [x64] os: [win32] @@ -534,8 +549,8 @@ packages: peerDependencies: acorn: ^8.14.0 - acorn@8.15.0: - resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + acorn@8.16.0: + resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} hasBin: true @@ -552,8 +567,8 @@ packages: peerDependencies: ajv: ^8.8.2 - ajv@8.17.1: - resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + ajv@8.18.0: + resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} @@ -567,8 +582,9 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - baseline-browser-mapping@2.9.11: - resolution: {integrity: sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==} + baseline-browser-mapping@2.10.0: + resolution: {integrity: sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==} + engines: {node: '>=6.0.0'} hasBin: true braces@3.0.3: @@ -587,8 +603,8 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} - caniuse-lite@1.0.30001761: - resolution: {integrity: sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==} + caniuse-lite@1.0.30001774: + resolution: {integrity: sha512-DDdwPGz99nmIEv216hKSgLD+D4ikHQHjBC/seF98N9CPqRX4M5mSxT9eTV6oyisnJcuzxtZy4n17yKKQYmYQOA==} chai@5.3.3: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} @@ -598,8 +614,8 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - check-error@2.1.1: - resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + check-error@2.1.3: + resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} engines: {node: '>= 16'} chrome-trace-event@1.0.4: @@ -641,14 +657,14 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} - electron-to-chromium@1.5.267: - resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==} + electron-to-chromium@1.5.302: + resolution: {integrity: sha512-sM6HAN2LyK82IyPBpznDRqlTQAtuSaO+ShzFiWTvoMJLHyZ+Y39r8VMfHzwbU8MVBzQ4Wdn85+wlZl2TLGIlwg==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - enhanced-resolve@5.18.4: - resolution: {integrity: sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==} + enhanced-resolve@5.19.0: + resolution: {integrity: sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==} engines: {node: '>=10.13.0'} es-module-lexer@1.7.0: @@ -657,8 +673,8 @@ packages: es-module-lexer@2.0.0: resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} - esbuild@0.27.2: - resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} + esbuild@0.27.3: + resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==} engines: {node: '>=18'} hasBin: true @@ -727,8 +743,8 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphql@16.12.0: - resolution: {integrity: sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==} + graphql@16.13.0: + resolution: {integrity: sha512-uSisMYERbaB9bkA9M4/4dnqyktaEkf1kMHNKq/7DHyxVeWqHQ2mBmVqm5u6/FVHwF3iCNalKcg82Zfl+tffWoA==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} has-flag@4.0.0: @@ -857,8 +873,8 @@ packages: rettime@0.7.0: resolution: {integrity: sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw==} - rollup@4.54.0: - resolution: {integrity: sha512-3nk8Y3a9Ea8szgKhinMlGMhGMw89mqule3KWczxhIzqudyHdCIOHw8WJlj/r329fACjKLEh13ZSk7oE22kyeIw==} + rollup@4.59.0: + resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -869,8 +885,8 @@ packages: resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==} engines: {node: '>= 10.13.0'} - semver@7.7.3: - resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} engines: {node: '>=10'} hasBin: true @@ -951,8 +967,8 @@ packages: uglify-js: optional: true - terser@5.44.1: - resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==} + terser@5.46.0: + resolution: {integrity: sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg==} engines: {node: '>=10'} hasBin: true @@ -978,11 +994,11 @@ packages: resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==} engines: {node: '>=14.0.0'} - tldts-core@7.0.19: - resolution: {integrity: sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A==} + tldts-core@7.0.23: + resolution: {integrity: sha512-0g9vrtDQLrNIiCj22HSe9d4mLVG3g5ph5DZ8zCKBr4OtrspmNB6ss7hVyzArAeE88ceZocIEGkyW1Ime7fxPtQ==} - tldts@7.0.19: - resolution: {integrity: sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA==} + tldts@7.0.23: + resolution: {integrity: sha512-ASdhgQIBSay0R/eXggAkQ53G4nTJqTXqC2kbaBbdDwM7SkjyZyO0OaaN1/FH7U/yCeqOHDwFO5j8+Os/IS1dXw==} hasBin: true to-regex-range@5.0.1: @@ -1023,8 +1039,8 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@7.3.0: - resolution: {integrity: sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==} + vite@7.3.1: + resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -1091,16 +1107,16 @@ packages: jsdom: optional: true - watchpack@2.4.4: - resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==} + watchpack@2.5.1: + resolution: {integrity: sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==} engines: {node: '>=10.13.0'} - webpack-sources@3.3.3: - resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} + webpack-sources@3.3.4: + resolution: {integrity: sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==} engines: {node: '>=10.13.0'} - webpack@5.104.1: - resolution: {integrity: sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==} + webpack@5.105.2: + resolution: {integrity: sha512-dRXm0a2qcHPUBEzVk8uph0xWSjV/xZxenQQbLwnwP7caQCYpqG1qddwlyEkIDkYn0K8tvmcrZ+bOrzoQ3HxCDw==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -1140,39 +1156,39 @@ packages: snapshots: - '@biomejs/biome@2.3.1': + '@biomejs/biome@2.4.3': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.3.1 - '@biomejs/cli-darwin-x64': 2.3.1 - '@biomejs/cli-linux-arm64': 2.3.1 - '@biomejs/cli-linux-arm64-musl': 2.3.1 - '@biomejs/cli-linux-x64': 2.3.1 - '@biomejs/cli-linux-x64-musl': 2.3.1 - '@biomejs/cli-win32-arm64': 2.3.1 - '@biomejs/cli-win32-x64': 2.3.1 - - '@biomejs/cli-darwin-arm64@2.3.1': + '@biomejs/cli-darwin-arm64': 2.4.3 + '@biomejs/cli-darwin-x64': 2.4.3 + '@biomejs/cli-linux-arm64': 2.4.3 + '@biomejs/cli-linux-arm64-musl': 2.4.3 + '@biomejs/cli-linux-x64': 2.4.3 + '@biomejs/cli-linux-x64-musl': 2.4.3 + '@biomejs/cli-win32-arm64': 2.4.3 + '@biomejs/cli-win32-x64': 2.4.3 + + '@biomejs/cli-darwin-arm64@2.4.3': optional: true - '@biomejs/cli-darwin-x64@2.3.1': + '@biomejs/cli-darwin-x64@2.4.3': optional: true - '@biomejs/cli-linux-arm64-musl@2.3.1': + '@biomejs/cli-linux-arm64-musl@2.4.3': optional: true - '@biomejs/cli-linux-arm64@2.3.1': + '@biomejs/cli-linux-arm64@2.4.3': optional: true - '@biomejs/cli-linux-x64-musl@2.3.1': + '@biomejs/cli-linux-x64-musl@2.4.3': optional: true - '@biomejs/cli-linux-x64@2.3.1': + '@biomejs/cli-linux-x64@2.4.3': optional: true - '@biomejs/cli-win32-arm64@2.3.1': + '@biomejs/cli-win32-arm64@2.4.3': optional: true - '@biomejs/cli-win32-x64@2.3.1': + '@biomejs/cli-win32-x64@2.4.3': optional: true '@bundled-es-modules/cookie@2.0.1': @@ -1183,82 +1199,82 @@ snapshots: dependencies: statuses: 2.0.2 - '@esbuild/aix-ppc64@0.27.2': + '@esbuild/aix-ppc64@0.27.3': optional: true - '@esbuild/android-arm64@0.27.2': + '@esbuild/android-arm64@0.27.3': optional: true - '@esbuild/android-arm@0.27.2': + '@esbuild/android-arm@0.27.3': optional: true - '@esbuild/android-x64@0.27.2': + '@esbuild/android-x64@0.27.3': optional: true - '@esbuild/darwin-arm64@0.27.2': + '@esbuild/darwin-arm64@0.27.3': optional: true - '@esbuild/darwin-x64@0.27.2': + '@esbuild/darwin-x64@0.27.3': optional: true - '@esbuild/freebsd-arm64@0.27.2': + '@esbuild/freebsd-arm64@0.27.3': optional: true - '@esbuild/freebsd-x64@0.27.2': + '@esbuild/freebsd-x64@0.27.3': optional: true - '@esbuild/linux-arm64@0.27.2': + '@esbuild/linux-arm64@0.27.3': optional: true - '@esbuild/linux-arm@0.27.2': + '@esbuild/linux-arm@0.27.3': optional: true - '@esbuild/linux-ia32@0.27.2': + '@esbuild/linux-ia32@0.27.3': optional: true - '@esbuild/linux-loong64@0.27.2': + '@esbuild/linux-loong64@0.27.3': optional: true - '@esbuild/linux-mips64el@0.27.2': + '@esbuild/linux-mips64el@0.27.3': optional: true - '@esbuild/linux-ppc64@0.27.2': + '@esbuild/linux-ppc64@0.27.3': optional: true - '@esbuild/linux-riscv64@0.27.2': + '@esbuild/linux-riscv64@0.27.3': optional: true - '@esbuild/linux-s390x@0.27.2': + '@esbuild/linux-s390x@0.27.3': optional: true - '@esbuild/linux-x64@0.27.2': + '@esbuild/linux-x64@0.27.3': optional: true - '@esbuild/netbsd-arm64@0.27.2': + '@esbuild/netbsd-arm64@0.27.3': optional: true - '@esbuild/netbsd-x64@0.27.2': + '@esbuild/netbsd-x64@0.27.3': optional: true - '@esbuild/openbsd-arm64@0.27.2': + '@esbuild/openbsd-arm64@0.27.3': optional: true - '@esbuild/openbsd-x64@0.27.2': + '@esbuild/openbsd-x64@0.27.3': optional: true - '@esbuild/openharmony-arm64@0.27.2': + '@esbuild/openharmony-arm64@0.27.3': optional: true - '@esbuild/sunos-x64@0.27.2': + '@esbuild/sunos-x64@0.27.3': optional: true - '@esbuild/win32-arm64@0.27.2': + '@esbuild/win32-arm64@0.27.3': optional: true - '@esbuild/win32-ia32@0.27.2': + '@esbuild/win32-ia32@0.27.3': optional: true - '@esbuild/win32-x64@0.27.2': + '@esbuild/win32-x64@0.27.3': optional: true '@inquirer/ansi@1.0.2': {} @@ -1326,70 +1342,79 @@ snapshots: '@open-draft/until@2.1.0': {} - '@rollup/rollup-android-arm-eabi@4.54.0': + '@rollup/rollup-android-arm-eabi@4.59.0': + optional: true + + '@rollup/rollup-android-arm64@4.59.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.59.0': + optional: true + + '@rollup/rollup-darwin-x64@4.59.0': optional: true - '@rollup/rollup-android-arm64@4.54.0': + '@rollup/rollup-freebsd-arm64@4.59.0': optional: true - '@rollup/rollup-darwin-arm64@4.54.0': + '@rollup/rollup-freebsd-x64@4.59.0': optional: true - '@rollup/rollup-darwin-x64@4.54.0': + '@rollup/rollup-linux-arm-gnueabihf@4.59.0': optional: true - '@rollup/rollup-freebsd-arm64@4.54.0': + '@rollup/rollup-linux-arm-musleabihf@4.59.0': optional: true - '@rollup/rollup-freebsd-x64@4.54.0': + '@rollup/rollup-linux-arm64-gnu@4.59.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.54.0': + '@rollup/rollup-linux-arm64-musl@4.59.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.54.0': + '@rollup/rollup-linux-loong64-gnu@4.59.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.54.0': + '@rollup/rollup-linux-loong64-musl@4.59.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.54.0': + '@rollup/rollup-linux-ppc64-gnu@4.59.0': optional: true - '@rollup/rollup-linux-loong64-gnu@4.54.0': + '@rollup/rollup-linux-ppc64-musl@4.59.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.54.0': + '@rollup/rollup-linux-riscv64-gnu@4.59.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.54.0': + '@rollup/rollup-linux-riscv64-musl@4.59.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.54.0': + '@rollup/rollup-linux-s390x-gnu@4.59.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.54.0': + '@rollup/rollup-linux-x64-gnu@4.59.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.54.0': + '@rollup/rollup-linux-x64-musl@4.59.0': optional: true - '@rollup/rollup-linux-x64-musl@4.54.0': + '@rollup/rollup-openbsd-x64@4.59.0': optional: true - '@rollup/rollup-openharmony-arm64@4.54.0': + '@rollup/rollup-openharmony-arm64@4.59.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.54.0': + '@rollup/rollup-win32-arm64-msvc@4.59.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.54.0': + '@rollup/rollup-win32-ia32-msvc@4.59.0': optional: true - '@rollup/rollup-win32-x64-gnu@4.54.0': + '@rollup/rollup-win32-x64-gnu@4.59.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.54.0': + '@rollup/rollup-win32-x64-msvc@4.59.0': optional: true '@types/chai@5.2.3': @@ -1429,14 +1454,14 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.3.0(@types/node@18.19.130)(terser@5.44.1))': + '@vitest/mocker@3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.3.1(@types/node@18.19.130)(terser@5.46.0))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.11.2(@types/node@18.19.130)(typescript@5.7.3) - vite: 7.3.0(@types/node@18.19.130)(terser@5.44.1) + vite: 7.3.1(@types/node@18.19.130)(terser@5.46.0) '@vitest/pretty-format@3.2.4': dependencies: @@ -1544,22 +1569,22 @@ snapshots: '@xtuc/long@4.2.2': {} - acorn-import-phases@1.0.4(acorn@8.15.0): + acorn-import-phases@1.0.4(acorn@8.16.0): dependencies: - acorn: 8.15.0 + acorn: 8.16.0 - acorn@8.15.0: {} + acorn@8.16.0: {} - ajv-formats@2.1.1(ajv@8.17.1): + ajv-formats@2.1.1(ajv@8.18.0): optionalDependencies: - ajv: 8.17.1 + ajv: 8.18.0 - ajv-keywords@5.1.0(ajv@8.17.1): + ajv-keywords@5.1.0(ajv@8.18.0): dependencies: - ajv: 8.17.1 + ajv: 8.18.0 fast-deep-equal: 3.1.3 - ajv@8.17.1: + ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 fast-uri: 3.1.0 @@ -1574,7 +1599,7 @@ snapshots: assertion-error@2.0.1: {} - baseline-browser-mapping@2.9.11: {} + baseline-browser-mapping@2.10.0: {} braces@3.0.3: dependencies: @@ -1582,9 +1607,9 @@ snapshots: browserslist@4.28.1: dependencies: - baseline-browser-mapping: 2.9.11 - caniuse-lite: 1.0.30001761 - electron-to-chromium: 1.5.267 + baseline-browser-mapping: 2.10.0 + caniuse-lite: 1.0.30001774 + electron-to-chromium: 1.5.302 node-releases: 2.0.27 update-browserslist-db: 1.2.3(browserslist@4.28.1) @@ -1592,12 +1617,12 @@ snapshots: cac@6.7.14: {} - caniuse-lite@1.0.30001761: {} + caniuse-lite@1.0.30001774: {} chai@5.3.3: dependencies: assertion-error: 2.0.1 - check-error: 2.1.1 + check-error: 2.1.3 deep-eql: 5.0.2 loupe: 3.2.1 pathval: 2.0.1 @@ -1607,7 +1632,7 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - check-error@2.1.1: {} + check-error@2.1.3: {} chrome-trace-event@1.0.4: {} @@ -1635,11 +1660,11 @@ snapshots: deep-eql@5.0.2: {} - electron-to-chromium@1.5.267: {} + electron-to-chromium@1.5.302: {} emoji-regex@8.0.0: {} - enhanced-resolve@5.18.4: + enhanced-resolve@5.19.0: dependencies: graceful-fs: 4.2.11 tapable: 2.3.0 @@ -1648,34 +1673,34 @@ snapshots: es-module-lexer@2.0.0: {} - esbuild@0.27.2: + esbuild@0.27.3: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.2 - '@esbuild/android-arm': 0.27.2 - '@esbuild/android-arm64': 0.27.2 - '@esbuild/android-x64': 0.27.2 - '@esbuild/darwin-arm64': 0.27.2 - '@esbuild/darwin-x64': 0.27.2 - '@esbuild/freebsd-arm64': 0.27.2 - '@esbuild/freebsd-x64': 0.27.2 - '@esbuild/linux-arm': 0.27.2 - '@esbuild/linux-arm64': 0.27.2 - '@esbuild/linux-ia32': 0.27.2 - '@esbuild/linux-loong64': 0.27.2 - '@esbuild/linux-mips64el': 0.27.2 - '@esbuild/linux-ppc64': 0.27.2 - '@esbuild/linux-riscv64': 0.27.2 - '@esbuild/linux-s390x': 0.27.2 - '@esbuild/linux-x64': 0.27.2 - '@esbuild/netbsd-arm64': 0.27.2 - '@esbuild/netbsd-x64': 0.27.2 - '@esbuild/openbsd-arm64': 0.27.2 - '@esbuild/openbsd-x64': 0.27.2 - '@esbuild/openharmony-arm64': 0.27.2 - '@esbuild/sunos-x64': 0.27.2 - '@esbuild/win32-arm64': 0.27.2 - '@esbuild/win32-ia32': 0.27.2 - '@esbuild/win32-x64': 0.27.2 + '@esbuild/aix-ppc64': 0.27.3 + '@esbuild/android-arm': 0.27.3 + '@esbuild/android-arm64': 0.27.3 + '@esbuild/android-x64': 0.27.3 + '@esbuild/darwin-arm64': 0.27.3 + '@esbuild/darwin-x64': 0.27.3 + '@esbuild/freebsd-arm64': 0.27.3 + '@esbuild/freebsd-x64': 0.27.3 + '@esbuild/linux-arm': 0.27.3 + '@esbuild/linux-arm64': 0.27.3 + '@esbuild/linux-ia32': 0.27.3 + '@esbuild/linux-loong64': 0.27.3 + '@esbuild/linux-mips64el': 0.27.3 + '@esbuild/linux-ppc64': 0.27.3 + '@esbuild/linux-riscv64': 0.27.3 + '@esbuild/linux-s390x': 0.27.3 + '@esbuild/linux-x64': 0.27.3 + '@esbuild/netbsd-arm64': 0.27.3 + '@esbuild/netbsd-x64': 0.27.3 + '@esbuild/openbsd-arm64': 0.27.3 + '@esbuild/openbsd-x64': 0.27.3 + '@esbuild/openharmony-arm64': 0.27.3 + '@esbuild/sunos-x64': 0.27.3 + '@esbuild/win32-arm64': 0.27.3 + '@esbuild/win32-ia32': 0.27.3 + '@esbuild/win32-x64': 0.27.3 escalade@3.2.0: {} @@ -1721,7 +1746,7 @@ snapshots: graceful-fs@4.2.11: {} - graphql@16.12.0: {} + graphql@16.13.0: {} has-flag@4.0.0: {} @@ -1778,7 +1803,7 @@ snapshots: '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 '@types/statuses': 2.0.6 - graphql: 16.12.0 + graphql: 16.13.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -1832,32 +1857,35 @@ snapshots: rettime@0.7.0: {} - rollup@4.54.0: + rollup@4.59.0: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.54.0 - '@rollup/rollup-android-arm64': 4.54.0 - '@rollup/rollup-darwin-arm64': 4.54.0 - '@rollup/rollup-darwin-x64': 4.54.0 - '@rollup/rollup-freebsd-arm64': 4.54.0 - '@rollup/rollup-freebsd-x64': 4.54.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.54.0 - '@rollup/rollup-linux-arm-musleabihf': 4.54.0 - '@rollup/rollup-linux-arm64-gnu': 4.54.0 - '@rollup/rollup-linux-arm64-musl': 4.54.0 - '@rollup/rollup-linux-loong64-gnu': 4.54.0 - '@rollup/rollup-linux-ppc64-gnu': 4.54.0 - '@rollup/rollup-linux-riscv64-gnu': 4.54.0 - '@rollup/rollup-linux-riscv64-musl': 4.54.0 - '@rollup/rollup-linux-s390x-gnu': 4.54.0 - '@rollup/rollup-linux-x64-gnu': 4.54.0 - '@rollup/rollup-linux-x64-musl': 4.54.0 - '@rollup/rollup-openharmony-arm64': 4.54.0 - '@rollup/rollup-win32-arm64-msvc': 4.54.0 - '@rollup/rollup-win32-ia32-msvc': 4.54.0 - '@rollup/rollup-win32-x64-gnu': 4.54.0 - '@rollup/rollup-win32-x64-msvc': 4.54.0 + '@rollup/rollup-android-arm-eabi': 4.59.0 + '@rollup/rollup-android-arm64': 4.59.0 + '@rollup/rollup-darwin-arm64': 4.59.0 + '@rollup/rollup-darwin-x64': 4.59.0 + '@rollup/rollup-freebsd-arm64': 4.59.0 + '@rollup/rollup-freebsd-x64': 4.59.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.59.0 + '@rollup/rollup-linux-arm-musleabihf': 4.59.0 + '@rollup/rollup-linux-arm64-gnu': 4.59.0 + '@rollup/rollup-linux-arm64-musl': 4.59.0 + '@rollup/rollup-linux-loong64-gnu': 4.59.0 + '@rollup/rollup-linux-loong64-musl': 4.59.0 + '@rollup/rollup-linux-ppc64-gnu': 4.59.0 + '@rollup/rollup-linux-ppc64-musl': 4.59.0 + '@rollup/rollup-linux-riscv64-gnu': 4.59.0 + '@rollup/rollup-linux-riscv64-musl': 4.59.0 + '@rollup/rollup-linux-s390x-gnu': 4.59.0 + '@rollup/rollup-linux-x64-gnu': 4.59.0 + '@rollup/rollup-linux-x64-musl': 4.59.0 + '@rollup/rollup-openbsd-x64': 4.59.0 + '@rollup/rollup-openharmony-arm64': 4.59.0 + '@rollup/rollup-win32-arm64-msvc': 4.59.0 + '@rollup/rollup-win32-ia32-msvc': 4.59.0 + '@rollup/rollup-win32-x64-gnu': 4.59.0 + '@rollup/rollup-win32-x64-msvc': 4.59.0 fsevents: 2.3.3 safe-buffer@5.2.1: {} @@ -1865,11 +1893,11 @@ snapshots: schema-utils@4.3.3: dependencies: '@types/json-schema': 7.0.15 - ajv: 8.17.1 - ajv-formats: 2.1.1(ajv@8.17.1) - ajv-keywords: 5.1.0(ajv@8.17.1) + ajv: 8.18.0 + ajv-formats: 2.1.1(ajv@8.18.0) + ajv-keywords: 5.1.0(ajv@8.18.0) - semver@7.7.3: {} + semver@7.7.4: {} serialize-javascript@6.0.2: dependencies: @@ -1922,19 +1950,19 @@ snapshots: tapable@2.3.0: {} - terser-webpack-plugin@5.3.16(webpack@5.104.1): + terser-webpack-plugin@5.3.16(webpack@5.105.2): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 serialize-javascript: 6.0.2 - terser: 5.44.1 - webpack: 5.104.1 + terser: 5.46.0 + webpack: 5.105.2 - terser@5.44.1: + terser@5.46.0: dependencies: '@jridgewell/source-map': 0.3.11 - acorn: 8.15.0 + acorn: 8.16.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -1953,11 +1981,11 @@ snapshots: tinyspy@4.0.4: {} - tldts-core@7.0.19: {} + tldts-core@7.0.23: {} - tldts@7.0.19: + tldts@7.0.23: dependencies: - tldts-core: 7.0.19 + tldts-core: 7.0.23 to-regex-range@5.0.1: dependencies: @@ -1965,17 +1993,17 @@ snapshots: tough-cookie@6.0.0: dependencies: - tldts: 7.0.19 + tldts: 7.0.23 - ts-loader@9.5.4(typescript@5.7.3)(webpack@5.104.1): + ts-loader@9.5.4(typescript@5.7.3)(webpack@5.105.2): dependencies: chalk: 4.1.2 - enhanced-resolve: 5.18.4 + enhanced-resolve: 5.19.0 micromatch: 4.0.8 - semver: 7.7.3 + semver: 7.7.4 source-map: 0.7.6 typescript: 5.7.3 - webpack: 5.104.1 + webpack: 5.105.2 type-fest@4.41.0: {} @@ -1989,13 +2017,13 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - vite-node@3.2.4(@types/node@18.19.130)(terser@5.44.1): + vite-node@3.2.4(@types/node@18.19.130)(terser@5.46.0): dependencies: cac: 6.7.14 debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.0(@types/node@18.19.130)(terser@5.44.1) + vite: 7.3.1(@types/node@18.19.130)(terser@5.46.0) transitivePeerDependencies: - '@types/node' - jiti @@ -2010,24 +2038,24 @@ snapshots: - tsx - yaml - vite@7.3.0(@types/node@18.19.130)(terser@5.44.1): + vite@7.3.1(@types/node@18.19.130)(terser@5.46.0): dependencies: - esbuild: 0.27.2 + esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.54.0 + rollup: 4.59.0 tinyglobby: 0.2.15 optionalDependencies: '@types/node': 18.19.130 fsevents: 2.3.3 - terser: 5.44.1 + terser: 5.46.0 - vitest@3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.44.1): + vitest@3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.46.0): dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.3.0(@types/node@18.19.130)(terser@5.44.1)) + '@vitest/mocker': 3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.3.1(@types/node@18.19.130)(terser@5.46.0)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -2045,8 +2073,8 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.3.0(@types/node@18.19.130)(terser@5.44.1) - vite-node: 3.2.4(@types/node@18.19.130)(terser@5.44.1) + vite: 7.3.1(@types/node@18.19.130)(terser@5.46.0) + vite-node: 3.2.4(@types/node@18.19.130)(terser@5.46.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 18.19.130 @@ -2064,14 +2092,14 @@ snapshots: - tsx - yaml - watchpack@2.4.4: + watchpack@2.5.1: dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 - webpack-sources@3.3.3: {} + webpack-sources@3.3.4: {} - webpack@5.104.1: + webpack@5.105.2: dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -2079,11 +2107,11 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.15.0 - acorn-import-phases: 1.0.4(acorn@8.15.0) + acorn: 8.16.0 + acorn-import-phases: 1.0.4(acorn@8.16.0) browserslist: 4.28.1 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.18.4 + enhanced-resolve: 5.19.0 es-module-lexer: 2.0.0 eslint-scope: 5.1.1 events: 3.3.0 @@ -2095,9 +2123,9 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.16(webpack@5.104.1) - watchpack: 2.4.4 - webpack-sources: 3.3.3 + terser-webpack-plugin: 5.3.16(webpack@5.105.2) + watchpack: 2.5.1 + webpack-sources: 3.3.4 transitivePeerDependencies: - '@swc/core' - esbuild diff --git a/reference.md b/reference.md index d9f9b4572..cd9f50e6b 100644 --- a/reference.md +++ b/reference.md @@ -15,8 +15,7 @@ ```typescript await client.link.listBulkOps({ nextCursor: "next_cursor", - pageSize: 1, - teamId: "infer_from_context" + pageSize: 1 }); ``` @@ -67,7 +66,6 @@ await client.link.listBulkOps({ ```typescript await client.link.bulkImport({ - teamId: "infer_from_context", provider: "oura", connections: [{ userId: "user_id", @@ -126,7 +124,6 @@ await client.link.bulkImport({ ```typescript await client.link.bulkTriggerHistoricalPull({ - teamId: "infer_from_context", userIds: ["user_ids"], provider: "oura" }); @@ -179,7 +176,6 @@ await client.link.bulkTriggerHistoricalPull({ ```typescript await client.link.bulkExport({ - teamId: "infer_from_context", provider: "oura" }); @@ -231,7 +227,6 @@ await client.link.bulkExport({ ```typescript await client.link.bulkPause({ - teamId: "infer_from_context", userIds: ["user_ids"], provider: "oura" }); @@ -340,7 +335,7 @@ await client.link.token({ -
client.link.isTokenValid({ ...params }) -> Record +
client.link.isTokenValid({ ...params }) -> Record<string, unknown>
@@ -457,7 +452,7 @@ await client.link.codeCreate({
-
client.link.startConnect({ ...params }) -> Record +
client.link.startConnect({ ...params }) -> Record<string, unknown>
@@ -524,7 +519,7 @@ await client.link.startConnect({
-
client.link.tokenState({ ...params }) -> Record +
client.link.tokenState({ ...params }) -> Record<string, unknown>
@@ -552,9 +547,7 @@ Check link token state - can be hit continuously used as heartbeat
```typescript -await client.link.tokenState({ - vitalLinkToken: "x-vital-link-token" -}); +await client.link.tokenState(); ```
@@ -618,7 +611,6 @@ Deprecated. Use `POST /v2/link/provider/email/{provider}` instead. ```typescript await client.link.emailAuth({ - vitalLinkToken: "x-vital-link-token", email: "email", provider: "oura", authType: "password" @@ -686,7 +678,6 @@ Deprecated. Use `POST /v2/link/provider/password/{provider}` instead. ```typescript await client.link.passwordAuth({ - vitalLinkToken: "x-vital-link-token", username: "username", password: "password", provider: "oura", @@ -754,9 +745,7 @@ This endpoint generates an OAuth link for oauth provider
```typescript -await client.link.generateOauthLink("oura", { - vitalLinkToken: "x-vital-link-token" -}); +await client.link.generateOauthLink("oura"); ```
@@ -828,7 +817,6 @@ This connects auth providers that are password based. ```typescript await client.link.connectPasswordProvider("whoop", { - vitalLinkToken: "x-vital-link-token", username: "username", password: "password" }); @@ -903,7 +891,6 @@ This connects auth providers that are password based. ```typescript await client.link.completePasswordProviderMfa("whoop", { - vitalLinkToken: "x-vital-link-token", mfaCode: "mfa_code" }); @@ -977,7 +964,6 @@ This connects auth providers that are email based. ```typescript await client.link.connectEmailAuthProvider("freestyle_libre", { - vitalLinkToken: "x-vital-link-token", email: "email" }); @@ -1050,9 +1036,7 @@ GET List of all available providers given the generated link token.
```typescript -await client.link.getAllProviders({ - vitalLinkToken: "x-vital-link-token" -}); +await client.link.getAllProviders(); ```
@@ -1088,7 +1072,7 @@ await client.link.getAllProviders({
-
client.link.connectManualProvider(provider, { ...params }) -> Record +
client.link.connectManualProvider(provider, { ...params }) -> Record<string, boolean>
@@ -7488,7 +7472,7 @@ await client.user.getTeamMetrics();
-
client.user.getConnectedProviders(user_id) -> Record +
client.user.getConnectedProviders(user_id) -> Record<string, Vital.ClientFacingProviderWithStatus[]>
@@ -8421,7 +8405,7 @@ await client.user.createPortalUrl("user_id", {
## Team -
client.team.getLinkConfig({ ...params }) -> Record +
client.team.getLinkConfig({ ...params }) -> Record<string, unknown>
@@ -8448,9 +8432,7 @@ Post teams.
```typescript -await client.team.getLinkConfig({ - vitalLinkToken: "x-vital-link-token" -}); +await client.team.getLinkConfig(); ```
@@ -8614,7 +8596,7 @@ await client.team.getUserById({
-
client.team.getSvixUrl() -> Record +
client.team.getSvixUrl() -> Record<string, unknown>
@@ -8655,7 +8637,7 @@ await client.team.getSvixUrl();
-
client.team.getSourcePriorities({ ...params }) -> Record[] +
client.team.getSourcePriorities({ ...params }) -> Record<string, unknown>[]
@@ -8720,7 +8702,7 @@ await client.team.getSourcePriorities({
-
client.team.updateSourcePriorities() -> Record[] +
client.team.updateSourcePriorities() -> Record<string, unknown>[]
@@ -9034,6 +9016,8 @@ await client.labTests.get({ labSlug: "lab_slug", collectionMethod: "testkit", status: "active", + markerIds: [1], + providerIds: ["provider_ids"], name: "name", orderKey: "price", orderDirection: "asc" @@ -9268,7 +9252,7 @@ await client.labTests.updateLabTest("lab_test_id");
-GET all the markers for the given lab. +List active and orderable markers for a given Lab. Note that reflex markers are not included.
@@ -9284,6 +9268,8 @@ GET all the markers for the given lab. ```typescript await client.labTests.getMarkers({ + labId: [1], + labSlug: "lab_slug", name: "name", aLaCarteEnabled: true, labAccountId: "lab_account_id", @@ -9382,6 +9368,20 @@ await client.labTests.getMarkersForOrderSet({
+#### 📝 Description + +
+
+ +
+
+ +List all markers for a given Lab Test, as well as any associated reflex markers. +
+
+
+
+ #### 🔌 Usage
@@ -9609,6 +9609,8 @@ await client.labTests.getPaginated({ labSlug: "lab_slug", collectionMethod: "testkit", status: "active", + markerIds: [1], + providerIds: ["provider_ids"], name: "name", orderKey: "price", orderDirection: "asc" @@ -9730,13 +9732,18 @@ await client.labTests.getOrders({ endDate: new Date("2024-01-15T09:30:00.000Z"), updatedStartDate: new Date("2024-01-15T09:30:00.000Z"), updatedEndDate: new Date("2024-01-15T09:30:00.000Z"), + status: ["ordered"], orderKey: "created_at", orderDirection: "asc", + orderType: ["testkit"], isCritical: true, interpretation: "normal", + orderActivationTypes: ["current"], userId: "user_id", patientName: "patient_name", shippingRecipientName: "shipping_recipient_name", + orderIds: ["order_ids"], + orderTransactionId: "order_transaction_id", page: 1, size: 1 }); @@ -10298,6 +10305,7 @@ await client.labTests.getAreaInfo({ zipCode: "zip_code", radius: "10", lab: "quest", + labs: ["quest"], labAccountId: "lab_account_id" }); @@ -10352,6 +10360,7 @@ await client.labTests.getPscInfo({ zipCode: "zip_code", labId: 1, radius: "10", + capabilities: ["stat"], labAccountId: "lab_account_id" }); @@ -10403,7 +10412,8 @@ await client.labTests.getPscInfo({ ```typescript await client.labTests.getOrderPscInfo("order_id", { - radius: "10" + radius: "10", + capabilities: ["stat"] }); ``` @@ -10727,8 +10737,10 @@ await client.labTests.getLabelsPdf("order_id", { await client.labTests.getPscAppointmentAvailability({ lab: "quest", startDate: "start_date", + siteCodes: ["site_codes"], zipCode: "zip_code", - radius: "10" + radius: "10", + allowStale: true }); ``` @@ -10779,7 +10791,9 @@ await client.labTests.getPscAppointmentAvailability({ ```typescript await client.labTests.bookPscAppointment("order_id", { - bookingKey: "booking_key" + body: { + bookingKey: "booking_key" + } }); ``` @@ -10804,7 +10818,7 @@ await client.labTests.bookPscAppointment("order_id", {
-**request:** `Vital.AppointmentBookingRequest` +**request:** `Vital.LabTestsBookPscAppointmentRequest`
@@ -11312,8 +11326,6 @@ await client.labTests.getOrder("order_id"); ```typescript await client.labTests.createOrder({ - idempotencyKey: "X-Idempotency-Key", - idempotencyError: "no-cache", userId: "user_id", patientDetails: { firstName: "first_name", @@ -11685,6 +11697,310 @@ await client.labTests.validateIcdCodes({
+
+
+
+ +## Compendium +
client.compendium.search({ ...params }) -> Vital.SearchCompendiumResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compendium.search({ + mode: "canonical" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vital.SearchCompendiumBody` + +
+
+ +
+
+ +**requestOptions:** `CompendiumClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.compendium.convert({ ...params }) -> Vital.ConvertCompendiumResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compendium.convert({ + targetLab: "labcorp" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vital.ConvertCompendiumBody` + +
+
+ +
+
+ +**requestOptions:** `CompendiumClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +## LabAccount +
client.labAccount.getTeamLabAccounts({ ...params }) -> Vital.GetTeamLabAccountsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.labAccount.getTeamLabAccounts({ + labAccountId: "lab_account_id", + status: "active" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vital.LabAccountGetTeamLabAccountsRequest` + +
+
+ +
+
+ +**requestOptions:** `LabAccountClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +## OrderTransaction +
client.orderTransaction.getTransaction(transaction_id) -> Vital.GetOrderTransactionResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.orderTransaction.getTransaction("transaction_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transaction_id:** `string` + +
+
+ +
+
+ +**requestOptions:** `OrderTransactionClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.orderTransaction.getTransactionResult(transaction_id) -> Vital.LabResultsRaw +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.orderTransaction.getTransactionResult("transaction_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transaction_id:** `string` + +
+
+ +
+
+ +**requestOptions:** `OrderTransactionClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.orderTransaction.getTransactionResultPdf(transaction_id) -> core.BinaryResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.orderTransaction.getTransactionResultPdf("transaction_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**transaction_id:** `string` + +
+
+ +
+
+ +**requestOptions:** `OrderTransactionClient.RequestOptions` + +
+
+
+
+ +
@@ -12121,7 +12437,7 @@ await client.payor.createPayor({
-Creates a parse job, uploads the file to provider, persists the job row, +Creates a parse job, uploads the file(s) to provider, persists the job row, and starts the ParseLabReport. Returns a generated job_id.
@@ -12137,7 +12453,7 @@ and starts the ParseLabReport. Returns a generated job_id.
```typescript -await client.labReport.parserCreateJob(createReadStream("path/to/file"), { +await client.labReport.parserCreateJob([createReadStream("path/to/file")], { userId: "user_id" }); @@ -12155,7 +12471,7 @@ await client.labReport.parserCreateJob(createReadStream("path/to/file"), {
-**file:** `core.file.Uploadable` +**file:** `core.file.Uploadable[]`
@@ -12447,3 +12763,4 @@ await client.aggregate.getTaskHistoryForContinuousQuery("user_id", "query_id_or_
+ diff --git a/src/BaseClient.ts b/src/BaseClient.ts index b2a57501c..bedb15a34 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -51,8 +51,8 @@ export function normalizeClientOptions> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -156,16 +151,11 @@ export class ActivityClient { requestOptions?: ActivityClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/aggregate/client/Client.ts b/src/api/resources/aggregate/client/Client.ts index 34c28120e..c632aba63 100644 --- a/src/api/resources/aggregate/client/Client.ts +++ b/src/api/resources/aggregate/client/Client.ts @@ -250,15 +250,10 @@ export class AggregateClient { requestOptions?: AggregateClient.RequestOptions, ): Promise> { const { nextCursor, limit } = request; - const _queryParams: Record = {}; - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (limit != null) { - _queryParams.limit = limit; - } - + const _queryParams: Record = { + next_cursor: nextCursor, + limit, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/body/client/Client.ts b/src/api/resources/body/client/Client.ts index 676b17d15..d3c408544 100644 --- a/src/api/resources/body/client/Client.ts +++ b/src/api/resources/body/client/Client.ts @@ -53,16 +53,11 @@ export class BodyClient { requestOptions?: BodyClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -151,16 +146,11 @@ export class BodyClient { requestOptions?: BodyClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/compendium/client/Client.ts b/src/api/resources/compendium/client/Client.ts new file mode 100644 index 000000000..51c45d9fa --- /dev/null +++ b/src/api/resources/compendium/client/Client.ts @@ -0,0 +1,191 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js"; +import { mergeHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js"; +import * as errors from "../../../../errors/index.js"; +import * as serializers from "../../../../serialization/index.js"; +import * as Vital from "../../../index.js"; + +export declare namespace CompendiumClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class CompendiumClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: CompendiumClient.Options = {}) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * @param {Vital.SearchCompendiumBody} request + * @param {CompendiumClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Vital.UnprocessableEntityError} + * + * @example + * await client.compendium.search({ + * mode: "canonical" + * }) + */ + public search( + request: Vital.SearchCompendiumBody, + requestOptions?: CompendiumClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions)); + } + + private async __search( + request: Vital.SearchCompendiumBody, + requestOptions?: CompendiumClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VitalEnvironment.Production, + "v3/compendium/search", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.SearchCompendiumBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.SearchCompendiumResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Vital.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.VitalError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v3/compendium/search"); + } + + /** + * @param {Vital.ConvertCompendiumBody} request + * @param {CompendiumClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Vital.UnprocessableEntityError} + * + * @example + * await client.compendium.convert({ + * targetLab: "labcorp" + * }) + */ + public convert( + request: Vital.ConvertCompendiumBody, + requestOptions?: CompendiumClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__convert(request, requestOptions)); + } + + private async __convert( + request: Vital.ConvertCompendiumBody, + requestOptions?: CompendiumClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VitalEnvironment.Production, + "v3/compendium/convert", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.ConvertCompendiumBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.ConvertCompendiumResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Vital.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.VitalError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v3/compendium/convert"); + } +} diff --git a/src/api/resources/compendium/client/index.ts b/src/api/resources/compendium/client/index.ts new file mode 100644 index 000000000..195f9aa8a --- /dev/null +++ b/src/api/resources/compendium/client/index.ts @@ -0,0 +1 @@ +export * from "./requests/index.js"; diff --git a/src/api/resources/compendium/client/requests/ConvertCompendiumBody.ts b/src/api/resources/compendium/client/requests/ConvertCompendiumBody.ts new file mode 100644 index 000000000..c54d0c40f --- /dev/null +++ b/src/api/resources/compendium/client/requests/ConvertCompendiumBody.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../../../index.js"; + +/** + * @example + * { + * targetLab: "labcorp" + * } + */ +export interface ConvertCompendiumBody { + labTestId?: string; + providerIds?: string[]; + /** ℹ️ This enum is non-exhaustive. */ + targetLab: Vital.CompendiumSearchLabs; + limit?: number; +} diff --git a/src/api/resources/compendium/client/requests/SearchCompendiumBody.ts b/src/api/resources/compendium/client/requests/SearchCompendiumBody.ts new file mode 100644 index 000000000..0b5eadea8 --- /dev/null +++ b/src/api/resources/compendium/client/requests/SearchCompendiumBody.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../../../index.js"; + +/** + * @example + * { + * mode: "canonical" + * } + */ +export interface SearchCompendiumBody { + /** ℹ️ This enum is non-exhaustive. */ + mode: Vital.SearchMode; + query?: string; + cptCodes?: string[]; + loincSetHash?: string; + labs?: Vital.CompendiumSearchLabs[]; + includeRelated?: boolean; + limit?: number; +} diff --git a/src/api/resources/compendium/client/requests/index.ts b/src/api/resources/compendium/client/requests/index.ts new file mode 100644 index 000000000..0d2543a48 --- /dev/null +++ b/src/api/resources/compendium/client/requests/index.ts @@ -0,0 +1,2 @@ +export type { ConvertCompendiumBody } from "./ConvertCompendiumBody.js"; +export type { SearchCompendiumBody } from "./SearchCompendiumBody.js"; diff --git a/src/api/resources/compendium/index.ts b/src/api/resources/compendium/index.ts new file mode 100644 index 000000000..914b8c3c7 --- /dev/null +++ b/src/api/resources/compendium/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/api/resources/devices/client/Client.ts b/src/api/resources/devices/client/Client.ts index 6688fed3d..85e17d753 100644 --- a/src/api/resources/devices/client/Client.ts +++ b/src/api/resources/devices/client/Client.ts @@ -51,11 +51,9 @@ export class DevicesClient { requestOptions?: DevicesClient.RequestOptions, ): Promise> { const { provider } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - + const _queryParams: Record = { + provider, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/electrocardiogram/client/Client.ts b/src/api/resources/electrocardiogram/client/Client.ts index 24b578e9b..abcd37065 100644 --- a/src/api/resources/electrocardiogram/client/Client.ts +++ b/src/api/resources/electrocardiogram/client/Client.ts @@ -53,16 +53,11 @@ export class ElectrocardiogramClient { requestOptions?: ElectrocardiogramClient.RequestOptions, ): Promise> { const { startDate, endDate, provider } = request; - const _queryParams: Record = {}; - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - - if (provider != null) { - _queryParams.provider = provider; - } - + const _queryParams: Record = { + start_date: startDate, + end_date: endDate, + provider, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 9a264f368..fc09f1f1d 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -5,6 +5,8 @@ export * as aggregate from "./aggregate/index.js"; export * from "./aggregate/types/index.js"; export * from "./body/client/requests/index.js"; export * as body from "./body/index.js"; +export * from "./compendium/client/requests/index.js"; +export * as compendium from "./compendium/index.js"; export * from "./devices/client/requests/index.js"; export * as devices from "./devices/index.js"; export * from "./electrocardiogram/client/requests/index.js"; @@ -13,6 +15,8 @@ export * from "./insurance/client/requests/index.js"; export * as insurance from "./insurance/index.js"; export * from "./introspect/client/requests/index.js"; export * as introspect from "./introspect/index.js"; +export * from "./labAccount/client/requests/index.js"; +export * as labAccount from "./labAccount/index.js"; export * from "./labReport/client/requests/index.js"; export * as labReport from "./labReport/index.js"; export * from "./labTests/client/requests/index.js"; @@ -20,13 +24,13 @@ export * as labTests from "./labTests/index.js"; export * from "./labTests/types/index.js"; export * from "./link/client/requests/index.js"; export * as link from "./link/index.js"; -export * from "./link/types/index.js"; export * from "./meal/client/requests/index.js"; export * as meal from "./meal/index.js"; export * from "./menstrualCycle/client/requests/index.js"; export * as menstrualCycle from "./menstrualCycle/index.js"; export * from "./order/client/requests/index.js"; export * as order from "./order/index.js"; +export * as orderTransaction from "./orderTransaction/index.js"; export * from "./payor/client/requests/index.js"; export * as payor from "./payor/index.js"; export * from "./profile/client/requests/index.js"; diff --git a/src/api/resources/insurance/client/Client.ts b/src/api/resources/insurance/client/Client.ts index 7f12d8c14..783c1adaf 100644 --- a/src/api/resources/insurance/client/Client.ts +++ b/src/api/resources/insurance/client/Client.ts @@ -48,21 +48,14 @@ export class InsuranceClient { requestOptions?: InsuranceClient.RequestOptions, ): Promise> { const { insuranceName, provider, providerPayorId } = request; - const _queryParams: Record = {}; - if (insuranceName != null) { - _queryParams.insurance_name = insuranceName; - } - - if (provider != null) { - _queryParams.provider = serializers.PayorCodeExternalProvider.jsonOrThrow(provider, { - unrecognizedObjectKeys: "strip", - }); - } - - if (providerPayorId != null) { - _queryParams.provider_payor_id = providerPayorId; - } - + const _queryParams: Record = { + insurance_name: insuranceName, + provider: + provider != null + ? serializers.PayorCodeExternalProvider.jsonOrThrow(provider, { unrecognizedObjectKeys: "strip" }) + : undefined, + provider_payor_id: providerPayorId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -225,8 +218,9 @@ export class InsuranceClient { requestOptions?: InsuranceClient.RequestOptions, ): Promise> { const { diagnosisQuery } = request; - const _queryParams: Record = {}; - _queryParams.diagnosis_query = diagnosisQuery; + const _queryParams: Record = { + diagnosis_query: diagnosisQuery, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/insurance/client/requests/PayorSearchRequest.ts b/src/api/resources/insurance/client/requests/PayorSearchRequest.ts index ba443e912..6ef97597d 100644 --- a/src/api/resources/insurance/client/requests/PayorSearchRequest.ts +++ b/src/api/resources/insurance/client/requests/PayorSearchRequest.ts @@ -8,6 +8,7 @@ import type * as Vital from "../../../../index.js"; */ export interface PayorSearchRequest { insuranceName?: string; + /** ℹ️ This enum is non-exhaustive. */ provider?: Vital.PayorCodeExternalProvider; providerId?: string; } diff --git a/src/api/resources/introspect/client/Client.ts b/src/api/resources/introspect/client/Client.ts index b4c136218..72abffffc 100644 --- a/src/api/resources/introspect/client/Client.ts +++ b/src/api/resources/introspect/client/Client.ts @@ -50,27 +50,16 @@ export class IntrospectClient { requestOptions?: IntrospectClient.RequestOptions, ): Promise> { const { userId, provider, userLimit, cursor, nextCursor } = request; - const _queryParams: Record = {}; - if (userId != null) { - _queryParams.user_id = userId; - } - - if (provider != null) { - _queryParams.provider = serializers.Providers.jsonOrThrow(provider, { unrecognizedObjectKeys: "strip" }); - } - - if (userLimit != null) { - _queryParams.user_limit = userLimit; - } - - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - + const _queryParams: Record = { + user_id: userId, + provider: + provider != null + ? serializers.Providers.jsonOrThrow(provider, { unrecognizedObjectKeys: "strip" }) + : undefined, + user_limit: userLimit, + cursor, + next_cursor: nextCursor, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -156,27 +145,16 @@ export class IntrospectClient { requestOptions?: IntrospectClient.RequestOptions, ): Promise> { const { userId, provider, userLimit, cursor, nextCursor } = request; - const _queryParams: Record = {}; - if (userId != null) { - _queryParams.user_id = userId; - } - - if (provider != null) { - _queryParams.provider = serializers.Providers.jsonOrThrow(provider, { unrecognizedObjectKeys: "strip" }); - } - - if (userLimit != null) { - _queryParams.user_limit = userLimit; - } - - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - + const _queryParams: Record = { + user_id: userId, + provider: + provider != null + ? serializers.Providers.jsonOrThrow(provider, { unrecognizedObjectKeys: "strip" }) + : undefined, + user_limit: userLimit, + cursor, + next_cursor: nextCursor, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/labAccount/client/Client.ts b/src/api/resources/labAccount/client/Client.ts new file mode 100644 index 000000000..6c1a47af8 --- /dev/null +++ b/src/api/resources/labAccount/client/Client.ts @@ -0,0 +1,114 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js"; +import { mergeHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js"; +import * as errors from "../../../../errors/index.js"; +import * as serializers from "../../../../serialization/index.js"; +import * as Vital from "../../../index.js"; + +export declare namespace LabAccountClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class LabAccountClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: LabAccountClient.Options = {}) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * @param {Vital.LabAccountGetTeamLabAccountsRequest} request + * @param {LabAccountClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Vital.UnprocessableEntityError} + * + * @example + * await client.labAccount.getTeamLabAccounts({ + * labAccountId: "lab_account_id", + * status: "active" + * }) + */ + public getTeamLabAccounts( + request: Vital.LabAccountGetTeamLabAccountsRequest = {}, + requestOptions?: LabAccountClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getTeamLabAccounts(request, requestOptions)); + } + + private async __getTeamLabAccounts( + request: Vital.LabAccountGetTeamLabAccountsRequest = {}, + requestOptions?: LabAccountClient.RequestOptions, + ): Promise> { + const { labAccountId, status } = request; + const _queryParams: Record = { + lab_account_id: labAccountId, + status: + status != null + ? serializers.LabAccountStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }) + : undefined, + }; + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VitalEnvironment.Production, + "v3/lab_test/lab_account", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetTeamLabAccountsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Vital.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.VitalError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v3/lab_test/lab_account"); + } +} diff --git a/src/api/resources/labAccount/client/index.ts b/src/api/resources/labAccount/client/index.ts new file mode 100644 index 000000000..195f9aa8a --- /dev/null +++ b/src/api/resources/labAccount/client/index.ts @@ -0,0 +1 @@ +export * from "./requests/index.js"; diff --git a/src/api/resources/labAccount/client/requests/LabAccountGetTeamLabAccountsRequest.ts b/src/api/resources/labAccount/client/requests/LabAccountGetTeamLabAccountsRequest.ts new file mode 100644 index 000000000..0aec2a2c6 --- /dev/null +++ b/src/api/resources/labAccount/client/requests/LabAccountGetTeamLabAccountsRequest.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../../../index.js"; + +/** + * @example + * { + * labAccountId: "lab_account_id", + * status: "active" + * } + */ +export interface LabAccountGetTeamLabAccountsRequest { + labAccountId?: string; + status?: Vital.LabAccountStatus; +} diff --git a/src/api/resources/labAccount/client/requests/index.ts b/src/api/resources/labAccount/client/requests/index.ts new file mode 100644 index 000000000..49ac642bd --- /dev/null +++ b/src/api/resources/labAccount/client/requests/index.ts @@ -0,0 +1 @@ +export type { LabAccountGetTeamLabAccountsRequest } from "./LabAccountGetTeamLabAccountsRequest.js"; diff --git a/src/api/resources/labAccount/index.ts b/src/api/resources/labAccount/index.ts new file mode 100644 index 000000000..914b8c3c7 --- /dev/null +++ b/src/api/resources/labAccount/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/api/resources/labReport/client/Client.ts b/src/api/resources/labReport/client/Client.ts index 7e1db7108..525af5579 100644 --- a/src/api/resources/labReport/client/Client.ts +++ b/src/api/resources/labReport/client/Client.ts @@ -24,10 +24,10 @@ export class LabReportClient { } /** - * Creates a parse job, uploads the file to provider, persists the job row, + * Creates a parse job, uploads the file(s) to provider, persists the job row, * and starts the ParseLabReport. Returns a generated job_id. * - * @param {core.file.Uploadable} file + * @param {core.file.Uploadable[]} file * @param {Vital.BodyCreateLabReportParserJob} request * @param {LabReportClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -35,12 +35,12 @@ export class LabReportClient { * * @example * import { createReadStream } from "fs"; - * await client.labReport.parserCreateJob(createReadStream("path/to/file"), { + * await client.labReport.parserCreateJob([createReadStream("path/to/file")], { * userId: "user_id" * }) */ public parserCreateJob( - file: core.file.Uploadable, + file: core.file.Uploadable[], request: Vital.BodyCreateLabReportParserJob, requestOptions?: LabReportClient.RequestOptions, ): core.HttpResponsePromise { @@ -48,18 +48,21 @@ export class LabReportClient { } private async __parserCreateJob( - file: core.file.Uploadable, + file: core.file.Uploadable[], request: Vital.BodyCreateLabReportParserJob, requestOptions?: LabReportClient.RequestOptions, ): Promise> { - const _request = await core.newFormData(); - await _request.appendFile("file", file); - _request.append("user_id", request.userId); + const _body = await core.newFormData(); + for (const _file of file) { + await _body.appendFile("file", _file); + } + + _body.append("user_id", request.userId); if (request.needsHumanReview != null) { - _request.append("needs_human_review", request.needsHumanReview.toString()); + _body.append("needs_human_review", request.needsHumanReview?.toString()); } - const _maybeEncodedRequest = await _request.getRequest(); + const _maybeEncodedRequest = await _body.getRequest(); const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/labTests/client/Client.ts b/src/api/resources/labTests/client/Client.ts index f07c1da67..afffaed1e 100644 --- a/src/api/resources/labTests/client/Client.ts +++ b/src/api/resources/labTests/client/Client.ts @@ -37,6 +37,8 @@ export class LabTestsClient { * labSlug: "lab_slug", * collectionMethod: "testkit", * status: "active", + * markerIds: [1], + * providerIds: ["provider_ids"], * name: "name", * orderKey: "price", * orderDirection: "asc" @@ -64,59 +66,38 @@ export class LabTestsClient { orderKey, orderDirection, } = request; - const _queryParams: Record = {}; - if (generationMethod != null) { - _queryParams.generation_method = serializers.LabTestGenerationMethodFilter.jsonOrThrow(generationMethod, { - unrecognizedObjectKeys: "strip", - }); - } - - if (labSlug != null) { - _queryParams.lab_slug = labSlug; - } - - if (collectionMethod != null) { - _queryParams.collection_method = serializers.LabTestCollectionMethod.jsonOrThrow(collectionMethod, { - unrecognizedObjectKeys: "strip", - }); - } - - if (status != null) { - _queryParams.status = serializers.LabTestStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - - if (markerIds != null) { - if (Array.isArray(markerIds)) { - _queryParams.marker_ids = markerIds.map((item) => item.toString()); - } else { - _queryParams.marker_ids = markerIds; - } - } - - if (providerIds != null) { - if (Array.isArray(providerIds)) { - _queryParams.provider_ids = providerIds.map((item) => item); - } else { - _queryParams.provider_ids = providerIds; - } - } - - if (name != null) { - _queryParams.name = name; - } - - if (orderKey != null) { - _queryParams.order_key = serializers.LabTestsGetRequestOrderKey.jsonOrThrow(orderKey, { - unrecognizedObjectKeys: "strip", - }); - } - - if (orderDirection != null) { - _queryParams.order_direction = serializers.LabTestsGetRequestOrderDirection.jsonOrThrow(orderDirection, { - unrecognizedObjectKeys: "strip", - }); - } - + const _queryParams: Record = { + generation_method: + generationMethod != null + ? serializers.LabTestGenerationMethodFilter.jsonOrThrow(generationMethod, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + lab_slug: labSlug, + collection_method: + collectionMethod != null + ? serializers.LabTestCollectionMethod.jsonOrThrow(collectionMethod, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + status: + status != null + ? serializers.LabTestStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }) + : undefined, + marker_ids: markerIds, + provider_ids: providerIds, + name, + order_key: + orderKey != null + ? serializers.LabTestsGetRequestOrderKey.jsonOrThrow(orderKey, { unrecognizedObjectKeys: "strip" }) + : undefined, + order_direction: + orderDirection != null + ? serializers.LabTestsGetRequestOrderDirection.jsonOrThrow(orderDirection, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -288,11 +269,9 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { labAccountId } = request; - const _queryParams: Record = {}; - if (labAccountId != null) { - _queryParams.lab_account_id = labAccountId; - } - + const _queryParams: Record = { + lab_account_id: labAccountId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -436,7 +415,7 @@ export class LabTestsClient { } /** - * GET all the markers for the given lab. + * List active and orderable markers for a given Lab. Note that reflex markers are not included. * * @param {Vital.LabTestsGetMarkersRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. @@ -445,6 +424,8 @@ export class LabTestsClient { * * @example * await client.labTests.getMarkers({ + * labId: [1], + * labSlug: "lab_slug", * name: "name", * aLaCarteEnabled: true, * labAccountId: "lab_account_id", @@ -463,36 +444,16 @@ export class LabTestsClient { request: Vital.LabTestsGetMarkersRequest = {}, requestOptions?: LabTestsClient.RequestOptions, ): Promise> { - const { labId, name, aLaCarteEnabled, labAccountId, page, size } = request; - const _queryParams: Record = {}; - if (labId != null) { - if (Array.isArray(labId)) { - _queryParams.lab_id = labId.map((item) => item.toString()); - } else { - _queryParams.lab_id = labId; - } - } - - if (name != null) { - _queryParams.name = name; - } - - if (aLaCarteEnabled != null) { - _queryParams.a_la_carte_enabled = aLaCarteEnabled; - } - - if (labAccountId != null) { - _queryParams.lab_account_id = labAccountId; - } - - if (page != null) { - _queryParams.page = page; - } - - if (size != null) { - _queryParams.size = size; - } - + const { labId, labSlug, name, aLaCarteEnabled, labAccountId, page, size } = request; + const _queryParams: Record = { + lab_id: labId, + lab_slug: labSlug, + name, + a_la_carte_enabled: aLaCarteEnabled, + lab_account_id: labAccountId, + page, + size, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -576,15 +537,10 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { page, size, body: _body } = request; - const _queryParams: Record = {}; - if (page != null) { - _queryParams.page = page; - } - - if (size != null) { - _queryParams.size = size; - } - + const _queryParams: Record = { + page, + size, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -652,6 +608,8 @@ export class LabTestsClient { } /** + * List all markers for a given Lab Test, as well as any associated reflex markers. + * * @param {string} lab_test_id * @param {Vital.LabTestsGetMarkersForLabTestRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. @@ -679,19 +637,11 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { labAccountId, page, size } = request; - const _queryParams: Record = {}; - if (labAccountId != null) { - _queryParams.lab_account_id = labAccountId; - } - - if (page != null) { - _queryParams.page = page; - } - - if (size != null) { - _queryParams.size = size; - } - + const _queryParams: Record = { + lab_account_id: labAccountId, + page, + size, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -788,11 +738,9 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { labAccountId } = request; - const _queryParams: Record = {}; - if (labAccountId != null) { - _queryParams.lab_account_id = labAccountId; - } - + const _queryParams: Record = { + lab_account_id: labAccountId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -932,6 +880,8 @@ export class LabTestsClient { * labSlug: "lab_slug", * collectionMethod: "testkit", * status: "active", + * markerIds: [1], + * providerIds: ["provider_ids"], * name: "name", * orderKey: "price", * orderDirection: "asc" @@ -961,68 +911,42 @@ export class LabTestsClient { orderKey, orderDirection, } = request; - const _queryParams: Record = {}; - if (labTestLimit != null) { - _queryParams.lab_test_limit = labTestLimit; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (generationMethod != null) { - _queryParams.generation_method = serializers.LabTestGenerationMethodFilter.jsonOrThrow(generationMethod, { - unrecognizedObjectKeys: "strip", - }); - } - - if (labSlug != null) { - _queryParams.lab_slug = labSlug; - } - - if (collectionMethod != null) { - _queryParams.collection_method = serializers.LabTestCollectionMethod.jsonOrThrow(collectionMethod, { - unrecognizedObjectKeys: "strip", - }); - } - - if (status != null) { - _queryParams.status = serializers.LabTestStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - - if (markerIds != null) { - if (Array.isArray(markerIds)) { - _queryParams.marker_ids = markerIds.map((item) => item.toString()); - } else { - _queryParams.marker_ids = markerIds; - } - } - - if (providerIds != null) { - if (Array.isArray(providerIds)) { - _queryParams.provider_ids = providerIds.map((item) => item); - } else { - _queryParams.provider_ids = providerIds; - } - } - - if (name != null) { - _queryParams.name = name; - } - - if (orderKey != null) { - _queryParams.order_key = serializers.LabTestsGetPaginatedRequestOrderKey.jsonOrThrow(orderKey, { - unrecognizedObjectKeys: "strip", - }); - } - - if (orderDirection != null) { - _queryParams.order_direction = serializers.LabTestsGetPaginatedRequestOrderDirection.jsonOrThrow( - orderDirection, - { unrecognizedObjectKeys: "strip" }, - ); - } - + const _queryParams: Record = { + lab_test_limit: labTestLimit, + next_cursor: nextCursor, + generation_method: + generationMethod != null + ? serializers.LabTestGenerationMethodFilter.jsonOrThrow(generationMethod, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + lab_slug: labSlug, + collection_method: + collectionMethod != null + ? serializers.LabTestCollectionMethod.jsonOrThrow(collectionMethod, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + status: + status != null + ? serializers.LabTestStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }) + : undefined, + marker_ids: markerIds, + provider_ids: providerIds, + name, + order_key: + orderKey != null + ? serializers.LabTestsGetPaginatedRequestOrderKey.jsonOrThrow(orderKey, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + order_direction: + orderDirection != null + ? serializers.LabTestsGetPaginatedRequestOrderDirection.jsonOrThrow(orderDirection, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1168,13 +1092,18 @@ export class LabTestsClient { * endDate: new Date("2024-01-15T09:30:00.000Z"), * updatedStartDate: new Date("2024-01-15T09:30:00.000Z"), * updatedEndDate: new Date("2024-01-15T09:30:00.000Z"), + * status: ["ordered"], * orderKey: "created_at", * orderDirection: "asc", + * orderType: ["testkit"], * isCritical: true, * interpretation: "normal", + * orderActivationTypes: ["current"], * userId: "user_id", * patientName: "patient_name", * shippingRecipientName: "shipping_recipient_name", + * orderIds: ["order_ids"], + * orderTransactionId: "order_transaction_id", * page: 1, * size: 1 * }) @@ -1207,118 +1136,64 @@ export class LabTestsClient { patientName, shippingRecipientName, orderIds, + orderTransactionId, page, size, } = request; - const _queryParams: Record = {}; - if (searchInput != null) { - _queryParams.search_input = searchInput; - } - - if (startDate != null) { - _queryParams.start_date = startDate.toISOString(); - } - - if (endDate != null) { - _queryParams.end_date = endDate.toISOString(); - } - - if (updatedStartDate != null) { - _queryParams.updated_start_date = updatedStartDate.toISOString(); - } - - if (updatedEndDate != null) { - _queryParams.updated_end_date = updatedEndDate.toISOString(); - } - - if (status != null) { - if (Array.isArray(status)) { - _queryParams.status = status.map((item) => - serializers.OrderLowLevelStatus.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), - ); - } else { - _queryParams.status = serializers.OrderLowLevelStatus.jsonOrThrow(status, { - unrecognizedObjectKeys: "strip", - }); - } - } - - if (orderKey != null) { - _queryParams.order_key = serializers.LabTestsGetOrdersRequestOrderKey.jsonOrThrow(orderKey, { - unrecognizedObjectKeys: "strip", - }); - } - - if (orderDirection != null) { - _queryParams.order_direction = serializers.LabTestsGetOrdersRequestOrderDirection.jsonOrThrow( - orderDirection, - { unrecognizedObjectKeys: "strip" }, - ); - } - - if (orderType != null) { - if (Array.isArray(orderType)) { - _queryParams.order_type = orderType.map((item) => - serializers.LabTestCollectionMethod.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), - ); - } else { - _queryParams.order_type = serializers.LabTestCollectionMethod.jsonOrThrow(orderType, { - unrecognizedObjectKeys: "strip", - }); - } - } - - if (isCritical != null) { - _queryParams.is_critical = isCritical; - } - - if (interpretation != null) { - _queryParams.interpretation = serializers.Interpretation.jsonOrThrow(interpretation, { - unrecognizedObjectKeys: "strip", - }); - } - - if (orderActivationTypes != null) { - if (Array.isArray(orderActivationTypes)) { - _queryParams.order_activation_types = orderActivationTypes.map((item) => - serializers.OrderActivationType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), - ); - } else { - _queryParams.order_activation_types = serializers.OrderActivationType.jsonOrThrow( - orderActivationTypes, - { unrecognizedObjectKeys: "strip" }, - ); - } - } - - if (userId != null) { - _queryParams.user_id = userId; - } - - if (patientName != null) { - _queryParams.patient_name = patientName; - } - - if (shippingRecipientName != null) { - _queryParams.shipping_recipient_name = shippingRecipientName; - } - - if (orderIds != null) { - if (Array.isArray(orderIds)) { - _queryParams.order_ids = orderIds.map((item) => item); - } else { - _queryParams.order_ids = orderIds; - } - } - - if (page != null) { - _queryParams.page = page; - } - - if (size != null) { - _queryParams.size = size; - } - + const _queryParams: Record = { + search_input: searchInput, + start_date: startDate != null ? startDate?.toISOString() : undefined, + end_date: endDate != null ? endDate?.toISOString() : undefined, + updated_start_date: updatedStartDate != null ? updatedStartDate?.toISOString() : undefined, + updated_end_date: updatedEndDate != null ? updatedEndDate?.toISOString() : undefined, + status: Array.isArray(status) + ? status.map((item) => + serializers.OrderLowLevelStatus.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), + ) + : status != null + ? serializers.OrderLowLevelStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }) + : undefined, + order_key: + orderKey != null + ? serializers.LabTestsGetOrdersRequestOrderKey.jsonOrThrow(orderKey, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + order_direction: + orderDirection != null + ? serializers.LabTestsGetOrdersRequestOrderDirection.jsonOrThrow(orderDirection, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + order_type: Array.isArray(orderType) + ? orderType.map((item) => + serializers.LabTestCollectionMethod.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), + ) + : orderType != null + ? serializers.LabTestCollectionMethod.jsonOrThrow(orderType, { unrecognizedObjectKeys: "strip" }) + : undefined, + is_critical: isCritical, + interpretation: + interpretation != null + ? serializers.Interpretation.jsonOrThrow(interpretation, { unrecognizedObjectKeys: "strip" }) + : undefined, + order_activation_types: Array.isArray(orderActivationTypes) + ? orderActivationTypes.map((item) => + serializers.OrderActivationType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), + ) + : orderActivationTypes != null + ? serializers.OrderActivationType.jsonOrThrow(orderActivationTypes, { + unrecognizedObjectKeys: "strip", + }) + : undefined, + user_id: userId, + patient_name: patientName, + shipping_recipient_name: shippingRecipientName, + order_ids: orderIds, + order_transaction_id: orderTransactionId, + page, + size, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1411,11 +1286,9 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { startDate, body: _body } = request; - const _queryParams: Record = {}; - if (startDate != null) { - _queryParams.start_date = startDate; - } - + const _queryParams: Record = { + start_date: startDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2043,6 +1916,7 @@ export class LabTestsClient { * zipCode: "zip_code", * radius: "10", * lab: "quest", + * labs: ["quest"], * labAccountId: "lab_account_id" * }) */ @@ -2058,30 +1932,25 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { zipCode, radius, lab, labs, labAccountId } = request; - const _queryParams: Record = {}; - _queryParams.zip_code = zipCode; - if (radius != null) { - _queryParams.radius = serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }); - } - - if (lab != null) { - _queryParams.lab = serializers.ClientFacingLabs.jsonOrThrow(lab, { unrecognizedObjectKeys: "strip" }); - } - - if (labs != null) { - if (Array.isArray(labs)) { - _queryParams.labs = labs.map((item) => - serializers.ClientFacingLabs.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), - ); - } else { - _queryParams.labs = serializers.ClientFacingLabs.jsonOrThrow(labs, { unrecognizedObjectKeys: "strip" }); - } - } - - if (labAccountId != null) { - _queryParams.lab_account_id = labAccountId; - } - + const _queryParams: Record = { + zip_code: zipCode, + radius: + radius != null + ? serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }) + : undefined, + lab: + lab != null + ? serializers.ClientFacingLabs.jsonOrThrow(lab, { unrecognizedObjectKeys: "strip" }) + : undefined, + labs: Array.isArray(labs) + ? labs.map((item) => + serializers.ClientFacingLabs.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), + ) + : labs != null + ? serializers.ClientFacingLabs.jsonOrThrow(labs, { unrecognizedObjectKeys: "strip" }) + : undefined, + lab_account_id: labAccountId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2151,6 +2020,7 @@ export class LabTestsClient { * zipCode: "zip_code", * labId: 1, * radius: "10", + * capabilities: ["stat"], * labAccountId: "lab_account_id" * }) */ @@ -2166,29 +2036,22 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { zipCode, labId, radius, capabilities, labAccountId } = request; - const _queryParams: Record = {}; - _queryParams.zip_code = zipCode; - _queryParams.lab_id = labId; - if (radius != null) { - _queryParams.radius = serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }); - } - - if (capabilities != null) { - if (Array.isArray(capabilities)) { - _queryParams.capabilities = capabilities.map((item) => - serializers.LabLocationCapability.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), - ); - } else { - _queryParams.capabilities = serializers.LabLocationCapability.jsonOrThrow(capabilities, { - unrecognizedObjectKeys: "strip", - }); - } - } - - if (labAccountId != null) { - _queryParams.lab_account_id = labAccountId; - } - + const _queryParams: Record = { + zip_code: zipCode, + lab_id: labId, + radius: + radius != null + ? serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }) + : undefined, + capabilities: Array.isArray(capabilities) + ? capabilities.map((item) => + serializers.LabLocationCapability.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), + ) + : capabilities != null + ? serializers.LabLocationCapability.jsonOrThrow(capabilities, { unrecognizedObjectKeys: "strip" }) + : undefined, + lab_account_id: labAccountId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2256,7 +2119,8 @@ export class LabTestsClient { * * @example * await client.labTests.getOrderPscInfo("order_id", { - * radius: "10" + * radius: "10", + * capabilities: ["stat"] * }) */ public getOrderPscInfo( @@ -2273,23 +2137,19 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { radius, capabilities } = request; - const _queryParams: Record = {}; - if (radius != null) { - _queryParams.radius = serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }); - } - - if (capabilities != null) { - if (Array.isArray(capabilities)) { - _queryParams.capabilities = capabilities.map((item) => - serializers.LabLocationCapability.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), - ); - } else { - _queryParams.capabilities = serializers.LabLocationCapability.jsonOrThrow(capabilities, { - unrecognizedObjectKeys: "strip", - }); - } - } - + const _queryParams: Record = { + radius: + radius != null + ? serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }) + : undefined, + capabilities: Array.isArray(capabilities) + ? capabilities.map((item) => + serializers.LabLocationCapability.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }), + ) + : capabilities != null + ? serializers.LabLocationCapability.jsonOrThrow(capabilities, { unrecognizedObjectKeys: "strip" }) + : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2603,12 +2463,10 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { numberOfLabels, collectionDate } = request; - const _queryParams: Record = {}; - if (numberOfLabels != null) { - _queryParams.number_of_labels = numberOfLabels; - } - - _queryParams.collection_date = collectionDate.toISOString(); + const _queryParams: Record = { + number_of_labels: numberOfLabels, + collection_date: collectionDate.toISOString(), + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2676,8 +2534,10 @@ export class LabTestsClient { * await client.labTests.getPscAppointmentAvailability({ * lab: "quest", * startDate: "start_date", + * siteCodes: ["site_codes"], * zipCode: "zip_code", - * radius: "10" + * radius: "10", + * allowStale: true * }) */ public getPscAppointmentAvailability( @@ -2691,29 +2551,18 @@ export class LabTestsClient { request: Vital.LabTestsGetPscAppointmentAvailabilityRequest, requestOptions?: LabTestsClient.RequestOptions, ): Promise> { - const { lab, startDate, siteCodes, zipCode, radius } = request; - const _queryParams: Record = {}; - _queryParams.lab = serializers.AppointmentPscLabs.jsonOrThrow(lab, { unrecognizedObjectKeys: "strip" }); - if (startDate != null) { - _queryParams.start_date = startDate; - } - - if (siteCodes != null) { - if (Array.isArray(siteCodes)) { - _queryParams.site_codes = siteCodes.map((item) => item); - } else { - _queryParams.site_codes = siteCodes; - } - } - - if (zipCode != null) { - _queryParams.zip_code = zipCode; - } - - if (radius != null) { - _queryParams.radius = serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }); - } - + const { lab, startDate, siteCodes, zipCode, radius, allowStale } = request; + const _queryParams: Record = { + lab: serializers.AppointmentPscLabs.jsonOrThrow(lab, { unrecognizedObjectKeys: "strip" }), + start_date: startDate, + site_codes: siteCodes, + zip_code: zipCode, + radius: + radius != null + ? serializers.AllowedRadius.jsonOrThrow(radius, { unrecognizedObjectKeys: "strip" }) + : undefined, + allow_stale: allowStale, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2789,19 +2638,21 @@ export class LabTestsClient { /** * @param {string} order_id - Your Order ID. - * @param {Vital.AppointmentBookingRequest} request + * @param {Vital.LabTestsBookPscAppointmentRequest} request * @param {LabTestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vital.UnprocessableEntityError} * * @example * await client.labTests.bookPscAppointment("order_id", { - * bookingKey: "booking_key" + * body: { + * bookingKey: "booking_key" + * } * }) */ public bookPscAppointment( order_id: string, - request: Vital.AppointmentBookingRequest, + request: Vital.LabTestsBookPscAppointmentRequest, requestOptions?: LabTestsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__bookPscAppointment(order_id, request, requestOptions)); @@ -2809,13 +2660,15 @@ export class LabTestsClient { private async __bookPscAppointment( order_id: string, - request: Vital.AppointmentBookingRequest, + request: Vital.LabTestsBookPscAppointmentRequest, requestOptions?: LabTestsClient.RequestOptions, ): Promise> { + const { idempotencyKey, idempotencyError, body: _body } = request; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, + mergeOnlyDefinedHeaders({ "x-idempotency-key": idempotencyKey, "x-idempotency-error": idempotencyError }), requestOptions?.headers, ); const _response = await core.fetcher({ @@ -2830,7 +2683,7 @@ export class LabTestsClient { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + body: serializers.AppointmentBookingRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -3508,8 +3361,6 @@ export class LabTestsClient { * * @example * await client.labTests.createOrder({ - * idempotencyKey: "X-Idempotency-Key", - * idempotencyError: "no-cache", * userId: "user_id", * patientDetails: { * firstName: "first_name", @@ -3815,17 +3666,13 @@ export class LabTestsClient { requestOptions?: LabTestsClient.RequestOptions, ): Promise> { const { finalStatus, delay, body: _body } = request; - const _queryParams: Record = {}; - if (finalStatus != null) { - _queryParams.final_status = serializers.OrderStatus.jsonOrThrow(finalStatus, { - unrecognizedObjectKeys: "strip", - }); - } - - if (delay != null) { - _queryParams.delay = delay; - } - + const _queryParams: Record = { + final_status: + finalStatus != null + ? serializers.OrderStatus.jsonOrThrow(finalStatus, { unrecognizedObjectKeys: "strip" }) + : undefined, + delay, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3844,12 +3691,9 @@ export class LabTestsClient { contentType: "application/json", queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", - body: - _body != null - ? serializers.labTests.simulateOrderProcess.Request.jsonOrThrow(_body, { - unrecognizedObjectKeys: "strip", - }) - : undefined, + body: serializers.labTests.simulateOrderProcess.Request.jsonOrThrow(_body, { + unrecognizedObjectKeys: "strip", + }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, diff --git a/src/api/resources/labTests/client/requests/CreateLabTestRequest.ts b/src/api/resources/labTests/client/requests/CreateLabTestRequest.ts index c3620f0bd..ef33731f8 100644 --- a/src/api/resources/labTests/client/requests/CreateLabTestRequest.ts +++ b/src/api/resources/labTests/client/requests/CreateLabTestRequest.ts @@ -14,7 +14,11 @@ export interface CreateLabTestRequest { markerIds?: number[]; providerIds?: string[]; name: string; + /** ℹ️ This enum is non-exhaustive. */ method: Vital.LabTestCollectionMethod; description: string; fasting?: boolean; + labAccountId?: string; + /** ℹ️ This enum is non-exhaustive. */ + labSlug?: Vital.Labs; } diff --git a/src/api/resources/labTests/client/requests/CreateOrderRequestCompatible.ts b/src/api/resources/labTests/client/requests/CreateOrderRequestCompatible.ts index 56fb7ffcf..debf59ce4 100644 --- a/src/api/resources/labTests/client/requests/CreateOrderRequestCompatible.ts +++ b/src/api/resources/labTests/client/requests/CreateOrderRequestCompatible.ts @@ -5,8 +5,6 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * idempotencyKey: "X-Idempotency-Key", - * idempotencyError: "no-cache", * userId: "user_id", * patientDetails: { * firstName: "first_name", @@ -31,11 +29,13 @@ export interface CreateOrderRequestCompatible { userId: string; labTestId?: string; orderSet?: Vital.OrderSetRequest; + /** ℹ️ This enum is non-exhaustive. */ collectionMethod?: Vital.LabTestCollectionMethod; physician?: Vital.PhysicianCreateRequest; healthInsurance?: Vital.HealthInsuranceCreateRequest; /** Defines whether order is priority or not. For some labs, this refers to a STAT order. */ priority?: boolean; + /** ℹ️ This enum is non-exhaustive. */ billingType?: Vital.Billing; icdCodes?: string[]; consents?: Vital.Consent[]; @@ -43,6 +43,7 @@ export interface CreateOrderRequestCompatible { activateBy?: string; aoeAnswers?: Vital.AoEAnswer[]; passthrough?: string; + clinicalNotes?: string; labAccountId?: string; creatorMemberId?: string; patientDetails: Vital.PatientDetailsWithValidation; diff --git a/src/api/resources/labTests/client/requests/ImportOrderBody.ts b/src/api/resources/labTests/client/requests/ImportOrderBody.ts index 66aeca812..8d362ac7d 100644 --- a/src/api/resources/labTests/client/requests/ImportOrderBody.ts +++ b/src/api/resources/labTests/client/requests/ImportOrderBody.ts @@ -30,8 +30,10 @@ import type * as Vital from "../../../../index.js"; */ export interface ImportOrderBody { userId: string; + /** ℹ️ This enum is non-exhaustive. */ billingType: Vital.Billing; orderSet: Vital.OrderSetRequest; + /** ℹ️ This enum is non-exhaustive. */ collectionMethod: Vital.LabTestCollectionMethod; physician?: Vital.PhysicianCreateRequest; patientDetails: Vital.PatientDetailsWithValidation; diff --git a/src/api/resources/labTests/client/requests/LabTestsBookPscAppointmentRequest.ts b/src/api/resources/labTests/client/requests/LabTestsBookPscAppointmentRequest.ts new file mode 100644 index 000000000..4dc4c2812 --- /dev/null +++ b/src/api/resources/labTests/client/requests/LabTestsBookPscAppointmentRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../../../index.js"; + +/** + * @example + * { + * body: { + * bookingKey: "booking_key" + * } + * } + */ +export interface LabTestsBookPscAppointmentRequest { + /** [!] This feature (Idempotency Key) is under closed beta. Idempotency Key support for booking PSC appointment. */ + idempotencyKey?: string; + /** If `no-cache`, applies idempotency only to successful outcomes. */ + idempotencyError?: "no-cache"; + body: Vital.AppointmentBookingRequest; +} diff --git a/src/api/resources/labTests/client/requests/LabTestsGetAreaInfoRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetAreaInfoRequest.ts index 8d41257b1..f82003fb8 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetAreaInfoRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetAreaInfoRequest.ts @@ -8,6 +8,7 @@ import type * as Vital from "../../../../index.js"; * zipCode: "zip_code", * radius: "10", * lab: "quest", + * labs: ["quest"], * labAccountId: "lab_account_id" * } */ diff --git a/src/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.ts index f5cc0b343..d1eb88135 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.ts @@ -3,6 +3,8 @@ /** * @example * { + * labId: [1], + * labSlug: "lab_slug", * name: "name", * aLaCarteEnabled: true, * labAccountId: "lab_account_id", @@ -13,6 +15,8 @@ export interface LabTestsGetMarkersRequest { /** The identifier Vital assigned to a lab partner. */ labId?: number | number[]; + /** The slug of the lab for these markers. If both lab_id and lab_slug are provided, lab_slug will be used. */ + labSlug?: string; /** The name or test code of an individual biomarker or a panel. */ name?: string; aLaCarteEnabled?: boolean; diff --git a/src/api/resources/labTests/client/requests/LabTestsGetOrderPscInfoRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetOrderPscInfoRequest.ts index 1d5904fb4..7b33334c2 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetOrderPscInfoRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetOrderPscInfoRequest.ts @@ -5,7 +5,8 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * radius: "10" + * radius: "10", + * capabilities: ["stat"] * } */ export interface LabTestsGetOrderPscInfoRequest { diff --git a/src/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.ts index d349a12a8..8a1b3b2a4 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.ts @@ -10,13 +10,18 @@ import type * as Vital from "../../../../index.js"; * endDate: new Date("2024-01-15T09:30:00.000Z"), * updatedStartDate: new Date("2024-01-15T09:30:00.000Z"), * updatedEndDate: new Date("2024-01-15T09:30:00.000Z"), + * status: ["ordered"], * orderKey: "created_at", * orderDirection: "asc", + * orderType: ["testkit"], * isCritical: true, * interpretation: "normal", + * orderActivationTypes: ["current"], * userId: "user_id", * patientName: "patient_name", * shippingRecipientName: "shipping_recipient_name", + * orderIds: ["order_ids"], + * orderTransactionId: "order_transaction_id", * page: 1, * size: 1 * } @@ -54,6 +59,8 @@ export interface LabTestsGetOrdersRequest { shippingRecipientName?: string; /** Filter by order ids. */ orderIds?: string | string[]; + /** Filter by order transaction ID */ + orderTransactionId?: string; page?: number; size?: number; } diff --git a/src/api/resources/labTests/client/requests/LabTestsGetPaginatedRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetPaginatedRequest.ts index f12c4b52b..92249db88 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetPaginatedRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetPaginatedRequest.ts @@ -11,6 +11,8 @@ import type * as Vital from "../../../../index.js"; * labSlug: "lab_slug", * collectionMethod: "testkit", * status: "active", + * markerIds: [1], + * providerIds: ["provider_ids"], * name: "name", * orderKey: "price", * orderDirection: "asc" diff --git a/src/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.ts index cddd03bf3..7f70c14c3 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetPscAppointmentAvailabilityRequest.ts @@ -7,8 +7,10 @@ import type * as Vital from "../../../../index.js"; * { * lab: "quest", * startDate: "start_date", + * siteCodes: ["site_codes"], * zipCode: "zip_code", - * radius: "10" + * radius: "10", + * allowStale: true * } */ export interface LabTestsGetPscAppointmentAvailabilityRequest { @@ -20,6 +22,8 @@ export interface LabTestsGetPscAppointmentAvailabilityRequest { siteCodes?: string | string[]; /** Zip code of the area to check */ zipCode?: string; - /** Radius in which to search. (meters) */ + /** Radius in which to search in miles */ radius?: Vital.AllowedRadius; + /** If true, allows cached availability data to be returned. */ + allowStale?: boolean; } diff --git a/src/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.ts index 513a7c783..940d4d9ff 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.ts @@ -8,6 +8,7 @@ import type * as Vital from "../../../../index.js"; * zipCode: "zip_code", * labId: 1, * radius: "10", + * capabilities: ["stat"], * labAccountId: "lab_account_id" * } */ diff --git a/src/api/resources/labTests/client/requests/LabTestsGetRequest.ts b/src/api/resources/labTests/client/requests/LabTestsGetRequest.ts index 00236230e..6ff4385dc 100644 --- a/src/api/resources/labTests/client/requests/LabTestsGetRequest.ts +++ b/src/api/resources/labTests/client/requests/LabTestsGetRequest.ts @@ -9,6 +9,8 @@ import type * as Vital from "../../../../index.js"; * labSlug: "lab_slug", * collectionMethod: "testkit", * status: "active", + * markerIds: [1], + * providerIds: ["provider_ids"], * name: "name", * orderKey: "price", * orderDirection: "asc" diff --git a/src/api/resources/labTests/client/requests/RequestAppointmentRequest.ts b/src/api/resources/labTests/client/requests/RequestAppointmentRequest.ts index 0ec400c4a..df4b2c854 100644 --- a/src/api/resources/labTests/client/requests/RequestAppointmentRequest.ts +++ b/src/api/resources/labTests/client/requests/RequestAppointmentRequest.ts @@ -17,5 +17,7 @@ import type * as Vital from "../../../../index.js"; export interface RequestAppointmentRequest { /** At-home phlebotomy appointment address. */ address: Vital.UsAddress; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.AppointmentProvider; + appointmentNotes?: string; } diff --git a/src/api/resources/labTests/client/requests/index.ts b/src/api/resources/labTests/client/requests/index.ts index b28ecbce1..b8a8624a2 100644 --- a/src/api/resources/labTests/client/requests/index.ts +++ b/src/api/resources/labTests/client/requests/index.ts @@ -2,6 +2,7 @@ export type { ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelR export type { CreateLabTestRequest } from "./CreateLabTestRequest.js"; export type { CreateOrderRequestCompatible } from "./CreateOrderRequestCompatible.js"; export type { ImportOrderBody } from "./ImportOrderBody.js"; +export type { LabTestsBookPscAppointmentRequest } from "./LabTestsBookPscAppointmentRequest.js"; export type { LabTestsGetAreaInfoRequest } from "./LabTestsGetAreaInfoRequest.js"; export type { LabTestsGetByIdRequest } from "./LabTestsGetByIdRequest.js"; export type { LabTestsGetLabelsPdfRequest } from "./LabTestsGetLabelsPdfRequest.js"; diff --git a/src/api/resources/link/client/Client.ts b/src/api/resources/link/client/Client.ts index e70755286..4e235f9e5 100644 --- a/src/api/resources/link/client/Client.ts +++ b/src/api/resources/link/client/Client.ts @@ -32,8 +32,7 @@ export class LinkClient { * @example * await client.link.listBulkOps({ * nextCursor: "next_cursor", - * pageSize: 1, - * teamId: "infer_from_context" + * pageSize: 1 * }) */ public listBulkOps( @@ -47,22 +46,11 @@ export class LinkClient { request: Vital.LinkListBulkOpsRequest = {}, requestOptions?: LinkClient.RequestOptions, ): Promise> { - const { nextCursor, pageSize, teamId } = request; - const _queryParams: Record = {}; - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (pageSize != null) { - _queryParams.page_size = pageSize; - } - - if (teamId != null) { - _queryParams.team_id = serializers.LinkListBulkOpsRequestTeamId.jsonOrThrow(teamId, { - unrecognizedObjectKeys: "strip", - }); - } - + const { nextCursor, pageSize } = request; + const _queryParams: Record = { + next_cursor: nextCursor, + page_size: pageSize, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -129,7 +117,6 @@ export class LinkClient { * * @example * await client.link.bulkImport({ - * teamId: "infer_from_context", * provider: "oura", * connections: [{ * userId: "user_id", @@ -151,14 +138,6 @@ export class LinkClient { request: Vital.BulkImportConnectionsBody, requestOptions?: LinkClient.RequestOptions, ): Promise> { - const { teamId, ..._body } = request; - const _queryParams: Record = {}; - if (teamId != null) { - _queryParams.team_id = serializers.LinkBulkImportRequestTeamId.jsonOrThrow(teamId, { - unrecognizedObjectKeys: "strip", - }); - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -175,9 +154,9 @@ export class LinkClient { method: "POST", headers: _headers, contentType: "application/json", - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.BulkImportConnectionsBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + body: serializers.BulkImportConnectionsBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -228,7 +207,6 @@ export class LinkClient { * * @example * await client.link.bulkTriggerHistoricalPull({ - * teamId: "infer_from_context", * userIds: ["user_ids"], * provider: "oura" * }) @@ -244,14 +222,6 @@ export class LinkClient { request: Vital.BulkTriggerHistoricalPullBody, requestOptions?: LinkClient.RequestOptions, ): Promise> { - const { teamId, ..._body } = request; - const _queryParams: Record = {}; - if (teamId != null) { - _queryParams.team_id = serializers.LinkBulkTriggerHistoricalPullRequestTeamId.jsonOrThrow(teamId, { - unrecognizedObjectKeys: "strip", - }); - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -268,9 +238,9 @@ export class LinkClient { method: "POST", headers: _headers, contentType: "application/json", - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.BulkTriggerHistoricalPullBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + body: serializers.BulkTriggerHistoricalPullBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -318,7 +288,6 @@ export class LinkClient { * * @example * await client.link.bulkExport({ - * teamId: "infer_from_context", * provider: "oura" * }) */ @@ -333,14 +302,6 @@ export class LinkClient { request: Vital.BulkExportConnectionsBody, requestOptions?: LinkClient.RequestOptions, ): Promise> { - const { teamId, ..._body } = request; - const _queryParams: Record = {}; - if (teamId != null) { - _queryParams.team_id = serializers.LinkBulkExportRequestTeamId.jsonOrThrow(teamId, { - unrecognizedObjectKeys: "strip", - }); - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -357,9 +318,9 @@ export class LinkClient { method: "POST", headers: _headers, contentType: "application/json", - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.BulkExportConnectionsBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + body: serializers.BulkExportConnectionsBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -410,7 +371,6 @@ export class LinkClient { * * @example * await client.link.bulkPause({ - * teamId: "infer_from_context", * userIds: ["user_ids"], * provider: "oura" * }) @@ -426,14 +386,6 @@ export class LinkClient { request: Vital.BulkPauseConnectionsBody, requestOptions?: LinkClient.RequestOptions, ): Promise> { - const { teamId, ..._body } = request; - const _queryParams: Record = {}; - if (teamId != null) { - _queryParams.team_id = serializers.LinkBulkPauseRequestTeamId.jsonOrThrow(teamId, { - unrecognizedObjectKeys: "strip", - }); - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -450,9 +402,9 @@ export class LinkClient { method: "POST", headers: _headers, contentType: "application/json", - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.BulkPauseConnectionsBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + body: serializers.BulkPauseConnectionsBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -686,12 +638,10 @@ export class LinkClient { requestOptions?: LinkClient.RequestOptions, ): Promise> { const { userId, expiresAt } = request; - const _queryParams: Record = {}; - _queryParams.user_id = userId; - if (expiresAt != null) { - _queryParams.expires_at = expiresAt.toISOString(); - } - + const _queryParams: Record = { + user_id: userId, + expires_at: expiresAt != null ? expiresAt?.toISOString() : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -847,9 +797,7 @@ export class LinkClient { * @throws {@link Vital.UnprocessableEntityError} * * @example - * await client.link.tokenState({ - * vitalLinkToken: "x-vital-link-token" - * }) + * await client.link.tokenState() */ public tokenState( request: Vital.LinkTokenStateRequest = {}, @@ -930,7 +878,6 @@ export class LinkClient { * * @example * await client.link.emailAuth({ - * vitalLinkToken: "x-vital-link-token", * email: "email", * provider: "oura", * authType: "password" @@ -1010,7 +957,6 @@ export class LinkClient { * * @example * await client.link.passwordAuth({ - * vitalLinkToken: "x-vital-link-token", * username: "username", * password: "password", * provider: "oura", @@ -1091,9 +1037,7 @@ export class LinkClient { * @throws {@link Vital.UnprocessableEntityError} * * @example - * await client.link.generateOauthLink("oura", { - * vitalLinkToken: "x-vital-link-token" - * }) + * await client.link.generateOauthLink("oura") */ public generateOauthLink( oauth_provider: Vital.OAuthProviders, @@ -1182,7 +1126,6 @@ export class LinkClient { * * @example * await client.link.connectPasswordProvider("whoop", { - * vitalLinkToken: "x-vital-link-token", * username: "username", * password: "password" * }) @@ -1277,7 +1220,6 @@ export class LinkClient { * * @example * await client.link.completePasswordProviderMfa("whoop", { - * vitalLinkToken: "x-vital-link-token", * mfaCode: "mfa_code" * }) */ @@ -1373,7 +1315,6 @@ export class LinkClient { * * @example * await client.link.connectEmailAuthProvider("freestyle_libre", { - * vitalLinkToken: "x-vital-link-token", * email: "email" * }) */ @@ -1457,9 +1398,7 @@ export class LinkClient { * @throws {@link Vital.UnprocessableEntityError} * * @example - * await client.link.getAllProviders({ - * vitalLinkToken: "x-vital-link-token" - * }) + * await client.link.getAllProviders() */ public getAllProviders( request: Vital.LinkGetAllProvidersRequest = {}, @@ -1555,10 +1494,15 @@ export class LinkClient { request: Vital.ManualConnectionData, requestOptions?: LinkClient.RequestOptions, ): Promise>> { + const { vitalIosSdkVersion, vitalAndroidSdkVersion, ..._body } = request; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, + mergeOnlyDefinedHeaders({ + "x-vital-ios-sdk-version": vitalIosSdkVersion, + "x-vital-android-sdk-version": vitalAndroidSdkVersion, + }), requestOptions?.headers, ); const _response = await core.fetcher({ @@ -1573,7 +1517,7 @@ export class LinkClient { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.ManualConnectionData.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + body: serializers.ManualConnectionData.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, diff --git a/src/api/resources/link/client/requests/BeginLinkTokenRequest.ts b/src/api/resources/link/client/requests/BeginLinkTokenRequest.ts index 54a408c9f..993dad99a 100644 --- a/src/api/resources/link/client/requests/BeginLinkTokenRequest.ts +++ b/src/api/resources/link/client/requests/BeginLinkTokenRequest.ts @@ -11,5 +11,6 @@ import type * as Vital from "../../../../index.js"; */ export interface BeginLinkTokenRequest { linkToken: string; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.Providers; } diff --git a/src/api/resources/link/client/requests/BulkExportConnectionsBody.ts b/src/api/resources/link/client/requests/BulkExportConnectionsBody.ts index 210442d56..a556b4caa 100644 --- a/src/api/resources/link/client/requests/BulkExportConnectionsBody.ts +++ b/src/api/resources/link/client/requests/BulkExportConnectionsBody.ts @@ -5,13 +5,12 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * teamId: "infer_from_context", * provider: "oura" * } */ export interface BulkExportConnectionsBody { - teamId?: Vital.LinkBulkExportRequestTeamId; userIds?: string[]; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.OAuthProviders; nextToken?: string; } diff --git a/src/api/resources/link/client/requests/BulkImportConnectionsBody.ts b/src/api/resources/link/client/requests/BulkImportConnectionsBody.ts index c142bdbcf..cb5a4c284 100644 --- a/src/api/resources/link/client/requests/BulkImportConnectionsBody.ts +++ b/src/api/resources/link/client/requests/BulkImportConnectionsBody.ts @@ -5,7 +5,6 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * teamId: "infer_from_context", * provider: "oura", * connections: [{ * userId: "user_id", @@ -17,7 +16,7 @@ import type * as Vital from "../../../../index.js"; * } */ export interface BulkImportConnectionsBody { - teamId?: Vital.LinkBulkImportRequestTeamId; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.OAuthProviders; connections: Vital.ConnectionRecipe[]; /** diff --git a/src/api/resources/link/client/requests/BulkPauseConnectionsBody.ts b/src/api/resources/link/client/requests/BulkPauseConnectionsBody.ts index 47b9fdc61..07a3a0eb3 100644 --- a/src/api/resources/link/client/requests/BulkPauseConnectionsBody.ts +++ b/src/api/resources/link/client/requests/BulkPauseConnectionsBody.ts @@ -5,13 +5,12 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * teamId: "infer_from_context", * userIds: ["user_ids"], * provider: "oura" * } */ export interface BulkPauseConnectionsBody { - teamId?: Vital.LinkBulkPauseRequestTeamId; userIds: string[]; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.OAuthProviders; } diff --git a/src/api/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts b/src/api/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts index 5525b7a7a..9c2c73227 100644 --- a/src/api/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts +++ b/src/api/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts @@ -5,14 +5,13 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * teamId: "infer_from_context", * userIds: ["user_ids"], * provider: "oura" * } */ export interface BulkTriggerHistoricalPullBody { - teamId?: Vital.LinkBulkTriggerHistoricalPullRequestTeamId; userIds: string[]; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.OAuthProviders; /** * Whether or not the endpoint should wait for the Bulk Op to complete before responding. diff --git a/src/api/resources/link/client/requests/CompletePasswordProviderMfaBody.ts b/src/api/resources/link/client/requests/CompletePasswordProviderMfaBody.ts index dc1af0010..b7cb78a73 100644 --- a/src/api/resources/link/client/requests/CompletePasswordProviderMfaBody.ts +++ b/src/api/resources/link/client/requests/CompletePasswordProviderMfaBody.ts @@ -3,7 +3,6 @@ /** * @example * { - * vitalLinkToken: "x-vital-link-token", * mfaCode: "mfa_code" * } */ diff --git a/src/api/resources/link/client/requests/DemoConnectionCreationPayload.ts b/src/api/resources/link/client/requests/DemoConnectionCreationPayload.ts index b367547fd..e3f3e4078 100644 --- a/src/api/resources/link/client/requests/DemoConnectionCreationPayload.ts +++ b/src/api/resources/link/client/requests/DemoConnectionCreationPayload.ts @@ -12,6 +12,6 @@ import type * as Vital from "../../../../index.js"; export interface DemoConnectionCreationPayload { /** Vital user ID */ userId: string; - /** Demo provider. For more information, please check out our docs (https://docs.tryvital.io/wearables/providers/test_data) */ + /** Demo provider. For more information, please check out our docs (https://docs.tryvital.io/wearables/providers/test_data) ℹ️ This enum is non-exhaustive. */ provider: Vital.DemoProviders; } diff --git a/src/api/resources/link/client/requests/EmailAuthLink.ts b/src/api/resources/link/client/requests/EmailAuthLink.ts index fa113fb49..158f8c504 100644 --- a/src/api/resources/link/client/requests/EmailAuthLink.ts +++ b/src/api/resources/link/client/requests/EmailAuthLink.ts @@ -5,7 +5,6 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * vitalLinkToken: "x-vital-link-token", * email: "email", * provider: "oura", * authType: "password" @@ -14,7 +13,10 @@ import type * as Vital from "../../../../index.js"; export interface EmailAuthLink { vitalLinkToken?: string; email: string; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.Providers; + /** ℹ️ This enum is non-exhaustive. */ authType: Vital.AuthType; + /** ℹ️ This enum is non-exhaustive. */ region?: Vital.Region; } diff --git a/src/api/resources/link/client/requests/EmailProviderAuthLink.ts b/src/api/resources/link/client/requests/EmailProviderAuthLink.ts index a7b954aa3..bf9322387 100644 --- a/src/api/resources/link/client/requests/EmailProviderAuthLink.ts +++ b/src/api/resources/link/client/requests/EmailProviderAuthLink.ts @@ -5,13 +5,14 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * vitalLinkToken: "x-vital-link-token", * email: "email" * } */ export interface EmailProviderAuthLink { vitalLinkToken?: string; email: string; + /** ℹ️ This enum is non-exhaustive. */ emailProviderAuthLinkProvider?: Vital.Providers; + /** ℹ️ This enum is non-exhaustive. */ region?: Vital.Region; } diff --git a/src/api/resources/link/client/requests/IndividualProviderData.ts b/src/api/resources/link/client/requests/IndividualProviderData.ts index c4883437c..987b6777e 100644 --- a/src/api/resources/link/client/requests/IndividualProviderData.ts +++ b/src/api/resources/link/client/requests/IndividualProviderData.ts @@ -5,7 +5,6 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * vitalLinkToken: "x-vital-link-token", * username: "username", * password: "password" * } @@ -16,6 +15,6 @@ export interface IndividualProviderData { username: string; /** Password for provider */ password: string; - /** Provider region to authenticate against. Only applicable to specific providers. */ + /** Provider region to authenticate against. Only applicable to specific providers. ℹ️ This enum is non-exhaustive. */ region?: Vital.Region; } diff --git a/src/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.ts b/src/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.ts index c03216a68..cdc2538ae 100644 --- a/src/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.ts +++ b/src/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.ts @@ -2,9 +2,7 @@ /** * @example - * { - * vitalLinkToken: "x-vital-link-token" - * } + * {} */ export interface LinkGenerateOauthLinkRequest { vitalLinkToken?: string; diff --git a/src/api/resources/link/client/requests/LinkGetAllProvidersRequest.ts b/src/api/resources/link/client/requests/LinkGetAllProvidersRequest.ts index aaaa5543f..b87282bb0 100644 --- a/src/api/resources/link/client/requests/LinkGetAllProvidersRequest.ts +++ b/src/api/resources/link/client/requests/LinkGetAllProvidersRequest.ts @@ -2,9 +2,7 @@ /** * @example - * { - * vitalLinkToken: "x-vital-link-token" - * } + * {} */ export interface LinkGetAllProvidersRequest { vitalLinkToken?: string; diff --git a/src/api/resources/link/client/requests/LinkListBulkOpsRequest.ts b/src/api/resources/link/client/requests/LinkListBulkOpsRequest.ts index 8cc415a3f..f6a945816 100644 --- a/src/api/resources/link/client/requests/LinkListBulkOpsRequest.ts +++ b/src/api/resources/link/client/requests/LinkListBulkOpsRequest.ts @@ -1,17 +1,13 @@ // This file was auto-generated by Fern from our API Definition. -import type * as Vital from "../../../../index.js"; - /** * @example * { * nextCursor: "next_cursor", - * pageSize: 1, - * teamId: "infer_from_context" + * pageSize: 1 * } */ export interface LinkListBulkOpsRequest { nextCursor?: string; pageSize?: number; - teamId?: Vital.LinkListBulkOpsRequestTeamId; } diff --git a/src/api/resources/link/client/requests/LinkTokenExchange.ts b/src/api/resources/link/client/requests/LinkTokenExchange.ts index ce3dd2531..f4540d802 100644 --- a/src/api/resources/link/client/requests/LinkTokenExchange.ts +++ b/src/api/resources/link/client/requests/LinkTokenExchange.ts @@ -11,6 +11,7 @@ import type * as Vital from "../../../../index.js"; export interface LinkTokenExchange { /** 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. */ userId: string; + /** ℹ️ This enum is non-exhaustive. */ provider?: Vital.Providers; redirectUrl?: string; /** diff --git a/src/api/resources/link/client/requests/LinkTokenStateRequest.ts b/src/api/resources/link/client/requests/LinkTokenStateRequest.ts index d7bf9c60b..820ad5d5a 100644 --- a/src/api/resources/link/client/requests/LinkTokenStateRequest.ts +++ b/src/api/resources/link/client/requests/LinkTokenStateRequest.ts @@ -2,9 +2,7 @@ /** * @example - * { - * vitalLinkToken: "x-vital-link-token" - * } + * {} */ export interface LinkTokenStateRequest { vitalLinkToken?: string; diff --git a/src/api/resources/link/client/requests/ManualConnectionData.ts b/src/api/resources/link/client/requests/ManualConnectionData.ts index 2a46af1fa..2a726f9cf 100644 --- a/src/api/resources/link/client/requests/ManualConnectionData.ts +++ b/src/api/resources/link/client/requests/ManualConnectionData.ts @@ -7,6 +7,9 @@ * } */ export interface ManualConnectionData { + vitalIosSdkVersion?: string; + vitalAndroidSdkVersion?: string; userId: string; providerId?: string; + grantedPermissions?: string[]; } diff --git a/src/api/resources/link/client/requests/PasswordAuthLink.ts b/src/api/resources/link/client/requests/PasswordAuthLink.ts index 60e422505..a28fd6dda 100644 --- a/src/api/resources/link/client/requests/PasswordAuthLink.ts +++ b/src/api/resources/link/client/requests/PasswordAuthLink.ts @@ -5,7 +5,6 @@ import type * as Vital from "../../../../index.js"; /** * @example * { - * vitalLinkToken: "x-vital-link-token", * username: "username", * password: "password", * provider: "oura", @@ -16,6 +15,8 @@ export interface PasswordAuthLink { vitalLinkToken?: string; username: string; password: string; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.Providers; + /** ℹ️ This enum is non-exhaustive. */ authType: Vital.AuthType; } diff --git a/src/api/resources/link/index.ts b/src/api/resources/link/index.ts index d9adb1af9..914b8c3c7 100644 --- a/src/api/resources/link/index.ts +++ b/src/api/resources/link/index.ts @@ -1,2 +1 @@ export * from "./client/index.js"; -export * from "./types/index.js"; diff --git a/src/api/resources/link/types/LinkBulkExportRequestTeamId.ts b/src/api/resources/link/types/LinkBulkExportRequestTeamId.ts deleted file mode 100644 index 99ac40818..000000000 --- a/src/api/resources/link/types/LinkBulkExportRequestTeamId.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export const LinkBulkExportRequestTeamId = { - InferFromContext: "infer_from_context", -} as const; -export type LinkBulkExportRequestTeamId = - (typeof LinkBulkExportRequestTeamId)[keyof typeof LinkBulkExportRequestTeamId]; diff --git a/src/api/resources/link/types/LinkBulkImportRequestTeamId.ts b/src/api/resources/link/types/LinkBulkImportRequestTeamId.ts deleted file mode 100644 index 4ec17badd..000000000 --- a/src/api/resources/link/types/LinkBulkImportRequestTeamId.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export const LinkBulkImportRequestTeamId = { - InferFromContext: "infer_from_context", -} as const; -export type LinkBulkImportRequestTeamId = - (typeof LinkBulkImportRequestTeamId)[keyof typeof LinkBulkImportRequestTeamId]; diff --git a/src/api/resources/link/types/LinkBulkPauseRequestTeamId.ts b/src/api/resources/link/types/LinkBulkPauseRequestTeamId.ts deleted file mode 100644 index 7b673c415..000000000 --- a/src/api/resources/link/types/LinkBulkPauseRequestTeamId.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export const LinkBulkPauseRequestTeamId = { - InferFromContext: "infer_from_context", -} as const; -export type LinkBulkPauseRequestTeamId = (typeof LinkBulkPauseRequestTeamId)[keyof typeof LinkBulkPauseRequestTeamId]; diff --git a/src/api/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts b/src/api/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts deleted file mode 100644 index d61f6a01b..000000000 --- a/src/api/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export const LinkBulkTriggerHistoricalPullRequestTeamId = { - InferFromContext: "infer_from_context", -} as const; -export type LinkBulkTriggerHistoricalPullRequestTeamId = - (typeof LinkBulkTriggerHistoricalPullRequestTeamId)[keyof typeof LinkBulkTriggerHistoricalPullRequestTeamId]; diff --git a/src/api/resources/link/types/LinkListBulkOpsRequestTeamId.ts b/src/api/resources/link/types/LinkListBulkOpsRequestTeamId.ts deleted file mode 100644 index b729b92e2..000000000 --- a/src/api/resources/link/types/LinkListBulkOpsRequestTeamId.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export const LinkListBulkOpsRequestTeamId = { - InferFromContext: "infer_from_context", -} as const; -export type LinkListBulkOpsRequestTeamId = - (typeof LinkListBulkOpsRequestTeamId)[keyof typeof LinkListBulkOpsRequestTeamId]; diff --git a/src/api/resources/link/types/index.ts b/src/api/resources/link/types/index.ts deleted file mode 100644 index 2d2b3b335..000000000 --- a/src/api/resources/link/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./LinkBulkExportRequestTeamId.js"; -export * from "./LinkBulkImportRequestTeamId.js"; -export * from "./LinkBulkPauseRequestTeamId.js"; -export * from "./LinkBulkTriggerHistoricalPullRequestTeamId.js"; -export * from "./LinkListBulkOpsRequestTeamId.js"; diff --git a/src/api/resources/meal/client/Client.ts b/src/api/resources/meal/client/Client.ts index f90c4c297..c7c45f63e 100644 --- a/src/api/resources/meal/client/Client.ts +++ b/src/api/resources/meal/client/Client.ts @@ -53,16 +53,11 @@ export class MealClient { requestOptions?: MealClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/menstrualCycle/client/Client.ts b/src/api/resources/menstrualCycle/client/Client.ts index dc6ae2e0f..e61d818c4 100644 --- a/src/api/resources/menstrualCycle/client/Client.ts +++ b/src/api/resources/menstrualCycle/client/Client.ts @@ -51,16 +51,11 @@ export class MenstrualCycleClient { requestOptions?: MenstrualCycleClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/orderTransaction/client/Client.ts b/src/api/resources/orderTransaction/client/Client.ts new file mode 100644 index 000000000..e0b0b2aac --- /dev/null +++ b/src/api/resources/orderTransaction/client/Client.ts @@ -0,0 +1,261 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js"; +import { mergeHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js"; +import * as errors from "../../../../errors/index.js"; +import * as serializers from "../../../../serialization/index.js"; +import * as Vital from "../../../index.js"; + +export declare namespace OrderTransactionClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class OrderTransactionClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: OrderTransactionClient.Options = {}) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * @param {string} transaction_id + * @param {OrderTransactionClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Vital.UnprocessableEntityError} + * + * @example + * await client.orderTransaction.getTransaction("transaction_id") + */ + public getTransaction( + transaction_id: string, + requestOptions?: OrderTransactionClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getTransaction(transaction_id, requestOptions)); + } + + private async __getTransaction( + transaction_id: string, + requestOptions?: OrderTransactionClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VitalEnvironment.Production, + `v3/order_transaction/${core.url.encodePathParam(transaction_id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetOrderTransactionResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Vital.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.VitalError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/v3/order_transaction/{transaction_id}", + ); + } + + /** + * @param {string} transaction_id + * @param {OrderTransactionClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Vital.UnprocessableEntityError} + * + * @example + * await client.orderTransaction.getTransactionResult("transaction_id") + */ + public getTransactionResult( + transaction_id: string, + requestOptions?: OrderTransactionClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getTransactionResult(transaction_id, requestOptions)); + } + + private async __getTransactionResult( + transaction_id: string, + requestOptions?: OrderTransactionClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VitalEnvironment.Production, + `v3/order_transaction/${core.url.encodePathParam(transaction_id)}/result`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.LabResultsRaw.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Vital.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.VitalError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/v3/order_transaction/{transaction_id}/result", + ); + } + + /** + * @throws {@link Vital.UnprocessableEntityError} + */ + public getTransactionResultPdf( + transaction_id: string, + requestOptions?: OrderTransactionClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getTransactionResultPdf(transaction_id, requestOptions)); + } + + private async __getTransactionResultPdf( + transaction_id: string, + requestOptions?: OrderTransactionClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VitalEnvironment.Production, + `v3/order_transaction/${core.url.encodePathParam(transaction_id)}/result/pdf`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + responseType: "binary-response", + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Vital.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.VitalError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/v3/order_transaction/{transaction_id}/result/pdf", + ); + } +} diff --git a/src/api/resources/orderTransaction/client/index.ts b/src/api/resources/orderTransaction/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/orderTransaction/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/orderTransaction/index.ts b/src/api/resources/orderTransaction/index.ts new file mode 100644 index 000000000..914b8c3c7 --- /dev/null +++ b/src/api/resources/orderTransaction/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/api/resources/payor/client/requests/CreatePayorBody.ts b/src/api/resources/payor/client/requests/CreatePayorBody.ts index 7eb94e7f4..d8cbf2841 100644 --- a/src/api/resources/payor/client/requests/CreatePayorBody.ts +++ b/src/api/resources/payor/client/requests/CreatePayorBody.ts @@ -18,6 +18,7 @@ import type * as Vital from "../../../../index.js"; export interface CreatePayorBody { name: string; address: Vital.Address; + /** ℹ️ This enum is non-exhaustive. */ provider?: Vital.PayorCodeExternalProvider; providerPayorId?: string; } diff --git a/src/api/resources/profile/client/Client.ts b/src/api/resources/profile/client/Client.ts index 0fb834a0b..bf445b88d 100644 --- a/src/api/resources/profile/client/Client.ts +++ b/src/api/resources/profile/client/Client.ts @@ -51,11 +51,9 @@ export class ProfileClient { requestOptions?: ProfileClient.RequestOptions, ): Promise> { const { provider } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - + const _queryParams: Record = { + provider, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -142,11 +140,9 @@ export class ProfileClient { requestOptions?: ProfileClient.RequestOptions, ): Promise> { const { provider } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - + const _queryParams: Record = { + provider, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/providers/client/Client.ts b/src/api/resources/providers/client/Client.ts index ddd556bec..2db418b01 100644 --- a/src/api/resources/providers/client/Client.ts +++ b/src/api/resources/providers/client/Client.ts @@ -48,11 +48,9 @@ export class ProvidersClient { requestOptions?: ProvidersClient.RequestOptions, ): Promise> { const { sourceType } = request; - const _queryParams: Record = {}; - if (sourceType != null) { - _queryParams.source_type = sourceType; - } - + const _queryParams: Record = { + source_type: sourceType, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/sleep/client/Client.ts b/src/api/resources/sleep/client/Client.ts index fec2b40bc..4ebe9a2fe 100644 --- a/src/api/resources/sleep/client/Client.ts +++ b/src/api/resources/sleep/client/Client.ts @@ -53,16 +53,11 @@ export class SleepClient { requestOptions?: SleepClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -151,16 +146,11 @@ export class SleepClient { requestOptions?: SleepClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/sleepCycle/client/Client.ts b/src/api/resources/sleepCycle/client/Client.ts index c120863d9..b859df7d2 100644 --- a/src/api/resources/sleepCycle/client/Client.ts +++ b/src/api/resources/sleepCycle/client/Client.ts @@ -53,16 +53,11 @@ export class SleepCycleClient { requestOptions?: SleepCycleClient.RequestOptions, ): Promise> { const { startDate, endDate, provider } = request; - const _queryParams: Record = {}; - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - - if (provider != null) { - _queryParams.provider = provider; - } - + const _queryParams: Record = { + start_date: startDate, + end_date: endDate, + provider, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/team/client/Client.ts b/src/api/resources/team/client/Client.ts index c37d45c59..cd1957567 100644 --- a/src/api/resources/team/client/Client.ts +++ b/src/api/resources/team/client/Client.ts @@ -32,9 +32,7 @@ export class TeamClient { * @throws {@link Vital.UnprocessableEntityError} * * @example - * await client.team.getLinkConfig({ - * vitalLinkToken: "x-vital-link-token" - * }) + * await client.team.getLinkConfig() */ public getLinkConfig( request: Vital.TeamGetLinkConfigRequest = {}, @@ -210,11 +208,9 @@ export class TeamClient { requestOptions?: TeamClient.RequestOptions, ): Promise> { const { queryId } = request; - const _queryParams: Record = {}; - if (queryId != null) { - _queryParams.query_id = queryId; - } - + const _queryParams: Record = { + query_id: queryId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -356,13 +352,12 @@ export class TeamClient { requestOptions?: TeamClient.RequestOptions, ): Promise[]>> { const { dataType } = request; - const _queryParams: Record = {}; - if (dataType != null) { - _queryParams.data_type = serializers.PriorityResource.jsonOrThrow(dataType, { - unrecognizedObjectKeys: "strip", - }); - } - + const _queryParams: Record = { + data_type: + dataType != null + ? serializers.PriorityResource.jsonOrThrow(dataType, { unrecognizedObjectKeys: "strip" }) + : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/team/client/requests/TeamGetLinkConfigRequest.ts b/src/api/resources/team/client/requests/TeamGetLinkConfigRequest.ts index f1f2e15f3..79fb9bd53 100644 --- a/src/api/resources/team/client/requests/TeamGetLinkConfigRequest.ts +++ b/src/api/resources/team/client/requests/TeamGetLinkConfigRequest.ts @@ -2,9 +2,7 @@ /** * @example - * { - * vitalLinkToken: "x-vital-link-token" - * } + * {} */ export interface TeamGetLinkConfigRequest { vitalLinkToken?: string; diff --git a/src/api/resources/user/client/Client.ts b/src/api/resources/user/client/Client.ts index a3886ae84..2374dc610 100644 --- a/src/api/resources/user/client/Client.ts +++ b/src/api/resources/user/client/Client.ts @@ -49,15 +49,10 @@ export class UserClient { requestOptions?: UserClient.RequestOptions, ): Promise> { const { offset, limit } = request; - const _queryParams: Record = {}; - if (offset != null) { - _queryParams.offset = offset; - } - - if (limit != null) { - _queryParams.limit = limit; - } - + const _queryParams: Record = { + offset, + limit, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -556,11 +551,9 @@ export class UserClient { requestOptions?: UserClient.RequestOptions, ): Promise> { const { isPrimary } = request; - const _queryParams: Record = {}; - if (isPrimary != null) { - _queryParams.is_primary = isPrimary; - } - + const _queryParams: Record = { + is_primary: isPrimary, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1149,15 +1142,10 @@ export class UserClient { requestOptions?: UserClient.RequestOptions, ): Promise> { const { userId, clientUserId } = request; - const _queryParams: Record = {}; - if (userId != null) { - _queryParams.user_id = userId; - } - - if (clientUserId != null) { - _queryParams.client_user_id = clientUserId; - } - + const _queryParams: Record = { + user_id: userId, + client_user_id: clientUserId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1245,11 +1233,9 @@ export class UserClient { requestOptions?: UserClient.RequestOptions, ): Promise> { const { timeout } = request; - const _queryParams: Record = {}; - if (timeout != null) { - _queryParams.timeout = timeout; - } - + const _queryParams: Record = { + timeout, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/user/client/requests/CreateInsuranceRequest.ts b/src/api/resources/user/client/requests/CreateInsuranceRequest.ts index b467621c2..9949dc577 100644 --- a/src/api/resources/user/client/requests/CreateInsuranceRequest.ts +++ b/src/api/resources/user/client/requests/CreateInsuranceRequest.ts @@ -29,6 +29,7 @@ export interface CreateInsuranceRequest { payorCode: string; memberId: string; groupId?: string; + /** ℹ️ This enum is non-exhaustive. */ relationship: Vital.ResponsibleRelationship; insured: Vital.VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails; guarantor?: Vital.GuarantorDetails; diff --git a/src/api/resources/user/client/requests/UserInfoCreateRequest.ts b/src/api/resources/user/client/requests/UserInfoCreateRequest.ts index 686579300..47e63474c 100644 --- a/src/api/resources/user/client/requests/UserInfoCreateRequest.ts +++ b/src/api/resources/user/client/requests/UserInfoCreateRequest.ts @@ -27,10 +27,14 @@ export interface UserInfoCreateRequest { phoneNumber: string; gender: string; dob: string; - address: Vital.Address; + address: Vital.UserAddress; medicalProxy?: Vital.GuarantorDetails; + /** ℹ️ This enum is non-exhaustive. */ race?: Vital.Race; + /** ℹ️ This enum is non-exhaustive. */ ethnicity?: Vital.Ethnicity; + /** ℹ️ This enum is non-exhaustive. */ sexualOrientation?: Vital.SexualOrientation; + /** ℹ️ This enum is non-exhaustive. */ genderIdentity?: Vital.GenderIdentity; } diff --git a/src/api/resources/vitals/client/Client.ts b/src/api/resources/vitals/client/Client.ts index 2bd0e379a..93371e1f0 100644 --- a/src/api/resources/vitals/client/Client.ts +++ b/src/api/resources/vitals/client/Client.ts @@ -55,24 +55,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -166,24 +155,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -279,24 +257,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -390,24 +357,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -501,24 +457,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -612,24 +557,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -725,24 +659,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -836,24 +759,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -947,24 +859,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1058,24 +959,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1169,24 +1059,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1280,24 +1159,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1393,24 +1261,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1506,24 +1363,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1619,24 +1465,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1730,24 +1565,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1843,24 +1667,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1954,24 +1767,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2065,24 +1867,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2176,24 +1967,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2287,24 +2067,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2398,24 +2167,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2509,24 +2267,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2620,24 +2367,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2731,24 +2467,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2842,24 +2567,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -2953,24 +2667,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3064,24 +2767,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3175,24 +2867,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3286,24 +2967,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3397,24 +3067,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3508,24 +3167,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3615,28 +3263,17 @@ export class VitalsClient { private async __caloriesActiveGrouped( user_id: string, - request: Vital.VitalsCaloriesActiveGroupedRequest, - requestOptions?: VitalsClient.RequestOptions, - ): Promise> { - const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + request: Vital.VitalsCaloriesActiveGroupedRequest, + requestOptions?: VitalsClient.RequestOptions, + ): Promise> { + const { cursor, nextCursor, provider, startDate, endDate } = request; + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3730,24 +3367,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3841,24 +3467,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -3952,24 +3567,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4063,24 +3667,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4174,24 +3767,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4285,24 +3867,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4396,24 +3967,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4507,24 +4067,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4618,24 +4167,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4729,24 +4267,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4840,24 +4367,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -4953,24 +4469,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5064,24 +4569,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5175,24 +4669,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5286,24 +4769,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5397,24 +4869,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5510,24 +4971,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5621,24 +5071,13 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { cursor, nextCursor, provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (cursor != null) { - _queryParams.cursor = cursor; - } - - if (nextCursor != null) { - _queryParams.next_cursor = nextCursor; - } - - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + cursor, + next_cursor: nextCursor, + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5730,16 +5169,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5831,16 +5265,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -5932,16 +5361,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6033,16 +5457,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6134,16 +5553,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6235,16 +5649,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6336,16 +5745,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6437,16 +5841,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6538,16 +5937,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6639,16 +6033,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6740,16 +6129,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6841,16 +6225,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -6937,16 +6316,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7033,16 +6407,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7134,16 +6503,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7230,16 +6594,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7331,16 +6690,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7432,16 +6786,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7533,16 +6882,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7634,16 +6978,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7735,16 +7074,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7836,16 +7170,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -7937,16 +7266,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -8038,16 +7362,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -8139,16 +7458,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -8240,16 +7554,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -8341,16 +7650,11 @@ export class VitalsClient { requestOptions?: VitalsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/resources/workouts/client/Client.ts b/src/api/resources/workouts/client/Client.ts index c4193d7fc..e276e55ea 100644 --- a/src/api/resources/workouts/client/Client.ts +++ b/src/api/resources/workouts/client/Client.ts @@ -53,16 +53,11 @@ export class WorkoutsClient { requestOptions?: WorkoutsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -156,16 +151,11 @@ export class WorkoutsClient { requestOptions?: WorkoutsClient.RequestOptions, ): Promise> { const { provider, startDate, endDate } = request; - const _queryParams: Record = {}; - if (provider != null) { - _queryParams.provider = provider; - } - - _queryParams.start_date = startDate; - if (endDate != null) { - _queryParams.end_date = endDate; - } - + const _queryParams: Record = { + provider, + start_date: startDate, + end_date: endDate, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/api/types/ActivityV2InDb.ts b/src/api/types/ActivityV2InDb.ts index 1067b3cc3..ffa33466a 100644 --- a/src/api/types/ActivityV2InDb.ts +++ b/src/api/types/ActivityV2InDb.ts @@ -5,13 +5,13 @@ import type * as Vital from "../index.js"; export interface ActivityV2InDb { timestamp: Date; data: Record; - providerId: string; userId: string; + providerId: string; sourceId: number; priorityId: number; id: string; - source: Vital.ClientFacingProvider; sourceDeviceId?: string; createdAt?: Date; updatedAt?: Date; + source: Vital.ClientFacingProvider; } diff --git a/src/api/types/Address.ts b/src/api/types/Address.ts index c6fe647a0..7bb1aaf67 100644 --- a/src/api/types/Address.ts +++ b/src/api/types/Address.ts @@ -7,4 +7,5 @@ export interface Address { zip: string; city: string; state: string; + accessNotes?: string; } diff --git a/src/api/types/AggregateExprArg.ts b/src/api/types/AggregateExprArg.ts index 89711aaac..01d7f9717 100644 --- a/src/api/types/AggregateExprArg.ts +++ b/src/api/types/AggregateExprArg.ts @@ -4,20 +4,25 @@ import type * as Vital from "../index.js"; export type AggregateExprArg = | Vital.SleepColumnExpr + | Vital.DerivedReadinessColumnExpr | Vital.ActivityColumnExpr | Vital.WorkoutColumnExpr | Vital.BodyColumnExpr | Vital.MealColumnExpr + | Vital.MenstrualCycleColumnExpr | Vital.ProfileColumnExpr | Vital.SleepScoreValueMacroExpr | Vital.ChronotypeValueMacroExpr | Vital.AsleepAtValueMacroExpr | Vital.AwakeAtValueMacroExpr + | Vital.AwakeningsValueMacroExpr | Vital.UnrecognizedValueMacroExpr | Vital.DiscreteTimeseriesExpr | Vital.IntervalTimeseriesExpr + | Vital.InsulinInjectionTimeseriesExpr | Vital.BloodPressureTimeseriesExpr | Vital.TemperatureTimeseriesExpr | Vital.WorkoutDurationTimeseriesExpr | Vital.NoteTimeseriesExpr - | Vital.IndexColumnExpr; + | Vital.IndexColumnExpr + | Vital.ScalarOutputSubqueryExpr; diff --git a/src/api/types/AggregateFieldExpr.ts b/src/api/types/AggregateFieldExpr.ts new file mode 100644 index 000000000..a2d08f6ad --- /dev/null +++ b/src/api/types/AggregateFieldExpr.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +/** + * Aggregate over unnested list elements, optionally targeting a struct field. + * + * When arg is None, the aggregate operates on the list elements directly + * (e.g., count-all, or mean/sum on a scalar numeric list). + * When arg is a FieldExpr, the struct field is extracted before aggregating. + */ +export interface AggregateFieldExpr { + /** ℹ️ This enum is non-exhaustive. */ + func: Vital.AggregateFieldExprFunc; + arg?: Vital.AggregateFieldExprArg; +} diff --git a/src/api/types/AggregateFieldExprArg.ts b/src/api/types/AggregateFieldExprArg.ts new file mode 100644 index 000000000..843891435 --- /dev/null +++ b/src/api/types/AggregateFieldExprArg.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export type AggregateFieldExprArg = + | Vital.McMenstrualFlowFieldExpr + | Vital.McCervicalMucusFieldExpr + | Vital.McIntermenstrualBleedingFieldExpr + | Vital.McContraceptiveFieldExpr + | Vital.McDetectedDeviationsFieldExpr + | Vital.McOvulationTestFieldExpr + | Vital.McHomePregnancyTestFieldExpr + | Vital.McHomeProgesteroneTestFieldExpr + | Vital.McSexualActivityFieldExpr + | Vital.McBasalBodyTemperatureFieldExpr + | Vital.ElementFieldExpr; diff --git a/src/api/types/AggregateFieldExprFunc.ts b/src/api/types/AggregateFieldExprFunc.ts new file mode 100644 index 000000000..aa09d9b31 --- /dev/null +++ b/src/api/types/AggregateFieldExprFunc.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const AggregateFieldExprFunc = { + Mean: "mean", + Min: "min", + Max: "max", + Sum: "sum", + Count: "count", + Median: "median", + Stddev: "stddev", + Oldest: "oldest", + Newest: "newest", +} as const; +export type AggregateFieldExprFunc = (typeof AggregateFieldExprFunc)[keyof typeof AggregateFieldExprFunc]; diff --git a/src/api/types/AppointmentBookingRequest.ts b/src/api/types/AppointmentBookingRequest.ts index 2e452c752..1d614f120 100644 --- a/src/api/types/AppointmentBookingRequest.ts +++ b/src/api/types/AppointmentBookingRequest.ts @@ -2,4 +2,11 @@ export interface AppointmentBookingRequest { bookingKey: string; + appointmentNotes?: string; + /** If true, the endpoint attempts to confirm the booking within the `sync_confirmation_timeout_millisecond` window. If confirmation is not received in time, a pending appointment is returned and booking continues asynchronously. If false (default), the endpoint waits for confirmation or returns a 500 error on failure. */ + asyncConfirmation?: boolean; + /** Maximum time (in milliseconds) to wait for booking confirmation before returning a pending appointment. Only applies when `async_confirmation` is true. Defaults to 2500ms. Range: 1000-10000ms. */ + syncConfirmationTimeoutMillisecond?: number; + /** Maximum time (in milliseconds) to attempt asynchronous booking before cancelling the pending appointment. Only applies when `async_confirmation` is true. Defaults to 15 minutes. Range: 60000-172800000ms. */ + asyncConfirmationTimeoutMillisecond?: number; } diff --git a/src/api/types/AppointmentProvider.ts b/src/api/types/AppointmentProvider.ts index 76358bab6..82ca7165b 100644 --- a/src/api/types/AppointmentProvider.ts +++ b/src/api/types/AppointmentProvider.ts @@ -5,5 +5,6 @@ export const AppointmentProvider = { Getlabs: "getlabs", Phlebfinders: "phlebfinders", Quest: "quest", + SonoraQuest: "sonora_quest", } as const; export type AppointmentProvider = (typeof AppointmentProvider)[keyof typeof AppointmentProvider]; diff --git a/src/api/types/AppointmentPscLabs.ts b/src/api/types/AppointmentPscLabs.ts index 08d6132f7..6fe610107 100644 --- a/src/api/types/AppointmentPscLabs.ts +++ b/src/api/types/AppointmentPscLabs.ts @@ -1,6 +1,8 @@ // This file was auto-generated by Fern from our API Definition. -/** - * ℹ️ This enum is non-exhaustive. - */ -export type AppointmentPscLabs = "quest"; +/** ℹ️ This enum is non-exhaustive. */ +export const AppointmentPscLabs = { + Quest: "quest", + SonoraQuest: "sonora_quest", +} as const; +export type AppointmentPscLabs = (typeof AppointmentPscLabs)[keyof typeof AppointmentPscLabs]; diff --git a/src/api/types/AppointmentRescheduleRequest.ts b/src/api/types/AppointmentRescheduleRequest.ts index edc78a716..1ed06b18b 100644 --- a/src/api/types/AppointmentRescheduleRequest.ts +++ b/src/api/types/AppointmentRescheduleRequest.ts @@ -2,4 +2,5 @@ export interface AppointmentRescheduleRequest { bookingKey: string; + appointmentNotes?: string; } diff --git a/src/api/types/AwakeningsValueMacroExpr.ts b/src/api/types/AwakeningsValueMacroExpr.ts new file mode 100644 index 000000000..deec37dc3 --- /dev/null +++ b/src/api/types/AwakeningsValueMacroExpr.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface AwakeningsValueMacroExpr { + valueMacro: "awakenings"; + version?: "automatic"; +} diff --git a/src/api/types/BiomarkerResult.ts b/src/api/types/BiomarkerResult.ts index b799f2f62..ee3743595 100644 --- a/src/api/types/BiomarkerResult.ts +++ b/src/api/types/BiomarkerResult.ts @@ -9,6 +9,7 @@ export interface BiomarkerResult { name: string; slug?: string; result: string; + /** ℹ️ This enum is non-exhaustive. */ type: Vital.ResultType; unit?: string; timestamp?: Date; diff --git a/src/api/types/BodyV2InDb.ts b/src/api/types/BodyV2InDb.ts index 5988bd0cf..5b7114305 100644 --- a/src/api/types/BodyV2InDb.ts +++ b/src/api/types/BodyV2InDb.ts @@ -5,14 +5,14 @@ import type * as Vital from "../index.js"; export interface BodyV2InDb { timestamp: Date; data: Record; - providerId: string; userId: string; + providerId: string; sourceId: number; priorityId?: number; id: string; - source?: Vital.ClientFacingProvider; - priority?: number; sourceDeviceId?: string; createdAt?: Date; updatedAt?: Date; + priority?: number; + source: Vital.ClientFacingProvider; } diff --git a/src/api/types/BulkOp.ts b/src/api/types/BulkOp.ts index ba31bff32..9c0f4ba60 100644 --- a/src/api/types/BulkOp.ts +++ b/src/api/types/BulkOp.ts @@ -7,6 +7,7 @@ export interface BulkOp { type: Vital.BulkOpType; /** ℹ️ This enum is non-exhaustive. */ status: Vital.BulkOpStatus; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.Providers; pending: number; processed: number; diff --git a/src/api/types/CanonicalCandidate.ts b/src/api/types/CanonicalCandidate.ts new file mode 100644 index 000000000..490dce500 --- /dev/null +++ b/src/api/types/CanonicalCandidate.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CanonicalCandidate { + loincSetHash: string; + displayName: string; + aliases?: string[]; + loincCodes?: string[]; + providerIds?: string[]; + loincComponents?: string[]; + loincGroups?: string[]; + cptCodes?: string[]; + popularityScore: number; + confidence: number; +} diff --git a/src/api/types/ClientFacingActivity.ts b/src/api/types/ClientFacingActivity.ts index 0f81af1e3..43eea83d5 100644 --- a/src/api/types/ClientFacingActivity.ts +++ b/src/api/types/ClientFacingActivity.ts @@ -36,7 +36,7 @@ export interface ClientFacingActivity { timezoneOffset?: number; /** Heart rate daily summary. */ heartRate?: Vital.ClientFacingHeartRate; - wheelchairUse?: boolean; + wheelchairUse?: true; wheelchairPush?: number; createdAt: Date; updatedAt: Date; diff --git a/src/api/types/ClientFacingAppointment.ts b/src/api/types/ClientFacingAppointment.ts index 91ec73f90..4394deefc 100644 --- a/src/api/types/ClientFacingAppointment.ts +++ b/src/api/types/ClientFacingAppointment.ts @@ -6,6 +6,7 @@ export interface ClientFacingAppointment { id: string; userId: string; orderId: string; + orderTransactionId?: string; address: Vital.UsAddress; location: Vital.LngLat; /** Time is in UTC */ @@ -13,12 +14,17 @@ export interface ClientFacingAppointment { /** Time is in UTC */ endAt?: Date; ianaTimezone?: string; + /** ℹ️ This enum is non-exhaustive. */ type: Vital.AppointmentType; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.AppointmentProvider; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.AppointmentStatus; providerId: string; externalId?: string; canReschedule: boolean; + appointmentNotes?: string; + /** ℹ️ This enum is non-exhaustive. */ eventStatus: Vital.AppointmentEventStatus; eventData?: Record; events: Vital.ClientFacingAppointmentEvent[]; diff --git a/src/api/types/ClientFacingAppointmentEvent.ts b/src/api/types/ClientFacingAppointmentEvent.ts index 985bb5fc6..96fa1ea15 100644 --- a/src/api/types/ClientFacingAppointmentEvent.ts +++ b/src/api/types/ClientFacingAppointmentEvent.ts @@ -4,6 +4,7 @@ import type * as Vital from "../index.js"; export interface ClientFacingAppointmentEvent { createdAt: Date; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.AppointmentEventStatus; data?: Record; } diff --git a/src/api/types/ClientFacingDeviceSourceType.ts b/src/api/types/ClientFacingDeviceSourceType.ts index d0d0a4d18..da43b1a6b 100644 --- a/src/api/types/ClientFacingDeviceSourceType.ts +++ b/src/api/types/ClientFacingDeviceSourceType.ts @@ -11,6 +11,7 @@ export const ClientFacingDeviceSourceType = { Cuff: "cuff", ManualScan: "manual_scan", Automatic: "automatic", + InsulinPump: "insulin_pump", Scale: "scale", ChestStrap: "chest_strap", Ring: "ring", diff --git a/src/api/types/ClientFacingElectrocardiogram.ts b/src/api/types/ClientFacingElectrocardiogram.ts index eefe650a5..88635f483 100644 --- a/src/api/types/ClientFacingElectrocardiogram.ts +++ b/src/api/types/ClientFacingElectrocardiogram.ts @@ -15,6 +15,7 @@ export interface ClientFacingElectrocardiogram { inconclusiveCause?: Vital.ClientFacingElectrocardiogramInconclusiveCause; algorithmVersion?: string; timeZone?: string; + /** ℹ️ This enum is non-exhaustive. */ sourceProvider: Vital.ClientFacingElectrocardiogramSourceProvider; /** ℹ️ This enum is non-exhaustive. */ sourceType: Vital.ClientFacingElectrocardiogramSourceType; diff --git a/src/api/types/ClientFacingElectrocardiogramSourceProvider.ts b/src/api/types/ClientFacingElectrocardiogramSourceProvider.ts index c51a88944..724d63d6d 100644 --- a/src/api/types/ClientFacingElectrocardiogramSourceProvider.ts +++ b/src/api/types/ClientFacingElectrocardiogramSourceProvider.ts @@ -2,4 +2,7 @@ import type * as Vital from "../index.js"; +/** + * ℹ️ This enum is non-exhaustive. + */ export type ClientFacingElectrocardiogramSourceProvider = Vital.Providers | Vital.Labs; diff --git a/src/api/types/ClientFacingElectrocardiogramSourceType.ts b/src/api/types/ClientFacingElectrocardiogramSourceType.ts index 9683bd8b9..1905593f7 100644 --- a/src/api/types/ClientFacingElectrocardiogramSourceType.ts +++ b/src/api/types/ClientFacingElectrocardiogramSourceType.ts @@ -11,6 +11,7 @@ export const ClientFacingElectrocardiogramSourceType = { Cuff: "cuff", ManualScan: "manual_scan", Automatic: "automatic", + InsulinPump: "insulin_pump", Scale: "scale", ChestStrap: "chest_strap", Ring: "ring", diff --git a/src/api/types/ClientFacingInsulinInjectionSample.ts b/src/api/types/ClientFacingInsulinInjectionSample.ts index 1dd6b92d6..4f9c336cb 100644 --- a/src/api/types/ClientFacingInsulinInjectionSample.ts +++ b/src/api/types/ClientFacingInsulinInjectionSample.ts @@ -7,7 +7,7 @@ export interface ClientFacingInsulinInjectionSample { id?: number; /** Time zone UTC offset in seconds. Positive offset indicates east of UTC; negative offset indicates west of UTC; and null indicates the time zone information is unavailable at source. */ timezoneOffset?: number; - /** The type of insulin injection. ℹ️ This enum is non-exhaustive. */ + /** The insulin formulation type. ℹ️ This enum is non-exhaustive. */ type: Vital.ClientFacingInsulinInjectionSampleType; unit: "unit"; /** Depracated. The start time (inclusive) of the interval. */ @@ -18,4 +18,10 @@ export interface ClientFacingInsulinInjectionSample { end: Date; /** The recorded value for the interval. */ value: number; + /** How the insulin was delivered. ℹ️ This enum is non-exhaustive. */ + deliveryMode?: Vital.ClientFacingInsulinInjectionSampleDeliveryMode; + /** For bolus deliveries, whether the dose was standard or extended. ℹ️ This enum is non-exhaustive. */ + deliveryForm?: Vital.ClientFacingInsulinInjectionSampleDeliveryForm; + /** For bolus deliveries, what the bolus was intended for. ℹ️ This enum is non-exhaustive. */ + bolusPurpose?: Vital.ClientFacingInsulinInjectionSampleBolusPurpose; } diff --git a/src/api/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts b/src/api/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts new file mode 100644 index 000000000..5566c0b7b --- /dev/null +++ b/src/api/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ClientFacingInsulinInjectionSampleBolusPurpose = { + Meal: "meal", + Correction: "correction", + Mixed: "mixed", + Unknown: "unknown", +} as const; +export type ClientFacingInsulinInjectionSampleBolusPurpose = + (typeof ClientFacingInsulinInjectionSampleBolusPurpose)[keyof typeof ClientFacingInsulinInjectionSampleBolusPurpose]; diff --git a/src/api/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts b/src/api/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts new file mode 100644 index 000000000..f0c206e68 --- /dev/null +++ b/src/api/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ClientFacingInsulinInjectionSampleDeliveryForm = { + Standard: "standard", + Extended: "extended", +} as const; +export type ClientFacingInsulinInjectionSampleDeliveryForm = + (typeof ClientFacingInsulinInjectionSampleDeliveryForm)[keyof typeof ClientFacingInsulinInjectionSampleDeliveryForm]; diff --git a/src/api/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts b/src/api/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts new file mode 100644 index 000000000..0576f7f27 --- /dev/null +++ b/src/api/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ClientFacingInsulinInjectionSampleDeliveryMode = { + Basal: "basal", + Bolus: "bolus", +} as const; +export type ClientFacingInsulinInjectionSampleDeliveryMode = + (typeof ClientFacingInsulinInjectionSampleDeliveryMode)[keyof typeof ClientFacingInsulinInjectionSampleDeliveryMode]; diff --git a/src/api/types/ClientFacingInsulinInjectionSampleType.ts b/src/api/types/ClientFacingInsulinInjectionSampleType.ts index 6ae507cab..852a475a3 100644 --- a/src/api/types/ClientFacingInsulinInjectionSampleType.ts +++ b/src/api/types/ClientFacingInsulinInjectionSampleType.ts @@ -1,6 +1,6 @@ // This file was auto-generated by Fern from our API Definition. -/** The type of insulin injection. ℹ️ This enum is non-exhaustive. */ +/** The insulin formulation type. ℹ️ This enum is non-exhaustive. */ export const ClientFacingInsulinInjectionSampleType = { RapidActing: "rapid_acting", LongActing: "long_acting", diff --git a/src/api/types/ClientFacingInsurance.ts b/src/api/types/ClientFacingInsurance.ts index 043c8ca45..55339817e 100644 --- a/src/api/types/ClientFacingInsurance.ts +++ b/src/api/types/ClientFacingInsurance.ts @@ -5,6 +5,7 @@ import type * as Vital from "../index.js"; export interface ClientFacingInsurance { memberId: string; payorCode: string; + /** ℹ️ This enum is non-exhaustive. */ relationship: Vital.ResponsibleRelationship; insured: Vital.VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails; company: Vital.CompanyDetails; diff --git a/src/api/types/ClientFacingLabAccount.ts b/src/api/types/ClientFacingLabAccount.ts new file mode 100644 index 000000000..0e3d24040 --- /dev/null +++ b/src/api/types/ClientFacingLabAccount.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface ClientFacingLabAccount { + id: string; + /** ℹ️ This enum is non-exhaustive. */ + lab: Vital.Labs; + orgId?: string; + /** ℹ️ This enum is non-exhaustive. */ + status: Vital.LabAccountStatus; + /** ℹ️ This enum is non-exhaustive. */ + delegatedFlow: Vital.LabAccountDelegatedFlow; + providerAccountId: string; + accountName?: string; + defaultClinicalNotes?: string; + businessUnits?: string[]; + allowedBilling: Record; + teamIdAllowlist: string[]; +} diff --git a/src/api/types/ClientFacingLabReportParsingJobCreatedEvent.ts b/src/api/types/ClientFacingLabReportParsingJobCreatedEvent.ts new file mode 100644 index 000000000..8a4ef99b9 --- /dev/null +++ b/src/api/types/ClientFacingLabReportParsingJobCreatedEvent.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface ClientFacingLabReportParsingJobCreatedEvent { + eventType: "lab_report.parsing_job.created"; + userId: string; + clientUserId: string; + teamId: string; + data: Vital.ParsingJob; +} diff --git a/src/api/types/ClientFacingLabReportParsingJobUpdatedEvent.ts b/src/api/types/ClientFacingLabReportParsingJobUpdatedEvent.ts new file mode 100644 index 000000000..43afb7978 --- /dev/null +++ b/src/api/types/ClientFacingLabReportParsingJobUpdatedEvent.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface ClientFacingLabReportParsingJobUpdatedEvent { + eventType: "lab_report.parsing_job.updated"; + userId: string; + clientUserId: string; + teamId: string; + data: Vital.ParsingJob; +} diff --git a/src/api/types/ClientFacingLabTest.ts b/src/api/types/ClientFacingLabTest.ts index aaada6724..9fef5b0f2 100644 --- a/src/api/types/ClientFacingLabTest.ts +++ b/src/api/types/ClientFacingLabTest.ts @@ -6,11 +6,14 @@ export interface ClientFacingLabTest { id: string; slug: string; name: string; + /** ℹ️ This enum is non-exhaustive. */ sampleType: Vital.LabTestSampleType; + /** ℹ️ This enum is non-exhaustive. */ method: Vital.LabTestCollectionMethod; price: number; /** Deprecated. Use status instead. */ isActive: boolean; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.LabTestStatus; /** Defines whether a lab test requires fasting. */ fasting?: boolean; diff --git a/src/api/types/ClientFacingLabs.ts b/src/api/types/ClientFacingLabs.ts index 6d472026d..cb48affd4 100644 --- a/src/api/types/ClientFacingLabs.ts +++ b/src/api/types/ClientFacingLabs.ts @@ -5,5 +5,6 @@ export const ClientFacingLabs = { Quest: "quest", Labcorp: "labcorp", Bioreference: "bioreference", + SonoraQuest: "sonora_quest", } as const; export type ClientFacingLabs = (typeof ClientFacingLabs)[keyof typeof ClientFacingLabs]; diff --git a/src/api/types/ClientFacingMarker.ts b/src/api/types/ClientFacingMarker.ts index 7528515b5..6be4f5e32 100644 --- a/src/api/types/ClientFacingMarker.ts +++ b/src/api/types/ClientFacingMarker.ts @@ -9,6 +9,7 @@ export interface ClientFacingMarker { description?: string; labId?: number; providerId?: string; + /** ℹ️ This enum is non-exhaustive. */ type?: Vital.MarkerType; unit?: string; price?: string; diff --git a/src/api/types/ClientFacingMarkerComplete.ts b/src/api/types/ClientFacingMarkerComplete.ts index db07bf4dc..11d2cbead 100644 --- a/src/api/types/ClientFacingMarkerComplete.ts +++ b/src/api/types/ClientFacingMarkerComplete.ts @@ -9,6 +9,7 @@ export interface ClientFacingMarkerComplete { description?: string; labId?: number; providerId?: string; + /** ℹ️ This enum is non-exhaustive. */ type?: Vital.MarkerType; unit?: string; price?: string; diff --git a/src/api/types/ClientFacingMenstrualCycle.ts b/src/api/types/ClientFacingMenstrualCycle.ts index 214421f62..7af2d352a 100644 --- a/src/api/types/ClientFacingMenstrualCycle.ts +++ b/src/api/types/ClientFacingMenstrualCycle.ts @@ -18,6 +18,7 @@ export interface ClientFacingMenstrualCycle { homeProgesteroneTest?: Vital.HomeProgesteroneTestEntry[]; sexualActivity?: Vital.SexualActivityEntry[]; basalBodyTemperature?: Vital.BasalBodyTemperatureEntry[]; + /** ℹ️ This enum is non-exhaustive. */ sourceProvider: Vital.ClientFacingMenstrualCycleSourceProvider; /** ℹ️ This enum is non-exhaustive. */ sourceType: Vital.ClientFacingMenstrualCycleSourceType; diff --git a/src/api/types/ClientFacingMenstrualCycleSourceProvider.ts b/src/api/types/ClientFacingMenstrualCycleSourceProvider.ts index 8916262f5..2f02e6683 100644 --- a/src/api/types/ClientFacingMenstrualCycleSourceProvider.ts +++ b/src/api/types/ClientFacingMenstrualCycleSourceProvider.ts @@ -2,4 +2,7 @@ import type * as Vital from "../index.js"; +/** + * ℹ️ This enum is non-exhaustive. + */ export type ClientFacingMenstrualCycleSourceProvider = Vital.Providers | Vital.Labs; diff --git a/src/api/types/ClientFacingMenstrualCycleSourceType.ts b/src/api/types/ClientFacingMenstrualCycleSourceType.ts index cc24aecc6..d3a1ebe7d 100644 --- a/src/api/types/ClientFacingMenstrualCycleSourceType.ts +++ b/src/api/types/ClientFacingMenstrualCycleSourceType.ts @@ -11,6 +11,7 @@ export const ClientFacingMenstrualCycleSourceType = { Cuff: "cuff", ManualScan: "manual_scan", Automatic: "automatic", + InsulinPump: "insulin_pump", Scale: "scale", ChestStrap: "chest_strap", Ring: "ring", diff --git a/src/api/types/ClientFacingOrder.ts b/src/api/types/ClientFacingOrder.ts index bf04b18c5..dc4aac744 100644 --- a/src/api/types/ClientFacingOrder.ts +++ b/src/api/types/ClientFacingOrder.ts @@ -20,12 +20,16 @@ export interface ClientFacingOrder { sampleId?: string; /** Notes associated with the order */ notes?: string; + clinicalNotes?: string; /** When your order was created */ createdAt: Date; /** When your order was last updated. */ updatedAt: Date; events: Vital.ClientFacingOrderEvent[]; + /** The top-level status of the latest event for this order. This field is deprecated. Please use `last_event` instead. ℹ️ This enum is non-exhaustive. */ status?: Vital.OrderTopLevelStatus; + /** The latest event in the order's lifecycle. */ + lastEvent: Vital.ClientFacingOrderEvent; physician?: Vital.ClientFacingPhysician; /** Vital ID of the health insurance. */ healthInsuranceId?: string; @@ -38,11 +42,12 @@ export interface ClientFacingOrder { /** Schedule an Order to be processed in a future date. */ activateBy?: string; passthrough?: string; + /** ℹ️ This enum is non-exhaustive. */ billingType?: Vital.Billing; icdCodes?: string[]; /** Defines whether the order has an Advanced Beneficiary Notice (ABN) form or not. */ hasAbn: boolean; - /** Interpretation of the order result. Can be one of (normal, abnormal, critical). */ + /** Interpretation of the order result. Can be one of (normal, abnormal, critical). ℹ️ This enum is non-exhaustive. */ interpretation?: Vital.Interpretation; /** Defines whether the order result has missing biomarkers. */ hasMissingResults?: boolean; @@ -50,4 +55,7 @@ export interface ClientFacingOrder { expectedResultByDate?: string; /** The latest date by which the order result is expected to be available. */ worstCaseResultByDate?: string; + /** ℹ️ This enum is non-exhaustive. */ + origin?: Vital.OrderOrigin; + orderTransaction?: Vital.ClientFacingOrderTransaction; } diff --git a/src/api/types/ClientFacingOrderEvent.ts b/src/api/types/ClientFacingOrderEvent.ts index 5e8b1d0b9..0559c6497 100644 --- a/src/api/types/ClientFacingOrderEvent.ts +++ b/src/api/types/ClientFacingOrderEvent.ts @@ -5,5 +5,8 @@ import type * as Vital from "../index.js"; export interface ClientFacingOrderEvent { id: number; createdAt: Date; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.OrderStatus; + /** ℹ️ This enum is non-exhaustive. */ + statusDetail?: Vital.OrderStatusDetail; } diff --git a/src/api/types/ClientFacingOrderInTransaction.ts b/src/api/types/ClientFacingOrderInTransaction.ts new file mode 100644 index 000000000..d7688e78e --- /dev/null +++ b/src/api/types/ClientFacingOrderInTransaction.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +/** + * Minimal order info for embedding in order_transaction payload. + */ +export interface ClientFacingOrderInTransaction { + id: string; + /** ℹ️ This enum is non-exhaustive. */ + lowLevelStatus?: Vital.OrderLowLevelStatus; + lowLevelStatusCreatedAt?: Date; + /** ℹ️ This enum is non-exhaustive. */ + origin?: Vital.OrderOrigin; + parentId?: string; + createdAt: Date; + updatedAt: Date; +} diff --git a/src/api/types/ClientFacingOrderTransaction.ts b/src/api/types/ClientFacingOrderTransaction.ts new file mode 100644 index 000000000..66fe3486d --- /dev/null +++ b/src/api/types/ClientFacingOrderTransaction.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +/** + * Order transaction info. + */ +export interface ClientFacingOrderTransaction { + id: string; + /** ℹ️ This enum is non-exhaustive. */ + status: Vital.OrderTransactionStatus; + orders: Vital.ClientFacingOrderInTransaction[]; +} diff --git a/src/api/types/ClientFacingPatientDetailsCompatible.ts b/src/api/types/ClientFacingPatientDetailsCompatible.ts index 94840313e..1b85c8e5f 100644 --- a/src/api/types/ClientFacingPatientDetailsCompatible.ts +++ b/src/api/types/ClientFacingPatientDetailsCompatible.ts @@ -11,12 +11,12 @@ export interface ClientFacingPatientDetailsCompatible { email?: string; /** Parent/medical_proxy details. Required if patient is a minor. */ medicalProxy?: Vital.GuarantorDetails; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ race?: Vital.Race; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ ethnicity?: Vital.Ethnicity; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ sexualOrientation?: Vital.SexualOrientation; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ genderIdentity?: Vital.GenderIdentity; } diff --git a/src/api/types/ClientFacingPayor.ts b/src/api/types/ClientFacingPayor.ts index 83a31e95d..a9b85c0a8 100644 --- a/src/api/types/ClientFacingPayor.ts +++ b/src/api/types/ClientFacingPayor.ts @@ -11,6 +11,6 @@ export interface ClientFacingPayor { aliases: string[]; /** Insurance business address returned for the insurance information. */ orgAddress: Vital.Address; - /** The source of the payor, can be one of (platform, team). */ + /** The source of the payor, can be one of (platform, team). ℹ️ This enum is non-exhaustive. */ source: Vital.ClientFacingPayorCodeSource; } diff --git a/src/api/types/ClientFacingPayorSearchResponse.ts b/src/api/types/ClientFacingPayorSearchResponse.ts index 5921a0348..31ad7efa6 100644 --- a/src/api/types/ClientFacingPayorSearchResponse.ts +++ b/src/api/types/ClientFacingPayorSearchResponse.ts @@ -11,6 +11,6 @@ export interface ClientFacingPayorSearchResponse { aliases: string[]; /** Insurance business address returned for the insurance information. */ orgAddress: Vital.Address; - /** The source of the payor, can be one of (platform, team). */ + /** The source of the payor, can be one of (platform, team). ℹ️ This enum is non-exhaustive. */ source: Vital.ClientFacingPayorCodeSource; } diff --git a/src/api/types/ClientFacingPayorSearchResponseDeprecated.ts b/src/api/types/ClientFacingPayorSearchResponseDeprecated.ts index ca0dbecee..c32cd7172 100644 --- a/src/api/types/ClientFacingPayorSearchResponseDeprecated.ts +++ b/src/api/types/ClientFacingPayorSearchResponseDeprecated.ts @@ -11,6 +11,6 @@ export interface ClientFacingPayorSearchResponseDeprecated { aliases: string[]; /** Insurance business address returned for the insurance information. */ orgAddress: Vital.Address; - /** The source of the payor, can be one of (platform, team). */ + /** The source of the payor, can be one of (platform, team). ℹ️ This enum is non-exhaustive. */ source: Vital.ClientFacingPayorCodeSource; } diff --git a/src/api/types/ClientFacingProfile.ts b/src/api/types/ClientFacingProfile.ts index a2338b83e..c7f02660d 100644 --- a/src/api/types/ClientFacingProfile.ts +++ b/src/api/types/ClientFacingProfile.ts @@ -8,8 +8,10 @@ export interface ClientFacingProfile { userId: string; height?: number; birthDate?: string; - wheelchairUse?: boolean; + wheelchairUse?: true; + /** ℹ️ This enum is non-exhaustive. */ gender?: Vital.Gender; + /** ℹ️ This enum is non-exhaustive. */ sex?: Vital.Sex; source: Vital.ClientFacingSource; createdAt: Date; diff --git a/src/api/types/ClientFacingProviderDetailed.ts b/src/api/types/ClientFacingProviderDetailed.ts index 9d039fc23..84ee13d2c 100644 --- a/src/api/types/ClientFacingProviderDetailed.ts +++ b/src/api/types/ClientFacingProviderDetailed.ts @@ -11,6 +11,7 @@ export interface ClientFacingProviderDetailed { description: string; /** URL for source logo */ logo?: string; + /** ℹ️ This enum is non-exhaustive. */ authType?: Vital.SourceAuthType; supportedResources?: Vital.ClientFacingResource[]; } diff --git a/src/api/types/ClientFacingResource.ts b/src/api/types/ClientFacingResource.ts index dc88e2ff6..5c7811fae 100644 --- a/src/api/types/ClientFacingResource.ts +++ b/src/api/types/ClientFacingResource.ts @@ -11,6 +11,7 @@ export const ClientFacingResource = { Connection: "connection", Order: "order", Result: "result", + MatchReview: "match_review", Appointment: "appointment", Glucose: "glucose", Heartrate: "heartrate", diff --git a/src/api/types/ClientFacingSleep.ts b/src/api/types/ClientFacingSleep.ts index a9c95e829..55480a7d1 100644 --- a/src/api/types/ClientFacingSleep.ts +++ b/src/api/types/ClientFacingSleep.ts @@ -19,6 +19,7 @@ export interface ClientFacingSleep { * `short_sleep`: <3 hours of sleep; * `acknowledged_nap`: User-acknowledged naps, typically under 3 hours of sleep; * `unknown`: The sleep session recording is ongoing. + * ℹ️ This enum is non-exhaustive. */ type: Vital.SleepType; /** Timezone offset from UTC as seconds. For example, EEST (Eastern European Summer Time, +3h) is 10800. PST (Pacific Standard Time, -8h) is -28800::seconds */ @@ -37,6 +38,8 @@ export interface ClientFacingSleep { deep: number; /** A value between 1 and 100 representing how well the user slept. Currently only available for Withings, Oura, Whoop and Garmin::scalar */ score?: number; + /** A value between 0 and 100 representing the provider's recovery/readiness proxy. Currently sourced from Oura readiness score, Whoop recovery score, and Ultrahuman recovery::scalar */ + recoveryReadinessScore?: number; /** The lowest heart rate (5 minutes sliding average) registered during the sleep period::beats per minute */ hrLowest?: number; /** The average heart rate registered during the sleep period::beats per minute */ @@ -53,7 +56,7 @@ export interface ClientFacingSleep { skinTemperature?: number; /** Sleeping Heart Rate Dip is the percentage difference between your average waking heart rate and your average sleeping heart rate. In health studies, a greater "dip" is typically seen as a positive indicator of overall health. Currently only available for Garmin::perc */ hrDip?: number; - /** Some providers can provide updates to the sleep summary hours after the sleep period has ended. This field indicates the state of the sleep summary. For example, TENTATIVE means the summary is an intial prediction from the provider and can be subject to change. Currently only available for Garmin and EightSleep::str */ + /** Some providers can provide updates to the sleep summary hours after the sleep period has ended. This field indicates the state of the sleep summary. For example, TENTATIVE means the summary is an intial prediction from the provider and can be subject to change. Currently only available for Garmin and EightSleep::str ℹ️ This enum is non-exhaustive. */ state?: Vital.SleepSummaryState; /** The average heart rate variability registered during the sleep period::rmssd */ averageHrv?: number; diff --git a/src/api/types/ClientFacingSleepCycle.ts b/src/api/types/ClientFacingSleepCycle.ts index b077cc964..19c41955e 100644 --- a/src/api/types/ClientFacingSleepCycle.ts +++ b/src/api/types/ClientFacingSleepCycle.ts @@ -20,6 +20,7 @@ export interface ClientFacingSleepCycle { */ stageType: Vital.VitalSleepStage[]; timeZone?: string; + /** ℹ️ This enum is non-exhaustive. */ sourceProvider: Vital.ClientFacingSleepCycleSourceProvider; /** ℹ️ This enum is non-exhaustive. */ sourceType: Vital.ClientFacingSleepCycleSourceType; diff --git a/src/api/types/ClientFacingSleepCycleSourceProvider.ts b/src/api/types/ClientFacingSleepCycleSourceProvider.ts index f0dfbba50..029abaf1e 100644 --- a/src/api/types/ClientFacingSleepCycleSourceProvider.ts +++ b/src/api/types/ClientFacingSleepCycleSourceProvider.ts @@ -2,4 +2,7 @@ import type * as Vital from "../index.js"; +/** + * ℹ️ This enum is non-exhaustive. + */ export type ClientFacingSleepCycleSourceProvider = Vital.Providers | Vital.Labs; diff --git a/src/api/types/ClientFacingSleepCycleSourceType.ts b/src/api/types/ClientFacingSleepCycleSourceType.ts index a2f866fb3..e2c17f92d 100644 --- a/src/api/types/ClientFacingSleepCycleSourceType.ts +++ b/src/api/types/ClientFacingSleepCycleSourceType.ts @@ -11,6 +11,7 @@ export const ClientFacingSleepCycleSourceType = { Cuff: "cuff", ManualScan: "manual_scan", Automatic: "automatic", + InsulinPump: "insulin_pump", Scale: "scale", ChestStrap: "chest_strap", Ring: "ring", diff --git a/src/api/types/ClientFacingTeam.ts b/src/api/types/ClientFacingTeam.ts index 8c26bc93d..bf5918e1b 100644 --- a/src/api/types/ClientFacingTeam.ts +++ b/src/api/types/ClientFacingTeam.ts @@ -26,6 +26,7 @@ export interface ClientFacingTeam { labTestsPatientSmsCommunicationEnabled: boolean; labTestsPatientEmailCommunicationEnabled: boolean; logoUrl?: string; + /** ℹ️ This enum is non-exhaustive. */ delegatedFlow: Vital.DelegatedFlowType; criticalResultNotificationEmail?: string; } diff --git a/src/api/types/CompendiumSearchLabs.ts b/src/api/types/CompendiumSearchLabs.ts new file mode 100644 index 000000000..063a9bb64 --- /dev/null +++ b/src/api/types/CompendiumSearchLabs.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const CompendiumSearchLabs = { + Labcorp: "labcorp", + Quest: "quest", + Bioreference: "bioreference", + SonoraQuest: "sonora_quest", +} as const; +export type CompendiumSearchLabs = (typeof CompendiumSearchLabs)[keyof typeof CompendiumSearchLabs]; diff --git a/src/api/types/Consent.ts b/src/api/types/Consent.ts index 946cf5aed..9238a0c72 100644 --- a/src/api/types/Consent.ts +++ b/src/api/types/Consent.ts @@ -3,6 +3,7 @@ import type * as Vital from "../index.js"; export interface Consent { + /** ℹ️ This enum is non-exhaustive. */ consentType: Vital.ConsentType; version?: string; timeOfConsent?: Date; diff --git a/src/api/types/ContinuousQueryTaskHistoryEntry.ts b/src/api/types/ContinuousQueryTaskHistoryEntry.ts index 3ac82b238..b373a3782 100644 --- a/src/api/types/ContinuousQueryTaskHistoryEntry.ts +++ b/src/api/types/ContinuousQueryTaskHistoryEntry.ts @@ -5,6 +5,7 @@ import type * as Vital from "../index.js"; export interface ContinuousQueryTaskHistoryEntry { queryId: string; userId: string; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.ContinuousQueryTaskStatus; scheduledAt: Date; startedAt?: Date; diff --git a/src/api/types/ContinuousQueryTaskStatus.ts b/src/api/types/ContinuousQueryTaskStatus.ts index e5daf73e2..e74552e59 100644 --- a/src/api/types/ContinuousQueryTaskStatus.ts +++ b/src/api/types/ContinuousQueryTaskStatus.ts @@ -6,5 +6,6 @@ export const ContinuousQueryTaskStatus = { Started: "started", Completed: "completed", Error: "error", + Skipped: "skipped", } as const; export type ContinuousQueryTaskStatus = (typeof ContinuousQueryTaskStatus)[keyof typeof ContinuousQueryTaskStatus]; diff --git a/src/api/types/ConvertCompendiumResponse.ts b/src/api/types/ConvertCompendiumResponse.ts new file mode 100644 index 000000000..8458bbd4c --- /dev/null +++ b/src/api/types/ConvertCompendiumResponse.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface ConvertCompendiumResponse { + sourceLabTestId?: string; + sourceLabId?: number; + targetLabId: number; + targetLabSlug: string; + sourceProviderIds?: string[]; + convertedProviderIds?: string[]; + unresolvedProviderIds?: string[]; + bySourceProviderId?: Record; +} diff --git a/src/api/types/DerivedReadinessColumnExpr.ts b/src/api/types/DerivedReadinessColumnExpr.ts new file mode 100644 index 000000000..b93be8dcf --- /dev/null +++ b/src/api/types/DerivedReadinessColumnExpr.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface DerivedReadinessColumnExpr { + /** ℹ️ This enum is non-exhaustive. */ + derivedReadiness: Vital.DerivedReadinessColumnExprDerivedReadiness; +} diff --git a/src/api/types/DerivedReadinessColumnExprDerivedReadiness.ts b/src/api/types/DerivedReadinessColumnExprDerivedReadiness.ts new file mode 100644 index 000000000..9a5760ae5 --- /dev/null +++ b/src/api/types/DerivedReadinessColumnExprDerivedReadiness.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const DerivedReadinessColumnExprDerivedReadiness = { + Date: "date", + Chronotype: "chronotype", + SleepScore: "sleep_score", + RecoveryScore: "recovery_score", + RecoveryZone: "recovery_zone", + StressScore: "stress_score", + StrainScore: "strain_score", + StrainZone: "strain_zone", +} as const; +export type DerivedReadinessColumnExprDerivedReadiness = + (typeof DerivedReadinessColumnExprDerivedReadiness)[keyof typeof DerivedReadinessColumnExprDerivedReadiness]; diff --git a/src/api/types/ElementFieldExpr.ts b/src/api/types/ElementFieldExpr.ts new file mode 100644 index 000000000..3d1c4eaf7 --- /dev/null +++ b/src/api/types/ElementFieldExpr.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * References the element itself in a scalar-element list subquery arg. + * + * Symmetric with the reserved ``element`` keyword in WHERE predicates. + * Only valid when the UNNEST source is a ``List[scalar]``. + */ +export interface ElementFieldExpr { + element: true; +} diff --git a/src/api/types/GetOrderTransactionResponse.ts b/src/api/types/GetOrderTransactionResponse.ts new file mode 100644 index 000000000..7ad738c16 --- /dev/null +++ b/src/api/types/GetOrderTransactionResponse.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface GetOrderTransactionResponse { + id: string; + teamId: string; + /** ℹ️ This enum is non-exhaustive. */ + status: Vital.OrderTransactionStatus; + orders?: Vital.OrderSummary[]; +} diff --git a/src/api/types/GetTeamLabAccountsResponse.ts b/src/api/types/GetTeamLabAccountsResponse.ts new file mode 100644 index 000000000..1389516a1 --- /dev/null +++ b/src/api/types/GetTeamLabAccountsResponse.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface GetTeamLabAccountsResponse { + data?: Vital.ClientFacingLabAccount[]; +} diff --git a/src/api/types/HealthInsuranceCreateRequest.ts b/src/api/types/HealthInsuranceCreateRequest.ts index 059634530..19748e743 100644 --- a/src/api/types/HealthInsuranceCreateRequest.ts +++ b/src/api/types/HealthInsuranceCreateRequest.ts @@ -17,7 +17,7 @@ export interface HealthInsuranceCreateRequest { payorCode?: string; /** Insurance unique number assigned to a patient, usually present on the insurance card. */ insuranceId?: string; - /** Relationship between the patient and the insurance contractor. Values can be (Self, Spouse, Other Relationship). */ + /** Relationship between the patient and the insurance contractor. Values can be (Self, Spouse, Other Relationship). ℹ️ This enum is non-exhaustive. */ responsibleRelationship?: Vital.ResponsibleRelationship; /** Responsible details when the value of responsible_relationship is not 'Self'. */ responsibleDetails?: Vital.VitalCoreSchemasDbSchemasLabTestHealthInsurancePersonDetails; diff --git a/src/api/types/HistoricalPullCompleted.ts b/src/api/types/HistoricalPullCompleted.ts index 9a31bc768..78fdd0a4c 100644 --- a/src/api/types/HistoricalPullCompleted.ts +++ b/src/api/types/HistoricalPullCompleted.ts @@ -4,6 +4,6 @@ export interface HistoricalPullCompleted { userId: string; startDate: Date; endDate: Date; - isFinal: boolean; + isFinal: true; provider: string; } diff --git a/src/api/types/IndexColumnExprIndex.ts b/src/api/types/IndexColumnExprIndex.ts index dc2510478..a1392effb 100644 --- a/src/api/types/IndexColumnExprIndex.ts +++ b/src/api/types/IndexColumnExprIndex.ts @@ -3,10 +3,12 @@ /** ℹ️ This enum is non-exhaustive. */ export const IndexColumnExprIndex = { Sleep: "sleep", + DerivedReadiness: "derived_readiness", Activity: "activity", Workout: "workout", Body: "body", Meal: "meal", + MenstrualCycle: "menstrual_cycle", Profile: "profile", Timeseries: "timeseries", } as const; diff --git a/src/api/types/InsulinInjectionTimeseriesExpr.ts b/src/api/types/InsulinInjectionTimeseriesExpr.ts new file mode 100644 index 000000000..a1e162b22 --- /dev/null +++ b/src/api/types/InsulinInjectionTimeseriesExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface InsulinInjectionTimeseriesExpr { + timeseries: "insulin_injection"; + /** ℹ️ This enum is non-exhaustive. */ + field: Vital.InsulinInjectionTimeseriesExprField; +} diff --git a/src/api/types/InsulinInjectionTimeseriesExprField.ts b/src/api/types/InsulinInjectionTimeseriesExprField.ts new file mode 100644 index 000000000..ee127599b --- /dev/null +++ b/src/api/types/InsulinInjectionTimeseriesExprField.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const InsulinInjectionTimeseriesExprField = { + SourceProvider: "source_provider", + SourceType: "source_type", + SourceAppId: "source_app_id", + SourceWorkoutId: "source_workout_id", + SourceSport: "source_sport", + TimezoneOffset: "timezone_offset", + Type: "type", + Duration: "duration", + Value: "value", + DeliveryMode: "delivery_mode", + DeliveryForm: "delivery_form", + BolusPurpose: "bolus_purpose", +} as const; +export type InsulinInjectionTimeseriesExprField = + (typeof InsulinInjectionTimeseriesExprField)[keyof typeof InsulinInjectionTimeseriesExprField]; diff --git a/src/api/types/IntervalTimeseriesExprTimeseries.ts b/src/api/types/IntervalTimeseriesExprTimeseries.ts index 95ac47fc5..d20e8f0de 100644 --- a/src/api/types/IntervalTimeseriesExprTimeseries.ts +++ b/src/api/types/IntervalTimeseriesExprTimeseries.ts @@ -8,7 +8,6 @@ export const IntervalTimeseriesExprTimeseries = { HeartRateAlert: "heart_rate_alert", StandHour: "stand_hour", SleepBreathingDisturbance: "sleep_breathing_disturbance", - InsulinInjection: "insulin_injection", Water: "water", Caffeine: "caffeine", MindfulnessMinutes: "mindfulness_minutes", diff --git a/src/api/types/LabAccountDelegatedFlow.ts b/src/api/types/LabAccountDelegatedFlow.ts new file mode 100644 index 000000000..235eeb6d7 --- /dev/null +++ b/src/api/types/LabAccountDelegatedFlow.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Describes which parts of the lab testing flow are delegated to the customer. + * + * - ORDER_DELEGATED: Ordering using client's physicians, critical result follow up via Junction + * - RESULT_DELEGATED: Ordering using Junction's Physician Network, critical results handled by client + * - FULLY_DELEGATED: Order and critical results handled by client + * - NOT_DELEGATED: Junction handles both ordering and results ℹ️ This enum is non-exhaustive. + */ +export const LabAccountDelegatedFlow = { + OrderDelegated: "order_delegated", + ResultDelegated: "result_delegated", + FullyDelegated: "fully_delegated", + NotDelegated: "not_delegated", +} as const; +export type LabAccountDelegatedFlow = (typeof LabAccountDelegatedFlow)[keyof typeof LabAccountDelegatedFlow]; diff --git a/src/api/types/LabAccountStatus.ts b/src/api/types/LabAccountStatus.ts new file mode 100644 index 000000000..7ecef1cce --- /dev/null +++ b/src/api/types/LabAccountStatus.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const LabAccountStatus = { + Active: "active", + Pending: "pending", + Suspended: "suspended", + ReadyToLaunch: "ready_to_launch", +} as const; +export type LabAccountStatus = (typeof LabAccountStatus)[keyof typeof LabAccountStatus]; diff --git a/src/api/types/LabReportResult.ts b/src/api/types/LabReportResult.ts index 763eb4e15..81ec9e719 100644 --- a/src/api/types/LabReportResult.ts +++ b/src/api/types/LabReportResult.ts @@ -5,12 +5,14 @@ import type * as Vital from "../index.js"; export interface LabReportResult { testName: string; value: string; + /** ℹ️ This enum is non-exhaustive. */ type?: Vital.LabReportResultType; units?: string; maxReferenceRange?: number; minReferenceRange?: number; sourcePanelName?: string; loincMatches?: Vital.LoincMatch[]; + /** ℹ️ This enum is non-exhaustive. */ interpretation?: Vital.Interpretation; isAboveMaxRange?: boolean; isBelowMinRange?: boolean; diff --git a/src/api/types/LabResultsRaw.ts b/src/api/types/LabResultsRaw.ts index ed03f06b1..dae4bc5f9 100644 --- a/src/api/types/LabResultsRaw.ts +++ b/src/api/types/LabResultsRaw.ts @@ -7,4 +7,5 @@ export interface LabResultsRaw { results: Vital.LabResultsRawResults; missingResults?: Vital.MissingBiomarkerResult[]; sampleInformation?: Record; + orderTransaction?: Vital.ClientFacingOrderTransaction; } diff --git a/src/api/types/LabTestSampleType.ts b/src/api/types/LabTestSampleType.ts index 741197b31..2f3788354 100644 --- a/src/api/types/LabTestSampleType.ts +++ b/src/api/types/LabTestSampleType.ts @@ -7,5 +7,6 @@ export const LabTestSampleType = { Serum: "serum", Saliva: "saliva", Urine: "urine", + Stool: "stool", } as const; export type LabTestSampleType = (typeof LabTestSampleType)[keyof typeof LabTestSampleType]; diff --git a/src/api/types/Labs.ts b/src/api/types/Labs.ts index 632ce3e2b..e138d4d47 100644 --- a/src/api/types/Labs.ts +++ b/src/api/types/Labs.ts @@ -6,6 +6,7 @@ export const Labs = { Spiriplex: "spiriplex", Ussl: "ussl", Quest: "quest", + SonoraQuest: "sonora_quest", Labcorp: "labcorp", Bioreference: "bioreference", UsBiotek: "us_biotek", @@ -14,5 +15,6 @@ export const Labs = { Ihd: "ihd", Nexus: "nexus", MyUti: "my_uti", + Crl: "crl", } as const; export type Labs = (typeof Labs)[keyof typeof Labs]; diff --git a/src/api/types/LastAttempt.ts b/src/api/types/LastAttempt.ts index dabaf6188..8c24a0b18 100644 --- a/src/api/types/LastAttempt.ts +++ b/src/api/types/LastAttempt.ts @@ -4,5 +4,6 @@ import type * as Vital from "../index.js"; export interface LastAttempt { timestamp: Date; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.AttemptStatus; } diff --git a/src/api/types/ManualProviders.ts b/src/api/types/ManualProviders.ts index 0b279bf2a..65f87cfd6 100644 --- a/src/api/types/ManualProviders.ts +++ b/src/api/types/ManualProviders.ts @@ -11,5 +11,6 @@ export const ManualProviders = { AppleHealthKit: "apple_health_kit", Manual: "manual", HealthConnect: "health_connect", + SamsungHealth: "samsung_health", } as const; export type ManualProviders = (typeof ManualProviders)[keyof typeof ManualProviders]; diff --git a/src/api/types/McBasalBodyTemperatureFieldExpr.ts b/src/api/types/McBasalBodyTemperatureFieldExpr.ts new file mode 100644 index 000000000..2faa7fd5f --- /dev/null +++ b/src/api/types/McBasalBodyTemperatureFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McBasalBodyTemperatureFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + basalBodyTemperature: Vital.McBasalBodyTemperatureFieldExprBasalBodyTemperature; +} diff --git a/src/api/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts b/src/api/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts new file mode 100644 index 000000000..5dd557559 --- /dev/null +++ b/src/api/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McBasalBodyTemperatureFieldExprBasalBodyTemperature = { + Date: "date", + Value: "value", +} as const; +export type McBasalBodyTemperatureFieldExprBasalBodyTemperature = + (typeof McBasalBodyTemperatureFieldExprBasalBodyTemperature)[keyof typeof McBasalBodyTemperatureFieldExprBasalBodyTemperature]; diff --git a/src/api/types/McCervicalMucusFieldExpr.ts b/src/api/types/McCervicalMucusFieldExpr.ts new file mode 100644 index 000000000..44ee6753c --- /dev/null +++ b/src/api/types/McCervicalMucusFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McCervicalMucusFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + cervicalMucus: Vital.McCervicalMucusFieldExprCervicalMucus; +} diff --git a/src/api/types/McCervicalMucusFieldExprCervicalMucus.ts b/src/api/types/McCervicalMucusFieldExprCervicalMucus.ts new file mode 100644 index 000000000..49552c01d --- /dev/null +++ b/src/api/types/McCervicalMucusFieldExprCervicalMucus.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McCervicalMucusFieldExprCervicalMucus = { + Date: "date", + Quality: "quality", +} as const; +export type McCervicalMucusFieldExprCervicalMucus = + (typeof McCervicalMucusFieldExprCervicalMucus)[keyof typeof McCervicalMucusFieldExprCervicalMucus]; diff --git a/src/api/types/McContraceptiveFieldExpr.ts b/src/api/types/McContraceptiveFieldExpr.ts new file mode 100644 index 000000000..f55ebd20d --- /dev/null +++ b/src/api/types/McContraceptiveFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McContraceptiveFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + contraceptive: Vital.McContraceptiveFieldExprContraceptive; +} diff --git a/src/api/types/McContraceptiveFieldExprContraceptive.ts b/src/api/types/McContraceptiveFieldExprContraceptive.ts new file mode 100644 index 000000000..9cd0f422c --- /dev/null +++ b/src/api/types/McContraceptiveFieldExprContraceptive.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McContraceptiveFieldExprContraceptive = { + Date: "date", + Type: "type", +} as const; +export type McContraceptiveFieldExprContraceptive = + (typeof McContraceptiveFieldExprContraceptive)[keyof typeof McContraceptiveFieldExprContraceptive]; diff --git a/src/api/types/McDetectedDeviationsFieldExpr.ts b/src/api/types/McDetectedDeviationsFieldExpr.ts new file mode 100644 index 000000000..4f819d483 --- /dev/null +++ b/src/api/types/McDetectedDeviationsFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McDetectedDeviationsFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + detectedDeviations: Vital.McDetectedDeviationsFieldExprDetectedDeviations; +} diff --git a/src/api/types/McDetectedDeviationsFieldExprDetectedDeviations.ts b/src/api/types/McDetectedDeviationsFieldExprDetectedDeviations.ts new file mode 100644 index 000000000..b9172d233 --- /dev/null +++ b/src/api/types/McDetectedDeviationsFieldExprDetectedDeviations.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McDetectedDeviationsFieldExprDetectedDeviations = { + Date: "date", + Deviation: "deviation", +} as const; +export type McDetectedDeviationsFieldExprDetectedDeviations = + (typeof McDetectedDeviationsFieldExprDetectedDeviations)[keyof typeof McDetectedDeviationsFieldExprDetectedDeviations]; diff --git a/src/api/types/McHomePregnancyTestFieldExpr.ts b/src/api/types/McHomePregnancyTestFieldExpr.ts new file mode 100644 index 000000000..cc5db6f83 --- /dev/null +++ b/src/api/types/McHomePregnancyTestFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McHomePregnancyTestFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + homePregnancyTest: Vital.McHomePregnancyTestFieldExprHomePregnancyTest; +} diff --git a/src/api/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts b/src/api/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts new file mode 100644 index 000000000..6e48b9382 --- /dev/null +++ b/src/api/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McHomePregnancyTestFieldExprHomePregnancyTest = { + Date: "date", + TestResult: "test_result", +} as const; +export type McHomePregnancyTestFieldExprHomePregnancyTest = + (typeof McHomePregnancyTestFieldExprHomePregnancyTest)[keyof typeof McHomePregnancyTestFieldExprHomePregnancyTest]; diff --git a/src/api/types/McHomeProgesteroneTestFieldExpr.ts b/src/api/types/McHomeProgesteroneTestFieldExpr.ts new file mode 100644 index 000000000..a8600df04 --- /dev/null +++ b/src/api/types/McHomeProgesteroneTestFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McHomeProgesteroneTestFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + homeProgesteroneTest: Vital.McHomeProgesteroneTestFieldExprHomeProgesteroneTest; +} diff --git a/src/api/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts b/src/api/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts new file mode 100644 index 000000000..6d96301c0 --- /dev/null +++ b/src/api/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McHomeProgesteroneTestFieldExprHomeProgesteroneTest = { + Date: "date", + TestResult: "test_result", +} as const; +export type McHomeProgesteroneTestFieldExprHomeProgesteroneTest = + (typeof McHomeProgesteroneTestFieldExprHomeProgesteroneTest)[keyof typeof McHomeProgesteroneTestFieldExprHomeProgesteroneTest]; diff --git a/src/api/types/McIntermenstrualBleedingFieldExpr.ts b/src/api/types/McIntermenstrualBleedingFieldExpr.ts new file mode 100644 index 000000000..63f114f57 --- /dev/null +++ b/src/api/types/McIntermenstrualBleedingFieldExpr.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface McIntermenstrualBleedingFieldExpr { + fieldFor?: "menstrual_cycle"; + intermenstrualBleeding: "date"; +} diff --git a/src/api/types/McMenstrualFlowFieldExpr.ts b/src/api/types/McMenstrualFlowFieldExpr.ts new file mode 100644 index 000000000..fa0faab5a --- /dev/null +++ b/src/api/types/McMenstrualFlowFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McMenstrualFlowFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + menstrualFlow: Vital.McMenstrualFlowFieldExprMenstrualFlow; +} diff --git a/src/api/types/McMenstrualFlowFieldExprMenstrualFlow.ts b/src/api/types/McMenstrualFlowFieldExprMenstrualFlow.ts new file mode 100644 index 000000000..25211c9b2 --- /dev/null +++ b/src/api/types/McMenstrualFlowFieldExprMenstrualFlow.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McMenstrualFlowFieldExprMenstrualFlow = { + Date: "date", + Flow: "flow", +} as const; +export type McMenstrualFlowFieldExprMenstrualFlow = + (typeof McMenstrualFlowFieldExprMenstrualFlow)[keyof typeof McMenstrualFlowFieldExprMenstrualFlow]; diff --git a/src/api/types/McOvulationTestFieldExpr.ts b/src/api/types/McOvulationTestFieldExpr.ts new file mode 100644 index 000000000..bef7c21e3 --- /dev/null +++ b/src/api/types/McOvulationTestFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McOvulationTestFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + ovulationTest: Vital.McOvulationTestFieldExprOvulationTest; +} diff --git a/src/api/types/McOvulationTestFieldExprOvulationTest.ts b/src/api/types/McOvulationTestFieldExprOvulationTest.ts new file mode 100644 index 000000000..3a544c997 --- /dev/null +++ b/src/api/types/McOvulationTestFieldExprOvulationTest.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McOvulationTestFieldExprOvulationTest = { + Date: "date", + TestResult: "test_result", +} as const; +export type McOvulationTestFieldExprOvulationTest = + (typeof McOvulationTestFieldExprOvulationTest)[keyof typeof McOvulationTestFieldExprOvulationTest]; diff --git a/src/api/types/McSexualActivityFieldExpr.ts b/src/api/types/McSexualActivityFieldExpr.ts new file mode 100644 index 000000000..8154299e3 --- /dev/null +++ b/src/api/types/McSexualActivityFieldExpr.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface McSexualActivityFieldExpr { + fieldFor?: "menstrual_cycle"; + /** ℹ️ This enum is non-exhaustive. */ + sexualActivity: Vital.McSexualActivityFieldExprSexualActivity; +} diff --git a/src/api/types/McSexualActivityFieldExprSexualActivity.ts b/src/api/types/McSexualActivityFieldExprSexualActivity.ts new file mode 100644 index 000000000..f86c2f3f2 --- /dev/null +++ b/src/api/types/McSexualActivityFieldExprSexualActivity.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const McSexualActivityFieldExprSexualActivity = { + Date: "date", + ProtectionUsed: "protection_used", +} as const; +export type McSexualActivityFieldExprSexualActivity = + (typeof McSexualActivityFieldExprSexualActivity)[keyof typeof McSexualActivityFieldExprSexualActivity]; diff --git a/src/api/types/MenstrualCycleColumnExpr.ts b/src/api/types/MenstrualCycleColumnExpr.ts new file mode 100644 index 000000000..93dea800a --- /dev/null +++ b/src/api/types/MenstrualCycleColumnExpr.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface MenstrualCycleColumnExpr { + /** ℹ️ This enum is non-exhaustive. */ + menstrualCycle: Vital.MenstrualCycleColumnExprMenstrualCycle; +} diff --git a/src/api/types/MenstrualCycleColumnExprMenstrualCycle.ts b/src/api/types/MenstrualCycleColumnExprMenstrualCycle.ts new file mode 100644 index 000000000..0ffb9bf49 --- /dev/null +++ b/src/api/types/MenstrualCycleColumnExprMenstrualCycle.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const MenstrualCycleColumnExprMenstrualCycle = { + PeriodStart: "period_start", + PeriodEnd: "period_end", + CycleEnd: "cycle_end", + IsPredicted: "is_predicted", + MenstrualFlow: "menstrual_flow", + CervicalMucus: "cervical_mucus", + IntermenstrualBleeding: "intermenstrual_bleeding", + Contraceptive: "contraceptive", + DetectedDeviations: "detected_deviations", + OvulationTest: "ovulation_test", + HomePregnancyTest: "home_pregnancy_test", + HomeProgesteroneTest: "home_progesterone_test", + SexualActivity: "sexual_activity", + BasalBodyTemperature: "basal_body_temperature", + SourceType: "source_type", + SourceProvider: "source_provider", + SourceAppId: "source_app_id", + SourceDeviceId: "source_device_id", +} as const; +export type MenstrualCycleColumnExprMenstrualCycle = + (typeof MenstrualCycleColumnExprMenstrualCycle)[keyof typeof MenstrualCycleColumnExprMenstrualCycle]; diff --git a/src/api/types/MissingBiomarkerResult.ts b/src/api/types/MissingBiomarkerResult.ts index e255f40a0..8e0232d8e 100644 --- a/src/api/types/MissingBiomarkerResult.ts +++ b/src/api/types/MissingBiomarkerResult.ts @@ -5,6 +5,7 @@ import type * as Vital from "../index.js"; export interface MissingBiomarkerResult { name: string; slug: string; + /** ℹ️ This enum is non-exhaustive. */ inferredFailureType: Vital.FailureType; note?: string; loinc?: string; diff --git a/src/api/types/OrderLowLevelStatus.ts b/src/api/types/OrderLowLevelStatus.ts index 9eb365f27..305655830 100644 --- a/src/api/types/OrderLowLevelStatus.ts +++ b/src/api/types/OrderLowLevelStatus.ts @@ -27,5 +27,7 @@ export const OrderLowLevelStatus = { AwaitingRegistration: "awaiting_registration", Registered: "registered", RedrawAvailable: "redraw_available", + Corrected: "corrected", + LabProcessingBlocked: "lab_processing_blocked", } as const; export type OrderLowLevelStatus = (typeof OrderLowLevelStatus)[keyof typeof OrderLowLevelStatus]; diff --git a/src/api/types/OrderOrigin.ts b/src/api/types/OrderOrigin.ts new file mode 100644 index 000000000..02c0be71a --- /dev/null +++ b/src/api/types/OrderOrigin.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const OrderOrigin = { + Initial: "initial", + Redraw: "redraw", + Recreation: "recreation", +} as const; +export type OrderOrigin = (typeof OrderOrigin)[keyof typeof OrderOrigin]; diff --git a/src/api/types/OrderStatus.ts b/src/api/types/OrderStatus.ts index 85066ebd6..9b7e859ee 100644 --- a/src/api/types/OrderStatus.ts +++ b/src/api/types/OrderStatus.ts @@ -1,6 +1,9 @@ // This file was auto-generated by Fern from our API Definition. -/** ℹ️ This enum is non-exhaustive. */ +/** + * Used in combination with OrderStatusDetail to represent the current order state. + * OrderStatus is driven by a FSM whereas OrderStatusDetail is descriptive only. ℹ️ This enum is non-exhaustive. + */ export const OrderStatus = { ReceivedWalkInTestOrdered: "received.walk_in_test.ordered", ReceivedWalkInTestRequisitionCreated: "received.walk_in_test.requisition_created", @@ -34,6 +37,7 @@ export const OrderStatus = { CollectingSampleTestkitWithCustomer: "collecting_sample.testkit.with_customer", CollectingSampleTestkitTransitLab: "collecting_sample.testkit.transit_lab", SampleWithLabTestkitDeliveredToLab: "sample_with_lab.testkit.delivered_to_lab", + SampleWithLabTestkitLabProcessingBlocked: "sample_with_lab.testkit.lab_processing_blocked", CompletedTestkitCompleted: "completed.testkit.completed", FailedTestkitFailureToDeliverToCustomer: "failed.testkit.failure_to_deliver_to_customer", FailedTestkitFailureToDeliverToLab: "failed.testkit.failure_to_deliver_to_lab", @@ -51,5 +55,9 @@ export const OrderStatus = { CancelledOnSiteCollectionCancelled: "cancelled.on_site_collection.cancelled", SampleWithLabOnSiteCollectionPartialResults: "sample_with_lab.on_site_collection.partial_results", FailedOnSiteCollectionSampleError: "failed.on_site_collection.sample_error", + CompletedWalkInTestCorrected: "completed.walk_in_test.corrected", + CompletedAtHomePhlebotomyCorrected: "completed.at_home_phlebotomy.corrected", + CompletedOnSiteCollectionCorrected: "completed.on_site_collection.corrected", + CompletedTestkitCorrected: "completed.testkit.corrected", } as const; export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus]; diff --git a/src/api/types/OrderStatusDetail.ts b/src/api/types/OrderStatusDetail.ts new file mode 100644 index 000000000..8e447af65 --- /dev/null +++ b/src/api/types/OrderStatusDetail.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** A descriptive-only additional field to be used in combination with OrderStatus. Exposed in the API. ℹ️ This enum is non-exhaustive. */ +export const OrderStatusDetail = { + FulfillmentError: "fulfillment_error", + DateOfCollectionUnspecified: "date_of_collection_unspecified", + DemographicInformationUnspecified: "demographic_information_unspecified", + DemographicInformationMismatch: "demographic_information_mismatch", + SampleQuantityNotSufficient: "sample_quantity_not_sufficient", + SampleContaminated: "sample_contaminated", + SampleStabilityExceeded: "sample_stability_exceeded", + SampleHemolyzed: "sample_hemolyzed", + SampleImproperCollection: "sample_improper_collection", +} as const; +export type OrderStatusDetail = (typeof OrderStatusDetail)[keyof typeof OrderStatusDetail]; diff --git a/src/api/types/OrderSummary.ts b/src/api/types/OrderSummary.ts new file mode 100644 index 000000000..c4c9752a1 --- /dev/null +++ b/src/api/types/OrderSummary.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +/** + * Lightweight order summary. + */ +export interface OrderSummary { + id: string; + /** ℹ️ This enum is non-exhaustive. */ + origin?: Vital.OrderOrigin; + parentId?: string; + /** ℹ️ This enum is non-exhaustive. */ + lastStatus: Vital.OrderLowLevelStatus; + lastStatusCreatedAt: Date; + updatedAt: Date; + createdAt: Date; +} diff --git a/src/api/types/OrderTransactionStatus.ts b/src/api/types/OrderTransactionStatus.ts new file mode 100644 index 000000000..1a983177a --- /dev/null +++ b/src/api/types/OrderTransactionStatus.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const OrderTransactionStatus = { + Active: "active", + Completed: "completed", + Cancelled: "cancelled", +} as const; +export type OrderTransactionStatus = (typeof OrderTransactionStatus)[keyof typeof OrderTransactionStatus]; diff --git a/src/api/types/ParsingJob.ts b/src/api/types/ParsingJob.ts index 37be8ac13..1c7dd9a66 100644 --- a/src/api/types/ParsingJob.ts +++ b/src/api/types/ParsingJob.ts @@ -4,8 +4,10 @@ import type * as Vital from "../index.js"; export interface ParsingJob { id: string; - jobId: string; + /** ℹ️ This enum is non-exhaustive. */ status: Vital.ParsingJobStatus; + /** ℹ️ This enum is non-exhaustive. */ + failureReason?: Vital.ParsingJobFailureReason; data?: Vital.ParsedLabReportData; needsHumanReview: boolean; isReviewed: boolean; diff --git a/src/api/types/ParsingJobFailureReason.ts b/src/api/types/ParsingJobFailureReason.ts new file mode 100644 index 000000000..60df86aa6 --- /dev/null +++ b/src/api/types/ParsingJobFailureReason.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Machine-readable failure reasons for parsing jobs. ℹ️ This enum is non-exhaustive. */ +export const ParsingJobFailureReason = { + InvalidInput: "invalid_input", + LowQuality: "low_quality", + NotEnglish: "not_english", +} as const; +export type ParsingJobFailureReason = (typeof ParsingJobFailureReason)[keyof typeof ParsingJobFailureReason]; diff --git a/src/api/types/PasswordProviders.ts b/src/api/types/PasswordProviders.ts index 04e789851..1e83e3536 100644 --- a/src/api/types/PasswordProviders.ts +++ b/src/api/types/PasswordProviders.ts @@ -13,5 +13,6 @@ export const PasswordProviders = { MyFitnessPal: "my_fitness_pal", Kardia: "kardia", AbbottLibreview: "abbott_libreview", + TandemSource: "tandem_source", } as const; export type PasswordProviders = (typeof PasswordProviders)[keyof typeof PasswordProviders]; diff --git a/src/api/types/PatientAddress.ts b/src/api/types/PatientAddress.ts index a43a46aa4..f15195bcd 100644 --- a/src/api/types/PatientAddress.ts +++ b/src/api/types/PatientAddress.ts @@ -8,4 +8,5 @@ export interface PatientAddress { state: string; zip: string; country: string; + accessNotes?: string; } diff --git a/src/api/types/PatientAddressCompatible.ts b/src/api/types/PatientAddressCompatible.ts index c926608f3..e47528dd4 100644 --- a/src/api/types/PatientAddressCompatible.ts +++ b/src/api/types/PatientAddressCompatible.ts @@ -8,5 +8,6 @@ export interface PatientAddressCompatible { state: string; zip: string; country: string; + accessNotes?: string; phoneNumber?: string; } diff --git a/src/api/types/PatientAddressWithValidation.ts b/src/api/types/PatientAddressWithValidation.ts index 777627eff..9f377d1b5 100644 --- a/src/api/types/PatientAddressWithValidation.ts +++ b/src/api/types/PatientAddressWithValidation.ts @@ -8,5 +8,6 @@ export interface PatientAddressWithValidation { state: string; zip: string; country: string; + accessNotes?: string; phoneNumber?: string; } diff --git a/src/api/types/PatientDetailsWithValidation.ts b/src/api/types/PatientDetailsWithValidation.ts index 7274a826a..402ba74d5 100644 --- a/src/api/types/PatientDetailsWithValidation.ts +++ b/src/api/types/PatientDetailsWithValidation.ts @@ -9,18 +9,19 @@ export interface PatientDetailsWithValidation { firstName: string; lastName: string; dob: string; + /** ℹ️ This enum is non-exhaustive. */ gender: Vital.Gender; phoneNumber: string; email: string; /** Parent/medical_proxy details. Required if patient is a minor. */ medicalProxy?: Vital.GuarantorDetails; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ race?: Vital.Race; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ ethnicity?: Vital.Ethnicity; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ sexualOrientation?: Vital.SexualOrientation; - /** If not provided, will be set to 'Not Specified' */ + /** If not provided, will be set to 'Not Specified' ℹ️ This enum is non-exhaustive. */ genderIdentity?: Vital.GenderIdentity; /** Household income in USD. If not provided, will be set to None */ householdIncome?: number; diff --git a/src/api/types/PayorCodeExternalProvider.ts b/src/api/types/PayorCodeExternalProvider.ts index 39ccd83ba..35f678be3 100644 --- a/src/api/types/PayorCodeExternalProvider.ts +++ b/src/api/types/PayorCodeExternalProvider.ts @@ -7,5 +7,7 @@ export const PayorCodeExternalProvider = { Stedi: "stedi", Waystar: "waystar", ClaimMd: "claim_md", + Apero: "apero", + Pverify: "pverify", } as const; export type PayorCodeExternalProvider = (typeof PayorCodeExternalProvider)[keyof typeof PayorCodeExternalProvider]; diff --git a/src/api/types/PerLabCandidate.ts b/src/api/types/PerLabCandidate.ts new file mode 100644 index 000000000..992d95292 --- /dev/null +++ b/src/api/types/PerLabCandidate.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface PerLabCandidate { + markerId: number; + labId: number; + labSlug?: string; + name: string; + resultNames?: string[]; + providerId?: string; + loincSetHash: string; + loincCodes?: string[]; + loincComponents?: string[]; + loincGroups?: string[]; + cptCodes?: string[]; + relation: string; + confidence: number; + reasonCodes?: string[]; + markerPopularityScore: number; +} diff --git a/src/api/types/PhlebotomyProviderInfo.ts b/src/api/types/PhlebotomyProviderInfo.ts index 3a9129715..cea97a5c3 100644 --- a/src/api/types/PhlebotomyProviderInfo.ts +++ b/src/api/types/PhlebotomyProviderInfo.ts @@ -3,6 +3,7 @@ import type * as Vital from "../index.js"; export interface PhlebotomyProviderInfo { + /** ℹ️ This enum is non-exhaustive. */ name: Vital.AppointmentProvider; serviceTypes: Vital.AppointmentServiceType[]; } diff --git a/src/api/types/Placeholder.ts b/src/api/types/Placeholder.ts index 13eb015fc..fbb4d40c2 100644 --- a/src/api/types/Placeholder.ts +++ b/src/api/types/Placeholder.ts @@ -1,5 +1,5 @@ // This file was auto-generated by Fern from our API Definition. export interface Placeholder { - placeholder: boolean; + placeholder: true; } diff --git a/src/api/types/ProviderIdConversionResponse.ts b/src/api/types/ProviderIdConversionResponse.ts new file mode 100644 index 000000000..d95e8964c --- /dev/null +++ b/src/api/types/ProviderIdConversionResponse.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface ProviderIdConversionResponse { + sourceProviderId: string; + candidates?: Vital.PerLabCandidate[]; +} diff --git a/src/api/types/ProviderLinkResponse.ts b/src/api/types/ProviderLinkResponse.ts index 6f5ba72f5..5b2a74f82 100644 --- a/src/api/types/ProviderLinkResponse.ts +++ b/src/api/types/ProviderLinkResponse.ts @@ -13,6 +13,7 @@ export interface ProviderLinkResponse { error?: string; /** The provider MFA request. This field is populated only when state is `pending_provider_mfa`. */ providerMfa?: Vital.ProviderMfaRequest; + /** ℹ️ This enum is non-exhaustive. */ provider: Vital.PasswordProviders; connected: boolean; providerId?: string; diff --git a/src/api/types/Providers.ts b/src/api/types/Providers.ts index b9ee3df65..f16f4bd0f 100644 --- a/src/api/types/Providers.ts +++ b/src/api/types/Providers.ts @@ -13,6 +13,7 @@ export const Providers = { Zwift: "zwift", FreestyleLibre: "freestyle_libre", AbbottLibreview: "abbott_libreview", + TandemSource: "tandem_source", FreestyleLibreBle: "freestyle_libre_ble", EightSleep: "eight_sleep", Withings: "withings", @@ -32,6 +33,7 @@ export const Providers = { Hammerhead: "hammerhead", MyFitnessPal: "my_fitness_pal", HealthConnect: "health_connect", + SamsungHealth: "samsung_health", Polar: "polar", Cronometer: "cronometer", Kardia: "kardia", diff --git a/src/api/types/PscInfo.ts b/src/api/types/PscInfo.ts index de2b56c24..505f3eafd 100644 --- a/src/api/types/PscInfo.ts +++ b/src/api/types/PscInfo.ts @@ -4,6 +4,7 @@ import type * as Vital from "../index.js"; export interface PscInfo { labId: number; + /** ℹ️ This enum is non-exhaustive. */ slug: Vital.Labs; patientServiceCenters: Vital.ClientFacingLabLocation[]; } diff --git a/src/api/types/QueryGroupByItem.ts b/src/api/types/QueryGroupByItem.ts index da109696a..1c9e37025 100644 --- a/src/api/types/QueryGroupByItem.ts +++ b/src/api/types/QueryGroupByItem.ts @@ -6,18 +6,22 @@ export type QueryGroupByItem = | Vital.DateTruncExpr | Vital.DatePartExpr | Vital.SleepColumnExpr + | Vital.DerivedReadinessColumnExpr | Vital.ActivityColumnExpr | Vital.WorkoutColumnExpr | Vital.BodyColumnExpr | Vital.MealColumnExpr + | Vital.MenstrualCycleColumnExpr | Vital.ProfileColumnExpr | Vital.SleepScoreValueMacroExpr | Vital.ChronotypeValueMacroExpr | Vital.AsleepAtValueMacroExpr | Vital.AwakeAtValueMacroExpr + | Vital.AwakeningsValueMacroExpr | Vital.UnrecognizedValueMacroExpr | Vital.DiscreteTimeseriesExpr | Vital.IntervalTimeseriesExpr + | Vital.InsulinInjectionTimeseriesExpr | Vital.BloodPressureTimeseriesExpr | Vital.TemperatureTimeseriesExpr | Vital.WorkoutDurationTimeseriesExpr diff --git a/src/api/types/QuerySelectItem.ts b/src/api/types/QuerySelectItem.ts index a2d61389a..63a91deeb 100644 --- a/src/api/types/QuerySelectItem.ts +++ b/src/api/types/QuerySelectItem.ts @@ -6,21 +6,26 @@ export type QuerySelectItem = | Vital.AggregateExpr | Vital.GroupKeyColumnExpr | Vital.SleepColumnExpr + | Vital.DerivedReadinessColumnExpr | Vital.ActivityColumnExpr | Vital.WorkoutColumnExpr | Vital.BodyColumnExpr | Vital.MealColumnExpr + | Vital.MenstrualCycleColumnExpr | Vital.ProfileColumnExpr | Vital.SleepScoreValueMacroExpr | Vital.ChronotypeValueMacroExpr | Vital.AsleepAtValueMacroExpr | Vital.AwakeAtValueMacroExpr + | Vital.AwakeningsValueMacroExpr | Vital.UnrecognizedValueMacroExpr | Vital.DiscreteTimeseriesExpr | Vital.IntervalTimeseriesExpr + | Vital.InsulinInjectionTimeseriesExpr | Vital.BloodPressureTimeseriesExpr | Vital.TemperatureTimeseriesExpr | Vital.WorkoutDurationTimeseriesExpr | Vital.NoteTimeseriesExpr | Vital.IndexColumnExpr + | Vital.ScalarOutputSubqueryExpr | Vital.SourceColumnExpr; diff --git a/src/api/types/Question.ts b/src/api/types/Question.ts index 070f3edde..f9d1b3448 100644 --- a/src/api/types/Question.ts +++ b/src/api/types/Question.ts @@ -7,6 +7,7 @@ export interface Question { required: boolean; code: string; value: string; + /** ℹ️ This enum is non-exhaustive. */ type: Vital.QuestionType; sequence: number; answers: Vital.Answer[]; diff --git a/src/api/types/RelatedCandidate.ts b/src/api/types/RelatedCandidate.ts new file mode 100644 index 000000000..da0f142a8 --- /dev/null +++ b/src/api/types/RelatedCandidate.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface RelatedCandidate { + canonical: Vital.CanonicalCandidate; + relation: string; + confidence: number; + reasonCodes?: string[]; +} diff --git a/src/api/types/ResourceAvailability.ts b/src/api/types/ResourceAvailability.ts index 62a65d925..8212f1dc2 100644 --- a/src/api/types/ResourceAvailability.ts +++ b/src/api/types/ResourceAvailability.ts @@ -3,6 +3,7 @@ import type * as Vital from "../index.js"; export interface ResourceAvailability { + /** ℹ️ This enum is non-exhaustive. */ status: Vital.Availability; scopeRequirements?: Vital.ScopeRequirementsGrants; } diff --git a/src/api/types/ResultMetadata.ts b/src/api/types/ResultMetadata.ts index 4519ba1d3..79c71d8d9 100644 --- a/src/api/types/ResultMetadata.ts +++ b/src/api/types/ResultMetadata.ts @@ -1,10 +1,14 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Vital from "../index.js"; + export interface ResultMetadata { - patientFirstName: string; - patientLastName: string; - dob: string; - labName: string; + patientFirstName?: string; + patientLastName?: string; + dob?: string; + /** ℹ️ This enum is non-exhaustive. */ + gender?: Vital.ResultMetadataGender; + labName?: string; dateReported?: string; dateCollected?: string; specimenNumber?: string; diff --git a/src/api/types/ResultMetadataGender.ts b/src/api/types/ResultMetadataGender.ts new file mode 100644 index 000000000..74e80856d --- /dev/null +++ b/src/api/types/ResultMetadataGender.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const ResultMetadataGender = { + Male: "male", + Female: "female", + Other: "other", +} as const; +export type ResultMetadataGender = (typeof ResultMetadataGender)[keyof typeof ResultMetadataGender]; diff --git a/src/api/types/ScalarOutputSubqueryExpr.ts b/src/api/types/ScalarOutputSubqueryExpr.ts new file mode 100644 index 000000000..8ce5f5927 --- /dev/null +++ b/src/api/types/ScalarOutputSubqueryExpr.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +/** + * A subquery that produces a single scalar value per row. + */ +export interface ScalarOutputSubqueryExpr { + select: Vital.ScalarOutputSubqueryExprSelect; + from: Vital.ScalarOutputSubqueryExprFrom; + where?: string; +} diff --git a/src/api/types/ScalarOutputSubqueryExprFrom.ts b/src/api/types/ScalarOutputSubqueryExprFrom.ts new file mode 100644 index 000000000..116cc3f9c --- /dev/null +++ b/src/api/types/ScalarOutputSubqueryExprFrom.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export type ScalarOutputSubqueryExprFrom = Vital.UnnestExpr | Vital.Placeholder; diff --git a/src/api/types/ScalarOutputSubqueryExprSelect.ts b/src/api/types/ScalarOutputSubqueryExprSelect.ts new file mode 100644 index 000000000..019e244f0 --- /dev/null +++ b/src/api/types/ScalarOutputSubqueryExprSelect.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export type ScalarOutputSubqueryExprSelect = Vital.AggregateFieldExpr | Vital.Placeholder; diff --git a/src/api/types/SearchCompendiumResponse.ts b/src/api/types/SearchCompendiumResponse.ts new file mode 100644 index 000000000..6c1bd7758 --- /dev/null +++ b/src/api/types/SearchCompendiumResponse.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export interface SearchCompendiumResponse { + /** ℹ️ This enum is non-exhaustive. */ + mode: Vital.SearchMode; + selectedCanonical?: Vital.CanonicalCandidate; + canonicalCandidates?: Vital.CanonicalCandidate[]; + perLab?: Record; + related?: Vital.RelatedCandidate[]; +} diff --git a/src/api/types/SearchMode.ts b/src/api/types/SearchMode.ts new file mode 100644 index 000000000..959979435 --- /dev/null +++ b/src/api/types/SearchMode.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const SearchMode = { + Canonical: "canonical", + Crosswalk: "crosswalk", +} as const; +export type SearchMode = (typeof SearchMode)[keyof typeof SearchMode]; diff --git a/src/api/types/SimulationFlags.ts b/src/api/types/SimulationFlags.ts index 169b6f2a9..5911641c9 100644 --- a/src/api/types/SimulationFlags.ts +++ b/src/api/types/SimulationFlags.ts @@ -3,6 +3,7 @@ import type * as Vital from "../index.js"; export interface SimulationFlags { + /** ℹ️ This enum is non-exhaustive. */ interpretation?: Vital.Interpretation; resultTypes?: Vital.ResultType[]; hasMissingResults?: boolean; diff --git a/src/api/types/SingleHistoricalPullStatistics.ts b/src/api/types/SingleHistoricalPullStatistics.ts index 041c4b386..1fb27b14c 100644 --- a/src/api/types/SingleHistoricalPullStatistics.ts +++ b/src/api/types/SingleHistoricalPullStatistics.ts @@ -3,6 +3,7 @@ import type * as Vital from "../index.js"; export interface SingleHistoricalPullStatistics { + /** ℹ️ This enum is non-exhaustive. */ status: Vital.HistoricalPullStatus; rangeStart?: Date; rangeEnd?: Date; @@ -10,5 +11,6 @@ export interface SingleHistoricalPullStatistics { daysWithData?: number; release: string; traceId?: string; + /** ℹ️ This enum is non-exhaustive. */ errorDetails?: Vital.SingleHistoricalPullStatisticsErrorDetails; } diff --git a/src/api/types/SingleHistoricalPullStatisticsErrorDetails.ts b/src/api/types/SingleHistoricalPullStatisticsErrorDetails.ts index 64e131ab1..97b90017b 100644 --- a/src/api/types/SingleHistoricalPullStatisticsErrorDetails.ts +++ b/src/api/types/SingleHistoricalPullStatisticsErrorDetails.ts @@ -2,6 +2,9 @@ import type * as Vital from "../index.js"; +/** + * ℹ️ This enum is non-exhaustive. + */ export type SingleHistoricalPullStatisticsErrorDetails = | Vital.HistoricalPullRetriableErrorDetails | Vital.HistoricalPullNonRetriableErrorDetails; diff --git a/src/api/types/SleepColumnExprSleep.ts b/src/api/types/SleepColumnExprSleep.ts index 7f3289803..4a5fe22fe 100644 --- a/src/api/types/SleepColumnExprSleep.ts +++ b/src/api/types/SleepColumnExprSleep.ts @@ -27,6 +27,7 @@ export const SleepColumnExprSleep = { SkinTemperatureDelta: "skin_temperature_delta", RespiratoryRate: "respiratory_rate", Score: "score", + RecoveryReadinessScore: "recovery_readiness_score", SourceType: "source_type", SourceProvider: "source_provider", SourceAppId: "source_app_id", diff --git a/src/api/types/SleepV2InDb.ts b/src/api/types/SleepV2InDb.ts index dd912b15a..d4e27644b 100644 --- a/src/api/types/SleepV2InDb.ts +++ b/src/api/types/SleepV2InDb.ts @@ -5,14 +5,14 @@ import type * as Vital from "../index.js"; export interface SleepV2InDb { timestamp: Date; data: Record; - providerId: string; userId: string; + providerId: string; sourceId: number; priorityId?: number; id: string; - source: Vital.ClientFacingProvider; - priority?: number; sourceDeviceId?: string; createdAt?: Date; updatedAt?: Date; + source: Vital.ClientFacingProvider; + priority?: number; } diff --git a/src/api/types/Source.ts b/src/api/types/Source.ts index 6ab731090..ca88da26b 100644 --- a/src/api/types/Source.ts +++ b/src/api/types/Source.ts @@ -9,7 +9,9 @@ export interface Source { logo: string; group?: string; oauthUrl?: string; + /** ℹ️ This enum is non-exhaustive. */ authType?: Vital.SourceAuthType; + /** ℹ️ This enum is non-exhaustive. */ sourceType?: Vital.SourceType; isActive?: boolean; backfillNumDays?: number; diff --git a/src/api/types/SourceLink.ts b/src/api/types/SourceLink.ts index 4b3237c96..22374debe 100644 --- a/src/api/types/SourceLink.ts +++ b/src/api/types/SourceLink.ts @@ -9,6 +9,7 @@ export interface SourceLink { description: string; logo: string; oauthUrl?: string; + /** ℹ️ This enum is non-exhaustive. */ authType?: Vital.SourceAuthType; formComponents?: Record; } diff --git a/src/api/types/UnnestExpr.ts b/src/api/types/UnnestExpr.ts new file mode 100644 index 000000000..b729bebfb --- /dev/null +++ b/src/api/types/UnnestExpr.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +/** + * FROM clause variant: unnest a list column into elements. + */ +export interface UnnestExpr { + unnest: Vital.UnnestExprUnnest; +} diff --git a/src/api/types/UnnestExprUnnest.ts b/src/api/types/UnnestExprUnnest.ts new file mode 100644 index 000000000..25ff6bc71 --- /dev/null +++ b/src/api/types/UnnestExprUnnest.ts @@ -0,0 +1,26 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../index.js"; + +export type UnnestExprUnnest = + | Vital.SleepColumnExpr + | Vital.DerivedReadinessColumnExpr + | Vital.ActivityColumnExpr + | Vital.WorkoutColumnExpr + | Vital.BodyColumnExpr + | Vital.MealColumnExpr + | Vital.MenstrualCycleColumnExpr + | Vital.ProfileColumnExpr + | Vital.SleepScoreValueMacroExpr + | Vital.ChronotypeValueMacroExpr + | Vital.AsleepAtValueMacroExpr + | Vital.AwakeAtValueMacroExpr + | Vital.AwakeningsValueMacroExpr + | Vital.UnrecognizedValueMacroExpr + | Vital.DiscreteTimeseriesExpr + | Vital.IntervalTimeseriesExpr + | Vital.InsulinInjectionTimeseriesExpr + | Vital.BloodPressureTimeseriesExpr + | Vital.TemperatureTimeseriesExpr + | Vital.WorkoutDurationTimeseriesExpr + | Vital.NoteTimeseriesExpr; diff --git a/src/api/types/UsAddress.ts b/src/api/types/UsAddress.ts index 826286fec..3136282e4 100644 --- a/src/api/types/UsAddress.ts +++ b/src/api/types/UsAddress.ts @@ -8,4 +8,5 @@ export interface UsAddress { zipCode: string; /** Deprecated. Use `second_line` instead to provide the unit number. Subject to removal after 20 Nov 2023. */ unit?: string; + accessNotes?: string; } diff --git a/src/api/types/UsState.ts b/src/api/types/UsState.ts new file mode 100644 index 000000000..dd368f7e9 --- /dev/null +++ b/src/api/types/UsState.ts @@ -0,0 +1,56 @@ +// This file was auto-generated by Fern from our API Definition. + +/** ℹ️ This enum is non-exhaustive. */ +export const UsState = { + Al: "AL", + Ak: "AK", + Az: "AZ", + Ar: "AR", + Ca: "CA", + Co: "CO", + Ct: "CT", + De: "DE", + Fl: "FL", + Ga: "GA", + Hi: "HI", + Id: "ID", + Il: "IL", + In: "IN", + Ia: "IA", + Ks: "KS", + Ky: "KY", + La: "LA", + Me: "ME", + Md: "MD", + Ma: "MA", + Mi: "MI", + Mn: "MN", + Ms: "MS", + Mo: "MO", + Mt: "MT", + Ne: "NE", + Nv: "NV", + Nh: "NH", + Nj: "NJ", + Nm: "NM", + Ny: "NY", + Nc: "NC", + Nd: "ND", + Oh: "OH", + Ok: "OK", + Or: "OR", + Pa: "PA", + Ri: "RI", + Sc: "SC", + Sd: "SD", + Tn: "TN", + Tx: "TX", + Ut: "UT", + Vt: "VT", + Va: "VA", + Wa: "WA", + Wv: "WV", + Wi: "WI", + Wy: "WY", +} as const; +export type UsState = (typeof UsState)[keyof typeof UsState]; diff --git a/src/api/types/UserAddress.ts b/src/api/types/UserAddress.ts new file mode 100644 index 000000000..a720afd28 --- /dev/null +++ b/src/api/types/UserAddress.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface UserAddress { + firstLine: string; + secondLine?: string; + country: string; + zip: string; + city: string; + state: string; + accessNotes?: string; +} diff --git a/src/api/types/UserInfo.ts b/src/api/types/UserInfo.ts index 1c6fd0f64..e14ba5206 100644 --- a/src/api/types/UserInfo.ts +++ b/src/api/types/UserInfo.ts @@ -9,10 +9,14 @@ export interface UserInfo { phoneNumber: string; gender: string; dob: string; - address: Vital.Address; + address: Vital.UserAddress; medicalProxy?: Vital.GuarantorDetails; + /** ℹ️ This enum is non-exhaustive. */ race?: Vital.Race; + /** ℹ️ This enum is non-exhaustive. */ ethnicity?: Vital.Ethnicity; + /** ℹ️ This enum is non-exhaustive. */ sexualOrientation?: Vital.SexualOrientation; + /** ℹ️ This enum is non-exhaustive. */ genderIdentity?: Vital.GenderIdentity; } diff --git a/src/api/types/UserRefreshErrorResponse.ts b/src/api/types/UserRefreshErrorResponse.ts index e12b87d0d..ed1ff81ef 100644 --- a/src/api/types/UserRefreshErrorResponse.ts +++ b/src/api/types/UserRefreshErrorResponse.ts @@ -2,7 +2,7 @@ export interface UserRefreshErrorResponse { /** Whether operation was successful or not */ - success: boolean; + success: false; /** 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. */ userId: string; error: string; diff --git a/src/api/types/UserRefreshSuccessResponse.ts b/src/api/types/UserRefreshSuccessResponse.ts index e9e6f001f..797f2dbef 100644 --- a/src/api/types/UserRefreshSuccessResponse.ts +++ b/src/api/types/UserRefreshSuccessResponse.ts @@ -2,7 +2,7 @@ export interface UserRefreshSuccessResponse { /** Whether operation was successful or not */ - success: boolean; + success: true; /** 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. */ userId: string; refreshedSources: string[]; diff --git a/src/api/types/ValidationError.ts b/src/api/types/ValidationError.ts index 430bce763..22f4417d7 100644 --- a/src/api/types/ValidationError.ts +++ b/src/api/types/ValidationError.ts @@ -6,4 +6,6 @@ export interface ValidationError { loc: Vital.ValidationErrorLocItem[]; msg: string; type: string; + input?: unknown; + ctx?: Record; } diff --git a/src/api/types/VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails.ts b/src/api/types/VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails.ts index c42b8fcb1..a04dfecce 100644 --- a/src/api/types/VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails.ts +++ b/src/api/types/VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails.ts @@ -5,6 +5,7 @@ import type * as Vital from "../index.js"; export interface VitalCoreSchemasDbSchemasLabTestInsurancePersonDetails { firstName: string; lastName: string; + /** ℹ️ This enum is non-exhaustive. */ gender: Vital.Gender; address: Vital.Address; dob: string; diff --git a/src/api/types/WorkoutV2InDb.ts b/src/api/types/WorkoutV2InDb.ts index 1c1131421..a31f8a511 100644 --- a/src/api/types/WorkoutV2InDb.ts +++ b/src/api/types/WorkoutV2InDb.ts @@ -5,15 +5,15 @@ import type * as Vital from "../index.js"; export interface WorkoutV2InDb { timestamp: Date; data: Record; - providerId: string; userId: string; + providerId: string; sourceId: number; priorityId?: number; id: string; sportId: number; - source: Vital.ClientFacingProvider; sport: Vital.ClientFacingSport; sourceDeviceId?: string; createdAt?: Date; updatedAt?: Date; + source: Vital.ClientFacingProvider; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index fd115a275..63f3bde53 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -6,6 +6,9 @@ export * from "./Address.js"; export * from "./AggregateExpr.js"; export * from "./AggregateExprArg.js"; export * from "./AggregateExprFunc.js"; +export * from "./AggregateFieldExpr.js"; +export * from "./AggregateFieldExprArg.js"; +export * from "./AggregateFieldExprFunc.js"; export * from "./AggregationResponse.js"; export * from "./AggregationResult.js"; export * from "./AllowedRadius.js"; @@ -28,6 +31,7 @@ export * from "./AttemptStatus.js"; export * from "./AuthType.js"; export * from "./Availability.js"; export * from "./AwakeAtValueMacroExpr.js"; +export * from "./AwakeningsValueMacroExpr.js"; export * from "./BasalBodyTemperatureEntry.js"; export * from "./Billing.js"; export * from "./BiomarkerResult.js"; @@ -42,6 +46,7 @@ export * from "./BulkOp.js"; export * from "./BulkOpStatus.js"; export * from "./BulkOpsResponse.js"; export * from "./BulkOpType.js"; +export * from "./CanonicalCandidate.js"; export * from "./CervicalMucusEntry.js"; export * from "./CervicalMucusEntryQuality.js"; export * from "./ChronotypeValueMacroExpr.js"; @@ -209,10 +214,16 @@ export * from "./ClientFacingInsulinInjectionChanged.js"; export * from "./ClientFacingInsulinInjectionChangedEventType.js"; export * from "./ClientFacingInsulinInjectionHistoricalPullCompleted.js"; export * from "./ClientFacingInsulinInjectionSample.js"; +export * from "./ClientFacingInsulinInjectionSampleBolusPurpose.js"; +export * from "./ClientFacingInsulinInjectionSampleDeliveryForm.js"; +export * from "./ClientFacingInsulinInjectionSampleDeliveryMode.js"; export * from "./ClientFacingInsulinInjectionSampleType.js"; export * from "./ClientFacingInsurance.js"; export * from "./ClientFacingLab.js"; +export * from "./ClientFacingLabAccount.js"; export * from "./ClientFacingLabLocation.js"; +export * from "./ClientFacingLabReportParsingJobCreatedEvent.js"; +export * from "./ClientFacingLabReportParsingJobUpdatedEvent.js"; export * from "./ClientFacingLabs.js"; export * from "./ClientFacingLabTest.js"; export * from "./ClientFacingLeanBodyMassChanged.js"; @@ -248,6 +259,8 @@ export * from "./ClientFacingOrderChanged.js"; export * from "./ClientFacingOrderChangedEventType.js"; export * from "./ClientFacingOrderDetails.js"; export * from "./ClientFacingOrderEvent.js"; +export * from "./ClientFacingOrderInTransaction.js"; +export * from "./ClientFacingOrderTransaction.js"; export * from "./ClientFacingPatientDetailsCompatible.js"; export * from "./ClientFacingPayor.js"; export * from "./ClientFacingPayorCodeSource.js"; @@ -384,6 +397,7 @@ export * from "./ClientUserIdConflictResponse.js"; export * from "./ClientWorkoutResponse.js"; export * from "./ClinicalInformation.js"; export * from "./CompanyDetails.js"; +export * from "./CompendiumSearchLabs.js"; export * from "./ConnectedSourceClientFacing.js"; export * from "./ConnectionRecipe.js"; export * from "./Consent.js"; @@ -394,6 +408,7 @@ export * from "./ContinuousQueryTaskHistoryResponse.js"; export * from "./ContinuousQueryTaskStatus.js"; export * from "./ContraceptiveEntry.js"; export * from "./ContraceptiveEntryType.js"; +export * from "./ConvertCompendiumResponse.js"; export * from "./CreateUserPortalUrlResponse.js"; export * from "./DatePartExpr.js"; export * from "./DatePartExprArg.js"; @@ -404,12 +419,15 @@ export * from "./DaySlots.js"; export * from "./DelegatedFlowType.js"; export * from "./DemoConnectionStatus.js"; export * from "./DemoProviders.js"; +export * from "./DerivedReadinessColumnExpr.js"; +export * from "./DerivedReadinessColumnExprDerivedReadiness.js"; export * from "./DetectedDeviationEntry.js"; export * from "./DetectedDeviationEntryDeviation.js"; export * from "./DeviceV2InDb.js"; export * from "./DiscreteTimeseriesExpr.js"; export * from "./DiscreteTimeseriesExprField.js"; export * from "./DiscreteTimeseriesExprTimeseries.js"; +export * from "./ElementFieldExpr.js"; export * from "./EmailProviders.js"; export * from "./Energy.js"; export * from "./Ethnicity.js"; @@ -424,6 +442,8 @@ export * from "./Gender.js"; export * from "./GenderIdentity.js"; export * from "./GetMarkersResponse.js"; export * from "./GetOrdersResponse.js"; +export * from "./GetOrderTransactionResponse.js"; +export * from "./GetTeamLabAccountsResponse.js"; export * from "./GroupedAFibBurden.js"; export * from "./GroupedAFibBurdenResponse.js"; export * from "./GroupedBasalBodyTemperature.js"; @@ -547,12 +567,16 @@ export * from "./IcdExcludesViolation.js"; export * from "./IcdExcludesWarning.js"; export * from "./IndexColumnExpr.js"; export * from "./IndexColumnExprIndex.js"; +export * from "./InsulinInjectionTimeseriesExpr.js"; +export * from "./InsulinInjectionTimeseriesExprField.js"; export * from "./IntermenstrualBleedingEntry.js"; export * from "./Interpretation.js"; export * from "./IntervalTimeseriesExpr.js"; export * from "./IntervalTimeseriesExprField.js"; export * from "./IntervalTimeseriesExprTimeseries.js"; export * from "./Jpeg.js"; +export * from "./LabAccountDelegatedFlow.js"; +export * from "./LabAccountStatus.js"; export * from "./LabLocationCapability.js"; export * from "./LabLocationMetadata.js"; export * from "./LabReportResult.js"; @@ -574,9 +598,30 @@ export * from "./LoincMatch.js"; export * from "./Macros.js"; export * from "./ManualProviders.js"; export * from "./MarkerType.js"; +export * from "./McBasalBodyTemperatureFieldExpr.js"; +export * from "./McBasalBodyTemperatureFieldExprBasalBodyTemperature.js"; +export * from "./McCervicalMucusFieldExpr.js"; +export * from "./McCervicalMucusFieldExprCervicalMucus.js"; +export * from "./McContraceptiveFieldExpr.js"; +export * from "./McContraceptiveFieldExprContraceptive.js"; +export * from "./McDetectedDeviationsFieldExpr.js"; +export * from "./McDetectedDeviationsFieldExprDetectedDeviations.js"; +export * from "./McHomePregnancyTestFieldExpr.js"; +export * from "./McHomePregnancyTestFieldExprHomePregnancyTest.js"; +export * from "./McHomeProgesteroneTestFieldExpr.js"; +export * from "./McHomeProgesteroneTestFieldExprHomeProgesteroneTest.js"; +export * from "./McIntermenstrualBleedingFieldExpr.js"; +export * from "./McMenstrualFlowFieldExpr.js"; +export * from "./McMenstrualFlowFieldExprMenstrualFlow.js"; +export * from "./McOvulationTestFieldExpr.js"; +export * from "./McOvulationTestFieldExprOvulationTest.js"; +export * from "./McSexualActivityFieldExpr.js"; +export * from "./McSexualActivityFieldExprSexualActivity.js"; export * from "./MealColumnExpr.js"; export * from "./MealColumnExprMeal.js"; export * from "./MealInDbBaseClientFacingSource.js"; +export * from "./MenstrualCycleColumnExpr.js"; +export * from "./MenstrualCycleColumnExprMenstrualCycle.js"; export * from "./MenstrualCycleResponse.js"; export * from "./MenstrualFlowEntry.js"; export * from "./MenstrualFlowEntryFlow.js"; @@ -590,15 +635,20 @@ export * from "./NotFoundErrorBody.js"; export * from "./OAuthProviders.js"; export * from "./OrderActivationType.js"; export * from "./OrderLowLevelStatus.js"; +export * from "./OrderOrigin.js"; export * from "./OrderSetRequest.js"; export * from "./OrderStatus.js"; +export * from "./OrderStatusDetail.js"; +export * from "./OrderSummary.js"; export * from "./OrderTopLevelStatus.js"; +export * from "./OrderTransactionStatus.js"; export * from "./OvulationTestEntry.js"; export * from "./OvulationTestEntryTestResult.js"; export * from "./PaginatedUsersResponse.js"; export * from "./ParentBiomarkerData.js"; export * from "./ParsedLabReportData.js"; export * from "./ParsingJob.js"; +export * from "./ParsingJobFailureReason.js"; export * from "./ParsingJobStatus.js"; export * from "./PasswordProviders.js"; export * from "./PatientAddress.js"; @@ -609,6 +659,7 @@ export * from "./PayorCodeExternalProvider.js"; export * from "./PerformingLaboratory.js"; export * from "./Period.js"; export * from "./PeriodUnit.js"; +export * from "./PerLabCandidate.js"; export * from "./PhlebotomyAreaInfo.js"; export * from "./PhlebotomyProviderInfo.js"; export * from "./PhysicianCreateRequest.js"; @@ -624,6 +675,7 @@ export * from "./ProfileInDb.js"; export * from "./ProviderConnectionCreated.js"; export * from "./ProviderConnectionError.js"; export * from "./ProviderConnectionErrorErrorType.js"; +export * from "./ProviderIdConversionResponse.js"; export * from "./ProviderLinkResponse.js"; export * from "./ProviderLinkResponseErrorType.js"; export * from "./ProviderLinkResponseState.js"; @@ -648,18 +700,25 @@ export * from "./RawProfile.js"; export * from "./RawSleep.js"; export * from "./RawWorkout.js"; export * from "./Region.js"; +export * from "./RelatedCandidate.js"; export * from "./RelativeTimeframe.js"; export * from "./ResendWebhookResponse.js"; export * from "./ResourceAvailability.js"; export * from "./ResponsibleRelationship.js"; export * from "./ResultMetadata.js"; +export * from "./ResultMetadataGender.js"; export * from "./ResultType.js"; export * from "./SampleData.js"; export * from "./SampleDataDateCollected.js"; export * from "./SampleDataDateReceived.js"; export * from "./SampleDataDateReported.js"; +export * from "./ScalarOutputSubqueryExpr.js"; +export * from "./ScalarOutputSubqueryExprFrom.js"; +export * from "./ScalarOutputSubqueryExprSelect.js"; export * from "./ScopeRequirementsGrants.js"; export * from "./ScopeRequirementsStr.js"; +export * from "./SearchCompendiumResponse.js"; +export * from "./SearchMode.js"; export * from "./Select.js"; export * from "./Sex.js"; export * from "./SexualActivityEntry.js"; @@ -693,8 +752,11 @@ export * from "./TimeSlot.js"; export * from "./TimeseriesMetricPoint.js"; export * from "./TimeseriesResource.js"; export * from "./TraceElements.js"; +export * from "./UnnestExpr.js"; +export * from "./UnnestExprUnnest.js"; export * from "./UnrecognizedValueMacroExpr.js"; export * from "./UsAddress.js"; +export * from "./UserAddress.js"; export * from "./UserHistoricalPullsResponse.js"; export * from "./UserInfo.js"; export * from "./UserRefreshErrorResponse.js"; @@ -702,6 +764,7 @@ export * from "./UserRefreshSuccessResponse.js"; export * from "./UserResourcesResponse.js"; export * from "./UserSignInTokenResponse.js"; export * from "./UserSuccessResponse.js"; +export * from "./UsState.js"; export * from "./UtcTimestampWithTimezoneOffset.js"; export * from "./ValidateIcdCodesResponse.js"; export * from "./ValidationError.js"; diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index 45cae32b2..5e5058a91 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -218,7 +218,13 @@ async function getHeaders(args: Fetcher.Args): Promise { newHeaders.set( "Accept", - args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*", + args.responseType === "json" + ? "application/json" + : args.responseType === "text" + ? "text/plain" + : args.responseType === "sse" + ? "text/event-stream" + : "*/*", ); if (args.body !== undefined && args.contentType != null) { newHeaders.set("Content-Type", args.contentType); diff --git a/src/core/schemas/builders/list/list.ts b/src/core/schemas/builders/list/list.ts index 4f8c10ba4..b3c0bdfcb 100644 --- a/src/core/schemas/builders/list/list.ts +++ b/src/core/schemas/builders/list/list.ts @@ -44,30 +44,20 @@ function validateAndTransformArray( }; } - const maybeValidItems = value.map((item, index) => transformItem(item, index)); + const result: Parsed[] = []; + const errors: ValidationError[] = []; - return maybeValidItems.reduce>( - (acc, item) => { - if (acc.ok && item.ok) { - return { - ok: true, - value: [...acc.value, item.value], - }; - } - - const errors: ValidationError[] = []; - if (!acc.ok) { - errors.push(...acc.errors); - } - if (!item.ok) { - errors.push(...item.errors); - } + for (let i = 0; i < value.length; i++) { + const item = transformItem(value[i], i); + if (item.ok) { + result.push(item.value); + } else { + errors.push(...item.errors); + } + } - return { - ok: false, - errors, - }; - }, - { ok: true, value: [] }, - ); + if (errors.length === 0) { + return { ok: true, value: result }; + } + return { ok: false, errors }; } diff --git a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts index af69acb01..5fdc8023b 100644 --- a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -5,6 +5,9 @@ import { isPlainObject } from "../../utils/isPlainObject.js"; import { getSchemaUtils } from "../schema-utils/index.js"; import type { ObjectLikeSchema, ObjectLikeUtils } from "./types.js"; +// eslint-disable-next-line @typescript-eslint/unbound-method +const _hasOwn = Object.prototype.hasOwnProperty; + export function getObjectLikeUtils(schema: BaseSchema): ObjectLikeUtils { return { withParsedProperties: (properties) => withParsedProperties(schema, properties), @@ -26,15 +29,14 @@ export function withParsedProperties>( - (processed, [key, value]) => { - return { - ...processed, - [key]: typeof value === "function" ? value(parsedObject.value) : value, - }; - }, - {}, - ); + const additionalProperties: Record = {}; + for (const key in properties) { + if (_hasOwn.call(properties, key)) { + const value = properties[key as keyof Properties]; + additionalProperties[key] = + typeof value === "function" ? (value as Function)(parsedObject.value) : value; + } + } return { ok: true, diff --git a/src/core/schemas/builders/object/object.ts b/src/core/schemas/builders/object/object.ts index 624d4d388..0db7f49aa 100644 --- a/src/core/schemas/builders/object/object.ts +++ b/src/core/schemas/builders/object/object.ts @@ -19,6 +19,9 @@ import type { PropertySchemas, } from "./types.js"; +// eslint-disable-next-line @typescript-eslint/unbound-method +const _hasOwn = Object.prototype.hasOwnProperty; + interface ObjectPropertyWithRawKey { rawKey: string; parsedKey: string; @@ -28,79 +31,128 @@ interface ObjectPropertyWithRawKey { export function object>( schemas: T, ): inferObjectSchemaFromPropertySchemas { - const baseSchema: BaseObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectFromPropertySchemas - > = { - _getRawProperties: () => - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey, - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], - _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], + // All property metadata is lazily computed on first use. + // This keeps schema construction free of iteration, which matters when + // many schemas are defined but only some are exercised at runtime. + // Required-key computation is also deferred because lazy() schemas may + // not be resolved at construction time. - parse: (raw, opts) => { - const rawKeyToProperty: Record = {}; - const requiredKeys: string[] = []; + let _rawKeyToProperty: Record | undefined; + function getRawKeyToProperty(): Record { + if (_rawKeyToProperty == null) { + _rawKeyToProperty = {}; for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const rawKey = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey; + const rawKey = isProperty(schemaOrObjectProperty) + ? schemaOrObjectProperty.rawKey + : (parsedKey as string); const valueSchema: Schema = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.valueSchema : schemaOrObjectProperty; - const property: ObjectPropertyWithRawKey = { + _rawKeyToProperty[rawKey] = { rawKey, parsedKey: parsedKey as string, valueSchema, }; + } + } + return _rawKeyToProperty; + } - rawKeyToProperty[rawKey] = property; + let _parseRequiredKeys: string[] | undefined; + let _jsonRequiredKeys: string[] | undefined; + let _parseRequiredKeysSet: Set | undefined; + let _jsonRequiredKeysSet: Set | undefined; + function getParseRequiredKeys(): string[] { + if (_parseRequiredKeys == null) { + _parseRequiredKeys = []; + _jsonRequiredKeys = []; + for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { + const rawKey = isProperty(schemaOrObjectProperty) + ? schemaOrObjectProperty.rawKey + : (parsedKey as string); + const valueSchema: Schema = isProperty(schemaOrObjectProperty) + ? schemaOrObjectProperty.valueSchema + : schemaOrObjectProperty; if (isSchemaRequired(valueSchema)) { - requiredKeys.push(rawKey); + _parseRequiredKeys.push(rawKey); + _jsonRequiredKeys.push(parsedKey as string); } } + _parseRequiredKeysSet = new Set(_parseRequiredKeys); + _jsonRequiredKeysSet = new Set(_jsonRequiredKeys); + } + return _parseRequiredKeys; + } + function getJsonRequiredKeys(): string[] { + if (_jsonRequiredKeys == null) { + getParseRequiredKeys(); + } + return _jsonRequiredKeys!; + } + + function getParseRequiredKeysSet(): Set { + if (_parseRequiredKeysSet == null) { + getParseRequiredKeys(); + } + return _parseRequiredKeysSet!; + } + + function getJsonRequiredKeysSet(): Set { + if (_jsonRequiredKeysSet == null) { + getParseRequiredKeys(); + } + return _jsonRequiredKeysSet!; + } + + const baseSchema: BaseObjectSchema< + inferRawObjectFromPropertySchemas, + inferParsedObjectFromPropertySchemas + > = { + _getRawProperties: () => + Object.entries(schemas).map(([parsedKey, propertySchema]) => + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey, + ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], + _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], + + parse: (raw, opts) => { + const breadcrumbsPrefix = opts?.breadcrumbsPrefix ?? []; return validateAndTransformObject({ value: raw, - requiredKeys, + requiredKeys: getParseRequiredKeys(), + requiredKeysSet: getParseRequiredKeysSet(), getProperty: (rawKey) => { - const property = rawKeyToProperty[rawKey]; + const property = getRawKeyToProperty()[rawKey]; if (property == null) { return undefined; } return { transformedKey: property.parsedKey, - transform: (propertyValue) => - property.valueSchema.parse(propertyValue, { + transform: (propertyValue) => { + const childBreadcrumbs = [...breadcrumbsPrefix, rawKey]; + return property.valueSchema.parse(propertyValue, { ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawKey], - }), + breadcrumbsPrefix: childBreadcrumbs, + }); + }, }; }, unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, skipValidation: opts?.skipValidation, - breadcrumbsPrefix: opts?.breadcrumbsPrefix, + breadcrumbsPrefix, omitUndefined: opts?.omitUndefined, }); }, json: (parsed, opts) => { - const requiredKeys: string[] = []; - - for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const valueSchema: Schema = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.valueSchema - : schemaOrObjectProperty; - - if (isSchemaRequired(valueSchema)) { - requiredKeys.push(parsedKey as string); - } - } - + const breadcrumbsPrefix = opts?.breadcrumbsPrefix ?? []; return validateAndTransformObject({ value: parsed, - requiredKeys, + requiredKeys: getJsonRequiredKeys(), + requiredKeysSet: getJsonRequiredKeysSet(), getProperty: ( parsedKey, ): { transformedKey: string; transform: (propertyValue: object) => MaybeValid } | undefined => { @@ -114,26 +166,30 @@ export function object - property.valueSchema.json(propertyValue, { + transform: (propertyValue) => { + const childBreadcrumbs = [...breadcrumbsPrefix, parsedKey]; + return property.valueSchema.json(propertyValue, { ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], - }), + breadcrumbsPrefix: childBreadcrumbs, + }); + }, }; } else { return { transformedKey: parsedKey, - transform: (propertyValue) => - property.json(propertyValue, { + transform: (propertyValue) => { + const childBreadcrumbs = [...breadcrumbsPrefix, parsedKey]; + return property.json(propertyValue, { ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], - }), + breadcrumbsPrefix: childBreadcrumbs, + }); + }, }; } }, unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, skipValidation: opts?.skipValidation, - breadcrumbsPrefix: opts?.breadcrumbsPrefix, + breadcrumbsPrefix, omitUndefined: opts?.omitUndefined, }); }, @@ -152,6 +208,7 @@ export function object({ value, requiredKeys, + requiredKeysSet, getProperty, unrecognizedObjectKeys = "fail", skipValidation = false, @@ -159,6 +216,7 @@ function validateAndTransformObject({ }: { value: unknown; requiredKeys: string[]; + requiredKeysSet: Set; getProperty: ( preTransformedKey: string, ) => { transformedKey: string; transform: (propertyValue: object) => MaybeValid } | undefined; @@ -179,15 +237,23 @@ function validateAndTransformObject({ }; } - const missingRequiredKeys = new Set(requiredKeys); + // Track which required keys have been seen. + // Use a counter instead of copying the Set to avoid per-call allocation. + let missingRequiredCount = requiredKeys.length; const errors: ValidationError[] = []; const transformed: Record = {}; - for (const [preTransformedKey, preTransformedItemValue] of Object.entries(value)) { + for (const preTransformedKey in value) { + if (!_hasOwn.call(value, preTransformedKey)) { + continue; + } + const preTransformedItemValue = value[preTransformedKey]; const property = getProperty(preTransformedKey); if (property != null) { - missingRequiredKeys.delete(preTransformedKey); + if (missingRequiredCount > 0 && requiredKeysSet.has(preTransformedKey)) { + missingRequiredCount--; + } const value = property.transform(preTransformedItemValue as object); if (value.ok) { @@ -213,14 +279,16 @@ function validateAndTransformObject({ } } - errors.push( - ...requiredKeys - .filter((key) => missingRequiredKeys.has(key)) - .map((key) => ({ - path: breadcrumbsPrefix, - message: `Missing required key "${key}"`, - })), - ); + if (missingRequiredCount > 0) { + for (const key of requiredKeys) { + if (!(key in (value as Record))) { + errors.push({ + path: breadcrumbsPrefix, + message: `Missing required key "${key}"`, + }); + } + } + } if (errors.length === 0 || skipValidation) { return { @@ -270,6 +338,8 @@ export function getObjectUtils(schema: BaseObjectSchema { + const knownRawKeys = new Set(schema._getRawProperties() as string[]); + const knownParsedKeys = new Set(schema._getParsedProperties() as string[]); const baseSchema: BaseObjectSchema = { _getParsedProperties: () => schema._getParsedProperties(), @@ -279,10 +349,18 @@ export function getObjectUtils(schema: BaseObjectSchema = {}; + if (typeof raw === "object" && raw != null) { + for (const [key, value] of Object.entries(raw)) { + if (!knownRawKeys.has(key)) { + extraProperties[key] = value; + } + } + } return { ok: true, value: { - ...(raw as any), + ...extraProperties, ...transformed.value, }, }; @@ -292,10 +370,18 @@ export function getObjectUtils(schema: BaseObjectSchema = {}; + if (typeof parsed === "object" && parsed != null) { + for (const [key, value] of Object.entries(parsed)) { + if (!knownParsedKeys.has(key)) { + extraProperties[key] = value; + } + } + } return { ok: true, value: { - ...(parsed as any), + ...extraProperties, ...transformed.value, }, }; diff --git a/src/core/schemas/builders/object/types.ts b/src/core/schemas/builders/object/types.ts index 735d14fc4..384ae873f 100644 --- a/src/core/schemas/builders/object/types.ts +++ b/src/core/schemas/builders/object/types.ts @@ -23,9 +23,8 @@ export interface ObjectUtils { export type inferRawObject> = O extends ObjectSchema ? Raw : never; -export type inferParsedObject> = O extends ObjectSchema - ? Parsed - : never; +export type inferParsedObject> = + O extends ObjectSchema ? Parsed : never; export type inferObjectSchemaFromPropertySchemas> = ObjectSchema< inferRawObjectFromPropertySchemas, @@ -47,25 +46,11 @@ export type PropertySchemas = Recor Property | Schema >; -export type inferRawPropertySchema

| Schema> = P extends Property< - any, - infer Raw, - any -> - ? Raw - : P extends Schema - ? inferRaw

- : never; +export type inferRawPropertySchema

| Schema> = + P extends Property ? Raw : P extends Schema ? inferRaw

: never; -export type inferParsedPropertySchema

| Schema> = P extends Property< - any, - any, - infer Parsed -> - ? Parsed - : P extends Schema - ? inferParsed

- : never; +export type inferParsedPropertySchema

| Schema> = + P extends Property ? Parsed : P extends Schema ? inferParsed

: never; export type inferRawKey< ParsedKey extends string | number | symbol, diff --git a/src/core/schemas/builders/record/record.ts b/src/core/schemas/builders/record/record.ts index a48966039..f107fbab7 100644 --- a/src/core/schemas/builders/record/record.ts +++ b/src/core/schemas/builders/record/record.ts @@ -1,11 +1,13 @@ import { type MaybeValid, type Schema, SchemaType, type ValidationError } from "../../Schema.js"; -import { entries } from "../../utils/entries.js"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType.js"; import { isPlainObject } from "../../utils/isPlainObject.js"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation.js"; import { getSchemaUtils } from "../schema-utils/index.js"; import type { BaseRecordSchema, RecordSchema } from "./types.js"; +// eslint-disable-next-line @typescript-eslint/unbound-method +const _hasOwn = Object.prototype.hasOwnProperty; + export function record( keySchema: Schema, valueSchema: Schema, @@ -79,51 +81,42 @@ function validateAndTransformRecord>>( - (accPromise, [stringKey, value]) => { - if (value === undefined) { - return accPromise; - } - - const acc = accPromise; - - let key: string | number = stringKey; - if (isKeyNumeric) { - const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; - if (!Number.isNaN(numberKey)) { - key = numberKey; - } - } - const transformedKey = transformKey(key); + const result = {} as Record; + const errors: ValidationError[] = []; - const transformedValue = transformValue(value, key); + for (const stringKey in value) { + if (!_hasOwn.call(value, stringKey)) { + continue; + } + const entryValue = (value as Record)[stringKey]; + if (entryValue === undefined) { + continue; + } - if (acc.ok && transformedKey.ok && transformedValue.ok) { - return { - ok: true, - value: { - ...acc.value, - [transformedKey.value]: transformedValue.value, - }, - }; + let key: string | number = stringKey; + if (isKeyNumeric) { + const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; + if (!Number.isNaN(numberKey)) { + key = numberKey; } + } + const transformedKey = transformKey(key); + const transformedValue = transformValue(entryValue, key); - const errors: ValidationError[] = []; - if (!acc.ok) { - errors.push(...acc.errors); - } + if (transformedKey.ok && transformedValue.ok) { + result[transformedKey.value] = transformedValue.value; + } else { if (!transformedKey.ok) { errors.push(...transformedKey.errors); } if (!transformedValue.ok) { errors.push(...transformedValue.errors); } + } + } - return { - ok: false, - errors, - }; - }, - { ok: true, value: {} as Record }, - ); + if (errors.length === 0) { + return { ok: true, value: result }; + } + return { ok: false, errors }; } diff --git a/src/core/schemas/builders/union/union.ts b/src/core/schemas/builders/union/union.ts index 509658e0e..fa993fdc0 100644 --- a/src/core/schemas/builders/union/union.ts +++ b/src/core/schemas/builders/union/union.ts @@ -16,6 +16,9 @@ import type { UnionSubtypes, } from "./types.js"; +// eslint-disable-next-line @typescript-eslint/unbound-method +const _hasOwn = Object.prototype.hasOwnProperty; + export function union, U extends UnionSubtypes>( discriminant: D, union: U, @@ -112,7 +115,13 @@ function transformAndValidateUnion< }; } - const { [discriminant]: discriminantValue, ...additionalProperties } = value; + const discriminantValue = value[discriminant]; + const additionalProperties: Record = {}; + for (const key in value) { + if (_hasOwn.call(value, key) && key !== discriminant) { + additionalProperties[key] = value[key]; + } + } if (discriminantValue == null) { return { diff --git a/src/core/schemas/utils/isPlainObject.ts b/src/core/schemas/utils/isPlainObject.ts index db82a722c..32a17e05f 100644 --- a/src/core/schemas/utils/isPlainObject.ts +++ b/src/core/schemas/utils/isPlainObject.ts @@ -4,14 +4,11 @@ export function isPlainObject(value: unknown): value is Record return false; } - if (Object.getPrototypeOf(value) === null) { + const proto = Object.getPrototypeOf(value); + if (proto === null) { return true; } - let proto = value; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - - return Object.getPrototypeOf(value) === proto; + // Check that the prototype chain has exactly one level (i.e., proto is Object.prototype) + return Object.getPrototypeOf(proto) === null; } diff --git a/src/serialization/resources/compendium/client/index.ts b/src/serialization/resources/compendium/client/index.ts new file mode 100644 index 000000000..195f9aa8a --- /dev/null +++ b/src/serialization/resources/compendium/client/index.ts @@ -0,0 +1 @@ +export * from "./requests/index.js"; diff --git a/src/serialization/resources/compendium/client/requests/ConvertCompendiumBody.ts b/src/serialization/resources/compendium/client/requests/ConvertCompendiumBody.ts new file mode 100644 index 000000000..411c88e1b --- /dev/null +++ b/src/serialization/resources/compendium/client/requests/ConvertCompendiumBody.ts @@ -0,0 +1,28 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../../../../api/index.js"; +import * as core from "../../../../../core/index.js"; +import type * as serializers from "../../../../index.js"; +import { CompendiumSearchLabs } from "../../../../types/CompendiumSearchLabs.js"; + +export const ConvertCompendiumBody: core.serialization.Schema< + serializers.ConvertCompendiumBody.Raw, + Vital.ConvertCompendiumBody +> = core.serialization.object({ + labTestId: core.serialization.property("lab_test_id", core.serialization.string().optional()), + providerIds: core.serialization.property( + "provider_ids", + core.serialization.list(core.serialization.string()).optional(), + ), + targetLab: core.serialization.property("target_lab", CompendiumSearchLabs), + limit: core.serialization.number().optional(), +}); + +export declare namespace ConvertCompendiumBody { + export interface Raw { + lab_test_id?: string | null; + provider_ids?: string[] | null; + target_lab: CompendiumSearchLabs.Raw; + limit?: number | null; + } +} diff --git a/src/serialization/resources/compendium/client/requests/SearchCompendiumBody.ts b/src/serialization/resources/compendium/client/requests/SearchCompendiumBody.ts new file mode 100644 index 000000000..265b019d3 --- /dev/null +++ b/src/serialization/resources/compendium/client/requests/SearchCompendiumBody.ts @@ -0,0 +1,32 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../../../../api/index.js"; +import * as core from "../../../../../core/index.js"; +import type * as serializers from "../../../../index.js"; +import { CompendiumSearchLabs } from "../../../../types/CompendiumSearchLabs.js"; +import { SearchMode } from "../../../../types/SearchMode.js"; + +export const SearchCompendiumBody: core.serialization.Schema< + serializers.SearchCompendiumBody.Raw, + Vital.SearchCompendiumBody +> = core.serialization.object({ + mode: SearchMode, + query: core.serialization.string().optional(), + cptCodes: core.serialization.property("cpt_codes", core.serialization.list(core.serialization.string()).optional()), + loincSetHash: core.serialization.property("loinc_set_hash", core.serialization.string().optional()), + labs: core.serialization.list(CompendiumSearchLabs).optional(), + includeRelated: core.serialization.property("include_related", core.serialization.boolean().optional()), + limit: core.serialization.number().optional(), +}); + +export declare namespace SearchCompendiumBody { + export interface Raw { + mode: SearchMode.Raw; + query?: string | null; + cpt_codes?: string[] | null; + loinc_set_hash?: string | null; + labs?: CompendiumSearchLabs.Raw[] | null; + include_related?: boolean | null; + limit?: number | null; + } +} diff --git a/src/serialization/resources/compendium/client/requests/index.ts b/src/serialization/resources/compendium/client/requests/index.ts new file mode 100644 index 000000000..003fec611 --- /dev/null +++ b/src/serialization/resources/compendium/client/requests/index.ts @@ -0,0 +1,2 @@ +export { ConvertCompendiumBody } from "./ConvertCompendiumBody.js"; +export { SearchCompendiumBody } from "./SearchCompendiumBody.js"; diff --git a/src/serialization/resources/compendium/index.ts b/src/serialization/resources/compendium/index.ts new file mode 100644 index 000000000..914b8c3c7 --- /dev/null +++ b/src/serialization/resources/compendium/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index af379e5ac..e6dc48bc4 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,6 +1,8 @@ export * from "./aggregate/client/requests/index.js"; export * as aggregate from "./aggregate/index.js"; export * from "./aggregate/types/index.js"; +export * from "./compendium/client/requests/index.js"; +export * as compendium from "./compendium/index.js"; export * from "./insurance/client/requests/index.js"; export * as insurance from "./insurance/index.js"; export * from "./labTests/client/requests/index.js"; @@ -8,7 +10,6 @@ export * as labTests from "./labTests/index.js"; export * from "./labTests/types/index.js"; export * from "./link/client/requests/index.js"; export * as link from "./link/index.js"; -export * from "./link/types/index.js"; export * from "./order/client/requests/index.js"; export * as order from "./order/index.js"; export * from "./payor/client/requests/index.js"; diff --git a/src/serialization/resources/labTests/client/requests/CreateLabTestRequest.ts b/src/serialization/resources/labTests/client/requests/CreateLabTestRequest.ts index 713abb227..4ac053dd9 100644 --- a/src/serialization/resources/labTests/client/requests/CreateLabTestRequest.ts +++ b/src/serialization/resources/labTests/client/requests/CreateLabTestRequest.ts @@ -3,6 +3,7 @@ import type * as Vital from "../../../../../api/index.js"; import * as core from "../../../../../core/index.js"; import type * as serializers from "../../../../index.js"; +import { Labs } from "../../../../types/Labs.js"; import { LabTestCollectionMethod } from "../../../../types/LabTestCollectionMethod.js"; export const CreateLabTestRequest: core.serialization.Schema< @@ -21,6 +22,8 @@ export const CreateLabTestRequest: core.serialization.Schema< method: LabTestCollectionMethod, description: core.serialization.string(), fasting: core.serialization.boolean().optional(), + labAccountId: core.serialization.property("lab_account_id", core.serialization.string().optional()), + labSlug: core.serialization.property("lab_slug", Labs.optional()), }); export declare namespace CreateLabTestRequest { @@ -31,5 +34,7 @@ export declare namespace CreateLabTestRequest { method: LabTestCollectionMethod.Raw; description: string; fasting?: boolean | null; + lab_account_id?: string | null; + lab_slug?: Labs.Raw | null; } } diff --git a/src/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.ts b/src/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.ts index 562d8ca76..b78e31b73 100644 --- a/src/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.ts +++ b/src/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.ts @@ -30,6 +30,7 @@ export const CreateOrderRequestCompatible: core.serialization.Schema< activateBy: core.serialization.property("activate_by", core.serialization.string().optional()), aoeAnswers: core.serialization.property("aoe_answers", core.serialization.list(AoEAnswer).optional()), passthrough: core.serialization.string().optional(), + clinicalNotes: core.serialization.property("clinical_notes", core.serialization.string().optional()), labAccountId: core.serialization.property("lab_account_id", core.serialization.string().optional()), creatorMemberId: core.serialization.property("creator_member_id", core.serialization.string().optional()), patientDetails: core.serialization.property("patient_details", PatientDetailsWithValidation), @@ -51,6 +52,7 @@ export declare namespace CreateOrderRequestCompatible { activate_by?: string | null; aoe_answers?: AoEAnswer.Raw[] | null; passthrough?: string | null; + clinical_notes?: string | null; lab_account_id?: string | null; creator_member_id?: string | null; patient_details: PatientDetailsWithValidation.Raw; diff --git a/src/serialization/resources/labTests/client/requests/RequestAppointmentRequest.ts b/src/serialization/resources/labTests/client/requests/RequestAppointmentRequest.ts index fa3ec4594..ca58b00b4 100644 --- a/src/serialization/resources/labTests/client/requests/RequestAppointmentRequest.ts +++ b/src/serialization/resources/labTests/client/requests/RequestAppointmentRequest.ts @@ -12,11 +12,13 @@ export const RequestAppointmentRequest: core.serialization.Schema< > = core.serialization.object({ address: UsAddress, provider: AppointmentProvider, + appointmentNotes: core.serialization.property("appointment_notes", core.serialization.string().optional()), }); export declare namespace RequestAppointmentRequest { export interface Raw { address: UsAddress.Raw; provider: AppointmentProvider.Raw; + appointment_notes?: string | null; } } diff --git a/src/serialization/resources/link/client/requests/BulkExportConnectionsBody.ts b/src/serialization/resources/link/client/requests/BulkExportConnectionsBody.ts index f93f9f67c..df1604b54 100644 --- a/src/serialization/resources/link/client/requests/BulkExportConnectionsBody.ts +++ b/src/serialization/resources/link/client/requests/BulkExportConnectionsBody.ts @@ -7,7 +7,7 @@ import { OAuthProviders } from "../../../../types/OAuthProviders.js"; export const BulkExportConnectionsBody: core.serialization.Schema< serializers.BulkExportConnectionsBody.Raw, - Omit + Vital.BulkExportConnectionsBody > = core.serialization.object({ userIds: core.serialization.property("user_ids", core.serialization.list(core.serialization.string()).optional()), provider: OAuthProviders, diff --git a/src/serialization/resources/link/client/requests/BulkImportConnectionsBody.ts b/src/serialization/resources/link/client/requests/BulkImportConnectionsBody.ts index ad137a7a5..49d318be6 100644 --- a/src/serialization/resources/link/client/requests/BulkImportConnectionsBody.ts +++ b/src/serialization/resources/link/client/requests/BulkImportConnectionsBody.ts @@ -8,7 +8,7 @@ import { OAuthProviders } from "../../../../types/OAuthProviders.js"; export const BulkImportConnectionsBody: core.serialization.Schema< serializers.BulkImportConnectionsBody.Raw, - Omit + Vital.BulkImportConnectionsBody > = core.serialization.object({ provider: OAuthProviders, connections: core.serialization.list(ConnectionRecipe), diff --git a/src/serialization/resources/link/client/requests/BulkPauseConnectionsBody.ts b/src/serialization/resources/link/client/requests/BulkPauseConnectionsBody.ts index 79ce8a718..b6c148af2 100644 --- a/src/serialization/resources/link/client/requests/BulkPauseConnectionsBody.ts +++ b/src/serialization/resources/link/client/requests/BulkPauseConnectionsBody.ts @@ -7,7 +7,7 @@ import { OAuthProviders } from "../../../../types/OAuthProviders.js"; export const BulkPauseConnectionsBody: core.serialization.Schema< serializers.BulkPauseConnectionsBody.Raw, - Omit + Vital.BulkPauseConnectionsBody > = core.serialization.object({ userIds: core.serialization.property("user_ids", core.serialization.list(core.serialization.string())), provider: OAuthProviders, diff --git a/src/serialization/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts b/src/serialization/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts index d9950785b..f25a5a20b 100644 --- a/src/serialization/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts +++ b/src/serialization/resources/link/client/requests/BulkTriggerHistoricalPullBody.ts @@ -7,7 +7,7 @@ import { OAuthProviders } from "../../../../types/OAuthProviders.js"; export const BulkTriggerHistoricalPullBody: core.serialization.Schema< serializers.BulkTriggerHistoricalPullBody.Raw, - Omit + Vital.BulkTriggerHistoricalPullBody > = core.serialization.object({ userIds: core.serialization.property("user_ids", core.serialization.list(core.serialization.string())), provider: OAuthProviders, diff --git a/src/serialization/resources/link/client/requests/ManualConnectionData.ts b/src/serialization/resources/link/client/requests/ManualConnectionData.ts index 405a32540..d285fdb6f 100644 --- a/src/serialization/resources/link/client/requests/ManualConnectionData.ts +++ b/src/serialization/resources/link/client/requests/ManualConnectionData.ts @@ -6,15 +6,20 @@ import type * as serializers from "../../../../index.js"; export const ManualConnectionData: core.serialization.Schema< serializers.ManualConnectionData.Raw, - Vital.ManualConnectionData + Omit > = core.serialization.object({ userId: core.serialization.property("user_id", core.serialization.string()), providerId: core.serialization.property("provider_id", core.serialization.string().optional()), + grantedPermissions: core.serialization.property( + "granted_permissions", + core.serialization.list(core.serialization.string()).optional(), + ), }); export declare namespace ManualConnectionData { export interface Raw { user_id: string; provider_id?: string | null; + granted_permissions?: string[] | null; } } diff --git a/src/serialization/resources/link/index.ts b/src/serialization/resources/link/index.ts index d9adb1af9..914b8c3c7 100644 --- a/src/serialization/resources/link/index.ts +++ b/src/serialization/resources/link/index.ts @@ -1,2 +1 @@ export * from "./client/index.js"; -export * from "./types/index.js"; diff --git a/src/serialization/resources/link/types/LinkBulkExportRequestTeamId.ts b/src/serialization/resources/link/types/LinkBulkExportRequestTeamId.ts deleted file mode 100644 index 1673275d4..000000000 --- a/src/serialization/resources/link/types/LinkBulkExportRequestTeamId.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Vital from "../../../../api/index.js"; -import * as core from "../../../../core/index.js"; -import type * as serializers from "../../../index.js"; - -export const LinkBulkExportRequestTeamId: core.serialization.Schema< - serializers.LinkBulkExportRequestTeamId.Raw, - Vital.LinkBulkExportRequestTeamId -> = core.serialization.enum_(["infer_from_context"]); - -export declare namespace LinkBulkExportRequestTeamId { - export type Raw = "infer_from_context"; -} diff --git a/src/serialization/resources/link/types/LinkBulkImportRequestTeamId.ts b/src/serialization/resources/link/types/LinkBulkImportRequestTeamId.ts deleted file mode 100644 index 297f66e2d..000000000 --- a/src/serialization/resources/link/types/LinkBulkImportRequestTeamId.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Vital from "../../../../api/index.js"; -import * as core from "../../../../core/index.js"; -import type * as serializers from "../../../index.js"; - -export const LinkBulkImportRequestTeamId: core.serialization.Schema< - serializers.LinkBulkImportRequestTeamId.Raw, - Vital.LinkBulkImportRequestTeamId -> = core.serialization.enum_(["infer_from_context"]); - -export declare namespace LinkBulkImportRequestTeamId { - export type Raw = "infer_from_context"; -} diff --git a/src/serialization/resources/link/types/LinkBulkPauseRequestTeamId.ts b/src/serialization/resources/link/types/LinkBulkPauseRequestTeamId.ts deleted file mode 100644 index 6f5c40fda..000000000 --- a/src/serialization/resources/link/types/LinkBulkPauseRequestTeamId.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Vital from "../../../../api/index.js"; -import * as core from "../../../../core/index.js"; -import type * as serializers from "../../../index.js"; - -export const LinkBulkPauseRequestTeamId: core.serialization.Schema< - serializers.LinkBulkPauseRequestTeamId.Raw, - Vital.LinkBulkPauseRequestTeamId -> = core.serialization.enum_(["infer_from_context"]); - -export declare namespace LinkBulkPauseRequestTeamId { - export type Raw = "infer_from_context"; -} diff --git a/src/serialization/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts b/src/serialization/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts deleted file mode 100644 index 6b79da0f9..000000000 --- a/src/serialization/resources/link/types/LinkBulkTriggerHistoricalPullRequestTeamId.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Vital from "../../../../api/index.js"; -import * as core from "../../../../core/index.js"; -import type * as serializers from "../../../index.js"; - -export const LinkBulkTriggerHistoricalPullRequestTeamId: core.serialization.Schema< - serializers.LinkBulkTriggerHistoricalPullRequestTeamId.Raw, - Vital.LinkBulkTriggerHistoricalPullRequestTeamId -> = core.serialization.enum_(["infer_from_context"]); - -export declare namespace LinkBulkTriggerHistoricalPullRequestTeamId { - export type Raw = "infer_from_context"; -} diff --git a/src/serialization/resources/link/types/LinkListBulkOpsRequestTeamId.ts b/src/serialization/resources/link/types/LinkListBulkOpsRequestTeamId.ts deleted file mode 100644 index e7ed980d7..000000000 --- a/src/serialization/resources/link/types/LinkListBulkOpsRequestTeamId.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Vital from "../../../../api/index.js"; -import * as core from "../../../../core/index.js"; -import type * as serializers from "../../../index.js"; - -export const LinkListBulkOpsRequestTeamId: core.serialization.Schema< - serializers.LinkListBulkOpsRequestTeamId.Raw, - Vital.LinkListBulkOpsRequestTeamId -> = core.serialization.enum_(["infer_from_context"]); - -export declare namespace LinkListBulkOpsRequestTeamId { - export type Raw = "infer_from_context"; -} diff --git a/src/serialization/resources/link/types/index.ts b/src/serialization/resources/link/types/index.ts deleted file mode 100644 index 2d2b3b335..000000000 --- a/src/serialization/resources/link/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./LinkBulkExportRequestTeamId.js"; -export * from "./LinkBulkImportRequestTeamId.js"; -export * from "./LinkBulkPauseRequestTeamId.js"; -export * from "./LinkBulkTriggerHistoricalPullRequestTeamId.js"; -export * from "./LinkListBulkOpsRequestTeamId.js"; diff --git a/src/serialization/resources/user/client/requests/UserInfoCreateRequest.ts b/src/serialization/resources/user/client/requests/UserInfoCreateRequest.ts index 8ea89113a..58e8a16d7 100644 --- a/src/serialization/resources/user/client/requests/UserInfoCreateRequest.ts +++ b/src/serialization/resources/user/client/requests/UserInfoCreateRequest.ts @@ -3,12 +3,12 @@ import type * as Vital from "../../../../../api/index.js"; import * as core from "../../../../../core/index.js"; import type * as serializers from "../../../../index.js"; -import { Address } from "../../../../types/Address.js"; import { Ethnicity } from "../../../../types/Ethnicity.js"; import { GenderIdentity } from "../../../../types/GenderIdentity.js"; import { GuarantorDetails } from "../../../../types/GuarantorDetails.js"; import { Race } from "../../../../types/Race.js"; import { SexualOrientation } from "../../../../types/SexualOrientation.js"; +import { UserAddress } from "../../../../types/UserAddress.js"; export const UserInfoCreateRequest: core.serialization.Schema< serializers.UserInfoCreateRequest.Raw, @@ -20,7 +20,7 @@ export const UserInfoCreateRequest: core.serialization.Schema< phoneNumber: core.serialization.property("phone_number", core.serialization.string()), gender: core.serialization.string(), dob: core.serialization.string(), - address: Address, + address: UserAddress, medicalProxy: core.serialization.property("medical_proxy", GuarantorDetails.optional()), race: Race.optional(), ethnicity: Ethnicity.optional(), @@ -36,7 +36,7 @@ export declare namespace UserInfoCreateRequest { phone_number: string; gender: string; dob: string; - address: Address.Raw; + address: UserAddress.Raw; medical_proxy?: GuarantorDetails.Raw | null; race?: Race.Raw | null; ethnicity?: Ethnicity.Raw | null; diff --git a/src/serialization/types/ActivityV2InDb.ts b/src/serialization/types/ActivityV2InDb.ts index a4f516589..4de57f007 100644 --- a/src/serialization/types/ActivityV2InDb.ts +++ b/src/serialization/types/ActivityV2InDb.ts @@ -9,29 +9,29 @@ export const ActivityV2InDb: core.serialization.ObjectSchema; - provider_id: string; user_id: string; + provider_id: string; source_id: number; priority_id: number; id: string; - source: ClientFacingProvider.Raw; source_device_id?: string | null; created_at?: string | null; updated_at?: string | null; + source: ClientFacingProvider.Raw; } } diff --git a/src/serialization/types/Address.ts b/src/serialization/types/Address.ts index 84e0c8466..92471f9bc 100644 --- a/src/serialization/types/Address.ts +++ b/src/serialization/types/Address.ts @@ -12,6 +12,7 @@ export const Address: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([ SleepColumnExpr, + DerivedReadinessColumnExpr, ActivityColumnExpr, WorkoutColumnExpr, BodyColumnExpr, MealColumnExpr, + MenstrualCycleColumnExpr, ProfileColumnExpr, SleepScoreValueMacroExpr, ChronotypeValueMacroExpr, AsleepAtValueMacroExpr, AwakeAtValueMacroExpr, + AwakeningsValueMacroExpr, UnrecognizedValueMacroExpr, DiscreteTimeseriesExpr, IntervalTimeseriesExpr, + InsulinInjectionTimeseriesExpr, BloodPressureTimeseriesExpr, TemperatureTimeseriesExpr, WorkoutDurationTimeseriesExpr, NoteTimeseriesExpr, IndexColumnExpr, + ScalarOutputSubqueryExpr, ]); export declare namespace AggregateExprArg { export type Raw = | SleepColumnExpr.Raw + | DerivedReadinessColumnExpr.Raw | ActivityColumnExpr.Raw | WorkoutColumnExpr.Raw | BodyColumnExpr.Raw | MealColumnExpr.Raw + | MenstrualCycleColumnExpr.Raw | ProfileColumnExpr.Raw | SleepScoreValueMacroExpr.Raw | ChronotypeValueMacroExpr.Raw | AsleepAtValueMacroExpr.Raw | AwakeAtValueMacroExpr.Raw + | AwakeningsValueMacroExpr.Raw | UnrecognizedValueMacroExpr.Raw | DiscreteTimeseriesExpr.Raw | IntervalTimeseriesExpr.Raw + | InsulinInjectionTimeseriesExpr.Raw | BloodPressureTimeseriesExpr.Raw | TemperatureTimeseriesExpr.Raw | WorkoutDurationTimeseriesExpr.Raw | NoteTimeseriesExpr.Raw - | IndexColumnExpr.Raw; + | IndexColumnExpr.Raw + | ScalarOutputSubqueryExpr.Raw; } diff --git a/src/serialization/types/AggregateFieldExpr.ts b/src/serialization/types/AggregateFieldExpr.ts new file mode 100644 index 000000000..c95929d33 --- /dev/null +++ b/src/serialization/types/AggregateFieldExpr.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { AggregateFieldExprArg } from "./AggregateFieldExprArg.js"; +import { AggregateFieldExprFunc } from "./AggregateFieldExprFunc.js"; + +export const AggregateFieldExpr: core.serialization.ObjectSchema< + serializers.AggregateFieldExpr.Raw, + Vital.AggregateFieldExpr +> = core.serialization.object({ + func: AggregateFieldExprFunc, + arg: AggregateFieldExprArg.optional(), +}); + +export declare namespace AggregateFieldExpr { + export interface Raw { + func: AggregateFieldExprFunc.Raw; + arg?: AggregateFieldExprArg.Raw | null; + } +} diff --git a/src/serialization/types/AggregateFieldExprArg.ts b/src/serialization/types/AggregateFieldExprArg.ts new file mode 100644 index 000000000..724a8d0c7 --- /dev/null +++ b/src/serialization/types/AggregateFieldExprArg.ts @@ -0,0 +1,48 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ElementFieldExpr } from "./ElementFieldExpr.js"; +import { McBasalBodyTemperatureFieldExpr } from "./McBasalBodyTemperatureFieldExpr.js"; +import { McCervicalMucusFieldExpr } from "./McCervicalMucusFieldExpr.js"; +import { McContraceptiveFieldExpr } from "./McContraceptiveFieldExpr.js"; +import { McDetectedDeviationsFieldExpr } from "./McDetectedDeviationsFieldExpr.js"; +import { McHomePregnancyTestFieldExpr } from "./McHomePregnancyTestFieldExpr.js"; +import { McHomeProgesteroneTestFieldExpr } from "./McHomeProgesteroneTestFieldExpr.js"; +import { McIntermenstrualBleedingFieldExpr } from "./McIntermenstrualBleedingFieldExpr.js"; +import { McMenstrualFlowFieldExpr } from "./McMenstrualFlowFieldExpr.js"; +import { McOvulationTestFieldExpr } from "./McOvulationTestFieldExpr.js"; +import { McSexualActivityFieldExpr } from "./McSexualActivityFieldExpr.js"; + +export const AggregateFieldExprArg: core.serialization.Schema< + serializers.AggregateFieldExprArg.Raw, + Vital.AggregateFieldExprArg +> = core.serialization.undiscriminatedUnion([ + McMenstrualFlowFieldExpr, + McCervicalMucusFieldExpr, + McIntermenstrualBleedingFieldExpr, + McContraceptiveFieldExpr, + McDetectedDeviationsFieldExpr, + McOvulationTestFieldExpr, + McHomePregnancyTestFieldExpr, + McHomeProgesteroneTestFieldExpr, + McSexualActivityFieldExpr, + McBasalBodyTemperatureFieldExpr, + ElementFieldExpr, +]); + +export declare namespace AggregateFieldExprArg { + export type Raw = + | McMenstrualFlowFieldExpr.Raw + | McCervicalMucusFieldExpr.Raw + | McIntermenstrualBleedingFieldExpr.Raw + | McContraceptiveFieldExpr.Raw + | McDetectedDeviationsFieldExpr.Raw + | McOvulationTestFieldExpr.Raw + | McHomePregnancyTestFieldExpr.Raw + | McHomeProgesteroneTestFieldExpr.Raw + | McSexualActivityFieldExpr.Raw + | McBasalBodyTemperatureFieldExpr.Raw + | ElementFieldExpr.Raw; +} diff --git a/src/serialization/types/AggregateFieldExprFunc.ts b/src/serialization/types/AggregateFieldExprFunc.ts new file mode 100644 index 000000000..0e1683384 --- /dev/null +++ b/src/serialization/types/AggregateFieldExprFunc.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const AggregateFieldExprFunc: core.serialization.Schema< + serializers.AggregateFieldExprFunc.Raw, + Vital.AggregateFieldExprFunc +> = core.serialization.enum_(["mean", "min", "max", "sum", "count", "median", "stddev", "oldest", "newest"]); + +export declare namespace AggregateFieldExprFunc { + export type Raw = "mean" | "min" | "max" | "sum" | "count" | "median" | "stddev" | "oldest" | "newest"; +} diff --git a/src/serialization/types/AppointmentBookingRequest.ts b/src/serialization/types/AppointmentBookingRequest.ts index 982af04f9..9e2ee20ef 100644 --- a/src/serialization/types/AppointmentBookingRequest.ts +++ b/src/serialization/types/AppointmentBookingRequest.ts @@ -9,10 +9,24 @@ export const AppointmentBookingRequest: core.serialization.ObjectSchema< Vital.AppointmentBookingRequest > = core.serialization.object({ bookingKey: core.serialization.property("booking_key", core.serialization.string()), + appointmentNotes: core.serialization.property("appointment_notes", core.serialization.string().optional()), + asyncConfirmation: core.serialization.property("async_confirmation", core.serialization.boolean().optional()), + syncConfirmationTimeoutMillisecond: core.serialization.property( + "sync_confirmation_timeout_millisecond", + core.serialization.number().optional(), + ), + asyncConfirmationTimeoutMillisecond: core.serialization.property( + "async_confirmation_timeout_millisecond", + core.serialization.number().optional(), + ), }); export declare namespace AppointmentBookingRequest { export interface Raw { booking_key: string; + appointment_notes?: string | null; + async_confirmation?: boolean | null; + sync_confirmation_timeout_millisecond?: number | null; + async_confirmation_timeout_millisecond?: number | null; } } diff --git a/src/serialization/types/AppointmentProvider.ts b/src/serialization/types/AppointmentProvider.ts index b1b656b0c..0d17df48d 100644 --- a/src/serialization/types/AppointmentProvider.ts +++ b/src/serialization/types/AppointmentProvider.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index.js"; export const AppointmentProvider: core.serialization.Schema< serializers.AppointmentProvider.Raw, Vital.AppointmentProvider -> = core.serialization.enum_(["getlabs", "phlebfinders", "quest"]); +> = core.serialization.enum_(["getlabs", "phlebfinders", "quest", "sonora_quest"]); export declare namespace AppointmentProvider { - export type Raw = "getlabs" | "phlebfinders" | "quest"; + export type Raw = "getlabs" | "phlebfinders" | "quest" | "sonora_quest"; } diff --git a/src/serialization/types/AppointmentPscLabs.ts b/src/serialization/types/AppointmentPscLabs.ts index ea8291ef4..5703da076 100644 --- a/src/serialization/types/AppointmentPscLabs.ts +++ b/src/serialization/types/AppointmentPscLabs.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index.js"; export const AppointmentPscLabs: core.serialization.Schema< serializers.AppointmentPscLabs.Raw, Vital.AppointmentPscLabs -> = core.serialization.stringLiteral("quest"); +> = core.serialization.enum_(["quest", "sonora_quest"]); export declare namespace AppointmentPscLabs { - export type Raw = "quest"; + export type Raw = "quest" | "sonora_quest"; } diff --git a/src/serialization/types/AppointmentRescheduleRequest.ts b/src/serialization/types/AppointmentRescheduleRequest.ts index ee0761183..3e57d5b46 100644 --- a/src/serialization/types/AppointmentRescheduleRequest.ts +++ b/src/serialization/types/AppointmentRescheduleRequest.ts @@ -9,10 +9,12 @@ export const AppointmentRescheduleRequest: core.serialization.ObjectSchema< Vital.AppointmentRescheduleRequest > = core.serialization.object({ bookingKey: core.serialization.property("booking_key", core.serialization.string()), + appointmentNotes: core.serialization.property("appointment_notes", core.serialization.string().optional()), }); export declare namespace AppointmentRescheduleRequest { export interface Raw { booking_key: string; + appointment_notes?: string | null; } } diff --git a/src/serialization/types/AwakeningsValueMacroExpr.ts b/src/serialization/types/AwakeningsValueMacroExpr.ts new file mode 100644 index 000000000..eea18b671 --- /dev/null +++ b/src/serialization/types/AwakeningsValueMacroExpr.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const AwakeningsValueMacroExpr: core.serialization.ObjectSchema< + serializers.AwakeningsValueMacroExpr.Raw, + Vital.AwakeningsValueMacroExpr +> = core.serialization.object({ + valueMacro: core.serialization.property("value_macro", core.serialization.stringLiteral("awakenings")), + version: core.serialization.stringLiteral("automatic").optional(), +}); + +export declare namespace AwakeningsValueMacroExpr { + export interface Raw { + value_macro: "awakenings"; + version?: "automatic" | null; + } +} diff --git a/src/serialization/types/BodyV2InDb.ts b/src/serialization/types/BodyV2InDb.ts index 9c0777a59..1e293acfd 100644 --- a/src/serialization/types/BodyV2InDb.ts +++ b/src/serialization/types/BodyV2InDb.ts @@ -9,31 +9,31 @@ export const BodyV2InDb: core.serialization.ObjectSchema; - provider_id: string; user_id: string; + provider_id: string; source_id: number; priority_id?: number | null; id: string; - source?: ClientFacingProvider.Raw | null; - priority?: number | null; source_device_id?: string | null; created_at?: string | null; updated_at?: string | null; + priority?: number | null; + source: ClientFacingProvider.Raw; } } diff --git a/src/serialization/types/CanonicalCandidate.ts b/src/serialization/types/CanonicalCandidate.ts new file mode 100644 index 000000000..7e7024a63 --- /dev/null +++ b/src/serialization/types/CanonicalCandidate.ts @@ -0,0 +1,48 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const CanonicalCandidate: core.serialization.ObjectSchema< + serializers.CanonicalCandidate.Raw, + Vital.CanonicalCandidate +> = core.serialization.object({ + loincSetHash: core.serialization.property("loinc_set_hash", core.serialization.string()), + displayName: core.serialization.property("display_name", core.serialization.string()), + aliases: core.serialization.list(core.serialization.string()).optional(), + loincCodes: core.serialization.property( + "loinc_codes", + core.serialization.list(core.serialization.string()).optional(), + ), + providerIds: core.serialization.property( + "provider_ids", + core.serialization.list(core.serialization.string()).optional(), + ), + loincComponents: core.serialization.property( + "loinc_components", + core.serialization.list(core.serialization.string()).optional(), + ), + loincGroups: core.serialization.property( + "loinc_groups", + core.serialization.list(core.serialization.string()).optional(), + ), + cptCodes: core.serialization.property("cpt_codes", core.serialization.list(core.serialization.string()).optional()), + popularityScore: core.serialization.property("popularity_score", core.serialization.number()), + confidence: core.serialization.number(), +}); + +export declare namespace CanonicalCandidate { + export interface Raw { + loinc_set_hash: string; + display_name: string; + aliases?: string[] | null; + loinc_codes?: string[] | null; + provider_ids?: string[] | null; + loinc_components?: string[] | null; + loinc_groups?: string[] | null; + cpt_codes?: string[] | null; + popularity_score: number; + confidence: number; + } +} diff --git a/src/serialization/types/ClientFacingActivity.ts b/src/serialization/types/ClientFacingActivity.ts index efdf028d4..93650a01f 100644 --- a/src/serialization/types/ClientFacingActivity.ts +++ b/src/serialization/types/ClientFacingActivity.ts @@ -27,7 +27,7 @@ export const ClientFacingActivity: core.serialization.ObjectSchema< timeZone: core.serialization.property("time_zone", core.serialization.string().optional()), timezoneOffset: core.serialization.property("timezone_offset", core.serialization.number().optional()), heartRate: core.serialization.property("heart_rate", ClientFacingHeartRate.optional()), - wheelchairUse: core.serialization.property("wheelchair_use", core.serialization.boolean().optional()), + wheelchairUse: core.serialization.property("wheelchair_use", core.serialization.booleanLiteral(true).optional()), wheelchairPush: core.serialization.property("wheelchair_push", core.serialization.number().optional()), createdAt: core.serialization.property("created_at", core.serialization.date()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), @@ -52,7 +52,7 @@ export declare namespace ClientFacingActivity { time_zone?: string | null; timezone_offset?: number | null; heart_rate?: ClientFacingHeartRate.Raw | null; - wheelchair_use?: boolean | null; + wheelchair_use?: true | null; wheelchair_push?: number | null; created_at: string; updated_at: string; diff --git a/src/serialization/types/ClientFacingAppointment.ts b/src/serialization/types/ClientFacingAppointment.ts index 027abcb04..9d9fa5a45 100644 --- a/src/serialization/types/ClientFacingAppointment.ts +++ b/src/serialization/types/ClientFacingAppointment.ts @@ -18,6 +18,7 @@ export const ClientFacingAppointment: core.serialization.ObjectSchema< id: core.serialization.string(), userId: core.serialization.property("user_id", core.serialization.string()), orderId: core.serialization.property("order_id", core.serialization.string()), + orderTransactionId: core.serialization.property("order_transaction_id", core.serialization.string().optional()), address: UsAddress, location: LngLat, startAt: core.serialization.property("start_at", core.serialization.date().optional()), @@ -29,6 +30,7 @@ export const ClientFacingAppointment: core.serialization.ObjectSchema< providerId: core.serialization.property("provider_id", core.serialization.string()), externalId: core.serialization.property("external_id", core.serialization.string().optional()), canReschedule: core.serialization.property("can_reschedule", core.serialization.boolean()), + appointmentNotes: core.serialization.property("appointment_notes", core.serialization.string().optional()), eventStatus: core.serialization.property("event_status", AppointmentEventStatus), eventData: core.serialization.property( "event_data", @@ -42,6 +44,7 @@ export declare namespace ClientFacingAppointment { id: string; user_id: string; order_id: string; + order_transaction_id?: string | null; address: UsAddress.Raw; location: LngLat.Raw; start_at?: string | null; @@ -53,6 +56,7 @@ export declare namespace ClientFacingAppointment { provider_id: string; external_id?: string | null; can_reschedule: boolean; + appointment_notes?: string | null; event_status: AppointmentEventStatus.Raw; event_data?: Record | null; events: ClientFacingAppointmentEvent.Raw[]; diff --git a/src/serialization/types/ClientFacingDeviceSourceType.ts b/src/serialization/types/ClientFacingDeviceSourceType.ts index 9f9788e2d..bd55c55a8 100644 --- a/src/serialization/types/ClientFacingDeviceSourceType.ts +++ b/src/serialization/types/ClientFacingDeviceSourceType.ts @@ -17,6 +17,7 @@ export const ClientFacingDeviceSourceType: core.serialization.Schema< "cuff", "manual_scan", "automatic", + "insulin_pump", "scale", "chest_strap", "ring", @@ -36,6 +37,7 @@ export declare namespace ClientFacingDeviceSourceType { | "cuff" | "manual_scan" | "automatic" + | "insulin_pump" | "scale" | "chest_strap" | "ring" diff --git a/src/serialization/types/ClientFacingElectrocardiogramSourceType.ts b/src/serialization/types/ClientFacingElectrocardiogramSourceType.ts index fa4a6d3d5..2515f51d6 100644 --- a/src/serialization/types/ClientFacingElectrocardiogramSourceType.ts +++ b/src/serialization/types/ClientFacingElectrocardiogramSourceType.ts @@ -17,6 +17,7 @@ export const ClientFacingElectrocardiogramSourceType: core.serialization.Schema< "cuff", "manual_scan", "automatic", + "insulin_pump", "scale", "chest_strap", "ring", @@ -36,6 +37,7 @@ export declare namespace ClientFacingElectrocardiogramSourceType { | "cuff" | "manual_scan" | "automatic" + | "insulin_pump" | "scale" | "chest_strap" | "ring" diff --git a/src/serialization/types/ClientFacingInsulinInjectionSample.ts b/src/serialization/types/ClientFacingInsulinInjectionSample.ts index adeb426bb..838dd6817 100644 --- a/src/serialization/types/ClientFacingInsulinInjectionSample.ts +++ b/src/serialization/types/ClientFacingInsulinInjectionSample.ts @@ -3,6 +3,9 @@ import type * as Vital from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; +import { ClientFacingInsulinInjectionSampleBolusPurpose } from "./ClientFacingInsulinInjectionSampleBolusPurpose.js"; +import { ClientFacingInsulinInjectionSampleDeliveryForm } from "./ClientFacingInsulinInjectionSampleDeliveryForm.js"; +import { ClientFacingInsulinInjectionSampleDeliveryMode } from "./ClientFacingInsulinInjectionSampleDeliveryMode.js"; import { ClientFacingInsulinInjectionSampleType } from "./ClientFacingInsulinInjectionSampleType.js"; export const ClientFacingInsulinInjectionSample: core.serialization.ObjectSchema< @@ -17,6 +20,18 @@ export const ClientFacingInsulinInjectionSample: core.serialization.ObjectSchema start: core.serialization.date(), end: core.serialization.date(), value: core.serialization.number(), + deliveryMode: core.serialization.property( + "delivery_mode", + ClientFacingInsulinInjectionSampleDeliveryMode.optional(), + ), + deliveryForm: core.serialization.property( + "delivery_form", + ClientFacingInsulinInjectionSampleDeliveryForm.optional(), + ), + bolusPurpose: core.serialization.property( + "bolus_purpose", + ClientFacingInsulinInjectionSampleBolusPurpose.optional(), + ), }); export declare namespace ClientFacingInsulinInjectionSample { @@ -29,5 +44,8 @@ export declare namespace ClientFacingInsulinInjectionSample { start: string; end: string; value: number; + delivery_mode?: ClientFacingInsulinInjectionSampleDeliveryMode.Raw | null; + delivery_form?: ClientFacingInsulinInjectionSampleDeliveryForm.Raw | null; + bolus_purpose?: ClientFacingInsulinInjectionSampleBolusPurpose.Raw | null; } } diff --git a/src/serialization/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts b/src/serialization/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts new file mode 100644 index 000000000..224c60551 --- /dev/null +++ b/src/serialization/types/ClientFacingInsulinInjectionSampleBolusPurpose.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const ClientFacingInsulinInjectionSampleBolusPurpose: core.serialization.Schema< + serializers.ClientFacingInsulinInjectionSampleBolusPurpose.Raw, + Vital.ClientFacingInsulinInjectionSampleBolusPurpose +> = core.serialization.enum_(["meal", "correction", "mixed", "unknown"]); + +export declare namespace ClientFacingInsulinInjectionSampleBolusPurpose { + export type Raw = "meal" | "correction" | "mixed" | "unknown"; +} diff --git a/src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts b/src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts new file mode 100644 index 000000000..192e134bd --- /dev/null +++ b/src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryForm.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const ClientFacingInsulinInjectionSampleDeliveryForm: core.serialization.Schema< + serializers.ClientFacingInsulinInjectionSampleDeliveryForm.Raw, + Vital.ClientFacingInsulinInjectionSampleDeliveryForm +> = core.serialization.enum_(["standard", "extended"]); + +export declare namespace ClientFacingInsulinInjectionSampleDeliveryForm { + export type Raw = "standard" | "extended"; +} diff --git a/src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts b/src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts new file mode 100644 index 000000000..1f88a9731 --- /dev/null +++ b/src/serialization/types/ClientFacingInsulinInjectionSampleDeliveryMode.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const ClientFacingInsulinInjectionSampleDeliveryMode: core.serialization.Schema< + serializers.ClientFacingInsulinInjectionSampleDeliveryMode.Raw, + Vital.ClientFacingInsulinInjectionSampleDeliveryMode +> = core.serialization.enum_(["basal", "bolus"]); + +export declare namespace ClientFacingInsulinInjectionSampleDeliveryMode { + export type Raw = "basal" | "bolus"; +} diff --git a/src/serialization/types/ClientFacingLabAccount.ts b/src/serialization/types/ClientFacingLabAccount.ts new file mode 100644 index 000000000..2c6eb9c43 --- /dev/null +++ b/src/serialization/types/ClientFacingLabAccount.ts @@ -0,0 +1,51 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { LabAccountDelegatedFlow } from "./LabAccountDelegatedFlow.js"; +import { LabAccountStatus } from "./LabAccountStatus.js"; +import { Labs } from "./Labs.js"; +import { UsState } from "./UsState.js"; + +export const ClientFacingLabAccount: core.serialization.ObjectSchema< + serializers.ClientFacingLabAccount.Raw, + Vital.ClientFacingLabAccount +> = core.serialization.object({ + id: core.serialization.string(), + lab: Labs, + orgId: core.serialization.property("org_id", core.serialization.string().optional()), + status: LabAccountStatus, + delegatedFlow: core.serialization.property("delegated_flow", LabAccountDelegatedFlow), + providerAccountId: core.serialization.property("provider_account_id", core.serialization.string()), + accountName: core.serialization.property("account_name", core.serialization.string().optional()), + defaultClinicalNotes: core.serialization.property("default_clinical_notes", core.serialization.string().optional()), + businessUnits: core.serialization.property( + "business_units", + core.serialization.list(core.serialization.string()).optional(), + ), + allowedBilling: core.serialization.property( + "allowed_billing", + core.serialization.record(core.serialization.string(), core.serialization.list(UsState)), + ), + teamIdAllowlist: core.serialization.property( + "team_id_allowlist", + core.serialization.list(core.serialization.string()), + ), +}); + +export declare namespace ClientFacingLabAccount { + export interface Raw { + id: string; + lab: Labs.Raw; + org_id?: string | null; + status: LabAccountStatus.Raw; + delegated_flow: LabAccountDelegatedFlow.Raw; + provider_account_id: string; + account_name?: string | null; + default_clinical_notes?: string | null; + business_units?: string[] | null; + allowed_billing: Record; + team_id_allowlist: string[]; + } +} diff --git a/src/serialization/types/ClientFacingLabReportParsingJobCreatedEvent.ts b/src/serialization/types/ClientFacingLabReportParsingJobCreatedEvent.ts new file mode 100644 index 000000000..7e156db75 --- /dev/null +++ b/src/serialization/types/ClientFacingLabReportParsingJobCreatedEvent.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ParsingJob } from "./ParsingJob.js"; + +export const ClientFacingLabReportParsingJobCreatedEvent: core.serialization.ObjectSchema< + serializers.ClientFacingLabReportParsingJobCreatedEvent.Raw, + Vital.ClientFacingLabReportParsingJobCreatedEvent +> = core.serialization.object({ + eventType: core.serialization.property( + "event_type", + core.serialization.stringLiteral("lab_report.parsing_job.created"), + ), + userId: core.serialization.property("user_id", core.serialization.string()), + clientUserId: core.serialization.property("client_user_id", core.serialization.string()), + teamId: core.serialization.property("team_id", core.serialization.string()), + data: ParsingJob, +}); + +export declare namespace ClientFacingLabReportParsingJobCreatedEvent { + export interface Raw { + event_type: "lab_report.parsing_job.created"; + user_id: string; + client_user_id: string; + team_id: string; + data: ParsingJob.Raw; + } +} diff --git a/src/serialization/types/ClientFacingLabReportParsingJobUpdatedEvent.ts b/src/serialization/types/ClientFacingLabReportParsingJobUpdatedEvent.ts new file mode 100644 index 000000000..9b1c06530 --- /dev/null +++ b/src/serialization/types/ClientFacingLabReportParsingJobUpdatedEvent.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ParsingJob } from "./ParsingJob.js"; + +export const ClientFacingLabReportParsingJobUpdatedEvent: core.serialization.ObjectSchema< + serializers.ClientFacingLabReportParsingJobUpdatedEvent.Raw, + Vital.ClientFacingLabReportParsingJobUpdatedEvent +> = core.serialization.object({ + eventType: core.serialization.property( + "event_type", + core.serialization.stringLiteral("lab_report.parsing_job.updated"), + ), + userId: core.serialization.property("user_id", core.serialization.string()), + clientUserId: core.serialization.property("client_user_id", core.serialization.string()), + teamId: core.serialization.property("team_id", core.serialization.string()), + data: ParsingJob, +}); + +export declare namespace ClientFacingLabReportParsingJobUpdatedEvent { + export interface Raw { + event_type: "lab_report.parsing_job.updated"; + user_id: string; + client_user_id: string; + team_id: string; + data: ParsingJob.Raw; + } +} diff --git a/src/serialization/types/ClientFacingLabs.ts b/src/serialization/types/ClientFacingLabs.ts index 704e0f8fd..08929f068 100644 --- a/src/serialization/types/ClientFacingLabs.ts +++ b/src/serialization/types/ClientFacingLabs.ts @@ -5,8 +5,8 @@ import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; export const ClientFacingLabs: core.serialization.Schema = - core.serialization.enum_(["quest", "labcorp", "bioreference"]); + core.serialization.enum_(["quest", "labcorp", "bioreference", "sonora_quest"]); export declare namespace ClientFacingLabs { - export type Raw = "quest" | "labcorp" | "bioreference"; + export type Raw = "quest" | "labcorp" | "bioreference" | "sonora_quest"; } diff --git a/src/serialization/types/ClientFacingMenstrualCycleSourceType.ts b/src/serialization/types/ClientFacingMenstrualCycleSourceType.ts index 2b830421f..141b9ef81 100644 --- a/src/serialization/types/ClientFacingMenstrualCycleSourceType.ts +++ b/src/serialization/types/ClientFacingMenstrualCycleSourceType.ts @@ -17,6 +17,7 @@ export const ClientFacingMenstrualCycleSourceType: core.serialization.Schema< "cuff", "manual_scan", "automatic", + "insulin_pump", "scale", "chest_strap", "ring", @@ -36,6 +37,7 @@ export declare namespace ClientFacingMenstrualCycleSourceType { | "cuff" | "manual_scan" | "automatic" + | "insulin_pump" | "scale" | "chest_strap" | "ring" diff --git a/src/serialization/types/ClientFacingOrder.ts b/src/serialization/types/ClientFacingOrder.ts index cd647e8a8..90f1d3e7e 100644 --- a/src/serialization/types/ClientFacingOrder.ts +++ b/src/serialization/types/ClientFacingOrder.ts @@ -7,9 +7,11 @@ import { Billing } from "./Billing.js"; import { ClientFacingLabTest } from "./ClientFacingLabTest.js"; import { ClientFacingOrderDetails } from "./ClientFacingOrderDetails.js"; import { ClientFacingOrderEvent } from "./ClientFacingOrderEvent.js"; +import { ClientFacingOrderTransaction } from "./ClientFacingOrderTransaction.js"; import { ClientFacingPatientDetailsCompatible } from "./ClientFacingPatientDetailsCompatible.js"; import { ClientFacingPhysician } from "./ClientFacingPhysician.js"; import { Interpretation } from "./Interpretation.js"; +import { OrderOrigin } from "./OrderOrigin.js"; import { OrderTopLevelStatus } from "./OrderTopLevelStatus.js"; import { PatientAddressCompatible } from "./PatientAddressCompatible.js"; import { ShippingAddress } from "./ShippingAddress.js"; @@ -27,10 +29,12 @@ export const ClientFacingOrder: core.serialization.ObjectSchema< details: ClientFacingOrderDetails, sampleId: core.serialization.property("sample_id", core.serialization.string().optional()), notes: core.serialization.string().optional(), + clinicalNotes: core.serialization.property("clinical_notes", core.serialization.string().optional()), createdAt: core.serialization.property("created_at", core.serialization.date()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), events: core.serialization.list(ClientFacingOrderEvent), status: OrderTopLevelStatus.optional(), + lastEvent: core.serialization.property("last_event", ClientFacingOrderEvent), physician: ClientFacingPhysician.optional(), healthInsuranceId: core.serialization.property("health_insurance_id", core.serialization.string().optional()), requisitionFormUrl: core.serialization.property("requisition_form_url", core.serialization.string().optional()), @@ -51,6 +55,8 @@ export const ClientFacingOrder: core.serialization.ObjectSchema< "worst_case_result_by_date", core.serialization.string().optional(), ), + origin: OrderOrigin.optional(), + orderTransaction: core.serialization.property("order_transaction", ClientFacingOrderTransaction.optional()), }); export declare namespace ClientFacingOrder { @@ -64,10 +70,12 @@ export declare namespace ClientFacingOrder { details: ClientFacingOrderDetails.Raw; sample_id?: string | null; notes?: string | null; + clinical_notes?: string | null; created_at: string; updated_at: string; events: ClientFacingOrderEvent.Raw[]; status?: OrderTopLevelStatus.Raw | null; + last_event: ClientFacingOrderEvent.Raw; physician?: ClientFacingPhysician.Raw | null; health_insurance_id?: string | null; requisition_form_url?: string | null; @@ -82,5 +90,7 @@ export declare namespace ClientFacingOrder { has_missing_results?: boolean | null; expected_result_by_date?: string | null; worst_case_result_by_date?: string | null; + origin?: OrderOrigin.Raw | null; + order_transaction?: ClientFacingOrderTransaction.Raw | null; } } diff --git a/src/serialization/types/ClientFacingOrderEvent.ts b/src/serialization/types/ClientFacingOrderEvent.ts index 04a7f5bc0..2f86df15f 100644 --- a/src/serialization/types/ClientFacingOrderEvent.ts +++ b/src/serialization/types/ClientFacingOrderEvent.ts @@ -4,6 +4,7 @@ import type * as Vital from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; import { OrderStatus } from "./OrderStatus.js"; +import { OrderStatusDetail } from "./OrderStatusDetail.js"; export const ClientFacingOrderEvent: core.serialization.ObjectSchema< serializers.ClientFacingOrderEvent.Raw, @@ -12,6 +13,7 @@ export const ClientFacingOrderEvent: core.serialization.ObjectSchema< id: core.serialization.number(), createdAt: core.serialization.property("created_at", core.serialization.date()), status: OrderStatus, + statusDetail: core.serialization.property("status_detail", OrderStatusDetail.optional()), }); export declare namespace ClientFacingOrderEvent { @@ -19,5 +21,6 @@ export declare namespace ClientFacingOrderEvent { id: number; created_at: string; status: OrderStatus.Raw; + status_detail?: OrderStatusDetail.Raw | null; } } diff --git a/src/serialization/types/ClientFacingOrderInTransaction.ts b/src/serialization/types/ClientFacingOrderInTransaction.ts new file mode 100644 index 000000000..fb757a58f --- /dev/null +++ b/src/serialization/types/ClientFacingOrderInTransaction.ts @@ -0,0 +1,35 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { OrderLowLevelStatus } from "./OrderLowLevelStatus.js"; +import { OrderOrigin } from "./OrderOrigin.js"; + +export const ClientFacingOrderInTransaction: core.serialization.ObjectSchema< + serializers.ClientFacingOrderInTransaction.Raw, + Vital.ClientFacingOrderInTransaction +> = core.serialization.object({ + id: core.serialization.string(), + lowLevelStatus: core.serialization.property("low_level_status", OrderLowLevelStatus.optional()), + lowLevelStatusCreatedAt: core.serialization.property( + "low_level_status_created_at", + core.serialization.date().optional(), + ), + origin: OrderOrigin.optional(), + parentId: core.serialization.property("parent_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace ClientFacingOrderInTransaction { + export interface Raw { + id: string; + low_level_status?: OrderLowLevelStatus.Raw | null; + low_level_status_created_at?: string | null; + origin?: OrderOrigin.Raw | null; + parent_id?: string | null; + created_at: string; + updated_at: string; + } +} diff --git a/src/serialization/types/ClientFacingOrderTransaction.ts b/src/serialization/types/ClientFacingOrderTransaction.ts new file mode 100644 index 000000000..a7b605dd9 --- /dev/null +++ b/src/serialization/types/ClientFacingOrderTransaction.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ClientFacingOrderInTransaction } from "./ClientFacingOrderInTransaction.js"; +import { OrderTransactionStatus } from "./OrderTransactionStatus.js"; + +export const ClientFacingOrderTransaction: core.serialization.ObjectSchema< + serializers.ClientFacingOrderTransaction.Raw, + Vital.ClientFacingOrderTransaction +> = core.serialization.object({ + id: core.serialization.string(), + status: OrderTransactionStatus, + orders: core.serialization.list(ClientFacingOrderInTransaction), +}); + +export declare namespace ClientFacingOrderTransaction { + export interface Raw { + id: string; + status: OrderTransactionStatus.Raw; + orders: ClientFacingOrderInTransaction.Raw[]; + } +} diff --git a/src/serialization/types/ClientFacingProfile.ts b/src/serialization/types/ClientFacingProfile.ts index b717f0e87..3f6e524a8 100644 --- a/src/serialization/types/ClientFacingProfile.ts +++ b/src/serialization/types/ClientFacingProfile.ts @@ -15,7 +15,7 @@ export const ClientFacingProfile: core.serialization.ObjectSchema< userId: core.serialization.property("user_id", core.serialization.string()), height: core.serialization.number().optional(), birthDate: core.serialization.property("birth_date", core.serialization.string().optional()), - wheelchairUse: core.serialization.property("wheelchair_use", core.serialization.boolean().optional()), + wheelchairUse: core.serialization.property("wheelchair_use", core.serialization.booleanLiteral(true).optional()), gender: Gender.optional(), sex: Sex.optional(), source: ClientFacingSource, @@ -29,7 +29,7 @@ export declare namespace ClientFacingProfile { user_id: string; height?: number | null; birth_date?: string | null; - wheelchair_use?: boolean | null; + wheelchair_use?: true | null; gender?: Gender.Raw | null; sex?: Sex.Raw | null; source: ClientFacingSource.Raw; diff --git a/src/serialization/types/ClientFacingResource.ts b/src/serialization/types/ClientFacingResource.ts index c3cd8918f..062ccd1e2 100644 --- a/src/serialization/types/ClientFacingResource.ts +++ b/src/serialization/types/ClientFacingResource.ts @@ -17,6 +17,7 @@ export const ClientFacingResource: core.serialization.Schema< "connection", "order", "result", + "match_review", "appointment", "glucose", "heartrate", @@ -89,6 +90,7 @@ export declare namespace ClientFacingResource { | "connection" | "order" | "result" + | "match_review" | "appointment" | "glucose" | "heartrate" diff --git a/src/serialization/types/ClientFacingSleep.ts b/src/serialization/types/ClientFacingSleep.ts index 0c16455c5..92120e873 100644 --- a/src/serialization/types/ClientFacingSleep.ts +++ b/src/serialization/types/ClientFacingSleep.ts @@ -27,6 +27,10 @@ export const ClientFacingSleep: core.serialization.ObjectSchema< rem: core.serialization.number(), deep: core.serialization.number(), score: core.serialization.number().optional(), + recoveryReadinessScore: core.serialization.property( + "recovery_readiness_score", + core.serialization.number().optional(), + ), hrLowest: core.serialization.property("hr_lowest", core.serialization.number().optional()), hrAverage: core.serialization.property("hr_average", core.serialization.number().optional()), hrResting: core.serialization.property("hr_resting", core.serialization.number().optional()), @@ -61,6 +65,7 @@ export declare namespace ClientFacingSleep { rem: number; deep: number; score?: number | null; + recovery_readiness_score?: number | null; hr_lowest?: number | null; hr_average?: number | null; hr_resting?: number | null; diff --git a/src/serialization/types/ClientFacingSleepCycleSourceType.ts b/src/serialization/types/ClientFacingSleepCycleSourceType.ts index 4726c907b..5030831e9 100644 --- a/src/serialization/types/ClientFacingSleepCycleSourceType.ts +++ b/src/serialization/types/ClientFacingSleepCycleSourceType.ts @@ -17,6 +17,7 @@ export const ClientFacingSleepCycleSourceType: core.serialization.Schema< "cuff", "manual_scan", "automatic", + "insulin_pump", "scale", "chest_strap", "ring", @@ -36,6 +37,7 @@ export declare namespace ClientFacingSleepCycleSourceType { | "cuff" | "manual_scan" | "automatic" + | "insulin_pump" | "scale" | "chest_strap" | "ring" diff --git a/src/serialization/types/CompendiumSearchLabs.ts b/src/serialization/types/CompendiumSearchLabs.ts new file mode 100644 index 000000000..c4daf563f --- /dev/null +++ b/src/serialization/types/CompendiumSearchLabs.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const CompendiumSearchLabs: core.serialization.Schema< + serializers.CompendiumSearchLabs.Raw, + Vital.CompendiumSearchLabs +> = core.serialization.enum_(["labcorp", "quest", "bioreference", "sonora_quest"]); + +export declare namespace CompendiumSearchLabs { + export type Raw = "labcorp" | "quest" | "bioreference" | "sonora_quest"; +} diff --git a/src/serialization/types/ContinuousQueryTaskStatus.ts b/src/serialization/types/ContinuousQueryTaskStatus.ts index 1e3867f30..b5d9290d7 100644 --- a/src/serialization/types/ContinuousQueryTaskStatus.ts +++ b/src/serialization/types/ContinuousQueryTaskStatus.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index.js"; export const ContinuousQueryTaskStatus: core.serialization.Schema< serializers.ContinuousQueryTaskStatus.Raw, Vital.ContinuousQueryTaskStatus -> = core.serialization.enum_(["scheduled", "started", "completed", "error"]); +> = core.serialization.enum_(["scheduled", "started", "completed", "error", "skipped"]); export declare namespace ContinuousQueryTaskStatus { - export type Raw = "scheduled" | "started" | "completed" | "error"; + export type Raw = "scheduled" | "started" | "completed" | "error" | "skipped"; } diff --git a/src/serialization/types/ConvertCompendiumResponse.ts b/src/serialization/types/ConvertCompendiumResponse.ts new file mode 100644 index 000000000..13dddc1da --- /dev/null +++ b/src/serialization/types/ConvertCompendiumResponse.ts @@ -0,0 +1,45 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ProviderIdConversionResponse } from "./ProviderIdConversionResponse.js"; + +export const ConvertCompendiumResponse: core.serialization.ObjectSchema< + serializers.ConvertCompendiumResponse.Raw, + Vital.ConvertCompendiumResponse +> = core.serialization.object({ + sourceLabTestId: core.serialization.property("source_lab_test_id", core.serialization.string().optional()), + sourceLabId: core.serialization.property("source_lab_id", core.serialization.number().optional()), + targetLabId: core.serialization.property("target_lab_id", core.serialization.number()), + targetLabSlug: core.serialization.property("target_lab_slug", core.serialization.string()), + sourceProviderIds: core.serialization.property( + "source_provider_ids", + core.serialization.list(core.serialization.string()).optional(), + ), + convertedProviderIds: core.serialization.property( + "converted_provider_ids", + core.serialization.list(core.serialization.string()).optional(), + ), + unresolvedProviderIds: core.serialization.property( + "unresolved_provider_ids", + core.serialization.list(core.serialization.string()).optional(), + ), + bySourceProviderId: core.serialization.property( + "by_source_provider_id", + core.serialization.record(core.serialization.string(), ProviderIdConversionResponse).optional(), + ), +}); + +export declare namespace ConvertCompendiumResponse { + export interface Raw { + source_lab_test_id?: string | null; + source_lab_id?: number | null; + target_lab_id: number; + target_lab_slug: string; + source_provider_ids?: string[] | null; + converted_provider_ids?: string[] | null; + unresolved_provider_ids?: string[] | null; + by_source_provider_id?: Record | null; + } +} diff --git a/src/serialization/types/DerivedReadinessColumnExpr.ts b/src/serialization/types/DerivedReadinessColumnExpr.ts new file mode 100644 index 000000000..6f092605f --- /dev/null +++ b/src/serialization/types/DerivedReadinessColumnExpr.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { DerivedReadinessColumnExprDerivedReadiness } from "./DerivedReadinessColumnExprDerivedReadiness.js"; + +export const DerivedReadinessColumnExpr: core.serialization.ObjectSchema< + serializers.DerivedReadinessColumnExpr.Raw, + Vital.DerivedReadinessColumnExpr +> = core.serialization.object({ + derivedReadiness: core.serialization.property("derived_readiness", DerivedReadinessColumnExprDerivedReadiness), +}); + +export declare namespace DerivedReadinessColumnExpr { + export interface Raw { + derived_readiness: DerivedReadinessColumnExprDerivedReadiness.Raw; + } +} diff --git a/src/serialization/types/DerivedReadinessColumnExprDerivedReadiness.ts b/src/serialization/types/DerivedReadinessColumnExprDerivedReadiness.ts new file mode 100644 index 000000000..815e21a33 --- /dev/null +++ b/src/serialization/types/DerivedReadinessColumnExprDerivedReadiness.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const DerivedReadinessColumnExprDerivedReadiness: core.serialization.Schema< + serializers.DerivedReadinessColumnExprDerivedReadiness.Raw, + Vital.DerivedReadinessColumnExprDerivedReadiness +> = core.serialization.enum_([ + "date", + "chronotype", + "sleep_score", + "recovery_score", + "recovery_zone", + "stress_score", + "strain_score", + "strain_zone", +]); + +export declare namespace DerivedReadinessColumnExprDerivedReadiness { + export type Raw = + | "date" + | "chronotype" + | "sleep_score" + | "recovery_score" + | "recovery_zone" + | "stress_score" + | "strain_score" + | "strain_zone"; +} diff --git a/src/serialization/types/ElementFieldExpr.ts b/src/serialization/types/ElementFieldExpr.ts new file mode 100644 index 000000000..3fb4fb244 --- /dev/null +++ b/src/serialization/types/ElementFieldExpr.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const ElementFieldExpr: core.serialization.ObjectSchema< + serializers.ElementFieldExpr.Raw, + Vital.ElementFieldExpr +> = core.serialization.object({ + element: core.serialization.booleanLiteral(true), +}); + +export declare namespace ElementFieldExpr { + export interface Raw { + element: true; + } +} diff --git a/src/serialization/types/GetOrderTransactionResponse.ts b/src/serialization/types/GetOrderTransactionResponse.ts new file mode 100644 index 000000000..03fbb5133 --- /dev/null +++ b/src/serialization/types/GetOrderTransactionResponse.ts @@ -0,0 +1,26 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { OrderSummary } from "./OrderSummary.js"; +import { OrderTransactionStatus } from "./OrderTransactionStatus.js"; + +export const GetOrderTransactionResponse: core.serialization.ObjectSchema< + serializers.GetOrderTransactionResponse.Raw, + Vital.GetOrderTransactionResponse +> = core.serialization.object({ + id: core.serialization.string(), + teamId: core.serialization.property("team_id", core.serialization.string()), + status: OrderTransactionStatus, + orders: core.serialization.list(OrderSummary).optional(), +}); + +export declare namespace GetOrderTransactionResponse { + export interface Raw { + id: string; + team_id: string; + status: OrderTransactionStatus.Raw; + orders?: OrderSummary.Raw[] | null; + } +} diff --git a/src/serialization/types/GetTeamLabAccountsResponse.ts b/src/serialization/types/GetTeamLabAccountsResponse.ts new file mode 100644 index 000000000..00a72e3cb --- /dev/null +++ b/src/serialization/types/GetTeamLabAccountsResponse.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ClientFacingLabAccount } from "./ClientFacingLabAccount.js"; + +export const GetTeamLabAccountsResponse: core.serialization.ObjectSchema< + serializers.GetTeamLabAccountsResponse.Raw, + Vital.GetTeamLabAccountsResponse +> = core.serialization.object({ + data: core.serialization.list(ClientFacingLabAccount).optional(), +}); + +export declare namespace GetTeamLabAccountsResponse { + export interface Raw { + data?: ClientFacingLabAccount.Raw[] | null; + } +} diff --git a/src/serialization/types/HistoricalPullCompleted.ts b/src/serialization/types/HistoricalPullCompleted.ts index c77cdc6cd..4cf62017a 100644 --- a/src/serialization/types/HistoricalPullCompleted.ts +++ b/src/serialization/types/HistoricalPullCompleted.ts @@ -11,7 +11,7 @@ export const HistoricalPullCompleted: core.serialization.ObjectSchema< userId: core.serialization.property("user_id", core.serialization.string()), startDate: core.serialization.property("start_date", core.serialization.date()), endDate: core.serialization.property("end_date", core.serialization.date()), - isFinal: core.serialization.property("is_final", core.serialization.boolean()), + isFinal: core.serialization.property("is_final", core.serialization.booleanLiteral(true)), provider: core.serialization.string(), }); @@ -20,7 +20,7 @@ export declare namespace HistoricalPullCompleted { user_id: string; start_date: string; end_date: string; - is_final: boolean; + is_final: true; provider: string; } } diff --git a/src/serialization/types/IndexColumnExprIndex.ts b/src/serialization/types/IndexColumnExprIndex.ts index ffa83789a..8ecdade08 100644 --- a/src/serialization/types/IndexColumnExprIndex.ts +++ b/src/serialization/types/IndexColumnExprIndex.ts @@ -7,8 +7,27 @@ import type * as serializers from "../index.js"; export const IndexColumnExprIndex: core.serialization.Schema< serializers.IndexColumnExprIndex.Raw, Vital.IndexColumnExprIndex -> = core.serialization.enum_(["sleep", "activity", "workout", "body", "meal", "profile", "timeseries"]); +> = core.serialization.enum_([ + "sleep", + "derived_readiness", + "activity", + "workout", + "body", + "meal", + "menstrual_cycle", + "profile", + "timeseries", +]); export declare namespace IndexColumnExprIndex { - export type Raw = "sleep" | "activity" | "workout" | "body" | "meal" | "profile" | "timeseries"; + export type Raw = + | "sleep" + | "derived_readiness" + | "activity" + | "workout" + | "body" + | "meal" + | "menstrual_cycle" + | "profile" + | "timeseries"; } diff --git a/src/serialization/types/InsulinInjectionTimeseriesExpr.ts b/src/serialization/types/InsulinInjectionTimeseriesExpr.ts new file mode 100644 index 000000000..31051dd57 --- /dev/null +++ b/src/serialization/types/InsulinInjectionTimeseriesExpr.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { InsulinInjectionTimeseriesExprField } from "./InsulinInjectionTimeseriesExprField.js"; + +export const InsulinInjectionTimeseriesExpr: core.serialization.ObjectSchema< + serializers.InsulinInjectionTimeseriesExpr.Raw, + Vital.InsulinInjectionTimeseriesExpr +> = core.serialization.object({ + timeseries: core.serialization.stringLiteral("insulin_injection"), + field: InsulinInjectionTimeseriesExprField, +}); + +export declare namespace InsulinInjectionTimeseriesExpr { + export interface Raw { + timeseries: "insulin_injection"; + field: InsulinInjectionTimeseriesExprField.Raw; + } +} diff --git a/src/serialization/types/InsulinInjectionTimeseriesExprField.ts b/src/serialization/types/InsulinInjectionTimeseriesExprField.ts new file mode 100644 index 000000000..57c1a98c9 --- /dev/null +++ b/src/serialization/types/InsulinInjectionTimeseriesExprField.ts @@ -0,0 +1,39 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const InsulinInjectionTimeseriesExprField: core.serialization.Schema< + serializers.InsulinInjectionTimeseriesExprField.Raw, + Vital.InsulinInjectionTimeseriesExprField +> = core.serialization.enum_([ + "source_provider", + "source_type", + "source_app_id", + "source_workout_id", + "source_sport", + "timezone_offset", + "type", + "duration", + "value", + "delivery_mode", + "delivery_form", + "bolus_purpose", +]); + +export declare namespace InsulinInjectionTimeseriesExprField { + export type Raw = + | "source_provider" + | "source_type" + | "source_app_id" + | "source_workout_id" + | "source_sport" + | "timezone_offset" + | "type" + | "duration" + | "value" + | "delivery_mode" + | "delivery_form" + | "bolus_purpose"; +} diff --git a/src/serialization/types/IntervalTimeseriesExprTimeseries.ts b/src/serialization/types/IntervalTimeseriesExprTimeseries.ts index e439b9bb5..f5eaae31c 100644 --- a/src/serialization/types/IntervalTimeseriesExprTimeseries.ts +++ b/src/serialization/types/IntervalTimeseriesExprTimeseries.ts @@ -14,7 +14,6 @@ export const IntervalTimeseriesExprTimeseries: core.serialization.Schema< "heart_rate_alert", "stand_hour", "sleep_breathing_disturbance", - "insulin_injection", "water", "caffeine", "mindfulness_minutes", @@ -51,7 +50,6 @@ export declare namespace IntervalTimeseriesExprTimeseries { | "heart_rate_alert" | "stand_hour" | "sleep_breathing_disturbance" - | "insulin_injection" | "water" | "caffeine" | "mindfulness_minutes" diff --git a/src/serialization/types/LabAccountDelegatedFlow.ts b/src/serialization/types/LabAccountDelegatedFlow.ts new file mode 100644 index 000000000..ee80e25a9 --- /dev/null +++ b/src/serialization/types/LabAccountDelegatedFlow.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const LabAccountDelegatedFlow: core.serialization.Schema< + serializers.LabAccountDelegatedFlow.Raw, + Vital.LabAccountDelegatedFlow +> = core.serialization.enum_(["order_delegated", "result_delegated", "fully_delegated", "not_delegated"]); + +export declare namespace LabAccountDelegatedFlow { + export type Raw = "order_delegated" | "result_delegated" | "fully_delegated" | "not_delegated"; +} diff --git a/src/serialization/types/LabAccountStatus.ts b/src/serialization/types/LabAccountStatus.ts new file mode 100644 index 000000000..e2b95c733 --- /dev/null +++ b/src/serialization/types/LabAccountStatus.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const LabAccountStatus: core.serialization.Schema = + core.serialization.enum_(["active", "pending", "suspended", "ready_to_launch"]); + +export declare namespace LabAccountStatus { + export type Raw = "active" | "pending" | "suspended" | "ready_to_launch"; +} diff --git a/src/serialization/types/LabResultsRaw.ts b/src/serialization/types/LabResultsRaw.ts index e14076a07..5988a3f4a 100644 --- a/src/serialization/types/LabResultsRaw.ts +++ b/src/serialization/types/LabResultsRaw.ts @@ -3,6 +3,7 @@ import type * as Vital from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; +import { ClientFacingOrderTransaction } from "./ClientFacingOrderTransaction.js"; import { LabResultsMetadata } from "./LabResultsMetadata.js"; import { LabResultsRawResults } from "./LabResultsRawResults.js"; import { MissingBiomarkerResult } from "./MissingBiomarkerResult.js"; @@ -20,6 +21,7 @@ export const LabResultsRaw: core.serialization.ObjectSchema | null; + order_transaction?: ClientFacingOrderTransaction.Raw | null; } } diff --git a/src/serialization/types/LabTestSampleType.ts b/src/serialization/types/LabTestSampleType.ts index 9fa156eaf..e96dcd465 100644 --- a/src/serialization/types/LabTestSampleType.ts +++ b/src/serialization/types/LabTestSampleType.ts @@ -5,8 +5,8 @@ import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; export const LabTestSampleType: core.serialization.Schema = - core.serialization.enum_(["dried_blood_spot", "arm_collector", "serum", "saliva", "urine"]); + core.serialization.enum_(["dried_blood_spot", "arm_collector", "serum", "saliva", "urine", "stool"]); export declare namespace LabTestSampleType { - export type Raw = "dried_blood_spot" | "arm_collector" | "serum" | "saliva" | "urine"; + export type Raw = "dried_blood_spot" | "arm_collector" | "serum" | "saliva" | "urine" | "stool"; } diff --git a/src/serialization/types/Labs.ts b/src/serialization/types/Labs.ts index 38606f800..bd24c1b21 100644 --- a/src/serialization/types/Labs.ts +++ b/src/serialization/types/Labs.ts @@ -9,6 +9,7 @@ export const Labs: core.serialization.Schema = "spiriplex", "ussl", "quest", + "sonora_quest", "labcorp", "bioreference", "us_biotek", @@ -17,6 +18,7 @@ export const Labs: core.serialization.Schema = "ihd", "nexus", "my_uti", + "crl", ]); export declare namespace Labs { @@ -25,6 +27,7 @@ export declare namespace Labs { | "spiriplex" | "ussl" | "quest" + | "sonora_quest" | "labcorp" | "bioreference" | "us_biotek" @@ -32,5 +35,6 @@ export declare namespace Labs { | "sanocardio" | "ihd" | "nexus" - | "my_uti"; + | "my_uti" + | "crl"; } diff --git a/src/serialization/types/ManualProviders.ts b/src/serialization/types/ManualProviders.ts index e8abb8eb7..b5c3cf308 100644 --- a/src/serialization/types/ManualProviders.ts +++ b/src/serialization/types/ManualProviders.ts @@ -15,6 +15,7 @@ export const ManualProviders: core.serialization.Schema = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + basalBodyTemperature: core.serialization.property( + "basal_body_temperature", + McBasalBodyTemperatureFieldExprBasalBodyTemperature, + ), +}); + +export declare namespace McBasalBodyTemperatureFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + basal_body_temperature: McBasalBodyTemperatureFieldExprBasalBodyTemperature.Raw; + } +} diff --git a/src/serialization/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts b/src/serialization/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts new file mode 100644 index 000000000..d9c9318d7 --- /dev/null +++ b/src/serialization/types/McBasalBodyTemperatureFieldExprBasalBodyTemperature.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McBasalBodyTemperatureFieldExprBasalBodyTemperature: core.serialization.Schema< + serializers.McBasalBodyTemperatureFieldExprBasalBodyTemperature.Raw, + Vital.McBasalBodyTemperatureFieldExprBasalBodyTemperature +> = core.serialization.enum_(["date", "value"]); + +export declare namespace McBasalBodyTemperatureFieldExprBasalBodyTemperature { + export type Raw = "date" | "value"; +} diff --git a/src/serialization/types/McCervicalMucusFieldExpr.ts b/src/serialization/types/McCervicalMucusFieldExpr.ts new file mode 100644 index 000000000..c8f973e34 --- /dev/null +++ b/src/serialization/types/McCervicalMucusFieldExpr.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McCervicalMucusFieldExprCervicalMucus } from "./McCervicalMucusFieldExprCervicalMucus.js"; + +export const McCervicalMucusFieldExpr: core.serialization.ObjectSchema< + serializers.McCervicalMucusFieldExpr.Raw, + Vital.McCervicalMucusFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + cervicalMucus: core.serialization.property("cervical_mucus", McCervicalMucusFieldExprCervicalMucus), +}); + +export declare namespace McCervicalMucusFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + cervical_mucus: McCervicalMucusFieldExprCervicalMucus.Raw; + } +} diff --git a/src/serialization/types/McCervicalMucusFieldExprCervicalMucus.ts b/src/serialization/types/McCervicalMucusFieldExprCervicalMucus.ts new file mode 100644 index 000000000..a626c9d9c --- /dev/null +++ b/src/serialization/types/McCervicalMucusFieldExprCervicalMucus.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McCervicalMucusFieldExprCervicalMucus: core.serialization.Schema< + serializers.McCervicalMucusFieldExprCervicalMucus.Raw, + Vital.McCervicalMucusFieldExprCervicalMucus +> = core.serialization.enum_(["date", "quality"]); + +export declare namespace McCervicalMucusFieldExprCervicalMucus { + export type Raw = "date" | "quality"; +} diff --git a/src/serialization/types/McContraceptiveFieldExpr.ts b/src/serialization/types/McContraceptiveFieldExpr.ts new file mode 100644 index 000000000..dca8722ce --- /dev/null +++ b/src/serialization/types/McContraceptiveFieldExpr.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McContraceptiveFieldExprContraceptive } from "./McContraceptiveFieldExprContraceptive.js"; + +export const McContraceptiveFieldExpr: core.serialization.ObjectSchema< + serializers.McContraceptiveFieldExpr.Raw, + Vital.McContraceptiveFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + contraceptive: McContraceptiveFieldExprContraceptive, +}); + +export declare namespace McContraceptiveFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + contraceptive: McContraceptiveFieldExprContraceptive.Raw; + } +} diff --git a/src/serialization/types/McContraceptiveFieldExprContraceptive.ts b/src/serialization/types/McContraceptiveFieldExprContraceptive.ts new file mode 100644 index 000000000..96d3f6afe --- /dev/null +++ b/src/serialization/types/McContraceptiveFieldExprContraceptive.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McContraceptiveFieldExprContraceptive: core.serialization.Schema< + serializers.McContraceptiveFieldExprContraceptive.Raw, + Vital.McContraceptiveFieldExprContraceptive +> = core.serialization.enum_(["date", "type"]); + +export declare namespace McContraceptiveFieldExprContraceptive { + export type Raw = "date" | "type"; +} diff --git a/src/serialization/types/McDetectedDeviationsFieldExpr.ts b/src/serialization/types/McDetectedDeviationsFieldExpr.ts new file mode 100644 index 000000000..5a9749497 --- /dev/null +++ b/src/serialization/types/McDetectedDeviationsFieldExpr.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McDetectedDeviationsFieldExprDetectedDeviations } from "./McDetectedDeviationsFieldExprDetectedDeviations.js"; + +export const McDetectedDeviationsFieldExpr: core.serialization.ObjectSchema< + serializers.McDetectedDeviationsFieldExpr.Raw, + Vital.McDetectedDeviationsFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + detectedDeviations: core.serialization.property( + "detected_deviations", + McDetectedDeviationsFieldExprDetectedDeviations, + ), +}); + +export declare namespace McDetectedDeviationsFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + detected_deviations: McDetectedDeviationsFieldExprDetectedDeviations.Raw; + } +} diff --git a/src/serialization/types/McDetectedDeviationsFieldExprDetectedDeviations.ts b/src/serialization/types/McDetectedDeviationsFieldExprDetectedDeviations.ts new file mode 100644 index 000000000..00425fb7d --- /dev/null +++ b/src/serialization/types/McDetectedDeviationsFieldExprDetectedDeviations.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McDetectedDeviationsFieldExprDetectedDeviations: core.serialization.Schema< + serializers.McDetectedDeviationsFieldExprDetectedDeviations.Raw, + Vital.McDetectedDeviationsFieldExprDetectedDeviations +> = core.serialization.enum_(["date", "deviation"]); + +export declare namespace McDetectedDeviationsFieldExprDetectedDeviations { + export type Raw = "date" | "deviation"; +} diff --git a/src/serialization/types/McHomePregnancyTestFieldExpr.ts b/src/serialization/types/McHomePregnancyTestFieldExpr.ts new file mode 100644 index 000000000..1b9dbff28 --- /dev/null +++ b/src/serialization/types/McHomePregnancyTestFieldExpr.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McHomePregnancyTestFieldExprHomePregnancyTest } from "./McHomePregnancyTestFieldExprHomePregnancyTest.js"; + +export const McHomePregnancyTestFieldExpr: core.serialization.ObjectSchema< + serializers.McHomePregnancyTestFieldExpr.Raw, + Vital.McHomePregnancyTestFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + homePregnancyTest: core.serialization.property( + "home_pregnancy_test", + McHomePregnancyTestFieldExprHomePregnancyTest, + ), +}); + +export declare namespace McHomePregnancyTestFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + home_pregnancy_test: McHomePregnancyTestFieldExprHomePregnancyTest.Raw; + } +} diff --git a/src/serialization/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts b/src/serialization/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts new file mode 100644 index 000000000..b850038d0 --- /dev/null +++ b/src/serialization/types/McHomePregnancyTestFieldExprHomePregnancyTest.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McHomePregnancyTestFieldExprHomePregnancyTest: core.serialization.Schema< + serializers.McHomePregnancyTestFieldExprHomePregnancyTest.Raw, + Vital.McHomePregnancyTestFieldExprHomePregnancyTest +> = core.serialization.enum_(["date", "test_result"]); + +export declare namespace McHomePregnancyTestFieldExprHomePregnancyTest { + export type Raw = "date" | "test_result"; +} diff --git a/src/serialization/types/McHomeProgesteroneTestFieldExpr.ts b/src/serialization/types/McHomeProgesteroneTestFieldExpr.ts new file mode 100644 index 000000000..d4f712052 --- /dev/null +++ b/src/serialization/types/McHomeProgesteroneTestFieldExpr.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McHomeProgesteroneTestFieldExprHomeProgesteroneTest } from "./McHomeProgesteroneTestFieldExprHomeProgesteroneTest.js"; + +export const McHomeProgesteroneTestFieldExpr: core.serialization.ObjectSchema< + serializers.McHomeProgesteroneTestFieldExpr.Raw, + Vital.McHomeProgesteroneTestFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + homeProgesteroneTest: core.serialization.property( + "home_progesterone_test", + McHomeProgesteroneTestFieldExprHomeProgesteroneTest, + ), +}); + +export declare namespace McHomeProgesteroneTestFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + home_progesterone_test: McHomeProgesteroneTestFieldExprHomeProgesteroneTest.Raw; + } +} diff --git a/src/serialization/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts b/src/serialization/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts new file mode 100644 index 000000000..17a8e1794 --- /dev/null +++ b/src/serialization/types/McHomeProgesteroneTestFieldExprHomeProgesteroneTest.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McHomeProgesteroneTestFieldExprHomeProgesteroneTest: core.serialization.Schema< + serializers.McHomeProgesteroneTestFieldExprHomeProgesteroneTest.Raw, + Vital.McHomeProgesteroneTestFieldExprHomeProgesteroneTest +> = core.serialization.enum_(["date", "test_result"]); + +export declare namespace McHomeProgesteroneTestFieldExprHomeProgesteroneTest { + export type Raw = "date" | "test_result"; +} diff --git a/src/serialization/types/McIntermenstrualBleedingFieldExpr.ts b/src/serialization/types/McIntermenstrualBleedingFieldExpr.ts new file mode 100644 index 000000000..d02e2ce0b --- /dev/null +++ b/src/serialization/types/McIntermenstrualBleedingFieldExpr.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McIntermenstrualBleedingFieldExpr: core.serialization.ObjectSchema< + serializers.McIntermenstrualBleedingFieldExpr.Raw, + Vital.McIntermenstrualBleedingFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + intermenstrualBleeding: core.serialization.property( + "intermenstrual_bleeding", + core.serialization.stringLiteral("date"), + ), +}); + +export declare namespace McIntermenstrualBleedingFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + intermenstrual_bleeding: "date"; + } +} diff --git a/src/serialization/types/McMenstrualFlowFieldExpr.ts b/src/serialization/types/McMenstrualFlowFieldExpr.ts new file mode 100644 index 000000000..30a489895 --- /dev/null +++ b/src/serialization/types/McMenstrualFlowFieldExpr.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McMenstrualFlowFieldExprMenstrualFlow } from "./McMenstrualFlowFieldExprMenstrualFlow.js"; + +export const McMenstrualFlowFieldExpr: core.serialization.ObjectSchema< + serializers.McMenstrualFlowFieldExpr.Raw, + Vital.McMenstrualFlowFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + menstrualFlow: core.serialization.property("menstrual_flow", McMenstrualFlowFieldExprMenstrualFlow), +}); + +export declare namespace McMenstrualFlowFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + menstrual_flow: McMenstrualFlowFieldExprMenstrualFlow.Raw; + } +} diff --git a/src/serialization/types/McMenstrualFlowFieldExprMenstrualFlow.ts b/src/serialization/types/McMenstrualFlowFieldExprMenstrualFlow.ts new file mode 100644 index 000000000..91539ca8e --- /dev/null +++ b/src/serialization/types/McMenstrualFlowFieldExprMenstrualFlow.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McMenstrualFlowFieldExprMenstrualFlow: core.serialization.Schema< + serializers.McMenstrualFlowFieldExprMenstrualFlow.Raw, + Vital.McMenstrualFlowFieldExprMenstrualFlow +> = core.serialization.enum_(["date", "flow"]); + +export declare namespace McMenstrualFlowFieldExprMenstrualFlow { + export type Raw = "date" | "flow"; +} diff --git a/src/serialization/types/McOvulationTestFieldExpr.ts b/src/serialization/types/McOvulationTestFieldExpr.ts new file mode 100644 index 000000000..ac4156073 --- /dev/null +++ b/src/serialization/types/McOvulationTestFieldExpr.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McOvulationTestFieldExprOvulationTest } from "./McOvulationTestFieldExprOvulationTest.js"; + +export const McOvulationTestFieldExpr: core.serialization.ObjectSchema< + serializers.McOvulationTestFieldExpr.Raw, + Vital.McOvulationTestFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + ovulationTest: core.serialization.property("ovulation_test", McOvulationTestFieldExprOvulationTest), +}); + +export declare namespace McOvulationTestFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + ovulation_test: McOvulationTestFieldExprOvulationTest.Raw; + } +} diff --git a/src/serialization/types/McOvulationTestFieldExprOvulationTest.ts b/src/serialization/types/McOvulationTestFieldExprOvulationTest.ts new file mode 100644 index 000000000..77085853c --- /dev/null +++ b/src/serialization/types/McOvulationTestFieldExprOvulationTest.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McOvulationTestFieldExprOvulationTest: core.serialization.Schema< + serializers.McOvulationTestFieldExprOvulationTest.Raw, + Vital.McOvulationTestFieldExprOvulationTest +> = core.serialization.enum_(["date", "test_result"]); + +export declare namespace McOvulationTestFieldExprOvulationTest { + export type Raw = "date" | "test_result"; +} diff --git a/src/serialization/types/McSexualActivityFieldExpr.ts b/src/serialization/types/McSexualActivityFieldExpr.ts new file mode 100644 index 000000000..d5a7e74bd --- /dev/null +++ b/src/serialization/types/McSexualActivityFieldExpr.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { McSexualActivityFieldExprSexualActivity } from "./McSexualActivityFieldExprSexualActivity.js"; + +export const McSexualActivityFieldExpr: core.serialization.ObjectSchema< + serializers.McSexualActivityFieldExpr.Raw, + Vital.McSexualActivityFieldExpr +> = core.serialization.object({ + fieldFor: core.serialization.property("field_for", core.serialization.stringLiteral("menstrual_cycle").optional()), + sexualActivity: core.serialization.property("sexual_activity", McSexualActivityFieldExprSexualActivity), +}); + +export declare namespace McSexualActivityFieldExpr { + export interface Raw { + field_for?: "menstrual_cycle" | null; + sexual_activity: McSexualActivityFieldExprSexualActivity.Raw; + } +} diff --git a/src/serialization/types/McSexualActivityFieldExprSexualActivity.ts b/src/serialization/types/McSexualActivityFieldExprSexualActivity.ts new file mode 100644 index 000000000..e50d1b94c --- /dev/null +++ b/src/serialization/types/McSexualActivityFieldExprSexualActivity.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const McSexualActivityFieldExprSexualActivity: core.serialization.Schema< + serializers.McSexualActivityFieldExprSexualActivity.Raw, + Vital.McSexualActivityFieldExprSexualActivity +> = core.serialization.enum_(["date", "protection_used"]); + +export declare namespace McSexualActivityFieldExprSexualActivity { + export type Raw = "date" | "protection_used"; +} diff --git a/src/serialization/types/MenstrualCycleColumnExpr.ts b/src/serialization/types/MenstrualCycleColumnExpr.ts new file mode 100644 index 000000000..639b7b808 --- /dev/null +++ b/src/serialization/types/MenstrualCycleColumnExpr.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { MenstrualCycleColumnExprMenstrualCycle } from "./MenstrualCycleColumnExprMenstrualCycle.js"; + +export const MenstrualCycleColumnExpr: core.serialization.ObjectSchema< + serializers.MenstrualCycleColumnExpr.Raw, + Vital.MenstrualCycleColumnExpr +> = core.serialization.object({ + menstrualCycle: core.serialization.property("menstrual_cycle", MenstrualCycleColumnExprMenstrualCycle), +}); + +export declare namespace MenstrualCycleColumnExpr { + export interface Raw { + menstrual_cycle: MenstrualCycleColumnExprMenstrualCycle.Raw; + } +} diff --git a/src/serialization/types/MenstrualCycleColumnExprMenstrualCycle.ts b/src/serialization/types/MenstrualCycleColumnExprMenstrualCycle.ts new file mode 100644 index 000000000..694f2fdca --- /dev/null +++ b/src/serialization/types/MenstrualCycleColumnExprMenstrualCycle.ts @@ -0,0 +1,51 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const MenstrualCycleColumnExprMenstrualCycle: core.serialization.Schema< + serializers.MenstrualCycleColumnExprMenstrualCycle.Raw, + Vital.MenstrualCycleColumnExprMenstrualCycle +> = core.serialization.enum_([ + "period_start", + "period_end", + "cycle_end", + "is_predicted", + "menstrual_flow", + "cervical_mucus", + "intermenstrual_bleeding", + "contraceptive", + "detected_deviations", + "ovulation_test", + "home_pregnancy_test", + "home_progesterone_test", + "sexual_activity", + "basal_body_temperature", + "source_type", + "source_provider", + "source_app_id", + "source_device_id", +]); + +export declare namespace MenstrualCycleColumnExprMenstrualCycle { + export type Raw = + | "period_start" + | "period_end" + | "cycle_end" + | "is_predicted" + | "menstrual_flow" + | "cervical_mucus" + | "intermenstrual_bleeding" + | "contraceptive" + | "detected_deviations" + | "ovulation_test" + | "home_pregnancy_test" + | "home_progesterone_test" + | "sexual_activity" + | "basal_body_temperature" + | "source_type" + | "source_provider" + | "source_app_id" + | "source_device_id"; +} diff --git a/src/serialization/types/OrderLowLevelStatus.ts b/src/serialization/types/OrderLowLevelStatus.ts index f2dd3d37f..1e034a23b 100644 --- a/src/serialization/types/OrderLowLevelStatus.ts +++ b/src/serialization/types/OrderLowLevelStatus.ts @@ -33,6 +33,8 @@ export const OrderLowLevelStatus: core.serialization.Schema< "awaiting_registration", "registered", "redraw_available", + "corrected", + "lab_processing_blocked", ]); export declare namespace OrderLowLevelStatus { @@ -61,5 +63,7 @@ export declare namespace OrderLowLevelStatus { | "partial_results" | "awaiting_registration" | "registered" - | "redraw_available"; + | "redraw_available" + | "corrected" + | "lab_processing_blocked"; } diff --git a/src/serialization/types/OrderOrigin.ts b/src/serialization/types/OrderOrigin.ts new file mode 100644 index 000000000..e5ef81df8 --- /dev/null +++ b/src/serialization/types/OrderOrigin.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const OrderOrigin: core.serialization.Schema = + core.serialization.enum_(["initial", "redraw", "recreation"]); + +export declare namespace OrderOrigin { + export type Raw = "initial" | "redraw" | "recreation"; +} diff --git a/src/serialization/types/OrderStatus.ts b/src/serialization/types/OrderStatus.ts index a235e8f29..95851e21d 100644 --- a/src/serialization/types/OrderStatus.ts +++ b/src/serialization/types/OrderStatus.ts @@ -38,6 +38,7 @@ export const OrderStatus: core.serialization.Schema = + core.serialization.enum_([ + "fulfillment_error", + "date_of_collection_unspecified", + "demographic_information_unspecified", + "demographic_information_mismatch", + "sample_quantity_not_sufficient", + "sample_contaminated", + "sample_stability_exceeded", + "sample_hemolyzed", + "sample_improper_collection", + ]); + +export declare namespace OrderStatusDetail { + export type Raw = + | "fulfillment_error" + | "date_of_collection_unspecified" + | "demographic_information_unspecified" + | "demographic_information_mismatch" + | "sample_quantity_not_sufficient" + | "sample_contaminated" + | "sample_stability_exceeded" + | "sample_hemolyzed" + | "sample_improper_collection"; +} diff --git a/src/serialization/types/OrderSummary.ts b/src/serialization/types/OrderSummary.ts new file mode 100644 index 000000000..5873d44fe --- /dev/null +++ b/src/serialization/types/OrderSummary.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { OrderLowLevelStatus } from "./OrderLowLevelStatus.js"; +import { OrderOrigin } from "./OrderOrigin.js"; + +export const OrderSummary: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + origin: OrderOrigin.optional(), + parentId: core.serialization.property("parent_id", core.serialization.string().optional()), + lastStatus: core.serialization.property("last_status", OrderLowLevelStatus), + lastStatusCreatedAt: core.serialization.property("last_status_created_at", core.serialization.date()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + }); + +export declare namespace OrderSummary { + export interface Raw { + id: string; + origin?: OrderOrigin.Raw | null; + parent_id?: string | null; + last_status: OrderLowLevelStatus.Raw; + last_status_created_at: string; + updated_at: string; + created_at: string; + } +} diff --git a/src/serialization/types/OrderTransactionStatus.ts b/src/serialization/types/OrderTransactionStatus.ts new file mode 100644 index 000000000..16251aa77 --- /dev/null +++ b/src/serialization/types/OrderTransactionStatus.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const OrderTransactionStatus: core.serialization.Schema< + serializers.OrderTransactionStatus.Raw, + Vital.OrderTransactionStatus +> = core.serialization.enum_(["active", "completed", "cancelled"]); + +export declare namespace OrderTransactionStatus { + export type Raw = "active" | "completed" | "cancelled"; +} diff --git a/src/serialization/types/ParsingJob.ts b/src/serialization/types/ParsingJob.ts index c491305bc..f66701214 100644 --- a/src/serialization/types/ParsingJob.ts +++ b/src/serialization/types/ParsingJob.ts @@ -4,13 +4,14 @@ import type * as Vital from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; import { ParsedLabReportData } from "./ParsedLabReportData.js"; +import { ParsingJobFailureReason } from "./ParsingJobFailureReason.js"; import { ParsingJobStatus } from "./ParsingJobStatus.js"; export const ParsingJob: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string(), - jobId: core.serialization.property("job_id", core.serialization.string()), status: ParsingJobStatus, + failureReason: core.serialization.property("failure_reason", ParsingJobFailureReason.optional()), data: ParsedLabReportData.optional(), needsHumanReview: core.serialization.property("needs_human_review", core.serialization.boolean()), isReviewed: core.serialization.property("is_reviewed", core.serialization.boolean()), @@ -19,8 +20,8 @@ export const ParsingJob: core.serialization.ObjectSchema = core.serialization.enum_(["invalid_input", "low_quality", "not_english"]); + +export declare namespace ParsingJobFailureReason { + export type Raw = "invalid_input" | "low_quality" | "not_english"; +} diff --git a/src/serialization/types/PasswordProviders.ts b/src/serialization/types/PasswordProviders.ts index b8edef0b7..124a3b226 100644 --- a/src/serialization/types/PasswordProviders.ts +++ b/src/serialization/types/PasswordProviders.ts @@ -17,6 +17,7 @@ export const PasswordProviders: core.serialization.Schema = core.serialization.enum_(["change_healthcare", "availity", "stedi", "waystar", "claim_md"]); +> = core.serialization.enum_(["change_healthcare", "availity", "stedi", "waystar", "claim_md", "apero", "pverify"]); export declare namespace PayorCodeExternalProvider { - export type Raw = "change_healthcare" | "availity" | "stedi" | "waystar" | "claim_md"; + export type Raw = "change_healthcare" | "availity" | "stedi" | "waystar" | "claim_md" | "apero" | "pverify"; } diff --git a/src/serialization/types/PerLabCandidate.ts b/src/serialization/types/PerLabCandidate.ts new file mode 100644 index 000000000..a5ef444cf --- /dev/null +++ b/src/serialization/types/PerLabCandidate.ts @@ -0,0 +1,62 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const PerLabCandidate: core.serialization.ObjectSchema = + core.serialization.object({ + markerId: core.serialization.property("marker_id", core.serialization.number()), + labId: core.serialization.property("lab_id", core.serialization.number()), + labSlug: core.serialization.property("lab_slug", core.serialization.string().optional()), + name: core.serialization.string(), + resultNames: core.serialization.property( + "result_names", + core.serialization.list(core.serialization.string()).optional(), + ), + providerId: core.serialization.property("provider_id", core.serialization.string().optional()), + loincSetHash: core.serialization.property("loinc_set_hash", core.serialization.string()), + loincCodes: core.serialization.property( + "loinc_codes", + core.serialization.list(core.serialization.string()).optional(), + ), + loincComponents: core.serialization.property( + "loinc_components", + core.serialization.list(core.serialization.string()).optional(), + ), + loincGroups: core.serialization.property( + "loinc_groups", + core.serialization.list(core.serialization.string()).optional(), + ), + cptCodes: core.serialization.property( + "cpt_codes", + core.serialization.list(core.serialization.string()).optional(), + ), + relation: core.serialization.string(), + confidence: core.serialization.number(), + reasonCodes: core.serialization.property( + "reason_codes", + core.serialization.list(core.serialization.string()).optional(), + ), + markerPopularityScore: core.serialization.property("marker_popularity_score", core.serialization.number()), + }); + +export declare namespace PerLabCandidate { + export interface Raw { + marker_id: number; + lab_id: number; + lab_slug?: string | null; + name: string; + result_names?: string[] | null; + provider_id?: string | null; + loinc_set_hash: string; + loinc_codes?: string[] | null; + loinc_components?: string[] | null; + loinc_groups?: string[] | null; + cpt_codes?: string[] | null; + relation: string; + confidence: number; + reason_codes?: string[] | null; + marker_popularity_score: number; + } +} diff --git a/src/serialization/types/Placeholder.ts b/src/serialization/types/Placeholder.ts index 13c862a99..84594f816 100644 --- a/src/serialization/types/Placeholder.ts +++ b/src/serialization/types/Placeholder.ts @@ -6,11 +6,11 @@ import type * as serializers from "../index.js"; export const Placeholder: core.serialization.ObjectSchema = core.serialization.object({ - placeholder: core.serialization.boolean(), + placeholder: core.serialization.booleanLiteral(true), }); export declare namespace Placeholder { export interface Raw { - placeholder: boolean; + placeholder: true; } } diff --git a/src/serialization/types/ProviderIdConversionResponse.ts b/src/serialization/types/ProviderIdConversionResponse.ts new file mode 100644 index 000000000..8445a6ddf --- /dev/null +++ b/src/serialization/types/ProviderIdConversionResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { PerLabCandidate } from "./PerLabCandidate.js"; + +export const ProviderIdConversionResponse: core.serialization.ObjectSchema< + serializers.ProviderIdConversionResponse.Raw, + Vital.ProviderIdConversionResponse +> = core.serialization.object({ + sourceProviderId: core.serialization.property("source_provider_id", core.serialization.string()), + candidates: core.serialization.list(PerLabCandidate).optional(), +}); + +export declare namespace ProviderIdConversionResponse { + export interface Raw { + source_provider_id: string; + candidates?: PerLabCandidate.Raw[] | null; + } +} diff --git a/src/serialization/types/Providers.ts b/src/serialization/types/Providers.ts index 08801aa68..dca8896d7 100644 --- a/src/serialization/types/Providers.ts +++ b/src/serialization/types/Providers.ts @@ -17,6 +17,7 @@ export const Providers: core.serialization.Schema = core.serialization.object({ + canonical: CanonicalCandidate, + relation: core.serialization.string(), + confidence: core.serialization.number(), + reasonCodes: core.serialization.property( + "reason_codes", + core.serialization.list(core.serialization.string()).optional(), + ), +}); + +export declare namespace RelatedCandidate { + export interface Raw { + canonical: CanonicalCandidate.Raw; + relation: string; + confidence: number; + reason_codes?: string[] | null; + } +} diff --git a/src/serialization/types/ResultMetadata.ts b/src/serialization/types/ResultMetadata.ts index 0171b7157..169ed6414 100644 --- a/src/serialization/types/ResultMetadata.ts +++ b/src/serialization/types/ResultMetadata.ts @@ -3,13 +3,15 @@ import type * as Vital from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; +import { ResultMetadataGender } from "./ResultMetadataGender.js"; export const ResultMetadata: core.serialization.ObjectSchema = core.serialization.object({ - patientFirstName: core.serialization.property("patient_first_name", core.serialization.string()), - patientLastName: core.serialization.property("patient_last_name", core.serialization.string()), - dob: core.serialization.string(), - labName: core.serialization.property("lab_name", core.serialization.string()), + patientFirstName: core.serialization.property("patient_first_name", core.serialization.string().optional()), + patientLastName: core.serialization.property("patient_last_name", core.serialization.string().optional()), + dob: core.serialization.string().optional(), + gender: ResultMetadataGender.optional(), + labName: core.serialization.property("lab_name", core.serialization.string().optional()), dateReported: core.serialization.property("date_reported", core.serialization.string().optional()), dateCollected: core.serialization.property("date_collected", core.serialization.string().optional()), specimenNumber: core.serialization.property("specimen_number", core.serialization.string().optional()), @@ -17,10 +19,11 @@ export const ResultMetadata: core.serialization.ObjectSchema = core.serialization.enum_(["male", "female", "other"]); + +export declare namespace ResultMetadataGender { + export type Raw = "male" | "female" | "other"; +} diff --git a/src/serialization/types/ScalarOutputSubqueryExpr.ts b/src/serialization/types/ScalarOutputSubqueryExpr.ts new file mode 100644 index 000000000..1dbfdb58d --- /dev/null +++ b/src/serialization/types/ScalarOutputSubqueryExpr.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ScalarOutputSubqueryExprFrom } from "./ScalarOutputSubqueryExprFrom.js"; +import { ScalarOutputSubqueryExprSelect } from "./ScalarOutputSubqueryExprSelect.js"; + +export const ScalarOutputSubqueryExpr: core.serialization.ObjectSchema< + serializers.ScalarOutputSubqueryExpr.Raw, + Vital.ScalarOutputSubqueryExpr +> = core.serialization.object({ + select: ScalarOutputSubqueryExprSelect, + from: ScalarOutputSubqueryExprFrom, + where: core.serialization.string().optional(), +}); + +export declare namespace ScalarOutputSubqueryExpr { + export interface Raw { + select: ScalarOutputSubqueryExprSelect.Raw; + from: ScalarOutputSubqueryExprFrom.Raw; + where?: string | null; + } +} diff --git a/src/serialization/types/ScalarOutputSubqueryExprFrom.ts b/src/serialization/types/ScalarOutputSubqueryExprFrom.ts new file mode 100644 index 000000000..b0ef2013f --- /dev/null +++ b/src/serialization/types/ScalarOutputSubqueryExprFrom.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { Placeholder } from "./Placeholder.js"; +import { UnnestExpr } from "./UnnestExpr.js"; + +export const ScalarOutputSubqueryExprFrom: core.serialization.Schema< + serializers.ScalarOutputSubqueryExprFrom.Raw, + Vital.ScalarOutputSubqueryExprFrom +> = core.serialization.undiscriminatedUnion([UnnestExpr, Placeholder]); + +export declare namespace ScalarOutputSubqueryExprFrom { + export type Raw = UnnestExpr.Raw | Placeholder.Raw; +} diff --git a/src/serialization/types/ScalarOutputSubqueryExprSelect.ts b/src/serialization/types/ScalarOutputSubqueryExprSelect.ts new file mode 100644 index 000000000..44e263922 --- /dev/null +++ b/src/serialization/types/ScalarOutputSubqueryExprSelect.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { AggregateFieldExpr } from "./AggregateFieldExpr.js"; +import { Placeholder } from "./Placeholder.js"; + +export const ScalarOutputSubqueryExprSelect: core.serialization.Schema< + serializers.ScalarOutputSubqueryExprSelect.Raw, + Vital.ScalarOutputSubqueryExprSelect +> = core.serialization.undiscriminatedUnion([AggregateFieldExpr, Placeholder]); + +export declare namespace ScalarOutputSubqueryExprSelect { + export type Raw = AggregateFieldExpr.Raw | Placeholder.Raw; +} diff --git a/src/serialization/types/SearchCompendiumResponse.ts b/src/serialization/types/SearchCompendiumResponse.ts new file mode 100644 index 000000000..c6a1824c5 --- /dev/null +++ b/src/serialization/types/SearchCompendiumResponse.ts @@ -0,0 +1,36 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { CanonicalCandidate } from "./CanonicalCandidate.js"; +import { PerLabCandidate } from "./PerLabCandidate.js"; +import { RelatedCandidate } from "./RelatedCandidate.js"; +import { SearchMode } from "./SearchMode.js"; + +export const SearchCompendiumResponse: core.serialization.ObjectSchema< + serializers.SearchCompendiumResponse.Raw, + Vital.SearchCompendiumResponse +> = core.serialization.object({ + mode: SearchMode, + selectedCanonical: core.serialization.property("selected_canonical", CanonicalCandidate.optional()), + canonicalCandidates: core.serialization.property( + "canonical_candidates", + core.serialization.list(CanonicalCandidate).optional(), + ), + perLab: core.serialization.property( + "per_lab", + core.serialization.record(core.serialization.string(), core.serialization.list(PerLabCandidate)).optional(), + ), + related: core.serialization.list(RelatedCandidate).optional(), +}); + +export declare namespace SearchCompendiumResponse { + export interface Raw { + mode: SearchMode.Raw; + selected_canonical?: CanonicalCandidate.Raw | null; + canonical_candidates?: CanonicalCandidate.Raw[] | null; + per_lab?: Record | null; + related?: RelatedCandidate.Raw[] | null; + } +} diff --git a/src/serialization/types/SearchMode.ts b/src/serialization/types/SearchMode.ts new file mode 100644 index 000000000..27d62e4ea --- /dev/null +++ b/src/serialization/types/SearchMode.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const SearchMode: core.serialization.Schema = + core.serialization.enum_(["canonical", "crosswalk"]); + +export declare namespace SearchMode { + export type Raw = "canonical" | "crosswalk"; +} diff --git a/src/serialization/types/SleepColumnExprSleep.ts b/src/serialization/types/SleepColumnExprSleep.ts index 360d12f0f..7c738e9ab 100644 --- a/src/serialization/types/SleepColumnExprSleep.ts +++ b/src/serialization/types/SleepColumnExprSleep.ts @@ -33,6 +33,7 @@ export const SleepColumnExprSleep: core.serialization.Schema< "skin_temperature_delta", "respiratory_rate", "score", + "recovery_readiness_score", "source_type", "source_provider", "source_app_id", @@ -67,6 +68,7 @@ export declare namespace SleepColumnExprSleep { | "skin_temperature_delta" | "respiratory_rate" | "score" + | "recovery_readiness_score" | "source_type" | "source_provider" | "source_app_id" diff --git a/src/serialization/types/SleepV2InDb.ts b/src/serialization/types/SleepV2InDb.ts index fa0d79e85..a17d4af9a 100644 --- a/src/serialization/types/SleepV2InDb.ts +++ b/src/serialization/types/SleepV2InDb.ts @@ -9,31 +9,31 @@ export const SleepV2InDb: core.serialization.ObjectSchema; - provider_id: string; user_id: string; + provider_id: string; source_id: number; priority_id?: number | null; id: string; - source: ClientFacingProvider.Raw; - priority?: number | null; source_device_id?: string | null; created_at?: string | null; updated_at?: string | null; + source: ClientFacingProvider.Raw; + priority?: number | null; } } diff --git a/src/serialization/types/UnnestExpr.ts b/src/serialization/types/UnnestExpr.ts new file mode 100644 index 000000000..df3a11abd --- /dev/null +++ b/src/serialization/types/UnnestExpr.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { UnnestExprUnnest } from "./UnnestExprUnnest.js"; + +export const UnnestExpr: core.serialization.ObjectSchema = + core.serialization.object({ + unnest: UnnestExprUnnest, + }); + +export declare namespace UnnestExpr { + export interface Raw { + unnest: UnnestExprUnnest.Raw; + } +} diff --git a/src/serialization/types/UnnestExprUnnest.ts b/src/serialization/types/UnnestExprUnnest.ts new file mode 100644 index 000000000..a801efd5c --- /dev/null +++ b/src/serialization/types/UnnestExprUnnest.ts @@ -0,0 +1,76 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { ActivityColumnExpr } from "./ActivityColumnExpr.js"; +import { AsleepAtValueMacroExpr } from "./AsleepAtValueMacroExpr.js"; +import { AwakeAtValueMacroExpr } from "./AwakeAtValueMacroExpr.js"; +import { AwakeningsValueMacroExpr } from "./AwakeningsValueMacroExpr.js"; +import { BloodPressureTimeseriesExpr } from "./BloodPressureTimeseriesExpr.js"; +import { BodyColumnExpr } from "./BodyColumnExpr.js"; +import { ChronotypeValueMacroExpr } from "./ChronotypeValueMacroExpr.js"; +import { DerivedReadinessColumnExpr } from "./DerivedReadinessColumnExpr.js"; +import { DiscreteTimeseriesExpr } from "./DiscreteTimeseriesExpr.js"; +import { InsulinInjectionTimeseriesExpr } from "./InsulinInjectionTimeseriesExpr.js"; +import { IntervalTimeseriesExpr } from "./IntervalTimeseriesExpr.js"; +import { MealColumnExpr } from "./MealColumnExpr.js"; +import { MenstrualCycleColumnExpr } from "./MenstrualCycleColumnExpr.js"; +import { NoteTimeseriesExpr } from "./NoteTimeseriesExpr.js"; +import { ProfileColumnExpr } from "./ProfileColumnExpr.js"; +import { SleepColumnExpr } from "./SleepColumnExpr.js"; +import { SleepScoreValueMacroExpr } from "./SleepScoreValueMacroExpr.js"; +import { TemperatureTimeseriesExpr } from "./TemperatureTimeseriesExpr.js"; +import { UnrecognizedValueMacroExpr } from "./UnrecognizedValueMacroExpr.js"; +import { WorkoutColumnExpr } from "./WorkoutColumnExpr.js"; +import { WorkoutDurationTimeseriesExpr } from "./WorkoutDurationTimeseriesExpr.js"; + +export const UnnestExprUnnest: core.serialization.Schema = + core.serialization.undiscriminatedUnion([ + SleepColumnExpr, + DerivedReadinessColumnExpr, + ActivityColumnExpr, + WorkoutColumnExpr, + BodyColumnExpr, + MealColumnExpr, + MenstrualCycleColumnExpr, + ProfileColumnExpr, + SleepScoreValueMacroExpr, + ChronotypeValueMacroExpr, + AsleepAtValueMacroExpr, + AwakeAtValueMacroExpr, + AwakeningsValueMacroExpr, + UnrecognizedValueMacroExpr, + DiscreteTimeseriesExpr, + IntervalTimeseriesExpr, + InsulinInjectionTimeseriesExpr, + BloodPressureTimeseriesExpr, + TemperatureTimeseriesExpr, + WorkoutDurationTimeseriesExpr, + NoteTimeseriesExpr, + ]); + +export declare namespace UnnestExprUnnest { + export type Raw = + | SleepColumnExpr.Raw + | DerivedReadinessColumnExpr.Raw + | ActivityColumnExpr.Raw + | WorkoutColumnExpr.Raw + | BodyColumnExpr.Raw + | MealColumnExpr.Raw + | MenstrualCycleColumnExpr.Raw + | ProfileColumnExpr.Raw + | SleepScoreValueMacroExpr.Raw + | ChronotypeValueMacroExpr.Raw + | AsleepAtValueMacroExpr.Raw + | AwakeAtValueMacroExpr.Raw + | AwakeningsValueMacroExpr.Raw + | UnrecognizedValueMacroExpr.Raw + | DiscreteTimeseriesExpr.Raw + | IntervalTimeseriesExpr.Raw + | InsulinInjectionTimeseriesExpr.Raw + | BloodPressureTimeseriesExpr.Raw + | TemperatureTimeseriesExpr.Raw + | WorkoutDurationTimeseriesExpr.Raw + | NoteTimeseriesExpr.Raw; +} diff --git a/src/serialization/types/UsAddress.ts b/src/serialization/types/UsAddress.ts index bb51c7f81..42c895b0e 100644 --- a/src/serialization/types/UsAddress.ts +++ b/src/serialization/types/UsAddress.ts @@ -12,6 +12,7 @@ export const UsAddress: core.serialization.ObjectSchema = core.serialization.enum_([ + "AL", + "AK", + "AZ", + "AR", + "CA", + "CO", + "CT", + "DE", + "FL", + "GA", + "HI", + "ID", + "IL", + "IN", + "IA", + "KS", + "KY", + "LA", + "ME", + "MD", + "MA", + "MI", + "MN", + "MS", + "MO", + "MT", + "NE", + "NV", + "NH", + "NJ", + "NM", + "NY", + "NC", + "ND", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VT", + "VA", + "WA", + "WV", + "WI", + "WY", +]); + +export declare namespace UsState { + export type Raw = + | "AL" + | "AK" + | "AZ" + | "AR" + | "CA" + | "CO" + | "CT" + | "DE" + | "FL" + | "GA" + | "HI" + | "ID" + | "IL" + | "IN" + | "IA" + | "KS" + | "KY" + | "LA" + | "ME" + | "MD" + | "MA" + | "MI" + | "MN" + | "MS" + | "MO" + | "MT" + | "NE" + | "NV" + | "NH" + | "NJ" + | "NM" + | "NY" + | "NC" + | "ND" + | "OH" + | "OK" + | "OR" + | "PA" + | "RI" + | "SC" + | "SD" + | "TN" + | "TX" + | "UT" + | "VT" + | "VA" + | "WA" + | "WV" + | "WI" + | "WY"; +} diff --git a/src/serialization/types/UserAddress.ts b/src/serialization/types/UserAddress.ts new file mode 100644 index 000000000..195e741b0 --- /dev/null +++ b/src/serialization/types/UserAddress.ts @@ -0,0 +1,28 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vital from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const UserAddress: core.serialization.ObjectSchema = + core.serialization.object({ + firstLine: core.serialization.property("first_line", core.serialization.string()), + secondLine: core.serialization.property("second_line", core.serialization.string().optional()), + country: core.serialization.string(), + zip: core.serialization.string(), + city: core.serialization.string(), + state: core.serialization.string(), + accessNotes: core.serialization.property("access_notes", core.serialization.string().optional()), + }); + +export declare namespace UserAddress { + export interface Raw { + first_line: string; + second_line?: string | null; + country: string; + zip: string; + city: string; + state: string; + access_notes?: string | null; + } +} diff --git a/src/serialization/types/UserInfo.ts b/src/serialization/types/UserInfo.ts index 8c4c4f9f4..a9ee1ee32 100644 --- a/src/serialization/types/UserInfo.ts +++ b/src/serialization/types/UserInfo.ts @@ -3,12 +3,12 @@ import type * as Vital from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; -import { Address } from "./Address.js"; import { Ethnicity } from "./Ethnicity.js"; import { GenderIdentity } from "./GenderIdentity.js"; import { GuarantorDetails } from "./GuarantorDetails.js"; import { Race } from "./Race.js"; import { SexualOrientation } from "./SexualOrientation.js"; +import { UserAddress } from "./UserAddress.js"; export const UserInfo: core.serialization.ObjectSchema = core.serialization.object({ @@ -18,7 +18,7 @@ export const UserInfo: core.serialization.ObjectSchema = core.serialization.object({ - success: core.serialization.boolean(), + success: core.serialization.booleanLiteral(false), userId: core.serialization.property("user_id", core.serialization.string()), error: core.serialization.string(), failedSources: core.serialization.property( @@ -19,7 +19,7 @@ export const UserRefreshErrorResponse: core.serialization.ObjectSchema< export declare namespace UserRefreshErrorResponse { export interface Raw { - success: boolean; + success: false; user_id: string; error: string; failed_sources?: string[] | null; diff --git a/src/serialization/types/UserRefreshSuccessResponse.ts b/src/serialization/types/UserRefreshSuccessResponse.ts index 042293688..ad33b0aea 100644 --- a/src/serialization/types/UserRefreshSuccessResponse.ts +++ b/src/serialization/types/UserRefreshSuccessResponse.ts @@ -8,7 +8,7 @@ export const UserRefreshSuccessResponse: core.serialization.ObjectSchema< serializers.UserRefreshSuccessResponse.Raw, Vital.UserRefreshSuccessResponse > = core.serialization.object({ - success: core.serialization.boolean(), + success: core.serialization.booleanLiteral(true), userId: core.serialization.property("user_id", core.serialization.string()), refreshedSources: core.serialization.property( "refreshed_sources", @@ -23,7 +23,7 @@ export const UserRefreshSuccessResponse: core.serialization.ObjectSchema< export declare namespace UserRefreshSuccessResponse { export interface Raw { - success: boolean; + success: true; user_id: string; refreshed_sources: string[]; in_progress_sources: string[]; diff --git a/src/serialization/types/ValidationError.ts b/src/serialization/types/ValidationError.ts index dbc6b0889..1eaa32b36 100644 --- a/src/serialization/types/ValidationError.ts +++ b/src/serialization/types/ValidationError.ts @@ -10,6 +10,8 @@ export const ValidationError: core.serialization.ObjectSchema | null; } } diff --git a/src/serialization/types/WorkoutV2InDb.ts b/src/serialization/types/WorkoutV2InDb.ts index cbb624a38..b056fdda6 100644 --- a/src/serialization/types/WorkoutV2InDb.ts +++ b/src/serialization/types/WorkoutV2InDb.ts @@ -10,33 +10,33 @@ export const WorkoutV2InDb: core.serialization.ObjectSchema; - provider_id: string; user_id: string; + provider_id: string; source_id: number; priority_id?: number | null; id: string; sport_id: number; - source: ClientFacingProvider.Raw; sport: ClientFacingSport.Raw; source_device_id?: string | null; created_at?: string | null; updated_at?: string | null; + source: ClientFacingProvider.Raw; } } diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index fd115a275..63f3bde53 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -6,6 +6,9 @@ export * from "./Address.js"; export * from "./AggregateExpr.js"; export * from "./AggregateExprArg.js"; export * from "./AggregateExprFunc.js"; +export * from "./AggregateFieldExpr.js"; +export * from "./AggregateFieldExprArg.js"; +export * from "./AggregateFieldExprFunc.js"; export * from "./AggregationResponse.js"; export * from "./AggregationResult.js"; export * from "./AllowedRadius.js"; @@ -28,6 +31,7 @@ export * from "./AttemptStatus.js"; export * from "./AuthType.js"; export * from "./Availability.js"; export * from "./AwakeAtValueMacroExpr.js"; +export * from "./AwakeningsValueMacroExpr.js"; export * from "./BasalBodyTemperatureEntry.js"; export * from "./Billing.js"; export * from "./BiomarkerResult.js"; @@ -42,6 +46,7 @@ export * from "./BulkOp.js"; export * from "./BulkOpStatus.js"; export * from "./BulkOpsResponse.js"; export * from "./BulkOpType.js"; +export * from "./CanonicalCandidate.js"; export * from "./CervicalMucusEntry.js"; export * from "./CervicalMucusEntryQuality.js"; export * from "./ChronotypeValueMacroExpr.js"; @@ -209,10 +214,16 @@ export * from "./ClientFacingInsulinInjectionChanged.js"; export * from "./ClientFacingInsulinInjectionChangedEventType.js"; export * from "./ClientFacingInsulinInjectionHistoricalPullCompleted.js"; export * from "./ClientFacingInsulinInjectionSample.js"; +export * from "./ClientFacingInsulinInjectionSampleBolusPurpose.js"; +export * from "./ClientFacingInsulinInjectionSampleDeliveryForm.js"; +export * from "./ClientFacingInsulinInjectionSampleDeliveryMode.js"; export * from "./ClientFacingInsulinInjectionSampleType.js"; export * from "./ClientFacingInsurance.js"; export * from "./ClientFacingLab.js"; +export * from "./ClientFacingLabAccount.js"; export * from "./ClientFacingLabLocation.js"; +export * from "./ClientFacingLabReportParsingJobCreatedEvent.js"; +export * from "./ClientFacingLabReportParsingJobUpdatedEvent.js"; export * from "./ClientFacingLabs.js"; export * from "./ClientFacingLabTest.js"; export * from "./ClientFacingLeanBodyMassChanged.js"; @@ -248,6 +259,8 @@ export * from "./ClientFacingOrderChanged.js"; export * from "./ClientFacingOrderChangedEventType.js"; export * from "./ClientFacingOrderDetails.js"; export * from "./ClientFacingOrderEvent.js"; +export * from "./ClientFacingOrderInTransaction.js"; +export * from "./ClientFacingOrderTransaction.js"; export * from "./ClientFacingPatientDetailsCompatible.js"; export * from "./ClientFacingPayor.js"; export * from "./ClientFacingPayorCodeSource.js"; @@ -384,6 +397,7 @@ export * from "./ClientUserIdConflictResponse.js"; export * from "./ClientWorkoutResponse.js"; export * from "./ClinicalInformation.js"; export * from "./CompanyDetails.js"; +export * from "./CompendiumSearchLabs.js"; export * from "./ConnectedSourceClientFacing.js"; export * from "./ConnectionRecipe.js"; export * from "./Consent.js"; @@ -394,6 +408,7 @@ export * from "./ContinuousQueryTaskHistoryResponse.js"; export * from "./ContinuousQueryTaskStatus.js"; export * from "./ContraceptiveEntry.js"; export * from "./ContraceptiveEntryType.js"; +export * from "./ConvertCompendiumResponse.js"; export * from "./CreateUserPortalUrlResponse.js"; export * from "./DatePartExpr.js"; export * from "./DatePartExprArg.js"; @@ -404,12 +419,15 @@ export * from "./DaySlots.js"; export * from "./DelegatedFlowType.js"; export * from "./DemoConnectionStatus.js"; export * from "./DemoProviders.js"; +export * from "./DerivedReadinessColumnExpr.js"; +export * from "./DerivedReadinessColumnExprDerivedReadiness.js"; export * from "./DetectedDeviationEntry.js"; export * from "./DetectedDeviationEntryDeviation.js"; export * from "./DeviceV2InDb.js"; export * from "./DiscreteTimeseriesExpr.js"; export * from "./DiscreteTimeseriesExprField.js"; export * from "./DiscreteTimeseriesExprTimeseries.js"; +export * from "./ElementFieldExpr.js"; export * from "./EmailProviders.js"; export * from "./Energy.js"; export * from "./Ethnicity.js"; @@ -424,6 +442,8 @@ export * from "./Gender.js"; export * from "./GenderIdentity.js"; export * from "./GetMarkersResponse.js"; export * from "./GetOrdersResponse.js"; +export * from "./GetOrderTransactionResponse.js"; +export * from "./GetTeamLabAccountsResponse.js"; export * from "./GroupedAFibBurden.js"; export * from "./GroupedAFibBurdenResponse.js"; export * from "./GroupedBasalBodyTemperature.js"; @@ -547,12 +567,16 @@ export * from "./IcdExcludesViolation.js"; export * from "./IcdExcludesWarning.js"; export * from "./IndexColumnExpr.js"; export * from "./IndexColumnExprIndex.js"; +export * from "./InsulinInjectionTimeseriesExpr.js"; +export * from "./InsulinInjectionTimeseriesExprField.js"; export * from "./IntermenstrualBleedingEntry.js"; export * from "./Interpretation.js"; export * from "./IntervalTimeseriesExpr.js"; export * from "./IntervalTimeseriesExprField.js"; export * from "./IntervalTimeseriesExprTimeseries.js"; export * from "./Jpeg.js"; +export * from "./LabAccountDelegatedFlow.js"; +export * from "./LabAccountStatus.js"; export * from "./LabLocationCapability.js"; export * from "./LabLocationMetadata.js"; export * from "./LabReportResult.js"; @@ -574,9 +598,30 @@ export * from "./LoincMatch.js"; export * from "./Macros.js"; export * from "./ManualProviders.js"; export * from "./MarkerType.js"; +export * from "./McBasalBodyTemperatureFieldExpr.js"; +export * from "./McBasalBodyTemperatureFieldExprBasalBodyTemperature.js"; +export * from "./McCervicalMucusFieldExpr.js"; +export * from "./McCervicalMucusFieldExprCervicalMucus.js"; +export * from "./McContraceptiveFieldExpr.js"; +export * from "./McContraceptiveFieldExprContraceptive.js"; +export * from "./McDetectedDeviationsFieldExpr.js"; +export * from "./McDetectedDeviationsFieldExprDetectedDeviations.js"; +export * from "./McHomePregnancyTestFieldExpr.js"; +export * from "./McHomePregnancyTestFieldExprHomePregnancyTest.js"; +export * from "./McHomeProgesteroneTestFieldExpr.js"; +export * from "./McHomeProgesteroneTestFieldExprHomeProgesteroneTest.js"; +export * from "./McIntermenstrualBleedingFieldExpr.js"; +export * from "./McMenstrualFlowFieldExpr.js"; +export * from "./McMenstrualFlowFieldExprMenstrualFlow.js"; +export * from "./McOvulationTestFieldExpr.js"; +export * from "./McOvulationTestFieldExprOvulationTest.js"; +export * from "./McSexualActivityFieldExpr.js"; +export * from "./McSexualActivityFieldExprSexualActivity.js"; export * from "./MealColumnExpr.js"; export * from "./MealColumnExprMeal.js"; export * from "./MealInDbBaseClientFacingSource.js"; +export * from "./MenstrualCycleColumnExpr.js"; +export * from "./MenstrualCycleColumnExprMenstrualCycle.js"; export * from "./MenstrualCycleResponse.js"; export * from "./MenstrualFlowEntry.js"; export * from "./MenstrualFlowEntryFlow.js"; @@ -590,15 +635,20 @@ export * from "./NotFoundErrorBody.js"; export * from "./OAuthProviders.js"; export * from "./OrderActivationType.js"; export * from "./OrderLowLevelStatus.js"; +export * from "./OrderOrigin.js"; export * from "./OrderSetRequest.js"; export * from "./OrderStatus.js"; +export * from "./OrderStatusDetail.js"; +export * from "./OrderSummary.js"; export * from "./OrderTopLevelStatus.js"; +export * from "./OrderTransactionStatus.js"; export * from "./OvulationTestEntry.js"; export * from "./OvulationTestEntryTestResult.js"; export * from "./PaginatedUsersResponse.js"; export * from "./ParentBiomarkerData.js"; export * from "./ParsedLabReportData.js"; export * from "./ParsingJob.js"; +export * from "./ParsingJobFailureReason.js"; export * from "./ParsingJobStatus.js"; export * from "./PasswordProviders.js"; export * from "./PatientAddress.js"; @@ -609,6 +659,7 @@ export * from "./PayorCodeExternalProvider.js"; export * from "./PerformingLaboratory.js"; export * from "./Period.js"; export * from "./PeriodUnit.js"; +export * from "./PerLabCandidate.js"; export * from "./PhlebotomyAreaInfo.js"; export * from "./PhlebotomyProviderInfo.js"; export * from "./PhysicianCreateRequest.js"; @@ -624,6 +675,7 @@ export * from "./ProfileInDb.js"; export * from "./ProviderConnectionCreated.js"; export * from "./ProviderConnectionError.js"; export * from "./ProviderConnectionErrorErrorType.js"; +export * from "./ProviderIdConversionResponse.js"; export * from "./ProviderLinkResponse.js"; export * from "./ProviderLinkResponseErrorType.js"; export * from "./ProviderLinkResponseState.js"; @@ -648,18 +700,25 @@ export * from "./RawProfile.js"; export * from "./RawSleep.js"; export * from "./RawWorkout.js"; export * from "./Region.js"; +export * from "./RelatedCandidate.js"; export * from "./RelativeTimeframe.js"; export * from "./ResendWebhookResponse.js"; export * from "./ResourceAvailability.js"; export * from "./ResponsibleRelationship.js"; export * from "./ResultMetadata.js"; +export * from "./ResultMetadataGender.js"; export * from "./ResultType.js"; export * from "./SampleData.js"; export * from "./SampleDataDateCollected.js"; export * from "./SampleDataDateReceived.js"; export * from "./SampleDataDateReported.js"; +export * from "./ScalarOutputSubqueryExpr.js"; +export * from "./ScalarOutputSubqueryExprFrom.js"; +export * from "./ScalarOutputSubqueryExprSelect.js"; export * from "./ScopeRequirementsGrants.js"; export * from "./ScopeRequirementsStr.js"; +export * from "./SearchCompendiumResponse.js"; +export * from "./SearchMode.js"; export * from "./Select.js"; export * from "./Sex.js"; export * from "./SexualActivityEntry.js"; @@ -693,8 +752,11 @@ export * from "./TimeSlot.js"; export * from "./TimeseriesMetricPoint.js"; export * from "./TimeseriesResource.js"; export * from "./TraceElements.js"; +export * from "./UnnestExpr.js"; +export * from "./UnnestExprUnnest.js"; export * from "./UnrecognizedValueMacroExpr.js"; export * from "./UsAddress.js"; +export * from "./UserAddress.js"; export * from "./UserHistoricalPullsResponse.js"; export * from "./UserInfo.js"; export * from "./UserRefreshErrorResponse.js"; @@ -702,6 +764,7 @@ export * from "./UserRefreshSuccessResponse.js"; export * from "./UserResourcesResponse.js"; export * from "./UserSignInTokenResponse.js"; export * from "./UserSuccessResponse.js"; +export * from "./UsState.js"; export * from "./UtcTimestampWithTimezoneOffset.js"; export * from "./ValidateIcdCodesResponse.js"; export * from "./ValidationError.js"; diff --git a/src/version.ts b/src/version.ts index 9379e1537..c4a5cd819 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "3.1.551"; +export const SDK_VERSION = "3.1.552"; diff --git a/tests/mock-server/mockEndpointBuilder.ts b/tests/mock-server/mockEndpointBuilder.ts index 1b0e51079..1f7667ff4 100644 --- a/tests/mock-server/mockEndpointBuilder.ts +++ b/tests/mock-server/mockEndpointBuilder.ts @@ -4,7 +4,7 @@ import { url } from "../../src/core"; import { toJson } from "../../src/core/json"; import { withFormUrlEncoded } from "./withFormUrlEncoded"; import { withHeaders } from "./withHeaders"; -import { withJson } from "./withJson"; +import { type WithJsonOptions, withJson } from "./withJson"; type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head"; @@ -26,7 +26,7 @@ interface RequestHeadersStage extends RequestBodyStage, ResponseStage { } interface RequestBodyStage extends ResponseStage { - jsonBody(body: unknown): ResponseStage; + jsonBody(body: unknown, options?: WithJsonOptions): ResponseStage; formUrlEncodedBody(body: unknown): ResponseStage; } @@ -44,6 +44,7 @@ interface ResponseHeaderStage extends ResponseBodyStage, BuildStage { interface ResponseBodyStage { jsonBody(body: unknown): BuildStage; + sseBody(body: string): BuildStage; } interface BuildStage { @@ -129,11 +130,11 @@ class RequestBuilder implements MethodStage, RequestHeadersStage, RequestBodySta return this; } - jsonBody(body: unknown): ResponseStage { + jsonBody(body: unknown, options?: WithJsonOptions): ResponseStage { if (body === undefined) { throw new Error("Undefined is not valid JSON. Do not call jsonBody if you want an empty body."); } - this.predicates.push((resolver) => withJson(body, resolver)); + this.predicates.push((resolver) => withJson(body, resolver, options)); return this; } @@ -201,6 +202,12 @@ class ResponseBuilder implements ResponseStatusStage, ResponseHeaderStage, Respo return this; } + public sseBody(body: string): BuildStage { + this.responseHeaders["Content-Type"] = "text/event-stream"; + this.responseBody = body; + return this; + } + public build(): HttpHandler { const responseResolver: HttpResponseResolver = () => { const response = new HttpResponse(this.responseBody, { diff --git a/tests/mock-server/withJson.ts b/tests/mock-server/withJson.ts index b627638b0..3e8800a0c 100644 --- a/tests/mock-server/withJson.ts +++ b/tests/mock-server/withJson.ts @@ -2,12 +2,26 @@ import { type HttpResponseResolver, passthrough } from "msw"; import { fromJson, toJson } from "../../src/core/json"; +export interface WithJsonOptions { + /** + * List of field names to ignore when comparing request bodies. + * This is useful for pagination cursor fields that change between requests. + */ + ignoredFields?: string[]; +} + /** * Creates a request matcher that validates if the request JSON body exactly matches the expected object * @param expectedBody - The exact body object to match against * @param resolver - Response resolver to execute if body matches + * @param options - Optional configuration including fields to ignore */ -export function withJson(expectedBody: unknown, resolver: HttpResponseResolver): HttpResponseResolver { +export function withJson( + expectedBody: unknown, + resolver: HttpResponseResolver, + options?: WithJsonOptions, +): HttpResponseResolver { + const ignoredFields = options?.ignoredFields ?? []; return async (args) => { const { request } = args; @@ -28,7 +42,8 @@ export function withJson(expectedBody: unknown, resolver: HttpResponseResolver): } const mismatches = findMismatches(actualBody, expectedBody); - if (Object.keys(mismatches).filter((key) => !key.startsWith("pagination.")).length > 0) { + const filteredMismatches = Object.keys(mismatches).filter((key) => !ignoredFields.includes(key)); + if (filteredMismatches.length > 0) { console.error("JSON body mismatch:", toJson(mismatches, undefined, 2)); return passthrough(); } diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts index 2f98ede81..6c1762422 100644 --- a/tests/unit/fetcher/Fetcher.test.ts +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -118,7 +118,7 @@ describe("Test fetcherImpl", () => { const { value } = await reader.read(); const decoder = new TextDecoder(); const streamContent = decoder.decode(value); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); @@ -164,7 +164,7 @@ describe("Test fetcherImpl", () => { const { value } = await reader.read(); const decoder = new TextDecoder(); const streamContent = decoder.decode(value); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); @@ -208,7 +208,7 @@ describe("Test fetcherImpl", () => { expect(arrayBuffer).toBeInstanceOf(ArrayBuffer); const decoder = new TextDecoder(); const streamContent = decoder.decode(new Uint8Array(arrayBuffer)); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); @@ -255,7 +255,7 @@ describe("Test fetcherImpl", () => { expect(bytes).toBeInstanceOf(Uint8Array); const decoder = new TextDecoder(); const streamContent = decoder.decode(bytes); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); diff --git a/tests/unit/file/file.test.ts b/tests/unit/file/file.test.ts index d7c4570b8..6cd650905 100644 --- a/tests/unit/file/file.test.ts +++ b/tests/unit/file/file.test.ts @@ -5,6 +5,7 @@ import { toBinaryUploadRequest, type Uploadable } from "../../../src/core/file/i describe("toBinaryUploadRequest", () => { const TEST_FILE_PATH = join(__dirname, "..", "test-file.txt"); + const TEST_FILE_SIZE = fs.statSync(TEST_FILE_PATH).size.toString(); beforeEach(() => { vi.clearAllMocks(); @@ -377,7 +378,7 @@ describe("toBinaryUploadRequest", () => { expect(result.headers).toEqual({ "Content-Disposition": 'attachment; filename="test-file.txt"', // Should extract from path "Content-Type": "text/plain", - "Content-Length": "21", // Should determine from file system (test file is 21 bytes) + "Content-Length": TEST_FILE_SIZE, // Should determine from file system (OS-agnostic) }); }); @@ -391,7 +392,7 @@ describe("toBinaryUploadRequest", () => { expect(result.body).toBeInstanceOf(fs.ReadStream); expect(result.headers).toEqual({ "Content-Disposition": 'attachment; filename="test-file.txt"', // Should extract from path - "Content-Length": "21", // Should determine from file system (test file is 21 bytes) + "Content-Length": TEST_FILE_SIZE, // Should determine from file system (OS-agnostic) }); }); }); diff --git a/tests/wire/activity.test.ts b/tests/wire/activity.test.ts index a5a47999f..cc3ff64a5 100644 --- a/tests/wire/activity.test.ts +++ b/tests/wire/activity.test.ts @@ -116,15 +116,15 @@ describe("ActivityClient", () => { { timestamp: "2023-03-22T00:00:00Z", data: { data: "...provider_specific_data" }, - provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", user_id: "1449752e-0d8a-40e0-9206-91ab099b2537", + provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", source_id: 1, priority_id: 1, id: "id", - source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, source_device_id: "550e8400-e29b-41d4-a716-446655440000", created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", + source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, }, ], }; @@ -148,19 +148,19 @@ describe("ActivityClient", () => { data: { data: "...provider_specific_data", }, - providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", userId: "1449752e-0d8a-40e0-9206-91ab099b2537", + providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", sourceId: 1, priorityId: 1, id: "id", + sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + updatedAt: new Date("2024-01-15T09:30:00.000Z"), source: { name: "Oura", slug: "oura", logo: "https://logo_url.com", }, - sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", - createdAt: new Date("2024-01-15T09:30:00.000Z"), - updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], }); diff --git a/tests/wire/body.test.ts b/tests/wire/body.test.ts index 1a5ebd38d..3d73f185a 100644 --- a/tests/wire/body.test.ts +++ b/tests/wire/body.test.ts @@ -100,16 +100,16 @@ describe("BodyClient", () => { { timestamp: "2023-02-27T12:31:24Z", data: { data: "...provider_specific_data" }, - provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", user_id: "1449752e-0d8a-40e0-9206-91ab099b2537", + provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", source_id: 1, priority_id: 1, id: "id", - source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, - priority: 1, source_device_id: "550e8400-e29b-41d4-a716-446655440000", created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", + priority: 1, + source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, }, ], }; @@ -133,20 +133,20 @@ describe("BodyClient", () => { data: { data: "...provider_specific_data", }, - providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", userId: "1449752e-0d8a-40e0-9206-91ab099b2537", + providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", sourceId: 1, priorityId: 1, id: "id", + sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + priority: 1, source: { name: "Oura", slug: "oura", logo: "https://logo_url.com", }, - priority: 1, - sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", - createdAt: new Date("2024-01-15T09:30:00.000Z"), - updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], }); diff --git a/tests/wire/compendium.test.ts b/tests/wire/compendium.test.ts new file mode 100644 index 000000000..929362518 --- /dev/null +++ b/tests/wire/compendium.test.ts @@ -0,0 +1,245 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Vital from "../../src/api/index"; +import { VitalClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("CompendiumClient", () => { + test("search (1)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { mode: "canonical" }; + const rawResponseBody = { + mode: "canonical", + selected_canonical: { + loinc_set_hash: "loinc_set_hash", + display_name: "display_name", + aliases: ["aliases"], + loinc_codes: ["loinc_codes"], + provider_ids: ["provider_ids"], + loinc_components: ["loinc_components"], + loinc_groups: ["loinc_groups"], + cpt_codes: ["cpt_codes"], + popularity_score: 1.1, + confidence: 1.1, + }, + canonical_candidates: [ + { + loinc_set_hash: "loinc_set_hash", + display_name: "display_name", + aliases: ["aliases"], + loinc_codes: ["loinc_codes"], + provider_ids: ["provider_ids"], + loinc_components: ["loinc_components"], + loinc_groups: ["loinc_groups"], + cpt_codes: ["cpt_codes"], + popularity_score: 1.1, + confidence: 1.1, + }, + ], + per_lab: { + key: [ + { + marker_id: 1, + lab_id: 1, + name: "name", + loinc_set_hash: "loinc_set_hash", + relation: "relation", + confidence: 1.1, + marker_popularity_score: 1.1, + }, + ], + }, + related: [ + { + canonical: { + loinc_set_hash: "loinc_set_hash", + display_name: "display_name", + popularity_score: 1.1, + confidence: 1.1, + }, + relation: "relation", + confidence: 1.1, + reason_codes: ["reason_codes"], + }, + ], + }; + server + .mockEndpoint() + .post("/v3/compendium/search") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.compendium.search({ + mode: "canonical", + }); + expect(response).toEqual({ + mode: "canonical", + selectedCanonical: { + loincSetHash: "loinc_set_hash", + displayName: "display_name", + aliases: ["aliases"], + loincCodes: ["loinc_codes"], + providerIds: ["provider_ids"], + loincComponents: ["loinc_components"], + loincGroups: ["loinc_groups"], + cptCodes: ["cpt_codes"], + popularityScore: 1.1, + confidence: 1.1, + }, + canonicalCandidates: [ + { + loincSetHash: "loinc_set_hash", + displayName: "display_name", + aliases: ["aliases"], + loincCodes: ["loinc_codes"], + providerIds: ["provider_ids"], + loincComponents: ["loinc_components"], + loincGroups: ["loinc_groups"], + cptCodes: ["cpt_codes"], + popularityScore: 1.1, + confidence: 1.1, + }, + ], + perLab: { + key: [ + { + markerId: 1, + labId: 1, + name: "name", + loincSetHash: "loinc_set_hash", + relation: "relation", + confidence: 1.1, + markerPopularityScore: 1.1, + }, + ], + }, + related: [ + { + canonical: { + loincSetHash: "loinc_set_hash", + displayName: "display_name", + popularityScore: 1.1, + confidence: 1.1, + }, + relation: "relation", + confidence: 1.1, + reasonCodes: ["reason_codes"], + }, + ], + }); + }); + + test("search (2)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { mode: "canonical" }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/v3/compendium/search") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.compendium.search({ + mode: "canonical", + }); + }).rejects.toThrow(Vital.UnprocessableEntityError); + }); + + test("convert (1)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { target_lab: "labcorp" }; + const rawResponseBody = { + source_lab_test_id: "source_lab_test_id", + source_lab_id: 1, + target_lab_id: 1, + target_lab_slug: "target_lab_slug", + source_provider_ids: ["source_provider_ids"], + converted_provider_ids: ["converted_provider_ids"], + unresolved_provider_ids: ["unresolved_provider_ids"], + by_source_provider_id: { + key: { + source_provider_id: "source_provider_id", + candidates: [ + { + marker_id: 1, + lab_id: 1, + name: "name", + loinc_set_hash: "loinc_set_hash", + relation: "relation", + confidence: 1.1, + marker_popularity_score: 1.1, + }, + ], + }, + }, + }; + server + .mockEndpoint() + .post("/v3/compendium/convert") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.compendium.convert({ + targetLab: "labcorp", + }); + expect(response).toEqual({ + sourceLabTestId: "source_lab_test_id", + sourceLabId: 1, + targetLabId: 1, + targetLabSlug: "target_lab_slug", + sourceProviderIds: ["source_provider_ids"], + convertedProviderIds: ["converted_provider_ids"], + unresolvedProviderIds: ["unresolved_provider_ids"], + bySourceProviderId: { + key: { + sourceProviderId: "source_provider_id", + candidates: [ + { + markerId: 1, + labId: 1, + name: "name", + loincSetHash: "loinc_set_hash", + relation: "relation", + confidence: 1.1, + markerPopularityScore: 1.1, + }, + ], + }, + }, + }); + }); + + test("convert (2)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { target_lab: "labcorp" }; + const rawResponseBody = {}; + server + .mockEndpoint() + .post("/v3/compendium/convert") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.compendium.convert({ + targetLab: "labcorp", + }); + }).rejects.toThrow(Vital.UnprocessableEntityError); + }); +}); diff --git a/tests/wire/insurance.test.ts b/tests/wire/insurance.test.ts index 223c52c89..db08956c5 100644 --- a/tests/wire/insurance.test.ts +++ b/tests/wire/insurance.test.ts @@ -21,6 +21,7 @@ describe("InsuranceClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, source: "platform", }, @@ -50,6 +51,7 @@ describe("InsuranceClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, source: "platform", }, @@ -90,6 +92,7 @@ describe("InsuranceClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, source: "platform", }, @@ -116,6 +119,7 @@ describe("InsuranceClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, source: "platform", }, diff --git a/tests/wire/labAccount.test.ts b/tests/wire/labAccount.test.ts new file mode 100644 index 000000000..91e7652af --- /dev/null +++ b/tests/wire/labAccount.test.ts @@ -0,0 +1,79 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Vital from "../../src/api/index"; +import { VitalClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("LabAccountClient", () => { + test("get_team_lab_accounts (1)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: [ + { + id: "id", + lab: "ayumetrix", + org_id: "org_id", + status: "active", + delegated_flow: "order_delegated", + provider_account_id: "provider_account_id", + account_name: "account_name", + default_clinical_notes: "default_clinical_notes", + business_units: ["business_units"], + allowed_billing: { key: ["AL"] }, + team_id_allowlist: ["team_id_allowlist"], + }, + ], + }; + server + .mockEndpoint() + .get("/v3/lab_test/lab_account") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.labAccount.getTeamLabAccounts({ + labAccountId: "lab_account_id", + status: "active", + }); + expect(response).toEqual({ + data: [ + { + id: "id", + lab: "ayumetrix", + orgId: "org_id", + status: "active", + delegatedFlow: "order_delegated", + providerAccountId: "provider_account_id", + accountName: "account_name", + defaultClinicalNotes: "default_clinical_notes", + businessUnits: ["business_units"], + allowedBilling: { + key: ["AL"], + }, + teamIdAllowlist: ["team_id_allowlist"], + }, + ], + }); + }); + + test("get_team_lab_accounts (2)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/v3/lab_test/lab_account") + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.labAccount.getTeamLabAccounts(); + }).rejects.toThrow(Vital.UnprocessableEntityError); + }); +}); diff --git a/tests/wire/labReport.test.ts b/tests/wire/labReport.test.ts index a848bc632..ba69d61ec 100644 --- a/tests/wire/labReport.test.ts +++ b/tests/wire/labReport.test.ts @@ -10,23 +10,46 @@ describe("LabReportClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { - id: "id", - job_id: "job_id", - status: "upload_pending", + id: "8eb0217f-4683-4a3c-adca-faf95ac65739", + status: "completed", + failure_reason: "invalid_input", data: { metadata: { - patient_first_name: "patient_first_name", - patient_last_name: "patient_last_name", - dob: "dob", - lab_name: "lab_name", - date_reported: "date_reported", - date_collected: "date_collected", - specimen_number: "specimen_number", + patient_first_name: "Jane", + patient_last_name: "Doe", + dob: "1990-01-01", + gender: "male", + lab_name: "Acme Labs", + date_reported: "2025-01-01", + date_collected: "2024-12-30", + specimen_number: "ABC123", }, - results: [{ test_name: "test_name", value: "value" }], + results: [ + { + test_name: "Glucose", + value: "90", + type: "numeric", + units: "mg/dL", + max_reference_range: 99, + min_reference_range: 70, + source_panel_name: "CMP", + loinc_matches: [ + { + loinc_code: "2345-7", + loinc_name: "Glucose [Mass/volume] in Serum or Plasma", + display_name: "Glucose", + aliases: ["aliases"], + confidence_score: 0.99, + }, + ], + interpretation: "normal", + is_above_max_range: false, + is_below_min_range: false, + }, + ], }, - needs_human_review: true, - is_reviewed: true, + needs_human_review: false, + is_reviewed: false, }; server .mockEndpoint() @@ -38,28 +61,46 @@ describe("LabReportClient", () => { const response = await client.labReport.parserGetJob("job_id"); expect(response).toEqual({ - id: "id", - jobId: "job_id", - status: "upload_pending", + id: "8eb0217f-4683-4a3c-adca-faf95ac65739", + status: "completed", + failureReason: "invalid_input", data: { metadata: { - patientFirstName: "patient_first_name", - patientLastName: "patient_last_name", - dob: "dob", - labName: "lab_name", - dateReported: "date_reported", - dateCollected: "date_collected", - specimenNumber: "specimen_number", + patientFirstName: "Jane", + patientLastName: "Doe", + dob: "1990-01-01", + gender: "male", + labName: "Acme Labs", + dateReported: "2025-01-01", + dateCollected: "2024-12-30", + specimenNumber: "ABC123", }, results: [ { - testName: "test_name", - value: "value", + testName: "Glucose", + value: "90", + type: "numeric", + units: "mg/dL", + maxReferenceRange: 99, + minReferenceRange: 70, + sourcePanelName: "CMP", + loincMatches: [ + { + loincCode: "2345-7", + loincName: "Glucose [Mass/volume] in Serum or Plasma", + displayName: "Glucose", + aliases: ["aliases"], + confidenceScore: 0.99, + }, + ], + interpretation: "normal", + isAboveMaxRange: false, + isBelowMinRange: false, }, ], }, - needsHumanReview: true, - isReviewed: true, + needsHumanReview: false, + isReviewed: false, }); }); diff --git a/tests/wire/labTests.test.ts b/tests/wire/labTests.test.ts index 9d74398fe..7a213a0ba 100644 --- a/tests/wire/labTests.test.ts +++ b/tests/wire/labTests.test.ts @@ -73,6 +73,8 @@ describe("LabTestsClient", () => { labSlug: "lab_slug", collectionMethod: "testkit", status: "active", + markerIds: [1], + providerIds: ["provider_ids"], name: "name", orderKey: "price", orderDirection: "asc", @@ -688,6 +690,8 @@ describe("LabTestsClient", () => { .build(); const response = await client.labTests.getMarkers({ + labId: [1], + labSlug: "lab_slug", name: "name", aLaCarteEnabled: true, labAccountId: "lab_account_id", @@ -1285,6 +1289,8 @@ describe("LabTestsClient", () => { labSlug: "lab_slug", collectionMethod: "testkit", status: "active", + markerIds: [1], + providerIds: ["provider_ids"], name: "name", orderKey: "price", orderDirection: "asc", @@ -1376,9 +1382,9 @@ describe("LabTestsClient", () => { const rawResponseBody = { orders: [ { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { dob: "2020-01-01T00:00:00Z", gender: "male" }, patient_address: { receiver_name: "John Doe", @@ -1443,9 +1449,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -1460,6 +1466,7 @@ describe("LabTestsClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -1472,6 +1479,11 @@ describe("LabTestsClient", () => { }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -1494,6 +1506,29 @@ describe("LabTestsClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, ], total: 1, @@ -1508,22 +1543,27 @@ describe("LabTestsClient", () => { endDate: new Date("2024-01-15T09:30:00.000Z"), updatedStartDate: new Date("2024-01-15T09:30:00.000Z"), updatedEndDate: new Date("2024-01-15T09:30:00.000Z"), + status: ["ordered"], orderKey: "created_at", orderDirection: "asc", + orderType: ["testkit"], isCritical: true, interpretation: "normal", + orderActivationTypes: ["current"], userId: "user_id", patientName: "patient_name", shippingRecipientName: "shipping_recipient_name", + orderIds: ["order_ids"], + orderTransactionId: "order_transaction_id", page: 1, size: 1, }); expect(response).toEqual({ orders: [ { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { dob: new Date("2020-01-01T00:00:00.000Z"), gender: "male", @@ -1597,9 +1637,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -1614,6 +1654,7 @@ describe("LabTestsClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -1634,6 +1675,11 @@ describe("LabTestsClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -1660,6 +1706,29 @@ describe("LabTestsClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, ], total: 1, @@ -1789,9 +1858,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { booking_key: "booking_key" }; const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -1799,6 +1869,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -1810,6 +1881,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -1832,9 +1904,10 @@ describe("LabTestsClient", () => { bookingKey: "booking_key", }); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -1842,6 +1915,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -1856,6 +1930,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -1908,9 +1983,10 @@ describe("LabTestsClient", () => { provider: "getlabs", }; const rawResponseBody = { - id: "aae38b08-42a2-4933-affc-b0f79ba99d9d", - user_id: "6fff4647-6e06-4d0e-be65-5b4749c8b8b9", - order_id: "2bd5b223-d99c-4949-bf19-ffb0349b7534", + id: "b7431b5e-5499-46cc-ac02-fbbd43b485a2", + user_id: "f7b7ca1b-53d8-4b6c-9712-1a586faff7ce", + order_id: "d16cc9ef-85e1-4482-83ec-c1d736f1cb1a", + order_transaction_id: "8976bcd4-ce80-4552-9958-a134e5602064", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -1918,6 +1994,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2024-01-15T09:30:00Z", @@ -1929,6 +2006,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "external_id", can_reschedule: false, + appointment_notes: "appointment_notes", event_status: "pending", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -1954,9 +2032,10 @@ describe("LabTestsClient", () => { provider: "getlabs", }); expect(response).toEqual({ - id: "aae38b08-42a2-4933-affc-b0f79ba99d9d", - userId: "6fff4647-6e06-4d0e-be65-5b4749c8b8b9", - orderId: "2bd5b223-d99c-4949-bf19-ffb0349b7534", + id: "b7431b5e-5499-46cc-ac02-fbbd43b485a2", + userId: "f7b7ca1b-53d8-4b6c-9712-1a586faff7ce", + orderId: "d16cc9ef-85e1-4482-83ec-c1d736f1cb1a", + orderTransactionId: "8976bcd4-ce80-4552-9958-a134e5602064", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -1964,6 +2043,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -1978,6 +2058,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "external_id", canReschedule: false, + appointmentNotes: "appointment_notes", eventStatus: "pending", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2029,9 +2110,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { booking_key: "booking_key" }; const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -2039,6 +2121,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -2050,6 +2133,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2072,9 +2156,10 @@ describe("LabTestsClient", () => { bookingKey: "booking_key", }); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -2082,6 +2167,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -2096,6 +2182,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2145,9 +2232,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancellation_reason_id: "cancellation_reason_id" }; const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -2155,6 +2243,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -2166,6 +2255,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2188,9 +2278,10 @@ describe("LabTestsClient", () => { cancellationReasonId: "cancellation_reason_id", }); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -2198,6 +2289,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -2212,6 +2304,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2261,7 +2354,7 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = [ - { id: "8dc08e6a-7afc-41d6-8ff2-4522bb5a0522", name: "I'm feeling sick", is_refundable: true }, + { id: "97c21322-3030-4e8e-9683-b346d6c26002", name: "I'm feeling sick", is_refundable: true }, ]; server .mockEndpoint() @@ -2274,7 +2367,7 @@ describe("LabTestsClient", () => { const response = await client.labTests.getPhlebotomyAppointmentCancellationReason(); expect(response).toEqual([ { - id: "8dc08e6a-7afc-41d6-8ff2-4522bb5a0522", + id: "97c21322-3030-4e8e-9683-b346d6c26002", name: "I'm feeling sick", isRefundable: true, }, @@ -2286,9 +2379,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -2296,6 +2390,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -2307,6 +2402,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2326,9 +2422,10 @@ describe("LabTestsClient", () => { const response = await client.labTests.getPhlebotomyAppointment("order_id"); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -2336,6 +2433,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -2350,6 +2448,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -2418,6 +2517,7 @@ describe("LabTestsClient", () => { zipCode: "zip_code", radius: "10", lab: "quest", + labs: ["quest"], labAccountId: "lab_account_id", }); expect(response).toEqual({ @@ -2495,6 +2595,7 @@ describe("LabTestsClient", () => { zipCode: "zip_code", labId: 1, radius: "10", + capabilities: ["stat"], labAccountId: "lab_account_id", }); expect(response).toEqual({ @@ -2571,6 +2672,7 @@ describe("LabTestsClient", () => { const response = await client.labTests.getOrderPscInfo("order_id", { radius: "10", + capabilities: ["stat"], }); expect(response).toEqual({ labId: 1, @@ -2745,6 +2847,11 @@ describe("LabTestsClient", () => { date_reported: { timestamp: "2024-01-15T09:30:00Z", timezone_offset: 1 }, }, }, + order_transaction: { + id: "id", + status: "active", + orders: [{ id: "id", created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z" }], + }, }; server .mockEndpoint() @@ -2837,6 +2944,17 @@ describe("LabTestsClient", () => { }, }, }, + orderTransaction: { + id: "id", + status: "active", + orders: [ + { + id: "id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + }, }); }); @@ -2896,8 +3014,10 @@ describe("LabTestsClient", () => { const response = await client.labTests.getPscAppointmentAvailability({ lab: "quest", startDate: "start_date", + siteCodes: ["site_codes"], zipCode: "zip_code", radius: "10", + allowStale: true, }); expect(response).toEqual({ slots: [ @@ -2977,9 +3097,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { booking_key: "booking_key" }; const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -2987,6 +3108,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -2998,6 +3120,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3017,12 +3140,15 @@ describe("LabTestsClient", () => { .build(); const response = await client.labTests.bookPscAppointment("order_id", { - bookingKey: "booking_key", + body: { + bookingKey: "booking_key", + }, }); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -3030,6 +3156,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -3044,6 +3171,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3083,7 +3211,9 @@ describe("LabTestsClient", () => { await expect(async () => { return await client.labTests.bookPscAppointment("order_id", { - bookingKey: "booking_key", + body: { + bookingKey: "booking_key", + }, }); }).rejects.toThrow(Vital.UnprocessableEntityError); }); @@ -3093,9 +3223,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { booking_key: "booking_key" }; const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -3103,6 +3234,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -3114,6 +3246,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3136,9 +3269,10 @@ describe("LabTestsClient", () => { bookingKey: "booking_key", }); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -3146,6 +3280,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -3160,6 +3295,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3209,9 +3345,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancellationReasonId: "cancellationReasonId" }; const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -3219,6 +3356,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -3230,6 +3368,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3252,9 +3391,10 @@ describe("LabTestsClient", () => { cancellationReasonId: "cancellationReasonId", }); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -3262,6 +3402,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -3276,6 +3417,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3325,7 +3467,7 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = [ - { id: "8dc08e6a-7afc-41d6-8ff2-4522bb5a0522", name: "I'm feeling sick", is_refundable: true }, + { id: "97c21322-3030-4e8e-9683-b346d6c26002", name: "I'm feeling sick", is_refundable: true }, ]; server .mockEndpoint() @@ -3338,7 +3480,7 @@ describe("LabTestsClient", () => { const response = await client.labTests.getPscAppointmentCancellationReason(); expect(response).toEqual([ { - id: "8dc08e6a-7afc-41d6-8ff2-4522bb5a0522", + id: "97c21322-3030-4e8e-9683-b346d6c26002", name: "I'm feeling sick", isRefundable: true, }, @@ -3350,9 +3492,10 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - user_id: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - order_id: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + user_id: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + order_id: "459d37ff-9a22-4a95-99bb-92618ce95306", + order_transaction_id: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { first_line: "123 Main St.", second_line: "Apt. 208", @@ -3360,6 +3503,7 @@ describe("LabTestsClient", () => { state: "CA", zip_code: "91189", unit: "unit", + access_notes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, lat: 37.7749295 }, start_at: "2022-01-01T00:00:00Z", @@ -3371,6 +3515,7 @@ describe("LabTestsClient", () => { provider_id: "123", external_id: "ext-123", can_reschedule: true, + appointment_notes: "Please bring photo ID", event_status: "scheduled", event_data: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3390,9 +3535,10 @@ describe("LabTestsClient", () => { const response = await client.labTests.getPscAppointment("order_id"); expect(response).toEqual({ - id: "c64c03de-8a4d-4633-8cc2-0b539e4c12bd", - userId: "ee417bae-a9e6-4b8d-b5b0-8fff4f699cad", - orderId: "2ba972e3-c84a-446a-9028-51ff63d79ec6", + id: "01a60c55-0c18-47f0-b78f-5cf105234dda", + userId: "ea0b27a6-f8f5-45bc-8d8f-c3c25159fdfc", + orderId: "459d37ff-9a22-4a95-99bb-92618ce95306", + orderTransactionId: "c535238b-e4a1-4772-8f48-4a8990ff068e", address: { firstLine: "123 Main St.", secondLine: "Apt. 208", @@ -3400,6 +3546,7 @@ describe("LabTestsClient", () => { state: "CA", zipCode: "91189", unit: "unit", + accessNotes: "Gate code #1234, use side entrance", }, location: { lng: -122.4194155, @@ -3414,6 +3561,7 @@ describe("LabTestsClient", () => { providerId: "123", externalId: "ext-123", canReschedule: true, + appointmentNotes: "Please bring photo ID", eventStatus: "scheduled", eventData: { description: "Metadata field containing provider specific data, like cancellation reason or origin", @@ -3460,9 +3608,9 @@ describe("LabTestsClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -3492,6 +3640,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -3552,9 +3701,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -3569,14 +3718,36 @@ describe("LabTestsClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ - { id: 1, created_at: "2022-01-01T00:00:00Z", status: "received.testkit.ordered" }, - { id: 2, created_at: "2022-01-02T00:00:00Z", status: "received.testkit.requisition_created" }, - { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, + { + id: 1, + created_at: "2022-01-01T00:00:00Z", + status: "received.testkit.ordered", + status_detail: "fulfillment_error", + }, + { + id: 2, + created_at: "2022-01-02T00:00:00Z", + status: "received.testkit.requisition_created", + status_detail: "fulfillment_error", + }, + { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -3600,14 +3771,37 @@ describe("LabTestsClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }; server.mockEndpoint().get("/v3/order/order_id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.labTests.getOrder("order_id"); expect(response).toEqual({ - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -3643,6 +3837,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -3709,9 +3904,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -3726,6 +3921,7 @@ describe("LabTestsClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -3733,19 +3929,28 @@ describe("LabTestsClient", () => { id: 1, createdAt: new Date("2022-01-01T00:00:00.000Z"), status: "received.testkit.ordered", + statusDetail: "fulfillment_error", }, { id: 2, createdAt: new Date("2022-01-02T00:00:00.000Z"), status: "received.testkit.requisition_created", + statusDetail: "fulfillment_error", }, { id: 3, createdAt: new Date("2022-01-03T00:00:00.000Z"), status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -3773,6 +3978,29 @@ describe("LabTestsClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }); }); @@ -3805,9 +4033,9 @@ describe("LabTestsClient", () => { }; const rawResponseBody = { order: { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -3840,6 +4068,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -3900,9 +4129,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -3917,6 +4146,7 @@ describe("LabTestsClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -3925,6 +4155,12 @@ describe("LabTestsClient", () => { { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -3948,6 +4184,29 @@ describe("LabTestsClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, status: "status", message: "message", @@ -3955,8 +4214,6 @@ describe("LabTestsClient", () => { server .mockEndpoint() .post("/v3/order") - .header("X-Idempotency-Key", "X-Idempotency-Key") - .header("X-Idempotency-Error", "no-cache") .jsonBody(rawRequestBody) .respondWith() .statusCode(200) @@ -3964,8 +4221,6 @@ describe("LabTestsClient", () => { .build(); const response = await client.labTests.createOrder({ - idempotencyKey: "X-Idempotency-Key", - idempotencyError: "no-cache", userId: "user_id", patientDetails: { firstName: "first_name", @@ -3985,9 +4240,9 @@ describe("LabTestsClient", () => { }); expect(response).toEqual({ order: { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -4020,6 +4275,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -4086,9 +4342,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -4103,6 +4359,7 @@ describe("LabTestsClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -4123,6 +4380,12 @@ describe("LabTestsClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -4150,6 +4413,29 @@ describe("LabTestsClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, status: "status", message: "message", @@ -4231,9 +4517,9 @@ describe("LabTestsClient", () => { }; const rawResponseBody = { order: { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -4266,6 +4552,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -4326,9 +4613,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -4343,6 +4630,7 @@ describe("LabTestsClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -4351,6 +4639,12 @@ describe("LabTestsClient", () => { { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -4374,6 +4668,29 @@ describe("LabTestsClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, status: "status", message: "message", @@ -4412,9 +4729,9 @@ describe("LabTestsClient", () => { }); expect(response).toEqual({ order: { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -4447,6 +4764,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -4513,9 +4831,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -4530,6 +4848,7 @@ describe("LabTestsClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -4550,6 +4869,12 @@ describe("LabTestsClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -4577,6 +4902,29 @@ describe("LabTestsClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, status: "status", message: "message", @@ -4652,9 +5000,9 @@ describe("LabTestsClient", () => { const rawResponseBody = { order: { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -4687,6 +5035,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -4747,9 +5096,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -4764,6 +5113,7 @@ describe("LabTestsClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -4772,6 +5122,12 @@ describe("LabTestsClient", () => { { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -4795,6 +5151,29 @@ describe("LabTestsClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, status: "status", message: "message", @@ -4810,9 +5189,9 @@ describe("LabTestsClient", () => { const response = await client.labTests.cancelOrder("order_id"); expect(response).toEqual({ order: { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -4845,6 +5224,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -4911,9 +5291,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -4928,6 +5308,7 @@ describe("LabTestsClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -4948,6 +5329,12 @@ describe("LabTestsClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -4975,6 +5362,29 @@ describe("LabTestsClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, status: "status", message: "message", @@ -5048,9 +5458,9 @@ describe("LabTestsClient", () => { const rawResponseBody = { order: { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -5083,6 +5493,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -5143,9 +5554,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -5160,6 +5571,7 @@ describe("LabTestsClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -5168,6 +5580,12 @@ describe("LabTestsClient", () => { { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -5191,6 +5609,29 @@ describe("LabTestsClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, status: "status", message: "message", @@ -5206,9 +5647,9 @@ describe("LabTestsClient", () => { const response = await client.labTests.updateOnSiteCollectionOrderDrawCompleted("order_id"); expect(response).toEqual({ order: { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -5241,6 +5682,7 @@ describe("LabTestsClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -5307,9 +5749,9 @@ describe("LabTestsClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -5324,6 +5766,7 @@ describe("LabTestsClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -5344,6 +5787,12 @@ describe("LabTestsClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -5371,6 +5820,29 @@ describe("LabTestsClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, status: "status", message: "message", diff --git a/tests/wire/link.test.ts b/tests/wire/link.test.ts index 89e891bb0..466b719a0 100644 --- a/tests/wire/link.test.ts +++ b/tests/wire/link.test.ts @@ -28,7 +28,6 @@ describe("LinkClient", () => { const response = await client.link.listBulkOps({ nextCursor: "next_cursor", pageSize: 1, - teamId: "infer_from_context", }); expect(response).toEqual({ data: [ @@ -84,7 +83,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.bulkImport({ - teamId: "infer_from_context", provider: "oura", connections: [ { @@ -172,7 +170,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.bulkTriggerHistoricalPull({ - teamId: "infer_from_context", userIds: ["user_ids"], provider: "oura", }); @@ -230,7 +227,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.bulkExport({ - teamId: "infer_from_context", provider: "oura", }); expect(response).toEqual({ @@ -284,7 +280,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.bulkPause({ - teamId: "infer_from_context", userIds: ["user_ids"], provider: "oura", }); @@ -499,18 +494,9 @@ describe("LinkClient", () => { const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/v2/link/state") - .header("x-vital-link-token", "x-vital-link-token") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/v2/link/state").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.link.tokenState({ - vitalLinkToken: "x-vital-link-token", - }); + const response = await client.link.tokenState(); expect(response).toEqual({ key: "value", }); @@ -536,7 +522,6 @@ describe("LinkClient", () => { server .mockEndpoint() .post("/v2/link/auth/email") - .header("x-vital-link-token", "x-vital-link-token") .jsonBody(rawRequestBody) .respondWith() .statusCode(200) @@ -544,7 +529,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.emailAuth({ - vitalLinkToken: "x-vital-link-token", email: "email", provider: "oura", authType: "password", @@ -585,7 +569,6 @@ describe("LinkClient", () => { server .mockEndpoint() .post("/v2/link/auth") - .header("x-vital-link-token", "x-vital-link-token") .jsonBody(rawRequestBody) .respondWith() .statusCode(200) @@ -593,7 +576,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.passwordAuth({ - vitalLinkToken: "x-vital-link-token", username: "username", password: "password", provider: "oura", @@ -648,15 +630,12 @@ describe("LinkClient", () => { server .mockEndpoint() .get("/v2/link/provider/oauth/oura") - .header("x-vital-link-token", "x-vital-link-token") .respondWith() .statusCode(200) .jsonBody(rawResponseBody) .build(); - const response = await client.link.generateOauthLink("oura", { - vitalLinkToken: "x-vital-link-token", - }); + const response = await client.link.generateOauthLink("oura"); expect(response).toEqual({ name: "Garmin", slug: "garmin", @@ -707,7 +686,6 @@ describe("LinkClient", () => { server .mockEndpoint() .post("/v2/link/provider/password/whoop") - .header("x-vital-link-token", "x-vital-link-token") .jsonBody(rawRequestBody) .respondWith() .statusCode(200) @@ -715,7 +693,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.connectPasswordProvider("whoop", { - vitalLinkToken: "x-vital-link-token", username: "username", password: "password", }); @@ -773,7 +750,6 @@ describe("LinkClient", () => { server .mockEndpoint() .post("/v2/link/provider/password/whoop/complete_mfa") - .header("x-vital-link-token", "x-vital-link-token") .jsonBody(rawRequestBody) .respondWith() .statusCode(200) @@ -781,7 +757,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.completePasswordProviderMfa("whoop", { - vitalLinkToken: "x-vital-link-token", mfaCode: "mfa_code", }); expect(response).toEqual({ @@ -828,7 +803,6 @@ describe("LinkClient", () => { server .mockEndpoint() .post("/v2/link/provider/email/freestyle_libre") - .header("x-vital-link-token", "x-vital-link-token") .jsonBody(rawRequestBody) .respondWith() .statusCode(200) @@ -836,7 +810,6 @@ describe("LinkClient", () => { .build(); const response = await client.link.connectEmailAuthProvider("freestyle_libre", { - vitalLinkToken: "x-vital-link-token", email: "email", }); expect(response).toEqual({ @@ -881,18 +854,9 @@ describe("LinkClient", () => { form_components: { key: "value" }, }, ]; - server - .mockEndpoint() - .get("/v2/link/providers") - .header("x-vital-link-token", "x-vital-link-token") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/v2/link/providers").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.link.getAllProviders({ - vitalLinkToken: "x-vital-link-token", - }); + const response = await client.link.getAllProviders(); expect(response).toEqual([ { id: 1, diff --git a/tests/wire/orderTransaction.test.ts b/tests/wire/orderTransaction.test.ts new file mode 100644 index 000000000..485c66952 --- /dev/null +++ b/tests/wire/orderTransaction.test.ts @@ -0,0 +1,266 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Vital from "../../src/api/index"; +import { VitalClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("OrderTransactionClient", () => { + test("get_transaction (1)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + team_id: "team_id", + status: "active", + orders: [ + { + id: "id", + origin: "initial", + parent_id: "parent_id", + last_status: "ordered", + last_status_created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + created_at: "2024-01-15T09:30:00Z", + }, + ], + }; + server + .mockEndpoint() + .get("/v3/order_transaction/transaction_id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.orderTransaction.getTransaction("transaction_id"); + expect(response).toEqual({ + id: "id", + teamId: "team_id", + status: "active", + orders: [ + { + id: "id", + origin: "initial", + parentId: "parent_id", + lastStatus: "ordered", + lastStatusCreatedAt: new Date("2024-01-15T09:30:00.000Z"), + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + createdAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + }); + }); + + test("get_transaction (2)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/v3/order_transaction/transaction_id") + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.orderTransaction.getTransaction("transaction_id"); + }).rejects.toThrow(Vital.UnprocessableEntityError); + }); + + test("get_transaction_result (1)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + metadata: { + age: "age", + dob: "18/08/1993", + "clia_#": "clia_#", + patient: "Bob Smith", + provider: "Dr. Jack Smith", + laboratory: "Quest Diagnostics", + date_reported: "2020-01-01", + date_collected: "2022-02-02", + specimen_number: "123131", + date_received: "2022-01-01", + status: "final", + interpretation: "normal", + patient_id: "patient_id", + account_id: "account_id", + }, + results: [ + { + name: "Monocytes(Absolute)", + slug: "monocytes-absolute", + result: "0.4", + type: "numeric", + unit: "x10E3/uL", + timestamp: "2023-11-01T08:28:00Z", + notes: "Final", + reference_range: "reference_range", + min_range_value: 0.1, + max_range_value: 0.9, + is_above_max_range: false, + is_below_min_range: false, + interpretation: "normal", + loinc: "742-7", + loinc_slug: "monocytes-auto-bld-vol", + provider_id: "provider_id", + source_markers: [{ marker_id: 1, name: "name", slug: "slug" }], + performing_laboratory: "performing_laboratory", + source_sample_id: "source_sample_id", + }, + ], + missing_results: [ + { + name: "name", + slug: "slug", + inferred_failure_type: "quantity_not_sufficient_failure", + note: "note", + loinc: "loinc", + loinc_slug: "loinc_slug", + provider_id: "provider_id", + source_markers: [{ marker_id: 1, name: "name", slug: "slug" }], + }, + ], + sample_information: { + key: { + sample_id: "sample_id", + control_number: "control_number", + date_collected: { timestamp: "2024-01-15T09:30:00Z", timezone_offset: 1 }, + date_received: { timestamp: "2024-01-15T09:30:00Z", timezone_offset: 1 }, + date_reported: { timestamp: "2024-01-15T09:30:00Z", timezone_offset: 1 }, + }, + }, + order_transaction: { + id: "id", + status: "active", + orders: [{ id: "id", created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z" }], + }, + }; + server + .mockEndpoint() + .get("/v3/order_transaction/transaction_id/result") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.orderTransaction.getTransactionResult("transaction_id"); + expect(response).toEqual({ + metadata: { + age: "age", + dob: "18/08/1993", + clia: "clia_#", + patient: "Bob Smith", + provider: "Dr. Jack Smith", + laboratory: "Quest Diagnostics", + dateReported: "2020-01-01", + dateCollected: "2022-02-02", + specimenNumber: "123131", + dateReceived: "2022-01-01", + status: "final", + interpretation: "normal", + patientId: "patient_id", + accountId: "account_id", + }, + results: [ + { + name: "Monocytes(Absolute)", + slug: "monocytes-absolute", + result: "0.4", + type: "numeric", + unit: "x10E3/uL", + timestamp: new Date("2023-11-01T08:28:00.000Z"), + notes: "Final", + referenceRange: "reference_range", + minRangeValue: 0.1, + maxRangeValue: 0.9, + isAboveMaxRange: false, + isBelowMinRange: false, + interpretation: "normal", + loinc: "742-7", + loincSlug: "monocytes-auto-bld-vol", + providerId: "provider_id", + sourceMarkers: [ + { + markerId: 1, + name: "name", + slug: "slug", + }, + ], + performingLaboratory: "performing_laboratory", + sourceSampleId: "source_sample_id", + }, + ], + missingResults: [ + { + name: "name", + slug: "slug", + inferredFailureType: "quantity_not_sufficient_failure", + note: "note", + loinc: "loinc", + loincSlug: "loinc_slug", + providerId: "provider_id", + sourceMarkers: [ + { + markerId: 1, + name: "name", + slug: "slug", + }, + ], + }, + ], + sampleInformation: { + key: { + sampleId: "sample_id", + controlNumber: "control_number", + dateCollected: { + timestamp: new Date("2024-01-15T09:30:00.000Z"), + timezoneOffset: 1, + }, + dateReceived: { + timestamp: new Date("2024-01-15T09:30:00.000Z"), + timezoneOffset: 1, + }, + dateReported: { + timestamp: new Date("2024-01-15T09:30:00.000Z"), + timezoneOffset: 1, + }, + }, + }, + orderTransaction: { + id: "id", + status: "active", + orders: [ + { + id: "id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + }, + }); + }); + + test("get_transaction_result (2)", async () => { + const server = mockServerPool.createServer(); + const client = new VitalClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = {}; + server + .mockEndpoint() + .get("/v3/order_transaction/transaction_id/result") + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.orderTransaction.getTransactionResult("transaction_id"); + }).rejects.toThrow(Vital.UnprocessableEntityError); + }); +}); diff --git a/tests/wire/payor.test.ts b/tests/wire/payor.test.ts index 328e426ce..6d6512e71 100644 --- a/tests/wire/payor.test.ts +++ b/tests/wire/payor.test.ts @@ -23,6 +23,7 @@ describe("PayorClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, source: "platform", }; @@ -56,6 +57,7 @@ describe("PayorClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, source: "platform", }); diff --git a/tests/wire/sleep.test.ts b/tests/wire/sleep.test.ts index ac0320cb2..33fe0d14c 100644 --- a/tests/wire/sleep.test.ts +++ b/tests/wire/sleep.test.ts @@ -27,6 +27,7 @@ describe("SleepClient", () => { rem: 2400, deep: 2400, score: 1, + recovery_readiness_score: 82, hr_lowest: 43, hr_average: 50, hr_resting: 1, @@ -41,67 +42,67 @@ describe("SleepClient", () => { source: { provider: "oura", type: "unknown", device_id: "550e8400-e29b-41d4-a716-446655440000" }, sleep_stream: { hrv: [ - { id: 0, unit: "rmssd", timestamp: "2026-01-12T12:39:39Z", value: 80 }, - { id: 1, unit: "rmssd", timestamp: "2026-01-12T12:40:09Z", value: 33 }, - { id: 2, unit: "rmssd", timestamp: "2026-01-12T12:40:39Z", value: 50 }, - { id: 3, unit: "rmssd", timestamp: "2026-01-12T12:41:09Z", value: 3 }, - { id: 4, unit: "rmssd", timestamp: "2026-01-12T12:41:39Z", value: 73 }, + { id: 0, unit: "rmssd", timestamp: "2026-04-24T22:18:32Z", value: 16 }, + { id: 1, unit: "rmssd", timestamp: "2026-04-24T22:19:02Z", value: 21 }, + { id: 2, unit: "rmssd", timestamp: "2026-04-24T22:19:32Z", value: 84 }, + { id: 3, unit: "rmssd", timestamp: "2026-04-24T22:20:02Z", value: 20 }, + { id: 4, unit: "rmssd", timestamp: "2026-04-24T22:20:32Z", value: 96 }, ], heartrate: [ - { id: 0, unit: "bpm", timestamp: "2026-01-12T12:39:39Z", value: 46 }, - { id: 1, unit: "bpm", timestamp: "2026-01-12T12:40:09Z", value: 113 }, - { id: 2, unit: "bpm", timestamp: "2026-01-12T12:40:39Z", value: 117 }, - { id: 3, unit: "bpm", timestamp: "2026-01-12T12:41:09Z", value: 86 }, - { id: 4, unit: "bpm", timestamp: "2026-01-12T12:41:39Z", value: 166 }, + { id: 0, unit: "bpm", timestamp: "2026-04-24T22:18:32Z", value: 39 }, + { id: 1, unit: "bpm", timestamp: "2026-04-24T22:19:02Z", value: 86 }, + { id: 2, unit: "bpm", timestamp: "2026-04-24T22:19:32Z", value: 25 }, + { id: 3, unit: "bpm", timestamp: "2026-04-24T22:20:02Z", value: 173 }, + { id: 4, unit: "bpm", timestamp: "2026-04-24T22:20:32Z", value: 32 }, ], hypnogram: [ { id: 0, unit: "stage", - timestamp: "2026-01-12T12:39:39Z", + timestamp: "2026-04-24T22:18:32Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 4, + value: 1, }, { id: 1, unit: "stage", - timestamp: "2026-01-12T12:40:09Z", + timestamp: "2026-04-24T22:19:02Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 2, + value: 1, }, { id: 2, unit: "stage", - timestamp: "2026-01-12T12:40:39Z", + timestamp: "2026-04-24T22:19:32Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 3, + value: 1, }, { id: 3, unit: "stage", - timestamp: "2026-01-12T12:41:09Z", + timestamp: "2026-04-24T22:20:02Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 1, + value: 2, }, { id: 4, unit: "stage", - timestamp: "2026-01-12T12:41:39Z", + timestamp: "2026-04-24T22:20:32Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 0, + value: -1, }, ], respiratory_rate: [ - { id: 0, unit: "bpm", timestamp: "2026-01-12T12:39:39Z", value: 22 }, - { id: 1, unit: "bpm", timestamp: "2026-01-12T12:40:09Z", value: 21 }, - { id: 2, unit: "bpm", timestamp: "2026-01-12T12:40:39Z", value: 22 }, - { id: 3, unit: "bpm", timestamp: "2026-01-12T12:41:09Z", value: 22 }, - { id: 4, unit: "bpm", timestamp: "2026-01-12T12:41:39Z", value: 12 }, + { id: 0, unit: "bpm", timestamp: "2026-04-24T22:18:32Z", value: 29 }, + { id: 1, unit: "bpm", timestamp: "2026-04-24T22:19:02Z", value: 20 }, + { id: 2, unit: "bpm", timestamp: "2026-04-24T22:19:32Z", value: 9 }, + { id: 3, unit: "bpm", timestamp: "2026-04-24T22:20:02Z", value: 22 }, + { id: 4, unit: "bpm", timestamp: "2026-04-24T22:20:32Z", value: 25 }, ], }, created_at: "2023-02-27T20:31:24Z", @@ -140,6 +141,7 @@ describe("SleepClient", () => { rem: 2400, deep: 2400, score: 1, + recoveryReadinessScore: 82, hrLowest: 43, hrAverage: 50, hrResting: 1, @@ -161,138 +163,138 @@ describe("SleepClient", () => { { id: 0, unit: "rmssd", - timestamp: new Date("2026-01-12T12:39:39.000Z"), - value: 80, + timestamp: new Date("2026-04-24T22:18:32.000Z"), + value: 16, }, { id: 1, unit: "rmssd", - timestamp: new Date("2026-01-12T12:40:09.000Z"), - value: 33, + timestamp: new Date("2026-04-24T22:19:02.000Z"), + value: 21, }, { id: 2, unit: "rmssd", - timestamp: new Date("2026-01-12T12:40:39.000Z"), - value: 50, + timestamp: new Date("2026-04-24T22:19:32.000Z"), + value: 84, }, { id: 3, unit: "rmssd", - timestamp: new Date("2026-01-12T12:41:09.000Z"), - value: 3, + timestamp: new Date("2026-04-24T22:20:02.000Z"), + value: 20, }, { id: 4, unit: "rmssd", - timestamp: new Date("2026-01-12T12:41:39.000Z"), - value: 73, + timestamp: new Date("2026-04-24T22:20:32.000Z"), + value: 96, }, ], heartrate: [ { id: 0, unit: "bpm", - timestamp: new Date("2026-01-12T12:39:39.000Z"), - value: 46, + timestamp: new Date("2026-04-24T22:18:32.000Z"), + value: 39, }, { id: 1, unit: "bpm", - timestamp: new Date("2026-01-12T12:40:09.000Z"), - value: 113, + timestamp: new Date("2026-04-24T22:19:02.000Z"), + value: 86, }, { id: 2, unit: "bpm", - timestamp: new Date("2026-01-12T12:40:39.000Z"), - value: 117, + timestamp: new Date("2026-04-24T22:19:32.000Z"), + value: 25, }, { id: 3, unit: "bpm", - timestamp: new Date("2026-01-12T12:41:09.000Z"), - value: 86, + timestamp: new Date("2026-04-24T22:20:02.000Z"), + value: 173, }, { id: 4, unit: "bpm", - timestamp: new Date("2026-01-12T12:41:39.000Z"), - value: 166, + timestamp: new Date("2026-04-24T22:20:32.000Z"), + value: 32, }, ], hypnogram: [ { id: 0, unit: "stage", - timestamp: new Date("2026-01-12T12:39:39.000Z"), + timestamp: new Date("2026-04-24T22:18:32.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 4, + value: 1, }, { id: 1, unit: "stage", - timestamp: new Date("2026-01-12T12:40:09.000Z"), + timestamp: new Date("2026-04-24T22:19:02.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 2, + value: 1, }, { id: 2, unit: "stage", - timestamp: new Date("2026-01-12T12:40:39.000Z"), + timestamp: new Date("2026-04-24T22:19:32.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 3, + value: 1, }, { id: 3, unit: "stage", - timestamp: new Date("2026-01-12T12:41:09.000Z"), + timestamp: new Date("2026-04-24T22:20:02.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 1, + value: 2, }, { id: 4, unit: "stage", - timestamp: new Date("2026-01-12T12:41:39.000Z"), + timestamp: new Date("2026-04-24T22:20:32.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 0, + value: -1, }, ], respiratoryRate: [ { id: 0, unit: "bpm", - timestamp: new Date("2026-01-12T12:39:39.000Z"), - value: 22, + timestamp: new Date("2026-04-24T22:18:32.000Z"), + value: 29, }, { id: 1, unit: "bpm", - timestamp: new Date("2026-01-12T12:40:09.000Z"), - value: 21, + timestamp: new Date("2026-04-24T22:19:02.000Z"), + value: 20, }, { id: 2, unit: "bpm", - timestamp: new Date("2026-01-12T12:40:39.000Z"), - value: 22, + timestamp: new Date("2026-04-24T22:19:32.000Z"), + value: 9, }, { id: 3, unit: "bpm", - timestamp: new Date("2026-01-12T12:41:09.000Z"), + timestamp: new Date("2026-04-24T22:20:02.000Z"), value: 22, }, { id: 4, unit: "bpm", - timestamp: new Date("2026-01-12T12:41:39.000Z"), - value: 12, + timestamp: new Date("2026-04-24T22:20:32.000Z"), + value: 25, }, ], }, @@ -332,16 +334,16 @@ describe("SleepClient", () => { { timestamp: "2023-02-27T12:31:24Z", data: { data: "...provider_specific_data" }, - provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", user_id: "1449752e-0d8a-40e0-9206-91ab099b2537", + provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", source_id: 1, priority_id: 1, id: "id", - source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, - priority: 1, source_device_id: "550e8400-e29b-41d4-a716-446655440000", created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", + source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, + priority: 1, }, ], }; @@ -365,20 +367,20 @@ describe("SleepClient", () => { data: { data: "...provider_specific_data", }, - providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", userId: "1449752e-0d8a-40e0-9206-91ab099b2537", + providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", sourceId: 1, priorityId: 1, id: "id", + sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + updatedAt: new Date("2024-01-15T09:30:00.000Z"), source: { name: "Oura", slug: "oura", logo: "https://logo_url.com", }, priority: 1, - sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", - createdAt: new Date("2024-01-15T09:30:00.000Z"), - updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], }); @@ -415,41 +417,48 @@ describe("SleepClient", () => { timezone_offset: 1, type: "type", unit: "rmssd", - timestamp: "2026-01-12T12:39:39Z", - value: 80, + timestamp: "2026-04-24T22:18:32Z", + value: 16, }, { id: 1, timezone_offset: 1, type: "type", unit: "rmssd", - timestamp: "2026-01-12T12:40:09Z", - value: 33, + timestamp: "2026-04-24T22:19:02Z", + value: 21, }, { id: 2, timezone_offset: 1, type: "type", unit: "rmssd", - timestamp: "2026-01-12T12:40:39Z", - value: 50, + timestamp: "2026-04-24T22:19:32Z", + value: 84, + }, + { + id: 3, + timezone_offset: 1, + type: "type", + unit: "rmssd", + timestamp: "2026-04-24T22:20:02Z", + value: 20, }, - { id: 3, timezone_offset: 1, type: "type", unit: "rmssd", timestamp: "2026-01-12T12:41:09Z", value: 3 }, { id: 4, timezone_offset: 1, type: "type", unit: "rmssd", - timestamp: "2026-01-12T12:41:39Z", - value: 73, + timestamp: "2026-04-24T22:20:32Z", + value: 96, }, ], heartrate: [ - { id: 0, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:39:39Z", value: 46 }, - { id: 1, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:40:09Z", value: 113 }, - { id: 2, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:40:39Z", value: 117 }, - { id: 3, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:41:09Z", value: 86 }, - { id: 4, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:41:39Z", value: 166 }, + { id: 0, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:18:32Z", value: 39 }, + { id: 1, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:19:02Z", value: 86 }, + { id: 2, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:19:32Z", value: 25 }, + { id: 3, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:20:02Z", value: 173 }, + { id: 4, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:20:32Z", value: 32 }, ], hypnogram: [ { @@ -457,58 +466,58 @@ describe("SleepClient", () => { timezone_offset: 1, type: "type", unit: "stage", - timestamp: "2026-01-12T12:39:39Z", + timestamp: "2026-04-24T22:18:32Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 4, + value: 1, }, { id: 1, timezone_offset: 1, type: "type", unit: "stage", - timestamp: "2026-01-12T12:40:09Z", + timestamp: "2026-04-24T22:19:02Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 2, + value: 1, }, { id: 2, timezone_offset: 1, type: "type", unit: "stage", - timestamp: "2026-01-12T12:40:39Z", + timestamp: "2026-04-24T22:19:32Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 3, + value: 1, }, { id: 3, timezone_offset: 1, type: "type", unit: "stage", - timestamp: "2026-01-12T12:41:09Z", + timestamp: "2026-04-24T22:20:02Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 1, + value: 2, }, { id: 4, timezone_offset: 1, type: "type", unit: "stage", - timestamp: "2026-01-12T12:41:39Z", + timestamp: "2026-04-24T22:20:32Z", start: "2024-01-15T09:30:00Z", end: "2024-01-15T09:30:00Z", - value: 0, + value: -1, }, ], respiratory_rate: [ - { id: 0, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:39:39Z", value: 22 }, - { id: 1, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:40:09Z", value: 21 }, - { id: 2, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:40:39Z", value: 22 }, - { id: 3, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:41:09Z", value: 22 }, - { id: 4, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-01-12T12:41:39Z", value: 12 }, + { id: 0, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:18:32Z", value: 29 }, + { id: 1, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:19:02Z", value: 20 }, + { id: 2, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:19:32Z", value: 9 }, + { id: 3, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:20:02Z", value: 22 }, + { id: 4, timezone_offset: 1, type: "type", unit: "bpm", timestamp: "2026-04-24T22:20:32Z", value: 25 }, ], }; server @@ -527,40 +536,40 @@ describe("SleepClient", () => { timezoneOffset: 1, type: "type", unit: "rmssd", - timestamp: new Date("2026-01-12T12:39:39.000Z"), - value: 80, + timestamp: new Date("2026-04-24T22:18:32.000Z"), + value: 16, }, { id: 1, timezoneOffset: 1, type: "type", unit: "rmssd", - timestamp: new Date("2026-01-12T12:40:09.000Z"), - value: 33, + timestamp: new Date("2026-04-24T22:19:02.000Z"), + value: 21, }, { id: 2, timezoneOffset: 1, type: "type", unit: "rmssd", - timestamp: new Date("2026-01-12T12:40:39.000Z"), - value: 50, + timestamp: new Date("2026-04-24T22:19:32.000Z"), + value: 84, }, { id: 3, timezoneOffset: 1, type: "type", unit: "rmssd", - timestamp: new Date("2026-01-12T12:41:09.000Z"), - value: 3, + timestamp: new Date("2026-04-24T22:20:02.000Z"), + value: 20, }, { id: 4, timezoneOffset: 1, type: "type", unit: "rmssd", - timestamp: new Date("2026-01-12T12:41:39.000Z"), - value: 73, + timestamp: new Date("2026-04-24T22:20:32.000Z"), + value: 96, }, ], heartrate: [ @@ -569,40 +578,40 @@ describe("SleepClient", () => { timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:39:39.000Z"), - value: 46, + timestamp: new Date("2026-04-24T22:18:32.000Z"), + value: 39, }, { id: 1, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:40:09.000Z"), - value: 113, + timestamp: new Date("2026-04-24T22:19:02.000Z"), + value: 86, }, { id: 2, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:40:39.000Z"), - value: 117, + timestamp: new Date("2026-04-24T22:19:32.000Z"), + value: 25, }, { id: 3, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:41:09.000Z"), - value: 86, + timestamp: new Date("2026-04-24T22:20:02.000Z"), + value: 173, }, { id: 4, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:41:39.000Z"), - value: 166, + timestamp: new Date("2026-04-24T22:20:32.000Z"), + value: 32, }, ], hypnogram: [ @@ -611,50 +620,50 @@ describe("SleepClient", () => { timezoneOffset: 1, type: "type", unit: "stage", - timestamp: new Date("2026-01-12T12:39:39.000Z"), + timestamp: new Date("2026-04-24T22:18:32.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 4, + value: 1, }, { id: 1, timezoneOffset: 1, type: "type", unit: "stage", - timestamp: new Date("2026-01-12T12:40:09.000Z"), + timestamp: new Date("2026-04-24T22:19:02.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 2, + value: 1, }, { id: 2, timezoneOffset: 1, type: "type", unit: "stage", - timestamp: new Date("2026-01-12T12:40:39.000Z"), + timestamp: new Date("2026-04-24T22:19:32.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 3, + value: 1, }, { id: 3, timezoneOffset: 1, type: "type", unit: "stage", - timestamp: new Date("2026-01-12T12:41:09.000Z"), + timestamp: new Date("2026-04-24T22:20:02.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 1, + value: 2, }, { id: 4, timezoneOffset: 1, type: "type", unit: "stage", - timestamp: new Date("2026-01-12T12:41:39.000Z"), + timestamp: new Date("2026-04-24T22:20:32.000Z"), start: new Date("2024-01-15T09:30:00.000Z"), end: new Date("2024-01-15T09:30:00.000Z"), - value: 0, + value: -1, }, ], respiratoryRate: [ @@ -663,31 +672,31 @@ describe("SleepClient", () => { timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:39:39.000Z"), - value: 22, + timestamp: new Date("2026-04-24T22:18:32.000Z"), + value: 29, }, { id: 1, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:40:09.000Z"), - value: 21, + timestamp: new Date("2026-04-24T22:19:02.000Z"), + value: 20, }, { id: 2, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:40:39.000Z"), - value: 22, + timestamp: new Date("2026-04-24T22:19:32.000Z"), + value: 9, }, { id: 3, timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:41:09.000Z"), + timestamp: new Date("2026-04-24T22:20:02.000Z"), value: 22, }, { @@ -695,8 +704,8 @@ describe("SleepClient", () => { timezoneOffset: 1, type: "type", unit: "bpm", - timestamp: new Date("2026-01-12T12:41:39.000Z"), - value: 12, + timestamp: new Date("2026-04-24T22:20:32.000Z"), + value: 25, }, ], }); diff --git a/tests/wire/team.test.ts b/tests/wire/team.test.ts index be6a98f94..0dd3bfe5b 100644 --- a/tests/wire/team.test.ts +++ b/tests/wire/team.test.ts @@ -13,15 +13,12 @@ describe("TeamClient", () => { server .mockEndpoint() .get("/v2/team/link/config") - .header("x-vital-link-token", "x-vital-link-token") .respondWith() .statusCode(200) .jsonBody(rawResponseBody) .build(); - const response = await client.team.getLinkConfig({ - vitalLinkToken: "x-vital-link-token", - }); + const response = await client.team.getLinkConfig(); expect(response).toEqual({ key: "value", }); @@ -165,16 +162,16 @@ describe("TeamClient", () => { user_id: "56bd81c9-6219-4000-a775-ae85526eba18", team_id: "56bd81c9-6219-4000-a775-ae85526eba18", client_user_id: "ZTEwZjNjMjctOTI2ZS00M2Vm", - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", connected_sources: [ { provider: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", source: { name: "Oura", slug: "oura", logo: "logo_url" }, }, ], - fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-01-12T12:39:40Z" }, - fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-01-12T12:39:40Z" }, + fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-04-24T22:18:34Z" }, + fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-04-24T22:18:34Z" }, ingestion_start: "ingestion_start", ingestion_end: "ingestion_end", }, @@ -195,7 +192,7 @@ describe("TeamClient", () => { userId: "56bd81c9-6219-4000-a775-ae85526eba18", teamId: "56bd81c9-6219-4000-a775-ae85526eba18", clientUserId: "ZTEwZjNjMjctOTI2ZS00M2Vm", - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), connectedSources: [ { provider: { @@ -203,7 +200,7 @@ describe("TeamClient", () => { slug: "oura", logo: "https://logo_url.com", }, - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), source: { name: "Oura", slug: "oura", @@ -214,12 +211,12 @@ describe("TeamClient", () => { fallbackTimeZone: { id: "Europe/London", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, fallbackBirthDate: { value: "1989-09-12", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, ingestionStart: "ingestion_start", ingestionEnd: "ingestion_end", diff --git a/tests/wire/testkit.test.ts b/tests/wire/testkit.test.ts index 1e7800f9d..5e2fe6a17 100644 --- a/tests/wire/testkit.test.ts +++ b/tests/wire/testkit.test.ts @@ -22,9 +22,9 @@ describe("TestkitClient", () => { }; const rawResponseBody = { order: { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -57,6 +57,7 @@ describe("TestkitClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -117,9 +118,9 @@ describe("TestkitClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -134,6 +135,7 @@ describe("TestkitClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -142,6 +144,12 @@ describe("TestkitClient", () => { { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -165,6 +173,29 @@ describe("TestkitClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, status: "status", message: "message", @@ -198,9 +229,9 @@ describe("TestkitClient", () => { }); expect(response).toEqual({ order: { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -233,6 +264,7 @@ describe("TestkitClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -299,9 +331,9 @@ describe("TestkitClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -316,6 +348,7 @@ describe("TestkitClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -336,6 +369,12 @@ describe("TestkitClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -363,6 +402,29 @@ describe("TestkitClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, status: "status", message: "message", @@ -434,9 +496,9 @@ describe("TestkitClient", () => { }; const rawResponseBody = { order: { - user_id: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - team_id: "525ea597-8447-469c-9031-b6b08ca0bad9", + user_id: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + team_id: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patient_details: { first_name: "first_name", last_name: "last_name", @@ -469,6 +531,7 @@ describe("TestkitClient", () => { state: "CA", zip: "91189", country: "United States", + access_notes: "access_notes", phone_number: "+11234567890", }, lab_test: { @@ -529,9 +592,9 @@ describe("TestkitClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outbound_tracking_number: "", outbound_tracking_url: "", inbound_tracking_number: "", @@ -546,6 +609,7 @@ describe("TestkitClient", () => { }, sample_id: "123456789", notes: "This is a note", + clinical_notes: "clinical_notes", created_at: "2020-01-01T00:00:00Z", updated_at: "2020-01-01T00:00:00Z", events: [ @@ -554,6 +618,12 @@ describe("TestkitClient", () => { { id: 3, created_at: "2022-01-03T00:00:00Z", status: "collecting_sample.testkit.transit_customer" }, ], status: "collecting_sample", + last_event: { + id: 3, + created_at: "2022-01-03T00:00:00Z", + status: "collecting_sample.testkit.transit_customer", + status_detail: "fulfillment_error", + }, physician: { first_name: "first_name", last_name: "last_name", npi: "npi" }, health_insurance_id: "health_insurance_id", requisition_form_url: "https://www.example.com", @@ -577,6 +647,29 @@ describe("TestkitClient", () => { has_missing_results: true, expected_result_by_date: "expected_result_by_date", worst_case_result_by_date: "worst_case_result_by_date", + origin: "initial", + order_transaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + low_level_status: "transit_customer", + low_level_status_created_at: "2020-01-05T00:00:00Z", + origin: "initial", + created_at: "2020-01-01T00:00:00Z", + updated_at: "2020-01-05T00:00:00Z", + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + low_level_status: "requisition_created", + low_level_status_created_at: "2020-01-05T01:00:00Z", + origin: "redraw", + created_at: "2020-01-05T01:00:00Z", + updated_at: "2020-01-05T01:00:00Z", + }, + ], + }, }, status: "status", message: "message", @@ -605,9 +698,9 @@ describe("TestkitClient", () => { }); expect(response).toEqual({ order: { - userId: "82900d44-4b2d-4adf-a1bb-d0372468ebf4", - id: "fdf02066-86d7-486e-8646-d81fb661d2c1", - teamId: "525ea597-8447-469c-9031-b6b08ca0bad9", + userId: "34524d4a-9986-4066-87e3-d30ca33b6e3f", + id: "a217a6b8-6df1-4639-b352-ab19be761ca9", + teamId: "f5280bcd-61f7-465c-ad80-a88f2f991bdc", patientDetails: { firstName: "first_name", lastName: "last_name", @@ -640,6 +733,7 @@ describe("TestkitClient", () => { state: "CA", zip: "91189", country: "United States", + accessNotes: "access_notes", phoneNumber: "+11234567890", }, labTest: { @@ -706,9 +800,9 @@ describe("TestkitClient", () => { details: { type: "testkit", data: { - id: "ab71e177-9f45-4657-a9c8-5998150cbec4", + id: "895806d9-91e8-4f8c-b4f7-45987ff8cb15", shipment: { - id: "0bc8393b-a913-4039-a970-00b63639bfe9", + id: "3d2c4ccf-de50-4bbf-ae84-c3afbb7869ed", outboundTrackingNumber: "", outboundTrackingUrl: "", inboundTrackingNumber: "", @@ -723,6 +817,7 @@ describe("TestkitClient", () => { }, sampleId: "123456789", notes: "This is a note", + clinicalNotes: "clinical_notes", createdAt: new Date("2020-01-01T00:00:00.000Z"), updatedAt: new Date("2020-01-01T00:00:00.000Z"), events: [ @@ -743,6 +838,12 @@ describe("TestkitClient", () => { }, ], status: "collecting_sample", + lastEvent: { + id: 3, + createdAt: new Date("2022-01-03T00:00:00.000Z"), + status: "collecting_sample.testkit.transit_customer", + statusDetail: "fulfillment_error", + }, physician: { firstName: "first_name", lastName: "last_name", @@ -770,6 +871,29 @@ describe("TestkitClient", () => { hasMissingResults: true, expectedResultByDate: "expected_result_by_date", worstCaseResultByDate: "worst_case_result_by_date", + origin: "initial", + orderTransaction: { + id: "a655f0e4-6405-4a1d-80b7-66f06c2108a7", + status: "active", + orders: [ + { + id: "d55210cc-3d9f-4115-8262-5013f700c7be", + lowLevelStatus: "transit_customer", + lowLevelStatusCreatedAt: new Date("2020-01-05T00:00:00.000Z"), + origin: "initial", + createdAt: new Date("2020-01-01T00:00:00.000Z"), + updatedAt: new Date("2020-01-05T00:00:00.000Z"), + }, + { + id: "e66321dd-4e0g-5226-9373-6124g811d8cf", + lowLevelStatus: "requisition_created", + lowLevelStatusCreatedAt: new Date("2020-01-05T01:00:00.000Z"), + origin: "redraw", + createdAt: new Date("2020-01-05T01:00:00.000Z"), + updatedAt: new Date("2020-01-05T01:00:00.000Z"), + }, + ], + }, }, status: "status", message: "message", diff --git a/tests/wire/user.test.ts b/tests/wire/user.test.ts index baa245331..1dea71ed8 100644 --- a/tests/wire/user.test.ts +++ b/tests/wire/user.test.ts @@ -15,23 +15,23 @@ describe("UserClient", () => { user_id: "56bd81c9-6219-4000-a775-ae85526eba18", team_id: "56bd81c9-6219-4000-a775-ae85526eba18", client_user_id: "ZTEwZjNjMjctOTI2ZS00M2Vm", - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", connected_sources: [ { provider: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", source: { name: "Oura", slug: "oura", logo: "logo_url" }, }, ], fallback_time_zone: { id: "Europe/London", source_slug: "manual", - updated_at: "2026-01-12T12:39:40Z", + updated_at: "2026-04-24T22:18:34Z", }, fallback_birth_date: { value: "1989-09-12", source_slug: "manual", - updated_at: "2026-01-12T12:39:40Z", + updated_at: "2026-04-24T22:18:34Z", }, ingestion_start: "ingestion_start", ingestion_end: "ingestion_end", @@ -53,7 +53,7 @@ describe("UserClient", () => { userId: "56bd81c9-6219-4000-a775-ae85526eba18", teamId: "56bd81c9-6219-4000-a775-ae85526eba18", clientUserId: "ZTEwZjNjMjctOTI2ZS00M2Vm", - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), connectedSources: [ { provider: { @@ -61,7 +61,7 @@ describe("UserClient", () => { slug: "oura", logo: "https://logo_url.com", }, - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), source: { name: "Oura", slug: "oura", @@ -72,12 +72,12 @@ describe("UserClient", () => { fallbackTimeZone: { id: "Europe/London", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, fallbackBirthDate: { value: "1989-09-12", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, ingestionStart: "ingestion_start", ingestionEnd: "ingestion_end", @@ -309,6 +309,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, medical_proxy: { first_name: "first_name", @@ -320,6 +321,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, phone_number: "phone_number", household_income: 1, @@ -354,6 +356,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, medicalProxy: { firstName: "first_name", @@ -365,6 +368,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, phoneNumber: "phone_number", householdIncome: 1, @@ -428,6 +432,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, dob: "dob", email: "email", @@ -442,6 +447,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, }, group_id: "group_id", @@ -455,6 +461,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, phone_number: "phone_number", household_income: 1, @@ -507,6 +514,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, dob: "dob", email: "email", @@ -521,6 +529,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, }, groupId: "group_id", @@ -534,6 +543,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, phoneNumber: "phone_number", householdIncome: 1, @@ -614,6 +624,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, dob: "dob", email: "email", @@ -628,6 +639,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, }, group_id: "group_id", @@ -641,6 +653,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, phone_number: "phone_number", household_income: 1, @@ -675,6 +688,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, dob: "dob", email: "email", @@ -689,6 +703,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, }, groupId: "group_id", @@ -702,6 +717,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, phoneNumber: "phone_number", householdIncome: 1, @@ -756,6 +772,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, medical_proxy: { first_name: "first_name", @@ -767,6 +784,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + access_notes: "access_notes", }, phone_number: "phone_number", household_income: 1, @@ -816,6 +834,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, medicalProxy: { firstName: "first_name", @@ -827,6 +846,7 @@ describe("UserClient", () => { zip: "zip", city: "city", state: "state", + accessNotes: "access_notes", }, phoneNumber: "phone_number", householdIncome: 1, @@ -889,16 +909,16 @@ describe("UserClient", () => { user_id: "56bd81c9-6219-4000-a775-ae85526eba18", team_id: "56bd81c9-6219-4000-a775-ae85526eba18", client_user_id: "ZTEwZjNjMjctOTI2ZS00M2Vm", - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", connected_sources: [ { provider: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", source: { name: "Oura", slug: "oura", logo: "logo_url" }, }, ], - fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-01-12T12:39:40Z" }, - fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-01-12T12:39:40Z" }, + fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-04-24T22:18:34Z" }, + fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-04-24T22:18:34Z" }, ingestion_start: "ingestion_start", ingestion_end: "ingestion_end", }; @@ -915,7 +935,7 @@ describe("UserClient", () => { userId: "56bd81c9-6219-4000-a775-ae85526eba18", teamId: "56bd81c9-6219-4000-a775-ae85526eba18", clientUserId: "ZTEwZjNjMjctOTI2ZS00M2Vm", - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), connectedSources: [ { provider: { @@ -923,7 +943,7 @@ describe("UserClient", () => { slug: "oura", logo: "https://logo_url.com", }, - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), source: { name: "Oura", slug: "oura", @@ -934,12 +954,12 @@ describe("UserClient", () => { fallbackTimeZone: { id: "Europe/London", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, fallbackBirthDate: { value: "1989-09-12", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, ingestionStart: "ingestion_start", ingestionEnd: "ingestion_end", @@ -1009,16 +1029,16 @@ describe("UserClient", () => { user_id: "56bd81c9-6219-4000-a775-ae85526eba18", team_id: "56bd81c9-6219-4000-a775-ae85526eba18", client_user_id: "ZTEwZjNjMjctOTI2ZS00M2Vm", - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", connected_sources: [ { provider: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, - created_on: "2026-01-12T12:39:40Z", + created_on: "2026-04-24T22:18:34Z", source: { name: "Oura", slug: "oura", logo: "logo_url" }, }, ], - fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-01-12T12:39:40Z" }, - fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-01-12T12:39:40Z" }, + fallback_time_zone: { id: "Europe/London", source_slug: "manual", updated_at: "2026-04-24T22:18:34Z" }, + fallback_birth_date: { value: "1989-09-12", source_slug: "manual", updated_at: "2026-04-24T22:18:34Z" }, ingestion_start: "ingestion_start", ingestion_end: "ingestion_end", }; @@ -1029,7 +1049,7 @@ describe("UserClient", () => { userId: "56bd81c9-6219-4000-a775-ae85526eba18", teamId: "56bd81c9-6219-4000-a775-ae85526eba18", clientUserId: "ZTEwZjNjMjctOTI2ZS00M2Vm", - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), connectedSources: [ { provider: { @@ -1037,7 +1057,7 @@ describe("UserClient", () => { slug: "oura", logo: "https://logo_url.com", }, - createdOn: new Date("2026-01-12T12:39:40.000Z"), + createdOn: new Date("2026-04-24T22:18:34.000Z"), source: { name: "Oura", slug: "oura", @@ -1048,12 +1068,12 @@ describe("UserClient", () => { fallbackTimeZone: { id: "Europe/London", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, fallbackBirthDate: { value: "1989-09-12", sourceSlug: "manual", - updatedAt: new Date("2026-01-12T12:39:40.000Z"), + updatedAt: new Date("2026-04-24T22:18:34.000Z"), }, ingestionStart: "ingestion_start", ingestionEnd: "ingestion_end", diff --git a/tests/wire/vitals.test.ts b/tests/wire/vitals.test.ts index 7c748b7c4..bdfb75cd2 100644 --- a/tests/wire/vitals.test.ts +++ b/tests/wire/vitals.test.ts @@ -2117,7 +2117,7 @@ describe("VitalsClient", () => { unit: "min", timestamp: "2024-01-15T09:30:00Z", start: "2023-02-13T14:57:24Z", - end: "2026-01-12T12:44:39Z", + end: "2026-04-24T22:23:32Z", value: 42, }, ], @@ -2155,7 +2155,7 @@ describe("VitalsClient", () => { unit: "min", timestamp: new Date("2024-01-15T09:30:00.000Z"), start: new Date("2023-02-13T14:57:24.000Z"), - end: new Date("2026-01-12T12:44:39.000Z"), + end: new Date("2026-04-24T22:23:32.000Z"), value: 42, }, ], @@ -2916,12 +2916,15 @@ describe("VitalsClient", () => { source: { provider: "oura", type: "ring" }, data: [ { - type: "long_acting", + type: "rapid_acting", unit: "unit", timestamp: "2024-01-15T09:30:00Z", start: "2023-02-13T14:30:52Z", - end: "2023-02-13T14:30:52Z", - value: 60, + end: "2023-02-13T14:57:24Z", + value: 2.5, + delivery_mode: "bolus", + delivery_form: "extended", + bolus_purpose: "correction", }, ], }, @@ -2955,12 +2958,15 @@ describe("VitalsClient", () => { }, data: [ { - type: "long_acting", + type: "rapid_acting", unit: "unit", timestamp: new Date("2024-01-15T09:30:00.000Z"), start: new Date("2023-02-13T14:30:52.000Z"), - end: new Date("2023-02-13T14:30:52.000Z"), - value: 60, + end: new Date("2023-02-13T14:57:24.000Z"), + value: 2.5, + deliveryMode: "bolus", + deliveryForm: "extended", + bolusPurpose: "correction", }, ], }, @@ -4125,7 +4131,7 @@ describe("VitalsClient", () => { oura: [ { source: { provider: "oura", type: "ring" }, - data: [{ unit: "mmHg", timestamp: "2026-01-12T12:39:39Z", systolic: 125, diastolic: 75 }], + data: [{ unit: "mmHg", timestamp: "2026-04-24T22:18:33Z", systolic: 125, diastolic: 75 }], }, ], }, @@ -4158,7 +4164,7 @@ describe("VitalsClient", () => { data: [ { unit: "mmHg", - timestamp: new Date("2026-01-12T12:39:39.000Z"), + timestamp: new Date("2026-04-24T22:18:33.000Z"), systolic: 125, diastolic: 75, }, @@ -4318,7 +4324,7 @@ describe("VitalsClient", () => { unit: "min", timestamp: "2024-01-15T09:30:00Z", start: "2023-02-13T14:57:24Z", - end: "2026-01-12T12:44:39Z", + end: "2026-04-24T22:23:32Z", value: 42, }, ]; @@ -4343,7 +4349,7 @@ describe("VitalsClient", () => { unit: "min", timestamp: new Date("2024-01-15T09:30:00.000Z"), start: new Date("2023-02-13T14:57:24.000Z"), - end: new Date("2026-01-12T12:44:39.000Z"), + end: new Date("2026-04-24T22:23:32.000Z"), value: 42, }, ]); @@ -5680,7 +5686,7 @@ describe("VitalsClient", () => { type: "type", unit: "mmHg", grouping: [{ key: "value" }], - timestamp: "2026-01-12T12:39:39Z", + timestamp: "2026-04-24T22:18:33Z", systolic: 125, diastolic: 75, }, @@ -5709,7 +5715,7 @@ describe("VitalsClient", () => { key: "value", }, ], - timestamp: new Date("2026-01-12T12:39:39.000Z"), + timestamp: new Date("2026-04-24T22:18:33.000Z"), systolic: 125, diastolic: 75, }, diff --git a/tests/wire/workouts.test.ts b/tests/wire/workouts.test.ts index 378c6009b..19647f465 100644 --- a/tests/wire/workouts.test.ts +++ b/tests/wire/workouts.test.ts @@ -133,17 +133,17 @@ describe("WorkoutsClient", () => { { timestamp: "2023-02-27T12:31:24Z", data: { provider_specific: "..._data" }, - provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", user_id: "1449752e-0d8a-40e0-9206-91ab099b2537", + provider_id: "5e8271a3-e71b-4882-a94a-7e364694cd16", source_id: 1, priority_id: 1, id: "id", sport_id: 3, - source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, sport: { id: 1, name: "name", slug: "slug" }, source_device_id: "550e8400-e29b-41d4-a716-446655440000", created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", + source: { name: "Oura", slug: "oura", logo: "https://logo_url.com" }, }, ], }; @@ -167,17 +167,12 @@ describe("WorkoutsClient", () => { data: { provider_specific: "..._data", }, - providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", userId: "1449752e-0d8a-40e0-9206-91ab099b2537", + providerId: "5e8271a3-e71b-4882-a94a-7e364694cd16", sourceId: 1, priorityId: 1, id: "id", sportId: 3, - source: { - name: "Oura", - slug: "oura", - logo: "https://logo_url.com", - }, sport: { id: 1, name: "name", @@ -186,6 +181,11 @@ describe("WorkoutsClient", () => { sourceDeviceId: "550e8400-e29b-41d4-a716-446655440000", createdAt: new Date("2024-01-15T09:30:00.000Z"), updatedAt: new Date("2024-01-15T09:30:00.000Z"), + source: { + name: "Oura", + slug: "oura", + logo: "https://logo_url.com", + }, }, ], });