Appearance
hailer.ui
Command the host Hailer frame to open its built-in interface elements. These act on the host UI; they render nothing inside your iframe.
hailer.ui.activity
| Method | Host op | Returns |
|---|---|---|
open(activityId, options?) | ui.activity.open | Promise<void> |
create(processId, options?) | ui.activity.create | Promise<{ _id, name } | null> |
editMultiple(activityIds) | ui.activity.editMultiple | Promise |
ts
await hailer.ui.activity.open(activityId, { tab: 'discussion' });
const created = await hailer.ui.activity.create(workflowId, {
name: 'New ticket',
phaseId,
teamId,
fields: { [fieldId]: 'High' },
});
await hailer.ui.activity.editMultiple([id1, id2]);open accepts a tab from: detail, discussion, files, location, linkedFrom, options.
create opens the create panel prefilled with the options you pass and resolves with the created activity (or null). The host rejects creating into a non-initial phase unless the workflow has a single phase or has unlinked mode enabled. The accepted options are name, phaseId, teamId, fields, and expandIfCollapsed; fields values can be a string, number, or a { start, end } range, and activity-link fields take the linked activity's id as a string.
hailer.ui.discussion
| Method | Host op | Returns |
|---|---|---|
open(discussionId, options?) | ui.discussion.open | Promise<void> |
ts
await hailer.ui.discussion.open(discussionId, { tab: 'files', expandIfCollapsed: true });The host resolves the discussion type and opens the matching panel. Valid tab values depend on the discussion type; a tab that doesn't belong to that type returns an error:
| Discussion type | Valid tabs |
|---|---|
| Private (direct) | discussions, files, location, info |
| Group | discussion, overview, files |
| Activity | detail, participants, discussion, files, linkedFrom, location, options |
hailer.ui.insight
| Method | Host op | Returns |
|---|---|---|
create(workspaceId?) | ui.insight.create | Promise<void> |
edit(insightId) | ui.insight.edit | Promise<void> |
delete(insightId) | ui.insight.delete | Promise<void> |
permission(insightId) | ui.insight.permission | Promise<void> |
ts
hailer.ui.insight.create(workspaceId);
hailer.ui.insight.edit(insightId);
hailer.ui.insight.delete(insightId); // opens a confirm dialog
hailer.ui.insight.permission(insightId);Opens the host's insight (report) editing dialogs. For reading insight data, see hailer.insight.
hailer.ui.workflow.function
| Method | Host op | Returns |
|---|---|---|
edit(workflowId, fieldId) | ui.workflow.function.edit | Promise<void> |
ts
await hailer.ui.workflow.function.edit(workflowId, fieldId);Opens the function-field editor for a calculated field. Both ids are required.
hailer.ui.snackbar
| Method | Host op | Returns |
|---|---|---|
open(text, buttonLabel, duration?) | ui.snackbar.open | Promise<void> |
ts
await hailer.ui.snackbar.open('Saved', 'Undo', 5000);duration is in milliseconds (default 3000).
hailer.ui.files (deprecated)
Deprecated
Use hailer.file.upload instead.
| Method | Host op | Returns |
|---|---|---|
uploadFile(file, filename, options) | ui.file.upload | Promise<string> (file id) |
Forwards to the same upload path as hailer.file.upload.