/** * @module botbuilder-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { Activity, Attachment } from 'botbuilder-core'; import { QnAMakerResult } from './'; /** * Provides methods to create activities containing hero cards for showing active learning or multi-turn prompt options for the QnAMakerDialog. */ export declare class QnACardBuilder { /** * Returns an [activity](xref:botframework-schema.Activity) with a hero card attachment, containing buttons for active learning suggestions. * * @param {string[]} suggestionsList List of suggestions to be displayed on hero card. * @param {string} cardTitle Title of the hero card. * @param {string} cardNoMatchText Text for button to be added to card to allow user to select 'no match'. * @param {boolean} useTeamsAdaptiveCard whether to use a Microsoft Teams formatted adaptive card instead of a hero card. Defaults to false. * Card width is limited by Teams and long CQA responses should be formatted in the Language Studio to add line breaks. Card payload is specific to MS Teams. * @returns {Partial} Activity representing the suggestions as a card */ static getSuggestionsCard(suggestionsList: string[], cardTitle: string, cardNoMatchText: string, useTeamsAdaptiveCard?: boolean): Partial; /** * Returns an [activity](xref:botframework-schema.Activity) with answer text and a card attachment, containing buttons for multi turn prompts. * * @param {QnAMakerResult} result QnAMaker result containing the answer text and multi turn prompts to be displayed. * @param {boolean} displayPreciseAnswerOnly whether to display PreciseAnswer Only or along with source Answer text. * @param {boolean} useTeamsAdaptiveCard whether to use a Microsoft Teams formatted adaptive card instead of a hero card. Defaults to false. * Card width is limited by Teams and long CQA responses should be formatted in the Language Studio to add line breaks. Card payload is specific to MS Teams. * @returns {Partial} Activity representing the prompts as a card */ static getQnAAnswerCard(result: QnAMakerResult, displayPreciseAnswerOnly: boolean, useTeamsAdaptiveCard?: boolean): Partial; /** * Returns an [activity](xref:botframework-schema.Activity) with answer text and a hero card attachment, containing buttons for multi turn prompts. * * @param {QnAMakerResult} result QnAMaker result containing the answer text and multi turn prompts to be displayed. * @returns {Partial} Activity representing the prompts as a card */ static getQnAPromptsCard(result: QnAMakerResult): Partial; /** * Returns an Adaptive Card attachment containing the text for the card and a button list formatted for MS Teams * * @param {string} cardText The string to be placed in the card's text field * @param {any[]} buttonList The list of buttons to be converted to MS Teams messageBack buttons and placed in the card's actions field * @returns {Attachment} An attachment representing the MS Teams-formatted Adaptive Card */ static getTeamsAdaptiveCard(cardText: string, buttonList: any[]): Attachment; /** * Returns a Hero Card attachment containing the text for the card and a button list * * @param {string} cardText The string to be placed in the card's text field * @param {any[]} buttonList The list of buttons to be converted to imBack buttons and attached to the card * @returns {Attachment} An attachment representing the Hero Card */ static getHeroCard(cardText: string, buttonList: any[]): Attachment; } //# sourceMappingURL=qnaCardBuilder.d.ts.map