OvokClient
No behavioral description is attached to this declaration. The public signature, parameter and return types, and source location below document its published contract.
Kind: Class
Package: @ovok/core
Import
import { OvokClient } from '@ovok/core';
TypeScript shape
See the public members table below for the complete SDK-owned shape.
| Parameter | Type | Details |
|---|---|---|
config | Ovok client configuration (see Configure the client) | The configuration for the client. |
Returns: OvokClient.
Public members
| Member | Type | Details |
|---|---|---|
clientStorage | IClientStorage | undefined | — |
saveMeasurement | (params: GenerateObservationBodyParams): Promise<SaveObservationsResult> | Saves a measurement immediately, or durably queues it when the opt-in queue is enabled. |
getCapabilityStatement | (version?: OvokFhirVersion): Promise<CapabilityStatement> | Reads Ovok's composed FHIR and public-route capability statement. |
getPublicApiEndpoints | (version?: OvokFhirVersion): Promise<OvokPublicApiEndpoint[]> | Returns the non-FHIR public routes published by the backend statement. |
saveObservations | (observations: Observation[]): Promise<SaveObservationsResult> | Saves observations with conditional creates so a retry cannot create a duplicate. |
flushOfflineMeasurementQueue | (options?: OfflineMeasurementFlushOptions): Promise<OfflineMeasurementFlushResult> | Flushes measurements queued while offline. Call this on connectivity/app-resume events. |
getSubscriptionManager | (): SubscriptionManager | Gets the SubscriptionManager for WebSocket subscriptions. |
executeBot | (identifier: string, parameters: Record<string, unknown>): Promise<Record<string, unknown>> | — |
login | (body: LoginBody): Promise<LoginResponse> | — |
register | (body: RegisterBody): Promise<RegisterResponse> | — |
registerPractitioner | (body: RegisterPractitionerBody): Promise<AuthResponse> | — |
refetchProfile | (this: OvokClient): Promise<any> | — |
changePassword | (body: ChangePasswordBody): Promise<ChangePasswordResponse> | — |
requestDeleteUser | (body: RequestDeleteUserBody): Promise<RequestDeleteUserResponse> | Schedules deletion of user account |
googleLogin | (body: GoogleLoginBody): Promise<AuthResponse> | — |
appleLogin | (body: AppleLoginBody): Promise<AuthResponse> | — |
resetPassword | (body: ResetPasswordBody): Promise<OperationOutcome> | — |
setPasswordFromReset | (body: CompletePasswordResetBody): Promise<OperationOutcome> | — |
logout | (this: OvokClient): Promise<void> | Revokes the current server session and always clears the local login. |
getSessions | (this: OvokClient): Promise<OvokSession[]> | Lists the server-side sessions for the current account. |
revokeSessions | (option: SessionRevokeOption): Promise<void> | Revokes the selected server-side session or session group. |
getLatestObservationsByCodes | (params: GetLatestObservationsByCodeParams): Promise<Bundle<Observation>> | — |
generateObservationBodiesByMeasurement | (params: GenerateObservationBodyParams): Promise<Observation[]> | — |
observationCodesForTypes | (types: readonly SupportedType[]): string | — |
observationsToMeasurements | <T extends readonly SupportedType[]>(observations: readonly Observation[], types: T, options?: ObservationsToMeasurementsOptions): Array<Extract<SupportedMeasurement, { measurementTypeKey: T[number]; }>> | Converts FHIR observations back into SDK measurements without patient/app assumptions. |
createQuestionnaireResponseWithObservations | (questionnaireResponse: QuestionnaireResponse, observations: Observation[]): Promise<Bundle> | — |
extractQuestionnaireObservations | (questionnaireResponseId: string): Promise<OvokQuestionnaireOperationResponse> | — |
populateQuestionnaire | (questionnaireId: string, parameters?: Parameters): Promise<OvokQuestionnaireOperationResponse> | — |
submitQuestionnaireResponse | (questionnaireResponse: QuestionnaireResponse, observations?: Observation[]): Promise<Bundle> | — |
createAiSession | (props: CreateAiSessionProps): Promise<CreateAiSessionResponse> | — |
AIFhirResources | (request: AIFhirRequest): Promise<AIFhirResponse> | AI FHIR Search uses LLMs for FHIR query planning and execution. After the LLM generates the FHIR query plan, it's executed against the server to generate the results, and then the results are used to create a summary response. |
listSlimPatients | (params?: SlimPatientListQuery): Promise<SlimPage<SlimPatientListItem>> | — |
getSlimPatient | (patientId: string): Promise<SlimPatient> | — |
getSlimPatientEverything | (patientId: string): Promise<Bundle<Resource>> | — |
getSlimPatientCurrentVitals | (patientId: string): Promise<Record<string, unknown>> | — |
createSlimPatient | (body: SlimCreatePatient): Promise<SlimPatient> | — |
updateSlimPatient | (patientId: string, body: SlimUpdatePatient): Promise<SlimPatient> | — |
deleteSlimPatient | (patientId: string): Promise<void> | — |
listSlimDevices | (params?: SlimDeviceListQuery): Promise<SlimPage<SlimDeviceListItem>> | — |
getSlimDevice | (deviceId: string): Promise<SlimDevice> | — |
createSlimDevice | (body: SlimCreateDevice): Promise<SlimDevice> | — |
updateSlimDevice | (deviceId: string, body: SlimUpdateDevice): Promise<SlimDevice> | — |
deleteSlimDevice | (deviceId: string): Promise<void> | — |
assignSlimDeviceToProject | (body: SlimAssignDevice): Promise<SlimDevice> | — |
listSlimLiveDevices | (params?: SlimLiveQuery): Promise<SlimPage<Record<string, unknown>>> | — |
listSlimLiveTelemetry | (params?: SlimLiveQuery): Promise<SlimLiveTelemetry> | — |
getSlimDeviceSleepStatus | (deviceId: string): Promise<Record<string, unknown>> | — |
getSlimDeviceTelemetry | (deviceId: string): Promise<SlimDeviceTelemetry> | — |
listSlimEffectiveObservationIds | (SlimObservationIds>> | — |
listSlimLastObservationIds | (SlimObservationIds>> | — |
getSlimDeviceEffectiveObservationIds | (deviceId: string): Promise<Omit<SlimObservationIds, "batch">> | — |
getSlimDeviceLastObservationIds | (deviceId: string): Promise<SlimObservationIds> | — |
listSlimNotifications | (params?: SlimNotificationsQuery): Promise<SlimNotificationsResponse> | — |
getRecentSlimNotifications | (count?: number): Promise<SlimRecentNotificationsResponse> | — |
listSlimAlarms | (params?: SlimAlarmQuery): Promise<SlimAlarmsPage> | — |
acknowledgeSlimAlarm | (notificationId: string): Promise<SlimNotification> | — |
getRecentSlimAlarms | (count?: number): Promise<SlimRecentAlarms> | — |
getRecentAlarms | (count?: number): Promise<SlimRecentAlarms> | — |
getRecentSlimOutOfBed | (count?: number): Promise<SlimRecentOutOfBed> | — |
getRecentOutOfBed | (count?: number): Promise<SlimRecentOutOfBed> | — |
listSlimOutOfBedNotifications | (params?: Omit<SlimNotificationsQuery, "type">): Promise<SlimNotificationsResponse> | — |
listSlimMedicalNotifications | (params?: SlimMedicalNotificationsQuery): Promise<SlimMedicalNotificationsPage> | — |
getRecentSlimMedicalNotifications | (count?: number): Promise<SlimRecentNotificationsResponse> | — |
getSlimMedicalNotification | (episodeId: string): Promise<SlimNotification> | — |
acknowledgeSlimMedicalNotification | (episodeId: string): Promise<SlimNotification> | — |
acknowledgeSlimNotification | (notificationId: string): Promise<SlimNotification> | — |
getSlimThreshold | (this: OvokClient): Promise<SlimThreshold> | — |
updateSlimThreshold | (body: { settings: SlimThresholdSettingsUpdateV1; }): Promise<SlimThreshold> | — |
getSlimPatientThreshold | (patientId: string): Promise<Record<string, unknown>> | — |
updateSlimPatientThreshold | (patientId: string, body: { settings: SlimThresholdSettingsUpdateV1; }): Promise<Record<string, unknown>> | — |
getSlimThresholdV2 | (this: OvokClient): Promise<SlimThresholdV2> | — |
updateSlimThresholdV2 | (body: SlimThresholdV2Update): Promise<SlimThresholdV2> | — |
getSlimPatientThresholdV2 | (patientId: string): Promise<SlimPatientThresholdV2> | — |
updateSlimPatientThresholdV2 | (patientId: string, body: SlimThresholdV2Update): Promise<SlimPatientThresholdV2> | — |
getSlimTrends | (params: { patientId: string; startDate: string; endDate: string; graphType: string; }): Promise<SlimTrends> | — |
getSlimSleepStatistics | (params: { endDate: string; lastDayCount?: number; patientId: string; }): Promise<SlimSleepStatistics> | — |
listSlimLocations | (params?: SlimLocationQuery): Promise<SlimPage<SlimLocation>> | — |
getSlimLocation | (locationId: string): Promise<SlimLocation> | — |
createSlimLocation | (body: SlimCreateLocation): Promise<SlimLocation> | — |
updateSlimLocation | (locationId: string, body: SlimUpdateLocation): Promise<SlimLocation> | — |
deleteSlimLocation | (locationId: string): Promise<void> | — |
listSlimZones | (params?: { page?: number; count?: number; sortBy?: string; orderBy?: "ASC" | "DESC"; search?: string; }): Promise<SlimPage<SlimZone>> | — |
getSlimZone | (zoneId: string): Promise<SlimZoneDetail> | — |
getSlimZoneDeviceCounts | (params?: { all?: boolean; effectiveSleepStatus?: string; includeUnassigned?: boolean; includeEmpty?: boolean; }): Promise<Record<string, unknown>> | — |
exportSlimPatientPdf | (body: SlimExportPdfRequest): Promise<SlimExportPdf> | — |
getEmailTemplates | (this: OvokClient): Promise<OvokEmailTemplates> | — |
getCmsDocument | <T extends object = OvokCmsDocument>(this: OvokClient, collection: string, slug: string, options?: OvokCmsOptions): Promise<T> | A published document of a CMS collection by slug, the shared tenant's when the tenant has none of its own. Signed out, it is read only with allowSignedOut and a tenantCode; otherwise it rejects with SignInRequiredError. |
listCmsDocuments | <T extends object = OvokCmsDocument>(this: OvokClient, collection: string, options?: OvokCmsListOptions): Promise<OvokCmsPage<T>> | A page of a CMS collection's published documents, merged with the shared tenant's. Signed out, as getCmsDocument. |
getLegalPage | (slug: string, options?: OvokCmsOptions): Promise<OvokCmsDocument> | A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code. |
listReleaseNotes | (options?: OvokCmsListOptions): Promise<OvokCmsPage> | Release notes, newest first unless sort says otherwise. Needs a session. |
getTranslations | (options?: OvokCmsOptions): Promise<OvokTranslations> | The translations collection as one tree: a group per document slug, and each of its strings rows' value at its key, nested at the dots. Rows without a text, and rows whose path is taken, are left out. Readable before sign-in with a tenant code. Nothing is kept on the device: on native the client's storage is SecureStore, read whole at every launch. |
serializeChangeHistoryQuery | (params?: ChangeHistoryQuery): string | — |
listChangeHistory | (params?: ChangeHistoryQuery): Promise<ChangeHistoryPage> | — |
getLegalConsent | (this: OvokClient): Promise<LegalConsentResponse> | — |
setLegalConsent | (accepted: boolean): Promise<LegalConsentResponse> | — |
getMedicalConsent | (this: OvokClient): Promise<MedicalConsentResponse> | — |
setMedicalConsent | (accepted: boolean): Promise<MedicalConsentResponse> | — |
getAccounts | (this: OvokClient): Promise<OvokAccount[]> | — |
listAdministeredProjects | (params?: { page?: number; count?: number; }): Promise<OvokPage<OvokAdministeredProject>> | — |
createProject | (body: OvokCreateProject): Promise<OvokCreatedProject> | — |
bootstrapProject | (body: OvokCreateProject): Promise<OvokCreatedProject> | — |
getProjectTenantCode | (this: OvokClient): Promise<{ tenantCode: string; }> | — |
listProjectMembers | (params?: { accessPolicyId?: string; profileId?: string; userId?: string; page?: number; count?: number; }): Promise<OvokPage<OvokProjectMember>> | — |
inviteProjectMember | (body: OvokInviteProjectMember): Promise<OvokProjectMemberResponse> | — |
updateProjectMember | (membershipId: string, body: OvokUpdateProjectMember): Promise<OvokProjectMemberResponse> | — |
removeProjectMember | (membershipId: string): Promise<OvokRemoveProjectMemberResponse> | — |
getProjectFeatures | (this: OvokClient): Promise<OvokProjectFeatures> | — |
updateProjectFeatures | (features: OvokProjectFeature[]): Promise<OvokProjectFeatures> | — |
getProjectSettings | (this: OvokClient): Promise<OvokProjectSettings> | — |
updateProjectSetting | (key: OvokProjectSettingKey, enabled: boolean): Promise<OvokProjectSettings> | — |
updateProjectTextSetting | (key: OvokProjectTextSettingKey, value: string | null): Promise<OvokProjectSettings> | — |
getLocales | (this: OvokClient): Promise<OvokLocales> | — |
updateLocales | (locales: OvokLocales): Promise<OvokLocales> | — |
listLocalizations | (language: string, params?: OvokLocalizationQuery): Promise<{ total: number; resources: OvokLocalization[]; }> | — |
getLocalization | (language: string, key: string): Promise<OvokLocalization> | — |
updateLocalization | (language: string, key: string, body: OvokLocalizationUpdate): Promise<OvokLocalization> | — |
deleteLocalization | (language: string, key: string): Promise<void> | — |
getI18nextDocument | (language: string): Promise<OvokI18nDocument> | — |
updateI18nextDocument | (language: string, document: Record<string, OvokI18nValue>): Promise<void> | — |
getPatientLastObservations | (patientId: string, params: { code: string; max?: number; }): Promise<OvokPatientObservations> | — |
requestConsentSignature | (consentId: string): Promise<OvokConsentSignatureResponse> | — |
createDocumentUpload | (body: OvokDocumentUploadRequest): Promise<OvokDocumentFile> | — |
listDocuments | (params?: OvokDocumentSearchQuery): Promise<OvokDocumentSearchResponse> | — |
getDocumentDownloadUrl | (documentId: string, params?: { width?: string | number; height?: string | number; fit?: string; }): Promise<string> | Returns the authenticated document endpoint; navigating/fetching it follows the backend redirect. |
getPublicDocumentDownloadUrl | (token: string, params?: { width?: string | number; height?: string | number; fit?: string; }): Promise<string> | Returns a public document endpoint for use in an image, download, or media element. |
deleteDocument | (documentId: string): Promise<{ message: string; }> | — |
updateDocumentMetadata | (documentId: string, body: OvokDocumentMetadataUpdate): Promise<OvokDocumentFile> | — |
generateDocumentReplacementUpload | (documentId: string, body: OvokDocumentReplacement): Promise<OvokDocumentFile> | — |
searchMappedContent | (type: string, language: string, params?: OvokContentQuery): Promise<OvokMappedContentSearchResponse> | — |
copyContentsFromParent | (type: string, language: string): Promise<{ success: boolean; }> | — |
copyContentFromParent | (type: string, language: string, key: string): Promise<{ success: boolean; }> | — |
createContent | (type: string, language: string, body: OvokContentBody): Promise<OvokContent> | — |
updateContent | (type: string, language: string, key: string, body: OvokContentBody): Promise<OvokContent> | — |
getContent | (type: string, language: string, key: string): Promise<OvokContent> | — |
deleteContent | (type: string, language: string, key: string): Promise<void> | — |
searchContent | (type: string, language: string, params?: OvokContentQuery): Promise<OvokContentSearchResponse> | — |
createVideoCallAppointment | (body: OvokVideoCallAppointmentInput): Promise<OvokVideoCallAppointment> | — |
updateVideoCallAppointment | (appointmentId: string, body: OvokVideoCallAppointmentInput): Promise<OvokVideoCallAppointment> | — |
listVideoCallAppointments | (params?: OvokVideoCallAppointmentQuery): Promise<OvokVideoCallAppointment[]> | — |
getVideoCallAccessPermission | (appointmentId: string): Promise<Record<string, unknown>> | — |
createVideoCallGuestAccess | (appointmentId: string, body: OvokVideoCallGuestAccess): Promise<OvokVideoCallAccess> | — |
createVideoCallUserAccess | (appointmentId: string): Promise<OvokVideoCallAccess> | — |
sendVideoCallInvite | (body: OvokVideoCallMailRequest): Promise<OvokVideoCallMailResponse> | — |
sendVideoCallUpdate | (body: OvokVideoCallMailRequest): Promise<OvokVideoCallMailResponse> | — |
sendVideoCallCancellation | (body: OvokVideoCallMailRequest): Promise<OvokVideoCallMailResponse> | — |
sendVideoCallActiveNotification | (appointmentId: string): Promise<Record<string, unknown>> | — |
translate | (body: OvokTranslationRequest): Promise<OvokTranslationResponse> | — |
createChatSession | (body: OvokCreateChatSession): Promise<OvokChatSession> | — |
sendChatMessage | (sessionId: string, body: OvokChatMessageInput): Promise<OvokChatMessage> | — |
listChatSessions | (params?: OvokChatSessionQuery): Promise<OvokChatSessionsResponse> | — |
getChatSession | (sessionId: string, params?: { messageCount?: number; }): Promise<OvokChatSession> | — |
listChatMessages | (sessionId: string, params?: OvokChatMessageQuery): Promise<OvokChatMessagesResponse> | — |
searchAIFhir | (request: Record<string, unknown>): Promise<Record<string, unknown>> | — |
invitePractitioner | (body: InviteBody): Promise<InviteSent> | — |
invitePatient | (body: InviteBody): Promise<InviteSent> | — |
acceptPractitionerInvite | (body: AcceptInviteBody): Promise<PatientSharingPractitionerShare> | — |
acceptPatientInvite | (body: AcceptInviteBody): Promise<PatientSharingPractitionerShare> | — |
acceptInvite | (body: AcceptInviteBody): Promise<PatientSharingPractitionerShare> | — |
createNotificationNote | (body: CreateNotificationNote): Promise<NotificationNote> | — |
listNotificationNotes | (kind: NotificationTargetKind, id: string): Promise<NotificationNotes> | — |
updateNotificationNote | (noteId: string, body: UpdateNotificationNote): Promise<NotificationNote> | — |
patchNotificationNote | (noteId: string, body: UpdateNotificationNote): Promise<NotificationNote> | — |
deleteNotificationNote | (noteId: string): Promise<void> | — |
getCurrentPatientProfile | (this: OvokClient): Promise<OvokCurrentPatientProfile> | — |
getPatientLatestObservations | (params?: OvokPatientLatestObservationsQuery): Promise<OvokPatientObservationBundle> | — |
getPatientDeviceTelemetry | (deviceId: string): Promise<OvokPatientObservationBundle> | — |
getPatientDeviceTelemetryHistory | (deviceId: string, params?: OvokPatientTelemetryHistoryQuery): Promise<OvokPatientTelemetryHistory> | — |
listPatientAppointments | (params?: OvokPatientSchedulingQuery): Promise<OvokPatientAppointment[]> | — |
getPatientAppointment | (appointmentId: string): Promise<OvokPatientAppointment> | — |
createPatientAppointment | (appointment: OvokPatientAppointment): Promise<OvokPatientAppointment> | — |
updatePatientAppointment | (appointment: OvokPatientAppointment): Promise<OvokPatientAppointment> | — |
listPatientSchedules | (params?: OvokPatientSchedulingQuery): Promise<OvokPatientSchedule[]> | — |
listPatientSlots | (params?: OvokPatientSchedulingQuery): Promise<OvokPatientSlot[]> | — |
listPatientMeasurementHistory | (params?: OvokPatientResourceQuery): Promise<OvokPatientMeasurement[]> | — |
getPatientMeasurement | (measurementId: string): Promise<OvokPatientMeasurement> | — |
listPatientCarePlans | (params?: OvokPatientResourceQuery): Promise<OvokPatientCarePlan[]> | — |
getPatientCarePlan | (carePlanId: string): Promise<OvokPatientCarePlan> | — |
listPatientQuestionnaires | (params?: OvokPatientResourceQuery): Promise<OvokPatientQuestionnaire[]> | — |
getPatientQuestionnaire | (questionnaireId: string): Promise<OvokPatientQuestionnaire> | — |
listPatientQuestionnaireResponses | (params?: OvokPatientResourceQuery): Promise<OvokPatientQuestionnaireResponse[]> | — |
getPatientQuestionnaireResponse | (questionnaireResponseId: string): Promise<OvokPatientQuestionnaireResponse> | — |
listPatientDevices | (params?: OvokPatientResourceQuery): Promise<OvokPatientDevice[]> | — |
getPatientDevice | (deviceId: string): Promise<OvokPatientDevice> | — |
listPatientNotifications | (params?: OvokPatientResourceQuery): Promise<OvokPatientNotification[]> | — |
getPatientNotification | (notificationId: string): Promise<OvokPatientNotification> | — |
getPatientDashboard | (params?: OvokPatientDashboardQuery): Promise<OvokPatientDashboard> | — |
createPatientSharingInvite | (body: CreatePatientSharingInvite): Promise<PatientSharingInvite> | — |
redeemPatientSharingInvite | (body: RedeemPatientSharingInvite): Promise<PatientSharingShare> | — |
listPatientSharing | (this: OvokClient): Promise<PatientSharingShares> | — |
revokePatientSharing | (consentId: string): Promise<void> | — |
getPatientSharingSettings | (this: OvokClient): Promise<PatientSharingSettings> | — |
updatePatientSharingSettings | (settings: PatientSharingSettingsUpdate): Promise<PatientSharingSettings> | — |
enableSignalsForPatient | (patientId: string): Promise<EnableSignalsResponse> | Enables Signals for an existing patient. The operation is idempotent; retry after 409 or 503. Observations saved through Ovok are forwarded by the backend, so callers should not submit the same readings to Signals separately. |
getSignalsThresholds | (patientId: string): Promise<SignalsThresholds> | — |
listUnconfirmedLimits | (this: OvokClient): Promise<UnconfirmedLimits> | — |
repushUnconfirmedLimits | (this: OvokClient): Promise<RepushUnconfirmedLimitsResult> | — |
setSignalsThreshold | (patientId: string, code: string, body: SetSignalsThresholdBody): Promise<SignalsThreshold> | — |
removeSignalsThreshold | (patientId: string, code: string, reason: string): Promise<void> | — |
serializeSignalsAlertsQuery | (query?: SignalsAlertsQuery | SignalsRawAlertsQuery, keys?: readonly string[]): string | — |
listSignalsAlerts | (query?: SignalsAlertsQuery): Promise<SignalsAlertsPage> | — |
getSignalsAlert | (episodeId: string): Promise<SignalsAlert> | — |
acknowledgeSignalsAlert | (episodeId: string): Promise<SignalsAlert> | — |
listSignalsAlertNotes | (episodeId: string): Promise<NotificationNotes> | — |
createSignalsAlertNote | (episodeId: string, body: { text: string; }): Promise<NotificationNote> | — |
listSignalsRawAlertNotes | (alertId: string): Promise<NotificationNotes> | — |
createSignalsRawAlertNote | (alertId: string, body: { text: string; }): Promise<NotificationNote> | — |
updateSignalsNote | (noteId: string, body: UpdateNotificationNote): Promise<NotificationNote> | — |
patchSignalsNote | (noteId: string, body: UpdateNotificationNote): Promise<NotificationNote> | — |
deleteSignalsNote | (noteId: string): Promise<void> | — |
listSignalsRawAlerts | (query?: SignalsRawAlertsQuery): Promise<SignalsRawAlertsPage> | The project's individual Signals alerts, not episodes: works whether or not the project's episodicAlerts is on. acknowledged: false lists what is still open for the practitioner. |
getSignalsRawAlert | (alertId: string): Promise<SignalsRawAlert> | — |
acknowledgeSignalsRawAlert | (alertId: string): Promise<SignalsRawAlert> | Acknowledges one alert: it resolves, and acknowledgedAt and acknowledgedActor record when and by whom. Idempotent: an acknowledged alert keeps its first acknowledgement. Needs signals_alerts:update and update access to the resident. |
getSignalsSettings | (this: OvokClient): Promise<SignalsSettingsResponse> | — |
updateSignalsSettings | (patch: SignalsSettingsPatch, reason?: string | null): Promise<SignalsSettingsResponse> | — |
Learn the workflow
Continue with Client Configuration for the workflow context and examples.