Skip to main content

onRevisionGet

Last updated 12/05/2026

Revision retrieval handler

This example demonstrates how the

callback retrieves a revision from an in-memory collection maintained by the host application using the provided revision key. Once the lookup is complete, the result is returned to the widget through the

onResponse
callback.

TypeScript
Revision retrieval handler
onRevisionGet: (revisionKey: string, onResponse: (result: DIQ_Result, revision: DIQ_Revision | null) => void) => {
const revision = revisionStore.find(r => r.key === revisionKey);

if (revision) {
onResponse({ success: true }, revision);
} else {
onResponse({ success: false, error: "Revision not found" }, null);
}
}