@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
51 lines • 2.41 kB
TypeScript
import { Dialog } from 'botbuilder-dialogs';
import { ConfidentialClientApplication } from '@azure/msal-node';
import { TeamsSsoSettings } from './TeamsSsoSettings';
/**
* @internal
*
* Creates a new prompt that leverage Teams Single Sign On (SSO) support for bot to automatically sign in user and
* help receive oauth token, asks the user to consent if needed.
*/
export declare class TeamsSsoPrompt extends Dialog {
private settingName;
private settings;
private msal;
/**
* Creates a new instance of TeamsSsoPrompt.
* @param {string} dialogId - The ID of the dialog.
* @param {string} settingName - The name of the setting.
* @param {TeamsSsoSettings} settings - The settings for Teams SSO.
* @param {ConfidentialClientApplication} msal - The MSAL (Microsoft Authentication Library) object.
*/
constructor(dialogId: string, settingName: string, settings: TeamsSsoSettings, msal: ConfidentialClientApplication);
/**
* Called when a prompt dialog is pushed onto the dialog stack and is being activated.
* @remarks
* If the task is successful, the result indicates whether the prompt is still
* active after the turn has been processed by the prompt.
* @param {any} dc - The DialogContext for the current turn of the conversation.
* @param {any} options - The options for the dialog
* @returns {Promise<any>} A `Promise` representing the result of current turn.
*/
beginDialog(dc: any, options: any): Promise<any>;
/**
* Called when a prompt dialog is the active dialog and the user replied with a new activity.
* @remarks
* If the task is successful, the result indicates whether the dialog is still
* active after the turn has been processed by the dialog.
* @param {any} dc The DialogContext for the current turn of the conversation.
* @returns {Promise<any>} A `Promise` representing the result of the turn after the dialog has processed the activity.
*/
continueDialog(dc: any): Promise<any>;
private recognizeToken;
private acquireTokenFromCache;
private getTokenExchangeInvokeResponse;
private sendOAuthCardAsync;
private getSignInResource;
private validateScopesType;
private isTeamsVerificationInvoke;
private isTokenExchangeRequestInvoke;
private isTokenExchangeRequest;
}
//# sourceMappingURL=TeamsBotSsoPrompt.d.ts.map