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}for item in try await client.worklist.get() { renderItem(item) // switch on the WorklistItem case}client.worklist.get().forEach { item -> renderItem(item) // when (item) on the WorklistItem subtype}A WorklistItem is one of fourteen kinds. Render each by kind, and route the person to the page that handles it.
kind | Render | Handled by |
|---|---|---|
recent | The object and dataset last touched. | Open records and files |
shared | An object newly shared with this person, and who shared it. | Share |
enrollment-request | The person and how long until it lapses. | Approve an enrollment |
policy-version | The submitted version and its author, waiting for approval. | Policies |
custodian-share | A backup key share this person still needs to collect. | Backup key and custodians |
proof-overdue | A custodian whose yearly share proof is due. | Backup key and custodians |
ceremony | A break-glass ceremony this person can take part in. | Break-glass recovery |
pending-version | An AI agent’s save, waiting for its delegator to accept it, and when it expires. | AI agent versions |
backfill-waiting | A person whose new device still waits for access from other devices. | Restore a lost device |
member-without-device | A member of a key domain who has never enrolled a device. | People, devices and roles |
ownerless-domain | A key domain whose last domain owner left without a successor. | Break-glass recovery |
journal-review | A device whose offline activity the Seald Healthcare Cloud refused. It waits on an Owner. | Work offline |
support-grant | An active customer operator grant, and when it ends. | Support access |
hold-lift | A 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());for await _ in client.on(.worklist) { refresh() }client.on<ClientEvent.Worklist>().collect { refresh() }Twelve event types cover everything the SDK can tell you without being asked.
type | Fires when |
|---|---|
session | The session’s SessionState changes. |
locked | The device key was locked, by client.lock() or otherwise. |
revoked | This device’s device certificate (card) is no longer active. The SDK has discarded the offline lease and locked the device key. |
reachable | The Seald Healthcare Cloud becomes reachable or unreachable. |
lease | The offline lease was granted, renewed, or lost. |
worklist | Anything in the worklist changed. |
enrollment-request | Another 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-revoked | A device’s card was revoked, naming its RecipientId and the RevocationReason. |
backfill | This device received access it was waiting for. More objects now open. |
roles | This person’s roles changed. |
ceremony | A break-glass ceremony this custodian can take part in was opened. |
drafts | The 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
- Work offline for how the worklist behaves under the offline lease.
- Restore a lost device for
backfill-waitingand thebackfillevent. - AI agent versions for
pending-version. - Sessions for the
sessionandlockedevents.