tasks module

Type Aliases

startTaskSubmitHandlerFunctionType

Function type that is used to receive the result when a task module is submitted by calling tasks.submitTask(result?: string | object, appIds?: string | string[]): void

Functions

getDefaultSizeIfNotProvided(DialogInfo)

Sets the height and width of the TaskInfo object to the original height and width, if initially specified, otherwise uses the height and width values corresponding to TaskModuleDimension.Small

startTask(DialogInfo, startTaskSubmitHandlerFunctionType)
submitTask(string | object, string | string[])
updateTask(DialogInfo)

Function Details

getDefaultSizeIfNotProvided(DialogInfo)

Sets the height and width of the TaskInfo object to the original height and width, if initially specified, otherwise uses the height and width values corresponding to TaskModuleDimension.Small

function getDefaultSizeIfNotProvided(taskInfo: DialogInfo): TaskInfo

Parameters

taskInfo
DialogInfo

TaskInfo object from which to extract size info, if specified

Returns

TaskInfo with height and width specified

startTask(DialogInfo, startTaskSubmitHandlerFunctionType)

Warning

This API is now deprecated.

As of 2.8.0:

Allows an app to open the task module.

function startTask(taskInfo: DialogInfo, submitHandler?: startTaskSubmitHandlerFunctionType): IAppWindow

Parameters

taskInfo
DialogInfo

An object containing the parameters of the task module

submitHandler
startTaskSubmitHandlerFunctionType

Handler to call when the task module is completed

Returns

submitTask(string | object, string | string[])

Warning

This API is now deprecated.

As of 2.8.0, please use submit instead.

Submit the task module.

function submitTask(result?: string | object, appIds?: string | string[])

Parameters

result

string | object

Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it

appIds

string | string[]

Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.

updateTask(DialogInfo)

Warning

This API is now deprecated.

As of 2.0.0, please use dialog.update.resize(dimensions: DialogSize): void instead.

Update height/width task info properties.

function updateTask(taskInfo: DialogInfo)

Parameters

taskInfo
DialogInfo

An object containing width and height properties