Appearance
hailer.insight
Read insights (reports) and their data.
| Method | Host op | Returns |
|---|---|---|
list() | insight.list | Promise<InsightDoc[]> |
data(insightId, options) | insight.data | Promise<InsightData> |
update(insightId, update) | insight.update | Promise<InsightDoc[]> |
list()
Insights the app can see, projected to { _id, name, publicKey, presets }.
ts
const insights = await hailer.insight.list();- Workspace app — insights in the app's workspace.
- Private app — insights in the user's current workspace.
data(insightId, options)
Run an insight and read its result.
ts
const data = await hailer.insight.data(insightId, {});
const fresh = await hailer.insight.data(insightId, { update: true });The options argument is required. Pass { update: true } to force a recompute. Returns { headers, rows, time } — see InsightData.
update(insightId, update)
ts
const insights = await hailer.insight.update(insightId, { name: 'Renamed' });Takes a partial InsightDoc and returns the updated list.
Related
Insight editor dialogs (create/edit/delete/permission) are opened through hailer.ui.insight. Public (logged-out) insight reads are in hailer.public.insight.