-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Library for interfacing with the Mandrill JSON API
--
-- Pure Haskell client for the Mandrill JSON API
@package mandrill
@version 0.5.3.2
module Network.API.Mandrill.Types
timeParse :: ParseTime t => TimeLocale -> String -> String -> Maybe t
data MandrillError
MandrillError :: !Text -> !Int -> !Text -> !Text -> MandrillError
[_merr_status] :: MandrillError -> !Text
[_merr_code] :: MandrillError -> !Int
[_merr_name] :: MandrillError -> !Text
[_merr_message] :: MandrillError -> !Text
merr_status :: Lens' MandrillError Text
merr_name :: Lens' MandrillError Text
merr_message :: Lens' MandrillError Text
merr_code :: Lens' MandrillError Int
data MandrillEmailStatus
ES_Sent :: MandrillEmailStatus
ES_Queued :: MandrillEmailStatus
ES_Scheduled :: MandrillEmailStatus
ES_Rejected :: MandrillEmailStatus
ES_Invalid :: MandrillEmailStatus
data MandrillRejectReason
RR_HardBounce :: MandrillRejectReason
RR_SoftBounce :: MandrillRejectReason
RR_Spam :: MandrillRejectReason
RR_Unsub :: MandrillRejectReason
RR_Custom :: MandrillRejectReason
RR_InvalidSender :: MandrillRejectReason
RR_Invalid :: MandrillRejectReason
RR_TestModeLimit :: MandrillRejectReason
RR_Unsigned :: MandrillRejectReason
RR_Rule :: MandrillRejectReason
-- | The main datatypes which models the response from the Mandrill API,
-- which can be either a success or a failure.
data MandrillResponse k
MandrillSuccess :: k -> MandrillResponse k
MandrillFailure :: MandrillError -> MandrillResponse k
data MandrillRecipientTag
To :: MandrillRecipientTag
Cc :: MandrillRecipientTag
Bcc :: MandrillRecipientTag
newtype MandrillEmail
MandrillEmail :: EmailAddress -> MandrillEmail
-- | An array of recipient information.
data MandrillRecipient
MandrillRecipient :: MandrillEmail -> Maybe Text -> Maybe MandrillRecipientTag -> MandrillRecipient
-- | The email address of the recipient
[_mrec_email] :: MandrillRecipient -> MandrillEmail
-- | The optional display name to use for the recipient
[_mrec_name] :: MandrillRecipient -> Maybe Text
-- | The header type to use for the recipient. defaults to "to" if not
-- provided
[_mrec_type] :: MandrillRecipient -> Maybe MandrillRecipientTag
mrec_type :: Lens' MandrillRecipient (Maybe MandrillRecipientTag)
mrec_name :: Lens' MandrillRecipient (Maybe Text)
mrec_email :: Lens' MandrillRecipient MandrillEmail
newRecipient :: EmailAddress -> MandrillRecipient
newtype MandrillHtml
MandrillHtml :: Html -> MandrillHtml
unsafeMkMandrillHtml :: Text -> MandrillHtml
mkMandrillHtml :: Html -> MandrillHtml
type MandrillTags = Text
type MandrillHeaders = Object
data MergeVar
MergeVar :: !Text -> Value -> MergeVar
[_mv_name] :: MergeVar -> !Text
[_mv_content] :: MergeVar -> Value
mv_name :: Lens' MergeVar Text
mv_content :: Lens' MergeVar Value
data MandrillMergeVars
MandrillMergeVars :: !Text -> [MergeVar] -> MandrillMergeVars
[_mmvr_rcpt] :: MandrillMergeVars -> !Text
[_mmvr_vars] :: MandrillMergeVars -> [MergeVar]
mmvr_vars :: Lens' MandrillMergeVars [MergeVar]
mmvr_rcpt :: Lens' MandrillMergeVars Text
data MandrillMetadata
MandrillMetadata :: !Text -> Object -> MandrillMetadata
[_mmdt_rcpt] :: MandrillMetadata -> !Text
[_mmdt_values] :: MandrillMetadata -> Object
mmdt_values :: Lens' MandrillMetadata Object
mmdt_rcpt :: Lens' MandrillMetadata Text
data Base64ByteString
-- | An already-encoded Base64 ByteString.
EncodedB64BS :: ByteString -> Base64ByteString
-- | A plain Base64 ByteString which requires encoding.
PlainBS :: ByteString -> Base64ByteString
data MandrillWebContent
MandrillWebContent :: !Text -> !Text -> !Base64ByteString -> MandrillWebContent
[_mwct_type] :: MandrillWebContent -> !Text
-- |
-- - for images the Content ID of the image - use
-- src="cid:THIS_VALUE" to reference the image in your HTML
-- content
--
[_mwct_name] :: MandrillWebContent -> !Text
[_mwct_content] :: MandrillWebContent -> !Base64ByteString
mwct_type :: Lens' MandrillWebContent Text
mwct_name :: Lens' MandrillWebContent Text
mwct_content :: Lens' MandrillWebContent Base64ByteString
-- | The information on the message to send
data MandrillMessage
MandrillMessage :: MandrillHtml -> Maybe Text -> !Text -> MandrillEmail -> Maybe Text -> [MandrillRecipient] -> MandrillHeaders -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [MergeVar] -> [MandrillMergeVars] -> [MandrillTags] -> Maybe Text -> [Text] -> Maybe Text -> Object -> [MandrillMetadata] -> [MandrillWebContent] -> [MandrillWebContent] -> MandrillMessage
-- | The full HTML content to be sent
[_mmsg_html] :: MandrillMessage -> MandrillHtml
-- | Optional full text content to be sent
[_mmsg_text] :: MandrillMessage -> Maybe Text
-- | The message subject
[_mmsg_subject] :: MandrillMessage -> !Text
-- | The sender email address
[_mmsg_from_email] :: MandrillMessage -> MandrillEmail
-- | Optional from name to be used
[_mmsg_from_name] :: MandrillMessage -> Maybe Text
-- | A list of recipient information
[_mmsg_to] :: MandrillMessage -> [MandrillRecipient]
-- | optional extra headers to add to the message (most headers are
-- allowed)
[_mmsg_headers] :: MandrillMessage -> MandrillHeaders
-- | whether or not this message is important, and should be delivered
-- ahead of non-important messages
[_mmsg_important] :: MandrillMessage -> Maybe Bool
-- | whether or not to turn on open tracking for the message
[_mmsg_track_opens] :: MandrillMessage -> Maybe Bool
-- | whether or not to turn on click tracking for the message
[_mmsg_track_clicks] :: MandrillMessage -> Maybe Bool
-- | whether or not to automatically generate a text part for messages that
-- are not given text
[_mmsg_auto_text] :: MandrillMessage -> Maybe Bool
-- | whether or not to automatically generate an HTML part for messages
-- that are not given HTML
[_mmsg_auto_html] :: MandrillMessage -> Maybe Bool
-- | whether or not to automatically inline all CSS styles provided in the
-- message HTML - only for HTML documents less than 256KB in size
[_mmsg_inline_css] :: MandrillMessage -> Maybe Bool
-- | whether or not to strip the query string from URLs when aggregating
-- tracked URL data
[_mmsg_url_strip_qs] :: MandrillMessage -> Maybe Bool
-- | whether or not to expose all recipients in to To header for
-- each email
[_mmsg_preserve_recipients] :: MandrillMessage -> Maybe Bool
-- | set to false to remove content logging for sensitive emails
[_mmsg_view_content_link] :: MandrillMessage -> Maybe Bool
-- | an optional address to receive an exact copy of each recipient's email
[_mmsg_bcc_address] :: MandrillMessage -> Maybe Text
-- | a custom domain to use for tracking opens and clicks instead of
-- mandrillapp.com
[_mmsg_tracking_domain] :: MandrillMessage -> Maybe Text
-- | a custom domain to use for SPF/DKIM signing instead of mandrill (for
-- "via" or "on behalf of" in email clients)
[_mmsg_signing_domain] :: MandrillMessage -> Maybe Bool
-- | a custom domain to use for the messages's return-path
[_mmsg_return_path_domain] :: MandrillMessage -> Maybe Bool
-- | whether to evaluate merge tags in the message. Will automatically be
-- set to true if either merge_vars or global_merge_vars are provided.
[_mmsg_merge] :: MandrillMessage -> Maybe Bool
-- | global merge variables to use for all recipients. You can override
-- these per recipient.
[_mmsg_global_merge_vars] :: MandrillMessage -> [MergeVar]
-- | per-recipient merge variables, which override global merge variables
-- with the same name.
[_mmsg_merge_vars] :: MandrillMessage -> [MandrillMergeVars]
-- | an array of string to tag the message with. Stats are accumulated
-- using tags, though we only store the first 100 we see, so this should
-- not be unique or change frequently. Tags should be 50 characters or
-- less. Any tags starting with an underscore are reserved for internal
-- use and will cause errors.
[_mmsg_tags] :: MandrillMessage -> [MandrillTags]
-- | the unique id of a subaccount for this message - must already exist or
-- will fail with an error
[_mmsg_subaccount] :: MandrillMessage -> Maybe Text
-- | an array of strings indicating for which any matching URLs will
-- automatically have Google Analytics parameters appended to their query
-- string automatically.
[_mmsg_google_analytics_domains] :: MandrillMessage -> [Text]
-- | optional string indicating the value to set for the utm_campaign
-- tracking parameter. If this isn't provided the email's from address
-- will be used instead.
[_mmsg_google_analytics_campaign] :: MandrillMessage -> Maybe Text
-- | metadata an associative array of user metadata. Mandrill will store
-- this metadata and make it available for retrieval. In addition, you
-- can select up to 10 metadata fields to index and make searchable using
-- the Mandrill search api.
[_mmsg_metadata] :: MandrillMessage -> Object
-- | Per-recipient metadata that will override the global values specified
-- in the metadata parameter.
[_mmsg_recipient_metadata] :: MandrillMessage -> [MandrillMetadata]
-- | an array of supported attachments to add to the message
[_mmsg_attachments] :: MandrillMessage -> [MandrillWebContent]
-- | an array of embedded images to add to the message
[_mmsg_images] :: MandrillMessage -> [MandrillWebContent]
mmsg_view_content_link :: Lens' MandrillMessage (Maybe Bool)
mmsg_url_strip_qs :: Lens' MandrillMessage (Maybe Bool)
mmsg_tracking_domain :: Lens' MandrillMessage (Maybe Text)
mmsg_track_opens :: Lens' MandrillMessage (Maybe Bool)
mmsg_track_clicks :: Lens' MandrillMessage (Maybe Bool)
mmsg_to :: Lens' MandrillMessage [MandrillRecipient]
mmsg_text :: Lens' MandrillMessage (Maybe Text)
mmsg_tags :: Lens' MandrillMessage [MandrillTags]
mmsg_subject :: Lens' MandrillMessage Text
mmsg_subaccount :: Lens' MandrillMessage (Maybe Text)
mmsg_signing_domain :: Lens' MandrillMessage (Maybe Bool)
mmsg_return_path_domain :: Lens' MandrillMessage (Maybe Bool)
mmsg_recipient_metadata :: Lens' MandrillMessage [MandrillMetadata]
mmsg_preserve_recipients :: Lens' MandrillMessage (Maybe Bool)
mmsg_metadata :: Lens' MandrillMessage Object
mmsg_merge_vars :: Lens' MandrillMessage [MandrillMergeVars]
mmsg_merge :: Lens' MandrillMessage (Maybe Bool)
mmsg_inline_css :: Lens' MandrillMessage (Maybe Bool)
mmsg_important :: Lens' MandrillMessage (Maybe Bool)
mmsg_images :: Lens' MandrillMessage [MandrillWebContent]
mmsg_html :: Lens' MandrillMessage MandrillHtml
mmsg_headers :: Lens' MandrillMessage MandrillHeaders
mmsg_google_analytics_domains :: Lens' MandrillMessage [Text]
mmsg_google_analytics_campaign :: Lens' MandrillMessage (Maybe Text)
mmsg_global_merge_vars :: Lens' MandrillMessage [MergeVar]
mmsg_from_name :: Lens' MandrillMessage (Maybe Text)
mmsg_from_email :: Lens' MandrillMessage MandrillEmail
mmsg_bcc_address :: Lens' MandrillMessage (Maybe Text)
mmsg_auto_text :: Lens' MandrillMessage (Maybe Bool)
mmsg_auto_html :: Lens' MandrillMessage (Maybe Bool)
mmsg_attachments :: Lens' MandrillMessage [MandrillWebContent]
-- | Key value pair for replacing content in templates via 'Editable
-- Regions'
data MandrillTemplateContent
MandrillTemplateContent :: Text -> Text -> MandrillTemplateContent
[_mtc_name] :: MandrillTemplateContent -> Text
[_mtc_content] :: MandrillTemplateContent -> Text
mtc_name :: Lens' MandrillTemplateContent Text
mtc_content :: Lens' MandrillTemplateContent Text
type MandrillKey = Text
type MandrillTemplate = Text
newtype MandrillDate
MandrillDate :: UTCTime -> MandrillDate
[fromMandrillDate] :: MandrillDate -> UTCTime
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillDate
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillTemplateContent
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillTemplateContent
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillDate
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillDate
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillTemplateContent
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillMessage
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillMessage
instance Test.QuickCheck.Arbitrary.Arbitrary Network.API.Mandrill.Types.MandrillMessage
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillMessage
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillWebContent
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillWebContent
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillWebContent
instance GHC.Show.Show Network.API.Mandrill.Types.Base64ByteString
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillMetadata
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillMetadata
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.Base64ByteString
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.Base64ByteString
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillMetadata
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillMergeVars
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillMergeVars
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillMergeVars
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MergeVar
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MergeVar
instance GHC.Show.Show Network.API.Mandrill.Types.MergeVar
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillRecipient
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillRecipient
instance Test.QuickCheck.Arbitrary.Arbitrary Network.API.Mandrill.Types.MandrillRecipient
instance GHC.Base.Monoid Network.API.Mandrill.Types.MandrillHtml
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillHtml
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillHtml
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillHtml
instance Test.QuickCheck.Arbitrary.Arbitrary Network.API.Mandrill.Types.MandrillHtml
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillRecipient
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillEmail
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillRecipientTag
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillRecipientTag
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillEmail
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillEmail
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillRecipientTag
instance Data.Traversable.Traversable Network.API.Mandrill.Types.MandrillResponse
instance Data.Foldable.Foldable Network.API.Mandrill.Types.MandrillResponse
instance GHC.Base.Functor Network.API.Mandrill.Types.MandrillResponse
instance GHC.Classes.Eq k => GHC.Classes.Eq (Network.API.Mandrill.Types.MandrillResponse k)
instance GHC.Show.Show k => GHC.Show.Show (Network.API.Mandrill.Types.MandrillResponse k)
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillRejectReason
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillRejectReason
instance Data.Aeson.Types.FromJSON.FromJSON k => Data.Aeson.Types.FromJSON.FromJSON (Network.API.Mandrill.Types.MandrillResponse k)
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillRejectReason
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillEmailStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillEmailStatus
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillEmailStatus
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Types.MandrillError
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Types.MandrillError
instance GHC.Classes.Eq Network.API.Mandrill.Types.MandrillError
instance GHC.Show.Show Network.API.Mandrill.Types.MandrillError
module Network.API.Mandrill.Users.Types
data UsersRq
UsersRq :: !MandrillKey -> UsersRq
[_ureq_key] :: UsersRq -> !MandrillKey
ureq_key :: Iso' UsersRq MandrillKey
data MandrillStats
MandrillStats :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> MandrillStats
[_msts_sent] :: MandrillStats -> Int
[_msts_hard_bounces] :: MandrillStats -> Int
[_msts_soft_bounces] :: MandrillStats -> Int
[_msts_rejects] :: MandrillStats -> Int
[_msts_complaints] :: MandrillStats -> Int
[_msts_unsubs] :: MandrillStats -> Int
[_msts_opens] :: MandrillStats -> Int
[_msts_unique_opens] :: MandrillStats -> Int
[_msts_clicks] :: MandrillStats -> Int
[_msts_unique_clicks] :: MandrillStats -> Int
msts_unsubs :: Lens' MandrillStats Int
msts_unique_opens :: Lens' MandrillStats Int
msts_unique_clicks :: Lens' MandrillStats Int
msts_soft_bounces :: Lens' MandrillStats Int
msts_sent :: Lens' MandrillStats Int
msts_rejects :: Lens' MandrillStats Int
msts_opens :: Lens' MandrillStats Int
msts_hard_bounces :: Lens' MandrillStats Int
msts_complaints :: Lens' MandrillStats Int
msts_clicks :: Lens' MandrillStats Int
data UserStats
UserStats :: MandrillStats -> MandrillStats -> MandrillStats -> MandrillStats -> MandrillStats -> MandrillStats -> UserStats
[_usts_today] :: UserStats -> MandrillStats
[_usts_last_7_days] :: UserStats -> MandrillStats
[_usts_last_30_days] :: UserStats -> MandrillStats
[_usts_last_60_days] :: UserStats -> MandrillStats
[_usts_last_90_days] :: UserStats -> MandrillStats
[_usts_all_time] :: UserStats -> MandrillStats
usts_today :: Lens' UserStats MandrillStats
usts_last_90_days :: Lens' UserStats MandrillStats
usts_last_7_days :: Lens' UserStats MandrillStats
usts_last_60_days :: Lens' UserStats MandrillStats
usts_last_30_days :: Lens' UserStats MandrillStats
usts_all_time :: Lens' UserStats MandrillStats
data UsersInfoResponse
UsersInfoResponse :: !Text -> MandrillDate -> !Text -> !Int -> !Int -> !Int -> UserStats -> UsersInfoResponse
[_usir_username] :: UsersInfoResponse -> !Text
[_usir_created_at] :: UsersInfoResponse -> MandrillDate
[_usir_public_id] :: UsersInfoResponse -> !Text
[_usir_reputation] :: UsersInfoResponse -> !Int
[_usir_hourly_quota] :: UsersInfoResponse -> !Int
[_usir_backlog] :: UsersInfoResponse -> !Int
[_usir_stats] :: UsersInfoResponse -> UserStats
usir_username :: Lens' UsersInfoResponse Text
usir_stats :: Lens' UsersInfoResponse UserStats
usir_reputation :: Lens' UsersInfoResponse Int
usir_public_id :: Lens' UsersInfoResponse Text
usir_hourly_quota :: Lens' UsersInfoResponse Int
usir_created_at :: Lens' UsersInfoResponse MandrillDate
usir_backlog :: Lens' UsersInfoResponse Int
newtype UsersPingResponse
UsersPingResponse :: Text -> UsersPingResponse
data UsersPing2Response
UsersPing2Response :: Text -> UsersPing2Response
[_usrr_PING] :: UsersPing2Response -> Text
data UsersSendersResponse
UsersResponse :: !Text -> MandrillDate -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> UsersSendersResponse
-- | The sender's email address
[_usrr_address] :: UsersSendersResponse -> !Text
-- | The date and time that the sender was first seen by Mandrill as a UTC
-- date string in YYYY-MM-DD HH:MM:SS format
[_usrr_created_at] :: UsersSendersResponse -> MandrillDate
-- | The total number of messages sent by this sender
[_usrr_sent] :: UsersSendersResponse -> !Int
-- | The total number of hard bounces by messages by this sender
[_usrr_hard_bounces] :: UsersSendersResponse -> !Int
-- | The total number of soft bounces by messages by this sender
[_usrr_soft_bounces] :: UsersSendersResponse -> !Int
-- | The total number of rejected messages by this sender
[_usrr_rejects] :: UsersSendersResponse -> !Int
-- | The total number of spam complaints received for messages by this
-- sender
[_usrr_complaints] :: UsersSendersResponse -> !Int
-- | The total number of unsubscribe requests received for messages by this
-- sender
[_usrr_unsubs] :: UsersSendersResponse -> !Int
-- | The total number of times messages by this sender have been opened
[_usrr_opens] :: UsersSendersResponse -> !Int
-- | The total number of times tracked URLs in messages by this sender have
-- been clicked
[_usrr_clicks] :: UsersSendersResponse -> !Int
-- | The number of unique opens for emails sent for this sender
[_usrr_unique_opens] :: UsersSendersResponse -> !Int
-- | The number of unique clicks for emails sent for this sender
[_usrr_unique_clicks] :: UsersSendersResponse -> !Int
usrr_unsubs :: Lens' UsersSendersResponse Int
usrr_unique_opens :: Lens' UsersSendersResponse Int
usrr_unique_clicks :: Lens' UsersSendersResponse Int
usrr_soft_bounces :: Lens' UsersSendersResponse Int
usrr_sent :: Lens' UsersSendersResponse Int
usrr_rejects :: Lens' UsersSendersResponse Int
usrr_opens :: Lens' UsersSendersResponse Int
usrr_hard_bounces :: Lens' UsersSendersResponse Int
usrr_created_at :: Lens' UsersSendersResponse MandrillDate
usrr_complaints :: Lens' UsersSendersResponse Int
usrr_clicks :: Lens' UsersSendersResponse Int
usrr_address :: Lens' UsersSendersResponse Text
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.UsersSendersResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.UsersSendersResponse
instance GHC.Show.Show Network.API.Mandrill.Users.Types.UsersSendersResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.UsersPing2Response
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.UsersPing2Response
instance GHC.Show.Show Network.API.Mandrill.Users.Types.UsersPing2Response
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.UsersPingResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.UsersPingResponse
instance GHC.Show.Show Network.API.Mandrill.Users.Types.UsersPingResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.UsersInfoResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.UsersInfoResponse
instance GHC.Show.Show Network.API.Mandrill.Users.Types.UsersInfoResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.UserStats
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.UserStats
instance GHC.Show.Show Network.API.Mandrill.Users.Types.UserStats
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.MandrillStats
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.MandrillStats
instance GHC.Show.Show Network.API.Mandrill.Users.Types.MandrillStats
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Users.Types.UsersRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Users.Types.UsersRq
instance GHC.Show.Show Network.API.Mandrill.Users.Types.UsersRq
module Network.API.Mandrill.Trans
newtype MandrillT m a
MandrillT :: ReaderT (MandrillKey, Manager) m a -> MandrillT m a
[runMandrillT] :: MandrillT m a -> ReaderT (MandrillKey, Manager) m a
type Mandrill = MandrillT IO
runMandrill :: MonadIO m => MandrillKey -> MandrillT m a -> m a
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Network.API.Mandrill.Trans.MandrillT m)
instance GHC.Base.Monad m => GHC.Base.Monad (Network.API.Mandrill.Trans.MandrillT m)
instance GHC.Base.Applicative m => GHC.Base.Applicative (Network.API.Mandrill.Trans.MandrillT m)
instance GHC.Base.Functor m => GHC.Base.Functor (Network.API.Mandrill.Trans.MandrillT m)
instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader (Network.API.Mandrill.Types.MandrillKey, Network.HTTP.Client.Types.Manager) (Network.API.Mandrill.Trans.MandrillT m)
instance Control.Monad.Trans.Class.MonadTrans Network.API.Mandrill.Trans.MandrillT
module Network.API.Mandrill.Settings
mandrillUrl :: Text
data MandrillCalls
UsersInfo :: MandrillCalls
UsersPing :: MandrillCalls
UsersPing2 :: MandrillCalls
UsersSenders :: MandrillCalls
MessagesSend :: MandrillCalls
MessagesSendTemplate :: MandrillCalls
MessagesSearch :: MandrillCalls
RoutesAdd :: MandrillCalls
DomainsAdd :: MandrillCalls
VerifyDomain :: MandrillCalls
class MandrillEndpoint ep
toUrl :: MandrillEndpoint ep => ep -> Text
instance GHC.Show.Show Network.API.Mandrill.Settings.MandrillCalls
instance Network.API.Mandrill.Settings.MandrillEndpoint Network.API.Mandrill.Settings.MandrillCalls
module Network.API.Mandrill.Messages.Types
data MessagesSendRq
MessagesSendRq :: MandrillKey -> MandrillMessage -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> MessagesSendRq
[_msrq_key] :: MessagesSendRq -> MandrillKey
[_msrq_message] :: MessagesSendRq -> MandrillMessage
[_msrq_async] :: MessagesSendRq -> Maybe Bool
[_msrq_ip_pool] :: MessagesSendRq -> Maybe Text
[_msrq_send_at] :: MessagesSendRq -> Maybe UTCTime
msrq_send_at :: Lens' MessagesSendRq (Maybe UTCTime)
msrq_message :: Lens' MessagesSendRq MandrillMessage
msrq_key :: Lens' MessagesSendRq MandrillKey
msrq_ip_pool :: Lens' MessagesSendRq (Maybe Text)
msrq_async :: Lens' MessagesSendRq (Maybe Bool)
data MessagesSendTemplateRq
MessagesSendTemplateRq :: MandrillKey -> Text -> [MandrillTemplateContent] -> MandrillMessage -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> MessagesSendTemplateRq
[_mstrq_key] :: MessagesSendTemplateRq -> MandrillKey
[_mstrq_template_name] :: MessagesSendTemplateRq -> Text
[_mstrq_template_content] :: MessagesSendTemplateRq -> [MandrillTemplateContent]
[_mstrq_message] :: MessagesSendTemplateRq -> MandrillMessage
[_mstrq_async] :: MessagesSendTemplateRq -> Maybe Bool
[_mstrq_ip_pool] :: MessagesSendTemplateRq -> Maybe Text
[_mstrq_send_at] :: MessagesSendTemplateRq -> Maybe UTCTime
mstrq_template_name :: Lens' MessagesSendTemplateRq Text
mstrq_template_content :: Lens' MessagesSendTemplateRq [MandrillTemplateContent]
mstrq_send_at :: Lens' MessagesSendTemplateRq (Maybe UTCTime)
mstrq_message :: Lens' MessagesSendTemplateRq MandrillMessage
mstrq_key :: Lens' MessagesSendTemplateRq MandrillKey
mstrq_ip_pool :: Lens' MessagesSendTemplateRq (Maybe Text)
mstrq_async :: Lens' MessagesSendTemplateRq (Maybe Bool)
data MessagesResponse
MessagesResponse :: !Text -> MandrillEmailStatus -> Maybe MandrillRejectReason -> !Text -> MessagesResponse
-- | The email address of the recipient
[_mres_email] :: MessagesResponse -> !Text
-- | The sending status of the recipient
[_mres_status] :: MessagesResponse -> MandrillEmailStatus
-- | The reason for the rejection if the recipient status is "rejected"
[_mres_reject_reason] :: MessagesResponse -> Maybe MandrillRejectReason
-- | The message's unique id
[_mres__id] :: MessagesResponse -> !Text
mres_status :: Lens' MessagesResponse MandrillEmailStatus
mres_reject_reason :: Lens' MessagesResponse (Maybe MandrillRejectReason)
mres_email :: Lens' MessagesResponse Text
mres__id :: Lens' MessagesResponse Text
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Messages.Types.MessagesResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Messages.Types.MessagesResponse
instance GHC.Show.Show Network.API.Mandrill.Messages.Types.MessagesResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Messages.Types.MessagesSendTemplateRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Messages.Types.MessagesSendTemplateRq
instance GHC.Show.Show Network.API.Mandrill.Messages.Types.MessagesSendTemplateRq
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Messages.Types.MessagesSendRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Messages.Types.MessagesSendRq
instance GHC.Show.Show Network.API.Mandrill.Messages.Types.MessagesSendRq
module Network.API.Mandrill.Inbound
data DomainAddRq
DomainAddRq :: MandrillKey -> Text -> DomainAddRq
[_darq_key] :: DomainAddRq -> MandrillKey
[_darq_domain] :: DomainAddRq -> Text
darq_key :: Lens' DomainAddRq MandrillKey
darq_domain :: Lens' DomainAddRq Text
data DomainAddResponse
DomainAddResponse :: Text -> MandrillDate -> Bool -> DomainAddResponse
[_dares_domain] :: DomainAddResponse -> Text
[_dares_created_at] :: DomainAddResponse -> MandrillDate
[_dares_valid_mx] :: DomainAddResponse -> Bool
dares_valid_mx :: Lens' DomainAddResponse Bool
dares_domain :: Lens' DomainAddResponse Text
dares_created_at :: Lens' DomainAddResponse MandrillDate
data RouteAddResponse
RouteAddResponse :: Text -> Text -> Text -> RouteAddResponse
[_rares_id] :: RouteAddResponse -> Text
[_rares_pattern] :: RouteAddResponse -> Text
[_rares_url] :: RouteAddResponse -> Text
rares_url :: Lens' RouteAddResponse Text
rares_pattern :: Lens' RouteAddResponse Text
rares_id :: Lens' RouteAddResponse Text
data RouteAddRq
RouteAddRq :: Text -> Text -> Text -> Text -> RouteAddRq
[_rarq_key] :: RouteAddRq -> Text
[_rarq_domain] :: RouteAddRq -> Text
[_rarq_pattern] :: RouteAddRq -> Text
[_rarq_url] :: RouteAddRq -> Text
rarq_url :: Lens' RouteAddRq Text
rarq_pattern :: Lens' RouteAddRq Text
rarq_key :: Lens' RouteAddRq Text
rarq_domain :: Lens' RouteAddRq Text
addDomain :: MandrillKey -> Text -> Maybe Manager -> IO (MandrillResponse DomainAddResponse)
addRoute :: MandrillKey -> Text -> Text -> Text -> Maybe Manager -> IO (MandrillResponse RouteAddResponse)
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Inbound.RouteAddRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Inbound.RouteAddRq
instance GHC.Show.Show Network.API.Mandrill.Inbound.RouteAddRq
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Inbound.RouteAddResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Inbound.RouteAddResponse
instance GHC.Show.Show Network.API.Mandrill.Inbound.RouteAddResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Inbound.DomainAddResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Inbound.DomainAddResponse
instance GHC.Show.Show Network.API.Mandrill.Inbound.DomainAddResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Inbound.DomainAddRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Inbound.DomainAddRq
instance GHC.Show.Show Network.API.Mandrill.Inbound.DomainAddRq
module Network.API.Mandrill.Messages
-- | Send a new transactional message through Mandrill
send :: MandrillKey -> MandrillMessage -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> Maybe Manager -> IO (MandrillResponse [MessagesResponse])
-- | Send a new transactional message through Mandrill using a template
sendTemplate :: MandrillKey -> MandrillTemplate -> [MandrillTemplateContent] -> MandrillMessage -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> Maybe Manager -> IO (MandrillResponse [MessagesResponse])
module Network.API.Mandrill.Senders
data VerifyDomainRq
VerifyDomainRq :: MandrillKey -> Text -> Text -> VerifyDomainRq
[_vdrq_key] :: VerifyDomainRq -> MandrillKey
[_vdrq_domain] :: VerifyDomainRq -> Text
[_vdrq_mailbox] :: VerifyDomainRq -> Text
vdrq_mailbox :: Lens' VerifyDomainRq Text
vdrq_key :: Lens' VerifyDomainRq MandrillKey
vdrq_domain :: Lens' VerifyDomainRq Text
data VerifyDomainResponse
VerifyDomainResponse :: Text -> Text -> MandrillEmail -> VerifyDomainResponse
[_vdres_status] :: VerifyDomainResponse -> Text
[_vdres_domain] :: VerifyDomainResponse -> Text
[_vdres_email] :: VerifyDomainResponse -> MandrillEmail
vdres_status :: Lens' VerifyDomainResponse Text
vdres_email :: Lens' VerifyDomainResponse MandrillEmail
vdres_domain :: Lens' VerifyDomainResponse Text
verifyDomain :: MandrillKey -> EmailAddress -> Maybe Manager -> IO (MandrillResponse VerifyDomainResponse)
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Senders.VerifyDomainResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Senders.VerifyDomainResponse
instance GHC.Show.Show Network.API.Mandrill.Senders.VerifyDomainResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Senders.VerifyDomainRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Senders.VerifyDomainRq
instance GHC.Show.Show Network.API.Mandrill.Senders.VerifyDomainRq
module Network.API.Mandrill.Users
-- | Return the information about the API-connected user
info :: MandrillKey -> Maybe Manager -> IO (MandrillResponse UsersInfoResponse)
-- | Validate an API key and respond to a ping
ping :: MandrillKey -> Maybe Manager -> IO (MandrillResponse UsersPingResponse)
-- | Validate an API key and respond to a ping (anal JSON parser version)
ping2 :: MandrillKey -> Maybe Manager -> IO (MandrillResponse UsersPing2Response)
-- | Return the senders that have tried to use this account, both verified
-- and unverified
senders :: MandrillKey -> Maybe Manager -> IO (MandrillResponse [UsersSendersResponse])
module Network.API.Mandrill.Webhooks
data EventHook
EventSent :: EventHook
EventDeferred :: EventHook
EventHardBounced :: EventHook
EventSoftBounced :: EventHook
EventOpened :: EventHook
EventClicked :: EventHook
EventMarkedAsSpam :: EventHook
EventUnsubscribed :: EventHook
EventRejected :: EventHook
data WebhookAddRq
WebhookAddRq :: MandrillKey -> Text -> Text -> Set EventHook -> WebhookAddRq
[_warq_key] :: WebhookAddRq -> MandrillKey
[_warq_url] :: WebhookAddRq -> Text
[_warq_description] :: WebhookAddRq -> Text
[_warq_events] :: WebhookAddRq -> Set EventHook
warq_url :: Lens' WebhookAddRq Text
warq_key :: Lens' WebhookAddRq MandrillKey
warq_events :: Lens' WebhookAddRq (Set EventHook)
warq_description :: Lens' WebhookAddRq Text
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Webhooks.WebhookAddRq
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Webhooks.WebhookAddRq
instance GHC.Show.Show Network.API.Mandrill.Webhooks.WebhookAddRq
instance GHC.Classes.Eq Network.API.Mandrill.Webhooks.EventHook
instance GHC.Classes.Ord Network.API.Mandrill.Webhooks.EventHook
instance GHC.Show.Show Network.API.Mandrill.Webhooks.EventHook
instance Data.Aeson.Types.FromJSON.FromJSON Network.API.Mandrill.Webhooks.EventHook
instance Data.Aeson.Types.ToJSON.ToJSON Network.API.Mandrill.Webhooks.EventHook
-- | This package is an attempt to expose the Mandrill JSON API in pure
-- Haskell. To do that, the library API comes in two flavours:
--
--
-- - An IO-based, low-level 1:1 mapping of the JSON API, as described
-- on the website.
-- - A handy monad transformer which can be plugged in your stack of
-- choice.
--
module Network.API.Mandrill
-- | The simplest way to use the API. All you need to provide is a valid
-- MandrillMessage and this function will send an email inside a
-- MandrillT transformer. You are not forced to use the
-- MandrillT context though. Have a look at
-- Network.API.Mandrill.Messages for an IO-based, low level
-- function for sending email.
sendEmail :: MonadIO m => MandrillMessage -> MandrillT m (MandrillResponse [MessagesResponse])
sendTextEmail :: MonadIO m => MandrillMessage -> MandrillT m (MandrillResponse [MessagesResponse])
-- | Builds an empty message, given only the email of the sender and the
-- emails of the receiver. Please note that the Subject will be
-- empty, so you need to use either newTextMessage or
-- newHtmlMessage to populate it.
emptyMessage :: EmailAddress -> [EmailAddress] -> MandrillMessage
-- | Create a new textual message. By default Mandrill doesn't require you
-- to specify the mmsg_text when sending out the JSON Payload,
-- and this function ensure it will be present.
newTextMessage :: EmailAddress -> [EmailAddress] -> Text -> Text -> MandrillMessage
-- | Create a new HTML message.
newHtmlMessage :: EmailAddress -> [EmailAddress] -> Text -> Html -> MandrillMessage
-- | Create a new template message (no HTML).
newTemplateMessage :: EmailAddress -> [EmailAddress] -> Text -> MandrillMessage
-- | Lift a computation from the IO monad.
liftIO :: MonadIO m => forall a. IO a -> m a