@ovok/core 0.4.49-dev.504 → 0.4.49-dev.513
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
- package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
- package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
- package/dist/client/auth/errors.d.ts +15 -2
- package/dist/client/auth/errors.js +12 -2
- package/dist/client/auth/methods/appleLogin.d.ts +1 -0
- package/dist/client/auth/methods/appleLogin.js +1 -0
- package/dist/client/auth/methods/changePassword.d.ts +1 -0
- package/dist/client/auth/methods/changePassword.js +1 -0
- package/dist/client/auth/methods/googleLogin.d.ts +1 -0
- package/dist/client/auth/methods/googleLogin.js +1 -0
- package/dist/client/auth/methods/login.d.ts +6 -0
- package/dist/client/auth/methods/login.js +6 -0
- package/dist/client/auth/methods/register.d.ts +5 -0
- package/dist/client/auth/methods/register.js +5 -0
- package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
- package/dist/client/auth/methods/registerPractitioner.js +5 -0
- package/dist/client/auth/methods/reloadSession.d.ts +3 -0
- package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
- package/dist/client/auth/methods/requestDeleteUser.js +4 -5
- package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
- package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
- package/dist/client/auth/session-fetch.d.ts +11 -0
- package/dist/client/auth/types/Account.d.ts +8 -1
- package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
- package/dist/client/auth/types/AppleLoginBody.js +5 -0
- package/dist/client/auth/types/AuthResponse.d.ts +12 -0
- package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
- package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
- package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
- package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
- package/dist/client/auth/types/LoginBody.d.ts +15 -1
- package/dist/client/auth/types/LoginError.d.ts +21 -2
- package/dist/client/auth/types/LoginError.js +8 -2
- package/dist/client/auth/types/LoginResponse.d.ts +8 -1
- package/dist/client/auth/types/RegisterBody.d.ts +12 -0
- package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
- package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
- package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
- package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
- package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
- package/dist/client/auth/types/Session.d.ts +14 -2
- package/dist/client/change-history/methods.d.ts +6 -0
- package/dist/client/change-history/methods.js +6 -0
- package/dist/client/change-history/types.d.ts +82 -0
- package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
- package/dist/client/chat/ai/methods/createAiSession.js +6 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
- package/dist/client/cms/locale.d.ts +12 -2
- package/dist/client/cms/locale.js +9 -2
- package/dist/client/cms/methods.d.ts +6 -2
- package/dist/client/cms/methods.js +7 -3
- package/dist/client/cms/types.d.ts +44 -4
- package/dist/client/consent/methods.d.ts +16 -0
- package/dist/client/consent/methods.js +16 -0
- package/dist/client/consent/types.d.ts +53 -1
- package/dist/client/consent/types.js +10 -1
- package/dist/client/email/methods.d.ts +3 -0
- package/dist/client/email/methods.js +3 -0
- package/dist/client/email/types.d.ts +33 -0
- package/dist/client/errors/field-errors.d.ts +3 -0
- package/dist/client/errors/field-errors.js +3 -0
- package/dist/client/errors/ovok-error-utils.d.ts +6 -0
- package/dist/client/errors/ovok-error-utils.js +6 -0
- package/dist/client/errors/ovok-error.d.ts +36 -4
- package/dist/client/errors/ovok-error.js +15 -4
- package/dist/client/errors/rate-limit-error.d.ts +11 -2
- package/dist/client/errors/rate-limit-error.js +10 -2
- package/dist/client/errors/sign-in-required-error.d.ts +5 -2
- package/dist/client/errors/sign-in-required-error.js +5 -2
- package/dist/client/experience/methods.d.ts +38 -0
- package/dist/client/experience/methods.js +35 -0
- package/dist/client/experience/types.d.ts +316 -0
- package/dist/client/experience/types.js +1 -0
- package/dist/client/invites/methods.d.ts +27 -9
- package/dist/client/invites/methods.js +27 -9
- package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
- package/dist/client/invites/parse-accept-invite-link.js +3 -1
- package/dist/client/invites/types.d.ts +55 -0
- package/dist/client/invites/types.js +12 -0
- package/dist/client/notifications/methods.d.ts +15 -0
- package/dist/client/notifications/methods.js +15 -0
- package/dist/client/notifications/types.d.ts +249 -2
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +3 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
- package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
- package/dist/client/observation/methods/observationsToMeasurements.js +8 -1
- package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
- package/dist/client/observation/methods/saveMeasurement.js +3 -1
- package/dist/client/observation/observation-bundle-utils.d.ts +6 -0
- package/dist/client/observation/observation-bundle-utils.js +6 -0
- package/dist/client/observation/series.d.ts +25 -3
- package/dist/client/observation/series.js +6 -2
- package/dist/client/observation/services/creator.d.ts +5 -0
- package/dist/client/observation/services/creator.js +5 -0
- package/dist/client/observation/services/uric-acid-service.js +0 -1
- package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
- package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
- package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
- package/dist/client/observation/types/ObservationCode.d.ts +64 -1
- package/dist/client/observation/types/ObservationCode.js +64 -1
- package/dist/client/observation/types/UrineAnalytes.d.ts +14 -0
- package/dist/client/observation/types/UrineAnalytes.js +1 -0
- package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
- package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
- package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
- package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
- package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
- package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
- package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
- package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
- package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
- package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
- package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
- package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
- package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
- package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
- package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
- package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
- package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
- package/dist/client/offline/offline-measurement-queue.js +21 -0
- package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
- package/dist/client/offline/shared-measurement-queue.js +3 -1
- package/dist/client/ovok-client.d.ts +27 -6
- package/dist/client/ovok-client.js +8 -5
- package/dist/client/patient/methods.d.ts +21 -0
- package/dist/client/patient/methods.js +21 -0
- package/dist/client/patient/types.d.ts +131 -0
- package/dist/client/patient-sharing/methods.d.ts +18 -0
- package/dist/client/patient-sharing/methods.js +18 -0
- package/dist/client/patient-sharing/types.d.ts +89 -1
- package/dist/client/platform/methods.d.ts +22 -0
- package/dist/client/platform/methods.js +20 -0
- package/dist/client/platform/types.d.ts +194 -1
- package/dist/client/platform/types.js +24 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
- package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
- package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
- package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
- package/dist/client/questionnaire-response/types.d.ts +6 -0
- package/dist/client/signals/errors.d.ts +13 -2
- package/dist/client/signals/errors.js +9 -2
- package/dist/client/signals/methods.d.ts +9 -0
- package/dist/client/signals/methods.js +9 -0
- package/dist/client/signals/types.d.ts +31 -0
- package/dist/client/slim/methods.d.ts +268 -21
- package/dist/client/slim/methods.js +264 -21
- package/dist/client/slim/paging.d.ts +22 -2
- package/dist/client/slim/paging.js +6 -2
- package/dist/client/slim/types.d.ts +920 -1
- package/dist/client/storage.d.ts +15 -1
- package/dist/client/storage.js +7 -1
- package/dist/client/wearables/methods.d.ts +24 -0
- package/dist/client/wearables/methods.js +24 -0
- package/dist/client/wearables/types.d.ts +74 -0
- package/dist/conformance/api-requirements.d.ts +31 -5
- package/dist/conformance/api-requirements.js +47 -10
- package/dist/conformance/capability-requirements.d.ts +4 -26
- package/dist/conformance/capability-requirements.js +5 -27
- package/dist/conformance/capability.d.ts +9 -1
- package/dist/conformance/capability.js +3 -1
- package/dist/hooks/account-hooks.d.ts +35 -0
- package/dist/hooks/account-hooks.js +33 -0
- package/dist/hooks/api-hooks.d.ts +74 -4
- package/dist/hooks/api-hooks.js +56 -4
- package/dist/hooks/cms-hooks.d.ts +9 -3
- package/dist/hooks/cms-hooks.js +9 -3
- package/dist/hooks/email-hooks.d.ts +3 -0
- package/dist/hooks/email-hooks.js +3 -0
- package/dist/hooks/experience-hooks.d.ts +26 -0
- package/dist/hooks/experience-hooks.js +24 -0
- package/dist/hooks/index.d.ts +18 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/invites-hooks.d.ts +21 -2
- package/dist/hooks/invites-hooks.js +21 -2
- package/dist/hooks/notification-ack-hooks.d.ts +6 -2
- package/dist/hooks/notification-ack-hooks.js +6 -2
- package/dist/hooks/notification-hooks.d.ts +27 -3
- package/dist/hooks/notification-hooks.js +27 -3
- package/dist/hooks/notification-note-hooks.d.ts +41 -0
- package/dist/hooks/notification-note-hooks.js +33 -0
- package/dist/hooks/observation-hooks.d.ts +29 -0
- package/dist/hooks/observation-hooks.js +23 -1
- package/dist/hooks/patient-hooks.d.ts +53 -0
- package/dist/hooks/patient-hooks.js +48 -0
- package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
- package/dist/hooks/patient-sharing-hooks.js +18 -0
- package/dist/hooks/platform-hooks.d.ts +32 -0
- package/dist/hooks/platform-hooks.js +23 -0
- package/dist/hooks/poll-hooks.d.ts +17 -1
- package/dist/hooks/poll-hooks.js +3 -1
- package/dist/hooks/signals-hooks.d.ts +3 -0
- package/dist/hooks/signals-hooks.js +3 -0
- package/dist/hooks/wearables-hooks.d.ts +23 -0
- package/dist/hooks/wearables-hooks.js +21 -0
- package/dist/next/auth/saved-accounts-store.d.ts +10 -0
- package/dist/next/auth/session.d.ts +17 -0
- package/dist/next/auth/user-session.d.ts +5 -0
- package/dist/next/config/ovok-config.d.ts +45 -0
- package/dist/next/errors/ovok-account-error.d.ts +14 -1
- package/dist/next/errors/ovok-account-error.js +8 -1
- package/dist/next/errors/ovok-errors.d.ts +88 -0
- package/dist/next/errors/ovok-errors.js +67 -0
- package/dist/next/http/http-client.d.ts +5 -0
- package/dist/next/http/transmit.d.ts +7 -0
- package/dist/next/http/url.d.ts +10 -0
- package/dist/next/ovok.d.ts +31 -1
- package/dist/next/ovok.js +5 -1
- package/dist/next/paging/page.d.ts +13 -1
- package/dist/next/react/context.d.ts +7 -0
- package/dist/next/react/context.js +7 -0
- package/dist/next/react/index.d.ts +24 -0
- package/dist/next/react/index.js +18 -0
- package/dist/next/react/query-hooks.d.ts +69 -0
- package/dist/next/react/query-hooks.js +31 -0
- package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
- package/dist/next/resources/accounts/accounts-resource.js +6 -0
- package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
- package/dist/next/resources/ai/ai-chat-resource.js +5 -0
- package/dist/next/resources/ai/ai-resource.d.ts +13 -0
- package/dist/next/resources/ai/ai-resource.js +6 -0
- package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
- package/dist/next/resources/ai/chat-messages-resource.js +7 -0
- package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
- package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
- package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
- package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
- package/dist/next/resources/auth/registration.d.ts +18 -1
- package/dist/next/resources/auth/social-login.d.ts +12 -0
- package/dist/next/resources/auth-resource.d.ts +54 -1
- package/dist/next/resources/auth-resource.js +23 -0
- package/dist/next/resources/bots/bots-resource.d.ts +15 -0
- package/dist/next/resources/bots/bots-resource.js +5 -0
- package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
- package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
- package/dist/next/resources/cms/cms-documents-resource.js +7 -1
- package/dist/next/resources/cms/cms-resource.d.ts +7 -0
- package/dist/next/resources/cms/cms-resource.js +5 -0
- package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
- package/dist/next/resources/cms/release-notes-resource.js +6 -0
- package/dist/next/resources/consent/consent-resource.d.ts +22 -0
- package/dist/next/resources/consent/consent-resource.js +20 -0
- package/dist/next/resources/content/content-resource.d.ts +18 -0
- package/dist/next/resources/content/content-resource.js +12 -0
- package/dist/next/resources/documents/documents-resource.d.ts +24 -0
- package/dist/next/resources/documents/documents-resource.js +10 -0
- package/dist/next/resources/email/email-resource.d.ts +6 -0
- package/dist/next/resources/email/email-resource.js +5 -0
- package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
- package/dist/next/resources/email/email-templates-resource.js +6 -0
- package/dist/next/resources/fhir-resource.d.ts +36 -0
- package/dist/next/resources/fhir-resource.js +21 -0
- package/dist/next/resources/health-resource.d.ts +16 -0
- package/dist/next/resources/health-resource.js +5 -0
- package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
- package/dist/next/resources/invites/invite-flow-resource.js +7 -1
- package/dist/next/resources/invites/invites-resource.d.ts +15 -0
- package/dist/next/resources/invites/invites-resource.js +5 -0
- package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
- package/dist/next/resources/localization/i18next-resource.js +6 -0
- package/dist/next/resources/localization/locales-resource.d.ts +7 -0
- package/dist/next/resources/localization/locales-resource.js +7 -0
- package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
- package/dist/next/resources/localization/localizations-resource.js +9 -0
- package/dist/next/resources/measurements/measurements-resource.d.ts +53 -1
- package/dist/next/resources/measurements/measurements-resource.js +14 -0
- package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
- package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
- package/dist/next/resources/patient/fhir-records.d.ts +19 -1
- package/dist/next/resources/patient/fhir-records.js +19 -1
- package/dist/next/resources/patient/patient-resource.d.ts +15 -0
- package/dist/next/resources/patient/patient-resource.js +6 -0
- package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
- package/dist/next/resources/projects/project-features-resource.js +7 -0
- package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
- package/dist/next/resources/projects/project-members-resource.js +9 -0
- package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
- package/dist/next/resources/projects/project-settings-resource.js +8 -0
- package/dist/next/resources/projects/projects-resource.d.ts +15 -0
- package/dist/next/resources/projects/projects-resource.js +5 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
- package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
- package/dist/next/resources/realtime/realtime-resource.js +11 -0
- package/dist/next/resources/realtime/realtime-types.d.ts +16 -0
- package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
- package/dist/next/resources/session/saved-accounts-resource.js +16 -0
- package/dist/next/resources/session/session-resource.d.ts +8 -0
- package/dist/next/resources/session/session-resource.js +7 -0
- package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
- package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
- package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
- package/dist/next/resources/sharing/sharing-resource.js +5 -0
- package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
- package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
- package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
- package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
- package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
- package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
- package/dist/next/resources/signals/signals-resource.d.ts +7 -0
- package/dist/next/resources/signals/signals-resource.js +5 -0
- package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
- package/dist/next/resources/signals/undeliverable-resource.js +6 -0
- package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
- package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
- package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
- package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
- package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
- package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
- package/dist/next/resources/slim/slim-devices-resource.js +16 -0
- package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-exports-resource.js +6 -0
- package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-locations-resource.js +9 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
- package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
- package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
- package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-patients-resource.js +10 -0
- package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-policies-resource.js +10 -0
- package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
- package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-projects-resource.js +11 -0
- package/dist/next/resources/slim/slim-queries.d.ts +51 -0
- package/dist/next/resources/slim/slim-resource.d.ts +21 -0
- package/dist/next/resources/slim/slim-resource.js +6 -0
- package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
- package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
- package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
- package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
- package/dist/next/resources/slim/slim-trends-resource.js +6 -0
- package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-users-resource.js +6 -0
- package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
- package/dist/next/resources/slim/slim-zones-resource.js +8 -0
- package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
- package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
- package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
- package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
- package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
- package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
- package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
- package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
- package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
- package/dist/next/resources/wearables/wearables-resource.js +5 -0
- package/dist/next/storage/ovok-storage.d.ts +16 -0
- package/dist/next/storage/ovok-storage.js +8 -0
- package/dist/types/ValidationError.d.ts +9 -0
- package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
- package/dist/utils/patch/getPatchOperationType.js +3 -0
- package/package.json +5 -2
|
@@ -12,6 +12,11 @@ const CHANGE_PASSWORD_PATH = "v2/auth/change-password";
|
|
|
12
12
|
const RESET_PASSWORD_PATH = "v2/auth/reset-password";
|
|
13
13
|
const COMPLETE_PASSWORD_RESET_PATH = "v2/auth/reset-password/process";
|
|
14
14
|
const DELETE_ACCOUNT_PATH = "auth/delete";
|
|
15
|
+
/**
|
|
16
|
+
* Sign-in, registration, password and session management. Routes are under `auth` and `v2/auth`.
|
|
17
|
+
*
|
|
18
|
+
* @category auth
|
|
19
|
+
*/
|
|
15
20
|
class AuthResource {
|
|
16
21
|
/** `clientId` is the ClientApplication social sign-in and password resets go through. */
|
|
17
22
|
constructor(http, tenantCode, session, clientId = null) {
|
|
@@ -21,6 +26,13 @@ class AuthResource {
|
|
|
21
26
|
this.clientId = clientId;
|
|
22
27
|
this.sessions = new auth_sessions_resource_1.AuthSessionsResource(http, session);
|
|
23
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Signs in with email and password. Calls `POST auth/tenant/{profileType}/login/start`, then `.../token` unless MFA is required.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const result = await ovok.auth.login({ profileType: "Patient", email, password });
|
|
34
|
+
* if (result.status === "mfa-required") await ovok.auth.verifyMfa(result.challenge, code);
|
|
35
|
+
*/
|
|
24
36
|
async login(credentials, options) {
|
|
25
37
|
const session = this.userSession();
|
|
26
38
|
const { codeVerifier, codeChallenge } = (0, generate_code_challenge_and_verifier_1.generateCodeChallengeAndVerifier)();
|
|
@@ -33,6 +45,7 @@ class AuthResource {
|
|
|
33
45
|
}
|
|
34
46
|
return this.exchange(session, { profileType, sessionCode: step.sessionCode, codeVerifier }, options);
|
|
35
47
|
}
|
|
48
|
+
/** Completes an MFA sign-in with the code. Calls `POST auth/tenant/{profileType}/login/mfa`, then `.../token`. */
|
|
36
49
|
async verifyMfa(challenge, code, options) {
|
|
37
50
|
const session = this.userSession();
|
|
38
51
|
const { profileType, loginId, codeVerifier } = challenge;
|
|
@@ -51,20 +64,28 @@ class AuthResource {
|
|
|
51
64
|
}
|
|
52
65
|
return { status: "signed-in", session: await session.begin(response) };
|
|
53
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Registers a practitioner in the client's tenant and signs them in. Calls `POST auth/tenant/Practitioner/register`.
|
|
69
|
+
*
|
|
70
|
+
* @throws OvokValidationError when `password` and `passwordConfirm` differ.
|
|
71
|
+
*/
|
|
54
72
|
async registerPractitioner(details, options) {
|
|
55
73
|
const session = this.userSession();
|
|
56
74
|
const body = (0, registration_1.practitionerRegistrationBody)(details, this.tenantCode);
|
|
57
75
|
return session.begin(await this.http.anonymous().post(registration_1.REGISTER_PATHS.practitioner, body, options));
|
|
58
76
|
}
|
|
77
|
+
/** Signs in with an Apple or Google token. Calls `POST auth/external/{provider}`. */
|
|
59
78
|
async socialLogin(provider, credential, options) {
|
|
60
79
|
const session = this.userSession();
|
|
61
80
|
const { internalId, ...providerResult } = credential;
|
|
62
81
|
const path = (0, social_login_1.socialLoginPath)(provider, this.socialLoginClientId(), internalId);
|
|
63
82
|
return session.begin(await this.http.anonymous().post(path, providerResult, options));
|
|
64
83
|
}
|
|
84
|
+
/** Returns the current session, or null when signed out. */
|
|
65
85
|
async current() {
|
|
66
86
|
return this.session === null ? null : this.session.current();
|
|
67
87
|
}
|
|
88
|
+
/** Fetches the signed-in user's profile. Calls `GET auth/me`. */
|
|
68
89
|
me(options) {
|
|
69
90
|
return this.http.get(exports.ME_PATH, options);
|
|
70
91
|
}
|
|
@@ -73,11 +94,13 @@ class AuthResource {
|
|
|
73
94
|
const { oldPassword, newPassword } = change;
|
|
74
95
|
return this.http.patch(CHANGE_PASSWORD_PATH, { oldPassword, newPassword }, options);
|
|
75
96
|
}
|
|
97
|
+
/** Sends a password-reset email. Calls `POST v2/auth/reset-password`. */
|
|
76
98
|
resetPassword(request, options) {
|
|
77
99
|
var _a, _b;
|
|
78
100
|
const body = { ...request, clientId: (_b = (_a = request.clientId) !== null && _a !== void 0 ? _a : this.clientId) !== null && _b !== void 0 ? _b : undefined };
|
|
79
101
|
return this.http.anonymous().post(RESET_PASSWORD_PATH, body, options);
|
|
80
102
|
}
|
|
103
|
+
/** Sets a new password using the token from the reset email. Calls `POST v2/auth/reset-password/process`. */
|
|
81
104
|
completePasswordReset(body, options) {
|
|
82
105
|
return this.http.anonymous().post(COMPLETE_PASSWORD_RESET_PATH, body, options);
|
|
83
106
|
}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { HttpClient } from "../../http/http-client";
|
|
2
2
|
import { RequestOptions } from "../../http/transmit";
|
|
3
|
+
/**
|
|
4
|
+
* JSON input passed to a bot.
|
|
5
|
+
*
|
|
6
|
+
* @category bots
|
|
7
|
+
*/
|
|
3
8
|
export type BotInput = Record<string, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* JSON output returned by a bot.
|
|
11
|
+
*
|
|
12
|
+
* @category bots
|
|
13
|
+
*/
|
|
4
14
|
export type BotOutput = Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Runs server-side bots.
|
|
17
|
+
*
|
|
18
|
+
* @category bots
|
|
19
|
+
*/
|
|
5
20
|
export declare class BotsResource {
|
|
6
21
|
private readonly http;
|
|
7
22
|
constructor(http: HttpClient);
|
|
@@ -3,6 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BotsResource = void 0;
|
|
4
4
|
const query_string_1 = require("../../../client/query-string");
|
|
5
5
|
const BOTS_PATH = "bots";
|
|
6
|
+
/**
|
|
7
|
+
* Runs server-side bots.
|
|
8
|
+
*
|
|
9
|
+
* @category bots
|
|
10
|
+
*/
|
|
6
11
|
class BotsResource {
|
|
7
12
|
constructor(http) {
|
|
8
13
|
this.http = http;
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import type { OvokCmsPage } from "../../../client/cms/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* `locale` takes an app language ("de-DE") or a CMS locale ("de"); omitted, the CMS answers in its default.
|
|
6
|
+
*
|
|
7
|
+
* @category cms
|
|
8
|
+
*/
|
|
5
9
|
export type CmsReadParams = {
|
|
10
|
+
/** An app language such as `de-DE` or a CMS locale such as `de`. */
|
|
6
11
|
locale?: string;
|
|
7
12
|
};
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* `limit` is at most 50; `sort` is a top-level field, "-" for descending.
|
|
15
|
+
*
|
|
16
|
+
* @category cms
|
|
17
|
+
*/
|
|
9
18
|
export type CmsListParams = CmsReadParams & {
|
|
19
|
+
/** Page number to fetch. */
|
|
10
20
|
page?: number;
|
|
21
|
+
/** Documents per page, at most 50. */
|
|
11
22
|
limit?: number;
|
|
23
|
+
/** Top-level field to sort by; prefix with `-` for descending. */
|
|
12
24
|
sort?: string;
|
|
13
25
|
};
|
|
14
26
|
/** Published documents, always read as the client's tenant: signed out, the CMS knows it only from `?tenant=`. */
|
|
@@ -2,10 +2,16 @@ import type { OvokCmsDocument } from "../../../client/cms/types";
|
|
|
2
2
|
import { RequestOptions } from "../../http/transmit";
|
|
3
3
|
import { PagePromise } from "../../paging/page";
|
|
4
4
|
import { CmsDelivery, CmsListParams, CmsReadParams } from "./cms-delivery";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Published documents of any collection, merged with the shared tenant's.
|
|
7
|
+
*
|
|
8
|
+
* @category cms
|
|
9
|
+
*/
|
|
6
10
|
export declare class CmsDocumentsResource {
|
|
7
11
|
private readonly delivery;
|
|
8
12
|
constructor(delivery: CmsDelivery);
|
|
13
|
+
/** Lists published documents of a collection, page by page. */
|
|
9
14
|
list<T extends object = OvokCmsDocument>(collection: string, params?: CmsListParams, options?: RequestOptions): PagePromise<T>;
|
|
15
|
+
/** Reads one published document of a collection by slug. */
|
|
10
16
|
retrieve<T extends object = OvokCmsDocument>(collection: string, slug: string, params?: CmsReadParams, options?: RequestOptions): Promise<T>;
|
|
11
17
|
}
|
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CmsDocumentsResource = void 0;
|
|
4
4
|
const payload_pages_1 = require("./payload-pages");
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Published documents of any collection, merged with the shared tenant's.
|
|
7
|
+
*
|
|
8
|
+
* @category cms
|
|
9
|
+
*/
|
|
6
10
|
class CmsDocumentsResource {
|
|
7
11
|
constructor(delivery) {
|
|
8
12
|
this.delivery = delivery;
|
|
9
13
|
}
|
|
14
|
+
/** Lists published documents of a collection, page by page. */
|
|
10
15
|
list(collection, params = {}, options) {
|
|
11
16
|
return (0, payload_pages_1.payloadPages)((page) => this.delivery.listPage(collection, { ...params, page }, options), params.page);
|
|
12
17
|
}
|
|
18
|
+
/** Reads one published document of a collection by slug. */
|
|
13
19
|
retrieve(collection, slug, params = {}, options) {
|
|
14
20
|
return this.delivery.retrieve(collection, slug, params, options);
|
|
15
21
|
}
|
|
@@ -4,8 +4,15 @@ import { RequestOptions } from "../../http/transmit";
|
|
|
4
4
|
import { CmsReadParams } from "./cms-delivery";
|
|
5
5
|
import { CmsDocumentsResource } from "./cms-documents-resource";
|
|
6
6
|
import { ReleaseNotesResource } from "./release-notes-resource";
|
|
7
|
+
/**
|
|
8
|
+
* Published CMS content: documents, legal pages, release notes and translations. Calls routes under `v1/public/cms`.
|
|
9
|
+
*
|
|
10
|
+
* @category cms
|
|
11
|
+
*/
|
|
7
12
|
export declare class CmsResource {
|
|
13
|
+
/** Reads documents from any collection. */
|
|
8
14
|
readonly documents: CmsDocumentsResource;
|
|
15
|
+
/** Reads release notes. */
|
|
9
16
|
readonly releaseNotes: ReleaseNotesResource;
|
|
10
17
|
private readonly delivery;
|
|
11
18
|
constructor(http: HttpClient, tenantCode: string);
|
|
@@ -10,6 +10,11 @@ const TRANSLATIONS = "translations";
|
|
|
10
10
|
const FIRST_PAGE = 1;
|
|
11
11
|
const LARGEST_PAGE_SIZE = 50;
|
|
12
12
|
const MAX_TRANSLATION_PAGES = 20;
|
|
13
|
+
/**
|
|
14
|
+
* Published CMS content: documents, legal pages, release notes and translations. Calls routes under `v1/public/cms`.
|
|
15
|
+
*
|
|
16
|
+
* @category cms
|
|
17
|
+
*/
|
|
13
18
|
class CmsResource {
|
|
14
19
|
constructor(http, tenantCode) {
|
|
15
20
|
this.delivery = new cms_delivery_1.CmsDelivery(http, tenantCode);
|
|
@@ -3,8 +3,14 @@ import { RequestOptions } from "../../http/transmit";
|
|
|
3
3
|
import { PagePromise } from "../../paging/page";
|
|
4
4
|
import { CmsListParams } from "./cms-delivery";
|
|
5
5
|
import { CmsDocumentsResource } from "./cms-documents-resource";
|
|
6
|
+
/**
|
|
7
|
+
* Published release notes.
|
|
8
|
+
*
|
|
9
|
+
* @category cms
|
|
10
|
+
*/
|
|
6
11
|
export declare class ReleaseNotesResource {
|
|
7
12
|
private readonly documents;
|
|
8
13
|
constructor(documents: CmsDocumentsResource);
|
|
14
|
+
/** Lists release notes, newest first unless `sort` says otherwise. */
|
|
9
15
|
list(params?: CmsListParams, options?: RequestOptions): PagePromise<OvokCmsDocument>;
|
|
10
16
|
}
|
|
@@ -3,10 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReleaseNotesResource = void 0;
|
|
4
4
|
const RELEASE_NOTES = "release-notes";
|
|
5
5
|
const NEWEST_FIRST = "-publishedAt";
|
|
6
|
+
/**
|
|
7
|
+
* Published release notes.
|
|
8
|
+
*
|
|
9
|
+
* @category cms
|
|
10
|
+
*/
|
|
6
11
|
class ReleaseNotesResource {
|
|
7
12
|
constructor(documents) {
|
|
8
13
|
this.documents = documents;
|
|
9
14
|
}
|
|
15
|
+
/** Lists release notes, newest first unless `sort` says otherwise. */
|
|
10
16
|
list(params = {}, options) {
|
|
11
17
|
var _a;
|
|
12
18
|
return this.documents.list(RELEASE_NOTES, { ...params, sort: (_a = params.sort) !== null && _a !== void 0 ? _a : NEWEST_FIRST }, options);
|
|
@@ -2,22 +2,44 @@ import type { LegalConsentResponse, MedicalConsentResponse } from "../../../clie
|
|
|
2
2
|
import type { OvokConsentSignatureResponse } from "../../../client/experience/types";
|
|
3
3
|
import { HttpClient } from "../../http/http-client";
|
|
4
4
|
import { RequestOptions } from "../../http/transmit";
|
|
5
|
+
/**
|
|
6
|
+
* Terms-and-conditions consent of the signed-in user.
|
|
7
|
+
*
|
|
8
|
+
* @category consent
|
|
9
|
+
*/
|
|
5
10
|
export declare class LegalConsentResource {
|
|
6
11
|
private readonly http;
|
|
7
12
|
constructor(http: HttpClient);
|
|
13
|
+
/** Reads the current legal consent. Calls `GET v1/me/consent/legal`. */
|
|
8
14
|
retrieve(options?: RequestOptions): Promise<LegalConsentResponse>;
|
|
15
|
+
/** Records whether the user accepts legal consent. Calls `POST v1/me/consent/legal`. */
|
|
9
16
|
set(accepted: boolean, options?: RequestOptions): Promise<LegalConsentResponse>;
|
|
10
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Medical-notification consent of the signed-in user.
|
|
20
|
+
*
|
|
21
|
+
* @category consent
|
|
22
|
+
*/
|
|
11
23
|
export declare class MedicalConsentResource {
|
|
12
24
|
private readonly http;
|
|
13
25
|
constructor(http: HttpClient);
|
|
26
|
+
/** Reads the current medical consent. Calls `GET v1/me/consent/medical`. */
|
|
14
27
|
retrieve(options?: RequestOptions): Promise<MedicalConsentResponse>;
|
|
28
|
+
/** Records whether the user accepts medical consent. Calls `POST v1/me/consent/medical`. */
|
|
15
29
|
set(accepted: boolean, options?: RequestOptions): Promise<MedicalConsentResponse>;
|
|
16
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Legal and medical consent, and consent signatures.
|
|
33
|
+
*
|
|
34
|
+
* @category consent
|
|
35
|
+
*/
|
|
17
36
|
export declare class ConsentResource {
|
|
18
37
|
private readonly http;
|
|
38
|
+
/** Terms-and-conditions consent. */
|
|
19
39
|
readonly legal: LegalConsentResource;
|
|
40
|
+
/** Medical-notification consent. */
|
|
20
41
|
readonly medical: MedicalConsentResource;
|
|
21
42
|
constructor(http: HttpClient);
|
|
43
|
+
/** Requests a signature for a consent. Calls `POST consent/signature/{consentId}`. */
|
|
22
44
|
requestSignature(consentId: string, options?: RequestOptions): Promise<OvokConsentSignatureResponse>;
|
|
23
45
|
}
|
|
@@ -4,38 +4,58 @@ exports.ConsentResource = exports.MedicalConsentResource = exports.LegalConsentR
|
|
|
4
4
|
const url_1 = require("../../http/url");
|
|
5
5
|
const LEGAL_CONSENT_PATH = "v1/me/consent/legal";
|
|
6
6
|
const MEDICAL_CONSENT_PATH = "v1/me/consent/medical";
|
|
7
|
+
/**
|
|
8
|
+
* Terms-and-conditions consent of the signed-in user.
|
|
9
|
+
*
|
|
10
|
+
* @category consent
|
|
11
|
+
*/
|
|
7
12
|
class LegalConsentResource {
|
|
8
13
|
constructor(http) {
|
|
9
14
|
this.http = http;
|
|
10
15
|
}
|
|
16
|
+
/** Reads the current legal consent. Calls `GET v1/me/consent/legal`. */
|
|
11
17
|
retrieve(options) {
|
|
12
18
|
return this.http.get(LEGAL_CONSENT_PATH, options);
|
|
13
19
|
}
|
|
20
|
+
/** Records whether the user accepts legal consent. Calls `POST v1/me/consent/legal`. */
|
|
14
21
|
set(accepted, options) {
|
|
15
22
|
const body = { termsAndConditionsConsent: accepted };
|
|
16
23
|
return this.http.post(LEGAL_CONSENT_PATH, body, options);
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
exports.LegalConsentResource = LegalConsentResource;
|
|
27
|
+
/**
|
|
28
|
+
* Medical-notification consent of the signed-in user.
|
|
29
|
+
*
|
|
30
|
+
* @category consent
|
|
31
|
+
*/
|
|
20
32
|
class MedicalConsentResource {
|
|
21
33
|
constructor(http) {
|
|
22
34
|
this.http = http;
|
|
23
35
|
}
|
|
36
|
+
/** Reads the current medical consent. Calls `GET v1/me/consent/medical`. */
|
|
24
37
|
retrieve(options) {
|
|
25
38
|
return this.http.get(MEDICAL_CONSENT_PATH, options);
|
|
26
39
|
}
|
|
40
|
+
/** Records whether the user accepts medical consent. Calls `POST v1/me/consent/medical`. */
|
|
27
41
|
set(accepted, options) {
|
|
28
42
|
const body = { medicalSettingsNotificationsConsent: accepted };
|
|
29
43
|
return this.http.post(MEDICAL_CONSENT_PATH, body, options);
|
|
30
44
|
}
|
|
31
45
|
}
|
|
32
46
|
exports.MedicalConsentResource = MedicalConsentResource;
|
|
47
|
+
/**
|
|
48
|
+
* Legal and medical consent, and consent signatures.
|
|
49
|
+
*
|
|
50
|
+
* @category consent
|
|
51
|
+
*/
|
|
33
52
|
class ConsentResource {
|
|
34
53
|
constructor(http) {
|
|
35
54
|
this.http = http;
|
|
36
55
|
this.legal = new LegalConsentResource(http);
|
|
37
56
|
this.medical = new MedicalConsentResource(http);
|
|
38
57
|
}
|
|
58
|
+
/** Requests a signature for a consent. Calls `POST consent/signature/{consentId}`. */
|
|
39
59
|
requestSignature(consentId, options) {
|
|
40
60
|
return this.http.post(`consent/signature/${(0, url_1.pathSegment)(consentId)}`, undefined, options);
|
|
41
61
|
}
|
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
import type { OvokContent, OvokContentBody, OvokContentQuery, OvokContentSearchResponse, OvokMappedContentSearchResponse } from "../../../client/experience/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Result of copying content from the parent project.
|
|
6
|
+
*
|
|
7
|
+
* @category content
|
|
8
|
+
*/
|
|
4
9
|
export type CopyFromParentResult = {
|
|
10
|
+
/** Whether the copy succeeded. */
|
|
5
11
|
success: boolean;
|
|
6
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Managed content items, grouped by type and language. Calls routes under `cms`.
|
|
15
|
+
*
|
|
16
|
+
* @category content
|
|
17
|
+
*/
|
|
7
18
|
export declare class ContentResource {
|
|
8
19
|
private readonly http;
|
|
9
20
|
constructor(http: HttpClient);
|
|
21
|
+
/** Searches content of a type in a language. Calls `GET cms/{type}/{language}`. */
|
|
10
22
|
search(type: string, language: string, params?: OvokContentQuery, options?: RequestOptions): Promise<OvokContentSearchResponse>;
|
|
23
|
+
/** Reads one content item. Calls `GET cms/{type}/{language}/{key}`. */
|
|
11
24
|
retrieve(type: string, language: string, key: string, options?: RequestOptions): Promise<OvokContent>;
|
|
25
|
+
/** Creates a content item. Calls `POST cms/{type}/{language}`. */
|
|
12
26
|
create(type: string, language: string, body: OvokContentBody, options?: RequestOptions): Promise<OvokContent>;
|
|
27
|
+
/** Replaces a content item. Calls `PUT cms/{type}/{language}/{key}`. */
|
|
13
28
|
update(type: string, language: string, key: string, body: OvokContentBody, options?: RequestOptions): Promise<OvokContent>;
|
|
29
|
+
/** Deletes a content item. Calls `DELETE cms/{type}/{language}/{key}`. */
|
|
14
30
|
delete(type: string, language: string, key: string, options?: RequestOptions): Promise<void>;
|
|
15
31
|
/** Pairs each default-language item with its `language` translation. */
|
|
16
32
|
map(type: string, language: string, params?: OvokContentQuery, options?: RequestOptions): Promise<OvokMappedContentSearchResponse>;
|
|
33
|
+
/** Copies one item from the parent project. Calls `POST cms/{type}/{language}/{key}/copy-from-parent-project`. */
|
|
17
34
|
copyFromParent(type: string, language: string, key: string, options?: RequestOptions): Promise<CopyFromParentResult>;
|
|
35
|
+
/** Copies every item of a type and language from the parent project. Calls `POST cms/{type}/{language}/copy-from-parent-project`. */
|
|
18
36
|
copyAllFromParent(type: string, language: string, options?: RequestOptions): Promise<CopyFromParentResult>;
|
|
19
37
|
}
|
|
@@ -8,22 +8,32 @@ const COPY_FROM_PARENT = "copy-from-parent-project";
|
|
|
8
8
|
const typePath = (type) => `${CONTENT_PATH}/${(0, url_1.pathSegment)(type)}`;
|
|
9
9
|
const languagePath = (type, language) => `${typePath(type)}/${(0, url_1.pathSegment)(language)}`;
|
|
10
10
|
const keyPath = (type, language, key) => `${languagePath(type, language)}/${(0, url_1.pathSegment)(key)}`;
|
|
11
|
+
/**
|
|
12
|
+
* Managed content items, grouped by type and language. Calls routes under `cms`.
|
|
13
|
+
*
|
|
14
|
+
* @category content
|
|
15
|
+
*/
|
|
11
16
|
class ContentResource {
|
|
12
17
|
constructor(http) {
|
|
13
18
|
this.http = http;
|
|
14
19
|
}
|
|
20
|
+
/** Searches content of a type in a language. Calls `GET cms/{type}/{language}`. */
|
|
15
21
|
search(type, language, params = {}, options) {
|
|
16
22
|
return this.http.get(`${languagePath(type, language)}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
17
23
|
}
|
|
24
|
+
/** Reads one content item. Calls `GET cms/{type}/{language}/{key}`. */
|
|
18
25
|
retrieve(type, language, key, options) {
|
|
19
26
|
return this.http.get(keyPath(type, language, key), options);
|
|
20
27
|
}
|
|
28
|
+
/** Creates a content item. Calls `POST cms/{type}/{language}`. */
|
|
21
29
|
create(type, language, body, options) {
|
|
22
30
|
return this.http.post(languagePath(type, language), body, options);
|
|
23
31
|
}
|
|
32
|
+
/** Replaces a content item. Calls `PUT cms/{type}/{language}/{key}`. */
|
|
24
33
|
update(type, language, key, body, options) {
|
|
25
34
|
return this.http.put(keyPath(type, language, key), body, options);
|
|
26
35
|
}
|
|
36
|
+
/** Deletes a content item. Calls `DELETE cms/{type}/{language}/{key}`. */
|
|
27
37
|
delete(type, language, key, options) {
|
|
28
38
|
return this.http.delete(keyPath(type, language, key), options);
|
|
29
39
|
}
|
|
@@ -31,9 +41,11 @@ class ContentResource {
|
|
|
31
41
|
map(type, language, params = {}, options) {
|
|
32
42
|
return this.http.get(`${typePath(type)}/map/${(0, url_1.pathSegment)(language)}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
33
43
|
}
|
|
44
|
+
/** Copies one item from the parent project. Calls `POST cms/{type}/{language}/{key}/copy-from-parent-project`. */
|
|
34
45
|
copyFromParent(type, language, key, options) {
|
|
35
46
|
return this.http.post(`${keyPath(type, language, key)}/${COPY_FROM_PARENT}`, undefined, options);
|
|
36
47
|
}
|
|
48
|
+
/** Copies every item of a type and language from the parent project. Calls `POST cms/{type}/{language}/copy-from-parent-project`. */
|
|
37
49
|
copyAllFromParent(type, language, options) {
|
|
38
50
|
return this.http.post(`${languagePath(type, language)}/${COPY_FROM_PARENT}`, undefined, options);
|
|
39
51
|
}
|
|
@@ -1,22 +1,46 @@
|
|
|
1
1
|
import type { OvokDocumentFile, OvokDocumentMetadataUpdate, OvokDocumentReplacement, OvokDocumentSearchQuery, OvokDocumentSearchResponse, OvokDocumentUploadRequest } from "../../../client/experience/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Optional image resizing for a download URL.
|
|
6
|
+
*
|
|
7
|
+
* @category documents
|
|
8
|
+
*/
|
|
4
9
|
export type DocumentDownloadParams = {
|
|
10
|
+
/** Target width for an image download. */
|
|
5
11
|
width?: string | number;
|
|
12
|
+
/** Target height for an image download. */
|
|
6
13
|
height?: string | number;
|
|
14
|
+
/** How the image fits the target size. */
|
|
7
15
|
fit?: string;
|
|
8
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Confirmation returned after a document is deleted.
|
|
19
|
+
*
|
|
20
|
+
* @category documents
|
|
21
|
+
*/
|
|
9
22
|
export type DeletedDocument = {
|
|
23
|
+
/** Server confirmation message. */
|
|
10
24
|
message: string;
|
|
11
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Uploaded documents and their download URLs. Calls routes under `document`.
|
|
28
|
+
*
|
|
29
|
+
* @category documents
|
|
30
|
+
*/
|
|
12
31
|
export declare class DocumentsResource {
|
|
13
32
|
private readonly http;
|
|
14
33
|
private readonly baseUrl;
|
|
15
34
|
constructor(http: HttpClient, baseUrl: string);
|
|
35
|
+
/** Lists documents. Calls `GET document`. */
|
|
16
36
|
list(params?: OvokDocumentSearchQuery, options?: RequestOptions): Promise<OvokDocumentSearchResponse>;
|
|
37
|
+
/** Registers a document upload. Calls `POST document`. */
|
|
17
38
|
createUpload(body: OvokDocumentUploadRequest, options?: RequestOptions): Promise<OvokDocumentFile>;
|
|
39
|
+
/** Replaces the file of a document. Calls `POST document/{documentId}`. */
|
|
18
40
|
replaceUpload(documentId: string, body: OvokDocumentReplacement, options?: RequestOptions): Promise<OvokDocumentFile>;
|
|
41
|
+
/** Updates a document's metadata. Calls `PATCH document/{documentId}`. */
|
|
19
42
|
updateMetadata(documentId: string, body: OvokDocumentMetadataUpdate, options?: RequestOptions): Promise<OvokDocumentFile>;
|
|
43
|
+
/** Deletes a document. Calls `DELETE document/{documentId}`. */
|
|
20
44
|
delete(documentId: string, options?: RequestOptions): Promise<DeletedDocument>;
|
|
21
45
|
/** The signed-in route: fetched with the bearer, it redirects to a signed download URL. */
|
|
22
46
|
downloadUrl(documentId: string, params?: DocumentDownloadParams): string;
|
|
@@ -6,23 +6,33 @@ const url_1 = require("../../http/url");
|
|
|
6
6
|
const DOCUMENT_PATH = "document";
|
|
7
7
|
const PUBLIC_DOCUMENT_PATH = "document/public";
|
|
8
8
|
const documentPath = (documentId) => `${DOCUMENT_PATH}/${(0, url_1.pathSegment)(documentId)}`;
|
|
9
|
+
/**
|
|
10
|
+
* Uploaded documents and their download URLs. Calls routes under `document`.
|
|
11
|
+
*
|
|
12
|
+
* @category documents
|
|
13
|
+
*/
|
|
9
14
|
class DocumentsResource {
|
|
10
15
|
constructor(http, baseUrl) {
|
|
11
16
|
this.http = http;
|
|
12
17
|
this.baseUrl = baseUrl;
|
|
13
18
|
}
|
|
19
|
+
/** Lists documents. Calls `GET document`. */
|
|
14
20
|
list(params = {}, options) {
|
|
15
21
|
return this.http.get(`${DOCUMENT_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
16
22
|
}
|
|
23
|
+
/** Registers a document upload. Calls `POST document`. */
|
|
17
24
|
createUpload(body, options) {
|
|
18
25
|
return this.http.post(DOCUMENT_PATH, body, options);
|
|
19
26
|
}
|
|
27
|
+
/** Replaces the file of a document. Calls `POST document/{documentId}`. */
|
|
20
28
|
replaceUpload(documentId, body, options) {
|
|
21
29
|
return this.http.post(documentPath(documentId), body, options);
|
|
22
30
|
}
|
|
31
|
+
/** Updates a document's metadata. Calls `PATCH document/{documentId}`. */
|
|
23
32
|
updateMetadata(documentId, body, options) {
|
|
24
33
|
return this.http.patch(documentPath(documentId), body, options);
|
|
25
34
|
}
|
|
35
|
+
/** Deletes a document. Calls `DELETE document/{documentId}`. */
|
|
26
36
|
delete(documentId, options) {
|
|
27
37
|
return this.http.delete(documentPath(documentId), options);
|
|
28
38
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { HttpClient } from "../../http/http-client";
|
|
2
2
|
import { EmailTemplatesResource } from "./email-templates-resource";
|
|
3
|
+
/**
|
|
4
|
+
* Email settings of the project.
|
|
5
|
+
*
|
|
6
|
+
* @category email
|
|
7
|
+
*/
|
|
3
8
|
export declare class EmailResource {
|
|
9
|
+
/** Email templates. */
|
|
4
10
|
readonly templates: EmailTemplatesResource;
|
|
5
11
|
constructor(http: HttpClient);
|
|
6
12
|
}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmailResource = void 0;
|
|
4
4
|
const email_templates_resource_1 = require("./email-templates-resource");
|
|
5
|
+
/**
|
|
6
|
+
* Email settings of the project.
|
|
7
|
+
*
|
|
8
|
+
* @category email
|
|
9
|
+
*/
|
|
5
10
|
class EmailResource {
|
|
6
11
|
constructor(http) {
|
|
7
12
|
this.templates = new email_templates_resource_1.EmailTemplatesResource(http);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { OvokEmailTemplates } from "../../../client/email/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Email templates of the project.
|
|
6
|
+
*
|
|
7
|
+
* @category email
|
|
8
|
+
*/
|
|
4
9
|
export declare class EmailTemplatesResource {
|
|
5
10
|
private readonly http;
|
|
6
11
|
constructor(http: HttpClient);
|
|
12
|
+
/** Lists the email templates. Calls `GET v1/email/templates`. */
|
|
7
13
|
list(options?: RequestOptions): Promise<OvokEmailTemplates>;
|
|
8
14
|
}
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmailTemplatesResource = void 0;
|
|
4
4
|
const EMAIL_TEMPLATES_PATH = "v1/email/templates";
|
|
5
|
+
/**
|
|
6
|
+
* Email templates of the project.
|
|
7
|
+
*
|
|
8
|
+
* @category email
|
|
9
|
+
*/
|
|
5
10
|
class EmailTemplatesResource {
|
|
6
11
|
constructor(http) {
|
|
7
12
|
this.http = http;
|
|
8
13
|
}
|
|
14
|
+
/** Lists the email templates. Calls `GET v1/email/templates`. */
|
|
9
15
|
list(options) {
|
|
10
16
|
return this.http.get(EMAIL_TEMPLATES_PATH, options);
|
|
11
17
|
}
|
|
@@ -3,26 +3,62 @@ import { HttpClient } from "../http/http-client";
|
|
|
3
3
|
import { RequestOptions } from "../http/transmit";
|
|
4
4
|
import { QueryParams } from "../http/url";
|
|
5
5
|
import { PagePromise } from "../paging/page";
|
|
6
|
+
/**
|
|
7
|
+
* One JSON Patch operation.
|
|
8
|
+
*
|
|
9
|
+
* @category fhir
|
|
10
|
+
*/
|
|
6
11
|
export type PatchOperation = {
|
|
12
|
+
/** The JSON Patch operation. */
|
|
7
13
|
op: "add" | "remove" | "replace" | "copy" | "move" | "test";
|
|
14
|
+
/** JSON Pointer to the target location. */
|
|
8
15
|
path: string;
|
|
16
|
+
/** Value to add, replace or test. */
|
|
9
17
|
value?: unknown;
|
|
18
|
+
/** Source location for `copy` and `move`. */
|
|
10
19
|
from?: string;
|
|
11
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Request options plus an optional conditional-create query.
|
|
23
|
+
*
|
|
24
|
+
* @category fhir
|
|
25
|
+
*/
|
|
12
26
|
export type CreateOptions = RequestOptions & {
|
|
27
|
+
/** FHIR search query; the resource is created only when nothing matches it. */
|
|
13
28
|
ifNoneExist?: string;
|
|
14
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Reads and writes FHIR resources through the Ovok API.
|
|
32
|
+
*
|
|
33
|
+
* @category fhir
|
|
34
|
+
*/
|
|
15
35
|
export declare class FhirResource {
|
|
16
36
|
private readonly http;
|
|
17
37
|
constructor(http: HttpClient);
|
|
38
|
+
/** Reads a resource by id. Calls `GET {type}/{id}`. */
|
|
18
39
|
read<K extends ResourceType>(type: K, id: string, options?: RequestOptions): Promise<ExtractResource<K>>;
|
|
40
|
+
/**
|
|
41
|
+
* Searches a resource type; the result pages lazily. Calls `GET {type}?...`.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const page = await ovok.fhir.search("Patient", { family: "Smith" });
|
|
45
|
+
*/
|
|
19
46
|
search<K extends ResourceType>(type: K, params?: QueryParams, options?: RequestOptions): PagePromise<ExtractResource<K>>;
|
|
47
|
+
/** Returns the first match of a search, or null when there is none. */
|
|
20
48
|
searchOne<K extends ResourceType>(type: K, params?: QueryParams, options?: RequestOptions): Promise<ExtractResource<K> | null>;
|
|
21
49
|
/** With `ifNoneExist`, a retry cannot create a duplicate, so the request is safe to repeat. */
|
|
22
50
|
create<T extends Resource>(resource: T, options?: CreateOptions): Promise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Replaces a resource, which must have an `id`. Calls `PUT {type}/{id}`.
|
|
53
|
+
*
|
|
54
|
+
* @throws OvokValidationError when the resource has no `id`.
|
|
55
|
+
*/
|
|
23
56
|
update<T extends Resource>(resource: T, options?: RequestOptions): Promise<T>;
|
|
57
|
+
/** Applies JSON Patch operations to a resource. Calls `PATCH {type}/{id}`. */
|
|
24
58
|
patch<K extends ResourceType>(type: K, id: string, operations: PatchOperation[], options?: RequestOptions): Promise<ExtractResource<K>>;
|
|
59
|
+
/** Deletes a resource. Calls `DELETE {type}/{id}`. */
|
|
25
60
|
delete(type: ResourceType, id: string, options?: RequestOptions): Promise<void>;
|
|
61
|
+
/** Submits a batch or transaction bundle. Calls `POST` on the FHIR base path. */
|
|
26
62
|
batch(bundle: Bundle, options?: RequestOptions): Promise<Bundle>;
|
|
27
63
|
private searchPage;
|
|
28
64
|
}
|