Skip to main content

UI Controls APIs

The UI Controls APIs (api.uiControls) provide the ability to interact through the user interface.

notify

Displays notification modal window with configurable message, title, and button.

Method

notify(params: NotifyParams): Promise<void>

Parameters

Name

Type

Description

params

NotifyParams

Notification window parameters

Returns

Promise<void> Resolves on close of notification window.

Examples

Example: displays notification window with custom title and button text.

image4.jpg
await api.uiControls.notify({
   title: 'Some title',
   button: 'Continue',
   message: 'Custom title and custom button text'
});

Example: displays notification window without a title and with the default button text.

image2.jpg
await api.uiControls.notify({ 
   message: 'No title and default button' 
});

confirm

Displays a confirmation modal window with configurable message, title, and button text.

Method

confirm(params: UiControlsApiConfirmParams): Promise<boolean>

Parameters

Name

Type

Description

params

UiControlsApiConfirmParams

Confirmation window parameters

Returns

Promise<Boolean> Resolves as true on selection of Ok button. Resolves as false on the selection of Cancel or closing the window with X.

Examples

Example: confirmation window with custom title and buttons.

image9.jpg
await api.uiControls.confirm({
   title: 'Some title',
   okButton: 'Accept',
   cancelButton: 'Decline',
   message: 'Custom title and buttons'
});

Example: confirmation window without a title and with default buttons.

image7.jpg
await api.uiControls.confirm({ 
   message: 'No title and default buttons' 
});