diff --git a/CHANGELOG.md b/CHANGELOG.md index a04d8ac55..b0cd966a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + ## [Unreleased] +- Added `messageBack` to `CardActionTypes` and updated `CardAction` fields, by [@corinagum](https://github.com/corinagum), in PR [#138](https://github.com/Microsoft/BotFramework-DirectLineJS/pull/138) + ## [0.10.1] - 2018-12-21 ### Changed diff --git a/src/directLine.ts b/src/directLine.ts index 917b16c7b..e8f99fe8d 100644 --- a/src/directLine.ts +++ b/src/directLine.ts @@ -53,14 +53,26 @@ export interface UnknownMedia{ export type CardActionTypes = "call" | "downloadFile" | "imBack" | "messageBack" | "openUrl" | "playAudio" | "playVideo" | "postBack" | "signin" | "showImage"; -export interface CardAction { +export type CardAction = CardActionWithImage | CardActionWithTitle; + +export interface CardActionWithImage { displayText?: string, - image?: string, + image: string, + text?: string, title?: string, type: CardActionTypes, value?: any } +export interface CardActionWithTitle { + displayText?: string, + image?: string, + text?: string, + title: string, + type: CardActionTypes, + value?: any +} + export interface CardImage { alt?: string, url: string,