Skip to main content

onListZones

Last updated 23/07/2026

Zone listing handler

This example demonstrates how the

callback retrieves all zones for a project from the host application's persistent storage. Once the zones have been retrieved, they are returned to the widget through the

onResponse
callback.

TypeScript
Zone listing handler
onListZones: (projectKey: string, onResponse: (result: DIQ_Result, zones: Array<DIQ_Zone> | null) => void) => {

// Retrieve all zones for the project
const zones = database.getZones(projectKey);

// Return the zones to the widget
onResponse(
{ success: true },
zones
);

};