Open mmarcec007 opened 3 years ago
Couple things I would like to point out
IConvoRequest
and IConvoResponse
extensions should be treated as separate task/issue (and covered with unit tests?)Here is an quick overview of the interface infrastructure for the Card Visual Element.
IConvoCardRequest makes it easier to detect any selected card action after a card response was sent.
interface IConvoCardRequest extends IConvoRequest
{
/**
* @return string
*/
public function getSelectedCardAction() : string;
}
IConvoCardResponse makes it easier to declare an card response.
interface IConvoCardResponse extends IConvoResponse
{
public function getCardResponse(IVisualCard $cardItem) : array;
}
IVisualCard is used in IConvoCardResponse->getCardResponse(IVisualCard $cardItem) card response. This definition makes it clearer how the CardResponse should be formed.
interface IVisualCard {
public function getCardVisualItem() : IVisualItem;
public function getCardActions() : array;
}
IVisualItem is part of CardResponse.
interface IVisualItem
{
public function getTitle() : string;
public function getSubtitle() : string;
public function getDescription() : string;
public function getImageURL() : string;
public function getImageText() : string;
}
ICardAction is used to render buttons in card responses.
interface ICardAction
{
public function getCardActionKey() : string;
public function getCardActionName() : string;
}
Card Block Define a new block in convoworks with name Card Block which will make it easier to work with cards on Amazon Alexa, Google Assistant, Facebook Messenger and Viber.
Block Properties itself:
Block Containers:
Card Actions:
Additional specifications:
Please also refer to the Dummy representation of the Card Block.