import { AgentApplication, RouteHandler, RouteSelector, TurnContext, TurnState } from '@microsoft/agents-hosting'; import { TaskModuleTaskInfo } from './taskModuleTaskInfo'; export interface TaskModuleOptions { taskDataFilter?: string; } /** * Class that exposes Teams task module-related events. * Provides an organized way to handle task module operations in Microsoft Teams. */ export declare class TaskModule { _app: AgentApplication; _options: TaskModuleOptions; /** * Creates a new instance of the TaskModule class. * @param app - The agent application */ constructor(app: AgentApplication, options?: TaskModuleOptions); /** * Handles task module fetch events. These occur when a task module is requested to be displayed. * @param handler - The handler to call when a task module fetch event occurs * @returns this (for method chaining) */ onFetch(handler: RouteHandler): this; /** * Registers a handler to process the submission of a task module. * @remarks * Handlers should respond with another TaskInfo object, message string, or `null` to indicate * the task is completed. * @template TData Optional. Type of the data object being passed to the handler. * @param {string | RegExp | RouteSelector | string[] | RegExp[] | RouteSelector[]} verb - Name of the verb(s) to register the handler for. * @param {(context: TurnContext, state: TState, data: TData) => Promise} handler - Function to call when the handler is triggered. * @returns {Application} The application for chaining purposes. */ submit = Record>(verb: string | RegExp | RouteSelector | (string | RegExp | RouteSelector)[], handler: (context: TurnContext, state: TState, data: TData) => Promise): AgentApplication; /** * Handles specific task module fetch events based on a verb/action. * @param verb - The verb or action identifier to match against in the task module data * @param handler - The handler to call when a matching task module fetch event occurs * @returns this (for method chaining) */ onFetchByVerb(verb: string, handler: RouteHandler): this; /** * Handles specific task module submit events based on a verb/action. * @param verb - The verb or action identifier to match against in the task module data * @param handler - The handler to call when a matching task module submit event occurs * @returns this (for method chaining) */ onSubmitByVerb(verb: string, handler: RouteHandler): this; /** * Handles configuration fetch events. These occur when an agent configuration is requested. * @param handler - The handler to call when a configuration fetch event occurs * @returns this (for method chaining) */ onConfigurationFetch(handler: RouteHandler): this; /** * Handles configuration submit events. These occur when an agent configuration is submitted. * @param handler - The handler to call when a configuration submit event occurs * @returns this (for method chaining) */ onConfigurationSubmit(handler: RouteHandler): this; }