@ovok/core 0.4.49-rc.3 → 0.4.49-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -666
- package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
- package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
- package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
- package/dist/client/auth/errors.d.ts +15 -2
- package/dist/client/auth/errors.js +12 -2
- package/dist/client/auth/methods/appleLogin.d.ts +1 -0
- package/dist/client/auth/methods/appleLogin.js +1 -0
- package/dist/client/auth/methods/changePassword.d.ts +1 -0
- package/dist/client/auth/methods/changePassword.js +1 -0
- package/dist/client/auth/methods/googleLogin.d.ts +1 -0
- package/dist/client/auth/methods/googleLogin.js +1 -0
- package/dist/client/auth/methods/login.d.ts +6 -0
- package/dist/client/auth/methods/login.js +6 -0
- package/dist/client/auth/methods/register.d.ts +5 -0
- package/dist/client/auth/methods/register.js +5 -0
- package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
- package/dist/client/auth/methods/registerPractitioner.js +5 -0
- package/dist/client/auth/methods/reloadSession.d.ts +3 -0
- package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
- package/dist/client/auth/methods/requestDeleteUser.js +4 -5
- package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
- package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
- package/dist/client/auth/session-fetch.d.ts +11 -0
- package/dist/client/auth/types/Account.d.ts +8 -1
- package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
- package/dist/client/auth/types/AppleLoginBody.js +5 -0
- package/dist/client/auth/types/AuthResponse.d.ts +12 -0
- package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
- package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
- package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
- package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
- package/dist/client/auth/types/LoginBody.d.ts +15 -1
- package/dist/client/auth/types/LoginError.d.ts +21 -2
- package/dist/client/auth/types/LoginError.js +8 -2
- package/dist/client/auth/types/LoginResponse.d.ts +8 -1
- package/dist/client/auth/types/RegisterBody.d.ts +12 -0
- package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
- package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
- package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
- package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
- package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
- package/dist/client/auth/types/Session.d.ts +14 -2
- package/dist/client/change-history/methods.d.ts +6 -0
- package/dist/client/change-history/methods.js +6 -0
- package/dist/client/change-history/types.d.ts +82 -0
- package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
- package/dist/client/chat/ai/methods/createAiSession.js +6 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
- package/dist/client/cms/locale.d.ts +12 -2
- package/dist/client/cms/locale.js +9 -2
- package/dist/client/cms/methods.d.ts +6 -2
- package/dist/client/cms/methods.js +7 -3
- package/dist/client/cms/types.d.ts +44 -4
- package/dist/client/consent/methods.d.ts +16 -0
- package/dist/client/consent/methods.js +16 -0
- package/dist/client/consent/types.d.ts +53 -1
- package/dist/client/consent/types.js +10 -1
- package/dist/client/email/methods.d.ts +3 -0
- package/dist/client/email/methods.js +3 -0
- package/dist/client/email/types.d.ts +33 -0
- package/dist/client/errors/field-errors.d.ts +3 -0
- package/dist/client/errors/field-errors.js +3 -0
- package/dist/client/errors/ovok-error-utils.d.ts +6 -0
- package/dist/client/errors/ovok-error-utils.js +6 -0
- package/dist/client/errors/ovok-error.d.ts +36 -4
- package/dist/client/errors/ovok-error.js +15 -4
- package/dist/client/errors/rate-limit-error.d.ts +11 -2
- package/dist/client/errors/rate-limit-error.js +10 -2
- package/dist/client/errors/sign-in-required-error.d.ts +5 -2
- package/dist/client/errors/sign-in-required-error.js +5 -2
- package/dist/client/experience/methods.d.ts +38 -0
- package/dist/client/experience/methods.js +35 -0
- package/dist/client/experience/types.d.ts +316 -0
- package/dist/client/experience/types.js +1 -0
- package/dist/client/invites/methods.d.ts +27 -9
- package/dist/client/invites/methods.js +27 -9
- package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
- package/dist/client/invites/parse-accept-invite-link.js +3 -1
- package/dist/client/invites/types.d.ts +55 -0
- package/dist/client/invites/types.js +12 -0
- package/dist/client/notifications/methods.d.ts +15 -0
- package/dist/client/notifications/methods.js +15 -0
- package/dist/client/notifications/types.d.ts +249 -2
- package/dist/client/observation/bundle-entry-status.d.ts +3 -0
- package/dist/client/observation/bundle-entry-status.js +13 -0
- package/dist/client/observation/fhir-systems.d.ts +7 -0
- package/dist/client/observation/fhir-systems.js +8 -1
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +10 -65
- 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 +72 -12
- 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 +11 -7
- package/dist/client/observation/observation-bundle-utils.js +61 -71
- package/dist/client/observation/observation-coding.d.ts +12 -0
- package/dist/client/observation/observation-coding.js +69 -0
- package/dist/client/observation/observation-groups.d.ts +12 -0
- package/dist/client/observation/observation-groups.js +51 -0
- package/dist/client/observation/reading-group-backfill.d.ts +13 -0
- package/dist/client/observation/reading-group-backfill.js +79 -0
- package/dist/client/observation/reading-group.d.ts +14 -0
- package/dist/client/observation/reading-group.js +85 -0
- package/dist/client/observation/series.d.ts +28 -5
- package/dist/client/observation/series.js +16 -6
- package/dist/client/observation/services/base-observation-service.d.ts +1 -1
- package/dist/client/observation/services/base-observation-service.js +6 -12
- package/dist/client/observation/services/blood-pressure.d.ts +2 -0
- package/dist/client/observation/services/blood-pressure.js +9 -5
- package/dist/client/observation/services/component-observation-services.js +2 -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/ecg-observation-fragments.d.ts +4 -0
- package/dist/client/observation/services/ecg-observation-fragments.js +30 -37
- package/dist/client/observation/services/ecg.d.ts +3 -1
- package/dist/client/observation/services/ecg.js +19 -19
- package/dist/client/observation/services/uric-acid-service.js +2 -13
- package/dist/client/observation/services/urine-analyte-values.d.ts +4 -0
- package/dist/client/observation/services/urine-analyte-values.js +27 -0
- 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 +29 -0
- package/dist/client/observation/types/UrineAnalytes.js +18 -9
- 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/getDeviceObject.js +15 -32
- 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 +23 -8
- 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 +28 -6
- package/dist/client/ovok-client.js +19 -11
- 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 +30 -0
- package/dist/hooks/observation-hooks.js +26 -3
- package/dist/hooks/patient-hooks.d.ts +53 -0
- package/dist/hooks/patient-hooks.js +48 -0
- package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
- package/dist/hooks/patient-sharing-hooks.js +18 -0
- package/dist/hooks/platform-hooks.d.ts +32 -0
- package/dist/hooks/platform-hooks.js +23 -0
- package/dist/hooks/poll-hooks.d.ts +17 -1
- package/dist/hooks/poll-hooks.js +3 -1
- package/dist/hooks/signals-hooks.d.ts +3 -0
- package/dist/hooks/signals-hooks.js +3 -0
- package/dist/hooks/wearables-hooks.d.ts +23 -0
- package/dist/hooks/wearables-hooks.js +21 -0
- package/dist/index.d.ts +1 -965
- package/dist/index.js +1 -71
- package/dist/next/auth/saved-accounts-store.d.ts +10 -0
- package/dist/next/auth/session.d.ts +17 -0
- package/dist/next/auth/user-session.d.ts +5 -0
- package/dist/next/config/ovok-config.d.ts +45 -0
- package/dist/next/errors/ovok-account-error.d.ts +14 -1
- package/dist/next/errors/ovok-account-error.js +8 -1
- package/dist/next/errors/ovok-errors.d.ts +88 -0
- package/dist/next/errors/ovok-errors.js +67 -0
- package/dist/next/http/http-client.d.ts +5 -0
- package/dist/next/http/transmit.d.ts +7 -0
- package/dist/next/http/url.d.ts +10 -0
- package/dist/next/ovok.d.ts +31 -1
- package/dist/next/ovok.js +5 -1
- package/dist/next/paging/page.d.ts +13 -1
- package/dist/next/react/context.d.ts +7 -0
- package/dist/next/react/context.js +7 -0
- package/dist/next/react/index.d.ts +24 -0
- package/dist/next/react/index.js +18 -0
- package/dist/next/react/query-hooks.d.ts +69 -0
- package/dist/next/react/query-hooks.js +31 -0
- package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
- package/dist/next/resources/accounts/accounts-resource.js +6 -0
- package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
- package/dist/next/resources/ai/ai-chat-resource.js +5 -0
- package/dist/next/resources/ai/ai-resource.d.ts +13 -0
- package/dist/next/resources/ai/ai-resource.js +6 -0
- package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
- package/dist/next/resources/ai/chat-messages-resource.js +7 -0
- package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
- package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
- package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
- package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
- package/dist/next/resources/auth/registration.d.ts +18 -1
- package/dist/next/resources/auth/social-login.d.ts +12 -0
- package/dist/next/resources/auth-resource.d.ts +54 -1
- package/dist/next/resources/auth-resource.js +23 -0
- package/dist/next/resources/bots/bots-resource.d.ts +15 -0
- package/dist/next/resources/bots/bots-resource.js +5 -0
- package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
- package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
- package/dist/next/resources/cms/cms-documents-resource.js +7 -1
- package/dist/next/resources/cms/cms-resource.d.ts +7 -0
- package/dist/next/resources/cms/cms-resource.js +5 -0
- package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
- package/dist/next/resources/cms/release-notes-resource.js +6 -0
- package/dist/next/resources/consent/consent-resource.d.ts +22 -0
- package/dist/next/resources/consent/consent-resource.js +20 -0
- package/dist/next/resources/content/content-resource.d.ts +18 -0
- package/dist/next/resources/content/content-resource.js +12 -0
- package/dist/next/resources/documents/documents-resource.d.ts +24 -0
- package/dist/next/resources/documents/documents-resource.js +10 -0
- package/dist/next/resources/email/email-resource.d.ts +6 -0
- package/dist/next/resources/email/email-resource.js +5 -0
- package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
- package/dist/next/resources/email/email-templates-resource.js +6 -0
- package/dist/next/resources/fhir-resource.d.ts +36 -0
- package/dist/next/resources/fhir-resource.js +21 -0
- package/dist/next/resources/health-resource.d.ts +16 -0
- package/dist/next/resources/health-resource.js +5 -0
- package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
- package/dist/next/resources/invites/invite-flow-resource.js +7 -1
- package/dist/next/resources/invites/invites-resource.d.ts +15 -0
- package/dist/next/resources/invites/invites-resource.js +5 -0
- package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
- package/dist/next/resources/localization/i18next-resource.js +6 -0
- package/dist/next/resources/localization/locales-resource.d.ts +7 -0
- package/dist/next/resources/localization/locales-resource.js +7 -0
- package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
- package/dist/next/resources/localization/localizations-resource.js +9 -0
- package/dist/next/resources/measurements/measurements-resource.d.ts +64 -3
- package/dist/next/resources/measurements/measurements-resource.js +45 -6
- package/dist/next/resources/measurements/observation-builder.d.ts +6 -1
- package/dist/next/resources/measurements/observation-builder.js +16 -7
- package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
- package/dist/next/resources/measurements/save-error.js +3 -4
- 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-socket.js +12 -5
- package/dist/next/resources/realtime/realtime-types.d.ts +19 -1
- 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 +52 -13
|
@@ -4,17 +4,33 @@ exports.SavedAccountsResource = void 0;
|
|
|
4
4
|
const ovok_account_error_1 = require("../../errors/ovok-account-error");
|
|
5
5
|
const ovok_errors_1 = require("../../errors/ovok-errors");
|
|
6
6
|
const CURRENT_SESSION_PATH = "auth/session/current";
|
|
7
|
+
/**
|
|
8
|
+
* Accounts saved on this device, for switching between them.
|
|
9
|
+
*
|
|
10
|
+
* @category session
|
|
11
|
+
*/
|
|
7
12
|
class SavedAccountsResource {
|
|
8
13
|
constructor(http, session) {
|
|
9
14
|
this.http = http;
|
|
10
15
|
this.session = session;
|
|
11
16
|
}
|
|
17
|
+
/** Lists the saved accounts, marking the active one. */
|
|
12
18
|
list() {
|
|
13
19
|
return this.userSession().listSavedAccounts();
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Makes a saved account the active session.
|
|
23
|
+
*
|
|
24
|
+
* @throws OvokAccountError when the account is missing or its session has expired.
|
|
25
|
+
*/
|
|
15
26
|
switch(accountId) {
|
|
16
27
|
return this.userSession().switchSavedAccount(accountId);
|
|
17
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Signs a saved account out and removes it. Calls `DELETE auth/session/current` for that account unless it has expired.
|
|
31
|
+
*
|
|
32
|
+
* @throws OvokAccountError when the account is not saved.
|
|
33
|
+
*/
|
|
18
34
|
async remove(accountId, options) {
|
|
19
35
|
const session = this.userSession();
|
|
20
36
|
const account = await session.getSavedAccount(accountId);
|
|
@@ -2,11 +2,19 @@ import type { Session } from "../../auth/session";
|
|
|
2
2
|
import type { SessionChangeListener, UserSession } from "../../auth/user-session";
|
|
3
3
|
import { HttpClient } from "../../http/http-client";
|
|
4
4
|
import { SavedAccountsResource } from "./saved-accounts-resource";
|
|
5
|
+
/**
|
|
6
|
+
* The current user session and the accounts saved on this device.
|
|
7
|
+
*
|
|
8
|
+
* @category session
|
|
9
|
+
*/
|
|
5
10
|
export declare class SessionResource {
|
|
6
11
|
private readonly session;
|
|
12
|
+
/** Accounts saved on this device. */
|
|
7
13
|
readonly savedAccounts: SavedAccountsResource;
|
|
8
14
|
constructor(http: HttpClient, session: UserSession | null);
|
|
15
|
+
/** Calls `listener` whenever the session starts, changes or ends; returns a function that stops listening. */
|
|
9
16
|
onChange(listener: SessionChangeListener): () => void;
|
|
17
|
+
/** Returns the current session, or null when signed out. */
|
|
10
18
|
current(): Promise<Session | null>;
|
|
11
19
|
}
|
|
12
20
|
export type { Session };
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SessionResource = void 0;
|
|
4
4
|
const saved_accounts_resource_1 = require("./saved-accounts-resource");
|
|
5
|
+
/**
|
|
6
|
+
* The current user session and the accounts saved on this device.
|
|
7
|
+
*
|
|
8
|
+
* @category session
|
|
9
|
+
*/
|
|
5
10
|
class SessionResource {
|
|
6
11
|
constructor(http, session) {
|
|
7
12
|
this.session = session;
|
|
8
13
|
this.savedAccounts = new saved_accounts_resource_1.SavedAccountsResource(http, session);
|
|
9
14
|
}
|
|
15
|
+
/** Calls `listener` whenever the session starts, changes or ends; returns a function that stops listening. */
|
|
10
16
|
onChange(listener) {
|
|
11
17
|
var _a, _b;
|
|
12
18
|
return (_b = (_a = this.session) === null || _a === void 0 ? void 0 : _a.onChange(listener)) !== null && _b !== void 0 ? _b : (() => undefined);
|
|
13
19
|
}
|
|
20
|
+
/** Returns the current session, or null when signed out. */
|
|
14
21
|
current() {
|
|
15
22
|
var _a, _b;
|
|
16
23
|
return (_b = (_a = this.session) === null || _a === void 0 ? void 0 : _a.current()) !== null && _b !== void 0 ? _b : Promise.resolve(null);
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { CreatePatientSharingInvite, PatientSharingInvite, PatientSharingShare, RedeemPatientSharingInvite } from "../../../client/patient-sharing/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Invites to share a patient's records.
|
|
6
|
+
*
|
|
7
|
+
* @category sharing
|
|
8
|
+
*/
|
|
4
9
|
export declare class SharingInvitesResource {
|
|
5
10
|
private readonly http;
|
|
6
11
|
constructor(http: HttpClient);
|
|
12
|
+
/** Creates a sharing invite. Calls `POST v1/patient-sharing/invites`. */
|
|
7
13
|
create(body: CreatePatientSharingInvite, options?: RequestOptions): Promise<PatientSharingInvite>;
|
|
14
|
+
/** Redeems a sharing invite. Calls `POST v1/patient-sharing/invites/redeem`. */
|
|
8
15
|
redeem(body: RedeemPatientSharingInvite, options?: RequestOptions): Promise<PatientSharingShare>;
|
|
9
16
|
}
|
|
@@ -3,13 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SharingInvitesResource = void 0;
|
|
4
4
|
const INVITES_PATH = "v1/patient-sharing/invites";
|
|
5
5
|
const REDEEM_PATH = `${INVITES_PATH}/redeem`;
|
|
6
|
+
/**
|
|
7
|
+
* Invites to share a patient's records.
|
|
8
|
+
*
|
|
9
|
+
* @category sharing
|
|
10
|
+
*/
|
|
6
11
|
class SharingInvitesResource {
|
|
7
12
|
constructor(http) {
|
|
8
13
|
this.http = http;
|
|
9
14
|
}
|
|
15
|
+
/** Creates a sharing invite. Calls `POST v1/patient-sharing/invites`. */
|
|
10
16
|
create(body, options) {
|
|
11
17
|
return this.http.post(INVITES_PATH, body, options);
|
|
12
18
|
}
|
|
19
|
+
/** Redeems a sharing invite. Calls `POST v1/patient-sharing/invites/redeem`. */
|
|
13
20
|
redeem(body, options) {
|
|
14
21
|
return this.http.post(REDEEM_PATH, body, options);
|
|
15
22
|
}
|
|
@@ -2,9 +2,17 @@ import { HttpClient } from "../../http/http-client";
|
|
|
2
2
|
import { SharingInvitesResource } from "./sharing-invites-resource";
|
|
3
3
|
import { SharingSettingsResource } from "./sharing-settings-resource";
|
|
4
4
|
import { SharingSharesResource } from "./sharing-shares-resource";
|
|
5
|
+
/**
|
|
6
|
+
* Record sharing: invites, shares and sharing settings.
|
|
7
|
+
*
|
|
8
|
+
* @category sharing
|
|
9
|
+
*/
|
|
5
10
|
export declare class SharingResource {
|
|
11
|
+
/** Sharing invites. */
|
|
6
12
|
readonly invites: SharingInvitesResource;
|
|
13
|
+
/** Active shares. */
|
|
7
14
|
readonly shares: SharingSharesResource;
|
|
15
|
+
/** Sharing settings. */
|
|
8
16
|
readonly settings: SharingSettingsResource;
|
|
9
17
|
constructor(http: HttpClient);
|
|
10
18
|
}
|
|
@@ -4,6 +4,11 @@ exports.SharingResource = void 0;
|
|
|
4
4
|
const sharing_invites_resource_1 = require("./sharing-invites-resource");
|
|
5
5
|
const sharing_settings_resource_1 = require("./sharing-settings-resource");
|
|
6
6
|
const sharing_shares_resource_1 = require("./sharing-shares-resource");
|
|
7
|
+
/**
|
|
8
|
+
* Record sharing: invites, shares and sharing settings.
|
|
9
|
+
*
|
|
10
|
+
* @category sharing
|
|
11
|
+
*/
|
|
7
12
|
class SharingResource {
|
|
8
13
|
constructor(http) {
|
|
9
14
|
this.invites = new sharing_invites_resource_1.SharingInvitesResource(http);
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { PatientSharingSettings, PatientSharingSettingsUpdate } from "../../../client/patient-sharing/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Patient sharing settings.
|
|
6
|
+
*
|
|
7
|
+
* @category sharing
|
|
8
|
+
*/
|
|
4
9
|
export declare class SharingSettingsResource {
|
|
5
10
|
private readonly http;
|
|
6
11
|
constructor(http: HttpClient);
|
|
12
|
+
/** Reads the sharing settings. Calls `GET v1/patient-sharing/settings`. */
|
|
7
13
|
retrieve(options?: RequestOptions): Promise<PatientSharingSettings>;
|
|
14
|
+
/** Replaces the sharing settings. Calls `PUT v1/patient-sharing/settings`. */
|
|
8
15
|
update(settings: PatientSharingSettingsUpdate, options?: RequestOptions): Promise<PatientSharingSettings>;
|
|
9
16
|
}
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SharingSettingsResource = void 0;
|
|
4
4
|
const SETTINGS_PATH = "v1/patient-sharing/settings";
|
|
5
|
+
/**
|
|
6
|
+
* Patient sharing settings.
|
|
7
|
+
*
|
|
8
|
+
* @category sharing
|
|
9
|
+
*/
|
|
5
10
|
class SharingSettingsResource {
|
|
6
11
|
constructor(http) {
|
|
7
12
|
this.http = http;
|
|
8
13
|
}
|
|
14
|
+
/** Reads the sharing settings. Calls `GET v1/patient-sharing/settings`. */
|
|
9
15
|
retrieve(options) {
|
|
10
16
|
return this.http.get(SETTINGS_PATH, options);
|
|
11
17
|
}
|
|
18
|
+
/** Replaces the sharing settings. Calls `PUT v1/patient-sharing/settings`. */
|
|
12
19
|
update(settings, options) {
|
|
13
20
|
return this.http.put(SETTINGS_PATH, settings, options);
|
|
14
21
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { PatientSharingShares } from "../../../client/patient-sharing/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Patient data shares the signed-in user gave and received.
|
|
6
|
+
*
|
|
7
|
+
* @category sharing
|
|
8
|
+
*/
|
|
4
9
|
export declare class SharingSharesResource {
|
|
5
10
|
private readonly http;
|
|
6
11
|
constructor(http: HttpClient);
|
|
12
|
+
/** Lists shares, given and received. Calls `GET v1/patient-sharing/shares`. */
|
|
7
13
|
list(options?: RequestOptions): Promise<PatientSharingShares>;
|
|
14
|
+
/** Revokes a share. Calls `DELETE v1/patient-sharing/shares/{consentId}`. */
|
|
8
15
|
revoke(consentId: string, options?: RequestOptions): Promise<void>;
|
|
9
16
|
}
|
|
@@ -13,13 +13,20 @@ const withEveryGroup = (shares) => {
|
|
|
13
13
|
received: (_c = shares.received) !== null && _c !== void 0 ? _c : [],
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Patient data shares the signed-in user gave and received.
|
|
18
|
+
*
|
|
19
|
+
* @category sharing
|
|
20
|
+
*/
|
|
16
21
|
class SharingSharesResource {
|
|
17
22
|
constructor(http) {
|
|
18
23
|
this.http = http;
|
|
19
24
|
}
|
|
25
|
+
/** Lists shares, given and received. Calls `GET v1/patient-sharing/shares`. */
|
|
20
26
|
async list(options) {
|
|
21
27
|
return withEveryGroup(await this.http.get(SHARES_PATH, options));
|
|
22
28
|
}
|
|
29
|
+
/** Revokes a share. Calls `DELETE v1/patient-sharing/shares/{consentId}`. */
|
|
23
30
|
revoke(consentId, options) {
|
|
24
31
|
return this.http.delete(`${SHARES_PATH}/${(0, url_1.pathSegment)(consentId)}`, options);
|
|
25
32
|
}
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import { HttpClient, HttpMethod } from "../../http/http-client";
|
|
2
2
|
import { RequestOptions } from "../../http/transmit";
|
|
3
3
|
import { QueryParams } from "../../http/url";
|
|
4
|
+
/**
|
|
5
|
+
* A request to forward to the Signals API.
|
|
6
|
+
*
|
|
7
|
+
* @category signals
|
|
8
|
+
*/
|
|
4
9
|
export type SignalsGatewayRequest = {
|
|
10
|
+
/** HTTP method. */
|
|
5
11
|
method: HttpMethod;
|
|
12
|
+
/** Path segments after `v1/signals/api`; each must be non-empty and free of slashes and control characters. */
|
|
6
13
|
path: readonly string[];
|
|
14
|
+
/** Query parameters. */
|
|
7
15
|
query?: QueryParams;
|
|
16
|
+
/** JSON request body. */
|
|
8
17
|
body?: unknown;
|
|
9
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Gateway to the Signals API.
|
|
21
|
+
*
|
|
22
|
+
* @category signals
|
|
23
|
+
*/
|
|
10
24
|
export declare class SignalsGatewayResource {
|
|
11
25
|
private readonly http;
|
|
12
26
|
constructor(http: HttpClient);
|
|
27
|
+
/** Forwards a request to `v1/signals/api/{path}`. */
|
|
13
28
|
request<T = unknown>(request: SignalsGatewayRequest, options?: RequestOptions): Promise<T>;
|
|
14
29
|
}
|
|
@@ -6,10 +6,16 @@ const url_1 = require("../../http/url");
|
|
|
6
6
|
const GATEWAY_PATH = "v1/signals/api";
|
|
7
7
|
const CONTROL_CHARACTER_RANGE_END = 0x1f;
|
|
8
8
|
const DELETE_CHARACTER_CODE = 0x7f;
|
|
9
|
+
/**
|
|
10
|
+
* Gateway to the Signals API.
|
|
11
|
+
*
|
|
12
|
+
* @category signals
|
|
13
|
+
*/
|
|
9
14
|
class SignalsGatewayResource {
|
|
10
15
|
constructor(http) {
|
|
11
16
|
this.http = http;
|
|
12
17
|
}
|
|
18
|
+
/** Forwards a request to `v1/signals/api/{path}`. */
|
|
13
19
|
request(request, options) {
|
|
14
20
|
var _a;
|
|
15
21
|
const path = pathFor(request.path);
|
|
@@ -3,9 +3,16 @@ import { HttpClient } from "../../http/http-client";
|
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
4
|
import { SignalsGatewayResource } from "./signals-gateway-resource";
|
|
5
5
|
import { UndeliverableResource } from "./undeliverable-resource";
|
|
6
|
+
/**
|
|
7
|
+
* Access to Signals: forwarded API calls and delivery repair.
|
|
8
|
+
*
|
|
9
|
+
* @category signals
|
|
10
|
+
*/
|
|
6
11
|
export declare class SignalsResource {
|
|
7
12
|
private readonly http;
|
|
13
|
+
/** Sends requests to the Signals API through Ovok. */
|
|
8
14
|
readonly gateway: SignalsGatewayResource;
|
|
15
|
+
/** Residents whose limits could not be delivered to Signals. */
|
|
9
16
|
readonly undeliverable: UndeliverableResource;
|
|
10
17
|
constructor(http: HttpClient);
|
|
11
18
|
/** Idempotent: retry after 409 or 503. Readings saved through Ovok reach Signals without a second submit. */
|
|
@@ -5,6 +5,11 @@ const url_1 = require("../../http/url");
|
|
|
5
5
|
const signals_gateway_resource_1 = require("./signals-gateway-resource");
|
|
6
6
|
const undeliverable_resource_1 = require("./undeliverable-resource");
|
|
7
7
|
const enableSignalsPath = (patientId) => `fhir/Patient/${(0, url_1.pathSegment)(patientId)}/$enable-signals`;
|
|
8
|
+
/**
|
|
9
|
+
* Access to Signals: forwarded API calls and delivery repair.
|
|
10
|
+
*
|
|
11
|
+
* @category signals
|
|
12
|
+
*/
|
|
8
13
|
class SignalsResource {
|
|
9
14
|
constructor(http) {
|
|
10
15
|
this.http = http;
|
|
@@ -1,25 +1,60 @@
|
|
|
1
1
|
import { HttpClient } from "../../http/http-client";
|
|
2
2
|
import { RequestOptions } from "../../http/transmit";
|
|
3
|
+
/**
|
|
4
|
+
* A resident whose limits could not be delivered to Signals.
|
|
5
|
+
*
|
|
6
|
+
* @category signals
|
|
7
|
+
*/
|
|
3
8
|
export type SignalsUndeliverableResident = {
|
|
9
|
+
/** Patient id of the resident. */
|
|
4
10
|
patientId: string;
|
|
5
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Residents whose limits could not be delivered to Signals.
|
|
14
|
+
*
|
|
15
|
+
* @category signals
|
|
16
|
+
*/
|
|
6
17
|
export type SignalsUndeliverable = {
|
|
18
|
+
/** Number of residents. */
|
|
7
19
|
count: number;
|
|
20
|
+
/** The affected residents. */
|
|
8
21
|
residents: SignalsUndeliverableResident[];
|
|
9
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Request body for repairing delivery.
|
|
25
|
+
*
|
|
26
|
+
* @category signals
|
|
27
|
+
*/
|
|
10
28
|
export type SignalsDeliveryRepair = {
|
|
29
|
+
/** Only repair these patients; omit to repair all listed residents. */
|
|
11
30
|
patientIds?: string[];
|
|
12
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Outcome of a repair run.
|
|
34
|
+
*
|
|
35
|
+
* @category signals
|
|
36
|
+
*/
|
|
13
37
|
export type SignalsDeliveryRepairResult = {
|
|
38
|
+
/** Residents the repair tried. */
|
|
14
39
|
attempted: number;
|
|
40
|
+
/** Residents now delivered. */
|
|
15
41
|
repaired: number;
|
|
42
|
+
/** Residents that still could not be delivered. */
|
|
16
43
|
stillUndeliverable: number;
|
|
44
|
+
/** Residents skipped. */
|
|
17
45
|
skipped: number;
|
|
46
|
+
/** Residents not reached before the run ended. */
|
|
18
47
|
notReached: number;
|
|
19
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Residents whose limits could not be delivered to Signals.
|
|
51
|
+
*
|
|
52
|
+
* @category signals
|
|
53
|
+
*/
|
|
20
54
|
export declare class UndeliverableResource {
|
|
21
55
|
private readonly http;
|
|
22
56
|
constructor(http: HttpClient);
|
|
57
|
+
/** Lists undeliverable residents. Calls `GET signals/config/undeliverable`. */
|
|
23
58
|
list(options?: RequestOptions): Promise<SignalsUndeliverable>;
|
|
24
59
|
/** Without `patientIds`, repairs the residents `list` shows. */
|
|
25
60
|
repair(request?: SignalsDeliveryRepair, options?: RequestOptions): Promise<SignalsDeliveryRepairResult>;
|
|
@@ -3,10 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UndeliverableResource = void 0;
|
|
4
4
|
const UNDELIVERABLE_PATH = "signals/config/undeliverable";
|
|
5
5
|
const REPAIR_PATH = `${UNDELIVERABLE_PATH}/repair`;
|
|
6
|
+
/**
|
|
7
|
+
* Residents whose limits could not be delivered to Signals.
|
|
8
|
+
*
|
|
9
|
+
* @category signals
|
|
10
|
+
*/
|
|
6
11
|
class UndeliverableResource {
|
|
7
12
|
constructor(http) {
|
|
8
13
|
this.http = http;
|
|
9
14
|
}
|
|
15
|
+
/** Lists undeliverable residents. Calls `GET signals/config/undeliverable`. */
|
|
10
16
|
list(options) {
|
|
11
17
|
return this.http.get(UNDELIVERABLE_PATH, options);
|
|
12
18
|
}
|
|
@@ -3,10 +3,17 @@ import type { SlimNotification } from "../../../client/slim/types";
|
|
|
3
3
|
import { HttpClient } from "../../http/http-client";
|
|
4
4
|
import { RequestOptions } from "../../http/transmit";
|
|
5
5
|
import { SlimRecentQuery } from "./slim-queries";
|
|
6
|
+
/**
|
|
7
|
+
* Alarm notifications.
|
|
8
|
+
*
|
|
9
|
+
* @category slim
|
|
10
|
+
*/
|
|
6
11
|
export declare class SlimAlarmsResource {
|
|
7
12
|
private readonly http;
|
|
8
13
|
constructor(http: HttpClient);
|
|
14
|
+
/** Lists alarm notifications. Calls `GET v1/slim/notifications/alarms`. */
|
|
9
15
|
list(params?: SlimAlarmQuery, options?: RequestOptions): Promise<SlimAlarmsPage>;
|
|
16
|
+
/** Reads the recent alarms. Calls `GET v1/slim/notifications/recent/alarms`. */
|
|
10
17
|
recent(params?: SlimRecentQuery, options?: RequestOptions): Promise<SlimRecentAlarms>;
|
|
11
18
|
/** Can take about 12 s; the server makes it safe to repeat, so a 503 is retried. */
|
|
12
19
|
acknowledge(notificationId: string, options?: RequestOptions): Promise<SlimNotification>;
|
|
@@ -6,13 +6,20 @@ const url_1 = require("../../http/url");
|
|
|
6
6
|
const slim_paths_1 = require("./slim-paths");
|
|
7
7
|
const ALARMS_PATH = `${slim_paths_1.NOTIFICATIONS_PATH}/alarms`;
|
|
8
8
|
const RECENT_ALARMS_PATH = `${slim_paths_1.RECENT_NOTIFICATIONS_PATH}/alarms`;
|
|
9
|
+
/**
|
|
10
|
+
* Alarm notifications.
|
|
11
|
+
*
|
|
12
|
+
* @category slim
|
|
13
|
+
*/
|
|
9
14
|
class SlimAlarmsResource {
|
|
10
15
|
constructor(http) {
|
|
11
16
|
this.http = http;
|
|
12
17
|
}
|
|
18
|
+
/** Lists alarm notifications. Calls `GET v1/slim/notifications/alarms`. */
|
|
13
19
|
list(params = {}, options) {
|
|
14
20
|
return this.http.get(`${ALARMS_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
15
21
|
}
|
|
22
|
+
/** Reads the recent alarms. Calls `GET v1/slim/notifications/recent/alarms`. */
|
|
16
23
|
recent(params = {}, options) {
|
|
17
24
|
return this.http.get(`${RECENT_ALARMS_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
18
25
|
}
|
|
@@ -2,8 +2,14 @@ import type { ChangeHistoryQuery, ChangeHistoryRow } from "../../../client/chang
|
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
4
|
import { PagePromise } from "../../paging/page";
|
|
5
|
+
/**
|
|
6
|
+
* Change history of slim records.
|
|
7
|
+
*
|
|
8
|
+
* @category slim
|
|
9
|
+
*/
|
|
5
10
|
export declare class SlimChangeHistoryResource {
|
|
6
11
|
private readonly http;
|
|
7
12
|
constructor(http: HttpClient);
|
|
13
|
+
/** Lists change-history rows page by page. Calls `GET v1/slim/change-history`. */
|
|
8
14
|
list(params?: ChangeHistoryQuery, options?: RequestOptions): PagePromise<ChangeHistoryRow>;
|
|
9
15
|
}
|
|
@@ -6,10 +6,16 @@ const numbered_pages_1 = require("../../paging/numbered-pages");
|
|
|
6
6
|
const slim_paths_1 = require("./slim-paths");
|
|
7
7
|
const CHANGE_HISTORY_PATH = `${slim_paths_1.SLIM_PATH}/change-history`;
|
|
8
8
|
const TYPES_LIST_KEY = "types[]";
|
|
9
|
+
/**
|
|
10
|
+
* Change history of slim records.
|
|
11
|
+
*
|
|
12
|
+
* @category slim
|
|
13
|
+
*/
|
|
9
14
|
class SlimChangeHistoryResource {
|
|
10
15
|
constructor(http) {
|
|
11
16
|
this.http = http;
|
|
12
17
|
}
|
|
18
|
+
/** Lists change-history rows page by page. Calls `GET v1/slim/change-history`. */
|
|
13
19
|
list(params = {}, options) {
|
|
14
20
|
return (0, numbered_pages_1.numberedPages)((page) => this.http.get(`${CHANGE_HISTORY_PATH}${changeHistoryQuery({ ...params, page })}`, options), params.page);
|
|
15
21
|
}
|
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
import type { SlimChildProjectInput, SlimProjectRelationshipsV2 } from "../../../client/slim/types";
|
|
2
2
|
import { HttpClient } from "../../http/http-client";
|
|
3
3
|
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
/**
|
|
5
|
+
* Result of creating a child project.
|
|
6
|
+
*
|
|
7
|
+
* @category slim
|
|
8
|
+
*/
|
|
4
9
|
export type SlimChildProjectCreated = {
|
|
10
|
+
/** Id of the new child project. */
|
|
5
11
|
projectId: string;
|
|
12
|
+
/** Always true on success. */
|
|
6
13
|
success: true;
|
|
7
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Result of deleting a child project.
|
|
17
|
+
*
|
|
18
|
+
* @category slim
|
|
19
|
+
*/
|
|
8
20
|
export type SlimChildProjectDeleted = {
|
|
21
|
+
/** Always true on success. */
|
|
9
22
|
success: true;
|
|
10
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Child projects of the current project.
|
|
26
|
+
*
|
|
27
|
+
* @category slim
|
|
28
|
+
*/
|
|
11
29
|
export declare class SlimChildProjectsResource {
|
|
12
30
|
private readonly http;
|
|
13
31
|
constructor(http: HttpClient);
|
|
32
|
+
/** Lists the project's relationships. Calls `GET v2/slim/project/child`. */
|
|
14
33
|
list(options?: RequestOptions): Promise<SlimProjectRelationshipsV2>;
|
|
34
|
+
/** Creates a child project. Calls `POST v1/slim/project/child`. */
|
|
15
35
|
create(body: SlimChildProjectInput, options?: RequestOptions): Promise<SlimChildProjectCreated>;
|
|
36
|
+
/** Deletes a child project. Calls `DELETE v1/slim/project/child/{subProjectId}`. */
|
|
16
37
|
delete(subProjectId: string, options?: RequestOptions): Promise<SlimChildProjectDeleted>;
|
|
17
38
|
}
|
|
@@ -5,16 +5,24 @@ const url_1 = require("../../http/url");
|
|
|
5
5
|
const slim_paths_1 = require("./slim-paths");
|
|
6
6
|
const CHILD_PROJECTS_PATH = `${slim_paths_1.PROJECT_PATH}/child`;
|
|
7
7
|
const CHILD_PROJECTS_V2_PATH = `${slim_paths_1.SLIM_V2_PATH}/project/child`;
|
|
8
|
+
/**
|
|
9
|
+
* Child projects of the current project.
|
|
10
|
+
*
|
|
11
|
+
* @category slim
|
|
12
|
+
*/
|
|
8
13
|
class SlimChildProjectsResource {
|
|
9
14
|
constructor(http) {
|
|
10
15
|
this.http = http;
|
|
11
16
|
}
|
|
17
|
+
/** Lists the project's relationships. Calls `GET v2/slim/project/child`. */
|
|
12
18
|
list(options) {
|
|
13
19
|
return this.http.get(CHILD_PROJECTS_V2_PATH, options);
|
|
14
20
|
}
|
|
21
|
+
/** Creates a child project. Calls `POST v1/slim/project/child`. */
|
|
15
22
|
create(body, options) {
|
|
16
23
|
return this.http.post(CHILD_PROJECTS_PATH, body, options);
|
|
17
24
|
}
|
|
25
|
+
/** Deletes a child project. Calls `DELETE v1/slim/project/child/{subProjectId}`. */
|
|
18
26
|
delete(subProjectId, options) {
|
|
19
27
|
return this.http.delete(`${CHILD_PROJECTS_PATH}/${(0, url_1.pathSegment)(subProjectId)}`, options);
|
|
20
28
|
}
|
|
@@ -3,27 +3,58 @@ import type { UserSession } from "../../auth/user-session";
|
|
|
3
3
|
import { HttpClient } from "../../http/http-client";
|
|
4
4
|
import { RequestOptions } from "../../http/transmit";
|
|
5
5
|
import { PagePromise } from "../../paging/page";
|
|
6
|
+
/**
|
|
7
|
+
* One row of the live device list; the shape is defined by the server.
|
|
8
|
+
*
|
|
9
|
+
* @category slim
|
|
10
|
+
*/
|
|
6
11
|
export type SlimLiveDevice = Record<string, unknown>;
|
|
12
|
+
/**
|
|
13
|
+
* Observation IDs of one device, without the batch ID.
|
|
14
|
+
*
|
|
15
|
+
* @category slim
|
|
16
|
+
*/
|
|
7
17
|
export type SlimDeviceObservationIds = Omit<SlimObservationIds, "batch">;
|
|
18
|
+
/**
|
|
19
|
+
* Observation IDs keyed by device ID.
|
|
20
|
+
*
|
|
21
|
+
* @category slim
|
|
22
|
+
*/
|
|
8
23
|
export type SlimObservationIdsByDevice = Record<string, SlimObservationIds>;
|
|
24
|
+
/**
|
|
25
|
+
* Devices of the project, with live values and telemetry.
|
|
26
|
+
*
|
|
27
|
+
* @category slim
|
|
28
|
+
*/
|
|
9
29
|
export declare class SlimDevicesResource {
|
|
10
30
|
private readonly http;
|
|
11
31
|
private readonly liveReads;
|
|
12
32
|
constructor(http: HttpClient, session?: UserSession | null);
|
|
33
|
+
/** Lists devices. Calls `GET v1/slim/device`. */
|
|
13
34
|
list(params?: SlimDeviceListQuery, options?: RequestOptions): PagePromise<SlimDeviceListItem>;
|
|
35
|
+
/** Reads one device. Calls `GET v1/slim/device/{deviceId}`. */
|
|
14
36
|
retrieve(deviceId: string, options?: RequestOptions): Promise<SlimDevice>;
|
|
15
37
|
/** 409 when another customer holds the serial; 422 when this project already uses it. */
|
|
16
38
|
create(body: SlimCreateDevice, options?: RequestOptions): Promise<SlimDevice>;
|
|
17
39
|
/** Renaming moves the serial: live values return only after a reading under the new serial. */
|
|
18
40
|
update(deviceId: string, body: SlimUpdateDevice, options?: RequestOptions): Promise<SlimDevice>;
|
|
41
|
+
/** Deletes a device. Calls `DELETE v1/slim/device/{deviceId}`. */
|
|
19
42
|
delete(deviceId: string, options?: RequestOptions): Promise<void>;
|
|
43
|
+
/** Assigns a device to a project. Calls `PUT v1/slim/device/assign/project`. */
|
|
20
44
|
assignToProject(body: SlimAssignDevice, options?: RequestOptions): Promise<SlimDevice>;
|
|
45
|
+
/** Lists devices with live values. Calls `GET v1/slim/device/live`; `count` is 1 to 100. */
|
|
21
46
|
live(params?: SlimLiveQuery, options?: RequestOptions): PagePromise<SlimLiveDevice>;
|
|
47
|
+
/** Reads live telemetry keyed by device. Calls `GET v1/slim/device/live/telemetry`; `count` is 1 to 100. */
|
|
22
48
|
liveTelemetry(params?: SlimLiveQuery, options?: RequestOptions): Promise<SlimLiveTelemetry>;
|
|
49
|
+
/** Reads the telemetry of one device. Calls `GET v1/slim/telemetry/{deviceId}`. */
|
|
23
50
|
telemetry(deviceId: string, options?: RequestOptions): Promise<SlimDeviceTelemetry>;
|
|
51
|
+
/** Reads the effective observation IDs of a device. Calls `GET v1/slim/telemetry/{deviceId}/effectiveIds`. */
|
|
24
52
|
effectiveObservationIds(deviceId: string, options?: RequestOptions): Promise<SlimDeviceObservationIds>;
|
|
53
|
+
/** Reads the effective observation IDs of every device. Calls `GET v1/slim/telemetry/effectiveIds`. */
|
|
25
54
|
effectiveObservationIdsByDevice(options?: RequestOptions): Promise<SlimObservationIdsByDevice>;
|
|
55
|
+
/** Reads the last observation IDs of a device. Calls `GET v1/slim/telemetry/{deviceId}/lastIds`. */
|
|
26
56
|
lastObservationIds(deviceId: string, options?: RequestOptions): Promise<SlimObservationIds>;
|
|
57
|
+
/** Reads the last observation IDs of every device. Calls `GET v1/slim/telemetry/lastIds`. */
|
|
27
58
|
lastObservationIdsByDevice(options?: RequestOptions): Promise<SlimObservationIdsByDevice>;
|
|
28
59
|
private readLive;
|
|
29
60
|
}
|
|
@@ -19,15 +19,22 @@ const MAX_LIVE_COUNT = 100;
|
|
|
19
19
|
const LIVE_COUNT_MESSAGE = `count must be an integer from ${MIN_LIVE_COUNT} to ${MAX_LIVE_COUNT}.`;
|
|
20
20
|
const devicePath = (deviceId) => `${DEVICES_PATH}/${(0, url_1.pathSegment)(deviceId)}`;
|
|
21
21
|
const telemetryPath = (deviceId) => `${TELEMETRY_PATH}/${(0, url_1.pathSegment)(deviceId)}`;
|
|
22
|
+
/**
|
|
23
|
+
* Devices of the project, with live values and telemetry.
|
|
24
|
+
*
|
|
25
|
+
* @category slim
|
|
26
|
+
*/
|
|
22
27
|
class SlimDevicesResource {
|
|
23
28
|
constructor(http, session = null) {
|
|
24
29
|
this.http = http;
|
|
25
30
|
this.liveReads = new live_reads_1.LiveReads(http);
|
|
26
31
|
session === null || session === void 0 ? void 0 : session.onChange(() => this.liveReads.clear());
|
|
27
32
|
}
|
|
33
|
+
/** Lists devices. Calls `GET v1/slim/device`. */
|
|
28
34
|
list(params = {}, options) {
|
|
29
35
|
return (0, numbered_pages_1.numberedRoutePages)((path) => this.http.get(path, options), DEVICES_PATH, params);
|
|
30
36
|
}
|
|
37
|
+
/** Reads one device. Calls `GET v1/slim/device/{deviceId}`. */
|
|
31
38
|
retrieve(deviceId, options) {
|
|
32
39
|
return this.http.get(devicePath(deviceId), options);
|
|
33
40
|
}
|
|
@@ -39,30 +46,39 @@ class SlimDevicesResource {
|
|
|
39
46
|
update(deviceId, body, options) {
|
|
40
47
|
return this.http.put(devicePath(deviceId), body, options);
|
|
41
48
|
}
|
|
49
|
+
/** Deletes a device. Calls `DELETE v1/slim/device/{deviceId}`. */
|
|
42
50
|
delete(deviceId, options) {
|
|
43
51
|
return this.http.delete(devicePath(deviceId), options);
|
|
44
52
|
}
|
|
53
|
+
/** Assigns a device to a project. Calls `PUT v1/slim/device/assign/project`. */
|
|
45
54
|
assignToProject(body, options) {
|
|
46
55
|
return this.http.put(ASSIGN_TO_PROJECT_PATH, body, options);
|
|
47
56
|
}
|
|
57
|
+
/** Lists devices with live values. Calls `GET v1/slim/device/live`; `count` is 1 to 100. */
|
|
48
58
|
live(params = {}, options) {
|
|
49
59
|
return (0, numbered_pages_1.numberedRoutePages)((path) => this.readLive(path, params, options), LIVE_PATH, params);
|
|
50
60
|
}
|
|
61
|
+
/** Reads live telemetry keyed by device. Calls `GET v1/slim/device/live/telemetry`; `count` is 1 to 100. */
|
|
51
62
|
liveTelemetry(params = {}, options) {
|
|
52
63
|
return this.readLive(`${LIVE_TELEMETRY_PATH}${(0, query_string_1.toQueryString)(params)}`, params, options);
|
|
53
64
|
}
|
|
65
|
+
/** Reads the telemetry of one device. Calls `GET v1/slim/telemetry/{deviceId}`. */
|
|
54
66
|
telemetry(deviceId, options) {
|
|
55
67
|
return this.liveReads.get(telemetryPath(deviceId), options);
|
|
56
68
|
}
|
|
69
|
+
/** Reads the effective observation IDs of a device. Calls `GET v1/slim/telemetry/{deviceId}/effectiveIds`. */
|
|
57
70
|
effectiveObservationIds(deviceId, options) {
|
|
58
71
|
return this.http.get(`${telemetryPath(deviceId)}/${EFFECTIVE_IDS}`, options);
|
|
59
72
|
}
|
|
73
|
+
/** Reads the effective observation IDs of every device. Calls `GET v1/slim/telemetry/effectiveIds`. */
|
|
60
74
|
effectiveObservationIdsByDevice(options) {
|
|
61
75
|
return this.http.get(`${TELEMETRY_PATH}/${EFFECTIVE_IDS}`, options);
|
|
62
76
|
}
|
|
77
|
+
/** Reads the last observation IDs of a device. Calls `GET v1/slim/telemetry/{deviceId}/lastIds`. */
|
|
63
78
|
lastObservationIds(deviceId, options) {
|
|
64
79
|
return this.http.get(`${telemetryPath(deviceId)}/${LAST_IDS}`, options);
|
|
65
80
|
}
|
|
81
|
+
/** Reads the last observation IDs of every device. Calls `GET v1/slim/telemetry/lastIds`. */
|
|
66
82
|
lastObservationIdsByDevice(options) {
|
|
67
83
|
return this.http.get(`${TELEMETRY_PATH}/${LAST_IDS}`, options);
|
|
68
84
|
}
|