Skip to content

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

MethodHost opReturns
open(activityId, options?)ui.activity.openPromise<void>
create(processId, options?)ui.activity.createPromise<{ _id, name } | null>
editMultiple(activityIds)ui.activity.editMultiplePromise
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

MethodHost opReturns
open(discussionId, options?)ui.discussion.openPromise<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 typeValid tabs
Private (direct)discussions, files, location, info
Groupdiscussion, overview, files
Activitydetail, participants, discussion, files, linkedFrom, location, options

hailer.ui.insight

MethodHost opReturns
create(workspaceId?)ui.insight.createPromise<void>
edit(insightId)ui.insight.editPromise<void>
delete(insightId)ui.insight.deletePromise<void>
permission(insightId)ui.insight.permissionPromise<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

MethodHost opReturns
edit(workflowId, fieldId)ui.workflow.function.editPromise<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

MethodHost opReturns
open(text, buttonLabel, duration?)ui.snackbar.openPromise<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.

MethodHost opReturns
uploadFile(file, filename, options)ui.file.uploadPromise<string> (file id)

Forwards to the same upload path as hailer.file.upload.

Hailer Developer Documentation