@ovok/core 0.4.49-dev.504 → 0.4.49-dev.513
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
- package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
- package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
- package/dist/client/auth/errors.d.ts +15 -2
- package/dist/client/auth/errors.js +12 -2
- package/dist/client/auth/methods/appleLogin.d.ts +1 -0
- package/dist/client/auth/methods/appleLogin.js +1 -0
- package/dist/client/auth/methods/changePassword.d.ts +1 -0
- package/dist/client/auth/methods/changePassword.js +1 -0
- package/dist/client/auth/methods/googleLogin.d.ts +1 -0
- package/dist/client/auth/methods/googleLogin.js +1 -0
- package/dist/client/auth/methods/login.d.ts +6 -0
- package/dist/client/auth/methods/login.js +6 -0
- package/dist/client/auth/methods/register.d.ts +5 -0
- package/dist/client/auth/methods/register.js +5 -0
- package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
- package/dist/client/auth/methods/registerPractitioner.js +5 -0
- package/dist/client/auth/methods/reloadSession.d.ts +3 -0
- package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
- package/dist/client/auth/methods/requestDeleteUser.js +4 -5
- package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
- package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
- package/dist/client/auth/session-fetch.d.ts +11 -0
- package/dist/client/auth/types/Account.d.ts +8 -1
- package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
- package/dist/client/auth/types/AppleLoginBody.js +5 -0
- package/dist/client/auth/types/AuthResponse.d.ts +12 -0
- package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
- package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
- package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
- package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
- package/dist/client/auth/types/LoginBody.d.ts +15 -1
- package/dist/client/auth/types/LoginError.d.ts +21 -2
- package/dist/client/auth/types/LoginError.js +8 -2
- package/dist/client/auth/types/LoginResponse.d.ts +8 -1
- package/dist/client/auth/types/RegisterBody.d.ts +12 -0
- package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
- package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
- package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
- package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
- package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
- package/dist/client/auth/types/Session.d.ts +14 -2
- package/dist/client/change-history/methods.d.ts +6 -0
- package/dist/client/change-history/methods.js +6 -0
- package/dist/client/change-history/types.d.ts +82 -0
- package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
- package/dist/client/chat/ai/methods/createAiSession.js +6 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
- package/dist/client/cms/locale.d.ts +12 -2
- package/dist/client/cms/locale.js +9 -2
- package/dist/client/cms/methods.d.ts +6 -2
- package/dist/client/cms/methods.js +7 -3
- package/dist/client/cms/types.d.ts +44 -4
- package/dist/client/consent/methods.d.ts +16 -0
- package/dist/client/consent/methods.js +16 -0
- package/dist/client/consent/types.d.ts +53 -1
- package/dist/client/consent/types.js +10 -1
- package/dist/client/email/methods.d.ts +3 -0
- package/dist/client/email/methods.js +3 -0
- package/dist/client/email/types.d.ts +33 -0
- package/dist/client/errors/field-errors.d.ts +3 -0
- package/dist/client/errors/field-errors.js +3 -0
- package/dist/client/errors/ovok-error-utils.d.ts +6 -0
- package/dist/client/errors/ovok-error-utils.js +6 -0
- package/dist/client/errors/ovok-error.d.ts +36 -4
- package/dist/client/errors/ovok-error.js +15 -4
- package/dist/client/errors/rate-limit-error.d.ts +11 -2
- package/dist/client/errors/rate-limit-error.js +10 -2
- package/dist/client/errors/sign-in-required-error.d.ts +5 -2
- package/dist/client/errors/sign-in-required-error.js +5 -2
- package/dist/client/experience/methods.d.ts +38 -0
- package/dist/client/experience/methods.js +35 -0
- package/dist/client/experience/types.d.ts +316 -0
- package/dist/client/experience/types.js +1 -0
- package/dist/client/invites/methods.d.ts +27 -9
- package/dist/client/invites/methods.js +27 -9
- package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
- package/dist/client/invites/parse-accept-invite-link.js +3 -1
- package/dist/client/invites/types.d.ts +55 -0
- package/dist/client/invites/types.js +12 -0
- package/dist/client/notifications/methods.d.ts +15 -0
- package/dist/client/notifications/methods.js +15 -0
- package/dist/client/notifications/types.d.ts +249 -2
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +3 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
- package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
- package/dist/client/observation/methods/observationsToMeasurements.js +8 -1
- package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
- package/dist/client/observation/methods/saveMeasurement.js +3 -1
- package/dist/client/observation/observation-bundle-utils.d.ts +6 -0
- package/dist/client/observation/observation-bundle-utils.js +6 -0
- package/dist/client/observation/series.d.ts +25 -3
- package/dist/client/observation/series.js +6 -2
- package/dist/client/observation/services/creator.d.ts +5 -0
- package/dist/client/observation/services/creator.js +5 -0
- package/dist/client/observation/services/uric-acid-service.js +0 -1
- package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
- package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
- package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
- package/dist/client/observation/types/ObservationCode.d.ts +64 -1
- package/dist/client/observation/types/ObservationCode.js +64 -1
- package/dist/client/observation/types/UrineAnalytes.d.ts +14 -0
- package/dist/client/observation/types/UrineAnalytes.js +1 -0
- package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
- package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
- package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
- package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
- package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
- package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
- package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
- package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
- package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
- package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
- package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
- package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
- package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
- package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
- package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
- package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
- package/dist/client/offline/offline-measurement-queue.js +21 -0
- package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
- package/dist/client/offline/shared-measurement-queue.js +3 -1
- package/dist/client/ovok-client.d.ts +27 -6
- package/dist/client/ovok-client.js +8 -5
- package/dist/client/patient/methods.d.ts +21 -0
- package/dist/client/patient/methods.js +21 -0
- package/dist/client/patient/types.d.ts +131 -0
- package/dist/client/patient-sharing/methods.d.ts +18 -0
- package/dist/client/patient-sharing/methods.js +18 -0
- package/dist/client/patient-sharing/types.d.ts +89 -1
- package/dist/client/platform/methods.d.ts +22 -0
- package/dist/client/platform/methods.js +20 -0
- package/dist/client/platform/types.d.ts +194 -1
- package/dist/client/platform/types.js +24 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
- package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
- package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
- package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
- package/dist/client/questionnaire-response/types.d.ts +6 -0
- package/dist/client/signals/errors.d.ts +13 -2
- package/dist/client/signals/errors.js +9 -2
- package/dist/client/signals/methods.d.ts +9 -0
- package/dist/client/signals/methods.js +9 -0
- package/dist/client/signals/types.d.ts +31 -0
- package/dist/client/slim/methods.d.ts +268 -21
- package/dist/client/slim/methods.js +264 -21
- package/dist/client/slim/paging.d.ts +22 -2
- package/dist/client/slim/paging.js +6 -2
- package/dist/client/slim/types.d.ts +920 -1
- package/dist/client/storage.d.ts +15 -1
- package/dist/client/storage.js +7 -1
- package/dist/client/wearables/methods.d.ts +24 -0
- package/dist/client/wearables/methods.js +24 -0
- package/dist/client/wearables/types.d.ts +74 -0
- package/dist/conformance/api-requirements.d.ts +31 -5
- package/dist/conformance/api-requirements.js +47 -10
- package/dist/conformance/capability-requirements.d.ts +4 -26
- package/dist/conformance/capability-requirements.js +5 -27
- package/dist/conformance/capability.d.ts +9 -1
- package/dist/conformance/capability.js +3 -1
- package/dist/hooks/account-hooks.d.ts +35 -0
- package/dist/hooks/account-hooks.js +33 -0
- package/dist/hooks/api-hooks.d.ts +74 -4
- package/dist/hooks/api-hooks.js +56 -4
- package/dist/hooks/cms-hooks.d.ts +9 -3
- package/dist/hooks/cms-hooks.js +9 -3
- package/dist/hooks/email-hooks.d.ts +3 -0
- package/dist/hooks/email-hooks.js +3 -0
- package/dist/hooks/experience-hooks.d.ts +26 -0
- package/dist/hooks/experience-hooks.js +24 -0
- package/dist/hooks/index.d.ts +18 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/invites-hooks.d.ts +21 -2
- package/dist/hooks/invites-hooks.js +21 -2
- package/dist/hooks/notification-ack-hooks.d.ts +6 -2
- package/dist/hooks/notification-ack-hooks.js +6 -2
- package/dist/hooks/notification-hooks.d.ts +27 -3
- package/dist/hooks/notification-hooks.js +27 -3
- package/dist/hooks/notification-note-hooks.d.ts +41 -0
- package/dist/hooks/notification-note-hooks.js +33 -0
- package/dist/hooks/observation-hooks.d.ts +29 -0
- package/dist/hooks/observation-hooks.js +23 -1
- package/dist/hooks/patient-hooks.d.ts +53 -0
- package/dist/hooks/patient-hooks.js +48 -0
- package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
- package/dist/hooks/patient-sharing-hooks.js +18 -0
- package/dist/hooks/platform-hooks.d.ts +32 -0
- package/dist/hooks/platform-hooks.js +23 -0
- package/dist/hooks/poll-hooks.d.ts +17 -1
- package/dist/hooks/poll-hooks.js +3 -1
- package/dist/hooks/signals-hooks.d.ts +3 -0
- package/dist/hooks/signals-hooks.js +3 -0
- package/dist/hooks/wearables-hooks.d.ts +23 -0
- package/dist/hooks/wearables-hooks.js +21 -0
- package/dist/next/auth/saved-accounts-store.d.ts +10 -0
- package/dist/next/auth/session.d.ts +17 -0
- package/dist/next/auth/user-session.d.ts +5 -0
- package/dist/next/config/ovok-config.d.ts +45 -0
- package/dist/next/errors/ovok-account-error.d.ts +14 -1
- package/dist/next/errors/ovok-account-error.js +8 -1
- package/dist/next/errors/ovok-errors.d.ts +88 -0
- package/dist/next/errors/ovok-errors.js +67 -0
- package/dist/next/http/http-client.d.ts +5 -0
- package/dist/next/http/transmit.d.ts +7 -0
- package/dist/next/http/url.d.ts +10 -0
- package/dist/next/ovok.d.ts +31 -1
- package/dist/next/ovok.js +5 -1
- package/dist/next/paging/page.d.ts +13 -1
- package/dist/next/react/context.d.ts +7 -0
- package/dist/next/react/context.js +7 -0
- package/dist/next/react/index.d.ts +24 -0
- package/dist/next/react/index.js +18 -0
- package/dist/next/react/query-hooks.d.ts +69 -0
- package/dist/next/react/query-hooks.js +31 -0
- package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
- package/dist/next/resources/accounts/accounts-resource.js +6 -0
- package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
- package/dist/next/resources/ai/ai-chat-resource.js +5 -0
- package/dist/next/resources/ai/ai-resource.d.ts +13 -0
- package/dist/next/resources/ai/ai-resource.js +6 -0
- package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
- package/dist/next/resources/ai/chat-messages-resource.js +7 -0
- package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
- package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
- package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
- package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
- package/dist/next/resources/auth/registration.d.ts +18 -1
- package/dist/next/resources/auth/social-login.d.ts +12 -0
- package/dist/next/resources/auth-resource.d.ts +54 -1
- package/dist/next/resources/auth-resource.js +23 -0
- package/dist/next/resources/bots/bots-resource.d.ts +15 -0
- package/dist/next/resources/bots/bots-resource.js +5 -0
- package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
- package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
- package/dist/next/resources/cms/cms-documents-resource.js +7 -1
- package/dist/next/resources/cms/cms-resource.d.ts +7 -0
- package/dist/next/resources/cms/cms-resource.js +5 -0
- package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
- package/dist/next/resources/cms/release-notes-resource.js +6 -0
- package/dist/next/resources/consent/consent-resource.d.ts +22 -0
- package/dist/next/resources/consent/consent-resource.js +20 -0
- package/dist/next/resources/content/content-resource.d.ts +18 -0
- package/dist/next/resources/content/content-resource.js +12 -0
- package/dist/next/resources/documents/documents-resource.d.ts +24 -0
- package/dist/next/resources/documents/documents-resource.js +10 -0
- package/dist/next/resources/email/email-resource.d.ts +6 -0
- package/dist/next/resources/email/email-resource.js +5 -0
- package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
- package/dist/next/resources/email/email-templates-resource.js +6 -0
- package/dist/next/resources/fhir-resource.d.ts +36 -0
- package/dist/next/resources/fhir-resource.js +21 -0
- package/dist/next/resources/health-resource.d.ts +16 -0
- package/dist/next/resources/health-resource.js +5 -0
- package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
- package/dist/next/resources/invites/invite-flow-resource.js +7 -1
- package/dist/next/resources/invites/invites-resource.d.ts +15 -0
- package/dist/next/resources/invites/invites-resource.js +5 -0
- package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
- package/dist/next/resources/localization/i18next-resource.js +6 -0
- package/dist/next/resources/localization/locales-resource.d.ts +7 -0
- package/dist/next/resources/localization/locales-resource.js +7 -0
- package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
- package/dist/next/resources/localization/localizations-resource.js +9 -0
- package/dist/next/resources/measurements/measurements-resource.d.ts +53 -1
- package/dist/next/resources/measurements/measurements-resource.js +14 -0
- package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
- package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
- package/dist/next/resources/patient/fhir-records.d.ts +19 -1
- package/dist/next/resources/patient/fhir-records.js +19 -1
- package/dist/next/resources/patient/patient-resource.d.ts +15 -0
- package/dist/next/resources/patient/patient-resource.js +6 -0
- package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
- package/dist/next/resources/projects/project-features-resource.js +7 -0
- package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
- package/dist/next/resources/projects/project-members-resource.js +9 -0
- package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
- package/dist/next/resources/projects/project-settings-resource.js +8 -0
- package/dist/next/resources/projects/projects-resource.d.ts +15 -0
- package/dist/next/resources/projects/projects-resource.js +5 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
- package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
- package/dist/next/resources/realtime/realtime-resource.js +11 -0
- package/dist/next/resources/realtime/realtime-types.d.ts +16 -0
- package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
- package/dist/next/resources/session/saved-accounts-resource.js +16 -0
- package/dist/next/resources/session/session-resource.d.ts +8 -0
- package/dist/next/resources/session/session-resource.js +7 -0
- package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
- package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
- package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
- package/dist/next/resources/sharing/sharing-resource.js +5 -0
- package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
- package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
- package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
- package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
- package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
- package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
- package/dist/next/resources/signals/signals-resource.d.ts +7 -0
- package/dist/next/resources/signals/signals-resource.js +5 -0
- package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
- package/dist/next/resources/signals/undeliverable-resource.js +6 -0
- package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
- package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
- package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
- package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
- package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
- package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
- package/dist/next/resources/slim/slim-devices-resource.js +16 -0
- package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-exports-resource.js +6 -0
- package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-locations-resource.js +9 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
- package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
- package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
- package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-patients-resource.js +10 -0
- package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-policies-resource.js +10 -0
- package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
- package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-projects-resource.js +11 -0
- package/dist/next/resources/slim/slim-queries.d.ts +51 -0
- package/dist/next/resources/slim/slim-resource.d.ts +21 -0
- package/dist/next/resources/slim/slim-resource.js +6 -0
- package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
- package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
- package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
- package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-trends-resource.js +6 -0
- package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-users-resource.js +6 -0
- package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
- package/dist/next/resources/slim/slim-zones-resource.js +8 -0
- package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
- package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
- package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
- package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
- package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
- package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
- package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
- package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
- package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
- package/dist/next/resources/wearables/wearables-resource.js +5 -0
- package/dist/next/storage/ovok-storage.d.ts +16 -0
- package/dist/next/storage/ovok-storage.js +8 -0
- package/dist/types/ValidationError.d.ts +9 -0
- package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
- package/dist/utils/patch/getPatchOperationType.js +3 -0
- package/package.json +5 -2
|
@@ -7,7 +7,9 @@ import { AIFhirResponse } from "../types/AIFhirResponse";
|
|
|
7
7
|
* After the LLM generates the FHIR query plan, it's executed against the server
|
|
8
8
|
* to generate the results, and then the results are used to create a summary response.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* The search may fail or return hallucinated results due to the nature of LLMs.
|
|
11
|
+
*
|
|
12
|
+
* Calls `POST /ai/fhir/search`.
|
|
11
13
|
*
|
|
12
14
|
* @param request - The search request containing the text to search for
|
|
13
15
|
* @returns Promise with the search response containing markdown, plan, and results
|
|
@@ -6,7 +6,9 @@ exports.AIFhirResources = AIFhirResources;
|
|
|
6
6
|
* After the LLM generates the FHIR query plan, it's executed against the server
|
|
7
7
|
* to generate the results, and then the results are used to create a summary response.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* The search may fail or return hallucinated results due to the nature of LLMs.
|
|
10
|
+
*
|
|
11
|
+
* Calls `POST /ai/fhir/search`.
|
|
10
12
|
*
|
|
11
13
|
* @param request - The search request containing the text to search for
|
|
12
14
|
* @returns Promise with the search response containing markdown, plan, and results
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { AIFhirPlanRequest } from "./AIFhirPlanRequest";
|
|
2
|
+
/**
|
|
3
|
+
* FHIR query plan generated by the language model for an AI FHIR search.
|
|
4
|
+
*
|
|
5
|
+
* @category ai
|
|
6
|
+
*/
|
|
2
7
|
export interface AIFhirPlan {
|
|
8
|
+
/** Follow-up plan that runs after this one, built from this plan's results. */
|
|
3
9
|
child?: AIFhirPlan;
|
|
10
|
+
/** Search requests executed for this step of the plan. */
|
|
4
11
|
requests: AIFhirPlanRequest[];
|
|
12
|
+
/** Identifiers of the requests whose results are returned to the caller. */
|
|
5
13
|
visibleResults?: string[];
|
|
6
14
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One FHIR search a plan executes.
|
|
3
|
+
*
|
|
4
|
+
* @category ai
|
|
5
|
+
*/
|
|
1
6
|
export interface AIFhirPlanRequest {
|
|
7
|
+
/** Key under which this search's resources appear in `AIFhirResponse.results`. */
|
|
2
8
|
identifier: string;
|
|
9
|
+
/** FHIR search query string for the resource type. */
|
|
3
10
|
query: string;
|
|
11
|
+
/** FHIR resource type searched, e.g. `Observation`. */
|
|
4
12
|
resourceType: string;
|
|
5
13
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { AIFhirPlan } from "./AIFhirPlan";
|
|
2
|
+
/**
|
|
3
|
+
* Result of an AI FHIR search: summary, plan and matching resources.
|
|
4
|
+
*
|
|
5
|
+
* @category ai
|
|
6
|
+
*/
|
|
2
7
|
export interface AIFhirResponse {
|
|
3
8
|
/**
|
|
4
9
|
* Markdown formatted response summarizing the results
|
|
@@ -13,6 +18,7 @@ export interface AIFhirResponse {
|
|
|
13
18
|
* Key is the identifier from the request, value is array of FHIR resources
|
|
14
19
|
*/
|
|
15
20
|
results: Record<string, Array<{
|
|
21
|
+
/** FHIR resource returned by the executed query. */
|
|
16
22
|
resource: unknown;
|
|
17
23
|
}>>;
|
|
18
24
|
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message the server sends when signup is refused because the address already has an account.
|
|
3
|
+
*/
|
|
1
4
|
export declare const REGISTRATION_FAILED_MESSAGE = "Registration failed.";
|
|
5
|
+
/**
|
|
6
|
+
* Why a saved account cannot be used.
|
|
7
|
+
*/
|
|
2
8
|
export type OvokAccountErrorCode = "account_not_found" | "account_expired";
|
|
3
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* A safe, stable account error that does not include the account reference.
|
|
11
|
+
*/
|
|
4
12
|
export declare class OvokAccountError extends Error {
|
|
5
13
|
readonly code: OvokAccountErrorCode;
|
|
14
|
+
/**
|
|
15
|
+
* @param code - Reason the account cannot be used.
|
|
16
|
+
*/
|
|
6
17
|
constructor(code: OvokAccountErrorCode);
|
|
7
18
|
}
|
|
8
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Returns true when signup was refused because the address already has an account.
|
|
21
|
+
*/
|
|
9
22
|
export declare function isRegistrationFailed(error: unknown): boolean;
|
|
@@ -3,9 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OvokAccountError = exports.REGISTRATION_FAILED_MESSAGE = void 0;
|
|
4
4
|
exports.isRegistrationFailed = isRegistrationFailed;
|
|
5
5
|
const ovok_error_1 = require("../errors/ovok-error");
|
|
6
|
+
/**
|
|
7
|
+
* Message the server sends when signup is refused because the address already has an account.
|
|
8
|
+
*/
|
|
6
9
|
exports.REGISTRATION_FAILED_MESSAGE = "Registration failed.";
|
|
7
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* A safe, stable account error that does not include the account reference.
|
|
12
|
+
*/
|
|
8
13
|
class OvokAccountError extends Error {
|
|
14
|
+
/**
|
|
15
|
+
* @param code - Reason the account cannot be used.
|
|
16
|
+
*/
|
|
9
17
|
constructor(code) {
|
|
10
18
|
super(code === "account_not_found"
|
|
11
19
|
? "Saved account was not found."
|
|
@@ -15,7 +23,9 @@ class OvokAccountError extends Error {
|
|
|
15
23
|
}
|
|
16
24
|
}
|
|
17
25
|
exports.OvokAccountError = OvokAccountError;
|
|
18
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Returns true when signup was refused because the address already has an account.
|
|
28
|
+
*/
|
|
19
29
|
function isRegistrationFailed(error) {
|
|
20
30
|
const details = (0, ovok_error_1.readOvokError)(error);
|
|
21
31
|
return details.status === 400 && details.message === exports.REGISTRATION_FAILED_MESSAGE;
|
|
@@ -2,4 +2,5 @@ import type { MedplumRequestOptions } from "@medplum/core";
|
|
|
2
2
|
import { OvokClient } from "../../ovok-client";
|
|
3
3
|
import { AppleLoginBody } from "../types/AppleLoginBody";
|
|
4
4
|
import { AuthResponse } from "../types/AuthResponse";
|
|
5
|
+
/** Signs in with an Apple identity token through the social-login client. Calls `POST auth/external/apple`. */
|
|
5
6
|
export declare function appleLogin(this: OvokClient, body: AppleLoginBody, requestOptions?: MedplumRequestOptions): Promise<AuthResponse>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.appleLogin = appleLogin;
|
|
4
4
|
const socialLogin_1 = require("./socialLogin");
|
|
5
|
+
/** Signs in with an Apple identity token through the social-login client. Calls `POST auth/external/apple`. */
|
|
5
6
|
async function appleLogin(body, requestOptions) {
|
|
6
7
|
return socialLogin_1.socialLogin.call(this, "apple", body, requestOptions);
|
|
7
8
|
}
|
|
@@ -2,4 +2,5 @@ import type { MedplumRequestOptions } from "@medplum/core";
|
|
|
2
2
|
import { OvokClient } from "../../ovok-client";
|
|
3
3
|
import { ChangePasswordBody } from "../types/ChangePasswordBody";
|
|
4
4
|
import { ChangePasswordResponse } from "../types/ChangePasswordResponse";
|
|
5
|
+
/** Changes the signed-in user's password. Calls `PATCH v2/auth/change-password`. */
|
|
5
6
|
export declare function changePassword(this: OvokClient, body: ChangePasswordBody, requestOptions?: MedplumRequestOptions): Promise<ChangePasswordResponse>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.changePassword = changePassword;
|
|
4
4
|
const request_options_1 = require("../../request-options");
|
|
5
|
+
/** Changes the signed-in user's password. Calls `PATCH v2/auth/change-password`. */
|
|
5
6
|
async function changePassword(body, requestOptions) {
|
|
6
7
|
const { oldPassword, newPassword } = body;
|
|
7
8
|
return this.patch("v2/auth/change-password", { oldPassword, newPassword }, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
@@ -2,4 +2,5 @@ import type { MedplumRequestOptions } from "@medplum/core";
|
|
|
2
2
|
import { OvokClient } from "../../ovok-client";
|
|
3
3
|
import { AuthResponse } from "../types/AuthResponse";
|
|
4
4
|
import { GoogleLoginBody } from "../types/GoogleLoginBody";
|
|
5
|
+
/** Signs in with a Google identity token through the social-login client. Calls `POST auth/external/google`. */
|
|
5
6
|
export declare function googleLogin(this: OvokClient, body: GoogleLoginBody, requestOptions?: MedplumRequestOptions): Promise<AuthResponse>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.googleLogin = googleLogin;
|
|
4
4
|
const socialLogin_1 = require("./socialLogin");
|
|
5
|
+
/** Signs in with a Google identity token through the social-login client. Calls `POST auth/external/google`. */
|
|
5
6
|
async function googleLogin(body, requestOptions) {
|
|
6
7
|
return socialLogin_1.socialLogin.call(this, "google", body, requestOptions);
|
|
7
8
|
}
|
|
@@ -5,4 +5,10 @@ import { LoginBody, PractitionerLoginBody } from "../types/LoginBody";
|
|
|
5
5
|
import { LoginResponse } from "../types/LoginResponse";
|
|
6
6
|
/** Starts practitioner sign-in and lets the app choose among returned projects. */
|
|
7
7
|
export declare function startTenantLogin(this: OvokClient, body: PractitionerLoginBody, requestOptions?: MedplumRequestOptions): Promise<TenantLoginStart>;
|
|
8
|
+
/**
|
|
9
|
+
* Signs in a patient, practitioner or carer with email and password.
|
|
10
|
+
* Resolves to a session, or to an MFA step whose `verify(code)` completes sign-in.
|
|
11
|
+
*
|
|
12
|
+
* @throws LoginError when credentials are invalid, rate limited, or a tenant code is needed.
|
|
13
|
+
*/
|
|
8
14
|
export declare function login(this: OvokClient, body: LoginBody, requestOptions?: MedplumRequestOptions): Promise<LoginResponse>;
|
|
@@ -46,6 +46,12 @@ async function startTenantLogin(body, requestOptions) {
|
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Signs in a patient, practitioner or carer with email and password.
|
|
51
|
+
* Resolves to a session, or to an MFA step whose `verify(code)` completes sign-in.
|
|
52
|
+
*
|
|
53
|
+
* @throws LoginError when credentials are invalid, rate limited, or a tenant code is needed.
|
|
54
|
+
*/
|
|
49
55
|
async function login(body, requestOptions) {
|
|
50
56
|
if (body.type === "Practitioner") {
|
|
51
57
|
const start = await startTenantLogin.call(this, body, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
@@ -2,4 +2,9 @@ import type { MedplumRequestOptions } from "@medplum/core";
|
|
|
2
2
|
import { OvokClient } from "../../ovok-client";
|
|
3
3
|
import { RegisterBody } from "../types/RegisterBody";
|
|
4
4
|
import { RegisterResponse } from "../types/RegisterResponse";
|
|
5
|
+
/**
|
|
6
|
+
* Registers a patient account. Calls `POST auth/tenant/Patient/register`.
|
|
7
|
+
*
|
|
8
|
+
* @throws Error when `password` and `passwordConfirm` differ.
|
|
9
|
+
*/
|
|
5
10
|
export declare function register(this: OvokClient, body: RegisterBody, requestOptions?: MedplumRequestOptions): Promise<RegisterResponse>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
|
+
/**
|
|
5
|
+
* Registers a patient account. Calls `POST auth/tenant/Patient/register`.
|
|
6
|
+
*
|
|
7
|
+
* @throws Error when `password` and `passwordConfirm` differ.
|
|
8
|
+
*/
|
|
4
9
|
async function register(body, requestOptions) {
|
|
5
10
|
if (body.password !== body.passwordConfirm) {
|
|
6
11
|
throw new Error("Password and password confirm do not match");
|
|
@@ -2,4 +2,9 @@ import type { MedplumRequestOptions } from "@medplum/core";
|
|
|
2
2
|
import { OvokClient } from "../../ovok-client";
|
|
3
3
|
import { AuthResponse } from "../types/AuthResponse";
|
|
4
4
|
import { RegisterPractitionerBody } from "../types/RegisterPractitionerBody";
|
|
5
|
+
/**
|
|
6
|
+
* Registers a practitioner account. Calls `POST auth/tenant/Practitioner/register`.
|
|
7
|
+
*
|
|
8
|
+
* @throws Error when `password` and `passwordConfirm` differ.
|
|
9
|
+
*/
|
|
5
10
|
export declare function registerPractitioner(this: OvokClient, body: RegisterPractitionerBody, requestOptions?: MedplumRequestOptions): Promise<AuthResponse>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerPractitioner = registerPractitioner;
|
|
4
|
+
/**
|
|
5
|
+
* Registers a practitioner account. Calls `POST auth/tenant/Practitioner/register`.
|
|
6
|
+
*
|
|
7
|
+
* @throws Error when `password` and `passwordConfirm` differ.
|
|
8
|
+
*/
|
|
4
9
|
async function registerPractitioner(body, requestOptions) {
|
|
5
10
|
if (body.password !== body.passwordConfirm) {
|
|
6
11
|
throw new Error("Password and password confirm do not match");
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { OvokClient } from "../../ovok-client";
|
|
2
2
|
/** Reloads the active profile, project membership, and access policy from auth/me. */
|
|
3
3
|
export declare function reloadSession(this: OvokClient): Promise<{
|
|
4
|
+
/** The signed-in profile. */
|
|
4
5
|
profile: ReturnType<OvokClient["getProfile"]>;
|
|
6
|
+
/** The project membership of the signed-in user. */
|
|
5
7
|
membership: ReturnType<OvokClient["getProjectMembership"]>;
|
|
8
|
+
/** The access policy applied to the session. */
|
|
6
9
|
accessPolicy: ReturnType<OvokClient["getAccessPolicy"]>;
|
|
7
10
|
}>;
|
|
@@ -3,10 +3,9 @@ import { OvokClient } from "../../ovok-client";
|
|
|
3
3
|
import { RequestDeleteUserBody } from "../types/RequestDeleteUserBody";
|
|
4
4
|
import { RequestDeleteUserResponse } from "../types/RequestDeleteUserResponse";
|
|
5
5
|
/**
|
|
6
|
-
* Schedules deletion of user account
|
|
7
|
-
*
|
|
8
|
-
* @param
|
|
9
|
-
* @
|
|
10
|
-
* @returns {Promise<RequestDeleteUserResponse>} Response containing scheduled deletion status and user information
|
|
6
|
+
* Schedules deletion of the signed-in user's account.
|
|
7
|
+
*
|
|
8
|
+
* @param body - When to delete the account and whether to delete medical data.
|
|
9
|
+
* @returns The scheduled deletion status and user information.
|
|
11
10
|
*/
|
|
12
11
|
export declare function requestDeleteUser(this: OvokClient, body: RequestDeleteUserBody, requestOptions?: MedplumRequestOptions): Promise<RequestDeleteUserResponse>;
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requestDeleteUser = requestDeleteUser;
|
|
4
4
|
/**
|
|
5
|
-
* Schedules deletion of user account
|
|
6
|
-
*
|
|
7
|
-
* @param
|
|
8
|
-
* @
|
|
9
|
-
* @returns {Promise<RequestDeleteUserResponse>} Response containing scheduled deletion status and user information
|
|
5
|
+
* Schedules deletion of the signed-in user's account.
|
|
6
|
+
*
|
|
7
|
+
* @param body - When to delete the account and whether to delete medical data.
|
|
8
|
+
* @returns The scheduled deletion status and user information.
|
|
10
9
|
*/
|
|
11
10
|
async function requestDeleteUser(body, requestOptions) {
|
|
12
11
|
return this.delete("auth/delete", {
|
|
@@ -2,4 +2,5 @@ import { OperationOutcome } from "@medplum/fhirtypes";
|
|
|
2
2
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
3
3
|
import { OvokClient } from "../../ovok-client";
|
|
4
4
|
import { CompletePasswordResetBody } from "../types/CompletePasswordResetBody";
|
|
5
|
+
/** Completes a password reset with the token from the reset email. Calls `POST v2/auth/reset-password/process`. */
|
|
5
6
|
export declare function setPasswordFromReset(this: OvokClient, body: CompletePasswordResetBody, requestOptions?: MedplumRequestOptions): Promise<OperationOutcome>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setPasswordFromReset = setPasswordFromReset;
|
|
4
|
+
/** Completes a password reset with the token from the reset email. Calls `POST v2/auth/reset-password/process`. */
|
|
4
5
|
async function setPasswordFromReset(body, requestOptions) {
|
|
5
6
|
return this.post("v2/auth/reset-password/process", body, "application/json", requestOptions);
|
|
6
7
|
}
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { IClientStorage } from "@medplum/core";
|
|
2
2
|
import type { OvokClientOptions } from "../ovok-client";
|
|
3
|
+
/**
|
|
4
|
+
* Why the client ended the session, as passed to `onUnauthenticated`.
|
|
5
|
+
*/
|
|
3
6
|
export type OvokUnauthenticatedReason = {
|
|
7
|
+
/** The server refused the refresh token, so the session is over. */
|
|
4
8
|
type: "refresh-rejected";
|
|
9
|
+
/** HTTP status of the refused refresh. */
|
|
5
10
|
status: 400 | 401 | 403;
|
|
6
11
|
} | {
|
|
12
|
+
/** The refresh could not complete, for example an outage or no network. */
|
|
7
13
|
type: "refresh-unavailable";
|
|
14
|
+
/** HTTP status of the last response, when there was one. */
|
|
8
15
|
status?: number;
|
|
9
16
|
} | {
|
|
17
|
+
/** The token endpoint rejected a sign-in. */
|
|
10
18
|
type: "authentication-rejected";
|
|
19
|
+
/** HTTP status of the rejection. */
|
|
11
20
|
status: number;
|
|
12
21
|
} | {
|
|
22
|
+
/** An ordinary request came back 401. */
|
|
13
23
|
type: "request-unauthorized";
|
|
24
|
+
/** Always 401. */
|
|
14
25
|
status: 401;
|
|
15
26
|
};
|
|
16
27
|
type SessionFetchContext = {
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { ProfileResource } from "@medplum/core";
|
|
2
2
|
import { Project, Reference } from "@medplum/fhirtypes";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Safe account metadata for account pickers; authentication tokens are omitted.
|
|
5
|
+
*/
|
|
4
6
|
export interface OvokSavedAccount {
|
|
7
|
+
/** Stable identifier of the saved account. */
|
|
5
8
|
id: string;
|
|
9
|
+
/** Reference to the account's profile. */
|
|
6
10
|
profile: Reference<ProfileResource>;
|
|
11
|
+
/** Reference to the account's project. */
|
|
7
12
|
project: Reference<Project>;
|
|
13
|
+
/** Whether this is the account currently signed in. */
|
|
8
14
|
active: boolean;
|
|
15
|
+
/** Whether the account's session has expired and needs a new sign-in. */
|
|
9
16
|
expired: boolean;
|
|
10
17
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credential returned by Sign in with Apple, sent to log the user in.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
1
6
|
export interface AppleLoginBody {
|
|
2
7
|
/**
|
|
3
8
|
* The internal ID of the extension with url "https://api.ovok.com/StructureDefinition/external-auth-internal-id"
|
|
@@ -27,11 +32,17 @@ export interface AppleLoginBody {
|
|
|
27
32
|
* your app.
|
|
28
33
|
*/
|
|
29
34
|
fullName: {
|
|
35
|
+
/** Name prefix, e.g. "Dr". */
|
|
30
36
|
namePrefix: string | null;
|
|
37
|
+
/** Given (first) name. */
|
|
31
38
|
givenName: string | null;
|
|
39
|
+
/** Middle name. */
|
|
32
40
|
middleName: string | null;
|
|
41
|
+
/** Family (last) name. */
|
|
33
42
|
familyName: string | null;
|
|
43
|
+
/** Name suffix, e.g. "Jr". */
|
|
34
44
|
nameSuffix: string | null;
|
|
45
|
+
/** Nickname. */
|
|
35
46
|
nickname: string | null;
|
|
36
47
|
} | null;
|
|
37
48
|
/**
|
|
@@ -51,6 +62,11 @@ export interface AppleLoginBody {
|
|
|
51
62
|
*/
|
|
52
63
|
authorizationCode: string | null;
|
|
53
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Whether Apple considers the user a real person.
|
|
67
|
+
*
|
|
68
|
+
* @category auth
|
|
69
|
+
*/
|
|
54
70
|
declare enum AppleAuthenticationUserDetectionStatus {
|
|
55
71
|
/**
|
|
56
72
|
* The system does not support this determination and there is no data.
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Whether Apple considers the user a real person.
|
|
5
|
+
*
|
|
6
|
+
* @category auth
|
|
7
|
+
*/
|
|
3
8
|
var AppleAuthenticationUserDetectionStatus;
|
|
4
9
|
(function (AppleAuthenticationUserDetectionStatus) {
|
|
5
10
|
/**
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokens and account references returned after a successful sign-in or registration.
|
|
3
|
+
*/
|
|
1
4
|
export type AuthResponse = {
|
|
5
|
+
/** Bearer token for API requests. */
|
|
2
6
|
accessToken: string;
|
|
7
|
+
/** Token used to obtain a new access token. */
|
|
3
8
|
refreshToken: string;
|
|
9
|
+
/** Access token lifetime in seconds. */
|
|
4
10
|
expiresIn: number;
|
|
11
|
+
/** The signed-in profile. */
|
|
5
12
|
profile: {
|
|
13
|
+
/** FHIR reference to the profile, such as `Patient/123`. */
|
|
6
14
|
reference: string;
|
|
15
|
+
/** Display name of the profile. */
|
|
7
16
|
display: string;
|
|
8
17
|
};
|
|
18
|
+
/** The project the session belongs to. */
|
|
9
19
|
project: {
|
|
20
|
+
/** FHIR reference to the project. */
|
|
10
21
|
reference: string;
|
|
22
|
+
/** Display name of the project. */
|
|
11
23
|
display: string;
|
|
12
24
|
};
|
|
13
25
|
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request body for changing the signed-in user's password.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
1
6
|
export interface ChangePasswordBody {
|
|
7
|
+
/** The current password. */
|
|
2
8
|
oldPassword: string;
|
|
9
|
+
/** The new password. */
|
|
3
10
|
newPassword: string;
|
|
4
11
|
/** Optional client-side confirmation; Ovok Core does not receive this field. */
|
|
5
12
|
confirmPassword?: string;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body to finish a password reset with the ID and secret from the reset link.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
1
6
|
export interface CompletePasswordResetBody {
|
|
7
|
+
/** ID of the password reset request. */
|
|
2
8
|
id: string;
|
|
9
|
+
/** Secret from the reset link. */
|
|
3
10
|
secret: string;
|
|
11
|
+
/** The new password. */
|
|
4
12
|
password: string;
|
|
5
13
|
}
|
|
@@ -2,21 +2,35 @@ type LoginCredentials = {
|
|
|
2
2
|
email: string;
|
|
3
3
|
password: string;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Credentials for a patient sign-in.
|
|
7
|
+
*/
|
|
5
8
|
export type PatientLoginBody = LoginCredentials & {
|
|
9
|
+
/** Selects patient sign-in. */
|
|
6
10
|
type: "Patient";
|
|
7
11
|
/** The tenant code to log in to. */
|
|
8
12
|
tenantCode: string;
|
|
9
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Credentials for a practitioner sign-in.
|
|
16
|
+
*/
|
|
10
17
|
export type PractitionerLoginBody = LoginCredentials & {
|
|
18
|
+
/** Selects practitioner sign-in. */
|
|
11
19
|
type: "Practitioner";
|
|
12
20
|
/** Selects a project when the person belongs to multiple projects. */
|
|
13
21
|
tenantCode?: string;
|
|
14
22
|
};
|
|
15
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* A carer; their account comes only from accepting a record-share invite.
|
|
25
|
+
*/
|
|
16
26
|
export type RelatedPersonLoginBody = LoginCredentials & {
|
|
27
|
+
/** Selects carer sign-in. */
|
|
17
28
|
type: "RelatedPerson";
|
|
18
29
|
/** The tenant code to log in to. */
|
|
19
30
|
tenantCode: string;
|
|
20
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Credentials for any supported account type, discriminated by `type`.
|
|
34
|
+
*/
|
|
21
35
|
export type LoginBody = PatientLoginBody | PractitionerLoginBody | RelatedPersonLoginBody;
|
|
22
36
|
export {};
|
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
import type { LoginResponse } from "./LoginResponse";
|
|
2
2
|
import type { StartLoginResponse } from "./StartLoginResponse";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* A typed sign-in error with fields apps can branch on without parsing prose.
|
|
5
|
+
*/
|
|
4
6
|
export declare class LoginError extends Error {
|
|
7
|
+
/** Machine-readable reason for the failure. */
|
|
5
8
|
readonly code: "profile_not_found" | "tenant_code_required" | "tenant_code_not_found" | "invalid_credentials" | "rate_limited";
|
|
9
|
+
/** Profiles the person may choose from, when the error asks for a tenant code. */
|
|
6
10
|
readonly profiles: LoginProfile[];
|
|
11
|
+
/** HTTP status of the failed request: 400, 401 or 429. */
|
|
7
12
|
readonly status: 400 | 401 | 429;
|
|
13
|
+
/** Server request id, for support, when the response carried one. */
|
|
8
14
|
readonly requestId: string | undefined;
|
|
15
|
+
/** Milliseconds to wait before retrying, when rate limited. */
|
|
9
16
|
readonly retryAfterMs: number | undefined;
|
|
10
|
-
constructor(
|
|
17
|
+
constructor(
|
|
18
|
+
/** Machine-readable reason for the failure. */
|
|
19
|
+
code: "profile_not_found" | "tenant_code_required" | "tenant_code_not_found" | "invalid_credentials" | "rate_limited", message: string,
|
|
20
|
+
/** Profiles the person may choose from, when the error asks for a tenant code. */
|
|
21
|
+
profiles?: LoginProfile[], requestId?: string, status?: 400 | 401 | 429, retryAfterMs?: number);
|
|
11
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* One profile a person can sign in to, as listed by the start-login step.
|
|
25
|
+
*/
|
|
12
26
|
export type LoginProfile = NonNullable<StartLoginResponse["profiles"]>[number];
|
|
27
|
+
/**
|
|
28
|
+
* The state after choosing a project: the available profiles and the call that completes sign-in.
|
|
29
|
+
*/
|
|
13
30
|
export type TenantLoginStart = {
|
|
31
|
+
/** Profiles the person can choose from. */
|
|
14
32
|
profiles: LoginProfile[];
|
|
33
|
+
/** Completes sign-in for the chosen tenant code, or the only one available. */
|
|
15
34
|
exchange: (tenantCode?: string) => Promise<LoginResponse>;
|
|
16
35
|
};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LoginError = void 0;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* A typed sign-in error with fields apps can branch on without parsing prose.
|
|
6
|
+
*/
|
|
5
7
|
class LoginError extends Error {
|
|
6
|
-
constructor(
|
|
8
|
+
constructor(
|
|
9
|
+
/** Machine-readable reason for the failure. */
|
|
10
|
+
code, message,
|
|
11
|
+
/** Profiles the person may choose from, when the error asks for a tenant code. */
|
|
12
|
+
profiles = [], requestId, status = 400, retryAfterMs) {
|
|
7
13
|
super(message);
|
|
8
14
|
this.code = code;
|
|
9
15
|
this.profiles = profiles;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { AuthResponse } from "./AuthResponse";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The second step returned when password login requires MFA verification.
|
|
4
|
+
*/
|
|
3
5
|
export type MfaLoginStep = {
|
|
6
|
+
/** Always `"mfa"`; signals that a code is still required. */
|
|
4
7
|
nextStep: "mfa";
|
|
8
|
+
/** Verifies the MFA code and resolves to the signed-in session. */
|
|
5
9
|
verify: (code: string) => Promise<AuthResponse>;
|
|
6
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* The result of `login`: a signed-in session, or an MFA step to complete first.
|
|
13
|
+
*/
|
|
7
14
|
export type LoginResponse = AuthResponse | MfaLoginStep;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request body for registering a new patient account.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
1
6
|
export interface RegisterBody {
|
|
7
|
+
/** Email address of the new account. */
|
|
2
8
|
email: string;
|
|
9
|
+
/** Chosen password. */
|
|
3
10
|
password: string;
|
|
11
|
+
/** Must equal `password`; checked before any request is sent. */
|
|
4
12
|
passwordConfirm: string;
|
|
13
|
+
/** Given name. */
|
|
5
14
|
name: string;
|
|
15
|
+
/** Family name. */
|
|
6
16
|
surname: string;
|
|
17
|
+
/** Code of the project to register in. */
|
|
7
18
|
tenantCode: string;
|
|
19
|
+
/** Token from an invite that lets a clinician continue as a patient. */
|
|
8
20
|
continueAsPatientToken?: string;
|
|
9
21
|
}
|