@ovok/core 0.4.49-dev.504 → 0.4.49-dev.515
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
|
@@ -1,25 +1,66 @@
|
|
|
1
1
|
import { CreateNotificationNote, NotificationNote, NotificationNotes, UpdateNotificationNote } from "../client/notifications";
|
|
2
2
|
import { NotificationTargetKind } from "../client/notifications/types";
|
|
3
3
|
import { OvokMutationState, OvokRequestState } from "./api-hooks";
|
|
4
|
+
/**
|
|
5
|
+
* Loads the notes of a notification via `client.listNotificationNotes`; reloads on notification changes and skips while `id` is undefined.
|
|
6
|
+
*
|
|
7
|
+
* @param kind - Kind of notification the notes belong to.
|
|
8
|
+
* @param id - Id of the notification.
|
|
9
|
+
*/
|
|
4
10
|
export declare const useNotificationNotes: (kind: NotificationTargetKind, id?: string) => OvokRequestState<NotificationNotes>;
|
|
11
|
+
/**
|
|
12
|
+
* Mutation that adds a note to a notification via `client.createNotificationNote`.
|
|
13
|
+
*/
|
|
5
14
|
export declare const useCreateNotificationNote: () => OvokMutationState<CreateNotificationNote, NotificationNote>;
|
|
15
|
+
/**
|
|
16
|
+
* Mutation that edits a notification note via `client.updateNotificationNote`.
|
|
17
|
+
*/
|
|
6
18
|
export declare const useUpdateNotificationNote: () => OvokMutationState<{
|
|
19
|
+
/** Id of the note to edit. */
|
|
7
20
|
noteId: string;
|
|
21
|
+
/** New note content. */
|
|
8
22
|
body: UpdateNotificationNote;
|
|
9
23
|
}, NotificationNote>;
|
|
24
|
+
/**
|
|
25
|
+
* Mutation that deletes a notification note via `client.deleteNotificationNote`; its parameter is the note id.
|
|
26
|
+
*/
|
|
10
27
|
export declare const useDeleteNotificationNote: () => OvokMutationState<string, void>;
|
|
28
|
+
/**
|
|
29
|
+
* Loads the notes of a Signals alert episode via `client.listSignalsAlertNotes`; skips while `episodeId` is undefined.
|
|
30
|
+
*/
|
|
11
31
|
export declare const useSignalsAlertNotes: (episodeId?: string) => OvokRequestState<NotificationNotes>;
|
|
32
|
+
/**
|
|
33
|
+
* Loads the notes of a raw Signals alert via `client.listSignalsRawAlertNotes`; skips while `alertId` is undefined.
|
|
34
|
+
*/
|
|
12
35
|
export declare const useSignalsRawAlertNotes: (alertId?: string) => OvokRequestState<NotificationNotes>;
|
|
36
|
+
/**
|
|
37
|
+
* Mutation that adds a note to a Signals alert episode via `client.createSignalsAlertNote`.
|
|
38
|
+
*/
|
|
13
39
|
export declare const useCreateSignalsAlertNote: () => OvokMutationState<{
|
|
40
|
+
/** Id of the alert episode. */
|
|
14
41
|
episodeId: string;
|
|
42
|
+
/** Note text. */
|
|
15
43
|
text: string;
|
|
16
44
|
}, NotificationNote>;
|
|
45
|
+
/**
|
|
46
|
+
* Mutation that adds a note to a raw Signals alert via `client.createSignalsRawAlertNote`.
|
|
47
|
+
*/
|
|
17
48
|
export declare const useCreateSignalsRawAlertNote: () => OvokMutationState<{
|
|
49
|
+
/** Id of the raw alert. */
|
|
18
50
|
alertId: string;
|
|
51
|
+
/** Note text. */
|
|
19
52
|
text: string;
|
|
20
53
|
}, NotificationNote>;
|
|
54
|
+
/**
|
|
55
|
+
* Mutation that edits a Signals note via `client.updateSignalsNote`.
|
|
56
|
+
*/
|
|
21
57
|
export declare const useUpdateSignalsNote: () => OvokMutationState<{
|
|
58
|
+
/** Id of the note to edit. */
|
|
22
59
|
noteId: string;
|
|
60
|
+
/** New note content. */
|
|
23
61
|
body: UpdateNotificationNote;
|
|
24
62
|
}, NotificationNote>;
|
|
63
|
+
/**
|
|
64
|
+
* Mutation that deletes a Signals note via `client.deleteSignalsNote`; its parameter is the note id.
|
|
65
|
+
*/
|
|
25
66
|
export declare const useDeleteSignalsNote: () => OvokMutationState<string, void>;
|
|
@@ -55,6 +55,12 @@ function useNoteList(id, idName, request, scope) {
|
|
|
55
55
|
}), [client, scope, id]);
|
|
56
56
|
return (0, api_hooks_1.useOvokRequest)(load, id !== undefined);
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Loads the notes of a notification via `client.listNotificationNotes`; reloads on notification changes and skips while `id` is undefined.
|
|
60
|
+
*
|
|
61
|
+
* @param kind - Kind of notification the notes belong to.
|
|
62
|
+
* @param id - Id of the notification.
|
|
63
|
+
*/
|
|
58
64
|
const useNotificationNotes = (kind, id) => useNoteList(id, "id", (client, noteId, signal) => client.listNotificationNotes(kind, noteId, { signal }), kind);
|
|
59
65
|
exports.useNotificationNotes = useNotificationNotes;
|
|
60
66
|
function useNoteMutation(request) {
|
|
@@ -64,21 +70,48 @@ function useNoteMutation(request) {
|
|
|
64
70
|
return result;
|
|
65
71
|
});
|
|
66
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Mutation that adds a note to a notification via `client.createNotificationNote`.
|
|
75
|
+
*/
|
|
67
76
|
const useCreateNotificationNote = () => useNoteMutation((client, body) => client.createNotificationNote(body));
|
|
68
77
|
exports.useCreateNotificationNote = useCreateNotificationNote;
|
|
78
|
+
/**
|
|
79
|
+
* Mutation that edits a notification note via `client.updateNotificationNote`.
|
|
80
|
+
*/
|
|
69
81
|
const useUpdateNotificationNote = () => useNoteMutation((client, params) => client.updateNotificationNote(params.noteId, params.body));
|
|
70
82
|
exports.useUpdateNotificationNote = useUpdateNotificationNote;
|
|
83
|
+
/**
|
|
84
|
+
* Mutation that deletes a notification note via `client.deleteNotificationNote`; its parameter is the note id.
|
|
85
|
+
*/
|
|
71
86
|
const useDeleteNotificationNote = () => useNoteMutation((client, noteId) => client.deleteNotificationNote(noteId));
|
|
72
87
|
exports.useDeleteNotificationNote = useDeleteNotificationNote;
|
|
88
|
+
/**
|
|
89
|
+
* Loads the notes of a Signals alert episode via `client.listSignalsAlertNotes`; skips while `episodeId` is undefined.
|
|
90
|
+
*/
|
|
73
91
|
const useSignalsAlertNotes = (episodeId) => useNoteList(episodeId, "episodeId", (client, id, signal) => client.listSignalsAlertNotes(id, { signal }));
|
|
74
92
|
exports.useSignalsAlertNotes = useSignalsAlertNotes;
|
|
93
|
+
/**
|
|
94
|
+
* Loads the notes of a raw Signals alert via `client.listSignalsRawAlertNotes`; skips while `alertId` is undefined.
|
|
95
|
+
*/
|
|
75
96
|
const useSignalsRawAlertNotes = (alertId) => useNoteList(alertId, "alertId", (client, id, signal) => client.listSignalsRawAlertNotes(id, { signal }));
|
|
76
97
|
exports.useSignalsRawAlertNotes = useSignalsRawAlertNotes;
|
|
98
|
+
/**
|
|
99
|
+
* Mutation that adds a note to a Signals alert episode via `client.createSignalsAlertNote`.
|
|
100
|
+
*/
|
|
77
101
|
const useCreateSignalsAlertNote = () => useNoteMutation((client, params) => client.createSignalsAlertNote(params.episodeId, { text: params.text }));
|
|
78
102
|
exports.useCreateSignalsAlertNote = useCreateSignalsAlertNote;
|
|
103
|
+
/**
|
|
104
|
+
* Mutation that adds a note to a raw Signals alert via `client.createSignalsRawAlertNote`.
|
|
105
|
+
*/
|
|
79
106
|
const useCreateSignalsRawAlertNote = () => useNoteMutation((client, params) => client.createSignalsRawAlertNote(params.alertId, { text: params.text }));
|
|
80
107
|
exports.useCreateSignalsRawAlertNote = useCreateSignalsRawAlertNote;
|
|
108
|
+
/**
|
|
109
|
+
* Mutation that edits a Signals note via `client.updateSignalsNote`.
|
|
110
|
+
*/
|
|
81
111
|
const useUpdateSignalsNote = () => useNoteMutation((client, params) => client.updateSignalsNote(params.noteId, params.body));
|
|
82
112
|
exports.useUpdateSignalsNote = useUpdateSignalsNote;
|
|
113
|
+
/**
|
|
114
|
+
* Mutation that deletes a Signals note via `client.deleteSignalsNote`; its parameter is the note id.
|
|
115
|
+
*/
|
|
83
116
|
const useDeleteSignalsNote = () => useNoteMutation((client, noteId) => client.deleteSignalsNote(noteId));
|
|
84
117
|
exports.useDeleteSignalsNote = useDeleteSignalsNote;
|
|
@@ -23,18 +23,39 @@ export interface UseObservationsOptions<T extends readonly SupportedType[]> {
|
|
|
23
23
|
}
|
|
24
24
|
/** Plain inverse mapping for apps that already fetched their Observation resources. */
|
|
25
25
|
export { observationsToMeasurements };
|
|
26
|
+
/**
|
|
27
|
+
* Searches the Observations of the given measurement types (optionally for one patient, id or period) and maps them to measurements.
|
|
28
|
+
*
|
|
29
|
+
* @param options - Types, filters and grouping; `types` is required.
|
|
30
|
+
*/
|
|
26
31
|
export declare const useObservations: <T extends readonly SupportedType[]>({ types, period, patientId, id, groupBy, timeToleranceMs, count, sort, elements, }: UseObservationsOptions<T>) => {
|
|
32
|
+
/** Observations mapped to measurements of the requested types. */
|
|
27
33
|
measurements: Array<Extract<SupportedMeasurement, {
|
|
34
|
+
/** Measurement type of the entry. */
|
|
28
35
|
measurementTypeKey: T[number];
|
|
29
36
|
}>>;
|
|
37
|
+
/** `true` while the search runs. */
|
|
30
38
|
loading: boolean;
|
|
39
|
+
/** Error of the last search. */
|
|
31
40
|
error?: Error;
|
|
41
|
+
/** Observations the search returned. */
|
|
32
42
|
observations: readonly Observation[];
|
|
43
|
+
/** Runs the search again. */
|
|
33
44
|
refetch: () => void;
|
|
34
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Returns a function that saves a measurement through `client.saveMeasurement`; it resolves as saved, or queued when the offline queue holds it.
|
|
48
|
+
*/
|
|
35
49
|
export declare const useSaveMeasurement: () => ((params: GenerateObservationBodyParams, requestOptions?: MedplumRequestOptions) => Promise<Awaited<ReturnType<OvokClient["saveMeasurement"]>>>);
|
|
50
|
+
/**
|
|
51
|
+
* Loads an ECG Observation, plus its member Observations, and maps them to one recording; without `id`, loads all ECG Observations.
|
|
52
|
+
*
|
|
53
|
+
* @param id - Id of the ECG Observation.
|
|
54
|
+
*/
|
|
36
55
|
export declare const useEcgRecording: (id?: string) => {
|
|
56
|
+
/** The ECG measurement built from the loaded Observations, if any. */
|
|
37
57
|
recording: import("../types").EcgMeasurement;
|
|
58
|
+
/** The loaded ECG Observations, the root and its members. */
|
|
38
59
|
measurements: import("@medplum/core").WithId<Observation>[];
|
|
39
60
|
dataUpdatedAt: number | undefined;
|
|
40
61
|
loading: boolean;
|
|
@@ -43,10 +64,18 @@ export declare const useEcgRecording: (id?: string) => {
|
|
|
43
64
|
error: Error | undefined;
|
|
44
65
|
reload: () => void;
|
|
45
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* Loads the user's urine-analysis measurements via `useObservations`.
|
|
69
|
+
*/
|
|
46
70
|
export declare const useUrineTests: () => {
|
|
71
|
+
/** Observations mapped to measurements of the requested types. */
|
|
47
72
|
measurements: never[];
|
|
73
|
+
/** `true` while the search runs. */
|
|
48
74
|
loading: boolean;
|
|
75
|
+
/** Error of the last search. */
|
|
49
76
|
error?: Error;
|
|
77
|
+
/** Observations the search returned. */
|
|
50
78
|
observations: readonly Observation[];
|
|
79
|
+
/** Runs the search again. */
|
|
51
80
|
refetch: () => void;
|
|
52
81
|
};
|
|
@@ -41,6 +41,11 @@ Object.defineProperty(exports, "observationsToMeasurements", { enumerable: true,
|
|
|
41
41
|
const types_1 = require("../types");
|
|
42
42
|
const api_hooks_1 = require("./api-hooks");
|
|
43
43
|
const index_1 = require("./index");
|
|
44
|
+
/**
|
|
45
|
+
* Searches the Observations of the given measurement types (optionally for one patient, id or period) and maps them to measurements.
|
|
46
|
+
*
|
|
47
|
+
* @param options - Types, filters and grouping; `types` is required.
|
|
48
|
+
*/
|
|
44
49
|
const useObservations = ({ types, period, patientId, id, groupBy, timeToleranceMs, count, sort, elements, }) => {
|
|
45
50
|
// A broad search is intentional: one measurement can expand into several
|
|
46
51
|
// observations, and the inverse mapper performs the type-specific grouping.
|
|
@@ -70,11 +75,19 @@ const useObservations = ({ types, period, patientId, id, groupBy, timeToleranceM
|
|
|
70
75
|
};
|
|
71
76
|
};
|
|
72
77
|
exports.useObservations = useObservations;
|
|
78
|
+
/**
|
|
79
|
+
* Returns a function that saves a measurement through `client.saveMeasurement`; it resolves as saved, or queued when the offline queue holds it.
|
|
80
|
+
*/
|
|
73
81
|
const useSaveMeasurement = () => {
|
|
74
82
|
const client = (0, index_1.useClient)();
|
|
75
83
|
return React.useCallback((params, requestOptions) => client.saveMeasurement(params, requestOptions), [client]);
|
|
76
84
|
};
|
|
77
85
|
exports.useSaveMeasurement = useSaveMeasurement;
|
|
86
|
+
/**
|
|
87
|
+
* Loads an ECG Observation, plus its member Observations, and maps them to one recording; without `id`, loads all ECG Observations.
|
|
88
|
+
*
|
|
89
|
+
* @param id - Id of the ECG Observation.
|
|
90
|
+
*/
|
|
78
91
|
const useEcgRecording = (id) => {
|
|
79
92
|
const { data: observations = [], ...state } = (0, api_hooks_1.useOvokClientRequest)(async (client, signal) => {
|
|
80
93
|
const query = {
|
|
@@ -91,8 +104,17 @@ const useEcgRecording = (id) => {
|
|
|
91
104
|
return [...root, ...members];
|
|
92
105
|
}, id);
|
|
93
106
|
const recording = (0, observationsToMeasurements_1.observationsToMeasurements)(observations, [types_1.MeasurementTypeKey.ecg])[0];
|
|
94
|
-
return {
|
|
107
|
+
return {
|
|
108
|
+
...state,
|
|
109
|
+
/** The ECG measurement built from the loaded Observations, if any. */
|
|
110
|
+
recording,
|
|
111
|
+
/** The loaded ECG Observations, the root and its members. */
|
|
112
|
+
measurements: observations,
|
|
113
|
+
};
|
|
95
114
|
};
|
|
96
115
|
exports.useEcgRecording = useEcgRecording;
|
|
116
|
+
/**
|
|
117
|
+
* Loads the user's urine-analysis measurements via `useObservations`.
|
|
118
|
+
*/
|
|
97
119
|
const useUrineTests = () => (0, exports.useObservations)({ types: [types_1.MeasurementTypeKey.urineAnalysis] });
|
|
98
120
|
exports.useUrineTests = useUrineTests;
|
|
@@ -2,27 +2,80 @@ import { Bundle, Observation, Parameters, QuestionnaireResponse } from "@medplum
|
|
|
2
2
|
import { OvokCurrentPatientProfile, OvokPatientAppointment, OvokPatientCarePlan, OvokPatientDashboard, OvokPatientDashboardQuery, OvokPatientDevice, OvokPatientLatestObservationsQuery, OvokPatientMeasurement, OvokPatientNotification, OvokPatientObservationBundle, OvokPatientQuestionnaire, OvokPatientQuestionnaireResponse, OvokPatientResourceQuery, OvokPatientSchedule, OvokPatientSchedulingQuery, OvokPatientSlot } from "../client/patient/types";
|
|
3
3
|
import { OvokQuestionnaireOperationResponse } from "../client/questionnaire-response/types";
|
|
4
4
|
import { OvokMutationState, OvokRequestState } from "./api-hooks";
|
|
5
|
+
/**
|
|
6
|
+
* Loads the signed-in patient's profile via `client.getCurrentPatientProfile`.
|
|
7
|
+
*/
|
|
5
8
|
export declare const useCurrentPatientProfile: () => OvokRequestState<OvokCurrentPatientProfile>;
|
|
9
|
+
/**
|
|
10
|
+
* Loads the patient dashboard via `client.getPatientDashboard`, reloading when `params` change.
|
|
11
|
+
*/
|
|
6
12
|
export declare const usePatientDashboard: (params?: OvokPatientDashboardQuery) => OvokRequestState<OvokPatientDashboard>;
|
|
13
|
+
/**
|
|
14
|
+
* Loads the patient's latest observations via `client.getPatientLatestObservations`, reloading when `params` change.
|
|
15
|
+
*/
|
|
7
16
|
export declare const usePatientLatestObservations: (params?: OvokPatientLatestObservationsQuery) => OvokRequestState<OvokPatientObservationBundle>;
|
|
17
|
+
/**
|
|
18
|
+
* Lists the patient's appointments via `client.listPatientAppointments`, reloading when `params` change.
|
|
19
|
+
*/
|
|
8
20
|
export declare const usePatientAppointments: (params?: OvokPatientSchedulingQuery) => OvokRequestState<OvokPatientAppointment[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Lists schedules available to the patient via `client.listPatientSchedules`, reloading when `params` change.
|
|
23
|
+
*/
|
|
9
24
|
export declare const usePatientSchedules: (params?: OvokPatientSchedulingQuery) => OvokRequestState<OvokPatientSchedule[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Lists bookable slots via `client.listPatientSlots`, reloading when `params` change.
|
|
27
|
+
*/
|
|
10
28
|
export declare const usePatientSlots: (params?: OvokPatientSchedulingQuery) => OvokRequestState<OvokPatientSlot[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Lists the patient's past measurements via `client.listPatientMeasurementHistory`, reloading when `params` change.
|
|
31
|
+
*/
|
|
11
32
|
export declare const usePatientMeasurementHistory: (params?: OvokPatientResourceQuery) => OvokRequestState<OvokPatientMeasurement[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Loads one measurement via `client.getPatientMeasurement`; skips while `measurementId` is undefined and fails with "measurementId is required" when it is empty.
|
|
35
|
+
*/
|
|
12
36
|
export declare const usePatientMeasurement: (measurementId?: string) => OvokRequestState<OvokPatientMeasurement>;
|
|
37
|
+
/**
|
|
38
|
+
* Lists the patient's care plans via `client.listPatientCarePlans`, reloading when `params` change.
|
|
39
|
+
*/
|
|
13
40
|
export declare const usePatientCarePlans: (params?: OvokPatientResourceQuery) => OvokRequestState<OvokPatientCarePlan[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Lists the patient's questionnaires via `client.listPatientQuestionnaires`, reloading when `params` change.
|
|
43
|
+
*/
|
|
14
44
|
export declare const usePatientQuestionnaires: (params?: OvokPatientResourceQuery) => OvokRequestState<OvokPatientQuestionnaire[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Lists the patient's questionnaire responses via `client.listPatientQuestionnaireResponses`, reloading when `params` change.
|
|
47
|
+
*/
|
|
15
48
|
export declare const usePatientQuestionnaireResponses: (params?: OvokPatientResourceQuery) => OvokRequestState<OvokPatientQuestionnaireResponse[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Lists the patient's devices via `client.listPatientDevices`, reloading when `params` change.
|
|
51
|
+
*/
|
|
16
52
|
export declare const usePatientDevices: (params?: OvokPatientResourceQuery) => OvokRequestState<OvokPatientDevice[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Lists the patient's notifications via `client.listPatientNotifications`, reloading when `params` change.
|
|
55
|
+
*/
|
|
17
56
|
export declare const usePatientNotifications: (params?: OvokPatientResourceQuery) => OvokRequestState<OvokPatientNotification[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Mutation that pre-fills a questionnaire via `client.populateQuestionnaire`.
|
|
59
|
+
*/
|
|
18
60
|
export declare const usePopulateQuestionnaire: () => OvokMutationState<{
|
|
61
|
+
/** Id of the Questionnaire to populate. */
|
|
19
62
|
questionnaireId: string;
|
|
63
|
+
/** Parameters passed to the population operation. */
|
|
20
64
|
parameters?: Parameters;
|
|
21
65
|
}, OvokQuestionnaireOperationResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Mutation that submits a questionnaire response, with optional observations, via `client.submitQuestionnaireResponse`.
|
|
68
|
+
*/
|
|
22
69
|
export declare const useSubmitQuestionnaireResponse: () => OvokMutationState<{
|
|
70
|
+
/** Response to submit. */
|
|
23
71
|
questionnaireResponse: QuestionnaireResponse;
|
|
72
|
+
/** Observations saved together with the response. */
|
|
24
73
|
observations?: Observation[];
|
|
25
74
|
}, Bundle>;
|
|
75
|
+
/**
|
|
76
|
+
* Mutation that extracts observations from a saved response via `client.extractQuestionnaireObservations`.
|
|
77
|
+
*/
|
|
26
78
|
export declare const useExtractQuestionnaireObservations: () => OvokMutationState<{
|
|
79
|
+
/** Id of the QuestionnaireResponse to extract from. */
|
|
27
80
|
questionnaireResponseId: string;
|
|
28
81
|
}, OvokQuestionnaireOperationResponse>;
|
|
@@ -3,38 +3,86 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useExtractQuestionnaireObservations = exports.useSubmitQuestionnaireResponse = exports.usePopulateQuestionnaire = exports.usePatientNotifications = exports.usePatientDevices = exports.usePatientQuestionnaireResponses = exports.usePatientQuestionnaires = exports.usePatientCarePlans = exports.usePatientMeasurement = exports.usePatientMeasurementHistory = exports.usePatientSlots = exports.usePatientSchedules = exports.usePatientAppointments = exports.usePatientLatestObservations = exports.usePatientDashboard = exports.useCurrentPatientProfile = void 0;
|
|
5
5
|
const api_hooks_1 = require("./api-hooks");
|
|
6
|
+
/**
|
|
7
|
+
* Loads the signed-in patient's profile via `client.getCurrentPatientProfile`.
|
|
8
|
+
*/
|
|
6
9
|
const useCurrentPatientProfile = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getCurrentPatientProfile({ signal }));
|
|
7
10
|
exports.useCurrentPatientProfile = useCurrentPatientProfile;
|
|
11
|
+
/**
|
|
12
|
+
* Loads the patient dashboard via `client.getPatientDashboard`, reloading when `params` change.
|
|
13
|
+
*/
|
|
8
14
|
const usePatientDashboard = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getPatientDashboard(params, { signal }), params);
|
|
9
15
|
exports.usePatientDashboard = usePatientDashboard;
|
|
16
|
+
/**
|
|
17
|
+
* Loads the patient's latest observations via `client.getPatientLatestObservations`, reloading when `params` change.
|
|
18
|
+
*/
|
|
10
19
|
const usePatientLatestObservations = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getPatientLatestObservations(params, { signal }), params);
|
|
11
20
|
exports.usePatientLatestObservations = usePatientLatestObservations;
|
|
21
|
+
/**
|
|
22
|
+
* Lists the patient's appointments via `client.listPatientAppointments`, reloading when `params` change.
|
|
23
|
+
*/
|
|
12
24
|
const usePatientAppointments = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientAppointments(params, { signal }), params);
|
|
13
25
|
exports.usePatientAppointments = usePatientAppointments;
|
|
26
|
+
/**
|
|
27
|
+
* Lists schedules available to the patient via `client.listPatientSchedules`, reloading when `params` change.
|
|
28
|
+
*/
|
|
14
29
|
const usePatientSchedules = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientSchedules(params, { signal }), params);
|
|
15
30
|
exports.usePatientSchedules = usePatientSchedules;
|
|
31
|
+
/**
|
|
32
|
+
* Lists bookable slots via `client.listPatientSlots`, reloading when `params` change.
|
|
33
|
+
*/
|
|
16
34
|
const usePatientSlots = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientSlots(params, { signal }), params);
|
|
17
35
|
exports.usePatientSlots = usePatientSlots;
|
|
36
|
+
/**
|
|
37
|
+
* Lists the patient's past measurements via `client.listPatientMeasurementHistory`, reloading when `params` change.
|
|
38
|
+
*/
|
|
18
39
|
const usePatientMeasurementHistory = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientMeasurementHistory(params, { signal }), params);
|
|
19
40
|
exports.usePatientMeasurementHistory = usePatientMeasurementHistory;
|
|
41
|
+
/**
|
|
42
|
+
* Loads one measurement via `client.getPatientMeasurement`; skips while `measurementId` is undefined and fails with "measurementId is required" when it is empty.
|
|
43
|
+
*/
|
|
20
44
|
const usePatientMeasurement = (measurementId) => (0, api_hooks_1.useOvokClientRequestFor)("measurementId", measurementId, (client, id, signal) => client.getPatientMeasurement(id, { signal }));
|
|
21
45
|
exports.usePatientMeasurement = usePatientMeasurement;
|
|
46
|
+
/**
|
|
47
|
+
* Lists the patient's care plans via `client.listPatientCarePlans`, reloading when `params` change.
|
|
48
|
+
*/
|
|
22
49
|
const usePatientCarePlans = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientCarePlans(params, { signal }), params);
|
|
23
50
|
exports.usePatientCarePlans = usePatientCarePlans;
|
|
51
|
+
/**
|
|
52
|
+
* Lists the patient's questionnaires via `client.listPatientQuestionnaires`, reloading when `params` change.
|
|
53
|
+
*/
|
|
24
54
|
const usePatientQuestionnaires = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientQuestionnaires(params, { signal }), params);
|
|
25
55
|
exports.usePatientQuestionnaires = usePatientQuestionnaires;
|
|
56
|
+
/**
|
|
57
|
+
* Lists the patient's questionnaire responses via `client.listPatientQuestionnaireResponses`, reloading when `params` change.
|
|
58
|
+
*/
|
|
26
59
|
const usePatientQuestionnaireResponses = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientQuestionnaireResponses(params, { signal }), params);
|
|
27
60
|
exports.usePatientQuestionnaireResponses = usePatientQuestionnaireResponses;
|
|
61
|
+
/**
|
|
62
|
+
* Lists the patient's devices via `client.listPatientDevices`, reloading when `params` change.
|
|
63
|
+
*/
|
|
28
64
|
const usePatientDevices = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientDevices(params, { signal }), params);
|
|
29
65
|
exports.usePatientDevices = usePatientDevices;
|
|
66
|
+
/**
|
|
67
|
+
* Lists the patient's notifications via `client.listPatientNotifications`, reloading when `params` change.
|
|
68
|
+
*/
|
|
30
69
|
const usePatientNotifications = (params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listPatientNotifications(params, { signal }), params);
|
|
31
70
|
exports.usePatientNotifications = usePatientNotifications;
|
|
71
|
+
/**
|
|
72
|
+
* Mutation that pre-fills a questionnaire via `client.populateQuestionnaire`.
|
|
73
|
+
*/
|
|
32
74
|
const usePopulateQuestionnaire = () => (0, api_hooks_1.useOvokMutation)((client, params) => client.populateQuestionnaire(params.questionnaireId, params.parameters));
|
|
33
75
|
exports.usePopulateQuestionnaire = usePopulateQuestionnaire;
|
|
76
|
+
/**
|
|
77
|
+
* Mutation that submits a questionnaire response, with optional observations, via `client.submitQuestionnaireResponse`.
|
|
78
|
+
*/
|
|
34
79
|
const useSubmitQuestionnaireResponse = () => {
|
|
35
80
|
return (0, api_hooks_1.useOvokMutation)((client, params) => client.submitQuestionnaireResponse(params.questionnaireResponse, params.observations));
|
|
36
81
|
};
|
|
37
82
|
exports.useSubmitQuestionnaireResponse = useSubmitQuestionnaireResponse;
|
|
83
|
+
/**
|
|
84
|
+
* Mutation that extracts observations from a saved response via `client.extractQuestionnaireObservations`.
|
|
85
|
+
*/
|
|
38
86
|
const useExtractQuestionnaireObservations = () => {
|
|
39
87
|
return (0, api_hooks_1.useOvokMutation)((client, params) => client.extractQuestionnaireObservations(params.questionnaireResponseId));
|
|
40
88
|
};
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import { CreatePatientSharingInvite, PatientSharingInvite, PatientSharingSettings, PatientSharingSettingsUpdate, PatientSharingShare, PatientSharingShares, RedeemPatientSharingInvite } from "../client/patient-sharing";
|
|
2
2
|
import { OvokMutationState, OvokRequestState } from "./api-hooks";
|
|
3
|
+
/**
|
|
4
|
+
* Loads the patient's shares via `client.listPatientSharing`; reloads when patient-sharing changes.
|
|
5
|
+
*/
|
|
3
6
|
export declare const usePatientSharing: () => OvokRequestState<PatientSharingShares>;
|
|
7
|
+
/**
|
|
8
|
+
* Mutation that creates a patient-sharing invite via `client.createPatientSharingInvite`.
|
|
9
|
+
*/
|
|
4
10
|
export declare const useCreatePatientSharingInvite: () => OvokMutationState<CreatePatientSharingInvite, PatientSharingInvite>;
|
|
11
|
+
/**
|
|
12
|
+
* Mutation that redeems a patient-sharing invite via `client.redeemPatientSharingInvite`, then notifies patient-sharing listeners.
|
|
13
|
+
*/
|
|
5
14
|
export declare const useRedeemPatientSharingInvite: () => OvokMutationState<RedeemPatientSharingInvite, PatientSharingShare>;
|
|
15
|
+
/**
|
|
16
|
+
* Mutation that revokes a share via `client.revokePatientSharing`; its parameter is the consent id. Notifies patient-sharing listeners.
|
|
17
|
+
*/
|
|
6
18
|
export declare const useRevokePatientSharing: () => OvokMutationState<string, void>;
|
|
19
|
+
/**
|
|
20
|
+
* Loads the patient-sharing settings via `client.getPatientSharingSettings`.
|
|
21
|
+
*/
|
|
7
22
|
export declare const usePatientSharingSettings: () => OvokRequestState<PatientSharingSettings>;
|
|
23
|
+
/**
|
|
24
|
+
* Mutation that updates the patient-sharing settings via `client.updatePatientSharingSettings`.
|
|
25
|
+
*/
|
|
8
26
|
export declare const useUpdatePatientSharingSettings: () => OvokMutationState<PatientSharingSettingsUpdate, PatientSharingSettings>;
|
|
@@ -39,6 +39,9 @@ const React = __importStar(require("react"));
|
|
|
39
39
|
const api_hooks_1 = require("./api-hooks");
|
|
40
40
|
const notification_invalidation_1 = require("./notification-invalidation");
|
|
41
41
|
const index_1 = require("./index");
|
|
42
|
+
/**
|
|
43
|
+
* Loads the patient's shares via `client.listPatientSharing`; reloads when patient-sharing changes.
|
|
44
|
+
*/
|
|
42
45
|
const usePatientSharing = () => {
|
|
43
46
|
const client = (0, index_1.useClient)();
|
|
44
47
|
const state = (0, api_hooks_1.useOvokClientRequest)((current, signal) => current.listPatientSharing({ signal }));
|
|
@@ -50,20 +53,35 @@ const usePatientSharing = () => {
|
|
|
50
53
|
return state;
|
|
51
54
|
};
|
|
52
55
|
exports.usePatientSharing = usePatientSharing;
|
|
56
|
+
/**
|
|
57
|
+
* Mutation that creates a patient-sharing invite via `client.createPatientSharingInvite`.
|
|
58
|
+
*/
|
|
53
59
|
const useCreatePatientSharingInvite = () => (0, api_hooks_1.useOvokMutation)((client, params) => client.createPatientSharingInvite(params));
|
|
54
60
|
exports.useCreatePatientSharingInvite = useCreatePatientSharingInvite;
|
|
61
|
+
/**
|
|
62
|
+
* Mutation that redeems a patient-sharing invite via `client.redeemPatientSharingInvite`, then notifies patient-sharing listeners.
|
|
63
|
+
*/
|
|
55
64
|
const useRedeemPatientSharingInvite = () => (0, api_hooks_1.useOvokMutation)(async (client, params) => {
|
|
56
65
|
const share = await client.redeemPatientSharingInvite(params);
|
|
57
66
|
(0, notification_invalidation_1.notifyNotificationChanges)(client, { type: "patient-sharing" });
|
|
58
67
|
return share;
|
|
59
68
|
});
|
|
60
69
|
exports.useRedeemPatientSharingInvite = useRedeemPatientSharingInvite;
|
|
70
|
+
/**
|
|
71
|
+
* Mutation that revokes a share via `client.revokePatientSharing`; its parameter is the consent id. Notifies patient-sharing listeners.
|
|
72
|
+
*/
|
|
61
73
|
const useRevokePatientSharing = () => (0, api_hooks_1.useOvokMutation)(async (client, consentId) => {
|
|
62
74
|
await client.revokePatientSharing(consentId);
|
|
63
75
|
(0, notification_invalidation_1.notifyNotificationChanges)(client, { type: "patient-sharing" });
|
|
64
76
|
});
|
|
65
77
|
exports.useRevokePatientSharing = useRevokePatientSharing;
|
|
78
|
+
/**
|
|
79
|
+
* Loads the patient-sharing settings via `client.getPatientSharingSettings`.
|
|
80
|
+
*/
|
|
66
81
|
const usePatientSharingSettings = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getPatientSharingSettings({ signal }));
|
|
67
82
|
exports.usePatientSharingSettings = usePatientSharingSettings;
|
|
83
|
+
/**
|
|
84
|
+
* Mutation that updates the patient-sharing settings via `client.updatePatientSharingSettings`.
|
|
85
|
+
*/
|
|
68
86
|
const useUpdatePatientSharingSettings = () => (0, api_hooks_1.useOvokMutation)((client, settings) => client.updatePatientSharingSettings(settings));
|
|
69
87
|
exports.useUpdatePatientSharingSettings = useUpdatePatientSharingSettings;
|
|
@@ -1,21 +1,53 @@
|
|
|
1
1
|
import { OvokI18nDocument, OvokLocalization, OvokLocalizationQuery, OvokLocalizationUpdate, OvokI18nValue, OvokLocales, OvokProjectSettings, OvokProjectTextSettingKey } from "../client/platform/types";
|
|
2
2
|
import { OvokMutationState, OvokRequestState } from "./api-hooks";
|
|
3
|
+
/**
|
|
4
|
+
* Loads the project's locales via `client.getLocales`.
|
|
5
|
+
*/
|
|
3
6
|
export declare const useLocales: () => OvokRequestState<OvokLocales>;
|
|
7
|
+
/**
|
|
8
|
+
* Lists a language's localizations via `client.listLocalizations`; skips while `language` is empty.
|
|
9
|
+
*
|
|
10
|
+
* @param language - Language code.
|
|
11
|
+
* @param params - Search filters and paging.
|
|
12
|
+
*/
|
|
4
13
|
export declare const useLocalizations: (language: string, params?: OvokLocalizationQuery) => OvokRequestState<{
|
|
14
|
+
/** Number of matching localizations. */
|
|
5
15
|
total: number;
|
|
16
|
+
/** Localizations on this page. */
|
|
6
17
|
resources: OvokLocalization[];
|
|
7
18
|
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Loads a language's i18next document via `client.getI18nextDocument`; skips while `language` is empty.
|
|
21
|
+
*
|
|
22
|
+
* @param language - Language code.
|
|
23
|
+
*/
|
|
8
24
|
export declare const useI18nextDocument: (language: string) => OvokRequestState<OvokI18nDocument>;
|
|
25
|
+
/**
|
|
26
|
+
* Mutation that changes one localization via `client.updateLocalization`.
|
|
27
|
+
*/
|
|
9
28
|
export declare const useUpdateLocalization: () => OvokMutationState<{
|
|
29
|
+
/** Language code. */
|
|
10
30
|
language: string;
|
|
31
|
+
/** Localization key. */
|
|
11
32
|
key: string;
|
|
33
|
+
/** New value. */
|
|
12
34
|
body: OvokLocalizationUpdate;
|
|
13
35
|
}, OvokLocalization>;
|
|
36
|
+
/**
|
|
37
|
+
* Mutation that replaces a language's i18next document via `client.updateI18nextDocument`.
|
|
38
|
+
*/
|
|
14
39
|
export declare const useUpdateI18nextDocument: () => OvokMutationState<{
|
|
40
|
+
/** Language code. */
|
|
15
41
|
language: string;
|
|
42
|
+
/** New document. */
|
|
16
43
|
document: Record<string, OvokI18nValue>;
|
|
17
44
|
}, void>;
|
|
45
|
+
/**
|
|
46
|
+
* Mutation that sets a project text setting via `client.updateProjectTextSetting`.
|
|
47
|
+
*/
|
|
18
48
|
export declare const useUpdateProjectTextSetting: () => OvokMutationState<{
|
|
49
|
+
/** Setting to change. */
|
|
19
50
|
key: OvokProjectTextSettingKey;
|
|
51
|
+
/** New value, or `null` to clear it. */
|
|
20
52
|
value: string | null;
|
|
21
53
|
}, OvokProjectSettings>;
|
|
@@ -3,15 +3,38 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useUpdateProjectTextSetting = exports.useUpdateI18nextDocument = exports.useUpdateLocalization = exports.useI18nextDocument = exports.useLocalizations = exports.useLocales = void 0;
|
|
5
5
|
const api_hooks_1 = require("./api-hooks");
|
|
6
|
+
/**
|
|
7
|
+
* Loads the project's locales via `client.getLocales`.
|
|
8
|
+
*/
|
|
6
9
|
const useLocales = () => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getLocales({ signal }));
|
|
7
10
|
exports.useLocales = useLocales;
|
|
11
|
+
/**
|
|
12
|
+
* Lists a language's localizations via `client.listLocalizations`; skips while `language` is empty.
|
|
13
|
+
*
|
|
14
|
+
* @param language - Language code.
|
|
15
|
+
* @param params - Search filters and paging.
|
|
16
|
+
*/
|
|
8
17
|
const useLocalizations = (language, params = {}) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.listLocalizations(language, params, { signal }), [language, params], language.length > 0);
|
|
9
18
|
exports.useLocalizations = useLocalizations;
|
|
19
|
+
/**
|
|
20
|
+
* Loads a language's i18next document via `client.getI18nextDocument`; skips while `language` is empty.
|
|
21
|
+
*
|
|
22
|
+
* @param language - Language code.
|
|
23
|
+
*/
|
|
10
24
|
const useI18nextDocument = (language) => (0, api_hooks_1.useOvokClientRequest)((client, signal) => client.getI18nextDocument(language, { signal }), language, language.length > 0);
|
|
11
25
|
exports.useI18nextDocument = useI18nextDocument;
|
|
26
|
+
/**
|
|
27
|
+
* Mutation that changes one localization via `client.updateLocalization`.
|
|
28
|
+
*/
|
|
12
29
|
const useUpdateLocalization = () => (0, api_hooks_1.useOvokMutation)((client, params) => client.updateLocalization(params.language, params.key, params.body));
|
|
13
30
|
exports.useUpdateLocalization = useUpdateLocalization;
|
|
31
|
+
/**
|
|
32
|
+
* Mutation that replaces a language's i18next document via `client.updateI18nextDocument`.
|
|
33
|
+
*/
|
|
14
34
|
const useUpdateI18nextDocument = () => (0, api_hooks_1.useOvokMutation)((client, params) => client.updateI18nextDocument(params.language, params.document));
|
|
15
35
|
exports.useUpdateI18nextDocument = useUpdateI18nextDocument;
|
|
36
|
+
/**
|
|
37
|
+
* Mutation that sets a project text setting via `client.updateProjectTextSetting`.
|
|
38
|
+
*/
|
|
16
39
|
const useUpdateProjectTextSetting = () => (0, api_hooks_1.useOvokMutation)((client, params) => client.updateProjectTextSetting(params.key, params.value));
|
|
17
40
|
exports.useUpdateProjectTextSetting = useUpdateProjectTextSetting;
|
|
@@ -1,14 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings of `useOvokPoll`.
|
|
3
|
+
*/
|
|
1
4
|
export type OvokPollOptions = {
|
|
5
|
+
/** Wait between polls in milliseconds; must be a positive finite number. */
|
|
2
6
|
intervalMs: number;
|
|
7
|
+
/** Pause polling while the page is hidden; defaults to `true`. */
|
|
3
8
|
whenHidden?: boolean;
|
|
9
|
+
/** Double the wait after each failure, up to 16 times the interval; defaults to `true`. */
|
|
4
10
|
backoff?: boolean;
|
|
11
|
+
/** Never poll sooner than a failed response's `Retry-After`; defaults to `true`. */
|
|
5
12
|
honorRetryAfter?: boolean;
|
|
6
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* State of `useOvokPoll`.
|
|
16
|
+
*/
|
|
7
17
|
export type OvokPollState<T> = {
|
|
18
|
+
/** Result of the last successful poll. */
|
|
8
19
|
data: T | undefined;
|
|
20
|
+
/** Error of the last poll, cleared by the next success. */
|
|
9
21
|
error: Error | undefined;
|
|
22
|
+
/** Epoch milliseconds of the last successful poll. */
|
|
10
23
|
lastSuccessAt: number | undefined;
|
|
24
|
+
/** Restarts polling, with a request right away. */
|
|
11
25
|
reload: () => void;
|
|
12
26
|
};
|
|
13
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Polls after each completed request, pausing hidden tabs and aborting replaced work.
|
|
29
|
+
*/
|
|
14
30
|
export declare function useOvokPoll<T>(load: (signal: AbortSignal) => Promise<T>, options: OvokPollOptions): OvokPollState<T>;
|
package/dist/hooks/poll-hooks.js
CHANGED
|
@@ -45,7 +45,9 @@ const nextDelayMs = (intervalMs, failureCount, backoff, retryAfterMs) => {
|
|
|
45
45
|
const delay = backoff ? intervalMs * 2 ** Math.min(failureCount, MAX_BACKOFF_EXPONENT) : intervalMs;
|
|
46
46
|
return retryAfterMs === undefined ? delay : Math.max(delay, retryAfterMs);
|
|
47
47
|
};
|
|
48
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Polls after each completed request, pausing hidden tabs and aborting replaced work.
|
|
50
|
+
*/
|
|
49
51
|
function useOvokPoll(load, options) {
|
|
50
52
|
const { intervalMs, whenHidden = true, backoff = true, honorRetryAfter = true } = options;
|
|
51
53
|
const [data, setData] = React.useState();
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { EnableSignalsResponse } from "../client/signals";
|
|
2
2
|
import { OvokMutationState } from "./api-hooks";
|
|
3
|
+
/**
|
|
4
|
+
* Mutation that enables Signals for a patient via `client.enableSignalsForPatient`; its parameter is the patient id.
|
|
5
|
+
*/
|
|
3
6
|
export declare const useEnableSignalsForPatient: () => OvokMutationState<string, EnableSignalsResponse>;
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useEnableSignalsForPatient = void 0;
|
|
5
5
|
const api_hooks_1 = require("./api-hooks");
|
|
6
|
+
/**
|
|
7
|
+
* Mutation that enables Signals for a patient via `client.enableSignalsForPatient`; its parameter is the patient id.
|
|
8
|
+
*/
|
|
6
9
|
const useEnableSignalsForPatient = () => (0, api_hooks_1.useOvokMutation)((client, patientId) => client.enableSignalsForPatient(patientId));
|
|
7
10
|
exports.useEnableSignalsForPatient = useEnableSignalsForPatient;
|