{"version":3,"sources":["../../src/actions/execute.ts"],"names":[],"mappings":";;AA+BO,MAAM,sBAAsB,MAAiC,CAAA;AAAA,EAClE,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAA;AAAA,EAEA,WAAA,CAAY,OAAgC,GAAA,EAAI,EAAA;AAC9C,IAAM,KAAA,EAAA;AACN,IAAA,IAAA,CAAK,IAAO,GAAA,gBAAA;AACZ,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA;AAC7B,EAEA,OAAO,KAAK,OAA+B,EAAA;AACzC,IAAO,OAAA,IAAI,cAAc,OAAO,CAAA;AAAA;AAClC,EAEA,SAAS,KAAe,EAAA;AACtB,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,SAAS,KAAqC,EAAA;AAC5C,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,qBAAqB,KAAyB,EAAA;AAC5C,IAAA,IAAA,CAAK,gBAAmB,GAAA,KAAA;AACxB,IAAO,OAAA,IAAA;AAAA;AAEX","file":"execute.mjs","sourcesContent":["import { AssociatedInputs } from '../common';\n\nimport { IAction, Action } from './base';\n\n/**\n * 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.\n */\nexport interface IExecuteAction extends IAction {\n  type: 'Action.Execute';\n\n  /**\n   * The card author-defined verb associated with this action.\n   */\n  verb?: string;\n\n  /**\n   * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.\n   */\n  data?: string | Record<string, any>;\n\n  /**\n   * Controls which inputs are associated with the action.\n   */\n  associatedInputs?: AssociatedInputs;\n}\n\nexport type ExecuteActionOptions = Omit<IExecuteAction, 'type'>;\n\n/**\n * 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.\n */\nexport class ExecuteAction extends Action implements IExecuteAction {\n  type: 'Action.Execute';\n\n  /**\n   * The card author-defined verb associated with this action.\n   */\n  verb?: string;\n\n  /**\n   * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.\n   */\n  data?: string | Record<string, any>;\n\n  /**\n   * Controls which inputs are associated with the action.\n   */\n  associatedInputs?: AssociatedInputs;\n\n  constructor(options: ExecuteActionOptions = {}) {\n    super();\n    this.type = 'Action.Execute';\n    Object.assign(this, options);\n  }\n\n  static from(options: ExecuteActionOptions) {\n    return new ExecuteAction(options);\n  }\n\n  withVerb(value: string) {\n    this.verb = value;\n    return this;\n  }\n\n  withData(value: string | Record<string, any>) {\n    this.data = value;\n    return this;\n  }\n\n  withAssociatedInputs(value: AssociatedInputs) {\n    this.associatedInputs = value;\n    return this;\n  }\n}\n"]}