/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { RouteSelector, TurnContext, TurnState } from '@microsoft/agents-hosting'; import { TeamsApplication } from '../teamsApplication'; import { AgentConfigAuth } from '../../agent-config/agentConfigAuth'; import { TaskModuleResponse } from '../../task/taskModuleResponse'; import { TaskModuleTaskInfo } from '../../task/taskModuleTaskInfo'; /** * Manages task modules for Teams applications, handling fetch and submit operations. * @template TState Type extending TurnState to be used by the application */ export declare class TaskModules { private readonly _app; /** * Creates a new TaskModules instance. * @param app The TeamsApplication instance to associate with this TaskModules instance */ constructor(app: TeamsApplication); /** * Handles task module fetch requests, which occur when a task module is initially requested. * @template TData Type of data expected in the task module request * @param verb Identifier for the task module (string, RegExp, or RouteSelector) * @param handler Function to handle the task module fetch request * @returns The TeamsApplication instance for chaining */ fetch = Record>(verb: string | RegExp | RouteSelector | (string | RegExp | RouteSelector)[], handler: (context: TurnContext, state: TState, data: TData) => Promise): TeamsApplication; /** * Handles task module submit requests, which occur when a task module form is submitted. * @template TData Type of data expected in the task module submit request * @param verb Identifier for the task module (string, RegExp, or RouteSelector) * @param handler Function to handle the task module submit request * @returns The TeamsApplication instance for chaining */ submit = Record>(verb: string | RegExp | RouteSelector | (string | RegExp | RouteSelector)[], handler: (context: TurnContext, state: TState, data: TData) => Promise): TeamsApplication; /** * Handles configuration fetch requests for agent configuration in Teams. * @template TData Type of data expected in the configuration fetch request * @param handler Function to handle the configuration fetch request * @returns The TeamsApplication instance for chaining */ configFetch>(handler: (context: TurnContext, state: TState, data: TData) => Promise): TeamsApplication; /** * Handles configuration submit requests for agent configuration in Teams. * @template TData Type of data expected in the configuration submit request * @param handler Function to handle the configuration submit request * @returns The TeamsApplication instance for chaining */ configSubmit>(handler: (context: TurnContext, state: TState, data: TData) => Promise): TeamsApplication; }