Skip to content

Client

A Client is one enrolled device in one tenant, returned by SealdHealthcare.connect(tenantId) or resolved from an Enrollment. Every other namespace, such as client.objects and client.domains, is a property of it.

lock

lock locks the device key. It ends nothing on the Seald Healthcare Cloud. The next call that needs the key unlocks it again through the unlock adapter.

lock(): void

Returns: Nothing.

Records: Nothing. Not a decision.

on

Subscribes to a ClientEvent. See Events for the full list of events and their fields.

on<E extends ClientEvent['type']>(event: E, handler: (e: Extract<ClientEvent, { type: E }>) => void): Unsubscribe

Parameters

NameTypeDescription
eventone of ClientEvent’s tagsWhich event to subscribe to, such as session or revoked.
handlera function of that event’s fieldsCalled on every occurrence of the event.

Returns: Unsubscribe, a function that stops the subscription. In Swift and Kotlin, an AsyncStream and a Flow you stop by ending the loop or canceling the collector.

Records: Nothing. Not a decision.

Types

Client

interface Client {
readonly tenantId: TenantId;
readonly hostname: string;
readonly recipientId: RecipientId;
readonly person: Person;
readonly card: Card;
readonly locked: boolean;
lock(): void;
session: Sessions;
objects: Objects;
folders: Folders;
domains: Domains;
holds: Holds;
worklist: Worklist;
offline: Offline;
people: People;
policies: Policies;
datasets: Datasets;
backupKey: BackupKey;
recovery: Recovery;
evidence: Evidence;
support: Support;
on<E extends ClientEvent['type']>(event: E, handler: (e: Extract<ClientEvent, { type: E }>) => void): Unsubscribe;
}
FieldTypeDescription
tenantIdTenantIdThe tenant this device is enrolled in.
hostnamestringThe Seald Healthcare Cloud hostname this device enrolled with, such as records.example-health.com.
recipientIdRecipientIdThis device’s own recipient id. Every part of the SDK names this device by it.
personPersonThe person this device is enrolled as.
cardCardThis device’s device certificate (card), signed by the tenant’s identity authority.
lockedbooleanWhether the device key is currently locked.
lock() => voidLocks the device key. See above.
sessionSessionsSign in, resume, sign out. See session.
objectsObjectsOpen, save, create, delete. See objects.
foldersFoldersList and search. See folders.
domainsDomainsShare, unshare, domain owners, sub-domains, the recycle bin. See domains.
holdsHoldsLegal holds. See holds.
worklistWorklistWhat the person’s Seald Healthcare Client shows as theirs to work on. See worklist.
offlineOfflineThe offline lease, drafts, and what the device still waits for (waiting()). See offline.
peoplePeopleDevices, revoke, offboard, roles, groups. See people.
policiesPoliciesThe floor, the overlay’s versions, submit, approve. See policies.
datasetsDatasetsRegistrations, and registering one. See datasets.
backupKeyBackupKeyCreate the backup key, a custodian’s share, the yearly proof, or replace a custodian. See backupKey.
recoveryRecoveryBreak-glass: ask, agree, take part, cancel. See recovery.
evidenceEvidenceExport a pack, resolve refs. See evidence.
supportSupportGrant and end customer operator access. See support.
on(event, handler) => UnsubscribeSubscribes to a ClientEvent. See above and Events.