@ovok/core 0.4.49-dev.503 → 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/README.md +23 -666
- 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/index.d.ts +1 -965
- package/dist/index.js +1 -71
- 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 +51 -12
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { AuthResponse } from "./AuthResponse";
|
|
2
|
+
/**
|
|
3
|
+
* Returned when a clinician must accept an invite before a session is issued.
|
|
4
|
+
*/
|
|
2
5
|
export type ClinicianInviteStep = {
|
|
6
|
+
/** Always `"clinician-invite"`. */
|
|
3
7
|
nextStep: "clinician-invite";
|
|
4
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* The result of `register`: a signed-in session, or a clinician invite step.
|
|
11
|
+
*/
|
|
5
12
|
export type RegisterResponse = AuthResponse | ClinicianInviteStep;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body for scheduling the signed-in user's account deletion.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
1
6
|
export interface RequestDeleteUserBody {
|
|
2
|
-
/**
|
|
3
|
-
* @type {number} Between 0 and 90
|
|
4
|
-
* @description After how many days the user should be deleted.
|
|
5
|
-
*/
|
|
7
|
+
/** Days until the account is deleted, between 0 and 90. */
|
|
6
8
|
days: number;
|
|
7
|
-
/**
|
|
8
|
-
* @description Deletes all medical data related to the user. If true, all medical data of the user will be deleted at the time of deletion. By default, this is false.
|
|
9
|
-
*/
|
|
9
|
+
/** When true, the user's medical data is deleted with the account. Defaults to false. */
|
|
10
10
|
wipe: boolean;
|
|
11
11
|
}
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of requesting deletion of the signed-in user.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
1
6
|
export interface RequestDeleteUserResponse {
|
|
7
|
+
/** When the deletion is scheduled to happen. */
|
|
2
8
|
scheduled: string;
|
|
9
|
+
/** The user the deletion applies to. */
|
|
3
10
|
user: {
|
|
11
|
+
/** FHIR resource type of the user. */
|
|
4
12
|
resourceType: string;
|
|
13
|
+
/** ID of the user. */
|
|
5
14
|
id: string;
|
|
15
|
+
/** First name of the user. */
|
|
6
16
|
firstName: string;
|
|
17
|
+
/** Last name of the user. */
|
|
7
18
|
lastName: string;
|
|
19
|
+
/** Email address of the user. */
|
|
8
20
|
email: string;
|
|
21
|
+
/** Reference to the project the user belongs to. */
|
|
9
22
|
project: Record<string, unknown>;
|
|
23
|
+
/** Resource metadata of the user. */
|
|
10
24
|
meta: Record<string, unknown>;
|
|
11
25
|
};
|
|
12
26
|
}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* A server-side login session for the current account.
|
|
3
|
+
*
|
|
4
|
+
* @category auth
|
|
5
|
+
*/
|
|
2
6
|
export interface OvokSession {
|
|
7
|
+
/** Session identifier. */
|
|
3
8
|
id: string;
|
|
9
|
+
/** How the session was authenticated. */
|
|
4
10
|
authMethod?: string;
|
|
11
|
+
/** Client address that created the session. */
|
|
5
12
|
remoteAddress?: string;
|
|
13
|
+
/** ISO 8601 time the session was last updated. */
|
|
6
14
|
lastUpdated?: string;
|
|
7
15
|
}
|
|
8
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Session selector accepted by the session revocation endpoint.
|
|
18
|
+
*
|
|
19
|
+
* @category auth
|
|
20
|
+
*/
|
|
9
21
|
export type SessionRevokeOption = "current" | "other" | "all" | (string & {});
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
2
|
import { OvokClient } from "../ovok-client";
|
|
3
3
|
import { ChangeHistoryPage, ChangeHistoryQuery } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Builds the query string for a change-history request; array filters repeat, and `types` uses `types[]`.
|
|
6
|
+
*/
|
|
4
7
|
export declare function serializeChangeHistoryQuery(params?: ChangeHistoryQuery): string;
|
|
8
|
+
/**
|
|
9
|
+
* Lists change-history rows. Calls `GET /v1/slim/change-history`.
|
|
10
|
+
*/
|
|
5
11
|
export declare function listChangeHistory(this: OvokClient, params?: ChangeHistoryQuery, requestOptions?: MedplumRequestOptions): Promise<ChangeHistoryPage>;
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.serializeChangeHistoryQuery = serializeChangeHistoryQuery;
|
|
4
4
|
exports.listChangeHistory = listChangeHistory;
|
|
5
5
|
const request_options_1 = require("../request-options");
|
|
6
|
+
/**
|
|
7
|
+
* Builds the query string for a change-history request; array filters repeat, and `types` uses `types[]`.
|
|
8
|
+
*/
|
|
6
9
|
function serializeChangeHistoryQuery(params = {}) {
|
|
7
10
|
const search = new URLSearchParams();
|
|
8
11
|
for (const [key, value] of Object.entries(params)) {
|
|
@@ -22,6 +25,9 @@ function serializeChangeHistoryQuery(params = {}) {
|
|
|
22
25
|
const encoded = search.toString();
|
|
23
26
|
return encoded ? `?${encoded}` : "";
|
|
24
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Lists change-history rows. Calls `GET /v1/slim/change-history`.
|
|
30
|
+
*/
|
|
25
31
|
function listChangeHistory(params = {}, requestOptions) {
|
|
26
32
|
return this.get(`/v1/slim/change-history${serializeChangeHistoryQuery(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
27
33
|
}
|
|
@@ -1,47 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies what changed; it selects the wording and the keys of `values`.
|
|
3
|
+
*
|
|
4
|
+
* @category slim
|
|
5
|
+
*/
|
|
1
6
|
export type ChangeHistoryKey = "residentDeleted" | "residentMaidenNameChanged" | "orgThresholdRangeChanged" | "patientSignalsThresholdSet" | "patientSignalsThresholdRemoved" | "orgSignalsSettingsChanged" | "userInvited" | "userRenamed" | "userRoleChanged" | "userRemoved" | "roleCreated" | "roleDeleted" | "rolePermissionsChanged" | "residentAssignedToDeviceAndLocation" | "residentUnassignedFromDevicesAndLocation" | "residentUnassignedFromDevicesAndLocationWithZone" | "residentUnassignedFromDeviceAndLocation" | "residentDeviceAssigned" | "residentDeviceUnassigned" | "residentMovedToLocation" | "residentRemovedFromLocation" | "residentMovedToZone" | "residentRemovedFromZone" | "patientThresholdMetricSetToIndividual" | "patientThresholdMetricSetToGlobal" | "patientTimeOutOfBedMetricSetToIndividual" | "patientTimeOutOfBedMetricSetToGlobal" | "orgTimeOutOfBedMetricUpdated" | "residentDischarged" | "residentReactivated" | "residentArchived" | "residentNameChanged" | "orgThresholdMetricUpdated" | "patientThresholdMetricUpdated" | "deviceCreated" | "deviceDeleted" | "deviceProjectChanged" | "deviceLocationChanged" | "deviceZoneChanged" | "deviceRenamed" | "locationCreated" | "locationDeleted" | "locationRenamed" | "locationZoneChanged" | "locationFloorChanged" | "locationRoomChanged" | "locationBedChanged" | "zoneCreated" | "zoneDeleted" | "zoneRenamed";
|
|
7
|
+
/**
|
|
8
|
+
* The kind of record a change concerns.
|
|
9
|
+
*
|
|
10
|
+
* @category slim
|
|
11
|
+
*/
|
|
2
12
|
export type ChangeHistoryType = "Threshold" | "Location" | "Zone" | "Device" | "Resident" | "Access";
|
|
13
|
+
/**
|
|
14
|
+
* Whether to list all changes or only global ones.
|
|
15
|
+
*
|
|
16
|
+
* @category slim
|
|
17
|
+
*/
|
|
3
18
|
export type ChangeHistoryScope = "all" | "global";
|
|
19
|
+
/**
|
|
20
|
+
* Sort direction by time.
|
|
21
|
+
*
|
|
22
|
+
* @category slim
|
|
23
|
+
*/
|
|
4
24
|
export type ChangeHistorySort = "asc" | "desc";
|
|
25
|
+
/**
|
|
26
|
+
* What happened to the record.
|
|
27
|
+
*
|
|
28
|
+
* @category slim
|
|
29
|
+
*/
|
|
5
30
|
export type ChangeHistoryAction = "created" | "deleted" | "renamed" | "moved" | "assigned" | "unassigned" | "discharged" | "reactivated" | "thresholdChanged";
|
|
31
|
+
/**
|
|
32
|
+
* A resident referenced by a change.
|
|
33
|
+
*
|
|
34
|
+
* @category slim
|
|
35
|
+
*/
|
|
6
36
|
export type ChangeHistoryResident = {
|
|
37
|
+
/** Patient id of the resident. */
|
|
7
38
|
patientId: string;
|
|
39
|
+
/** Resident id, or null when the patient has none. */
|
|
8
40
|
residentId: string | null;
|
|
9
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* A FHIR reference that filters changes to those related to it.
|
|
44
|
+
*
|
|
45
|
+
* @category slim
|
|
46
|
+
*/
|
|
10
47
|
export type ChangeHistoryReference = `Patient/${string}` | `Device/${string}` | `Location/${string}` | `Organization/${string}` | `Practitioner/${string}` | `AccessPolicy/${string}`;
|
|
48
|
+
/**
|
|
49
|
+
* One recorded change.
|
|
50
|
+
*
|
|
51
|
+
* @category slim
|
|
52
|
+
*/
|
|
11
53
|
export type ChangeHistoryRow = {
|
|
54
|
+
/** Change identifier. */
|
|
12
55
|
id: string;
|
|
56
|
+
/** The kind of record changed. */
|
|
13
57
|
type: ChangeHistoryType;
|
|
58
|
+
/** The user who made the change. */
|
|
14
59
|
user: string;
|
|
60
|
+
/** Resident the change concerns. */
|
|
15
61
|
residentId: string;
|
|
62
|
+
/** Device the change concerns. */
|
|
16
63
|
deviceId: string;
|
|
64
|
+
/** The resident, or null when the change has none. */
|
|
17
65
|
resident: ChangeHistoryResident | null;
|
|
66
|
+
/** Location the change concerns, if any. */
|
|
18
67
|
locationId?: string | null;
|
|
68
|
+
/** Zone the change concerns, if any. */
|
|
19
69
|
zoneId?: string | null;
|
|
70
|
+
/** ISO 8601 time of the change. */
|
|
20
71
|
time: string;
|
|
72
|
+
/** What changed. */
|
|
21
73
|
details: {
|
|
74
|
+
/** What kind of change this was. */
|
|
22
75
|
key: ChangeHistoryKey | (string & {});
|
|
76
|
+
/** Values for the change; keys depend on `key`. */
|
|
23
77
|
values: Record<string, string | number | null>;
|
|
24
78
|
};
|
|
25
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Filters and paging for a change-history list.
|
|
82
|
+
*
|
|
83
|
+
* @category slim
|
|
84
|
+
*/
|
|
26
85
|
export type ChangeHistoryQuery = {
|
|
86
|
+
/** Page number to fetch. */
|
|
27
87
|
page?: number;
|
|
88
|
+
/** Rows per page. */
|
|
28
89
|
count?: number;
|
|
90
|
+
/** Only these record types. */
|
|
29
91
|
types?: readonly ChangeHistoryType[];
|
|
92
|
+
/** `"global"` limits to global changes; `"all"` includes the rest. */
|
|
30
93
|
scope?: ChangeHistoryScope;
|
|
94
|
+
/** Only changes made by these users. */
|
|
31
95
|
userId?: string | readonly string[];
|
|
96
|
+
/** Only changes for these residents. */
|
|
32
97
|
residentId?: string | readonly string[];
|
|
98
|
+
/** Only changes for these devices. */
|
|
33
99
|
deviceId?: string | readonly string[];
|
|
100
|
+
/** Only changes for these locations. */
|
|
34
101
|
locationId?: string | readonly string[];
|
|
102
|
+
/** Only changes for these zones. */
|
|
35
103
|
zoneId?: string | readonly string[];
|
|
104
|
+
/** Only changes related to these references. */
|
|
36
105
|
relatedTo?: ChangeHistoryReference | readonly ChangeHistoryReference[];
|
|
106
|
+
/** Only these actions. */
|
|
37
107
|
actions?: ChangeHistoryAction | readonly ChangeHistoryAction[];
|
|
108
|
+
/** Sort direction by time. */
|
|
38
109
|
sort?: ChangeHistorySort;
|
|
110
|
+
/** Only changes at or after this ISO 8601 date. */
|
|
39
111
|
startDate?: string;
|
|
112
|
+
/** Only changes at or before this ISO 8601 date. */
|
|
40
113
|
endDate?: string;
|
|
41
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* One page of change-history rows.
|
|
117
|
+
*
|
|
118
|
+
* @category slim
|
|
119
|
+
*/
|
|
42
120
|
export type ChangeHistoryPage = {
|
|
121
|
+
/** Total rows matching the filters. */
|
|
43
122
|
total: number;
|
|
123
|
+
/** This page's number. */
|
|
44
124
|
page: number;
|
|
125
|
+
/** Rows per page. */
|
|
45
126
|
count: number;
|
|
127
|
+
/** The rows on this page. */
|
|
46
128
|
resources: ChangeHistoryRow[];
|
|
47
129
|
};
|
|
@@ -2,4 +2,10 @@ import type { MedplumRequestOptions } from "@medplum/core";
|
|
|
2
2
|
import { OvokClient } from "../../../ovok-client";
|
|
3
3
|
import { CreateAiSessionProps } from "../types/CreateAiSessionProps";
|
|
4
4
|
import { CreateAiSessionResponse } from "../types/CreateAiSessionResponse";
|
|
5
|
+
/**
|
|
6
|
+
* Starts an AI chat session (`POST /ai/session`).
|
|
7
|
+
*
|
|
8
|
+
* @param props - Assistant, title and opening messages; `participant` defaults to the signed-in profile.
|
|
9
|
+
* @throws Error when no participant is given and no profile is signed in.
|
|
10
|
+
*/
|
|
5
11
|
export declare function createAiSession(this: OvokClient, props: CreateAiSessionProps, requestOptions?: MedplumRequestOptions): Promise<CreateAiSessionResponse>;
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createAiSession = createAiSession;
|
|
4
4
|
const core_1 = require("@medplum/core");
|
|
5
|
+
/**
|
|
6
|
+
* Starts an AI chat session (`POST /ai/session`).
|
|
7
|
+
*
|
|
8
|
+
* @param props - Assistant, title and opening messages; `participant` defaults to the signed-in profile.
|
|
9
|
+
* @throws Error when no participant is given and no profile is signed in.
|
|
10
|
+
*/
|
|
5
11
|
async function createAiSession(props, requestOptions) {
|
|
6
12
|
var _a, _b;
|
|
7
13
|
const participant = (_a = props.participant) !== null && _a !== void 0 ? _a : (0, core_1.getReferenceString)((_b = (await this.getProfileAsync())) !== null && _b !== void 0 ? _b : {});
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created AI chat session.
|
|
3
|
+
*/
|
|
1
4
|
export interface CreateAiSessionResponse {
|
|
5
|
+
/** Title of the session. */
|
|
2
6
|
title: string;
|
|
7
|
+
/** Reference to the session's Communication. */
|
|
3
8
|
reference: `Communication/${string}`;
|
|
9
|
+
/** Reference to the user taking part. */
|
|
4
10
|
participant: string;
|
|
11
|
+
/** Messages of the session so far. */
|
|
5
12
|
messages: Message[];
|
|
13
|
+
/** The assistant configuration the session was created with. */
|
|
6
14
|
assistant: Assistant;
|
|
7
15
|
}
|
|
8
16
|
interface Message {
|
|
17
|
+
/** Message text. */
|
|
9
18
|
content: string;
|
|
19
|
+
/** Whether the message is from the user or the assistant. */
|
|
10
20
|
mode: "assistant" | "user";
|
|
21
|
+
/** Reference to the message's Communication. */
|
|
11
22
|
reference: `Communication/${string}`;
|
|
23
|
+
/** Reference to the sender. */
|
|
12
24
|
sender: string;
|
|
25
|
+
/** ISO 8601 time the message was sent. */
|
|
13
26
|
sentAt: string;
|
|
14
27
|
}
|
|
15
28
|
interface Assistant {
|
|
29
|
+
/** System prompt of the assistant. */
|
|
16
30
|
system: string;
|
|
31
|
+
/** Reference to the assistant's Practitioner. */
|
|
17
32
|
participant: string;
|
|
33
|
+
/** Number of previous messages used as context. */
|
|
18
34
|
history: number;
|
|
35
|
+
/** FHIR queries whose latest data is given to the assistant as context. */
|
|
19
36
|
context: string[];
|
|
20
37
|
}
|
|
21
38
|
export {};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messages of an AI chat session.
|
|
3
|
+
*/
|
|
1
4
|
export type SessionMessagesResponse = {
|
|
5
|
+
/** Messages in the session. */
|
|
2
6
|
messages: {
|
|
7
|
+
/** Message text. */
|
|
3
8
|
content: string;
|
|
9
|
+
/** Whether the message is from the user or the assistant. */
|
|
4
10
|
mode: "user" | "assistant";
|
|
11
|
+
/** Reference to the message's Communication. */
|
|
5
12
|
reference: string;
|
|
13
|
+
/** Reference to the sender. */
|
|
6
14
|
sender: string;
|
|
15
|
+
/** ISO 8601 time the message was sent. */
|
|
7
16
|
sentAt: string;
|
|
8
17
|
}[];
|
|
9
18
|
};
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The Ovok CMS locales (the CMS's `CMS_LOCALES`); `en` is its default and fallback.
|
|
3
|
+
*/
|
|
2
4
|
export declare const OVOK_CMS_LOCALES: readonly ["en", "de", "fr", "es"];
|
|
5
|
+
/**
|
|
6
|
+
* One of the supported CMS locales: `en`, `de`, `fr` or `es`.
|
|
7
|
+
*/
|
|
3
8
|
export type OvokCmsLocale = (typeof OVOK_CMS_LOCALES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Locale the CMS answers in when none is requested or supported.
|
|
11
|
+
*/
|
|
4
12
|
export declare const OVOK_CMS_DEFAULT_LOCALE: OvokCmsLocale;
|
|
5
13
|
/**
|
|
6
14
|
* The CMS locale for an app language: "de-DE" and "de_CH" read "de"; a
|
|
7
15
|
* language the CMS doesn't carry reads its default, "en".
|
|
8
16
|
*/
|
|
9
17
|
export declare function toCmsLocale(language?: string | null): OvokCmsLocale;
|
|
10
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The runtime's language (browser, device or server), as a CMS locale.
|
|
20
|
+
*/
|
|
11
21
|
export declare function defaultCmsLocale(): OvokCmsLocale;
|
|
@@ -3,8 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OVOK_CMS_DEFAULT_LOCALE = exports.OVOK_CMS_LOCALES = void 0;
|
|
4
4
|
exports.toCmsLocale = toCmsLocale;
|
|
5
5
|
exports.defaultCmsLocale = defaultCmsLocale;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* The Ovok CMS locales (the CMS's `CMS_LOCALES`); `en` is its default and fallback.
|
|
8
|
+
*/
|
|
7
9
|
exports.OVOK_CMS_LOCALES = ["en", "de", "fr", "es"];
|
|
10
|
+
/**
|
|
11
|
+
* Locale the CMS answers in when none is requested or supported.
|
|
12
|
+
*/
|
|
8
13
|
exports.OVOK_CMS_DEFAULT_LOCALE = "en";
|
|
9
14
|
/**
|
|
10
15
|
* The CMS locale for an app language: "de-DE" and "de_CH" read "de"; a
|
|
@@ -16,7 +21,9 @@ function toCmsLocale(language) {
|
|
|
16
21
|
? primary
|
|
17
22
|
: exports.OVOK_CMS_DEFAULT_LOCALE;
|
|
18
23
|
}
|
|
19
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The runtime's language (browser, device or server), as a CMS locale.
|
|
26
|
+
*/
|
|
20
27
|
function defaultCmsLocale() {
|
|
21
28
|
try {
|
|
22
29
|
return toCmsLocale(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
@@ -13,9 +13,13 @@ export declare function getCmsDocument<T extends object = OvokCmsDocument>(this:
|
|
|
13
13
|
* tenant's. Signed out, as `getCmsDocument`.
|
|
14
14
|
*/
|
|
15
15
|
export declare function listCmsDocuments<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, options?: OvokCmsListOptions, requestOptions?: MedplumRequestOptions): Promise<OvokCmsPage<T>>;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code.
|
|
18
|
+
*/
|
|
17
19
|
export declare function getLegalPage(this: OvokClient, slug: string, options?: OvokCmsOptions, requestOptions?: MedplumRequestOptions): Promise<OvokCmsDocument>;
|
|
18
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Release notes, newest first unless `sort` says otherwise. Needs a session.
|
|
22
|
+
*/
|
|
19
23
|
export declare function listReleaseNotes(this: OvokClient, options?: OvokCmsListOptions, requestOptions?: MedplumRequestOptions): Promise<OvokCmsPage>;
|
|
20
24
|
/**
|
|
21
25
|
* The `translations` collection as one tree: a group per document slug, and
|
|
@@ -21,7 +21,7 @@ const cmsQuery = ({ locale, tenantCode, environment, page, limit, sort }) => (0,
|
|
|
21
21
|
});
|
|
22
22
|
/**
|
|
23
23
|
* Signed out, the backend serves only a few collections, read by tenant code;
|
|
24
|
-
* any other read is a 401, which
|
|
24
|
+
* any other read is a 401, which the client answers by clearing its
|
|
25
25
|
* storage. So a signed-out read is refused here, before a request, unless it
|
|
26
26
|
* opts in with `allowSignedOut` and names its tenant.
|
|
27
27
|
*/
|
|
@@ -51,12 +51,16 @@ async function listCmsDocuments(collection, options = {}, requestOptions) {
|
|
|
51
51
|
assertReadable(this, collection, options);
|
|
52
52
|
return this.get(`${collectionPath(collection)}${cmsQuery(options)}`, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code.
|
|
56
|
+
*/
|
|
55
57
|
function getLegalPage(slug, options = {}, requestOptions) {
|
|
56
58
|
var _a;
|
|
57
59
|
return this.getCmsDocument("legal-pages", slug, { ...options, allowSignedOut: (_a = options.allowSignedOut) !== null && _a !== void 0 ? _a : true }, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
58
60
|
}
|
|
59
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Release notes, newest first unless `sort` says otherwise. Needs a session.
|
|
63
|
+
*/
|
|
60
64
|
function listReleaseNotes(options = {}, requestOptions) {
|
|
61
65
|
var _a;
|
|
62
66
|
return this.listCmsDocuments("release-notes", { ...options, sort: (_a = options.sort) !== null && _a !== void 0 ? _a : "-publishedAt" }, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
@@ -1,37 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A published document of an Ovok CMS collection (`legal-pages`,
|
|
3
3
|
* `release-notes`, …). Fields beyond these depend on the collection.
|
|
4
|
+
* @category cms
|
|
4
5
|
*/
|
|
5
6
|
export type OvokCmsDocument = {
|
|
7
|
+
/** Document id. */
|
|
6
8
|
id: number | string;
|
|
9
|
+
/** URL slug, unique within the collection. */
|
|
7
10
|
slug?: string | null;
|
|
11
|
+
/** Display title. */
|
|
8
12
|
title?: string | null;
|
|
13
|
+
/** Short summary text. */
|
|
9
14
|
excerpt?: string | null;
|
|
10
15
|
/** Lexical rich text (JSON), as the CMS stores it. */
|
|
11
16
|
body?: unknown;
|
|
17
|
+
/** Free-form tags. */
|
|
12
18
|
tags?: string[] | null;
|
|
19
|
+
/** Publication status, e.g. `published`. */
|
|
13
20
|
status: string;
|
|
21
|
+
/** ISO 8601 publication time. */
|
|
14
22
|
publishedAt?: string | null;
|
|
23
|
+
/** ISO 8601 time the content takes effect. */
|
|
15
24
|
effectiveAt?: string | null;
|
|
25
|
+
/** ISO 8601 time of the last change. */
|
|
16
26
|
updatedAt?: string | null;
|
|
17
27
|
[field: string]: unknown;
|
|
18
28
|
};
|
|
19
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* A page of published documents (the CMS list envelope).
|
|
31
|
+
*
|
|
32
|
+
* @category cms
|
|
33
|
+
*/
|
|
20
34
|
export type OvokCmsPage<T = OvokCmsDocument> = {
|
|
35
|
+
/** Documents on this page. */
|
|
21
36
|
docs: T[];
|
|
37
|
+
/** Number of documents in the whole list. */
|
|
22
38
|
totalDocs: number;
|
|
39
|
+
/** Page size used. */
|
|
23
40
|
limit: number;
|
|
41
|
+
/** Number of pages in the whole list. */
|
|
24
42
|
totalPages: number;
|
|
43
|
+
/** 1-based number of this page. */
|
|
25
44
|
page: number;
|
|
26
45
|
/** The 1-based position of this page's first document in the whole list. */
|
|
27
46
|
pagingCounter: number;
|
|
47
|
+
/** `true` when an earlier page exists. */
|
|
28
48
|
hasPrevPage: boolean;
|
|
49
|
+
/** `true` when a later page exists. */
|
|
29
50
|
hasNextPage: boolean;
|
|
30
51
|
/** `null` on the first page. */
|
|
31
52
|
prevPage: number | null;
|
|
32
53
|
/** `null` on the last page. */
|
|
33
54
|
nextPage: number | null;
|
|
34
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Options shared by every CMS read.
|
|
58
|
+
*
|
|
59
|
+
* @category cms
|
|
60
|
+
*/
|
|
35
61
|
export type OvokCmsOptions = {
|
|
36
62
|
/**
|
|
37
63
|
* An app language ("de-DE") or a CMS locale ("de"), mapped with
|
|
@@ -51,19 +77,33 @@ export type OvokCmsOptions = {
|
|
|
51
77
|
* Read signed out. Only for collections the backend serves without a key or
|
|
52
78
|
* session: legal pages and translations, which turn it on by default. It
|
|
53
79
|
* needs `tenantCode`; without both, a signed-out read is refused before a
|
|
54
|
-
* request, because a 401 makes
|
|
80
|
+
* request, because a 401 makes the client clear its storage.
|
|
55
81
|
*/
|
|
56
82
|
allowSignedOut?: boolean;
|
|
57
83
|
};
|
|
58
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Translation keys, nested at their dots, down to the text in one locale.
|
|
86
|
+
*
|
|
87
|
+
* @category cms
|
|
88
|
+
*/
|
|
59
89
|
export type OvokTranslationTree = {
|
|
60
90
|
[key: string]: string | OvokTranslationTree;
|
|
61
91
|
};
|
|
62
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* The `translations` collection: a tree per group, named by the document's slug ("sign-in").
|
|
94
|
+
*
|
|
95
|
+
* @category cms
|
|
96
|
+
*/
|
|
63
97
|
export type OvokTranslations = {
|
|
64
98
|
[group: string]: OvokTranslationTree;
|
|
65
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Options for listing documents of a CMS collection.
|
|
102
|
+
*
|
|
103
|
+
* @category cms
|
|
104
|
+
*/
|
|
66
105
|
export type OvokCmsListOptions = OvokCmsOptions & {
|
|
106
|
+
/** 1-based page number to read. */
|
|
67
107
|
page?: number;
|
|
68
108
|
/** At most 50. */
|
|
69
109
|
limit?: number;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
2
|
import { OvokClient } from "../ovok-client";
|
|
3
3
|
import { LegalConsentResponse, MedicalConsentResponse } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Reads the signed-in user's terms-and-conditions consent (`GET /v1/me/consent/legal`).
|
|
6
|
+
*/
|
|
4
7
|
export declare function getLegalConsent(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<LegalConsentResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* Accepts or withdraws the terms-and-conditions consent (`POST /v1/me/consent/legal`).
|
|
10
|
+
*
|
|
11
|
+
* @param accepted - `true` to accept, `false` to withdraw.
|
|
12
|
+
*/
|
|
5
13
|
export declare function setLegalConsent(this: OvokClient, accepted: boolean, requestOptions?: MedplumRequestOptions): Promise<LegalConsentResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Reads the signed-in user's medical-notifications consent (`GET /v1/me/consent/medical`).
|
|
16
|
+
*/
|
|
6
17
|
export declare function getMedicalConsent(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<MedicalConsentResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Grants or withdraws the medical-notifications consent (`POST /v1/me/consent/medical`).
|
|
20
|
+
*
|
|
21
|
+
* @param accepted - `true` to grant, `false` to withdraw.
|
|
22
|
+
*/
|
|
7
23
|
export declare function setMedicalConsent(this: OvokClient, accepted: boolean, requestOptions?: MedplumRequestOptions): Promise<MedicalConsentResponse>;
|
|
@@ -5,16 +5,32 @@ exports.setLegalConsent = setLegalConsent;
|
|
|
5
5
|
exports.getMedicalConsent = getMedicalConsent;
|
|
6
6
|
exports.setMedicalConsent = setMedicalConsent;
|
|
7
7
|
const request_options_1 = require("../request-options");
|
|
8
|
+
/**
|
|
9
|
+
* Reads the signed-in user's terms-and-conditions consent (`GET /v1/me/consent/legal`).
|
|
10
|
+
*/
|
|
8
11
|
function getLegalConsent(requestOptions) {
|
|
9
12
|
return this.get("/v1/me/consent/legal", ...(0, request_options_1.optionalArg)(requestOptions));
|
|
10
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Accepts or withdraws the terms-and-conditions consent (`POST /v1/me/consent/legal`).
|
|
16
|
+
*
|
|
17
|
+
* @param accepted - `true` to accept, `false` to withdraw.
|
|
18
|
+
*/
|
|
11
19
|
function setLegalConsent(accepted, requestOptions) {
|
|
12
20
|
const body = { termsAndConditionsConsent: accepted };
|
|
13
21
|
return this.post("/v1/me/consent/legal", body, undefined, requestOptions);
|
|
14
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Reads the signed-in user's medical-notifications consent (`GET /v1/me/consent/medical`).
|
|
25
|
+
*/
|
|
15
26
|
function getMedicalConsent(requestOptions) {
|
|
16
27
|
return this.get("/v1/me/consent/medical", ...(0, request_options_1.optionalArg)(requestOptions));
|
|
17
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Grants or withdraws the medical-notifications consent (`POST /v1/me/consent/medical`).
|
|
31
|
+
*
|
|
32
|
+
* @param accepted - `true` to grant, `false` to withdraw.
|
|
33
|
+
*/
|
|
18
34
|
function setMedicalConsent(accepted, requestOptions) {
|
|
19
35
|
const body = { medicalSettingsNotificationsConsent: accepted };
|
|
20
36
|
return this.post("/v1/me/consent/medical", body, undefined, requestOptions);
|