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

48 lines (45 loc) 2.39 kB
import { AssociatedInputs } from '../common/associated-inputs.mjs'; import { IAction, Action } from './base.mjs'; /** * Gathers input fields, merges with optional data field, and sends an event to the client. Clients process the event by sending an Invoke activity of type adaptiveCard/action to the target Bot. The inputs that are gathered are those on the current card, and in the case of a show card those on any parent cards. See [Universal Action Model](https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model) documentation for more details. */ interface IExecuteAction extends IAction { type: 'Action.Execute'; /** * The card author-defined verb associated with this action. */ verb?: string; /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data?: string | Record<string, any>; /** * Controls which inputs are associated with the action. */ associatedInputs?: AssociatedInputs; } type ExecuteActionOptions = Omit<IExecuteAction, 'type'>; /** * Gathers input fields, merges with optional data field, and sends an event to the client. Clients process the event by sending an Invoke activity of type adaptiveCard/action to the target Bot. The inputs that are gathered are those on the current card, and in the case of a show card those on any parent cards. See [Universal Action Model](https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model) documentation for more details. */ declare class ExecuteAction extends Action implements IExecuteAction { type: 'Action.Execute'; /** * The card author-defined verb associated with this action. */ verb?: string; /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data?: string | Record<string, any>; /** * Controls which inputs are associated with the action. */ associatedInputs?: AssociatedInputs; constructor(options?: ExecuteActionOptions); static from(options: ExecuteActionOptions): ExecuteAction; withVerb(value: string): this; withData(value: string | Record<string, any>): this; withAssociatedInputs(value: AssociatedInputs): this; } export { ExecuteAction, type ExecuteActionOptions, type IExecuteAction };