dialogflow-fulfillment-0.1.1.4: A Dialogflow Fulfillment library for Haskell.
Copyright(c) Mauricio Fierro 2019
LicenseBSD3-Clause
MaintainerMauricio Fierro <mauriciofierrom@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Dialogflow.V2.Fulfillment.Message

Description

This module contains types for Dialogflow messages to be used in a fulfillment webhook response. See the Dialogflow documentation.

Synopsis

Documentation

data CardButton Source #

Button for a Card message

Constructors

CardButton 

Fields

data Item Source #

An item in ListSelect and CarouselSelect.

Constructors

Item 

Fields

Instances

Instances details
Eq Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

Methods

(==) :: Item -> Item -> Bool #

(/=) :: Item -> Item -> Bool #

Show Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

ToJSON Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

data SpeechText Source #

A SimpleResponse can have text-to-speech in plain text or SSML format.

Constructors

TextToSpeech String

The plain text of the speech output

SSML String

Structured spoken response to the user in SSML format

newtype Suggestion Source #

Suggestion chips.

Constructors

Suggestion 

Fields

data SelectItemInfo Source #

Additional information about an Item for when it is triggered in a dialog.

Constructors

SelectItemInfo 

Fields

  • siiKey :: String

    A unique key that will be sent back to the agent if this response is given.

  • siiSynonyms :: Maybe [String]

    A list of synonyms that can also be used to trigger this item in dialog.

data Msg t where Source #

The messages to be included in the Response.

Constructors

Text

The text response message.

Fields

Image

The image response message.

Fields

QuickReplies

The quick replies response message.

Fields

Card

The card response.

Fields

SimpleResponses

The collection of SimpleResponse candidates.

Fields

BasicCard

The basic card message. Useful for displaying information.

Fields

Suggestions

The collection of Suggestion.

Fields

LinkOutSuggestion

The suggestion chip message that allows the user to jump out to the app or the website associated with this agent.

Fields

ListSelect

The card for presenting a list of options to select from.

Fields

CarouselSelect

The card for representing a carousel of options to select from.

Fields

Instances

Instances details
Eq (Msg t) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

Methods

(==) :: Msg t -> Msg t -> Bool #

(/=) :: Msg t -> Msg t -> Bool #

Show (Msg t) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

Methods

showsPrec :: Int -> Msg t -> ShowS #

show :: Msg t -> String #

showList :: [Msg t] -> ShowS #

ToJSON (Msg t) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

Methods

toJSON :: Msg t -> Value #

toEncoding :: Msg t -> Encoding #

toJSONList :: [Msg t] -> Value #

toEncodingList :: [Msg t] -> Encoding #

FromJSON (Msg 'MsgText) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgImage) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgQuickReplies) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgCard) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgSimpleResponses) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgBasicCard) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgSuggestions) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgLinkOutSuggestion) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgListSelect) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

FromJSON (Msg 'MsgCarouselSelect) Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

data Message where Source #

This type is used to wrap the messages under one type.

Constructors

Message :: Show (Msg t) => Msg t -> Message 

Instances

Instances details
Eq Message Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

Methods

(==) :: Message -> Message -> Bool #

(/=) :: Message -> Message -> Bool #

Show Message Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message

ToJSON Message Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Message