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" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=code" ta

61 lines (58 loc) 2.15 kB
import { SubmitActionOptions, MSTeamsData, ISubmitAction, SubmitAction } from './submit.mjs'; import '../../common/associated-inputs.mjs'; import '../base.mjs'; type MessageBackActionOptions = SubmitActionOptions & { data: MSTeamsData<IMessageBackData>; }; interface IMessageBackAction extends ISubmitAction { /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data: MSTeamsData<IMessageBackData>; } 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; } 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; } 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): this; } export { type IMessageBackAction, type IMessageBackData, MessageBackAction, type MessageBackActionOptions, MessageBackData };