Skip to content

Commit

Permalink
Update modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciofierrom committed Aug 18, 2019
1 parent 0420dcf commit 30521e8
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 26 deletions.
16 changes: 8 additions & 8 deletions dialogflow.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ source-repository head

library
exposed-modules:
Dialogflow.V2.Message
Dialogflow.V2.Payload.Google
Dialogflow.V2.Request
Dialogflow.V2.Response
Dialogflow.V2.Fulfillment.Message
Dialogflow.V2.Fulfillment.Payload.Google
Dialogflow.V2.Fulfillment.Webhook.Request
Dialogflow.V2.Fulfillment.Webhook.Response
Dialogflow.Util

build-depends:
Expand All @@ -57,10 +57,10 @@ test-suite dialog-flow-test
build-tools: hspec-discover
other-modules:
TestUtil
Dialogflow.V2.MessageSpec
Dialogflow.V2.Payload.GoogleSpec
Dialogflow.V2.RequestSpec
Dialogflow.V2.ResponseSpec
Dialogflow.V2.Fulfillment.MessageSpec
Dialogflow.V2.Fulfillment.Payload.GoogleSpec
Dialogflow.V2.Fulfillment.Webhook.RequestSpec
Dialogflow.V2.Fulfillment.Webhook.ResponseSpec
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This module contains types for Dialogflow messages to be used in
a fulfillment webhook response. See the Dialogflow <https://cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.Intent.Message documentation>.
-}

module Dialogflow.V2.Message
module Dialogflow.V2.Fulfillment.Message
( CardButton(..)
, BasicCardContent(..)
, BasicCardButton(..)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This module contains types for the Google Actions payload to be included
in the webhook reponse. See the Dialogflow <https://developers.google.com/actions/build/json/dialogflow-webhook-json#dialogflow-response-body documentation>.
-}

module Dialogflow.V2.Payload.Google where
module Dialogflow.V2.Fulfillment.Payload.Google where

import Data.Aeson ( parseJSON
, toJSON
Expand All @@ -34,7 +34,7 @@ import Data.Foldable (asum)
import qualified Data.HashMap.Strict as HM

import Dialogflow.Util
import qualified Dialogflow.V2.Message as M
import qualified Dialogflow.V2.Fulfillment.Message as M

-- | This field can be used to provide responses for different platforms
-- like Actions on Google.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NamedFieldPuns #-}

{-|
Module : Dialogflow.V2.Request
Expand All @@ -12,7 +11,7 @@ Maintainer : Mauricio Fierro <[email protected]>
This module contains types for Dialogflow webhook requests. See the Dialogflow <https://cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#webhookrequest documentation>.
-}

module Dialogflow.V2.Request where
module Dialogflow.V2.Fulfillment.Webhook.Request where

import Data.Aeson ( FromJSON
, parseJSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Maintainer : Mauricio Fierro <[email protected]>
This module contains types for Dialogflow webhook response. See the Dialogflow <https://cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#webhookresponse documentation>.
-}

module Dialogflow.V2.Response where
module Dialogflow.V2.Fulfillment.Webhook.Response where

import Data.Aeson ( parseJSON
, toJSON
Expand All @@ -24,10 +24,10 @@ import Dialogflow.Util (noNullObjects)

import qualified Data.Map as M

import Dialogflow.V2.Request (Context)
import Dialogflow.V2.Message
import Dialogflow.V2.Fulfillment.Webhook.Request (Context)
import Dialogflow.V2.Fulfillment.Message

import qualified Dialogflow.V2.Payload.Google as G
import qualified Dialogflow.V2.Fulfillment.Payload.Google as G

-- TODO: When this is included, no messages or payload is taken into account.
-- We gotta cover this.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{-# LANGUAGE OverloadedStrings #-}

module Dialogflow.V2.MessageSpec where
module Dialogflow.V2.Fulfillment.MessageSpec where

import Test.Hspec
import TestUtil

import Dialogflow.V2.Message
import Dialogflow.V2.Fulfillment.Message

basePath :: FilePath
basePath = "files/message/"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module Dialogflow.V2.Payload.GoogleSpec where
module Dialogflow.V2.Fulfillment.Payload.GoogleSpec where

import Test.Hspec

import TestUtil
import Dialogflow.V2.Payload.Google
import Dialogflow.V2.Fulfillment.Payload.Google
import Data.Aeson

import qualified Dialogflow.V2.Message as M
import qualified Dialogflow.V2.Fulfillment.Message as M

basePath :: FilePath
basePath = "files/payload/google/"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{-# LANGUAGE OverloadedStrings #-}

module Dialogflow.V2.RequestSpec where
module Dialogflow.V2.Fulfillment.Webhook.RequestSpec where

import Data.Aeson (eitherDecode)
import Test.Hspec
import qualified Data.Map as M

import Dialogflow.V2.Request
import Dialogflow.V2.Fulfillment.Webhook.Request
import TestUtil

basePath :: FilePath
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module Dialogflow.V2.ResponseSpec where
module Dialogflow.V2.Fulfillment.Webhook.ResponseSpec where

import Test.Hspec

import qualified Data.Map as M

import Dialogflow.V2.Response
import Dialogflow.V2.Fulfillment.Webhook.Response
import TestUtil

basePath :: FilePath
Expand Down

0 comments on commit 30521e8

Please sign in to comment.