/** * @module teams-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { TaskModuleTaskInfo, TurnContext } from 'botbuilder'; import { Application } from './Application'; import { TurnState } from './TurnState'; export declare enum MessageInvokeNames { FETCH_INVOKE_NAME = "message/fetchTask" } /** * TaskModules class to enable fluent style registration of handlers related to Task Modules. * @template TState Type of the turn state object being persisted. */ export declare class Messages { private readonly _app; /** * Creates a new instance of the TaskModules class. * @param {Application} app Top level application class to register handlers with. */ constructor(app: Application); /** * Registers a handler to process the initial fetch of the task module. * @remarks * Handlers should respond with either an initial TaskInfo object or a string containing * a message to display to the user. * @template TData Optional. Type of the data object being passed to the handler. * @param {(context: TurnContext, state: TState, data: TData) => Promise} handler - Function to call when the handler is triggered. * @param {TurnContext} handler.context - Context for the current turn of conversation with the user. * @param {TState} handler.state - Current state of the turn. * @param {TData} handler.data - Data object passed to the handler. * @returns {Application} The application for chaining purposes. */ fetch = Record>(handler: (context: TurnContext, state: TState, data: TData) => Promise): Application; } //# sourceMappingURL=Messages.d.ts.map