@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
28 lines • 1.67 kB
TypeScript
import { Activity, TestAdapter, TurnContext } from 'botbuilder';
import { TeamsAdapter } from '../../TeamsAdapter';
import { TurnState } from '../../TurnState';
/**
* Creates, for testing, an invoke activity with the given name, value and data.
* Compatible with botbuilder's TestAdapter.
* @param {string} name - The name of the invoke activity.
* @param {any} value - The value of the invoke activity.
* @param {any} channelData - The bot's channel data of the invoke activity.
* @returns {Activity} - The created invoke activity.
*/
export declare function createTestInvoke(name: string, value: any, channelData?: any): Partial<Activity>;
/**
* Creates a conversation update activity for testing.
* Compatible with botbuilder's TestAdapter.
* @param {any} channelData An object containing channel data
* @returns {Partial<Activity>} A conversation update activity
*/
export declare function createTestConversationUpdate(channelData?: any): Partial<Activity>;
/**
* Returns turn context and state for testing.
* @remarks Compatible with botbuilder's TestAdapter and TeamsAdapter. Use _ on import if either value is not needed. For example, `const [context, _] = createTestTurnContextAndState(...)`.
* @param {TeamsAdapter | TestAdapter} adapter - The adapter to use for the turn context
* @param {Partial<Activity>} activity - The activity to use for the turn context
* @returns {[TurnContext, TurnState]} - The created turn context and state.
*/
export declare const createTestTurnContextAndState: (adapter: TeamsAdapter | TestAdapter, activity: Partial<Activity>) => Promise<[TurnContext, TurnState]>;
//# sourceMappingURL=TestUtilities.d.ts.map