dialogflow-fulfillment-0.1.1.2: A Dialogflow Fulfillment library for Haskell.

Copyright(c) Mauricio Fierro 2019
LicenseBSD3-Clause
MaintainerMauricio Fierro <mauriciofierrom@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Dialogflow.V2.Fulfillment.Payload.Google

Description

This module contains types for the Google Actions payload to be included in the webhook reponse. See the Dialogflow documentation.

Synopsis

Documentation

newtype GooglePayload Source #

This field can be used to provide responses for different platforms like Actions on Google.

Constructors

GooglePayload 

data ImageDisplayOption Source #

Possible image display options for affecting the presentation of an Image. This should be used for when the Image's aspect ratio does not match the Image container's aspect ratio.

Constructors

DEFAULT

Fill the gaps between the Image and the Image container with gray bars.

WHITE

Fill the gaps between the Image and the Image container with white bars.

CROPPED

Image is scaled such that the Image width and height match or exceed the container dimensions. This may crop the top and bottom of the Image if the scaled Image height is greater than the container height, or crop the left and right of the Image if the scaled Image width is greater than the container width. This is similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video.

data MediaObject Source #

Represents one media noNullObjects which is returned with MediaResponse. Contains information about the media, such as name, description, url, etc.

Constructors

MediaObject 

Fields

data RichMessageType Source #

The possible types of RichMessages.

data Res t where Source #

The response items.

Constructors

SimpleResponse :: SimpleResponse -> Res RMTSimpleResponse

A simple response containing speech or text to show the user.

BasicCard

A basic card for displaying some information, e.g. an image and/or text.

Fields

MediaResponse

The response indicating a set of media to be played within the conversation.

Fields

data Item where Source #

The items to include in the RichResponse

Constructors

Item :: Show (Res t) => Res t -> Item 
Instances
Eq Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Payload.Google

Methods

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

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

Show Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Payload.Google

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

ToJSON Item Source # 
Instance details

Defined in Dialogflow.V2.Fulfillment.Payload.Google

data RichResponse Source #

A rich response that can include audio, text, cards, suggestions and structured data.

Constructors

RichResponse 

Fields

  • items :: [Item]

    A list of UI elements which compose the response. The items must meet the following requirements: 1. The first item must be a SimpleResponse 2. At most two SimpleResponse 3. At most one rich response item (e.g. BasicCard, StructuredResponse, MediaResponse, or HtmlResponse) 4. You cannot use a rich response item if you're using an actions.intent.OPTION intent ie ListSelect or CarouselSelect

  • suggestions :: [Suggestion]

    A list of suggested replies. These will always appear at the end of the response.

  • linkOutSuggestion :: Maybe LinkOutSuggestion

    An additional suggestion chip that can link out to the associated app or site.

data Response Source #

The response sent by the fulfillment to Google Assistant.

Constructors

Response 

Fields

  • expectUserResponse :: Bool

    Indicates whether your fulfillment expects a user response. Set the value to true when to keep the conversation going and false to end the conversation.

  • userStorage :: Maybe String

    Stores persistent data tied to a specific user. The total storage amount is 10,000 bytes.

  • richResponse :: RichResponse

    This field contains audio, text, cards, suggestions, or structured data for the Assistant to render. To learn more about using rich responses for Actions on Google, see Res.

data VersionFilter Source #

VersionFilter should be included if specific version/s of the App are required.

Constructors

VersionFilter 

Fields

  • minVersion :: Int

    Min version code or 0, inclusive.

  • maxVersion :: Int

    Max version code, inclusive. The range considered is [minVersion:maxVersion]. A null range implies any version.

data AndroidApp Source #

Specification of the Android App for fulfillment restrictions.

Constructors

AndroidApp 

Fields

data OpenUrlAction Source #

Opens the given url.

Constructors

OpenUrlAction 

Fields

data LinkOutSuggestion Source #

Creates a suggestion chip that allows the user to jump out to the App or Website associated with this agent.

Constructors

LinkOutSuggestion 

Fields

  • losDestinationName :: String

    The name of the app or site this chip is linking to. The chip will be rendered with the title "Open ". Max 20 chars.

  • losUrl :: String

    Deprecated. Use OpenUrlAction instead.

  • losOpenUrlAction :: OpenUrlAction

    The URL of the App or Site to open when the user taps the suggestion chip. Ownership of this App/URL must be validated in the actions on Google developer console, or the suggestion will not be shown to the user.

newtype Suggestion Source #

A suggestion chip that the user can tap to quickly post a reply to the conversation.

Constructors

Suggestion 

Fields