@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
package/dist/client/storage.d.ts
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { IClientStorage } from "@medplum/core";
|
|
2
|
+
/**
|
|
3
|
+
* Async key-value store, such as a device keychain, that `createClientStorage` wraps.
|
|
4
|
+
*/
|
|
2
5
|
export type AsyncKeyValueStore = {
|
|
6
|
+
/** Returns the stored value, or `null` when the key is absent. */
|
|
3
7
|
getItem(key: string): Promise<string | null>;
|
|
8
|
+
/** Stores a value under a key. */
|
|
4
9
|
setItem(key: string, value: string): Promise<void>;
|
|
10
|
+
/** Deletes a key. */
|
|
5
11
|
removeItem(key: string): Promise<void>;
|
|
6
12
|
};
|
|
7
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Bridges an async keychain-like store to the client's synchronous storage contract.
|
|
15
|
+
* Reads come from an in-memory cache filled by `reload`; writes go to the store in order.
|
|
16
|
+
*
|
|
17
|
+
* @param store - Async key-value store, e.g. a device keychain.
|
|
18
|
+
* @param keys - Keys to load on reload and to remove on `clear`.
|
|
19
|
+
*/
|
|
8
20
|
export declare const createClientStorage: (store: AsyncKeyValueStore, keys?: readonly string[]) => IClientStorage & {
|
|
21
|
+
/** Reads the given keys from the store again into the synchronous cache. */
|
|
9
22
|
reload(): Promise<void>;
|
|
23
|
+
/** Last error from the store, cleared by the next successful reload. */
|
|
10
24
|
failed?: Error;
|
|
11
25
|
};
|
package/dist/client/storage.js
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createClientStorage = void 0;
|
|
4
4
|
const ovok_error_utils_1 = require("./errors/ovok-error-utils");
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Bridges an async keychain-like store to the client's synchronous storage contract.
|
|
7
|
+
* Reads come from an in-memory cache filled by `reload`; writes go to the store in order.
|
|
8
|
+
*
|
|
9
|
+
* @param store - Async key-value store, e.g. a device keychain.
|
|
10
|
+
* @param keys - Keys to load on reload and to remove on `clear`.
|
|
11
|
+
*/
|
|
6
12
|
const createClientStorage = (store, keys = []) => {
|
|
7
13
|
const cache = new Map();
|
|
8
14
|
let failed;
|
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
2
|
import { OvokClient } from "../ovok-client";
|
|
3
3
|
import { CreateWearableProviderRequest, UpdateWearableProviderRequest, WearableConnectionAuthorization, WearableConnections, WearableProvider, WearableProviderSettings, WearableProviderSettingsList } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Lists the project's wearable provider settings (`GET /v1/wearables/providers`).
|
|
6
|
+
*/
|
|
4
7
|
export declare function listWearableProviders(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<WearableProviderSettingsList>;
|
|
8
|
+
/**
|
|
9
|
+
* Reads one provider's settings (`GET /v1/wearables/providers/{provider}`).
|
|
10
|
+
*/
|
|
5
11
|
export declare function getWearableProvider(this: OvokClient, provider: WearableProvider, requestOptions?: MedplumRequestOptions): Promise<WearableProviderSettings>;
|
|
12
|
+
/**
|
|
13
|
+
* Configures a wearable provider (`POST /v1/wearables/providers`).
|
|
14
|
+
*/
|
|
6
15
|
export declare function createWearableProvider(this: OvokClient, body: CreateWearableProviderRequest, requestOptions?: MedplumRequestOptions): Promise<WearableProviderSettings>;
|
|
16
|
+
/**
|
|
17
|
+
* Changes a provider's settings (`PATCH /v1/wearables/providers/{provider}`).
|
|
18
|
+
*/
|
|
7
19
|
export declare function updateWearableProvider(this: OvokClient, provider: WearableProvider, body: UpdateWearableProviderRequest, requestOptions?: MedplumRequestOptions): Promise<WearableProviderSettings>;
|
|
20
|
+
/**
|
|
21
|
+
* Removes a provider's configuration (`DELETE /v1/wearables/providers/{provider}`).
|
|
22
|
+
*/
|
|
8
23
|
export declare function deleteWearableProvider(this: OvokClient, provider: WearableProvider, requestOptions?: MedplumRequestOptions): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Lists the signed-in patient's wearable connections (`GET /v1/wearables/connections`).
|
|
26
|
+
*/
|
|
9
27
|
export declare function listWearableConnections(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<WearableConnections>;
|
|
28
|
+
/**
|
|
29
|
+
* Starts connecting a provider and returns the page to authorize at (`POST /v1/wearables/connections/{provider}/authorize`).
|
|
30
|
+
*/
|
|
10
31
|
export declare function authorizeWearableConnection(this: OvokClient, provider: WearableProvider, requestOptions?: MedplumRequestOptions): Promise<WearableConnectionAuthorization>;
|
|
32
|
+
/**
|
|
33
|
+
* Disconnects the patient from a provider (`DELETE /v1/wearables/connections/{provider}`).
|
|
34
|
+
*/
|
|
11
35
|
export declare function deleteWearableConnection(this: OvokClient, provider: WearableProvider, requestOptions?: MedplumRequestOptions): Promise<void>;
|
|
@@ -17,33 +17,57 @@ const invalidateProviderSettings = (client, provider) => {
|
|
|
17
17
|
client.invalidateUrl(providerPath(provider));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Lists the project's wearable provider settings (`GET /v1/wearables/providers`).
|
|
22
|
+
*/
|
|
20
23
|
function listWearableProviders(requestOptions) {
|
|
21
24
|
return this.get("/v1/wearables/providers", ...(0, request_options_1.optionalArg)(requestOptions));
|
|
22
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Reads one provider's settings (`GET /v1/wearables/providers/{provider}`).
|
|
28
|
+
*/
|
|
23
29
|
function getWearableProvider(provider, requestOptions) {
|
|
24
30
|
return this.get(providerPath(provider), ...(0, request_options_1.optionalArg)(requestOptions));
|
|
25
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Configures a wearable provider (`POST /v1/wearables/providers`).
|
|
34
|
+
*/
|
|
26
35
|
function createWearableProvider(body, requestOptions) {
|
|
27
36
|
return this.post("/v1/wearables/providers", body, undefined, requestOptions).then((settings) => {
|
|
28
37
|
invalidateProviderSettings(this, body.provider);
|
|
29
38
|
return settings;
|
|
30
39
|
});
|
|
31
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Changes a provider's settings (`PATCH /v1/wearables/providers/{provider}`).
|
|
43
|
+
*/
|
|
32
44
|
async function updateWearableProvider(provider, body, requestOptions) {
|
|
33
45
|
const settings = await this.patch(providerPath(provider), body, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
34
46
|
invalidateProviderSettings(this, provider);
|
|
35
47
|
return settings;
|
|
36
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Removes a provider's configuration (`DELETE /v1/wearables/providers/{provider}`).
|
|
51
|
+
*/
|
|
37
52
|
async function deleteWearableProvider(provider, requestOptions) {
|
|
38
53
|
await this.delete(providerPath(provider), ...(0, request_options_1.optionalArg)(requestOptions));
|
|
39
54
|
invalidateProviderSettings(this, provider);
|
|
40
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Lists the signed-in patient's wearable connections (`GET /v1/wearables/connections`).
|
|
58
|
+
*/
|
|
41
59
|
function listWearableConnections(requestOptions) {
|
|
42
60
|
return this.get("/v1/wearables/connections", ...(0, request_options_1.optionalArg)(requestOptions));
|
|
43
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Starts connecting a provider and returns the page to authorize at (`POST /v1/wearables/connections/{provider}/authorize`).
|
|
64
|
+
*/
|
|
44
65
|
function authorizeWearableConnection(provider, requestOptions) {
|
|
45
66
|
return this.post(`${connectionPath(provider)}/authorize`, undefined, undefined, requestOptions);
|
|
46
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Disconnects the patient from a provider (`DELETE /v1/wearables/connections/{provider}`).
|
|
70
|
+
*/
|
|
47
71
|
async function deleteWearableConnection(provider, requestOptions) {
|
|
48
72
|
await this.delete(connectionPath(provider), ...(0, request_options_1.optionalArg)(requestOptions));
|
|
49
73
|
this.invalidateUrl("/v1/wearables/connections");
|
|
@@ -1,43 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wearable vendor an app can connect.
|
|
3
|
+
*
|
|
4
|
+
* @category wearables
|
|
5
|
+
*/
|
|
1
6
|
export type WearableProvider = "oura" | "whoop" | "strava" | "withings" | "polar" | "suunto" | "garmin" | "ultrahuman";
|
|
7
|
+
/**
|
|
8
|
+
* Error codes returned by the wearables routes.
|
|
9
|
+
*
|
|
10
|
+
* @category wearables
|
|
11
|
+
*/
|
|
2
12
|
export type WearableErrorCode = "PROVIDER_CONFIGURED" | "PROVIDER_NOT_CONFIGURED" | "SUBSCRIPTION_KEY_REQUIRED" | "SUBSCRIPTION_KEY_NOT_USED" | "PROVIDER_NOT_AVAILABLE" | "APP_URL_NOT_CONFIGURED" | "CONNECTION_NOT_FOUND" | "STATE_STORE_UNAVAILABLE" | "FEATURE_NOT_CONFIGURED" | "PROJECT_CONTEXT_REQUIRED" | "PATIENT_PROFILE_REQUIRED";
|
|
13
|
+
/**
|
|
14
|
+
* Project-level configuration of one wearable provider.
|
|
15
|
+
*
|
|
16
|
+
* @category wearables
|
|
17
|
+
*/
|
|
3
18
|
export type WearableProviderSettings = {
|
|
19
|
+
/** Provider the settings belong to. */
|
|
4
20
|
provider: WearableProvider;
|
|
21
|
+
/** Whether credentials are stored. */
|
|
5
22
|
configured: boolean;
|
|
23
|
+
/** Whether patients can connect this provider. */
|
|
6
24
|
enabled: boolean;
|
|
25
|
+
/** OAuth client id, or `null` when not configured. */
|
|
7
26
|
clientId: string | null;
|
|
27
|
+
/** OAuth redirect URI the provider must allow, or `null` when not configured. */
|
|
8
28
|
redirectUri: string | null;
|
|
9
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Settings of all wearable providers.
|
|
32
|
+
*
|
|
33
|
+
* @category wearables
|
|
34
|
+
*/
|
|
10
35
|
export type WearableProviderSettingsList = {
|
|
36
|
+
/** One entry per provider. */
|
|
11
37
|
providers: WearableProviderSettings[];
|
|
12
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Request body that configures a wearable provider.
|
|
41
|
+
*
|
|
42
|
+
* @category wearables
|
|
43
|
+
*/
|
|
13
44
|
export type CreateWearableProviderRequest = {
|
|
45
|
+
/** Provider to configure. */
|
|
14
46
|
provider: WearableProvider;
|
|
47
|
+
/** OAuth client id. */
|
|
15
48
|
clientId: string;
|
|
49
|
+
/** OAuth client secret. */
|
|
16
50
|
secret: string;
|
|
51
|
+
/** Webhook subscription key, or `null` for providers that do not use one. */
|
|
17
52
|
subscriptionKey: string | null;
|
|
53
|
+
/** Whether patients can connect this provider. */
|
|
18
54
|
enabled: boolean;
|
|
19
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Fields of a wearable provider configuration that can be changed.
|
|
58
|
+
*
|
|
59
|
+
* @category wearables
|
|
60
|
+
*/
|
|
20
61
|
export type UpdateWearableProviderRequest = {
|
|
62
|
+
/** New OAuth client id. */
|
|
21
63
|
clientId?: string;
|
|
64
|
+
/** New OAuth client secret. */
|
|
22
65
|
secret?: string;
|
|
66
|
+
/** New webhook subscription key, or `null` to clear it. */
|
|
23
67
|
subscriptionKey?: string | null;
|
|
68
|
+
/** New enabled state. */
|
|
24
69
|
enabled?: boolean;
|
|
25
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* A patient's link to one wearable provider.
|
|
73
|
+
*
|
|
74
|
+
* @category wearables
|
|
75
|
+
*/
|
|
26
76
|
export type WearableConnection = {
|
|
77
|
+
/** Provider of the connection. */
|
|
27
78
|
provider: WearableProvider;
|
|
79
|
+
/** Connection details, or `null` when not connected. */
|
|
28
80
|
connection: {
|
|
81
|
+
/** ISO 8601 time the patient connected. */
|
|
29
82
|
connectedAt: string;
|
|
30
83
|
} | null;
|
|
31
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* A patient's connections across providers.
|
|
87
|
+
*
|
|
88
|
+
* @category wearables
|
|
89
|
+
*/
|
|
32
90
|
export type WearableConnections = {
|
|
91
|
+
/** One entry per provider. */
|
|
33
92
|
connections: WearableConnection[];
|
|
34
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Link that starts connecting a wearable provider.
|
|
96
|
+
*
|
|
97
|
+
* @category wearables
|
|
98
|
+
*/
|
|
35
99
|
export type WearableConnectionAuthorization = {
|
|
100
|
+
/** Provider to connect. */
|
|
36
101
|
provider: WearableProvider;
|
|
102
|
+
/** Provider page where the patient grants access. */
|
|
37
103
|
authorizationUrl: string;
|
|
38
104
|
};
|
|
105
|
+
/**
|
|
106
|
+
* Outcome of syncing a provider's data.
|
|
107
|
+
*
|
|
108
|
+
* @category wearables
|
|
109
|
+
*/
|
|
39
110
|
export type WearableSyncResult = {
|
|
111
|
+
/** Provider that was synced. */
|
|
40
112
|
provider: WearableProvider;
|
|
113
|
+
/** Number of observations created. */
|
|
41
114
|
created: number;
|
|
115
|
+
/** ISO 8601 time up to which data was synced. */
|
|
42
116
|
syncedThrough: string;
|
|
43
117
|
};
|
|
@@ -1,42 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP methods the SDK uses.
|
|
3
|
+
*/
|
|
1
4
|
export type OvokHttpMethod = "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
|
|
5
|
+
/**
|
|
6
|
+
* A route the SDK depends on.
|
|
7
|
+
*/
|
|
2
8
|
export type OvokApiRequirement = {
|
|
9
|
+
/** HTTP method. */
|
|
3
10
|
method: OvokHttpMethod;
|
|
11
|
+
/** Route path. */
|
|
4
12
|
path: string;
|
|
13
|
+
/** Area of the API the route belongs to. */
|
|
5
14
|
group: string;
|
|
6
15
|
};
|
|
7
16
|
/**
|
|
8
|
-
* The non-FHIR HTTP routes used by
|
|
17
|
+
* The non-FHIR HTTP routes used by `@ovok/core`.
|
|
9
18
|
*
|
|
10
|
-
*
|
|
11
|
-
* CapabilityStatement cannot describe ordinary auth, AI, or bot routes.
|
|
12
|
-
* Billing is intentionally absent until Ovok has a supported billing SDK
|
|
13
|
-
* contract.
|
|
19
|
+
* Kept apart from `OVOK_CORE_REQUIREMENTS`, since a CapabilityStatement cannot describe auth, AI or bot routes.
|
|
14
20
|
*/
|
|
15
21
|
export declare const OVOK_CORE_API_REQUIREMENTS: {
|
|
22
|
+
/** The route that returns the server's FHIR capability statement. */
|
|
16
23
|
readonly capability: {
|
|
24
|
+
/** HTTP method. */
|
|
17
25
|
readonly method: "GET";
|
|
26
|
+
/** Route path. */
|
|
18
27
|
readonly path: "/fhir/{version}/metadata";
|
|
28
|
+
/** Area of the API the route belongs to. */
|
|
19
29
|
readonly group: "FHIR";
|
|
20
30
|
};
|
|
31
|
+
/** The non-FHIR routes the SDK calls. */
|
|
21
32
|
readonly nonFhir: ({
|
|
33
|
+
/** HTTP method. */
|
|
22
34
|
method: "POST";
|
|
35
|
+
/** Route path. */
|
|
23
36
|
path: string;
|
|
37
|
+
/** Area of the API the route belongs to. */
|
|
24
38
|
group: string;
|
|
25
39
|
} | {
|
|
40
|
+
/** HTTP method. */
|
|
26
41
|
method: "PATCH";
|
|
42
|
+
/** Route path. */
|
|
27
43
|
path: string;
|
|
44
|
+
/** Area of the API the route belongs to. */
|
|
28
45
|
group: string;
|
|
29
46
|
} | {
|
|
47
|
+
/** HTTP method. */
|
|
30
48
|
method: "GET";
|
|
49
|
+
/** Route path. */
|
|
31
50
|
path: string;
|
|
51
|
+
/** Area of the API the route belongs to. */
|
|
32
52
|
group: string;
|
|
33
53
|
} | {
|
|
54
|
+
/** HTTP method. */
|
|
34
55
|
method: "DELETE";
|
|
56
|
+
/** Route path. */
|
|
35
57
|
path: string;
|
|
58
|
+
/** Area of the API the route belongs to. */
|
|
36
59
|
group: string;
|
|
37
60
|
} | {
|
|
61
|
+
/** HTTP method. */
|
|
38
62
|
method: "PUT";
|
|
63
|
+
/** Route path. */
|
|
39
64
|
path: string;
|
|
65
|
+
/** Area of the API the route belongs to. */
|
|
40
66
|
group: string;
|
|
41
67
|
})[];
|
|
42
68
|
};
|
|
@@ -2,21 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OVOK_CORE_API_REQUIREMENTS = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* The non-FHIR HTTP routes used by
|
|
5
|
+
* The non-FHIR HTTP routes used by `@ovok/core`.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* CapabilityStatement cannot describe ordinary auth, AI, or bot routes.
|
|
9
|
-
* Billing is intentionally absent until Ovok has a supported billing SDK
|
|
10
|
-
* contract.
|
|
7
|
+
* Kept apart from `OVOK_CORE_REQUIREMENTS`, since a CapabilityStatement cannot describe auth, AI or bot routes.
|
|
11
8
|
*/
|
|
12
9
|
exports.OVOK_CORE_API_REQUIREMENTS = {
|
|
10
|
+
/** The route that returns the server's FHIR capability statement. */
|
|
13
11
|
capability: {
|
|
12
|
+
/** HTTP method. */
|
|
14
13
|
method: "GET",
|
|
14
|
+
/** Route path. */
|
|
15
15
|
path: "/fhir/{version}/metadata",
|
|
16
|
+
/** Area of the API the route belongs to. */
|
|
16
17
|
group: "FHIR",
|
|
17
18
|
},
|
|
19
|
+
/** The non-FHIR routes the SDK calls. */
|
|
18
20
|
nonFhir: [
|
|
19
|
-
{
|
|
21
|
+
{
|
|
22
|
+
/** HTTP method. */
|
|
23
|
+
method: "POST",
|
|
24
|
+
/** Route path. */
|
|
25
|
+
path: "/auth/tenant/Patient/login/start",
|
|
26
|
+
/** Area of the API the route belongs to. */
|
|
27
|
+
group: "Auth",
|
|
28
|
+
},
|
|
20
29
|
{ method: "POST", path: "/auth/tenant/Practitioner/login/start", group: "Auth" },
|
|
21
30
|
{ method: "POST", path: "/auth/tenant/Patient/login/token", group: "Auth" },
|
|
22
31
|
{ method: "POST", path: "/auth/tenant/Practitioner/login/token", group: "Auth" },
|
|
@@ -29,12 +38,33 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
|
|
|
29
38
|
{ method: "POST", path: "/auth/tenant/Practitioner/register", group: "Auth" },
|
|
30
39
|
{ method: "POST", path: "/auth/external/google", group: "Auth" },
|
|
31
40
|
{ method: "POST", path: "/auth/external/apple", group: "Auth" },
|
|
32
|
-
{
|
|
41
|
+
{
|
|
42
|
+
/** HTTP method. */
|
|
43
|
+
method: "PATCH",
|
|
44
|
+
/** Route path. */
|
|
45
|
+
path: "/v2/auth/change-password",
|
|
46
|
+
/** Area of the API the route belongs to. */
|
|
47
|
+
group: "Auth",
|
|
48
|
+
},
|
|
33
49
|
{ method: "POST", path: "/v2/auth/reset-password", group: "Auth" },
|
|
34
50
|
{ method: "POST", path: "/v2/auth/reset-password/process", group: "Auth" },
|
|
35
|
-
{
|
|
51
|
+
{
|
|
52
|
+
/** HTTP method. */
|
|
53
|
+
method: "GET",
|
|
54
|
+
/** Route path. */
|
|
55
|
+
path: "/auth/session",
|
|
56
|
+
/** Area of the API the route belongs to. */
|
|
57
|
+
group: "Auth",
|
|
58
|
+
},
|
|
36
59
|
{ method: "GET", path: "/auth/me", group: "Auth" },
|
|
37
|
-
{
|
|
60
|
+
{
|
|
61
|
+
/** HTTP method. */
|
|
62
|
+
method: "DELETE",
|
|
63
|
+
/** Route path. */
|
|
64
|
+
path: "/auth/session/current",
|
|
65
|
+
/** Area of the API the route belongs to. */
|
|
66
|
+
group: "Auth",
|
|
67
|
+
},
|
|
38
68
|
{ method: "DELETE", path: "/auth/session/:option", group: "Auth" },
|
|
39
69
|
{ method: "DELETE", path: "/auth/delete", group: "Auth" },
|
|
40
70
|
{ method: "POST", path: "/ai/session", group: "AI" },
|
|
@@ -61,7 +91,14 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
|
|
|
61
91
|
{ method: "POST", path: "/cms/:type/:language/copy-from-parent-project", group: "Content" },
|
|
62
92
|
{ method: "POST", path: "/cms/:type/:language/:key/copy-from-parent-project", group: "Content" },
|
|
63
93
|
{ method: "POST", path: "/cms/:type/:language", group: "Content" },
|
|
64
|
-
{
|
|
94
|
+
{
|
|
95
|
+
/** HTTP method. */
|
|
96
|
+
method: "PUT",
|
|
97
|
+
/** Route path. */
|
|
98
|
+
path: "/cms/:type/:language/:key",
|
|
99
|
+
/** Area of the API the route belongs to. */
|
|
100
|
+
group: "Content",
|
|
101
|
+
},
|
|
65
102
|
{ method: "GET", path: "/cms/:type/:language/:key", group: "Content" },
|
|
66
103
|
{ method: "DELETE", path: "/cms/:type/:language/:key", group: "Content" },
|
|
67
104
|
{ method: "GET", path: "/cms/:type/:language", group: "Content" },
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
import { CapabilityStatement } from "@medplum/fhirtypes";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* FHIR CapabilityStatement of kind `requirements`: the FHIR surface a server must provide for the
|
|
4
|
+
* SDK's own methods to work.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* issue — and since `OvokClient extends MedplumClient` with no narrowing, the
|
|
8
|
-
* honest answer to that is "every interaction Medplum has", which tells a
|
|
9
|
-
* consumer nothing. `requirements` inverts it: here is the surface this
|
|
10
|
-
* library itself depends on, so pointing it at a server becomes a checkable
|
|
11
|
-
* proposition rather than a hope.
|
|
12
|
-
*
|
|
13
|
-
* Scope is therefore the SDK's OWN methods. Generic CRUD reached through the
|
|
14
|
-
* inherited Medplum client is the consuming application's business: that
|
|
15
|
-
* application knows which resources it touches, and this library does not
|
|
16
|
-
* require them.
|
|
17
|
-
*
|
|
18
|
-
* `implementation` is absent deliberately — FHIR forbids it for any kind but
|
|
19
|
-
* `instance`, and a client library has no endpoint to describe anyway. It
|
|
20
|
-
* cannot serve this at `/metadata`; it is published as a static artifact and
|
|
21
|
-
* exported so a consumer can compare it against a server's own statement.
|
|
22
|
-
*
|
|
23
|
-
* NOT DESCRIBED HERE, because a CapabilityStatement structurally cannot:
|
|
24
|
-
* seven of the SDK's ten HTTP call sites are ordinary REST, not FHIR —
|
|
25
|
-
* `POST /ai/session`, `POST /ai/fhir/search`, `POST /bots?identifier=`, and
|
|
26
|
-
* the auth surface (register, change-password, reset-password, Apple and
|
|
27
|
-
* Google sign-in, account deletion). Those are OpenAPI's job and are
|
|
28
|
-
* documented there. A conformance resource pretending to carry them would be
|
|
29
|
-
* readable by no FHIR client and no OpenAPI tool.
|
|
6
|
+
* Routes that are not FHIR are listed in `OVOK_CORE_API_REQUIREMENTS`. Compare this statement with a
|
|
7
|
+
* server's own capability statement to check that it is compatible.
|
|
30
8
|
*/
|
|
31
9
|
export declare const OVOK_CORE_REQUIREMENTS: CapabilityStatement;
|
|
@@ -2,33 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OVOK_CORE_REQUIREMENTS = void 0;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* FHIR CapabilityStatement of kind `requirements`: the FHIR surface a server must provide for the
|
|
6
|
+
* SDK's own methods to work.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* issue — and since `OvokClient extends MedplumClient` with no narrowing, the
|
|
10
|
-
* honest answer to that is "every interaction Medplum has", which tells a
|
|
11
|
-
* consumer nothing. `requirements` inverts it: here is the surface this
|
|
12
|
-
* library itself depends on, so pointing it at a server becomes a checkable
|
|
13
|
-
* proposition rather than a hope.
|
|
14
|
-
*
|
|
15
|
-
* Scope is therefore the SDK's OWN methods. Generic CRUD reached through the
|
|
16
|
-
* inherited Medplum client is the consuming application's business: that
|
|
17
|
-
* application knows which resources it touches, and this library does not
|
|
18
|
-
* require them.
|
|
19
|
-
*
|
|
20
|
-
* `implementation` is absent deliberately — FHIR forbids it for any kind but
|
|
21
|
-
* `instance`, and a client library has no endpoint to describe anyway. It
|
|
22
|
-
* cannot serve this at `/metadata`; it is published as a static artifact and
|
|
23
|
-
* exported so a consumer can compare it against a server's own statement.
|
|
24
|
-
*
|
|
25
|
-
* NOT DESCRIBED HERE, because a CapabilityStatement structurally cannot:
|
|
26
|
-
* seven of the SDK's ten HTTP call sites are ordinary REST, not FHIR —
|
|
27
|
-
* `POST /ai/session`, `POST /ai/fhir/search`, `POST /bots?identifier=`, and
|
|
28
|
-
* the auth surface (register, change-password, reset-password, Apple and
|
|
29
|
-
* Google sign-in, account deletion). Those are OpenAPI's job and are
|
|
30
|
-
* documented there. A conformance resource pretending to carry them would be
|
|
31
|
-
* readable by no FHIR client and no OpenAPI tool.
|
|
8
|
+
* Routes that are not FHIR are listed in `OVOK_CORE_API_REQUIREMENTS`. Compare this statement with a
|
|
9
|
+
* server's own capability statement to check that it is compatible.
|
|
32
10
|
*/
|
|
33
11
|
exports.OVOK_CORE_REQUIREMENTS = {
|
|
34
12
|
resourceType: "CapabilityStatement",
|
|
@@ -48,7 +26,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
|
|
|
48
26
|
description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
|
|
49
27
|
software: {
|
|
50
28
|
name: "@ovok/core",
|
|
51
|
-
version: "0.4.49-dev.
|
|
29
|
+
version: "0.4.49-dev.513+c27f4c3",
|
|
52
30
|
},
|
|
53
31
|
fhirVersion: "4.0.1",
|
|
54
32
|
format: ["json"],
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { CapabilityStatement } from "@medplum/fhirtypes";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The extension used by ovok-core to publish non-FHIR public routes.
|
|
4
|
+
*/
|
|
3
5
|
export declare const OVOK_PUBLIC_API_EXTENSION = "https://fhir.ovok.com/fhir/StructureDefinition/ovok-public-api";
|
|
6
|
+
/**
|
|
7
|
+
* A public non-FHIR route published by the server.
|
|
8
|
+
*/
|
|
4
9
|
export type OvokPublicApiEndpoint = {
|
|
10
|
+
/** HTTP method, upper case. */
|
|
5
11
|
method: string;
|
|
12
|
+
/** Route path. */
|
|
6
13
|
path: string;
|
|
14
|
+
/** Area of the API the route belongs to. */
|
|
7
15
|
group: string;
|
|
8
16
|
};
|
|
9
17
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOvokPublicApiEndpoints = exports.OVOK_PUBLIC_API_EXTENSION = void 0;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The extension used by ovok-core to publish non-FHIR public routes.
|
|
6
|
+
*/
|
|
5
7
|
exports.OVOK_PUBLIC_API_EXTENSION = "https://fhir.ovok.com/fhir/StructureDefinition/ovok-public-api";
|
|
6
8
|
const ENDPOINT_EXTENSION = "endpoint";
|
|
7
9
|
const stringValue = (extension) => { var _a; return (_a = extension.valueCode) !== null && _a !== void 0 ? _a : extension.valueString; };
|
|
@@ -3,17 +3,52 @@ import { LegalConsentResponse, MedicalConsentResponse } from "../client/consent/
|
|
|
3
3
|
import { RepushUnconfirmedLimitsResult, UnconfirmedLimits } from "../client/signals/types";
|
|
4
4
|
import { SlimPatientThresholdV2, SlimThresholdV2, SlimThresholdV2Update } from "../client/slim/types";
|
|
5
5
|
import { OvokMutationState, OvokRequestState } from "./api-hooks";
|
|
6
|
+
/**
|
|
7
|
+
* Loads a page of the change history via `client.listChangeHistory`, reloading when `params` change.
|
|
8
|
+
*/
|
|
6
9
|
export declare const useChangeHistory: (params?: ChangeHistoryQuery) => OvokRequestState<ChangeHistoryPage>;
|
|
10
|
+
/**
|
|
11
|
+
* Loads the user's terms-and-conditions consent via `client.getLegalConsent`.
|
|
12
|
+
*/
|
|
7
13
|
export declare const useLegalConsent: () => OvokRequestState<LegalConsentResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Mutation that accepts (`true`) or withdraws (`false`) the terms-and-conditions consent via `client.setLegalConsent`.
|
|
16
|
+
*/
|
|
8
17
|
export declare const useSetLegalConsent: () => OvokMutationState<boolean, LegalConsentResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Loads the user's medical-notifications consent via `client.getMedicalConsent`.
|
|
20
|
+
*/
|
|
9
21
|
export declare const useMedicalConsent: () => OvokRequestState<MedicalConsentResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Mutation that grants (`true`) or withdraws (`false`) the medical-notifications consent via `client.setMedicalConsent`.
|
|
24
|
+
*/
|
|
10
25
|
export declare const useSetMedicalConsent: () => OvokMutationState<boolean, MedicalConsentResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Loads the project's Slim thresholds via `client.getSlimThresholdV2`.
|
|
28
|
+
*/
|
|
11
29
|
export declare const useSlimThresholdV2: () => OvokRequestState<SlimThresholdV2>;
|
|
30
|
+
/**
|
|
31
|
+
* Loads a patient's Slim thresholds via `client.getSlimPatientThresholdV2`; skips while `patientId` is undefined and fails with "patientId is required" when it is empty.
|
|
32
|
+
*/
|
|
12
33
|
export declare const useSlimPatientThresholdV2: (patientId?: string) => OvokRequestState<SlimPatientThresholdV2>;
|
|
34
|
+
/**
|
|
35
|
+
* Mutation that updates the project's Slim thresholds via `client.updateSlimThresholdV2`.
|
|
36
|
+
*/
|
|
13
37
|
export declare const useUpdateSlimThresholdV2: () => OvokMutationState<SlimThresholdV2Update, SlimThresholdV2>;
|
|
38
|
+
/**
|
|
39
|
+
* Mutation that updates a patient's Slim thresholds via `client.updateSlimPatientThresholdV2`, then resolves with the thresholds read back.
|
|
40
|
+
*/
|
|
14
41
|
export declare const useUpdateSlimPatientThresholdV2: () => OvokMutationState<{
|
|
42
|
+
/** Patient to update. */
|
|
15
43
|
patientId: string;
|
|
44
|
+
/** New threshold values. */
|
|
16
45
|
body: SlimThresholdV2Update;
|
|
17
46
|
}, SlimPatientThresholdV2>;
|
|
47
|
+
/**
|
|
48
|
+
* Loads the limits Signals has not confirmed via `client.listUnconfirmedLimits`.
|
|
49
|
+
*/
|
|
18
50
|
export declare const useUnconfirmedLimits: () => OvokRequestState<UnconfirmedLimits>;
|
|
51
|
+
/**
|
|
52
|
+
* Mutation that sends the unconfirmed limits to Signals again via `client.repushUnconfirmedLimits`.
|
|
53
|
+
*/
|
|
19
54
|
export declare const useRepushUnconfirmedLimits: () => OvokMutationState<void, RepushUnconfirmedLimitsResult>;
|
|
@@ -3,28 +3,61 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useRepushUnconfirmedLimits = exports.useUnconfirmedLimits = exports.useUpdateSlimPatientThresholdV2 = exports.useUpdateSlimThresholdV2 = exports.useSlimPatientThresholdV2 = exports.useSlimThresholdV2 = exports.useSetMedicalConsent = exports.useMedicalConsent = exports.useSetLegalConsent = exports.useLegalConsent = exports.useChangeHistory = void 0;
|
|
5
5
|
const api_hooks_1 = require("./api-hooks");
|
|
6
|
+
/**
|
|
7
|
+
* Loads a page of the change history via `client.listChangeHistory`, reloading when `params` change.
|
|
8
|
+
*/
|
|
6
9
|
const useChangeHistory = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listChangeHistory(params, { signal }), params);
|
|
7
10
|
exports.useChangeHistory = useChangeHistory;
|
|
11
|
+
/**
|
|
12
|
+
* Loads the user's terms-and-conditions consent via `client.getLegalConsent`.
|
|
13
|
+
*/
|
|
8
14
|
const useLegalConsent = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getLegalConsent({ signal }));
|
|
9
15
|
exports.useLegalConsent = useLegalConsent;
|
|
16
|
+
/**
|
|
17
|
+
* Mutation that accepts (`true`) or withdraws (`false`) the terms-and-conditions consent via `client.setLegalConsent`.
|
|
18
|
+
*/
|
|
10
19
|
const useSetLegalConsent = () => (0, api_hooks_1.useOvokMutation)((client, accepted) => client.setLegalConsent(accepted));
|
|
11
20
|
exports.useSetLegalConsent = useSetLegalConsent;
|
|
21
|
+
/**
|
|
22
|
+
* Loads the user's medical-notifications consent via `client.getMedicalConsent`.
|
|
23
|
+
*/
|
|
12
24
|
const useMedicalConsent = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getMedicalConsent({ signal }));
|
|
13
25
|
exports.useMedicalConsent = useMedicalConsent;
|
|
26
|
+
/**
|
|
27
|
+
* Mutation that grants (`true`) or withdraws (`false`) the medical-notifications consent via `client.setMedicalConsent`.
|
|
28
|
+
*/
|
|
14
29
|
const useSetMedicalConsent = () => (0, api_hooks_1.useOvokMutation)((client, accepted) => client.setMedicalConsent(accepted));
|
|
15
30
|
exports.useSetMedicalConsent = useSetMedicalConsent;
|
|
31
|
+
/**
|
|
32
|
+
* Loads the project's Slim thresholds via `client.getSlimThresholdV2`.
|
|
33
|
+
*/
|
|
16
34
|
const useSlimThresholdV2 = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getSlimThresholdV2({ signal }));
|
|
17
35
|
exports.useSlimThresholdV2 = useSlimThresholdV2;
|
|
36
|
+
/**
|
|
37
|
+
* Loads a patient's Slim thresholds via `client.getSlimPatientThresholdV2`; skips while `patientId` is undefined and fails with "patientId is required" when it is empty.
|
|
38
|
+
*/
|
|
18
39
|
const useSlimPatientThresholdV2 = (patientId) => (0, api_hooks_1.useOvokClientRequestFor)("patientId", patientId, (client, id, signal) => client.getSlimPatientThresholdV2(id, { signal }));
|
|
19
40
|
exports.useSlimPatientThresholdV2 = useSlimPatientThresholdV2;
|
|
41
|
+
/**
|
|
42
|
+
* Mutation that updates the project's Slim thresholds via `client.updateSlimThresholdV2`.
|
|
43
|
+
*/
|
|
20
44
|
const useUpdateSlimThresholdV2 = () => (0, api_hooks_1.useOvokMutation)((client, body) => client.updateSlimThresholdV2(body));
|
|
21
45
|
exports.useUpdateSlimThresholdV2 = useUpdateSlimThresholdV2;
|
|
46
|
+
/**
|
|
47
|
+
* Mutation that updates a patient's Slim thresholds via `client.updateSlimPatientThresholdV2`, then resolves with the thresholds read back.
|
|
48
|
+
*/
|
|
22
49
|
const useUpdateSlimPatientThresholdV2 = () => (0, api_hooks_1.useOvokMutation)(async (client, params) => {
|
|
23
50
|
await client.updateSlimPatientThresholdV2(params.patientId, params.body);
|
|
24
51
|
return client.getSlimPatientThresholdV2(params.patientId);
|
|
25
52
|
});
|
|
26
53
|
exports.useUpdateSlimPatientThresholdV2 = useUpdateSlimPatientThresholdV2;
|
|
54
|
+
/**
|
|
55
|
+
* Loads the limits Signals has not confirmed via `client.listUnconfirmedLimits`.
|
|
56
|
+
*/
|
|
27
57
|
const useUnconfirmedLimits = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listUnconfirmedLimits({ signal }));
|
|
28
58
|
exports.useUnconfirmedLimits = useUnconfirmedLimits;
|
|
59
|
+
/**
|
|
60
|
+
* Mutation that sends the unconfirmed limits to Signals again via `client.repushUnconfirmedLimits`.
|
|
61
|
+
*/
|
|
29
62
|
const useRepushUnconfirmedLimits = () => (0, api_hooks_1.useOvokMutation)((client) => client.repushUnconfirmedLimits());
|
|
30
63
|
exports.useRepushUnconfirmedLimits = useRepushUnconfirmedLimits;
|