tasks module

Namespace to interact with the task module-specific part of the SDK. * This object is usable only on the content frame.

Functions

startTask(TaskInfo, (err: string, result: string) => void)

Allows an app to open the task module. *

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

Submit the task module.

updateTask(TaskInfo)

Update height/width task info properties.

Function Details

startTask(TaskInfo, (err: string, result: string) => void)

Allows an app to open the task module. *

function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string) => void): IAppWindow

Parameters

taskInfo

@microsoft/teams-js.@microsoft.teams-js.TaskInfo

An object containing the parameters of the task module *

submitHandler

(err: string, result: string) => void

Handler to call when the task module is completed

Returns

@microsoft/teams-js.@microsoft.teams-js.IAppWindow

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

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[]

Helps to validate that the call originates from the same appId as the one that invoked the task module

updateTask(TaskInfo)

Update height/width task info properties.

function updateTask(taskInfo: TaskInfo)

Parameters

taskInfo

@microsoft/teams-js.@microsoft.teams-js.TaskInfo

An object containing width and height properties