UNPKG

@microsoft/teams.cards

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=c

72 lines (69 loc) 2.77 kB
import { ISubmitAction, SubmitAction, SubmitActionOptions } from '../../core.mjs'; import { MSTeamsData } from './ms-teams-data.mjs'; type MessageBackActionOptions = SubmitActionOptions & { data: MSTeamsData<IMessageBackData>; }; /** * @deprecated This type is deprecated. Please use {@link IMessageBackSubmitActionData} instead. This will be removed in a future version of the SDK. */ interface IMessageBackAction extends ISubmitAction { /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data: MSTeamsData<IMessageBackData>; } /** * @deprecated This class is deprecated. Please use {@link MessageBackSubmitActionData} instead. This will be removed in a future version of the SDK. */ declare class MessageBackAction extends SubmitAction implements IMessageBackAction { /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data: MSTeamsData<IMessageBackData>; constructor(data: IMessageBackData, options?: SubmitActionOptions); static from(options: MessageBackActionOptions): MessageBackAction; withData(value: IMessageBackData): this; } /** * @deprecated This type is deprecated. Please use {@link IMessageBackSubmitActionData} instead. This will be removed in a future version of the SDK. */ interface IMessageBackData { type: 'messageBack'; /** * Sent to your bot when the action is performed. */ text: string; /** * Used by the user in the chat stream when the action is performed. * This text isn't sent to your bot. */ displayText?: string; /** * Sent to your bot when the action is performed. You can encode context * for the action, such as unique identifiers or a `JSON` object. */ value: string; } /** * @deprecated This class is deprecated. Please use {@link MessageBackSubmitActionData} instead. This will be removed in a future version of the SDK. */ declare class MessageBackData implements IMessageBackData { type: 'messageBack'; /** * Sent to your bot when the action is performed. */ text: string; /** * Used by the user in the chat stream when the action is performed. * This text isn't sent to your bot. */ displayText?: string; /** * Sent to your bot when the action is performed. You can encode context * for the action, such as unique identifiers or a `JSON` object. */ value: string; constructor(text: string, value: string, displayText?: string); withDisplayText(value: string): MessageBackData; } export { type IMessageBackAction, type IMessageBackData, MessageBackAction, type MessageBackActionOptions, MessageBackData };