@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
87 lines • 3.98 kB
TypeScript
/**
* @module teams-ai
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Storage } from 'botbuilder';
import { Application } from './Application';
import { TeamsAdapter } from './TeamsAdapter';
import { AIOptions } from './AI';
import { TurnState } from './TurnState';
import { AdaptiveCardsOptions } from './AdaptiveCards';
import { TaskModulesOptions } from './TaskModules';
import { AuthenticationOptions } from './authentication';
/**
* A builder class for simplifying the creation of an Application instance.
* @template TState Optional. Type of the turn state. This allows for strongly typed access to the turn state.
*/
export declare class ApplicationBuilder<TState extends TurnState = TurnState> {
private _options;
/**
* Configures the application to use long running messages.
* Default state for longRunningMessages is false
* @param {TeamsAdapter} adapter The adapter to use for routing incoming requests.
* @param {string} botAppId The Microsoft App ID for the bot.
* @returns {this} The ApplicationBuilder instance.
*/
withLongRunningMessages(adapter: TeamsAdapter, botAppId: string): this;
/**
* Configures the storage system to use for storing the bot's state.
* @param {Storage} storage The storage system to use.
* @returns {this} The ApplicationBuilder instance.
*/
withStorage(storage: Storage): this;
/**
* Configures the AI system to use for processing incoming messages.
* @param {AIOptions<TState>} aiOptions The options for the AI system.
* @returns {this} The ApplicationBuilder instance.
*/
withAIOptions(aiOptions: AIOptions<TState>): this;
/**
* Configures the processing of Adaptive Card requests.
* @param {AdaptiveCardsOptions} adaptiveCardOptions The options for the Adaptive Cards.
* @returns {this} The ApplicationBuilder instance.
*/
withAdaptiveCardOptions(adaptiveCardOptions: AdaptiveCardsOptions): this;
/**
* Configures the processing of Task Module requests.
* @param {TaskModulesOptions} taskModuleOptions The options for the Task Modules.
* @returns {this} The ApplicationBuilder instance.
*/
withTaskModuleOptions(taskModuleOptions: TaskModulesOptions): this;
/**
* Configures user authentication settings.
* @param {TeamsAdapter} adapter The adapter to use for user authentication.
* @param {AuthenticationOptions} authenticationOptions The options to configure the authentication manager.
* @returns {this} The ApplicationBuilder instance.
*/
withAuthentication(adapter: TeamsAdapter, authenticationOptions: AuthenticationOptions): this;
/**
* Configures the turn state factory for managing the bot's turn state.
* @param {() => TState} turnStateFactory Factory used to create a custom turn state instance.
* @returns {this} The ApplicationBuilder instance.
*/
withTurnStateFactory(turnStateFactory: () => TState): this;
/**
* Configures the removing of mentions of the bot's name from incoming messages.
* Default state for removeRecipientMention is true
* @param {boolean} removeRecipientMention The boolean for removing reciepient mentions.
* @returns {this} The ApplicationBuilder instance.
*/
setRemoveRecipientMention(removeRecipientMention: boolean): this;
/**
* Configures the typing timer when messages are received.
* Default state for startTypingTimer is true
* @param {boolean} startTypingTimer The boolean for starting the typing timer.
* @returns {this} The ApplicationBuilder instance.
*/
setStartTypingTimer(startTypingTimer: boolean): this;
/**
* Builds and returns a new Application instance.
* @returns {Application<TState>} The Application instance.
*/
build(): Application<TState>;
}
//# sourceMappingURL=ApplicationBuilder.d.ts.map