Skip to content

Worklist and events

The worklist lists what waits on the signed-in person. Most flows in the SDK appear in it. Where the tenant grants an offline lease, the offline lease covers the worklist. client.worklist.get() returns the whole list at once. client.on reports each change. Refresh the list, or react to the change directly.

Read the worklist

for (const item of await client.worklist.get()) {
renderItem(item); // switch on item.kind
}

A WorklistItem is one of fourteen kinds. Render each by kind, and route the person to the page that handles it.

kindRenderHandled by
recentThe object and dataset last touched.Open records and files
sharedAn object newly shared with this person, and who shared it.Share
enrollment-requestThe person and how long until it lapses.Approve an enrollment
policy-versionThe submitted version and its author, waiting for approval.Policies
custodian-shareA backup key share this person still needs to collect.Backup key and custodians
proof-overdueA custodian whose yearly share proof is due.Backup key and custodians
ceremonyA break-glass ceremony this person can take part in.Break-glass recovery
pending-versionAn AI agent’s save, waiting for its delegator to accept it, and when it expires.AI agent versions
backfill-waitingA person whose new device still waits for access from other devices.Restore a lost device
member-without-deviceA member of a key domain who has never enrolled a device.People, devices and roles
ownerless-domainA key domain whose last domain owner left without a successor.Break-glass recovery
journal-reviewA device whose offline activity the Seald Healthcare Cloud refused. It waits on an Owner.Work offline
support-grantAn active customer operator grant, and when it ends.Support access
hold-liftA legal hold waiting on a second Owner’s signature.Legal holds

React to events

client.on subscribes to one ClientEvent type at a time and calls your handler on every occurrence.

const unsubscribe = client.on('worklist', () => refresh());

Twelve event types cover everything the SDK can tell you without being asked.

typeFires when
sessionThe session’s SessionState changes.
lockedThe device key was locked, by client.lock() or otherwise.
revokedThis device’s device certificate (card) is no longer active. The SDK has discarded the offline lease and locked the device key.
reachableThe Seald Healthcare Cloud becomes reachable or unreachable.
leaseThe offline lease was granted, renewed, or lost.
worklistAnything in the worklist changed.
enrollment-requestAnother device of this person asked to enroll, or was revoked. The person sees every such request, so one they did not make is noticed.
device-revokedA device’s card was revoked, naming its RecipientId and the RevocationReason.
backfillThis device received access it was waiting for. More objects now open.
rolesThis person’s roles changed.
ceremonyA break-glass ceremony this custodian can take part in was opened.
draftsThe Seald Healthcare Cloud is back and drafts wait to be saved.

What the SDK does for you

  • Keeps the worklist current with the Seald Healthcare Cloud without polling from your side.
  • Raises the matching event the moment anything in it changes.
  • Covers the worklist under the offline lease, where the tenant grants one.

Decisions and errors you may see

worklist.get() and client.on report state. Neither is a decision. Neither has a Decided or SealdHealthcareError of its own. Each item routes to a flow with its own decisions and errors, linked in the table above.

Next