SuggestedActions class
Classe Builder pour ajouter des actions suggérées à un message
Constructeurs
| Suggested |
Crée une nouvelle SuggestionActions |
Méthodes
| actions(ICard |
Collection d’actions à afficher sous forme d’actions suggérées. |
| add |
Ajoute une action à afficher sous forme d’action suggérée |
| create(Session, ICard |
Crée une nouvelle SuggestionActions |
| to(Text |
Destinataires facultatifs des actions. Uniquement pris en charge par certains canaux. |
| to |
Renvoie l’objet JSON pour les actions suggérées |
Détails du constructeur
SuggestedActions(Session)
Crée une nouvelle SuggestionActions
new SuggestedActions(session?: Session)
Paramètres
- session
- Session
(Facultatif) objet de session
Détails de la méthode
actions(ICardAction[] | IIsCardAction[])
Collection d’actions à afficher sous forme d’actions suggérées.
function actions(list: ICardAction[] | IIsCardAction[])
Paramètres
- list
-
ICardAction[] | IIsCardAction[]
Retours
addAction(ICardAction | IIsCardAction)
Ajoute une action à afficher sous forme d’action suggérée
function addAction(action: ICardAction | IIsCardAction)
Paramètres
- action
Retours
create(Session, ICardAction[] | IIsCardAction[], string | string[])
Crée une nouvelle SuggestionActions
static function create(session: Session, actions: ICardAction[] | IIsCardAction[], to?: string | string[])
Paramètres
- session
- Session
- actions
-
ICardAction[] | IIsCardAction[]
- to
-
string | string[]
Retours
to(TextType)
Destinataires facultatifs des actions. Uniquement pris en charge par certains canaux.
function to(text: TextType)
Paramètres
- text
- TextType
Retours
toSuggestedActions()
Renvoie l’objet JSON pour les actions suggérées
function toSuggestedActions()