From 5e0e3022c03bdb32a4c855c58d260fda0c5c8921 Mon Sep 17 00:00:00 2001 From: mailslurp-sdk-bot Date: Thu, 2 May 2024 01:22:02 +0000 Subject: [PATCH] 15.19.12 - imap-get-function --- .openapi-generator-ignore | 23 + .openapi-generator/FILES | 7 + .openapi-generator/VERSION | 1 + LICENSE | 7 + README.md | 7 + SECURITY.md | 4 + SUPPORT.md | 4 + Setup.hs | 2 + lib/MailSlurp/API.hs | 1510 +++++++++++ lib/MailSlurp/Types.hs | 5048 ++++++++++++++++++++++++++++++++++++ mailslurp.cabal | 41 + stack.yaml | 12 + 12 files changed, 6666 insertions(+) create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 LICENSE create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 SUPPORT.md create mode 100644 Setup.hs create mode 100644 lib/MailSlurp/API.hs create mode 100644 lib/MailSlurp/Types.hs create mode 100644 mailslurp.cabal create mode 100644 stack.yaml diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..d9835e6 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,7 @@ +.openapi-generator-ignore +README.md +Setup.hs +lib/MailSlurp/API.hs +lib/MailSlurp/Types.hs +mailslurp.cabal +stack.yaml diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..3bff059 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.1.1 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..79326ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2024 MailSlurp Email API (Provided by Pettman OÜ, Estonia) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..010c033 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Haskell Email Library + +Send and receive emails in Haskell using MailSlurp. + +## Quick links + +- [GitHub source](https://github.com/mailslurp/mailslurp-client-haskell) diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..519979d --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,4 @@ +# Security + +This client calls the MailSlurp API endpoints. Connections should be made over secure HTTPS using your secure API Token. Do not share or commit the token if you can avoid doing so. +To report security issues or talk with MailSlurp support please email [contact@mailslurp.dev](mailto:contact@mailslurp.dev). diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..1727eec --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,4 @@ +# Support + +To report issues or talk with MailSlurp support please email [contact@mailslurp.dev](mailto:contact@mailslurp.dev). +Alternatively you can visit our [support portal](https://www.mailslurp.com/support/) or open a ticket in the corresponding [Github repository](https://www.github.com/mailslurp). diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/lib/MailSlurp/API.hs b/lib/MailSlurp/API.hs new file mode 100644 index 0000000..9d47277 --- /dev/null +++ b/lib/MailSlurp/API.hs @@ -0,0 +1,1510 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE ViewPatterns #-} +{-# OPTIONS_GHC +-fno-warn-unused-binds -fno-warn-unused-imports -freduction-depth=328 #-} + +module MailSlurp.API + -- * Client and Server + ( Config(..) + , MailSlurpBackend(..) + , createMailSlurpClient + , runMailSlurpServer + , runMailSlurpMiddlewareServer + , runMailSlurpClient + , runMailSlurpClientWithManager + , callMailSlurp + , MailSlurpClient + , MailSlurpClientError(..) + -- ** Servant + , MailSlurpAPI + ) where + +import MailSlurp.Types + +import Control.Monad.Catch (Exception, MonadThrow, throwM) +import Control.Monad.Except (ExceptT, runExceptT) +import Control.Monad.IO.Class +import Control.Monad.Trans.Reader (ReaderT (..)) +import Data.Aeson (Value) +import Data.Coerce (coerce) +import Data.Data (Data) +import Data.Function ((&)) +import qualified Data.Map as Map +import Data.Monoid ((<>)) +import Data.Proxy (Proxy (..)) +import Data.Set (Set) +import Data.Text (Text) +import qualified Data.Text as T +import Data.Time +import Data.UUID (UUID) +import GHC.Exts (IsString (..)) +import GHC.Generics (Generic) +import Network.HTTP.Client (Manager, newManager) +import Network.HTTP.Client.TLS (tlsManagerSettings) +import Network.HTTP.Types.Method (methodOptions) +import Network.Wai (Middleware) +import qualified Network.Wai.Handler.Warp as Warp +import Servant (ServerError, serve) +import Servant.API +import Servant.API.Verbs (StdMethod (..), Verb) +import Servant.Client (ClientEnv, Scheme (Http), ClientError, client, + mkClientEnv, parseBaseUrl) +import Servant.Client.Core (baseUrlPort, baseUrlHost) +import Servant.Client.Internal.HttpClient (ClientM (..)) +import Servant.Server (Handler (..), Application) +import Servant.Server.StaticFiles (serveDirectoryFileServer) +import Web.FormUrlEncoded +import Web.HttpApiData + + + + +-- | List of elements parsed from a query. +newtype QueryList (p :: CollectionFormat) a = QueryList + { fromQueryList :: [a] + } deriving (Functor, Applicative, Monad, Foldable, Traversable) + +-- | Formats in which a list can be encoded into a HTTP path. +data CollectionFormat + = CommaSeparated -- ^ CSV format for multiple parameters. + | SpaceSeparated -- ^ Also called "SSV" + | TabSeparated -- ^ Also called "TSV" + | PipeSeparated -- ^ `value1|value2|value2` + | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. Only for GET params. + +instance FromHttpApiData a => FromHttpApiData (QueryList 'CommaSeparated a) where + parseQueryParam = parseSeparatedQueryList ',' + +instance FromHttpApiData a => FromHttpApiData (QueryList 'TabSeparated a) where + parseQueryParam = parseSeparatedQueryList '\t' + +instance FromHttpApiData a => FromHttpApiData (QueryList 'SpaceSeparated a) where + parseQueryParam = parseSeparatedQueryList ' ' + +instance FromHttpApiData a => FromHttpApiData (QueryList 'PipeSeparated a) where + parseQueryParam = parseSeparatedQueryList '|' + +instance FromHttpApiData a => FromHttpApiData (QueryList 'MultiParamArray a) where + parseQueryParam = error "unimplemented FromHttpApiData for MultiParamArray collection format" + +parseSeparatedQueryList :: FromHttpApiData a => Char -> Text -> Either Text (QueryList p a) +parseSeparatedQueryList char = fmap QueryList . mapM parseQueryParam . T.split (== char) + +instance ToHttpApiData a => ToHttpApiData (QueryList 'CommaSeparated a) where + toQueryParam = formatSeparatedQueryList ',' + +instance ToHttpApiData a => ToHttpApiData (QueryList 'TabSeparated a) where + toQueryParam = formatSeparatedQueryList '\t' + +instance ToHttpApiData a => ToHttpApiData (QueryList 'SpaceSeparated a) where + toQueryParam = formatSeparatedQueryList ' ' + +instance ToHttpApiData a => ToHttpApiData (QueryList 'PipeSeparated a) where + toQueryParam = formatSeparatedQueryList '|' + +instance ToHttpApiData a => ToHttpApiData (QueryList 'MultiParamArray a) where + toQueryParam = error "unimplemented ToHttpApiData for MultiParamArray collection format" + +formatSeparatedQueryList :: ToHttpApiData a => Char -> QueryList p a -> Text +formatSeparatedQueryList char = T.intercalate (T.singleton char) . map toQueryParam . fromQueryList + + +-- | Servant type-level API, generated from the OpenAPI spec for MailSlurp. +type MailSlurpAPI + = "aliases" :> ReqBody '[JSON] CreateAliasOptions :> Verb 'POST 200 '[JSON] AliasDto -- 'createAlias' route + :<|> "aliases" :> Capture "aliasId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteAlias' route + :<|> "aliases" :> Capture "aliasId" UUID :> Verb 'GET 200 '[JSON] AliasDto -- 'getAlias' route + :<|> "aliases" :> Capture "aliasId" UUID :> "emails" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageEmailProjection -- 'getAliasEmails' route + :<|> "aliases" :> Capture "aliasId" UUID :> "threads" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageThreadProjection -- 'getAliasThreads' route + :<|> "aliases" :> QueryParam "search" Text :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageAlias -- 'getAliases' route + :<|> "aliases" :> "threads" :> Capture "threadId" UUID :> Verb 'GET 200 '[JSON] ThreadProjection -- 'getThread' route + :<|> "aliases" :> "threads" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageThreadProjection -- 'getThreadsPaginated' route + :<|> "aliases" :> Capture "aliasId" UUID :> "emails" :> Capture "emailId" UUID :> ReqBody '[JSON] ReplyToAliasEmailOptions :> Verb 'PUT 200 '[JSON] SentEmailDto -- 'replyToAliasEmail' route + :<|> "aliases" :> Capture "aliasId" UUID :> "emails" :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] SentEmailDto -- 'sendAliasEmail' route + :<|> "aliases" :> Capture "aliasId" UUID :> ReqBody '[JSON] UpdateAliasOptions :> Verb 'PUT 200 '[JSON] AliasDto -- 'updateAlias' route + :<|> "attachments" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllAttachments' route + :<|> "attachments" :> Capture "attachmentId" Text :> Verb 'DELETE 200 '[JSON] () -- 'deleteAttachment' route + :<|> "attachments" :> Capture "attachmentId" Text :> "base64" :> Verb 'GET 200 '[JSON] DownloadAttachmentDto -- 'downloadAttachmentAsBase64Encoded' route + :<|> "attachments" :> Capture "attachmentId" Text :> "bytes" :> Verb 'GET 200 '[JSON] Text -- 'downloadAttachmentAsBytes' route + :<|> "attachments" :> Capture "attachmentId" Text :> Verb 'GET 200 '[JSON] AttachmentEntity -- 'getAttachment' route + :<|> "attachments" :> Capture "attachmentId" Text :> "metadata" :> Verb 'GET 200 '[JSON] AttachmentMetaData -- 'getAttachmentInfo' route + :<|> "attachments" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "fileNameFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] PageAttachmentEntity -- 'getAttachments' route + :<|> "attachments" :> ReqBody '[JSON] UploadAttachmentOptions :> Verb 'POST 200 '[JSON] [Text] -- 'uploadAttachment' route + :<|> "attachments" :> "bytes" :> QueryParam "contentType" Text :> QueryParam "contentId" Text :> QueryParam "filename" Text :> Header "contentType" Text :> Header "filename" Text :> Verb 'POST 200 '[JSON] [Text] -- 'uploadAttachmentBytes' route + :<|> "attachments" :> "multipart" :> QueryParam "contentId" Text :> QueryParam "contentType" Text :> QueryParam "filename" Text :> QueryParam "x-filename" Text :> ReqBody '[JSON] InlineObject :> Verb 'POST 200 '[JSON] [Text] -- 'uploadMultipartForm' route + :<|> "bounce" :> "filter-recipients" :> ReqBody '[JSON] FilterBouncedRecipientsOptions :> Verb 'POST 200 '[JSON] FilterBouncedRecipientsResult -- 'filterBouncedRecipient' route + :<|> "bounce" :> "account-block" :> Verb 'GET 200 '[JSON] AccountBounceBlockDto -- 'getAccountBounceBlockStatus' route + :<|> "bounce" :> "emails" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] BouncedEmailDto -- 'getBouncedEmail' route + :<|> "bounce" :> "emails" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageBouncedEmail -- 'getBouncedEmails' route + :<|> "bounce" :> "recipients" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] BouncedRecipientDto -- 'getBouncedRecipient' route + :<|> "bounce" :> "recipients" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageBouncedRecipients -- 'getBouncedRecipients' route + :<|> "bounce" :> "complaints" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] Complaint -- 'getComplaint' route + :<|> "bounce" :> "complaints" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageComplaint -- 'getComplaints' route + :<|> "bounce" :> "list-unsubscribe-recipients" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "domainId" UUID :> Verb 'GET 200 '[JSON] PageListUnsubscribeRecipients -- 'getListUnsubscribeRecipients' route + :<|> "bulk" :> "inboxes" :> QueryParam "count" Int :> Verb 'POST 200 '[JSON] [InboxDto] -- 'bulkCreateInboxes' route + :<|> "bulk" :> "inboxes" :> ReqBody '[JSON] [UUID] :> Verb 'DELETE 200 '[JSON] () -- 'bulkDeleteInboxes' route + :<|> "bulk" :> "send" :> ReqBody '[JSON] BulkSendEmailOptions :> Verb 'POST 200 '[JSON] () -- 'bulkSendEmails' route + :<|> "newEmailAddress" :> QueryParam "allowTeamAccess" Bool :> QueryParam "useDomainPool" Bool :> QueryParam "expiresAt" UTCTime :> QueryParam "expiresIn" Integer :> QueryParam "emailAddress" Text :> QueryParam "inboxType" Text :> QueryParam "description" Text :> QueryParam "name" Text :> QueryParam "tags" (QueryList 'MultiParamArray (Text)) :> QueryParam "favourite" Bool :> QueryParam "virtualInbox" Bool :> QueryParam "useShortAddress" Bool :> QueryParam "domainName" Text :> QueryParam "domainId" UUID :> QueryParam "prefix" Text :> Verb 'POST 200 '[JSON] InboxDto -- 'createNewEmailAddress' route + :<|> "createInbox" :> QueryParam "allowTeamAccess" Bool :> QueryParam "useDomainPool" Bool :> QueryParam "expiresAt" UTCTime :> QueryParam "expiresIn" Integer :> QueryParam "emailAddress" Text :> QueryParam "inboxType" Text :> QueryParam "description" Text :> QueryParam "name" Text :> QueryParam "tags" (QueryList 'MultiParamArray (Text)) :> QueryParam "favourite" Bool :> QueryParam "virtualInbox" Bool :> QueryParam "useShortAddress" Bool :> QueryParam "domainName" Text :> QueryParam "domainId" UUID :> QueryParam "prefix" Text :> Verb 'POST 200 '[JSON] InboxDto -- 'createRandomInbox' route + :<|> "deleteEmailAddress" :> QueryParam "inboxId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteEmailAddress' route + :<|> "emptyInbox" :> QueryParam "inboxId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'emptyInbox' route + :<|> "sendEmailQuery" :> QueryParam "senderId" UUID :> QueryParam "to" Text :> QueryParam "body" Text :> QueryParam "subject" Text :> Verb 'POST 200 '[JSON] () -- 'sendEmailQuery' route + :<|> "sendEmail" :> ReqBody '[JSON] SimpleSendEmailOptions :> Verb 'POST 200 '[JSON] () -- 'sendEmailSimple' route + :<|> "connectors" :> ReqBody '[JSON] CreateConnectorOptions :> Verb 'POST 200 '[JSON] ConnectorDto -- 'createConnector' route + :<|> "connectors" :> Capture "id" UUID :> "imap" :> ReqBody '[JSON] CreateConnectorImapConnectionOptions :> Verb 'POST 200 '[JSON] ConnectorImapConnectionDto -- 'createConnectorImapConnection' route + :<|> "connectors" :> Capture "id" UUID :> "smtp" :> ReqBody '[JSON] CreateConnectorSmtpConnectionOptions :> Verb 'POST 200 '[JSON] ConnectorSmtpConnectionDto -- 'createConnectorSmtpConnection' route + :<|> "connectors" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllConnector' route + :<|> "connectors" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteConnector' route + :<|> "connectors" :> Capture "id" UUID :> "imap" :> Verb 'DELETE 200 '[JSON] () -- 'deleteConnectorImapConnection' route + :<|> "connectors" :> Capture "id" UUID :> "smtp" :> Verb 'DELETE 200 '[JSON] () -- 'deleteConnectorSmtpConnection' route + :<|> "connectors" :> "events" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageConnectorSyncEvents -- 'getAllConnectorSyncEvents' route + :<|> "connectors" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] ConnectorDto -- 'getConnector' route + :<|> "connectors" :> "events" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] ConnectorSyncEventDto -- 'getConnectorSyncEvent' route + :<|> "connectors" :> Capture "id" UUID :> "events" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageConnectorSyncEvents -- 'getConnectorSyncEvents' route + :<|> "connectors" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageConnector -- 'getConnectors' route + :<|> "connectors" :> Capture "id" UUID :> "sync" :> Verb 'POST 200 '[JSON] ConnectorSyncRequestResult -- 'syncConnector' route + :<|> "connectors" :> Capture "id" UUID :> ReqBody '[JSON] CreateConnectorOptions :> Verb 'PUT 200 '[JSON] ConnectorDto -- 'updateConnector' route + :<|> "contacts" :> ReqBody '[JSON] CreateContactOptions :> Verb 'POST 200 '[JSON] ContactDto -- 'createContact' route + :<|> "contacts" :> Capture "contactId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteContact' route + :<|> "contacts" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "search" Text :> Verb 'GET 200 '[JSON] PageContactProjection -- 'getAllContacts' route + :<|> "contacts" :> Capture "contactId" UUID :> Verb 'GET 200 '[JSON] ContactDto -- 'getContact' route + :<|> "contacts" :> Capture "contactId" UUID :> "download" :> Verb 'GET 200 '[JSON] () -- 'getContactVCard' route + :<|> "contacts" :> Verb 'GET 200 '[JSON] [ContactProjection] -- 'getContacts' route + :<|> "domains" :> Capture "id" UUID :> "wildcard" :> Verb 'POST 200 '[JSON] DomainDto -- 'addDomainWildcardCatchAll' route + :<|> "domains" :> ReqBody '[JSON] CreateDomainOptions :> Verb 'POST 200 '[JSON] DomainDto -- 'createDomain' route + :<|> "domains" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] [Text] -- 'deleteDomain' route + :<|> "domains" :> "available-domains" :> QueryParam "inboxType" Text :> Verb 'GET 200 '[JSON] DomainGroupsDto -- 'getAvailableDomains' route + :<|> "domains" :> Capture "id" UUID :> QueryParam "checkForErrors" Bool :> Verb 'GET 200 '[JSON] DomainDto -- 'getDomain' route + :<|> "domains" :> "issues" :> Verb 'GET 200 '[JSON] DomainIssuesDto -- 'getDomainIssues' route + :<|> "domains" :> Capture "id" UUID :> "wildcard" :> Verb 'GET 200 '[JSON] InboxDto -- 'getDomainWildcardCatchAllInbox' route + :<|> "domains" :> Verb 'GET 200 '[JSON] [DomainPreview] -- 'getDomains' route + :<|> "domains" :> "mailslurp-domains" :> QueryParam "inboxType" Text :> Verb 'GET 200 '[JSON] DomainGroupsDto -- 'getMailSlurpDomains' route + :<|> "domains" :> Capture "id" UUID :> ReqBody '[JSON] UpdateDomainOptions :> Verb 'PUT 200 '[JSON] DomainDto -- 'updateDomain' route + :<|> "emails" :> Capture "emailId" UUID :> "imap-flag-operation" :> ReqBody '[JSON] ImapFlagOperationOptions :> Verb 'POST 200 '[JSON] EmailPreview -- 'applyImapFlagOperation' route + :<|> "emails" :> "can-send" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] CanSendEmailResults -- 'canSend' route + :<|> "emails" :> Capture "emailId" UUID :> "check-email-body" :> Verb 'POST 200 '[JSON] CheckEmailBodyResults -- 'checkEmailBody' route + :<|> "emails" :> Capture "emailId" UUID :> "check-email-body-feature-support" :> Verb 'POST 200 '[JSON] CheckEmailBodyFeatureSupportResults -- 'checkEmailBodyFeatureSupport' route + :<|> "emails" :> "check-email-client-support" :> ReqBody '[JSON] CheckEmailClientSupportOptions :> Verb 'POST 200 '[JSON] CheckEmailClientSupportResults -- 'checkEmailClientSupport' route + :<|> "emails" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllEmails' route + :<|> "emails" :> Capture "emailId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteEmail' route + :<|> "emails" :> Capture "emailId" UUID :> "attachments" :> Capture "attachmentId" Text :> QueryParam "apiKey" Text :> Verb 'GET 200 '[JSON] Text -- 'downloadAttachment' route + :<|> "emails" :> Capture "emailId" UUID :> "attachments" :> Capture "attachmentId" Text :> "base64" :> Verb 'GET 200 '[JSON] DownloadAttachmentDto -- 'downloadAttachmentBase64' route + :<|> "emails" :> Capture "emailId" UUID :> "body" :> Verb 'GET 200 '[JSON] Text -- 'downloadBody' route + :<|> "emails" :> Capture "emailId" UUID :> "body-bytes" :> Verb 'GET 200 '[JSON] Text -- 'downloadBodyBytes' route + :<|> "emails" :> Capture "emailId" UUID :> "forward" :> ReqBody '[JSON] ForwardEmailOptions :> Verb 'POST 200 '[JSON] SentEmailDto -- 'forwardEmail' route + :<|> "emails" :> Capture "emailId" UUID :> "attachments" :> Capture "attachmentId" Text :> "metadata" :> Verb 'GET 200 '[JSON] AttachmentMetaData -- 'getAttachmentMetaData' route + :<|> "emails" :> Capture "emailId" UUID :> QueryParam "decode" Bool :> Verb 'GET 200 '[JSON] Email -- 'getEmail' route + :<|> "emails" :> Capture "emailId" UUID :> "attachments" :> Verb 'GET 200 '[JSON] [AttachmentMetaData] -- 'getEmailAttachments' route + :<|> "emails" :> Capture "emailId" UUID :> "contentMatch" :> ReqBody '[JSON] ContentMatchOptions :> Verb 'POST 200 '[JSON] EmailContentMatchResult -- 'getEmailContentMatch' route + :<|> "emails" :> Capture "emailId" UUID :> "contentPart" :> QueryParam "contentType" Text :> Verb 'GET 200 '[JSON] EmailContentPartResult -- 'getEmailContentPart' route + :<|> "emails" :> "emails" :> "count" :> Verb 'GET 200 '[JSON] CountDto -- 'getEmailCount' route + :<|> "emails" :> Capture "emailId" UUID :> "html" :> QueryParam "decode" Bool :> QueryParam "replaceCidImages" Bool :> Verb 'GET 200 '[JSON] Text -- 'getEmailHTML' route + :<|> "emails" :> Capture "emailId" UUID :> "html" :> "json" :> QueryParam "decode" Bool :> QueryParam "replaceCidImages" Bool :> Verb 'GET 200 '[JSON] EmailHtmlDto -- 'getEmailHTMLJson' route + :<|> "emails" :> Capture "emailId" UUID :> "htmlQuery" :> QueryParam "htmlSelector" Text :> Verb 'GET 200 '[JSON] EmailTextLinesResult -- 'getEmailHTMLQuery' route + :<|> "emails" :> Capture "emailId" UUID :> "links" :> Verb 'GET 200 '[JSON] EmailLinksResult -- 'getEmailLinks' route + :<|> "emails" :> Capture "emailId" UUID :> "urls" :> Verb 'GET 200 '[JSON] EmailPreviewUrls -- 'getEmailPreviewURLs' route + :<|> "emails" :> Capture "emailId" UUID :> "screenshot" :> "base64" :> ReqBody '[JSON] GetEmailScreenshotOptions :> Verb 'POST 200 '[JSON] EmailScreenshotResult -- 'getEmailScreenshotAsBase64' route + :<|> "emails" :> Capture "emailId" UUID :> "screenshot" :> "binary" :> ReqBody '[JSON] GetEmailScreenshotOptions :> Verb 'POST 200 '[JSON] () -- 'getEmailScreenshotAsBinary' route + :<|> "emails" :> Capture "emailId" UUID :> "textLines" :> QueryParam "decodeHtmlEntities" Bool :> QueryParam "lineSeparator" Text :> Verb 'GET 200 '[JSON] EmailTextLinesResult -- 'getEmailTextLines' route + :<|> "emails" :> "offset-paginated" :> QueryParam "inboxId" (QueryList 'MultiParamArray (UUID)) :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "unreadOnly" Bool :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageEmailProjection -- 'getEmailsOffsetPaginated' route + :<|> "emails" :> QueryParam "inboxId" (QueryList 'MultiParamArray (UUID)) :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "unreadOnly" Bool :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageEmailProjection -- 'getEmailsPaginated' route + :<|> "emails" :> "gravatarFor" :> QueryParam "emailAddress" Text :> QueryParam "size" Text :> Verb 'GET 200 '[JSON] GravatarUrl -- 'getGravatarUrlForEmailAddress' route + :<|> "emails" :> "latest" :> QueryParam "inboxIds" (QueryList 'MultiParamArray (UUID)) :> Verb 'GET 200 '[JSON] Email -- 'getLatestEmail' route + :<|> "emails" :> "latestIn" :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] Email -- 'getLatestEmailInInbox1' route + :<|> "emails" :> "organization" :> QueryParam "inboxId" (QueryList 'MultiParamArray (UUID)) :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "unreadOnly" Bool :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageEmailProjection -- 'getOrganizationEmailsPaginated' route + :<|> "emails" :> Capture "emailId" UUID :> "raw" :> Verb 'GET 200 '[JSON] () -- 'getRawEmailContents' route + :<|> "emails" :> Capture "emailId" UUID :> "raw" :> "json" :> Verb 'GET 200 '[JSON] RawEmailJson -- 'getRawEmailJson' route + :<|> "emails" :> "unreadCount" :> Verb 'GET 200 '[JSON] UnreadCount -- 'getUnreadEmailCount' route + :<|> "emails" :> Capture "emailId" UUID :> "read" :> QueryParam "read" Bool :> Verb 'PATCH 200 '[JSON] EmailPreview -- 'markAsRead' route + :<|> "emails" :> Capture "emailId" UUID :> ReqBody '[JSON] ReplyToEmailOptions :> Verb 'PUT 200 '[JSON] SentEmailDto -- 'replyToEmail' route + :<|> "emails" :> "search" :> ReqBody '[JSON] SearchEmailsOptions :> Verb 'POST 200 '[JSON] PageEmailProjection -- 'searchEmails' route + :<|> "emails" :> QueryParam "inboxId" UUID :> QueryParam "useDomainPool" Bool :> QueryParam "virtualSend" Bool :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] () -- 'sendEmailSourceOptional' route + :<|> "emails" :> Capture "emailId" UUID :> "validate" :> Verb 'POST 200 '[JSON] ValidationDto -- 'validateEmail' route + :<|> "email-verification" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllValidationRequests' route + :<|> "email-verification" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteValidationRequest' route + :<|> "email-verification" :> "validation-requests" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "isValid" Bool :> Verb 'GET 200 '[JSON] PageEmailValidationRequest -- 'getValidationRequests' route + :<|> "email-verification" :> "email-address-list" :> ReqBody '[JSON] ValidateEmailAddressListOptions :> Verb 'POST 200 '[JSON] ValidateEmailAddressListResult -- 'validateEmailAddressList' route + :<|> "expired" :> "defaults" :> Verb 'GET 200 '[JSON] ExpirationDefaults -- 'getExpirationDefaults' route + :<|> "expired" :> "inbox" :> Capture "inboxId" UUID :> Verb 'GET 200 '[JSON] ExpiredInboxDto -- 'getExpiredInboxByInboxId' route + :<|> "expired" :> Capture "expiredId" UUID :> Verb 'GET 200 '[JSON] ExpiredInboxDto -- 'getExpiredInboxRecord' route + :<|> "expired" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageExpiredInboxRecordProjection -- 'getExpiredInboxes' route + :<|> "export" :> QueryParam "exportType" Text :> QueryParam "apiKey" Text :> QueryParam "outputFormat" Text :> QueryParam "filter" Text :> QueryParam "listSeparatorToken" Text :> QueryParam "excludePreviouslyExported" Bool :> QueryParam "createdEarliestTime" UTCTime :> QueryParam "createdOldestTime" UTCTime :> Verb 'GET 200 '[JSON] Text -- 'exportEntities' route + :<|> "export" :> QueryParam "exportType" Text :> QueryParam "apiKey" Text :> ReqBody '[JSON] ExportOptions :> Verb 'POST 200 '[JSON] ExportLink -- 'getExportLink' route + :<|> "forms" :> QueryParam "_to" Text :> QueryParam "_subject" Text :> QueryParam "_redirectTo" Text :> QueryParam "_emailAddress" Text :> QueryParam "_successMessage" Text :> QueryParam "_spamCheck" Text :> QueryParam "otherParameters" Text :> Verb 'POST 200 '[JSON] Text -- 'submitForm' route + :<|> "groups" :> Capture "groupId" UUID :> "contacts" :> ReqBody '[JSON] UpdateGroupContacts :> Verb 'PUT 200 '[JSON] GroupContactsDto -- 'addContactsToGroup' route + :<|> "groups" :> ReqBody '[JSON] CreateGroupOptions :> Verb 'POST 200 '[JSON] GroupDto -- 'createGroup' route + :<|> "groups" :> Capture "groupId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteGroup' route + :<|> "groups" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageGroupProjection -- 'getAllGroups' route + :<|> "groups" :> Capture "groupId" UUID :> Verb 'GET 200 '[JSON] GroupDto -- 'getGroup' route + :<|> "groups" :> Capture "groupId" UUID :> "contacts" :> Verb 'GET 200 '[JSON] GroupContactsDto -- 'getGroupWithContacts' route + :<|> "groups" :> Capture "groupId" UUID :> "contacts-paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageContactProjection -- 'getGroupWithContactsPaginated' route + :<|> "groups" :> Verb 'GET 200 '[JSON] [GroupProjection] -- 'getGroups' route + :<|> "groups" :> Capture "groupId" UUID :> "contacts" :> ReqBody '[JSON] UpdateGroupContacts :> Verb 'DELETE 200 '[JSON] GroupContactsDto -- 'removeContactsFromGroup' route + :<|> "imap" :> "server" :> "fetch" :> QueryParam "inboxId" UUID :> QueryParam "seqNum" Integer :> Verb 'POST 200 '[JSON] ImapServerFetchResult -- 'imapServerFetch' route + :<|> "imap" :> "server" :> "get" :> QueryParam "emailId" UUID :> QueryParam "inboxId" UUID :> Verb 'POST 200 '[JSON] ImapServerGetResult -- 'imapServerGet' route + :<|> "imap" :> "server" :> "list" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] ImapServerListOptions :> Verb 'POST 200 '[JSON] ImapServerListResult -- 'imapServerList' route + :<|> "imap" :> "server" :> "search" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] ImapServerSearchOptions :> Verb 'POST 200 '[JSON] ImapServerSearchResult -- 'imapServerSearch' route + :<|> "imap" :> "server" :> "status" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] ImapServerStatusOptions :> Verb 'POST 200 '[JSON] ImapServerStatusResult -- 'imapServerStatus' route + :<|> "imap" :> "server" :> "update-flags" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] ImapUpdateFlagsOptions :> Verb 'POST 200 '[JSON] () -- 'imapServerUpdateFlags' route + :<|> "inboxes" :> "scheduled-jobs" :> Capture "jobId" UUID :> Verb 'DELETE 200 '[JSON] ScheduledJobDto -- 'cancelScheduledJob' route + :<|> "inboxes" :> QueryParam "emailAddress" Text :> QueryParam "tags" (QueryList 'MultiParamArray (Text)) :> QueryParam "name" Text :> QueryParam "description" Text :> QueryParam "useDomainPool" Bool :> QueryParam "favourite" Bool :> QueryParam "expiresAt" UTCTime :> QueryParam "expiresIn" Integer :> QueryParam "allowTeamAccess" Bool :> QueryParam "inboxType" Text :> QueryParam "virtualInbox" Bool :> QueryParam "useShortAddress" Bool :> QueryParam "domainId" UUID :> QueryParam "domainName" Text :> QueryParam "prefix" Text :> Verb 'POST 200 '[JSON] InboxDto -- 'createInbox' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "rulesets" :> ReqBody '[JSON] CreateInboxRulesetOptions :> Verb 'POST 200 '[JSON] InboxRulesetDto -- 'createInboxRuleset' route + :<|> "inboxes" :> "withDefaults" :> Verb 'POST 200 '[JSON] InboxDto -- 'createInboxWithDefaults' route + :<|> "inboxes" :> "withOptions" :> ReqBody '[JSON] CreateInboxDto :> Verb 'POST 200 '[JSON] InboxDto -- 'createInboxWithOptions' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "deleteAllInboxEmails" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllInboxEmails' route + :<|> "inboxes" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllInboxes' route + :<|> "inboxes" :> "by-description" :> QueryParam "description" Text :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllInboxesByDescription' route + :<|> "inboxes" :> "by-name" :> QueryParam "name" Text :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllInboxesByName' route + :<|> "inboxes" :> "by-tag" :> QueryParam "tag" Text :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllInboxesByTag' route + :<|> "inboxes" :> Capture "inboxId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInbox' route + :<|> "inboxes" :> "exists" :> QueryParam "emailAddress" Text :> QueryParam "allowCatchAll" Bool :> Verb 'GET 200 '[JSON] InboxExistsDto -- 'doesInboxExist' route + :<|> "inboxes" :> "expired" :> QueryParam "before" UTCTime :> Verb 'DELETE 200 '[JSON] FlushExpiredInboxesResult -- 'flushExpired' route + :<|> "inboxes" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "favourite" Bool :> QueryParam "search" Text :> QueryParam "tag" Text :> QueryParam "teamAccess" Bool :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "inboxType" Text :> QueryParam "inboxFunction" Text :> QueryParam "domainId" UUID :> Verb 'GET 200 '[JSON] PageInboxProjection -- 'getAllInboxes' route + :<|> "inboxes" :> "offset-paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "favourite" Bool :> QueryParam "search" Text :> QueryParam "tag" Text :> QueryParam "teamAccess" Bool :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "inboxType" Text :> QueryParam "inboxFunction" Text :> QueryParam "domainId" UUID :> Verb 'GET 200 '[JSON] PageInboxProjection -- 'getAllInboxesOffsetPaginated' route + :<|> "inboxes" :> "scheduled-jobs" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageScheduledJobs -- 'getAllScheduledJobs' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "delivery-status" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageDeliveryStatus -- 'getDeliveryStatusesByInboxId' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "emails" :> QueryParam "size" Int :> QueryParam "limit" Int :> QueryParam "sort" Text :> QueryParam "retryTimeout" Integer :> QueryParam "delayTimeout" Integer :> QueryParam "minCount" Integer :> QueryParam "unreadOnly" Bool :> QueryParam "before" UTCTime :> QueryParam "since" UTCTime :> Verb 'GET 200 '[JSON] [EmailPreview] -- 'getEmails' route + :<|> "inboxes" :> "imap-access" :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] ImapAccessDetails -- 'getImapAccess' route + :<|> "inboxes" :> "imap-smtp-access" :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] ImapSmtpAccessDetails -- 'getImapSmtpAccess' route + :<|> "inboxes" :> "imap-smtp-access" :> "env" :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] Text -- 'getImapSmtpAccessEnv' route + :<|> "inboxes" :> Capture "inboxId" UUID :> Verb 'GET 200 '[JSON] InboxDto -- 'getInbox' route + :<|> "inboxes" :> "byEmailAddress" :> QueryParam "emailAddress" Text :> Verb 'GET 200 '[JSON] InboxByEmailAddressResult -- 'getInboxByEmailAddress' route + :<|> "inboxes" :> "byName" :> QueryParam "name" Text :> Verb 'GET 200 '[JSON] InboxByNameResult -- 'getInboxByName' route + :<|> "inboxes" :> "count" :> Verb 'GET 200 '[JSON] CountDto -- 'getInboxCount' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "emails" :> "count" :> Verb 'GET 200 '[JSON] CountDto -- 'getInboxEmailCount' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "emails" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageEmailPreview -- 'getInboxEmailsPaginated' route + :<|> "inboxes" :> "ids" :> Verb 'GET 200 '[JSON] InboxIdsResult -- 'getInboxIds' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "sent" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageSentEmailProjection -- 'getInboxSentEmails' route + :<|> "inboxes" :> "tags" :> Verb 'GET 200 '[JSON] [Text] -- 'getInboxTags' route + :<|> "inboxes" :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "excludeCatchAllInboxes" Bool :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] [InboxDto] -- 'getInboxes' route + :<|> "inboxes" :> "getLatestEmail" :> QueryParam "inboxId" UUID :> QueryParam "timeoutMillis" Integer :> Verb 'GET 200 '[JSON] Email -- 'getLatestEmailInInbox' route + :<|> "inboxes" :> "organization" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageOrganizationInboxProjection -- 'getOrganizationInboxes' route + :<|> "inboxes" :> "scheduled-jobs" :> Capture "jobId" UUID :> Verb 'GET 200 '[JSON] ScheduledJobDto -- 'getScheduledJob' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "scheduled-jobs" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageScheduledJobs -- 'getScheduledJobsByInboxId' route + :<|> "inboxes" :> "smtp-access" :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] SmtpAccessDetails -- 'getSmtpAccess' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "rulesets" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageInboxRulesetDto -- 'listInboxRulesets' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "tracking-pixels" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageTrackingPixelProjection -- 'listInboxTrackingPixels' route + :<|> "inboxes" :> "search" :> ReqBody '[JSON] SearchInboxesOptions :> Verb 'POST 200 '[JSON] PageInboxProjection -- 'searchInboxes' route + :<|> "inboxes" :> Capture "inboxId" UUID :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] () -- 'sendEmail' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "confirm" :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] SentEmailDto -- 'sendEmailAndConfirm' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "with-queue" :> QueryParam "validateBeforeEnqueue" Bool :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] () -- 'sendEmailWithQueue' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "smtp-envelope" :> ReqBody '[JSON] SendSMTPEnvelopeOptions :> Verb 'POST 200 '[JSON] SentEmailDto -- 'sendSmtpEnvelope' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "send-test-email" :> Verb 'POST 200 '[JSON] () -- 'sendTestEmail' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "with-schedule" :> QueryParam "sendAtTimestamp" UTCTime :> QueryParam "sendAtNowPlusSeconds" Integer :> QueryParam "validateBeforeEnqueue" Bool :> ReqBody '[JSON] SendEmailOptions :> Verb 'POST 200 '[JSON] ScheduledJobDto -- 'sendWithSchedule' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "favourite" :> ReqBody '[JSON] SetInboxFavouritedOptions :> Verb 'PUT 200 '[JSON] InboxDto -- 'setInboxFavourited' route + :<|> "inboxes" :> Capture "inboxId" UUID :> ReqBody '[JSON] UpdateInboxOptions :> Verb 'PATCH 200 '[JSON] InboxDto -- 'updateInbox' route + :<|> "forwarders" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] CreateInboxForwarderOptions :> Verb 'POST 200 '[JSON] InboxForwarderDto -- 'createNewInboxForwarder' route + :<|> "forwarders" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInboxForwarder' route + :<|> "forwarders" :> QueryParam "inboxId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInboxForwarders' route + :<|> "forwarders" :> "events" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "inboxId" UUID :> QueryParam "sort" Text :> Verb 'GET 200 '[JSON] PageInboxForwarderEvents -- 'getAllInboxForwarderEvents' route + :<|> "forwarders" :> "events" :> Capture "eventId" UUID :> Verb 'GET 200 '[JSON] InboxForwarderEventDto -- 'getForwarderEvent' route + :<|> "forwarders" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] InboxForwarderDto -- 'getInboxForwarder' route + :<|> "forwarders" :> Capture "id" UUID :> "events" :> Capture "eventId" UUID :> Verb 'GET 200 '[JSON] InboxForwarderEventDto -- 'getInboxForwarderEvent' route + :<|> "forwarders" :> Capture "id" UUID :> "events" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> Verb 'GET 200 '[JSON] PageInboxForwarderEvents -- 'getInboxForwarderEvents' route + :<|> "forwarders" :> QueryParam "inboxId" UUID :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageInboxForwarderDto -- 'getInboxForwarders' route + :<|> "forwarders" :> Capture "id" UUID :> "test" :> ReqBody '[JSON] InboxForwarderTestOptions :> Verb 'POST 200 '[JSON] InboxForwarderTestResult -- 'testInboxForwarder' route + :<|> "forwarders" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] InboxForwarderTestOptions :> Verb 'PUT 200 '[JSON] InboxForwarderTestResult -- 'testInboxForwardersForInbox' route + :<|> "forwarders" :> ReqBody '[JSON] TestNewInboxForwarderOptions :> Verb 'PATCH 200 '[JSON] InboxForwarderTestResult -- 'testNewInboxForwarder' route + :<|> "forwarders" :> Capture "id" UUID :> ReqBody '[JSON] CreateInboxForwarderOptions :> Verb 'PUT 200 '[JSON] InboxForwarderDto -- 'updateInboxForwarder' route + :<|> "repliers" :> ReqBody '[JSON] CreateInboxReplierOptions :> Verb 'POST 200 '[JSON] InboxReplierDto -- 'createNewInboxReplier' route + :<|> "repliers" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInboxReplier' route + :<|> "repliers" :> QueryParam "inboxId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInboxRepliers' route + :<|> "repliers" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] InboxReplierDto -- 'getInboxReplier' route + :<|> "repliers" :> Capture "id" UUID :> "events" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> Verb 'GET 200 '[JSON] PageInboxReplierEvents -- 'getInboxReplierEvents' route + :<|> "repliers" :> QueryParam "inboxId" UUID :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageInboxReplierDto -- 'getInboxRepliers' route + :<|> "repliers" :> Capture "id" UUID :> ReqBody '[JSON] UpdateInboxReplierOptions :> Verb 'PUT 200 '[JSON] InboxReplierDto -- 'updateInboxReplier' route + :<|> "rulesets" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] CreateInboxRulesetOptions :> Verb 'POST 200 '[JSON] InboxRulesetDto -- 'createNewInboxRuleset' route + :<|> "rulesets" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInboxRuleset' route + :<|> "rulesets" :> QueryParam "inboxId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteInboxRulesets' route + :<|> "rulesets" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] InboxRulesetDto -- 'getInboxRuleset' route + :<|> "rulesets" :> QueryParam "inboxId" UUID :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageInboxRulesetDto -- 'getInboxRulesets' route + :<|> "rulesets" :> Capture "id" UUID :> "test" :> ReqBody '[JSON] InboxRulesetTestOptions :> Verb 'POST 200 '[JSON] InboxRulesetTestResult -- 'testInboxRuleset' route + :<|> "rulesets" :> "test-receiving" :> ReqBody '[JSON] TestInboxRulesetReceivingOptions :> Verb 'POST 200 '[JSON] TestInboxRulesetReceivingResult -- 'testInboxRulesetReceiving' route + :<|> "rulesets" :> "test-sending" :> ReqBody '[JSON] TestInboxRulesetSendingOptions :> Verb 'POST 200 '[JSON] TestInboxRulesetSendingResult -- 'testInboxRulesetSending' route + :<|> "rulesets" :> QueryParam "inboxId" UUID :> ReqBody '[JSON] InboxRulesetTestOptions :> Verb 'PUT 200 '[JSON] InboxRulesetTestResult -- 'testInboxRulesetsForInbox' route + :<|> "rulesets" :> ReqBody '[JSON] TestNewInboxRulesetOptions :> Verb 'PATCH 200 '[JSON] InboxRulesetTestResult -- 'testNewInboxRuleset' route + :<|> "mail-server" :> "describe" :> "domain" :> ReqBody '[JSON] DescribeDomainOptions :> Verb 'POST 200 '[JSON] DescribeMailServerDomainResult -- 'describeMailServerDomain' route + :<|> "mail-server" :> "describe" :> "dns-lookup" :> ReqBody '[JSON] DNSLookupOptions :> Verb 'POST 200 '[JSON] DNSLookupResults -- 'getDnsLookup' route + :<|> "mail-server" :> "describe" :> "dns-lookups" :> ReqBody '[JSON] DNSLookupsOptions :> Verb 'POST 200 '[JSON] DNSLookupResults -- 'getDnsLookups' route + :<|> "mail-server" :> "describe" :> "ip-address" :> QueryParam "name" Text :> Verb 'POST 200 '[JSON] IPAddressResult -- 'getIpAddress' route + :<|> "mail-server" :> "verify" :> "email-address" :> ReqBody '[JSON] VerifyEmailAddressOptions :> Verb 'POST 200 '[JSON] EmailVerificationResult -- 'verifyEmailAddress' route + :<|> "missed-emails" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] PageMissedEmailProjection -- 'getAllMissedEmails' route + :<|> "missed-emails" :> "unknown" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "inboxId" UUID :> Verb 'GET 200 '[JSON] PageUnknownMissedEmailProjection -- 'getAllUnknownMissedEmails' route + :<|> "missed-emails" :> Capture "missedEmailId" UUID :> Verb 'GET 200 '[JSON] MissedEmailDto -- 'getMissedEmail' route + :<|> "missed-emails" :> "restore" :> Verb 'POST 200 '[JSON] () -- 'restoreMissedEmails' route + :<|> "missed-emails" :> "waitForNthMissedEmail" :> QueryParam "inboxId" UUID :> QueryParam "timeout" Integer :> QueryParam "index" Int :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] MissedEmailDto -- 'waitForNthMissedEmail' route + :<|> "phone" :> "emergency-addresses" :> ReqBody '[JSON] CreateEmergencyAddressOptions :> Verb 'POST 200 '[JSON] EmergencyAddress -- 'createEmergencyAddress' route + :<|> "phone" :> "emergency-addresses" :> Capture "addressId" UUID :> Verb 'DELETE 200 '[JSON] EmptyResponseDto -- 'deleteEmergencyAddress' route + :<|> "phone" :> "numbers" :> Capture "phoneNumberId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deletePhoneNumber' route + :<|> "phone" :> "emergency-addresses" :> Capture "addressId" UUID :> Verb 'GET 200 '[JSON] EmergencyAddress -- 'getEmergencyAddress' route + :<|> "phone" :> "emergency-addresses" :> Verb 'GET 200 '[JSON] [EmergencyAddressDto] -- 'getEmergencyAddresses' route + :<|> "phone" :> "numbers" :> Capture "phoneNumberId" UUID :> Verb 'GET 200 '[JSON] PhoneNumberDto -- 'getPhoneNumber' route + :<|> "phone" :> "numbers" :> QueryParam "phoneCountry" Text :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PagePhoneNumberProjection -- 'getPhoneNumbers' route + :<|> "phone" :> "plans" :> Verb 'GET 200 '[JSON] [PhonePlanDto] -- 'getPhonePlans' route + :<|> "phone" :> "numbers" :> Capture "phoneNumberId" UUID :> "test" :> ReqBody '[JSON] TestPhoneNumberOptions :> Header "x-test-id" Text :> Verb 'POST 200 '[JSON] () -- 'testPhoneNumberSendSms' route + :<|> "sent" :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllSentEmails' route + :<|> "sent" :> Capture "id" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteSentEmail' route + :<|> "sent" :> "tracking-pixels" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageTrackingPixelProjection -- 'getAllSentTrackingPixels' route + :<|> "sent" :> Capture "emailId" UUID :> "raw" :> Verb 'GET 200 '[JSON] () -- 'getRawSentEmailContents' route + :<|> "sent" :> Capture "emailId" UUID :> "raw" :> "json" :> Verb 'GET 200 '[JSON] RawEmailJson -- 'getRawSentEmailJson' route + :<|> "sent" :> "delivery-status" :> Capture "deliveryId" UUID :> Verb 'GET 200 '[JSON] DeliveryStatusDto -- 'getSentDeliveryStatus' route + :<|> "sent" :> "delivery-status" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageDeliveryStatus -- 'getSentDeliveryStatuses' route + :<|> "sent" :> Capture "sentId" UUID :> "delivery-status" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageDeliveryStatus -- 'getSentDeliveryStatusesBySentId' route + :<|> "sent" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] SentEmailDto -- 'getSentEmail' route + :<|> "sent" :> Capture "id" UUID :> "html" :> Verb 'GET 200 '[JSON] Text -- 'getSentEmailHTMLContent' route + :<|> "sent" :> Capture "id" UUID :> "urls" :> Verb 'GET 200 '[JSON] EmailPreviewUrls -- 'getSentEmailPreviewURLs' route + :<|> "sent" :> Capture "id" UUID :> "tracking-pixels" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageTrackingPixelProjection -- 'getSentEmailTrackingPixels' route + :<|> "sent" :> QueryParam "inboxId" UUID :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageSentEmailProjection -- 'getSentEmails' route + :<|> "sent" :> "queue-results" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageSentEmailWithQueueProjection -- 'getSentEmailsWithQueueResults' route + :<|> "sent" :> "organization" :> QueryParam "inboxId" UUID :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageSentEmailProjection -- 'getSentOrganizationEmails' route + :<|> "sent" :> "delivery-status" :> "wait-for" :> QueryParam "sentId" UUID :> QueryParam "inboxId" UUID :> QueryParam "timeout" Integer :> QueryParam "index" Int :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] DeliveryStatusDto -- 'waitForDeliveryStatuses' route + :<|> "sms" :> Capture "smsId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteSmsMessage' route + :<|> "sms" :> QueryParam "phoneNumberId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteSmsMessages' route + :<|> "sms" :> Capture "smsId" UUID :> "reply" :> Verb 'GET 200 '[JSON] ReplyForSms -- 'getReplyForSmsMessage' route + :<|> "sms" :> "count" :> Verb 'GET 200 '[JSON] CountDto -- 'getSmsCount' route + :<|> "sms" :> Capture "smsId" UUID :> Verb 'GET 200 '[JSON] SmsDto -- 'getSmsMessage' route + :<|> "sms" :> QueryParam "phoneNumber" UUID :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "unreadOnly" Bool :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageSmsProjection -- 'getSmsMessagesPaginated' route + :<|> "sms" :> "unreadCount" :> Verb 'GET 200 '[JSON] UnreadCount -- 'getUnreadSmsCount' route + :<|> "sms" :> Capture "smsId" UUID :> "reply" :> ReqBody '[JSON] SmsReplyOptions :> Verb 'POST 200 '[JSON] SentSmsDto -- 'replyToSmsMessage' route + :<|> "templates" :> ReqBody '[JSON] CreateTemplateOptions :> Verb 'POST 200 '[JSON] TemplateDto -- 'createTemplate' route + :<|> "templates" :> Capture "templateId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteTemplate' route + :<|> "templates" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageTemplateProjection -- 'getAllTemplates' route + :<|> "templates" :> Capture "templateId" UUID :> Verb 'GET 200 '[JSON] TemplateDto -- 'getTemplate' route + :<|> "templates" :> Capture "templateId" UUID :> "preview" :> "html" :> Verb 'GET 200 '[JSON] Text -- 'getTemplatePreviewHtml' route + :<|> "templates" :> Capture "templateId" UUID :> "preview" :> "json" :> Verb 'GET 200 '[JSON] TemplatePreview -- 'getTemplatePreviewJson' route + :<|> "templates" :> Verb 'GET 200 '[JSON] [TemplateProjection] -- 'getTemplates' route + :<|> "templates" :> Capture "templateId" UUID :> ReqBody '[JSON] CreateTemplateOptions :> Verb 'PUT 200 '[JSON] TemplateDto -- 'updateTemplate' route + :<|> "tools" :> "check-email-features-client-support" :> ReqBody '[JSON] CheckEmailFeaturesClientSupportOptions :> Verb 'POST 200 '[JSON] CheckEmailFeaturesClientSupportResults -- 'checkEmailFeaturesClientSupport' route + :<|> "tools" :> "fake-email" :> Verb 'POST 200 '[JSON] NewFakeEmailAddressResult -- 'createNewFakeEmailAddress' route + :<|> "tools" :> "generate-bimi-record" :> ReqBody '[JSON] GenerateBimiRecordOptions :> Verb 'POST 200 '[JSON] GenerateBimiRecordResults -- 'generateBimiRecord' route + :<|> "tools" :> "generate-dmarc-record" :> ReqBody '[JSON] GenerateDmarcRecordOptions :> Verb 'POST 200 '[JSON] GenerateDmarcRecordResults -- 'generateDmarcRecord' route + :<|> "tools" :> "generate-mta-sts-record" :> ReqBody '[JSON] GenerateMtaStsRecordOptions :> Verb 'POST 200 '[JSON] GenerateMtaStsRecordResults -- 'generateMtaStsRecord' route + :<|> "tools" :> "generate-tls-reporting-record" :> ReqBody '[JSON] GenerateTlsReportingRecordOptions :> Verb 'POST 200 '[JSON] GenerateTlsReportingRecordResults -- 'generateTlsReportingRecord' route + :<|> "tools" :> "fake-email" :> QueryParam "id" UUID :> Verb 'GET 200 '[JSON] FakeEmailResult -- 'getFakeEmailById' route + :<|> "tools" :> "fake-emails" :> QueryParam "page" Int :> QueryParam "emailAddress" Text :> Verb 'GET 200 '[JSON] [FakeEmailPreview] -- 'getFakeEmailsForAddress' route + :<|> "tools" :> "lookup-bimi-domain" :> ReqBody '[JSON] LookupBimiDomainOptions :> Verb 'POST 200 '[JSON] LookupBimiDomainResults -- 'lookupBimiDomain' route + :<|> "tools" :> "lookup-dmarc-domain" :> ReqBody '[JSON] LookupDmarcDomainOptions :> Verb 'POST 200 '[JSON] LookupDmarcDomainResults -- 'lookupDmarcDomain' route + :<|> "tools" :> "lookup-mta-sts-domain" :> ReqBody '[JSON] LookupMtaStsDomainOptions :> Verb 'POST 200 '[JSON] LookupMtaStsDomainResults -- 'lookupMtaStsDomain' route + :<|> "tools" :> "lookup-tls-reporting-domain" :> ReqBody '[JSON] LookupTlsReportingDomainOptions :> Verb 'POST 200 '[JSON] LookupTlsReportingDomainResults -- 'lookupTlsReportingDomain' route + :<|> "tracking" :> "pixels" :> ReqBody '[JSON] CreateTrackingPixelOptions :> Verb 'POST 200 '[JSON] TrackingPixelDto -- 'createTrackingPixel' route + :<|> "tracking" :> "pixels" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageTrackingPixelProjection -- 'getAllTrackingPixels' route + :<|> "tracking" :> "pixels" :> Capture "id" UUID :> Verb 'GET 200 '[JSON] TrackingPixelDto -- 'getTrackingPixel' route + :<|> "user" :> "json" :> "pluck" :> QueryParam "property" Text :> ReqBody '[JSON] Value :> Verb 'POST 200 '[JSON] Text -- 'getJsonPropertyAsString' route + :<|> "user" :> "info" :> Verb 'GET 200 '[JSON] UserInfoDto -- 'getUserInfo' route + :<|> "waitFor" :> ReqBody '[JSON] WaitForConditions :> Verb 'POST 200 '[JSON] [EmailPreview] -- 'waitFor' route + :<|> "waitForEmailCount" :> QueryParam "inboxId" UUID :> QueryParam "count" Int :> QueryParam "timeout" Integer :> QueryParam "unreadOnly" Bool :> QueryParam "before" UTCTime :> QueryParam "since" UTCTime :> QueryParam "sort" Text :> QueryParam "delay" Integer :> Verb 'GET 200 '[JSON] [EmailPreview] -- 'waitForEmailCount' route + :<|> "waitForLatestEmail" :> QueryParam "inboxId" UUID :> QueryParam "timeout" Integer :> QueryParam "unreadOnly" Bool :> QueryParam "before" UTCTime :> QueryParam "since" UTCTime :> QueryParam "sort" Text :> QueryParam "delay" Integer :> Verb 'GET 200 '[JSON] Email -- 'waitForLatestEmail' route + :<|> "waitForLatestSms" :> ReqBody '[JSON] WaitForSingleSmsOptions :> Verb 'POST 200 '[JSON] SmsDto -- 'waitForLatestSms' route + :<|> "waitForMatchingEmails" :> QueryParam "inboxId" UUID :> QueryParam "count" Int :> QueryParam "before" UTCTime :> QueryParam "since" UTCTime :> QueryParam "sort" Text :> QueryParam "delay" Integer :> QueryParam "timeout" Integer :> QueryParam "unreadOnly" Bool :> ReqBody '[JSON] MatchOptions :> Verb 'POST 200 '[JSON] [EmailPreview] -- 'waitForMatchingEmails' route + :<|> "waitForMatchingFirstEmail" :> QueryParam "inboxId" UUID :> QueryParam "timeout" Integer :> QueryParam "unreadOnly" Bool :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "sort" Text :> QueryParam "delay" Integer :> ReqBody '[JSON] MatchOptions :> Verb 'POST 200 '[JSON] Email -- 'waitForMatchingFirstEmail' route + :<|> "waitForNthEmail" :> QueryParam "inboxId" UUID :> QueryParam "index" Int :> QueryParam "timeout" Integer :> QueryParam "unreadOnly" Bool :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "sort" Text :> QueryParam "delay" Integer :> Verb 'GET 200 '[JSON] Email -- 'waitForNthEmail' route + :<|> "waitForSms" :> ReqBody '[JSON] WaitForSmsConditions :> Verb 'POST 200 '[JSON] [SmsPreview] -- 'waitForSms' route + :<|> "webhooks" :> ReqBody '[JSON] CreateWebhookOptions :> Verb 'POST 200 '[JSON] WebhookDto -- 'createAccountWebhook' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "webhooks" :> ReqBody '[JSON] CreateWebhookOptions :> Verb 'POST 200 '[JSON] WebhookDto -- 'createWebhook' route + :<|> "phone" :> "numbers" :> Capture "phoneNumberId" UUID :> "webhooks" :> ReqBody '[JSON] CreateWebhookOptions :> Verb 'POST 200 '[JSON] WebhookDto -- 'createWebhookForPhoneNumber' route + :<|> "webhooks" :> QueryParam "before" UTCTime :> Verb 'DELETE 200 '[JSON] () -- 'deleteAllWebhooks' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "webhooks" :> Capture "webhookId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteWebhook' route + :<|> "webhooks" :> Capture "webhookId" UUID :> Verb 'DELETE 200 '[JSON] () -- 'deleteWebhookById' route + :<|> "webhooks" :> "account" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "eventType" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageWebhookProjection -- 'getAllAccountWebhooks' route + :<|> "webhooks" :> "results" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "unseenOnly" Bool :> QueryParam "resultType" Text :> QueryParam "eventName" Text :> QueryParam "minStatusCode" Int :> QueryParam "maxStatusCode" Int :> QueryParam "inboxId" UUID :> QueryParam "smsId" UUID :> QueryParam "attachmentId" UUID :> QueryParam "emailId" UUID :> QueryParam "phoneId" UUID :> Verb 'GET 200 '[JSON] PageWebhookResult -- 'getAllWebhookResults' route + :<|> "webhooks" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "inboxId" UUID :> QueryParam "phoneId" UUID :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageWebhookProjection -- 'getAllWebhooks' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "webhooks" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageWebhookProjection -- 'getInboxWebhooksPaginated' route + :<|> "webhooks" :> "schema" :> QueryParam "event" Text :> Verb 'POST 200 '[JSON] JSONSchemaDto -- 'getJsonSchemaForWebhookEvent' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "schema" :> Verb 'POST 200 '[JSON] JSONSchemaDto -- 'getJsonSchemaForWebhookPayload' route + :<|> "phone" :> "numbers" :> Capture "phoneId" UUID :> "webhooks" :> "paginated" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> Verb 'GET 200 '[JSON] PageWebhookProjection -- 'getPhoneNumberWebhooksPaginated' route + :<|> "webhooks" :> "test" :> QueryParam "eventName" Text :> Verb 'GET 200 '[JSON] AbstractWebhookPayload -- 'getTestWebhookPayload' route + :<|> "webhooks" :> "test" :> "email-bounce-payload" :> Verb 'GET 200 '[JSON] WebhookBouncePayload -- 'getTestWebhookPayloadBounce' route + :<|> "webhooks" :> "test" :> "email-bounce-recipient-payload" :> Verb 'GET 200 '[JSON] WebhookBounceRecipientPayload -- 'getTestWebhookPayloadBounceRecipient' route + :<|> "webhooks" :> "test" :> "delivery-status-payload" :> Verb 'GET 200 '[JSON] WebhookDeliveryStatusPayload -- 'getTestWebhookPayloadDeliveryStatus' route + :<|> "webhooks" :> "test" :> "email-opened-payload" :> Verb 'GET 200 '[JSON] WebhookEmailOpenedPayload -- 'getTestWebhookPayloadEmailOpened' route + :<|> "webhooks" :> "test" :> "email-read-payload" :> Verb 'GET 200 '[JSON] WebhookEmailReadPayload -- 'getTestWebhookPayloadEmailRead' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "example" :> Verb 'POST 200 '[JSON] AbstractWebhookPayload -- 'getTestWebhookPayloadForWebhook' route + :<|> "webhooks" :> "test" :> "new-attachment-payload" :> Verb 'GET 200 '[JSON] WebhookNewAttachmentPayload -- 'getTestWebhookPayloadNewAttachment' route + :<|> "webhooks" :> "test" :> "new-contact-payload" :> Verb 'GET 200 '[JSON] WebhookNewContactPayload -- 'getTestWebhookPayloadNewContact' route + :<|> "webhooks" :> "test" :> "new-email-payload" :> Verb 'GET 200 '[JSON] WebhookNewEmailPayload -- 'getTestWebhookPayloadNewEmail' route + :<|> "webhooks" :> "test" :> "new-sms-payload" :> Verb 'GET 200 '[JSON] WebhookNewSmsPayload -- 'getTestWebhookPayloadNewSms' route + :<|> "webhooks" :> Capture "webhookId" UUID :> Verb 'GET 200 '[JSON] WebhookDto -- 'getWebhook' route + :<|> "webhooks" :> "results" :> Capture "webhookResultId" UUID :> Verb 'GET 200 '[JSON] WebhookResultDto -- 'getWebhookResult' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "results" :> QueryParam "page" Int :> QueryParam "size" Int :> QueryParam "sort" Text :> QueryParam "searchFilter" Text :> QueryParam "since" UTCTime :> QueryParam "before" UTCTime :> QueryParam "unseenOnly" Bool :> QueryParam "resultType" Text :> QueryParam "eventName" Text :> QueryParam "minStatusCode" Int :> QueryParam "maxStatusCode" Int :> QueryParam "inboxId" UUID :> QueryParam "smsId" UUID :> QueryParam "attachmentId" UUID :> QueryParam "emailId" UUID :> QueryParam "phoneId" UUID :> Verb 'GET 200 '[JSON] PageWebhookResult -- 'getWebhookResults' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "results" :> "count" :> Verb 'GET 200 '[JSON] CountDto -- 'getWebhookResultsCount' route + :<|> "webhooks" :> "results" :> "unseen-count" :> Verb 'GET 200 '[JSON] UnseenErrorCountDto -- 'getWebhookResultsUnseenErrorCount' route + :<|> "inboxes" :> Capture "inboxId" UUID :> "webhooks" :> Verb 'GET 200 '[JSON] [WebhookDto] -- 'getWebhooks' route + :<|> "webhooks" :> "results" :> "redrive" :> Verb 'POST 200 '[JSON] WebhookRedriveAllResult -- 'redriveAllWebhookResults' route + :<|> "webhooks" :> "results" :> Capture "webhookResultId" UUID :> "redrive" :> Verb 'POST 200 '[JSON] WebhookRedriveResult -- 'redriveWebhookResult' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "test" :> Verb 'POST 200 '[JSON] WebhookTestResult -- 'sendTestData' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "headers" :> ReqBody '[JSON] WebhookHeaders :> Verb 'PUT 200 '[JSON] WebhookDto -- 'updateWebhookHeaders' route + :<|> "webhooks" :> "verify" :> ReqBody '[JSON] VerifyWebhookSignatureOptions :> Verb 'POST 200 '[JSON] VerifyWebhookSignatureResults -- 'verifyWebhookSignature' route + :<|> "webhooks" :> Capture "webhookId" UUID :> "wait" :> QueryParam "expectedCount" Int :> QueryParam "timeout" Int :> Verb 'GET 200 '[JSON] [WebhookResultDto] -- 'waitForWebhookResults' route + :<|> Raw + + +-- | Server or client configuration, specifying the host and port to query or serve on. +data Config = Config + { configUrl :: String -- ^ scheme://hostname:port/path, e.g. "http://localhost:8080/" + } deriving (Eq, Ord, Show, Read) + + +-- | Custom exception type for our errors. +newtype MailSlurpClientError = MailSlurpClientError ClientError + deriving (Show, Exception) +-- | Configuration, specifying the full url of the service. + + +-- | Backend for MailSlurp. +-- The backend can be used both for the client and the server. The client generated from the MailSlurp OpenAPI spec +-- is a backend that executes actions by sending HTTP requests (see @createMailSlurpClient@). Alternatively, provided +-- a backend, the API can be served using @runMailSlurpMiddlewareServer@. +data MailSlurpBackend m = MailSlurpBackend + { createAlias :: CreateAliasOptions -> m AliasDto{- ^ Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached -} + , deleteAlias :: UUID -> m (){- ^ -} + , getAlias :: UUID -> m AliasDto{- ^ Get an email alias by ID -} + , getAliasEmails :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageEmailProjection{- ^ Get paginated emails for an alias by ID -} + , getAliasThreads :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageThreadProjection{- ^ Returns threads created for an email alias in paginated form -} + , getAliases :: Maybe Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageAlias{- ^ Get all email aliases in paginated form -} + , getThread :: UUID -> m ThreadProjection{- ^ Return a thread associated with an alias -} + , getThreadsPaginated :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageThreadProjection{- ^ Returns threads created for all aliases in paginated form -} + , replyToAliasEmail :: UUID -> UUID -> ReplyToAliasEmailOptions -> m SentEmailDto{- ^ Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. -} + , sendAliasEmail :: UUID -> SendEmailOptions -> m SentEmailDto{- ^ Send an email from an alias. Replies to the email will be forwarded to the alias masked email address -} + , updateAlias :: UUID -> UpdateAliasOptions -> m AliasDto{- ^ -} + , deleteAllAttachments :: m (){- ^ -} + , deleteAttachment :: Text -> m (){- ^ -} + , downloadAttachmentAsBase64Encoded :: Text -> m DownloadAttachmentDto{- ^ Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. -} + , downloadAttachmentAsBytes :: Text -> m Text{- ^ Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. -} + , getAttachment :: Text -> m AttachmentEntity{- ^ -} + , getAttachmentInfo :: Text -> m AttachmentMetaData{- ^ Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. -} + , getAttachments :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe UUID -> m PageAttachmentEntity{- ^ Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. -} + , uploadAttachment :: UploadAttachmentOptions -> m [Text]{- ^ -} + , uploadAttachmentBytes :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> m [Text]{- ^ -} + , uploadMultipartForm :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> InlineObject -> m [Text]{- ^ -} + , filterBouncedRecipient :: FilterBouncedRecipientsOptions -> m FilterBouncedRecipientsResult{- ^ Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints -} + , getAccountBounceBlockStatus :: m AccountBounceBlockDto{- ^ Check if account block status prevents sending -} + , getBouncedEmail :: UUID -> m BouncedEmailDto{- ^ Bounced emails are email you have sent that were rejected by a recipient -} + , getBouncedEmails :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageBouncedEmail{- ^ Bounced emails are email you have sent that were rejected by a recipient -} + , getBouncedRecipient :: UUID -> m BouncedRecipientDto{- ^ Bounced emails are email you have sent that were rejected by a recipient -} + , getBouncedRecipients :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageBouncedRecipients{- ^ Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. -} + , getComplaint :: UUID -> m Complaint{- ^ Get complaint -} + , getComplaints :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageComplaint{- ^ SMTP complaints made against your account -} + , getListUnsubscribeRecipients :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UUID -> m PageListUnsubscribeRecipients{- ^ Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again. -} + , bulkCreateInboxes :: Maybe Int -> m [InboxDto]{- ^ -} + , bulkDeleteInboxes :: [UUID] -> m (){- ^ -} + , bulkSendEmails :: BulkSendEmailOptions -> m (){- ^ -} + , createNewEmailAddress :: Maybe Bool -> Maybe Bool -> Maybe UTCTime -> Maybe Integer -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe [Text] -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Text -> Maybe UUID -> Maybe Text -> m InboxDto{- ^ Returns an Inbox with an `id` and an `emailAddress` -} + , createRandomInbox :: Maybe Bool -> Maybe Bool -> Maybe UTCTime -> Maybe Integer -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe [Text] -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Text -> Maybe UUID -> Maybe Text -> m InboxDto{- ^ Returns an Inbox with an `id` and an `emailAddress` -} + , deleteEmailAddress :: Maybe UUID -> m (){- ^ Deletes inbox email address -} + , emptyInbox :: Maybe UUID -> m (){- ^ Deletes all emails -} + , sendEmailQuery :: Maybe UUID -> Maybe Text -> Maybe Text -> Maybe Text -> m (){- ^ If no senderId or inboxId provided a random email address will be used to send from. Ensure your parameters are URL encoded. -} + , sendEmailSimple :: SimpleSendEmailOptions -> m (){- ^ If no senderId or inboxId provided a random email address will be used to send from. -} + , createConnector :: CreateConnectorOptions -> m ConnectorDto{- ^ Sync emails between external mailboxes and MailSlurp inboxes -} + , createConnectorImapConnection :: UUID -> CreateConnectorImapConnectionOptions -> m ConnectorImapConnectionDto{- ^ Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox -} + , createConnectorSmtpConnection :: UUID -> CreateConnectorSmtpConnectionOptions -> m ConnectorSmtpConnectionDto{- ^ Allows sending via connector and email is routed to connected inbox and sent via SMTP -} + , deleteAllConnector :: m (){- ^ -} + , deleteConnector :: UUID -> m (){- ^ -} + , deleteConnectorImapConnection :: UUID -> m (){- ^ Delete IMAP connection for external inbox -} + , deleteConnectorSmtpConnection :: UUID -> m (){- ^ Delete SMTP connection for external inbox -} + , getAllConnectorSyncEvents :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageConnectorSyncEvents{- ^ -} + , getConnector :: UUID -> m ConnectorDto{- ^ -} + , getConnectorSyncEvent :: UUID -> m ConnectorSyncEventDto{- ^ -} + , getConnectorSyncEvents :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageConnectorSyncEvents{- ^ -} + , getConnectors :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageConnector{- ^ List inbox connectors that sync external emails to MailSlurp inboxes -} + , syncConnector :: UUID -> m ConnectorSyncRequestResult{- ^ -} + , updateConnector :: UUID -> CreateConnectorOptions -> m ConnectorDto{- ^ -} + , createContact :: CreateContactOptions -> m ContactDto{- ^ -} + , deleteContact :: UUID -> m (){- ^ -} + , getAllContacts :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> m PageContactProjection{- ^ -} + , getContact :: UUID -> m ContactDto{- ^ -} + , getContactVCard :: UUID -> m (){- ^ -} + , getContacts :: m [ContactProjection]{- ^ -} + , addDomainWildcardCatchAll :: UUID -> m DomainDto{- ^ Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated -} + , createDomain :: CreateDomainOptions -> m DomainDto{- ^ Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. -} + , deleteDomain :: UUID -> m [Text]{- ^ Delete a domain. This will disable any existing inboxes that use this domain. -} + , getAvailableDomains :: Maybe Text -> m DomainGroupsDto{- ^ List all domains available for use with email address creation -} + , getDomain :: UUID -> Maybe Bool -> m DomainDto{- ^ Returns domain verification status and tokens for a given domain -} + , getDomainIssues :: m DomainIssuesDto{- ^ List domain issues for domains you have created -} + , getDomainWildcardCatchAllInbox :: UUID -> m InboxDto{- ^ Get the catch all inbox for a domain for missed emails -} + , getDomains :: m [DomainPreview]{- ^ List all custom domains you have created -} + , getMailSlurpDomains :: Maybe Text -> m DomainGroupsDto{- ^ List all MailSlurp domains used with non-custom email addresses -} + , updateDomain :: UUID -> UpdateDomainOptions -> m DomainDto{- ^ Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. -} + , applyImapFlagOperation :: UUID -> ImapFlagOperationOptions -> m EmailPreview{- ^ Apply RFC3501 section-2.3.2 IMAP flag operations on an email -} + , canSend :: Maybe UUID -> SendEmailOptions -> m CanSendEmailResults{- ^ Can user send email to given recipient or is the recipient blocked -} + , checkEmailBody :: UUID -> m CheckEmailBodyResults{- ^ Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy. -} + , checkEmailBodyFeatureSupport :: UUID -> m CheckEmailBodyFeatureSupportResults{- ^ Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions. -} + , checkEmailClientSupport :: CheckEmailClientSupportOptions -> m CheckEmailClientSupportResults{- ^ Evaluate the features used in an email body and return a report of email client support across different platforms and versions. -} + , deleteAllEmails :: m (){- ^ Deletes all emails in your account. Be careful as emails cannot be recovered -} + , deleteEmail :: UUID -> m (){- ^ Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. -} + , downloadAttachment :: UUID -> Text -> Maybe Text -> m Text{- ^ Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. -} + , downloadAttachmentBase64 :: UUID -> Text -> m DownloadAttachmentDto{- ^ Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. -} + , downloadBody :: UUID -> m Text{- ^ Returns the specified email body for a given email as a string -} + , downloadBodyBytes :: UUID -> m Text{- ^ Returns the specified email body for a given email as a stream / array of bytes. -} + , forwardEmail :: UUID -> ForwardEmailOptions -> m SentEmailDto{- ^ Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. -} + , getAttachmentMetaData :: UUID -> Text -> m AttachmentMetaData{- ^ Returns the metadata such as name and content-type for a given attachment and email. -} + , getEmail :: UUID -> Maybe Bool -> m Email{- ^ Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints -} + , getEmailAttachments :: UUID -> m [AttachmentMetaData]{- ^ Returns an array of attachment metadata such as name and content-type for a given email if present. -} + , getEmailContentMatch :: UUID -> ContentMatchOptions -> m EmailContentMatchResult{- ^ Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. -} + , getEmailContentPart :: UUID -> Maybe Text -> m EmailContentPartResult{- ^ Get email body content parts from a multipart email message for a given content type -} + , getEmailCount :: m CountDto{- ^ -} + , getEmailHTML :: UUID -> Maybe Bool -> Maybe Bool -> m Text{- ^ Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. -} + , getEmailHTMLJson :: UUID -> Maybe Bool -> Maybe Bool -> m EmailHtmlDto{- ^ Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. -} + , getEmailHTMLQuery :: UUID -> Maybe Text -> m EmailTextLinesResult{- ^ Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors -} + , getEmailLinks :: UUID -> m EmailLinksResult{- ^ HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes -} + , getEmailPreviewURLs :: UUID -> m EmailPreviewUrls{- ^ Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. -} + , getEmailScreenshotAsBase64 :: UUID -> GetEmailScreenshotOptions -> m EmailScreenshotResult{- ^ Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information. -} + , getEmailScreenshotAsBinary :: UUID -> GetEmailScreenshotOptions -> m (){- ^ Returns binary octet-stream of screenshot of the given email -} + , getEmailTextLines :: UUID -> Maybe Bool -> Maybe Text -> m EmailTextLinesResult{- ^ Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. -} + , getEmailsOffsetPaginated :: Maybe [UUID] -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageEmailProjection{- ^ By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages -} + , getEmailsPaginated :: Maybe [UUID] -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageEmailProjection{- ^ By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages -} + , getGravatarUrlForEmailAddress :: Maybe Text -> Maybe Text -> m GravatarUrl{- ^ Get gravatar url for email address -} + , getLatestEmail :: Maybe [UUID] -> m Email{- ^ Get the newest email in all inboxes or in a passed set of inbox IDs -} + , getLatestEmailInInbox1 :: Maybe UUID -> m Email{- ^ Get the newest email in all inboxes or in a passed set of inbox IDs -} + , getOrganizationEmailsPaginated :: Maybe [UUID] -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageEmailProjection{- ^ By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages -} + , getRawEmailContents :: UUID -> m (){- ^ Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint -} + , getRawEmailJson :: UUID -> m RawEmailJson{- ^ Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response -} + , getUnreadEmailCount :: m UnreadCount{- ^ Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response -} + , markAsRead :: UUID -> Maybe Bool -> m EmailPreview{- ^ Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread -} + , replyToEmail :: UUID -> ReplyToEmailOptions -> m SentEmailDto{- ^ Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. -} + , searchEmails :: SearchEmailsOptions -> m PageEmailProjection{- ^ Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body -} + , sendEmailSourceOptional :: Maybe UUID -> Maybe Bool -> Maybe Bool -> SendEmailOptions -> m (){- ^ Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. -} + , validateEmail :: UUID -> m ValidationDto{- ^ Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. -} + , deleteAllValidationRequests :: m (){- ^ -} + , deleteValidationRequest :: UUID -> m (){- ^ -} + , getValidationRequests :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe Bool -> m PageEmailValidationRequest{- ^ -} + , validateEmailAddressList :: ValidateEmailAddressListOptions -> m ValidateEmailAddressListResult{- ^ -} + , getExpirationDefaults :: m ExpirationDefaults{- ^ Return default times used for inbox expiration -} + , getExpiredInboxByInboxId :: UUID -> m ExpiredInboxDto{- ^ Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId -} + , getExpiredInboxRecord :: UUID -> m ExpiredInboxDto{- ^ Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties -} + , getExpiredInboxes :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageExpiredInboxRecordProjection{- ^ Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties -} + , exportEntities :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> m Text{- ^ -} + , getExportLink :: Maybe Text -> Maybe Text -> ExportOptions -> m ExportLink{- ^ -} + , submitForm :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> m Text{- ^ This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html
``` #### URL Example ```html
``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `
`. -} + , addContactsToGroup :: UUID -> UpdateGroupContacts -> m GroupContactsDto{- ^ -} + , createGroup :: CreateGroupOptions -> m GroupDto{- ^ -} + , deleteGroup :: UUID -> m (){- ^ -} + , getAllGroups :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageGroupProjection{- ^ -} + , getGroup :: UUID -> m GroupDto{- ^ -} + , getGroupWithContacts :: UUID -> m GroupContactsDto{- ^ -} + , getGroupWithContactsPaginated :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageContactProjection{- ^ Get group and paginated contacts belonging to it -} + , getGroups :: m [GroupProjection]{- ^ -} + , removeContactsFromGroup :: UUID -> UpdateGroupContacts -> m GroupContactsDto{- ^ -} + , imapServerFetch :: Maybe UUID -> Maybe Integer -> m ImapServerFetchResult{- ^ -} + , imapServerGet :: Maybe UUID -> Maybe UUID -> m ImapServerGetResult{- ^ -} + , imapServerList :: Maybe UUID -> ImapServerListOptions -> m ImapServerListResult{- ^ -} + , imapServerSearch :: Maybe UUID -> ImapServerSearchOptions -> m ImapServerSearchResult{- ^ -} + , imapServerStatus :: Maybe UUID -> ImapServerStatusOptions -> m ImapServerStatusResult{- ^ -} + , imapServerUpdateFlags :: Maybe UUID -> ImapUpdateFlagsOptions -> m (){- ^ Update message flags -} + , cancelScheduledJob :: UUID -> m ScheduledJobDto{- ^ Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete. -} + , createInbox :: Maybe Text -> Maybe [Text] -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe UTCTime -> Maybe Integer -> Maybe Bool -> Maybe Text -> Maybe Bool -> Maybe Bool -> Maybe UUID -> Maybe Text -> Maybe Text -> m InboxDto{- ^ Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. -} + , createInboxRuleset :: UUID -> CreateInboxRulesetOptions -> m InboxRulesetDto{- ^ Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving -} + , createInboxWithDefaults :: m InboxDto{- ^ -} + , createInboxWithOptions :: CreateInboxDto -> m InboxDto{- ^ Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. -} + , deleteAllInboxEmails :: UUID -> m (){- ^ Deletes all emails in an inbox. Be careful as emails cannot be recovered -} + , deleteAllInboxes :: m (){- ^ Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. -} + , deleteAllInboxesByDescription :: Maybe Text -> m (){- ^ Permanently delete all inboxes by description -} + , deleteAllInboxesByName :: Maybe Text -> m (){- ^ Permanently delete all inboxes by name -} + , deleteAllInboxesByTag :: Maybe Text -> m (){- ^ Permanently delete all inboxes by tag -} + , deleteInbox :: UUID -> m (){- ^ Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. -} + , doesInboxExist :: Maybe Text -> Maybe Bool -> m InboxExistsDto{- ^ Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses -} + , flushExpired :: Maybe UTCTime -> m FlushExpiredInboxesResult{- ^ Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) -} + , getAllInboxes :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Text -> Maybe UUID -> m PageInboxProjection{- ^ List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. -} + , getAllInboxesOffsetPaginated :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Text -> Maybe UUID -> m PageInboxProjection{- ^ List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. -} + , getAllScheduledJobs :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageScheduledJobs{- ^ Schedule sending of emails using scheduled jobs. These can be inbox or account level. -} + , getDeliveryStatusesByInboxId :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageDeliveryStatus{- ^ Get all email delivery statuses for an inbox -} + , getEmails :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Integer -> Maybe Integer -> Maybe Integer -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> m [EmailPreview]{- ^ List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached -} + , getImapAccess :: Maybe UUID -> m ImapAccessDetails{- ^ Get IMAP access usernames and passwords -} + , getImapSmtpAccess :: Maybe UUID -> m ImapSmtpAccessDetails{- ^ Get IMAP and SMTP access usernames and passwords -} + , getImapSmtpAccessEnv :: Maybe UUID -> m Text{- ^ Get IMAP and SMTP access details in .env format -} + , getInbox :: UUID -> m InboxDto{- ^ Returns an inbox's properties, including its email address and ID. -} + , getInboxByEmailAddress :: Maybe Text -> m InboxByEmailAddressResult{- ^ Get a inbox result by email address -} + , getInboxByName :: Maybe Text -> m InboxByNameResult{- ^ Get a inbox result by name -} + , getInboxCount :: m CountDto{- ^ -} + , getInboxEmailCount :: UUID -> m CountDto{- ^ -} + , getInboxEmailsPaginated :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageEmailPreview{- ^ Get a paginated list of emails in an inbox. Does not hold connections open. -} + , getInboxIds :: m InboxIdsResult{- ^ Get list of inbox IDs -} + , getInboxSentEmails :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageSentEmailProjection{- ^ Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. -} + , getInboxTags :: m [Text]{- ^ Get all inbox tags -} + , getInboxes :: Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe Bool -> Maybe UTCTime -> m [InboxDto]{- ^ List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. -} + , getLatestEmailInInbox :: Maybe UUID -> Maybe Integer -> m Email{- ^ Get the newest email in an inbox or wait for one to arrive -} + , getOrganizationInboxes :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageOrganizationInboxProjection{- ^ List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). -} + , getScheduledJob :: UUID -> m ScheduledJobDto{- ^ Get a scheduled email job details. -} + , getScheduledJobsByInboxId :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageScheduledJobs{- ^ Schedule sending of emails using scheduled jobs. -} + , getSmtpAccess :: Maybe UUID -> m SmtpAccessDetails{- ^ Get SMTP access usernames and passwords -} + , listInboxRulesets :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageInboxRulesetDto{- ^ List all rulesets attached to an inbox -} + , listInboxTrackingPixels :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageTrackingPixelProjection{- ^ List all tracking pixels sent from an inbox -} + , searchInboxes :: SearchInboxesOptions -> m PageInboxProjection{- ^ Search inboxes and return in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. -} + , sendEmail :: UUID -> SendEmailOptions -> m (){- ^ Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. -} + , sendEmailAndConfirm :: UUID -> SendEmailOptions -> m SentEmailDto{- ^ Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. -} + , sendEmailWithQueue :: UUID -> Maybe Bool -> SendEmailOptions -> m (){- ^ Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. -} + , sendSmtpEnvelope :: UUID -> SendSMTPEnvelopeOptions -> m SentEmailDto{- ^ Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. -} + , sendTestEmail :: UUID -> m (){- ^ Send an inbox a test email to test email receiving is working -} + , sendWithSchedule :: UUID -> Maybe UTCTime -> Maybe Integer -> Maybe Bool -> SendEmailOptions -> m ScheduledJobDto{- ^ Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending. -} + , setInboxFavourited :: UUID -> SetInboxFavouritedOptions -> m InboxDto{- ^ Set and return new favourite state for an inbox -} + , updateInbox :: UUID -> UpdateInboxOptions -> m InboxDto{- ^ Update editable fields on an inbox -} + , createNewInboxForwarder :: Maybe UUID -> CreateInboxForwarderOptions -> m InboxForwarderDto{- ^ Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving -} + , deleteInboxForwarder :: UUID -> m (){- ^ Delete inbox forwarder -} + , deleteInboxForwarders :: Maybe UUID -> m (){- ^ Delete inbox forwarders. Accepts optional inboxId filter. -} + , getAllInboxForwarderEvents :: Maybe Int -> Maybe Int -> Maybe UUID -> Maybe Text -> m PageInboxForwarderEvents{- ^ Get all inbox forwarder events -} + , getForwarderEvent :: UUID -> m InboxForwarderEventDto{- ^ Get forwarder event -} + , getInboxForwarder :: UUID -> m InboxForwarderDto{- ^ Get inbox forwarder -} + , getInboxForwarderEvent :: UUID -> UUID -> m InboxForwarderEventDto{- ^ Get inbox forwarder event -} + , getInboxForwarderEvents :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> m PageInboxForwarderEvents{- ^ Get inbox forwarder events -} + , getInboxForwarders :: Maybe UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageInboxForwarderDto{- ^ List all forwarders attached to an inbox -} + , testInboxForwarder :: UUID -> InboxForwarderTestOptions -> m InboxForwarderTestResult{- ^ Test an inbox forwarder -} + , testInboxForwardersForInbox :: Maybe UUID -> InboxForwarderTestOptions -> m InboxForwarderTestResult{- ^ Test inbox forwarders for inbox -} + , testNewInboxForwarder :: TestNewInboxForwarderOptions -> m InboxForwarderTestResult{- ^ Test new inbox forwarder -} + , updateInboxForwarder :: UUID -> CreateInboxForwarderOptions -> m InboxForwarderDto{- ^ Update inbox forwarder -} + , createNewInboxReplier :: CreateInboxReplierOptions -> m InboxReplierDto{- ^ Create a new inbox rule for reply toing, blocking, and allowing emails when sending and receiving -} + , deleteInboxReplier :: UUID -> m (){- ^ Delete inbox replier -} + , deleteInboxRepliers :: Maybe UUID -> m (){- ^ Delete inbox repliers. Accepts optional inboxId filter. -} + , getInboxReplier :: UUID -> m InboxReplierDto{- ^ Get inbox ruleset -} + , getInboxReplierEvents :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> m PageInboxReplierEvents{- ^ Get inbox ruleset events -} + , getInboxRepliers :: Maybe UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageInboxReplierDto{- ^ List all repliers attached to an inbox -} + , updateInboxReplier :: UUID -> UpdateInboxReplierOptions -> m InboxReplierDto{- ^ Update inbox ruleset -} + , createNewInboxRuleset :: Maybe UUID -> CreateInboxRulesetOptions -> m InboxRulesetDto{- ^ Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving -} + , deleteInboxRuleset :: UUID -> m (){- ^ Delete inbox ruleset -} + , deleteInboxRulesets :: Maybe UUID -> m (){- ^ Delete inbox rulesets. Accepts optional inboxId filter. -} + , getInboxRuleset :: UUID -> m InboxRulesetDto{- ^ Get inbox ruleset -} + , getInboxRulesets :: Maybe UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageInboxRulesetDto{- ^ List all rulesets attached to an inbox -} + , testInboxRuleset :: UUID -> InboxRulesetTestOptions -> m InboxRulesetTestResult{- ^ Test an inbox ruleset -} + , testInboxRulesetReceiving :: TestInboxRulesetReceivingOptions -> m TestInboxRulesetReceivingResult{- ^ Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets -} + , testInboxRulesetSending :: TestInboxRulesetSendingOptions -> m TestInboxRulesetSendingResult{- ^ Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets -} + , testInboxRulesetsForInbox :: Maybe UUID -> InboxRulesetTestOptions -> m InboxRulesetTestResult{- ^ Test inbox rulesets for inbox -} + , testNewInboxRuleset :: TestNewInboxRulesetOptions -> m InboxRulesetTestResult{- ^ Test new inbox ruleset -} + , describeMailServerDomain :: DescribeDomainOptions -> m DescribeMailServerDomainResult{- ^ -} + , getDnsLookup :: DNSLookupOptions -> m DNSLookupResults{- ^ -} + , getDnsLookups :: DNSLookupsOptions -> m DNSLookupResults{- ^ -} + , getIpAddress :: Maybe Text -> m IPAddressResult{- ^ -} + , verifyEmailAddress :: VerifyEmailAddressOptions -> m EmailVerificationResult{- ^ -} + , getAllMissedEmails :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe UUID -> m PageMissedEmailProjection{- ^ -} + , getAllUnknownMissedEmails :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe UUID -> m PageUnknownMissedEmailProjection{- ^ Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. -} + , getMissedEmail :: UUID -> m MissedEmailDto{- ^ List emails that were missed due to plan limits. -} + , restoreMissedEmails :: m (){- ^ If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. -} + , waitForNthMissedEmail :: Maybe UUID -> Maybe Integer -> Maybe Int -> Maybe UTCTime -> Maybe UTCTime -> m MissedEmailDto{- ^ Wait for 0 based index missed email -} + , createEmergencyAddress :: CreateEmergencyAddressOptions -> m EmergencyAddress{- ^ -} + , deleteEmergencyAddress :: UUID -> m EmptyResponseDto{- ^ -} + , deletePhoneNumber :: UUID -> m (){- ^ -} + , getEmergencyAddress :: UUID -> m EmergencyAddress{- ^ -} + , getEmergencyAddresses :: m [EmergencyAddressDto]{- ^ -} + , getPhoneNumber :: UUID -> m PhoneNumberDto{- ^ -} + , getPhoneNumbers :: Maybe Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PagePhoneNumberProjection{- ^ -} + , getPhonePlans :: m [PhonePlanDto]{- ^ -} + , testPhoneNumberSendSms :: UUID -> TestPhoneNumberOptions -> Maybe Text -> m (){- ^ -} + , deleteAllSentEmails :: m (){- ^ -} + , deleteSentEmail :: UUID -> m (){- ^ -} + , getAllSentTrackingPixels :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageTrackingPixelProjection{- ^ Get all sent email tracking pixels in paginated form -} + , getRawSentEmailContents :: UUID -> m (){- ^ Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint -} + , getRawSentEmailJson :: UUID -> m RawEmailJson{- ^ Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response -} + , getSentDeliveryStatus :: UUID -> m DeliveryStatusDto{- ^ Get a sent email delivery status -} + , getSentDeliveryStatuses :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageDeliveryStatus{- ^ Get all sent email delivery statuses -} + , getSentDeliveryStatusesBySentId :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageDeliveryStatus{- ^ Get all sent email delivery statuses -} + , getSentEmail :: UUID -> m SentEmailDto{- ^ -} + , getSentEmailHTMLContent :: UUID -> m Text{- ^ -} + , getSentEmailPreviewURLs :: UUID -> m EmailPreviewUrls{- ^ Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. -} + , getSentEmailTrackingPixels :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageTrackingPixelProjection{- ^ Get all tracking pixels for a sent email in paginated form -} + , getSentEmails :: Maybe UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageSentEmailProjection{- ^ -} + , getSentEmailsWithQueueResults :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageSentEmailWithQueueProjection{- ^ -} + , getSentOrganizationEmails :: Maybe UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageSentEmailProjection{- ^ Get all sent organization emails in paginated form -} + , waitForDeliveryStatuses :: Maybe UUID -> Maybe UUID -> Maybe Integer -> Maybe Int -> Maybe UTCTime -> Maybe UTCTime -> m DeliveryStatusDto{- ^ Wait for delivery statuses -} + , deleteSmsMessage :: UUID -> m (){- ^ Delete an SMS message -} + , deleteSmsMessages :: Maybe UUID -> m (){- ^ Delete all SMS messages or all messages for a given phone number -} + , getReplyForSmsMessage :: UUID -> m ReplyForSms{- ^ Get reply for an SMS message. -} + , getSmsCount :: m CountDto{- ^ Get number of SMS -} + , getSmsMessage :: UUID -> m SmsDto{- ^ Returns a SMS summary object with content. -} + , getSmsMessagesPaginated :: Maybe UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> m PageSmsProjection{- ^ By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages -} + , getUnreadSmsCount :: m UnreadCount{- ^ Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response -} + , replyToSmsMessage :: UUID -> SmsReplyOptions -> m SentSmsDto{- ^ Reply to an SMS message. -} + , createTemplate :: CreateTemplateOptions -> m TemplateDto{- ^ Create an email template with variables for use with templated transactional emails. -} + , deleteTemplate :: UUID -> m (){- ^ Delete template -} + , getAllTemplates :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageTemplateProjection{- ^ Get all templates in paginated format -} + , getTemplate :: UUID -> m TemplateDto{- ^ Get email template -} + , getTemplatePreviewHtml :: UUID -> m Text{- ^ Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. -} + , getTemplatePreviewJson :: UUID -> m TemplatePreview{- ^ Get email template preview with passed template variables in JSON format. Pass template variables as query params. -} + , getTemplates :: m [TemplateProjection]{- ^ Get all templates -} + , updateTemplate :: UUID -> CreateTemplateOptions -> m TemplateDto{- ^ Update email template -} + , checkEmailFeaturesClientSupport :: CheckEmailFeaturesClientSupportOptions -> m CheckEmailFeaturesClientSupportResults{- ^ -} + , createNewFakeEmailAddress :: m NewFakeEmailAddressResult{- ^ -} + , generateBimiRecord :: GenerateBimiRecordOptions -> m GenerateBimiRecordResults{- ^ -} + , generateDmarcRecord :: GenerateDmarcRecordOptions -> m GenerateDmarcRecordResults{- ^ -} + , generateMtaStsRecord :: GenerateMtaStsRecordOptions -> m GenerateMtaStsRecordResults{- ^ -} + , generateTlsReportingRecord :: GenerateTlsReportingRecordOptions -> m GenerateTlsReportingRecordResults{- ^ -} + , getFakeEmailById :: Maybe UUID -> m FakeEmailResult{- ^ -} + , getFakeEmailsForAddress :: Maybe Int -> Maybe Text -> m [FakeEmailPreview]{- ^ -} + , lookupBimiDomain :: LookupBimiDomainOptions -> m LookupBimiDomainResults{- ^ -} + , lookupDmarcDomain :: LookupDmarcDomainOptions -> m LookupDmarcDomainResults{- ^ -} + , lookupMtaStsDomain :: LookupMtaStsDomainOptions -> m LookupMtaStsDomainResults{- ^ -} + , lookupTlsReportingDomain :: LookupTlsReportingDomainOptions -> m LookupTlsReportingDomainResults{- ^ -} + , createTrackingPixel :: CreateTrackingPixelOptions -> m TrackingPixelDto{- ^ Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. -} + , getAllTrackingPixels :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageTrackingPixelProjection{- ^ List tracking pixels in paginated form -} + , getTrackingPixel :: UUID -> m TrackingPixelDto{- ^ -} + , getJsonPropertyAsString :: Maybe Text -> Value -> m Text{- ^ Utility function to extract properties from JSON objects in language where this is cumbersome. -} + , getUserInfo :: m UserInfoDto{- ^ Get account information for your user -} + , waitFor :: WaitForConditions -> m [EmailPreview]{- ^ Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met -} + , waitForEmailCount :: Maybe UUID -> Maybe Int -> Maybe Integer -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Integer -> m [EmailPreview]{- ^ If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. -} + , waitForLatestEmail :: Maybe UUID -> Maybe Integer -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Integer -> m Email{- ^ Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. -} + , waitForLatestSms :: WaitForSingleSmsOptions -> m SmsDto{- ^ Wait until a phone number meets given conditions or return immediately if already met -} + , waitForMatchingEmails :: Maybe UUID -> Maybe Int -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Integer -> Maybe Integer -> Maybe Bool -> MatchOptions -> m [EmailPreview]{- ^ Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. -} + , waitForMatchingFirstEmail :: Maybe UUID -> Maybe Integer -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Integer -> MatchOptions -> m Email{- ^ Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. -} + , waitForNthEmail :: Maybe UUID -> Maybe Int -> Maybe Integer -> Maybe Bool -> Maybe UTCTime -> Maybe UTCTime -> Maybe Text -> Maybe Integer -> m Email{- ^ If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. -} + , waitForSms :: WaitForSmsConditions -> m [SmsPreview]{- ^ Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met -} + , createAccountWebhook :: CreateWebhookOptions -> m WebhookDto{- ^ Get notified of account level events such as bounce and bounce recipient. -} + , createWebhook :: UUID -> CreateWebhookOptions -> m WebhookDto{- ^ Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. -} + , createWebhookForPhoneNumber :: UUID -> CreateWebhookOptions -> m WebhookDto{- ^ Get notified whenever a phone number receives an SMS via a WebHook URL. -} + , deleteAllWebhooks :: Maybe UTCTime -> m (){- ^ -} + , deleteWebhook :: UUID -> UUID -> m (){- ^ -} + , deleteWebhookById :: UUID -> m (){- ^ -} + , getAllAccountWebhooks :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageWebhookProjection{- ^ List account webhooks in paginated form. Allows for page index, page size, and sort direction. -} + , getAllWebhookResults :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Int -> Maybe Int -> Maybe UUID -> Maybe UUID -> Maybe UUID -> Maybe UUID -> Maybe UUID -> m PageWebhookResult{- ^ -} + , getAllWebhooks :: Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UUID -> Maybe UUID -> Maybe UTCTime -> m PageWebhookProjection{- ^ List webhooks in paginated form. Allows for page index, page size, and sort direction. -} + , getInboxWebhooksPaginated :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageWebhookProjection{- ^ -} + , getJsonSchemaForWebhookEvent :: Maybe Text -> m JSONSchemaDto{- ^ Get JSON Schema definition for webhook payload by event -} + , getJsonSchemaForWebhookPayload :: UUID -> m JSONSchemaDto{- ^ Get JSON Schema definition for webhook payload -} + , getPhoneNumberWebhooksPaginated :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> m PageWebhookProjection{- ^ -} + , getTestWebhookPayload :: Maybe Text -> m AbstractWebhookPayload{- ^ Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. -} + , getTestWebhookPayloadBounce :: m WebhookBouncePayload{- ^ Get webhook test payload for bounce -} + , getTestWebhookPayloadBounceRecipient :: m WebhookBounceRecipientPayload{- ^ Get webhook test payload for bounce recipient -} + , getTestWebhookPayloadDeliveryStatus :: m WebhookDeliveryStatusPayload{- ^ -} + , getTestWebhookPayloadEmailOpened :: m WebhookEmailOpenedPayload{- ^ Get webhook test payload for email opened event -} + , getTestWebhookPayloadEmailRead :: m WebhookEmailReadPayload{- ^ Get webhook test payload for email opened event -} + , getTestWebhookPayloadForWebhook :: UUID -> m AbstractWebhookPayload{- ^ Get example payload for webhook -} + , getTestWebhookPayloadNewAttachment :: m WebhookNewAttachmentPayload{- ^ -} + , getTestWebhookPayloadNewContact :: m WebhookNewContactPayload{- ^ -} + , getTestWebhookPayloadNewEmail :: m WebhookNewEmailPayload{- ^ -} + , getTestWebhookPayloadNewSms :: m WebhookNewSmsPayload{- ^ -} + , getWebhook :: UUID -> m WebhookDto{- ^ -} + , getWebhookResult :: UUID -> m WebhookResultDto{- ^ -} + , getWebhookResults :: UUID -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe Int -> Maybe Int -> Maybe UUID -> Maybe UUID -> Maybe UUID -> Maybe UUID -> Maybe UUID -> m PageWebhookResult{- ^ -} + , getWebhookResultsCount :: UUID -> m CountDto{- ^ -} + , getWebhookResultsUnseenErrorCount :: m UnseenErrorCountDto{- ^ -} + , getWebhooks :: UUID -> m [WebhookDto]{- ^ -} + , redriveAllWebhookResults :: m WebhookRedriveAllResult{- ^ Allows you to resend webhook payloads for any recorded webhook result that failed to deliver the payload. -} + , redriveWebhookResult :: UUID -> m WebhookRedriveResult{- ^ Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. -} + , sendTestData :: UUID -> m WebhookTestResult{- ^ -} + , updateWebhookHeaders :: UUID -> WebhookHeaders -> m WebhookDto{- ^ -} + , verifyWebhookSignature :: VerifyWebhookSignatureOptions -> m VerifyWebhookSignatureResults{- ^ Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. -} + , waitForWebhookResults :: UUID -> Maybe Int -> Maybe Int -> m [WebhookResultDto]{- ^ -} + } + +newtype MailSlurpClient a = MailSlurpClient + { runClient :: ClientEnv -> ExceptT ClientError IO a + } deriving Functor + +instance Applicative MailSlurpClient where + pure x = MailSlurpClient (\_ -> pure x) + (MailSlurpClient f) <*> (MailSlurpClient x) = + MailSlurpClient (\env -> f env <*> x env) + +instance Monad MailSlurpClient where + (MailSlurpClient a) >>= f = + MailSlurpClient (\env -> do + value <- a env + runClient (f value) env) + +instance MonadIO MailSlurpClient where + liftIO io = MailSlurpClient (\_ -> liftIO io) + +createMailSlurpClient :: MailSlurpBackend MailSlurpClient +createMailSlurpClient = MailSlurpBackend{..} + where + ((coerce -> createAlias) :<|> + (coerce -> deleteAlias) :<|> + (coerce -> getAlias) :<|> + (coerce -> getAliasEmails) :<|> + (coerce -> getAliasThreads) :<|> + (coerce -> getAliases) :<|> + (coerce -> getThread) :<|> + (coerce -> getThreadsPaginated) :<|> + (coerce -> replyToAliasEmail) :<|> + (coerce -> sendAliasEmail) :<|> + (coerce -> updateAlias) :<|> + (coerce -> deleteAllAttachments) :<|> + (coerce -> deleteAttachment) :<|> + (coerce -> downloadAttachmentAsBase64Encoded) :<|> + (coerce -> downloadAttachmentAsBytes) :<|> + (coerce -> getAttachment) :<|> + (coerce -> getAttachmentInfo) :<|> + (coerce -> getAttachments) :<|> + (coerce -> uploadAttachment) :<|> + (coerce -> uploadAttachmentBytes) :<|> + (coerce -> uploadMultipartForm) :<|> + (coerce -> filterBouncedRecipient) :<|> + (coerce -> getAccountBounceBlockStatus) :<|> + (coerce -> getBouncedEmail) :<|> + (coerce -> getBouncedEmails) :<|> + (coerce -> getBouncedRecipient) :<|> + (coerce -> getBouncedRecipients) :<|> + (coerce -> getComplaint) :<|> + (coerce -> getComplaints) :<|> + (coerce -> getListUnsubscribeRecipients) :<|> + (coerce -> bulkCreateInboxes) :<|> + (coerce -> bulkDeleteInboxes) :<|> + (coerce -> bulkSendEmails) :<|> + (coerce -> createNewEmailAddress) :<|> + (coerce -> createRandomInbox) :<|> + (coerce -> deleteEmailAddress) :<|> + (coerce -> emptyInbox) :<|> + (coerce -> sendEmailQuery) :<|> + (coerce -> sendEmailSimple) :<|> + (coerce -> createConnector) :<|> + (coerce -> createConnectorImapConnection) :<|> + (coerce -> createConnectorSmtpConnection) :<|> + (coerce -> deleteAllConnector) :<|> + (coerce -> deleteConnector) :<|> + (coerce -> deleteConnectorImapConnection) :<|> + (coerce -> deleteConnectorSmtpConnection) :<|> + (coerce -> getAllConnectorSyncEvents) :<|> + (coerce -> getConnector) :<|> + (coerce -> getConnectorSyncEvent) :<|> + (coerce -> getConnectorSyncEvents) :<|> + (coerce -> getConnectors) :<|> + (coerce -> syncConnector) :<|> + (coerce -> updateConnector) :<|> + (coerce -> createContact) :<|> + (coerce -> deleteContact) :<|> + (coerce -> getAllContacts) :<|> + (coerce -> getContact) :<|> + (coerce -> getContactVCard) :<|> + (coerce -> getContacts) :<|> + (coerce -> addDomainWildcardCatchAll) :<|> + (coerce -> createDomain) :<|> + (coerce -> deleteDomain) :<|> + (coerce -> getAvailableDomains) :<|> + (coerce -> getDomain) :<|> + (coerce -> getDomainIssues) :<|> + (coerce -> getDomainWildcardCatchAllInbox) :<|> + (coerce -> getDomains) :<|> + (coerce -> getMailSlurpDomains) :<|> + (coerce -> updateDomain) :<|> + (coerce -> applyImapFlagOperation) :<|> + (coerce -> canSend) :<|> + (coerce -> checkEmailBody) :<|> + (coerce -> checkEmailBodyFeatureSupport) :<|> + (coerce -> checkEmailClientSupport) :<|> + (coerce -> deleteAllEmails) :<|> + (coerce -> deleteEmail) :<|> + (coerce -> downloadAttachment) :<|> + (coerce -> downloadAttachmentBase64) :<|> + (coerce -> downloadBody) :<|> + (coerce -> downloadBodyBytes) :<|> + (coerce -> forwardEmail) :<|> + (coerce -> getAttachmentMetaData) :<|> + (coerce -> getEmail) :<|> + (coerce -> getEmailAttachments) :<|> + (coerce -> getEmailContentMatch) :<|> + (coerce -> getEmailContentPart) :<|> + (coerce -> getEmailCount) :<|> + (coerce -> getEmailHTML) :<|> + (coerce -> getEmailHTMLJson) :<|> + (coerce -> getEmailHTMLQuery) :<|> + (coerce -> getEmailLinks) :<|> + (coerce -> getEmailPreviewURLs) :<|> + (coerce -> getEmailScreenshotAsBase64) :<|> + (coerce -> getEmailScreenshotAsBinary) :<|> + (coerce -> getEmailTextLines) :<|> + (coerce -> getEmailsOffsetPaginated) :<|> + (coerce -> getEmailsPaginated) :<|> + (coerce -> getGravatarUrlForEmailAddress) :<|> + (coerce -> getLatestEmail) :<|> + (coerce -> getLatestEmailInInbox1) :<|> + (coerce -> getOrganizationEmailsPaginated) :<|> + (coerce -> getRawEmailContents) :<|> + (coerce -> getRawEmailJson) :<|> + (coerce -> getUnreadEmailCount) :<|> + (coerce -> markAsRead) :<|> + (coerce -> replyToEmail) :<|> + (coerce -> searchEmails) :<|> + (coerce -> sendEmailSourceOptional) :<|> + (coerce -> validateEmail) :<|> + (coerce -> deleteAllValidationRequests) :<|> + (coerce -> deleteValidationRequest) :<|> + (coerce -> getValidationRequests) :<|> + (coerce -> validateEmailAddressList) :<|> + (coerce -> getExpirationDefaults) :<|> + (coerce -> getExpiredInboxByInboxId) :<|> + (coerce -> getExpiredInboxRecord) :<|> + (coerce -> getExpiredInboxes) :<|> + (coerce -> exportEntities) :<|> + (coerce -> getExportLink) :<|> + (coerce -> submitForm) :<|> + (coerce -> addContactsToGroup) :<|> + (coerce -> createGroup) :<|> + (coerce -> deleteGroup) :<|> + (coerce -> getAllGroups) :<|> + (coerce -> getGroup) :<|> + (coerce -> getGroupWithContacts) :<|> + (coerce -> getGroupWithContactsPaginated) :<|> + (coerce -> getGroups) :<|> + (coerce -> removeContactsFromGroup) :<|> + (coerce -> imapServerFetch) :<|> + (coerce -> imapServerGet) :<|> + (coerce -> imapServerList) :<|> + (coerce -> imapServerSearch) :<|> + (coerce -> imapServerStatus) :<|> + (coerce -> imapServerUpdateFlags) :<|> + (coerce -> cancelScheduledJob) :<|> + (coerce -> createInbox) :<|> + (coerce -> createInboxRuleset) :<|> + (coerce -> createInboxWithDefaults) :<|> + (coerce -> createInboxWithOptions) :<|> + (coerce -> deleteAllInboxEmails) :<|> + (coerce -> deleteAllInboxes) :<|> + (coerce -> deleteAllInboxesByDescription) :<|> + (coerce -> deleteAllInboxesByName) :<|> + (coerce -> deleteAllInboxesByTag) :<|> + (coerce -> deleteInbox) :<|> + (coerce -> doesInboxExist) :<|> + (coerce -> flushExpired) :<|> + (coerce -> getAllInboxes) :<|> + (coerce -> getAllInboxesOffsetPaginated) :<|> + (coerce -> getAllScheduledJobs) :<|> + (coerce -> getDeliveryStatusesByInboxId) :<|> + (coerce -> getEmails) :<|> + (coerce -> getImapAccess) :<|> + (coerce -> getImapSmtpAccess) :<|> + (coerce -> getImapSmtpAccessEnv) :<|> + (coerce -> getInbox) :<|> + (coerce -> getInboxByEmailAddress) :<|> + (coerce -> getInboxByName) :<|> + (coerce -> getInboxCount) :<|> + (coerce -> getInboxEmailCount) :<|> + (coerce -> getInboxEmailsPaginated) :<|> + (coerce -> getInboxIds) :<|> + (coerce -> getInboxSentEmails) :<|> + (coerce -> getInboxTags) :<|> + (coerce -> getInboxes) :<|> + (coerce -> getLatestEmailInInbox) :<|> + (coerce -> getOrganizationInboxes) :<|> + (coerce -> getScheduledJob) :<|> + (coerce -> getScheduledJobsByInboxId) :<|> + (coerce -> getSmtpAccess) :<|> + (coerce -> listInboxRulesets) :<|> + (coerce -> listInboxTrackingPixels) :<|> + (coerce -> searchInboxes) :<|> + (coerce -> sendEmail) :<|> + (coerce -> sendEmailAndConfirm) :<|> + (coerce -> sendEmailWithQueue) :<|> + (coerce -> sendSmtpEnvelope) :<|> + (coerce -> sendTestEmail) :<|> + (coerce -> sendWithSchedule) :<|> + (coerce -> setInboxFavourited) :<|> + (coerce -> updateInbox) :<|> + (coerce -> createNewInboxForwarder) :<|> + (coerce -> deleteInboxForwarder) :<|> + (coerce -> deleteInboxForwarders) :<|> + (coerce -> getAllInboxForwarderEvents) :<|> + (coerce -> getForwarderEvent) :<|> + (coerce -> getInboxForwarder) :<|> + (coerce -> getInboxForwarderEvent) :<|> + (coerce -> getInboxForwarderEvents) :<|> + (coerce -> getInboxForwarders) :<|> + (coerce -> testInboxForwarder) :<|> + (coerce -> testInboxForwardersForInbox) :<|> + (coerce -> testNewInboxForwarder) :<|> + (coerce -> updateInboxForwarder) :<|> + (coerce -> createNewInboxReplier) :<|> + (coerce -> deleteInboxReplier) :<|> + (coerce -> deleteInboxRepliers) :<|> + (coerce -> getInboxReplier) :<|> + (coerce -> getInboxReplierEvents) :<|> + (coerce -> getInboxRepliers) :<|> + (coerce -> updateInboxReplier) :<|> + (coerce -> createNewInboxRuleset) :<|> + (coerce -> deleteInboxRuleset) :<|> + (coerce -> deleteInboxRulesets) :<|> + (coerce -> getInboxRuleset) :<|> + (coerce -> getInboxRulesets) :<|> + (coerce -> testInboxRuleset) :<|> + (coerce -> testInboxRulesetReceiving) :<|> + (coerce -> testInboxRulesetSending) :<|> + (coerce -> testInboxRulesetsForInbox) :<|> + (coerce -> testNewInboxRuleset) :<|> + (coerce -> describeMailServerDomain) :<|> + (coerce -> getDnsLookup) :<|> + (coerce -> getDnsLookups) :<|> + (coerce -> getIpAddress) :<|> + (coerce -> verifyEmailAddress) :<|> + (coerce -> getAllMissedEmails) :<|> + (coerce -> getAllUnknownMissedEmails) :<|> + (coerce -> getMissedEmail) :<|> + (coerce -> restoreMissedEmails) :<|> + (coerce -> waitForNthMissedEmail) :<|> + (coerce -> createEmergencyAddress) :<|> + (coerce -> deleteEmergencyAddress) :<|> + (coerce -> deletePhoneNumber) :<|> + (coerce -> getEmergencyAddress) :<|> + (coerce -> getEmergencyAddresses) :<|> + (coerce -> getPhoneNumber) :<|> + (coerce -> getPhoneNumbers) :<|> + (coerce -> getPhonePlans) :<|> + (coerce -> testPhoneNumberSendSms) :<|> + (coerce -> deleteAllSentEmails) :<|> + (coerce -> deleteSentEmail) :<|> + (coerce -> getAllSentTrackingPixels) :<|> + (coerce -> getRawSentEmailContents) :<|> + (coerce -> getRawSentEmailJson) :<|> + (coerce -> getSentDeliveryStatus) :<|> + (coerce -> getSentDeliveryStatuses) :<|> + (coerce -> getSentDeliveryStatusesBySentId) :<|> + (coerce -> getSentEmail) :<|> + (coerce -> getSentEmailHTMLContent) :<|> + (coerce -> getSentEmailPreviewURLs) :<|> + (coerce -> getSentEmailTrackingPixels) :<|> + (coerce -> getSentEmails) :<|> + (coerce -> getSentEmailsWithQueueResults) :<|> + (coerce -> getSentOrganizationEmails) :<|> + (coerce -> waitForDeliveryStatuses) :<|> + (coerce -> deleteSmsMessage) :<|> + (coerce -> deleteSmsMessages) :<|> + (coerce -> getReplyForSmsMessage) :<|> + (coerce -> getSmsCount) :<|> + (coerce -> getSmsMessage) :<|> + (coerce -> getSmsMessagesPaginated) :<|> + (coerce -> getUnreadSmsCount) :<|> + (coerce -> replyToSmsMessage) :<|> + (coerce -> createTemplate) :<|> + (coerce -> deleteTemplate) :<|> + (coerce -> getAllTemplates) :<|> + (coerce -> getTemplate) :<|> + (coerce -> getTemplatePreviewHtml) :<|> + (coerce -> getTemplatePreviewJson) :<|> + (coerce -> getTemplates) :<|> + (coerce -> updateTemplate) :<|> + (coerce -> checkEmailFeaturesClientSupport) :<|> + (coerce -> createNewFakeEmailAddress) :<|> + (coerce -> generateBimiRecord) :<|> + (coerce -> generateDmarcRecord) :<|> + (coerce -> generateMtaStsRecord) :<|> + (coerce -> generateTlsReportingRecord) :<|> + (coerce -> getFakeEmailById) :<|> + (coerce -> getFakeEmailsForAddress) :<|> + (coerce -> lookupBimiDomain) :<|> + (coerce -> lookupDmarcDomain) :<|> + (coerce -> lookupMtaStsDomain) :<|> + (coerce -> lookupTlsReportingDomain) :<|> + (coerce -> createTrackingPixel) :<|> + (coerce -> getAllTrackingPixels) :<|> + (coerce -> getTrackingPixel) :<|> + (coerce -> getJsonPropertyAsString) :<|> + (coerce -> getUserInfo) :<|> + (coerce -> waitFor) :<|> + (coerce -> waitForEmailCount) :<|> + (coerce -> waitForLatestEmail) :<|> + (coerce -> waitForLatestSms) :<|> + (coerce -> waitForMatchingEmails) :<|> + (coerce -> waitForMatchingFirstEmail) :<|> + (coerce -> waitForNthEmail) :<|> + (coerce -> waitForSms) :<|> + (coerce -> createAccountWebhook) :<|> + (coerce -> createWebhook) :<|> + (coerce -> createWebhookForPhoneNumber) :<|> + (coerce -> deleteAllWebhooks) :<|> + (coerce -> deleteWebhook) :<|> + (coerce -> deleteWebhookById) :<|> + (coerce -> getAllAccountWebhooks) :<|> + (coerce -> getAllWebhookResults) :<|> + (coerce -> getAllWebhooks) :<|> + (coerce -> getInboxWebhooksPaginated) :<|> + (coerce -> getJsonSchemaForWebhookEvent) :<|> + (coerce -> getJsonSchemaForWebhookPayload) :<|> + (coerce -> getPhoneNumberWebhooksPaginated) :<|> + (coerce -> getTestWebhookPayload) :<|> + (coerce -> getTestWebhookPayloadBounce) :<|> + (coerce -> getTestWebhookPayloadBounceRecipient) :<|> + (coerce -> getTestWebhookPayloadDeliveryStatus) :<|> + (coerce -> getTestWebhookPayloadEmailOpened) :<|> + (coerce -> getTestWebhookPayloadEmailRead) :<|> + (coerce -> getTestWebhookPayloadForWebhook) :<|> + (coerce -> getTestWebhookPayloadNewAttachment) :<|> + (coerce -> getTestWebhookPayloadNewContact) :<|> + (coerce -> getTestWebhookPayloadNewEmail) :<|> + (coerce -> getTestWebhookPayloadNewSms) :<|> + (coerce -> getWebhook) :<|> + (coerce -> getWebhookResult) :<|> + (coerce -> getWebhookResults) :<|> + (coerce -> getWebhookResultsCount) :<|> + (coerce -> getWebhookResultsUnseenErrorCount) :<|> + (coerce -> getWebhooks) :<|> + (coerce -> redriveAllWebhookResults) :<|> + (coerce -> redriveWebhookResult) :<|> + (coerce -> sendTestData) :<|> + (coerce -> updateWebhookHeaders) :<|> + (coerce -> verifyWebhookSignature) :<|> + (coerce -> waitForWebhookResults) :<|> + _) = client (Proxy :: Proxy MailSlurpAPI) + +-- | Run requests in the MailSlurpClient monad. +runMailSlurpClient :: Config -> MailSlurpClient a -> ExceptT ClientError IO a +runMailSlurpClient clientConfig cl = do + manager <- liftIO $ newManager tlsManagerSettings + runMailSlurpClientWithManager manager clientConfig cl + +-- | Run requests in the MailSlurpClient monad using a custom manager. +runMailSlurpClientWithManager :: Manager -> Config -> MailSlurpClient a -> ExceptT ClientError IO a +runMailSlurpClientWithManager manager Config{..} cl = do + url <- parseBaseUrl configUrl + runClient cl $ mkClientEnv manager url + +-- | Like @runClient@, but returns the response or throws +-- a MailSlurpClientError +callMailSlurp + :: (MonadIO m, MonadThrow m) + => ClientEnv -> MailSlurpClient a -> m a +callMailSlurp env f = do + res <- liftIO $ runExceptT $ runClient f env + case res of + Left err -> throwM (MailSlurpClientError err) + Right response -> pure response + + +requestMiddlewareId :: Application -> Application +requestMiddlewareId a = a + +-- | Run the MailSlurp server at the provided host and port. +runMailSlurpServer + :: (MonadIO m, MonadThrow m) + => Config -> MailSlurpBackend (ExceptT ServerError IO) -> m () +runMailSlurpServer config backend = runMailSlurpMiddlewareServer config requestMiddlewareId backend + +-- | Run the MailSlurp server at the provided host and port. +runMailSlurpMiddlewareServer + :: (MonadIO m, MonadThrow m) + => Config -> Middleware -> MailSlurpBackend (ExceptT ServerError IO) -> m () +runMailSlurpMiddlewareServer Config{..} middleware backend = do + url <- parseBaseUrl configUrl + let warpSettings = Warp.defaultSettings + & Warp.setPort (baseUrlPort url) + & Warp.setHost (fromString $ baseUrlHost url) + liftIO $ Warp.runSettings warpSettings $ middleware $ serve (Proxy :: Proxy MailSlurpAPI) (serverFromBackend backend) + where + serverFromBackend MailSlurpBackend{..} = + (coerce createAlias :<|> + coerce deleteAlias :<|> + coerce getAlias :<|> + coerce getAliasEmails :<|> + coerce getAliasThreads :<|> + coerce getAliases :<|> + coerce getThread :<|> + coerce getThreadsPaginated :<|> + coerce replyToAliasEmail :<|> + coerce sendAliasEmail :<|> + coerce updateAlias :<|> + coerce deleteAllAttachments :<|> + coerce deleteAttachment :<|> + coerce downloadAttachmentAsBase64Encoded :<|> + coerce downloadAttachmentAsBytes :<|> + coerce getAttachment :<|> + coerce getAttachmentInfo :<|> + coerce getAttachments :<|> + coerce uploadAttachment :<|> + coerce uploadAttachmentBytes :<|> + coerce uploadMultipartForm :<|> + coerce filterBouncedRecipient :<|> + coerce getAccountBounceBlockStatus :<|> + coerce getBouncedEmail :<|> + coerce getBouncedEmails :<|> + coerce getBouncedRecipient :<|> + coerce getBouncedRecipients :<|> + coerce getComplaint :<|> + coerce getComplaints :<|> + coerce getListUnsubscribeRecipients :<|> + coerce bulkCreateInboxes :<|> + coerce bulkDeleteInboxes :<|> + coerce bulkSendEmails :<|> + coerce createNewEmailAddress :<|> + coerce createRandomInbox :<|> + coerce deleteEmailAddress :<|> + coerce emptyInbox :<|> + coerce sendEmailQuery :<|> + coerce sendEmailSimple :<|> + coerce createConnector :<|> + coerce createConnectorImapConnection :<|> + coerce createConnectorSmtpConnection :<|> + coerce deleteAllConnector :<|> + coerce deleteConnector :<|> + coerce deleteConnectorImapConnection :<|> + coerce deleteConnectorSmtpConnection :<|> + coerce getAllConnectorSyncEvents :<|> + coerce getConnector :<|> + coerce getConnectorSyncEvent :<|> + coerce getConnectorSyncEvents :<|> + coerce getConnectors :<|> + coerce syncConnector :<|> + coerce updateConnector :<|> + coerce createContact :<|> + coerce deleteContact :<|> + coerce getAllContacts :<|> + coerce getContact :<|> + coerce getContactVCard :<|> + coerce getContacts :<|> + coerce addDomainWildcardCatchAll :<|> + coerce createDomain :<|> + coerce deleteDomain :<|> + coerce getAvailableDomains :<|> + coerce getDomain :<|> + coerce getDomainIssues :<|> + coerce getDomainWildcardCatchAllInbox :<|> + coerce getDomains :<|> + coerce getMailSlurpDomains :<|> + coerce updateDomain :<|> + coerce applyImapFlagOperation :<|> + coerce canSend :<|> + coerce checkEmailBody :<|> + coerce checkEmailBodyFeatureSupport :<|> + coerce checkEmailClientSupport :<|> + coerce deleteAllEmails :<|> + coerce deleteEmail :<|> + coerce downloadAttachment :<|> + coerce downloadAttachmentBase64 :<|> + coerce downloadBody :<|> + coerce downloadBodyBytes :<|> + coerce forwardEmail :<|> + coerce getAttachmentMetaData :<|> + coerce getEmail :<|> + coerce getEmailAttachments :<|> + coerce getEmailContentMatch :<|> + coerce getEmailContentPart :<|> + coerce getEmailCount :<|> + coerce getEmailHTML :<|> + coerce getEmailHTMLJson :<|> + coerce getEmailHTMLQuery :<|> + coerce getEmailLinks :<|> + coerce getEmailPreviewURLs :<|> + coerce getEmailScreenshotAsBase64 :<|> + coerce getEmailScreenshotAsBinary :<|> + coerce getEmailTextLines :<|> + coerce getEmailsOffsetPaginated :<|> + coerce getEmailsPaginated :<|> + coerce getGravatarUrlForEmailAddress :<|> + coerce getLatestEmail :<|> + coerce getLatestEmailInInbox1 :<|> + coerce getOrganizationEmailsPaginated :<|> + coerce getRawEmailContents :<|> + coerce getRawEmailJson :<|> + coerce getUnreadEmailCount :<|> + coerce markAsRead :<|> + coerce replyToEmail :<|> + coerce searchEmails :<|> + coerce sendEmailSourceOptional :<|> + coerce validateEmail :<|> + coerce deleteAllValidationRequests :<|> + coerce deleteValidationRequest :<|> + coerce getValidationRequests :<|> + coerce validateEmailAddressList :<|> + coerce getExpirationDefaults :<|> + coerce getExpiredInboxByInboxId :<|> + coerce getExpiredInboxRecord :<|> + coerce getExpiredInboxes :<|> + coerce exportEntities :<|> + coerce getExportLink :<|> + coerce submitForm :<|> + coerce addContactsToGroup :<|> + coerce createGroup :<|> + coerce deleteGroup :<|> + coerce getAllGroups :<|> + coerce getGroup :<|> + coerce getGroupWithContacts :<|> + coerce getGroupWithContactsPaginated :<|> + coerce getGroups :<|> + coerce removeContactsFromGroup :<|> + coerce imapServerFetch :<|> + coerce imapServerGet :<|> + coerce imapServerList :<|> + coerce imapServerSearch :<|> + coerce imapServerStatus :<|> + coerce imapServerUpdateFlags :<|> + coerce cancelScheduledJob :<|> + coerce createInbox :<|> + coerce createInboxRuleset :<|> + coerce createInboxWithDefaults :<|> + coerce createInboxWithOptions :<|> + coerce deleteAllInboxEmails :<|> + coerce deleteAllInboxes :<|> + coerce deleteAllInboxesByDescription :<|> + coerce deleteAllInboxesByName :<|> + coerce deleteAllInboxesByTag :<|> + coerce deleteInbox :<|> + coerce doesInboxExist :<|> + coerce flushExpired :<|> + coerce getAllInboxes :<|> + coerce getAllInboxesOffsetPaginated :<|> + coerce getAllScheduledJobs :<|> + coerce getDeliveryStatusesByInboxId :<|> + coerce getEmails :<|> + coerce getImapAccess :<|> + coerce getImapSmtpAccess :<|> + coerce getImapSmtpAccessEnv :<|> + coerce getInbox :<|> + coerce getInboxByEmailAddress :<|> + coerce getInboxByName :<|> + coerce getInboxCount :<|> + coerce getInboxEmailCount :<|> + coerce getInboxEmailsPaginated :<|> + coerce getInboxIds :<|> + coerce getInboxSentEmails :<|> + coerce getInboxTags :<|> + coerce getInboxes :<|> + coerce getLatestEmailInInbox :<|> + coerce getOrganizationInboxes :<|> + coerce getScheduledJob :<|> + coerce getScheduledJobsByInboxId :<|> + coerce getSmtpAccess :<|> + coerce listInboxRulesets :<|> + coerce listInboxTrackingPixels :<|> + coerce searchInboxes :<|> + coerce sendEmail :<|> + coerce sendEmailAndConfirm :<|> + coerce sendEmailWithQueue :<|> + coerce sendSmtpEnvelope :<|> + coerce sendTestEmail :<|> + coerce sendWithSchedule :<|> + coerce setInboxFavourited :<|> + coerce updateInbox :<|> + coerce createNewInboxForwarder :<|> + coerce deleteInboxForwarder :<|> + coerce deleteInboxForwarders :<|> + coerce getAllInboxForwarderEvents :<|> + coerce getForwarderEvent :<|> + coerce getInboxForwarder :<|> + coerce getInboxForwarderEvent :<|> + coerce getInboxForwarderEvents :<|> + coerce getInboxForwarders :<|> + coerce testInboxForwarder :<|> + coerce testInboxForwardersForInbox :<|> + coerce testNewInboxForwarder :<|> + coerce updateInboxForwarder :<|> + coerce createNewInboxReplier :<|> + coerce deleteInboxReplier :<|> + coerce deleteInboxRepliers :<|> + coerce getInboxReplier :<|> + coerce getInboxReplierEvents :<|> + coerce getInboxRepliers :<|> + coerce updateInboxReplier :<|> + coerce createNewInboxRuleset :<|> + coerce deleteInboxRuleset :<|> + coerce deleteInboxRulesets :<|> + coerce getInboxRuleset :<|> + coerce getInboxRulesets :<|> + coerce testInboxRuleset :<|> + coerce testInboxRulesetReceiving :<|> + coerce testInboxRulesetSending :<|> + coerce testInboxRulesetsForInbox :<|> + coerce testNewInboxRuleset :<|> + coerce describeMailServerDomain :<|> + coerce getDnsLookup :<|> + coerce getDnsLookups :<|> + coerce getIpAddress :<|> + coerce verifyEmailAddress :<|> + coerce getAllMissedEmails :<|> + coerce getAllUnknownMissedEmails :<|> + coerce getMissedEmail :<|> + coerce restoreMissedEmails :<|> + coerce waitForNthMissedEmail :<|> + coerce createEmergencyAddress :<|> + coerce deleteEmergencyAddress :<|> + coerce deletePhoneNumber :<|> + coerce getEmergencyAddress :<|> + coerce getEmergencyAddresses :<|> + coerce getPhoneNumber :<|> + coerce getPhoneNumbers :<|> + coerce getPhonePlans :<|> + coerce testPhoneNumberSendSms :<|> + coerce deleteAllSentEmails :<|> + coerce deleteSentEmail :<|> + coerce getAllSentTrackingPixels :<|> + coerce getRawSentEmailContents :<|> + coerce getRawSentEmailJson :<|> + coerce getSentDeliveryStatus :<|> + coerce getSentDeliveryStatuses :<|> + coerce getSentDeliveryStatusesBySentId :<|> + coerce getSentEmail :<|> + coerce getSentEmailHTMLContent :<|> + coerce getSentEmailPreviewURLs :<|> + coerce getSentEmailTrackingPixels :<|> + coerce getSentEmails :<|> + coerce getSentEmailsWithQueueResults :<|> + coerce getSentOrganizationEmails :<|> + coerce waitForDeliveryStatuses :<|> + coerce deleteSmsMessage :<|> + coerce deleteSmsMessages :<|> + coerce getReplyForSmsMessage :<|> + coerce getSmsCount :<|> + coerce getSmsMessage :<|> + coerce getSmsMessagesPaginated :<|> + coerce getUnreadSmsCount :<|> + coerce replyToSmsMessage :<|> + coerce createTemplate :<|> + coerce deleteTemplate :<|> + coerce getAllTemplates :<|> + coerce getTemplate :<|> + coerce getTemplatePreviewHtml :<|> + coerce getTemplatePreviewJson :<|> + coerce getTemplates :<|> + coerce updateTemplate :<|> + coerce checkEmailFeaturesClientSupport :<|> + coerce createNewFakeEmailAddress :<|> + coerce generateBimiRecord :<|> + coerce generateDmarcRecord :<|> + coerce generateMtaStsRecord :<|> + coerce generateTlsReportingRecord :<|> + coerce getFakeEmailById :<|> + coerce getFakeEmailsForAddress :<|> + coerce lookupBimiDomain :<|> + coerce lookupDmarcDomain :<|> + coerce lookupMtaStsDomain :<|> + coerce lookupTlsReportingDomain :<|> + coerce createTrackingPixel :<|> + coerce getAllTrackingPixels :<|> + coerce getTrackingPixel :<|> + coerce getJsonPropertyAsString :<|> + coerce getUserInfo :<|> + coerce waitFor :<|> + coerce waitForEmailCount :<|> + coerce waitForLatestEmail :<|> + coerce waitForLatestSms :<|> + coerce waitForMatchingEmails :<|> + coerce waitForMatchingFirstEmail :<|> + coerce waitForNthEmail :<|> + coerce waitForSms :<|> + coerce createAccountWebhook :<|> + coerce createWebhook :<|> + coerce createWebhookForPhoneNumber :<|> + coerce deleteAllWebhooks :<|> + coerce deleteWebhook :<|> + coerce deleteWebhookById :<|> + coerce getAllAccountWebhooks :<|> + coerce getAllWebhookResults :<|> + coerce getAllWebhooks :<|> + coerce getInboxWebhooksPaginated :<|> + coerce getJsonSchemaForWebhookEvent :<|> + coerce getJsonSchemaForWebhookPayload :<|> + coerce getPhoneNumberWebhooksPaginated :<|> + coerce getTestWebhookPayload :<|> + coerce getTestWebhookPayloadBounce :<|> + coerce getTestWebhookPayloadBounceRecipient :<|> + coerce getTestWebhookPayloadDeliveryStatus :<|> + coerce getTestWebhookPayloadEmailOpened :<|> + coerce getTestWebhookPayloadEmailRead :<|> + coerce getTestWebhookPayloadForWebhook :<|> + coerce getTestWebhookPayloadNewAttachment :<|> + coerce getTestWebhookPayloadNewContact :<|> + coerce getTestWebhookPayloadNewEmail :<|> + coerce getTestWebhookPayloadNewSms :<|> + coerce getWebhook :<|> + coerce getWebhookResult :<|> + coerce getWebhookResults :<|> + coerce getWebhookResultsCount :<|> + coerce getWebhookResultsUnseenErrorCount :<|> + coerce getWebhooks :<|> + coerce redriveAllWebhookResults :<|> + coerce redriveWebhookResult :<|> + coerce sendTestData :<|> + coerce updateWebhookHeaders :<|> + coerce verifyWebhookSignature :<|> + coerce waitForWebhookResults :<|> + serveDirectoryFileServer "static") diff --git a/lib/MailSlurp/Types.hs b/lib/MailSlurp/Types.hs new file mode 100644 index 0000000..dd2fed1 --- /dev/null +++ b/lib/MailSlurp/Types.hs @@ -0,0 +1,5048 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module MailSlurp.Types ( + AbstractWebhookPayload (..), + AccountBounceBlockDto (..), + AliasDto (..), + AliasProjection (..), + AttachmentEntity (..), + AttachmentMetaData (..), + AttachmentProjection (..), + BasicAuthOptions (..), + BounceProjection (..), + BounceRecipientProjection (..), + BouncedEmailDto (..), + BouncedRecipientDto (..), + BulkSendEmailOptions (..), + CanSendEmailResults (..), + CheckEmailBodyFeatureSupportResults (..), + CheckEmailBodyResults (..), + CheckEmailClientSupportOptions (..), + CheckEmailClientSupportResults (..), + CheckEmailFeaturesClientSupportOptions (..), + CheckEmailFeaturesClientSupportResults (..), + Complaint (..), + ConditionOption (..), + ConnectorDto (..), + ConnectorImapConnectionDto (..), + ConnectorProjection (..), + ConnectorSmtpConnectionDto (..), + ConnectorSyncEventDto (..), + ConnectorSyncEventProjection (..), + ConnectorSyncRequestResult (..), + ConnectorSyncRequestResultException (..), + ConnectorSyncRequestResultExceptionCause (..), + ConnectorSyncRequestResultExceptionCauseStackTrace (..), + ConnectorSyncResult (..), + ContactDto (..), + ContactProjection (..), + ContentMatchOptions (..), + CountDto (..), + CreateAliasOptions (..), + CreateConnectorImapConnectionOptions (..), + CreateConnectorOptions (..), + CreateConnectorSmtpConnectionOptions (..), + CreateContactOptions (..), + CreateDomainOptions (..), + CreateEmergencyAddressOptions (..), + CreateGroupOptions (..), + CreateInboxDto (..), + CreateInboxForwarderOptions (..), + CreateInboxReplierOptions (..), + CreateInboxRulesetOptions (..), + CreateTemplateOptions (..), + CreateTrackingPixelOptions (..), + CreateWebhookOptions (..), + DNSLookupOptions (..), + DNSLookupResult (..), + DNSLookupResults (..), + DNSLookupsOptions (..), + DeliveryStatusDto (..), + DescribeDomainOptions (..), + DescribeMailServerDomainResult (..), + DomainDto (..), + DomainGroup (..), + DomainGroupsDto (..), + DomainInformation (..), + DomainIssuesDto (..), + DomainNameRecord (..), + DomainPreview (..), + DownloadAttachmentDto (..), + Email (..), + EmailAnalysis (..), + EmailContentMatchResult (..), + EmailContentPartResult (..), + EmailFeatureCategoryName (..), + EmailFeatureFamilyName (..), + EmailFeatureFamilyStatistics (..), + EmailFeatureNames (..), + EmailFeatureOverview (..), + EmailFeaturePlatformName (..), + EmailFeaturePlatformStatistics (..), + EmailFeatureSupportFlags (..), + EmailFeatureSupportResult (..), + EmailFeatureSupportStatusPercentage (..), + EmailFeatureVersionStatistics (..), + EmailHtmlDto (..), + EmailLinksResult (..), + EmailPreview (..), + EmailPreviewUrls (..), + EmailProjection (..), + EmailRecipients (..), + EmailScreenshotResult (..), + EmailTextLinesResult (..), + EmailValidationRequestDto (..), + EmailVerificationResult (..), + EmergencyAddress (..), + EmergencyAddressDto (..), + EmptyResponseDto (..), + ExpirationDefaults (..), + ExpiredInboxDto (..), + ExpiredInboxRecordProjection (..), + ExportLink (..), + ExportOptions (..), + FakeEmailDto (..), + FakeEmailPreview (..), + FakeEmailResult (..), + FilterBouncedRecipientsOptions (..), + FilterBouncedRecipientsResult (..), + FlushExpiredInboxesResult (..), + ForwardEmailOptions (..), + GenerateBimiRecordOptions (..), + GenerateBimiRecordResults (..), + GenerateDmarcRecordOptions (..), + GenerateDmarcRecordResults (..), + GenerateMtaStsRecordOptions (..), + GenerateMtaStsRecordResults (..), + GenerateTlsReportingRecordOptions (..), + GenerateTlsReportingRecordResults (..), + GetEmailScreenshotOptions (..), + GravatarUrl (..), + GroupContactsDto (..), + GroupDto (..), + GroupProjection (..), + HTMLValidationResult (..), + IPAddressResult (..), + ImageIssue (..), + ImapAccessDetails (..), + ImapEmailProjection (..), + ImapFlagOperationOptions (..), + ImapMailboxStatus (..), + ImapServerFetchItem (..), + ImapServerFetchResult (..), + ImapServerGetResult (..), + ImapServerListOptions (..), + ImapServerListResult (..), + ImapServerSearchOptions (..), + ImapServerSearchResult (..), + ImapServerStatusOptions (..), + ImapServerStatusResult (..), + ImapSmtpAccessDetails (..), + ImapUpdateFlagsOptions (..), + InboxByEmailAddressResult (..), + InboxByNameResult (..), + InboxDto (..), + InboxExistsDto (..), + InboxForwarderDto (..), + InboxForwarderEventDto (..), + InboxForwarderEventProjection (..), + InboxForwarderTestOptions (..), + InboxForwarderTestResult (..), + InboxIdItem (..), + InboxIdsResult (..), + InboxPreview (..), + InboxReplierDto (..), + InboxReplierEventProjection (..), + InboxRulesetDto (..), + InboxRulesetTestOptions (..), + InboxRulesetTestResult (..), + InlineObject (..), + JSONSchemaDto (..), + LinkIssue (..), + ListUnsubscribeRecipientProjection (..), + LookupBimiDomainOptions (..), + LookupBimiDomainResults (..), + LookupDmarcDomainOptions (..), + LookupDmarcDomainResults (..), + LookupMtaStsDomainOptions (..), + LookupMtaStsDomainResults (..), + LookupTlsReportingDomainOptions (..), + LookupTlsReportingDomainResults (..), + MatchOption (..), + MatchOptions (..), + MissedEmailDto (..), + MissedEmailProjection (..), + NameServerRecord (..), + NewFakeEmailAddressResult (..), + OrganizationInboxProjection (..), + PageAlias (..), + PageAttachmentEntity (..), + PageBouncedEmail (..), + PageBouncedRecipients (..), + PageComplaint (..), + PageConnector (..), + PageConnectorSyncEvents (..), + PageContactProjection (..), + PageDeliveryStatus (..), + PageEmailPreview (..), + PageEmailProjection (..), + PageEmailValidationRequest (..), + PageExpiredInboxRecordProjection (..), + PageGroupProjection (..), + PageInboxForwarderDto (..), + PageInboxForwarderEvents (..), + PageInboxProjection (..), + PageInboxReplierDto (..), + PageInboxReplierEvents (..), + PageInboxRulesetDto (..), + PageListUnsubscribeRecipients (..), + PageMissedEmailProjection (..), + PageOrganizationInboxProjection (..), + PagePhoneNumberProjection (..), + PageScheduledJobs (..), + PageSentEmailProjection (..), + PageSentEmailWithQueueProjection (..), + PageSmsProjection (..), + PageTemplateProjection (..), + PageThreadProjection (..), + PageTrackingPixelProjection (..), + PageUnknownMissedEmailProjection (..), + PageWebhookProjection (..), + PageWebhookResult (..), + PageableObject (..), + PhoneNumberDto (..), + PhoneNumberProjection (..), + PhonePlanDto (..), + RawEmailJson (..), + Recipient (..), + ReplyForSms (..), + ReplyToAliasEmailOptions (..), + ReplyToEmailOptions (..), + ScheduledJob (..), + ScheduledJobDto (..), + SearchEmailsOptions (..), + SearchInboxesOptions (..), + SendEmailBodyPart (..), + SendEmailOptions (..), + SendSMTPEnvelopeOptions (..), + SendWithQueueResult (..), + Sender (..), + SentEmailDto (..), + SentEmailProjection (..), + SentSmsDto (..), + SetInboxFavouritedOptions (..), + SimpleSendEmailOptions (..), + SmsDto (..), + SmsMatchOption (..), + SmsPreview (..), + SmsProjection (..), + SmsReplyOptions (..), + SmtpAccessDetails (..), + SortObject (..), + SpellingIssue (..), + TemplateDto (..), + TemplatePreview (..), + TemplateProjection (..), + TemplateVariable (..), + TestInboxRulesetReceivingOptions (..), + TestInboxRulesetReceivingResult (..), + TestInboxRulesetSendingOptions (..), + TestInboxRulesetSendingResult (..), + TestNewInboxForwarderOptions (..), + TestNewInboxRulesetOptions (..), + TestPhoneNumberOptions (..), + ThreadProjection (..), + TrackingPixelDto (..), + TrackingPixelProjection (..), + UnknownMissedEmailProjection (..), + UnreadCount (..), + UnseenErrorCountDto (..), + UpdateAliasOptions (..), + UpdateDomainOptions (..), + UpdateGroupContacts (..), + UpdateInboxOptions (..), + UpdateInboxReplierOptions (..), + UploadAttachmentOptions (..), + UserInfoDto (..), + ValidateEmailAddressListOptions (..), + ValidateEmailAddressListResult (..), + ValidationDto (..), + ValidationMessage (..), + VerifyEmailAddressOptions (..), + VerifyWebhookSignatureOptions (..), + VerifyWebhookSignatureResults (..), + WaitForConditions (..), + WaitForSingleSmsOptions (..), + WaitForSmsConditions (..), + WebhookBouncePayload (..), + WebhookBounceRecipientPayload (..), + WebhookDeliveryStatusPayload (..), + WebhookDto (..), + WebhookEmailOpenedPayload (..), + WebhookEmailReadPayload (..), + WebhookHeaderNameValue (..), + WebhookHeaders (..), + WebhookNewAttachmentPayload (..), + WebhookNewContactPayload (..), + WebhookNewEmailPayload (..), + WebhookNewSmsPayload (..), + WebhookProjection (..), + WebhookRedriveAllResult (..), + WebhookRedriveResult (..), + WebhookResultDto (..), + WebhookTestRequest (..), + WebhookTestResponse (..), + WebhookTestResult (..), + ) where + +import Data.Data (Data) +import Data.UUID (UUID) +import Data.List (stripPrefix) +import Data.Maybe (fromMaybe) +import Data.Aeson (Value, FromJSON(..), ToJSON(..), genericToJSON, genericParseJSON) +import Data.Aeson.Types (Options(..), defaultOptions) +import Data.Set (Set) +import Data.Text (Text) +import Data.Time +import Data.Swagger (ToSchema, declareNamedSchema) +import qualified Data.Swagger as Swagger +import qualified Data.Char as Char +import qualified Data.Text as T +import qualified Data.Map as Map +import GHC.Generics (Generic) +import Data.Function ((&)) + + +-- | Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT`, `NEW_ATTACHMENT` and `EMAIL_OPENED` payloads for the properties available for those events. +data AbstractWebhookPayload = AbstractWebhookPayload + { abstractWebhookPayloadEventName :: Text -- ^ + , abstractWebhookPayloadMessageId :: Text -- ^ + , abstractWebhookPayloadWebhookId :: UUID -- ^ + , abstractWebhookPayloadWebhookName :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AbstractWebhookPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "abstractWebhookPayload") +instance ToJSON AbstractWebhookPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "abstractWebhookPayload") + + +-- | +data AccountBounceBlockDto = AccountBounceBlockDto + { accountBounceBlockDtoIsSendingBlocked :: Bool -- ^ + , accountBounceBlockDtoBounceCount :: Integer -- ^ + , accountBounceBlockDtoBounceCountToday :: Integer -- ^ + , accountBounceBlockDtoMaximumDailyBounces :: Integer -- ^ + , accountBounceBlockDtoMaximumAccountBounces :: Integer -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AccountBounceBlockDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "accountBounceBlockDto") +instance ToJSON AccountBounceBlockDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "accountBounceBlockDto") + + +-- | Email alias representation +data AliasDto = AliasDto + { aliasDtoId :: UUID -- ^ + , aliasDtoEmailAddress :: Text -- ^ The alias's email address for receiving email + , aliasDtoMaskedEmailAddress :: Maybe Text -- ^ The underlying email address that is hidden and will received forwarded email + , aliasDtoUserId :: UUID -- ^ + , aliasDtoInboxId :: UUID -- ^ Inbox that is associated with the alias + , aliasDtoName :: Maybe Text -- ^ + , aliasDtoUseThreads :: Maybe Bool -- ^ If alias will generate response threads or not when email are received by it + , aliasDtoIsVerified :: Bool -- ^ Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account + , aliasDtoDomainId :: Maybe UUID -- ^ Domain ID associated with the alias + , aliasDtoCreatedAt :: Maybe UTCTime -- ^ + , aliasDtoUpdatedAt :: Maybe UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AliasDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "aliasDto") +instance ToJSON AliasDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "aliasDto") + + +-- | Representation of a alias +data AliasProjection = AliasProjection + { aliasProjectionUserId :: UUID -- ^ + , aliasProjectionEmailAddress :: Text -- ^ + , aliasProjectionInboxId :: UUID -- ^ + , aliasProjectionUseThreads :: Maybe Bool -- ^ + , aliasProjectionCreatedAt :: UTCTime -- ^ + , aliasProjectionUpdatedAt :: UTCTime -- ^ + , aliasProjectionName :: Maybe Text -- ^ + , aliasProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AliasProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "aliasProjection") +instance ToJSON AliasProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "aliasProjection") + + +-- | +data AttachmentEntity = AttachmentEntity + { attachmentEntityId :: Maybe UUID -- ^ + , attachmentEntityAttachmentId :: Text -- ^ + , attachmentEntityBucket :: Maybe Text -- ^ + , attachmentEntityUserId :: UUID -- ^ + , attachmentEntityContentType :: Maybe Text -- ^ + , attachmentEntityContentLength :: Maybe Integer -- ^ + , attachmentEntityContentId :: Maybe Text -- ^ + , attachmentEntityName :: Maybe Text -- ^ + , attachmentEntityInboxId :: Maybe UUID -- ^ + , attachmentEntityCreatedAt :: UTCTime -- ^ + , attachmentEntityUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AttachmentEntity where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "attachmentEntity") +instance ToJSON AttachmentEntity where + toJSON = genericToJSON (removeFieldLabelPrefix False "attachmentEntity") + + +-- | Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately. +data AttachmentMetaData = AttachmentMetaData + { attachmentMetaDataName :: Text -- ^ Name of attachment if given + , attachmentMetaDataContentType :: Text -- ^ Content type of attachment such as `image/png` + , attachmentMetaDataContentLength :: Integer -- ^ Size of attachment in bytes + , attachmentMetaDataId :: Text -- ^ ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. + , attachmentMetaDataContentId :: Maybe Text -- ^ CID of attachment + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AttachmentMetaData where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "attachmentMetaData") +instance ToJSON AttachmentMetaData where + toJSON = genericToJSON (removeFieldLabelPrefix False "attachmentMetaData") + + +-- | Email attachment data +data AttachmentProjection = AttachmentProjection + { attachmentProjectionUserId :: UUID -- ^ + , attachmentProjectionContentId :: Maybe Text -- ^ Content ID of attachment. + , attachmentProjectionAttachmentId :: Text -- ^ Attachment ID + , attachmentProjectionCreatedAt :: UTCTime -- ^ + , attachmentProjectionUpdatedAt :: UTCTime -- ^ + , attachmentProjectionName :: Maybe Text -- ^ + , attachmentProjectionContentLength :: Maybe Integer -- ^ Content length of attachment in bytes + , attachmentProjectionContentType :: Maybe Text -- ^ Content type of attachment. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON AttachmentProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "attachmentProjection") +instance ToJSON AttachmentProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "attachmentProjection") + + +-- | Basic Authentication options for webhooks. Will be used is present when calling webhook endpoints. +data BasicAuthOptions = BasicAuthOptions + { basicAuthOptionsUsername :: Text -- ^ + , basicAuthOptionsPassword :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON BasicAuthOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "basicAuthOptions") +instance ToJSON BasicAuthOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "basicAuthOptions") + + +-- | Bounced email event +data BounceProjection = BounceProjection + { bounceProjectionSender :: Text -- ^ + , bounceProjectionBounceMta :: Maybe Text -- ^ + , bounceProjectionBounceType :: Maybe Text -- ^ + , bounceProjectionCreatedAt :: UTCTime -- ^ + , bounceProjectionSubject :: Maybe Text -- ^ + , bounceProjectionId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON BounceProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "bounceProjection") +instance ToJSON BounceProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "bounceProjection") + + +-- | Bounced recipient +data BounceRecipientProjection = BounceRecipientProjection + { bounceRecipientProjectionSentEmailId :: Maybe UUID -- ^ + , bounceRecipientProjectionRecipient :: Text -- ^ + , bounceRecipientProjectionAction :: Maybe Text -- ^ + , bounceRecipientProjectionBounceType :: Maybe Text -- ^ + , bounceRecipientProjectionCreatedAt :: UTCTime -- ^ + , bounceRecipientProjectionId :: Maybe UUID -- ^ + , bounceRecipientProjectionStatus :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON BounceRecipientProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "bounceRecipientProjection") +instance ToJSON BounceRecipientProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "bounceRecipientProjection") + + +-- | Bounced email +data BouncedEmailDto = BouncedEmailDto + { bouncedEmailDtoId :: UUID -- ^ + , bouncedEmailDtoUserId :: UUID -- ^ + , bouncedEmailDtoNotificationType :: Text -- ^ + , bouncedEmailDtoSentToRecipients :: Maybe [Text] -- ^ + , bouncedEmailDtoSender :: Text -- ^ + , bouncedEmailDtoBounceMta :: Maybe Text -- ^ + , bouncedEmailDtoBounceType :: Maybe Text -- ^ + , bouncedEmailDtoBounceRecipients :: Maybe [Text] -- ^ + , bouncedEmailDtoBounceSubType :: Maybe Text -- ^ + , bouncedEmailDtoSentEmailId :: Maybe UUID -- ^ + , bouncedEmailDtoSubject :: Maybe Text -- ^ + , bouncedEmailDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON BouncedEmailDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "bouncedEmailDto") +instance ToJSON BouncedEmailDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "bouncedEmailDto") + + +-- | Bounced recipient +data BouncedRecipientDto = BouncedRecipientDto + { bouncedRecipientDtoId :: UUID -- ^ + , bouncedRecipientDtoUserId :: Maybe UUID -- ^ + , bouncedRecipientDtoSentEmailId :: Maybe UUID -- ^ + , bouncedRecipientDtoRecipient :: Text -- ^ + , bouncedRecipientDtoDiagnosticCode :: Maybe Text -- ^ + , bouncedRecipientDtoAction :: Maybe Text -- ^ + , bouncedRecipientDtoBounceType :: Maybe Text -- ^ + , bouncedRecipientDtoStatus :: Maybe Text -- ^ + , bouncedRecipientDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON BouncedRecipientDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "bouncedRecipientDto") +instance ToJSON BouncedRecipientDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "bouncedRecipientDto") + + +-- | Options for bulk sending an email from multiple addresses. See regular `sendEmail` methods for more information. +data BulkSendEmailOptions = BulkSendEmailOptions + { bulkSendEmailOptionsInboxIds :: [UUID] -- ^ Inboxes to send the email from + , bulkSendEmailOptionsSendEmailOptions :: SendEmailOptions -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON BulkSendEmailOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "bulkSendEmailOptions") +instance ToJSON BulkSendEmailOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "bulkSendEmailOptions") + + +-- | +data CanSendEmailResults = CanSendEmailResults + { canSendEmailResultsIsSendingPermitted :: Bool -- ^ + , canSendEmailResultsMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CanSendEmailResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "canSendEmailResults") +instance ToJSON CanSendEmailResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "canSendEmailResults") + + +-- | +data CheckEmailBodyFeatureSupportResults = CheckEmailBodyFeatureSupportResults + { checkEmailBodyFeatureSupportResultsResult :: EmailFeatureSupportResult -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CheckEmailBodyFeatureSupportResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "checkEmailBodyFeatureSupportResults") +instance ToJSON CheckEmailBodyFeatureSupportResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "checkEmailBodyFeatureSupportResults") + + +-- | +data CheckEmailBodyResults = CheckEmailBodyResults + { checkEmailBodyResultsHasIssues :: Bool -- ^ + , checkEmailBodyResultsLinkIssues :: [LinkIssue] -- ^ + , checkEmailBodyResultsImageIssues :: [ImageIssue] -- ^ + , checkEmailBodyResultsSpellingIssues :: [SpellingIssue] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CheckEmailBodyResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "checkEmailBodyResults") +instance ToJSON CheckEmailBodyResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "checkEmailBodyResults") + + +-- | Options for the email to be validated +data CheckEmailClientSupportOptions = CheckEmailClientSupportOptions + { checkEmailClientSupportOptionsEmailBody :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CheckEmailClientSupportOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "checkEmailClientSupportOptions") +instance ToJSON CheckEmailClientSupportOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "checkEmailClientSupportOptions") + + +-- | +data CheckEmailClientSupportResults = CheckEmailClientSupportResults + { checkEmailClientSupportResultsResult :: EmailFeatureSupportResult -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CheckEmailClientSupportResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "checkEmailClientSupportResults") +instance ToJSON CheckEmailClientSupportResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "checkEmailClientSupportResults") + + +-- | +data CheckEmailFeaturesClientSupportOptions = CheckEmailFeaturesClientSupportOptions + { checkEmailFeaturesClientSupportOptionsEmailBody :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CheckEmailFeaturesClientSupportOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "checkEmailFeaturesClientSupportOptions") +instance ToJSON CheckEmailFeaturesClientSupportOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "checkEmailFeaturesClientSupportOptions") + + +-- | +data CheckEmailFeaturesClientSupportResults = CheckEmailFeaturesClientSupportResults + { checkEmailFeaturesClientSupportResultsResult :: EmailFeatureSupportResult -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CheckEmailFeaturesClientSupportResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "checkEmailFeaturesClientSupportResults") +instance ToJSON CheckEmailFeaturesClientSupportResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "checkEmailFeaturesClientSupportResults") + + +-- | +data Complaint = Complaint + { complaintId :: UUID -- ^ + , complaintUserId :: Maybe UUID -- ^ + , complaintEventType :: Maybe Text -- ^ + , complaintMailSource :: Maybe Text -- ^ + , complaintMailMessageId :: Maybe Text -- ^ + , complaintComplaintRecipient :: Text -- ^ + , complaintCreatedAt :: UTCTime -- ^ + , complaintUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON Complaint where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "complaint") +instance ToJSON Complaint where + toJSON = genericToJSON (removeFieldLabelPrefix False "complaint") + + +-- | Options for matching emails in an inbox based on a condition such as `HAS_ATTACHMENTS=TRUE` +data ConditionOption = ConditionOption + { conditionOptionCondition :: Text -- ^ Condition of an email object that can be used to filter results + , conditionOptionValue :: Text -- ^ Expected condition value + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConditionOption where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "conditionOption") +instance ToJSON ConditionOption where + toJSON = genericToJSON (removeFieldLabelPrefix False "conditionOption") + + +-- | +data ConnectorDto = ConnectorDto + { connectorDtoId :: UUID -- ^ + , connectorDtoName :: Maybe Text -- ^ + , connectorDtoEnabled :: Bool -- ^ + , connectorDtoUserId :: UUID -- ^ + , connectorDtoInboxId :: UUID -- ^ + , connectorDtoSyncEnabled :: Bool -- ^ + , connectorDtoSyncScheduleType :: Maybe Text -- ^ + , connectorDtoSyncInterval :: Maybe Int -- ^ + , connectorDtoHasImapConnection :: Bool -- ^ + , connectorDtoHasSmtpConnection :: Bool -- ^ + , connectorDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorDto") +instance ToJSON ConnectorDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorDto") + + +-- | +data ConnectorImapConnectionDto = ConnectorImapConnectionDto + { connectorImapConnectionDtoConnectorId :: UUID -- ^ + , connectorImapConnectionDtoImapHost :: Maybe Text -- ^ + , connectorImapConnectionDtoImapPort :: Maybe Int -- ^ + , connectorImapConnectionDtoImapUsername :: Maybe Text -- ^ + , connectorImapConnectionDtoImapPassword :: Maybe Text -- ^ + , connectorImapConnectionDtoImapSsl :: Maybe Bool -- ^ + , connectorImapConnectionDtoSelectFolder :: Maybe Text -- ^ + , connectorImapConnectionDtoSearchTerms :: Maybe Text -- ^ + , connectorImapConnectionDtoEnabled :: Maybe Bool -- ^ + , connectorImapConnectionDtoCreatedAt :: UTCTime -- ^ + , connectorImapConnectionDtoId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorImapConnectionDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorImapConnectionDto") +instance ToJSON ConnectorImapConnectionDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorImapConnectionDto") + + +-- | Connector +data ConnectorProjection = ConnectorProjection + { connectorProjectionEnabled :: Maybe Bool -- ^ + , connectorProjectionUserId :: UUID -- ^ + , connectorProjectionEmailAddress :: Maybe Text -- ^ + , connectorProjectionInboxId :: UUID -- ^ + , connectorProjectionSyncEnabled :: Maybe Bool -- ^ + , connectorProjectionSyncScheduleType :: Text -- ^ + , connectorProjectionSyncInterval :: Maybe Int -- ^ + , connectorProjectionCreatedAt :: UTCTime -- ^ + , connectorProjectionName :: Maybe Text -- ^ + , connectorProjectionId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorProjection") +instance ToJSON ConnectorProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorProjection") + + +-- | +data ConnectorSmtpConnectionDto = ConnectorSmtpConnectionDto + { connectorSmtpConnectionDtoConnectorId :: UUID -- ^ + , connectorSmtpConnectionDtoSmtpHost :: Maybe Text -- ^ + , connectorSmtpConnectionDtoSmtpPort :: Maybe Int -- ^ + , connectorSmtpConnectionDtoSmtpUsername :: Maybe Text -- ^ + , connectorSmtpConnectionDtoSmtpPassword :: Maybe Text -- ^ + , connectorSmtpConnectionDtoSmtpSsl :: Maybe Bool -- ^ + , connectorSmtpConnectionDtoEnabled :: Maybe Bool -- ^ + , connectorSmtpConnectionDtoCreatedAt :: UTCTime -- ^ + , connectorSmtpConnectionDtoId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSmtpConnectionDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSmtpConnectionDto") +instance ToJSON ConnectorSmtpConnectionDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSmtpConnectionDto") + + +-- | +data ConnectorSyncEventDto = ConnectorSyncEventDto + { connectorSyncEventDtoId :: UUID -- ^ + , connectorSyncEventDtoConnectorId :: UUID -- ^ + , connectorSyncEventDtoSyncStatus :: Text -- ^ + , connectorSyncEventDtoSyncCount :: Integer -- ^ + , connectorSyncEventDtoMessage :: Maybe Text -- ^ + , connectorSyncEventDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncEventDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncEventDto") +instance ToJSON ConnectorSyncEventDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncEventDto") + + +-- | ConnectorSyncEventProjection +data ConnectorSyncEventProjection = ConnectorSyncEventProjection + { connectorSyncEventProjectionConnectorId :: UUID -- ^ + , connectorSyncEventProjectionSyncCount :: Integer -- ^ + , connectorSyncEventProjectionSyncStatus :: Text -- ^ + , connectorSyncEventProjectionCreatedAt :: UTCTime -- ^ + , connectorSyncEventProjectionMessage :: Maybe Text -- ^ + , connectorSyncEventProjectionId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncEventProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncEventProjection") +instance ToJSON ConnectorSyncEventProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncEventProjection") + + +-- | +data ConnectorSyncRequestResult = ConnectorSyncRequestResult + { connectorSyncRequestResultSyncResult :: Maybe ConnectorSyncResult -- ^ + , connectorSyncRequestResultException :: Maybe ConnectorSyncRequestResultException -- ^ + , connectorSyncRequestResultEventId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncRequestResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncRequestResult") +instance ToJSON ConnectorSyncRequestResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncRequestResult") + + +-- | +data ConnectorSyncRequestResultException = ConnectorSyncRequestResultException + { connectorSyncRequestResultExceptionCause :: Maybe ConnectorSyncRequestResultExceptionCause -- ^ + , connectorSyncRequestResultExceptionStackTrace :: Maybe [ConnectorSyncRequestResultExceptionCauseStackTrace] -- ^ + , connectorSyncRequestResultExceptionMessage :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionSuppressed :: Maybe [ConnectorSyncRequestResultExceptionCause] -- ^ + , connectorSyncRequestResultExceptionLocalizedMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncRequestResultException where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncRequestResultException") +instance ToJSON ConnectorSyncRequestResultException where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncRequestResultException") + + +-- | +data ConnectorSyncRequestResultExceptionCause = ConnectorSyncRequestResultExceptionCause + { connectorSyncRequestResultExceptionCauseStackTrace :: Maybe [ConnectorSyncRequestResultExceptionCauseStackTrace] -- ^ + , connectorSyncRequestResultExceptionCauseMessage :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseLocalizedMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncRequestResultExceptionCause where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncRequestResultExceptionCause") +instance ToJSON ConnectorSyncRequestResultExceptionCause where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncRequestResultExceptionCause") + + +-- | +data ConnectorSyncRequestResultExceptionCauseStackTrace = ConnectorSyncRequestResultExceptionCauseStackTrace + { connectorSyncRequestResultExceptionCauseStackTraceClassLoaderName :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceModuleName :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceModuleVersion :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceMethodName :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceFileName :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceLineNumber :: Maybe Int -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceClassName :: Maybe Text -- ^ + , connectorSyncRequestResultExceptionCauseStackTraceNativeMethod :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncRequestResultExceptionCauseStackTrace where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncRequestResultExceptionCauseStackTrace") +instance ToJSON ConnectorSyncRequestResultExceptionCauseStackTrace where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncRequestResultExceptionCauseStackTrace") + + +-- | +data ConnectorSyncResult = ConnectorSyncResult + { connectorSyncResultEmailSyncCount :: Int -- ^ + , connectorSyncResultLogLines :: Maybe [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ConnectorSyncResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "connectorSyncResult") +instance ToJSON ConnectorSyncResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "connectorSyncResult") + + +-- | Contact object. For saving a user in contact book. +data ContactDto = ContactDto + { contactDtoId :: UUID -- ^ + , contactDtoGroupId :: Maybe UUID -- ^ + , contactDtoFirstName :: Maybe Text -- ^ + , contactDtoLastName :: Maybe Text -- ^ + , contactDtoCompany :: Maybe Text -- ^ + , contactDtoEmailAddresses :: [Text] -- ^ + , contactDtoPrimaryEmailAddress :: Maybe Text -- ^ + , contactDtoTags :: [Text] -- ^ + , contactDtoMetaData :: Maybe Value -- ^ + , contactDtoOptOut :: Maybe Bool -- ^ + , contactDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ContactDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "contactDto") +instance ToJSON ContactDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "contactDto") + + +-- | Email contact for address book +data ContactProjection = ContactProjection + { contactProjectionEmailAddress :: Maybe Text -- ^ + , contactProjectionEmailAddresses :: Maybe [Text] -- ^ + , contactProjectionFirstName :: Maybe Text -- ^ + , contactProjectionLastName :: Maybe Text -- ^ + , contactProjectionCompany :: Maybe Text -- ^ + , contactProjectionOptOut :: Maybe Bool -- ^ + , contactProjectionCreatedAt :: UTCTime -- ^ + , contactProjectionId :: UUID -- ^ + , contactProjectionGroupId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ContactProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "contactProjection") +instance ToJSON ContactProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "contactProjection") + + +-- | Options for matching content using regex patterns based on Java Pattern syntax +data ContentMatchOptions = ContentMatchOptions + { contentMatchOptionsPattern :: Text -- ^ Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ContentMatchOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "contentMatchOptions") +instance ToJSON ContentMatchOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "contentMatchOptions") + + +-- | Number of elements +data CountDto = CountDto + { countDtoTotalElements :: Integer -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CountDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "countDto") +instance ToJSON CountDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "countDto") + + +-- | Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address. +data CreateAliasOptions = CreateAliasOptions + { createAliasOptionsEmailAddress :: Text -- ^ Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first. + , createAliasOptionsInboxId :: Maybe UUID -- ^ Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address + , createAliasOptionsName :: Maybe Text -- ^ Optional name for alias + , createAliasOptionsUseThreads :: Bool -- ^ Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. + , createAliasOptionsDomainId :: Maybe UUID -- ^ Custom domain ID to use when generating alias email addresses + , createAliasOptionsVerifyEmailAddress :: Maybe Bool -- ^ Whether to verify the masked email address exists before sending an email to it + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateAliasOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createAliasOptions") +instance ToJSON CreateAliasOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createAliasOptions") + + +-- | Options for IMAP connection to external email inbox. Allows syncing emails iva IMAP. +data CreateConnectorImapConnectionOptions = CreateConnectorImapConnectionOptions + { createConnectorImapConnectionOptionsImapSsl :: Maybe Bool -- ^ + , createConnectorImapConnectionOptionsImapUsername :: Maybe Text -- ^ + , createConnectorImapConnectionOptionsImapPassword :: Maybe Text -- ^ + , createConnectorImapConnectionOptionsSelectFolder :: Maybe Text -- ^ Optional folder to select during IMAP connection + , createConnectorImapConnectionOptionsSearchTerms :: Maybe Text -- ^ + , createConnectorImapConnectionOptionsImapPort :: Maybe Int -- ^ IMAP server port + , createConnectorImapConnectionOptionsImapHost :: Text -- ^ IMAP server host + , createConnectorImapConnectionOptionsEnabled :: Maybe Bool -- ^ IMAP server enabled + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateConnectorImapConnectionOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createConnectorImapConnectionOptions") +instance ToJSON CreateConnectorImapConnectionOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createConnectorImapConnectionOptions") + + +-- | Options for creating an inbox connection with an external mail provider +data CreateConnectorOptions = CreateConnectorOptions + { createConnectorOptionsSyncEnabled :: Maybe Bool -- ^ Enable automatic background sync + , createConnectorOptionsSyncScheduleType :: Maybe Text -- ^ Sync schedule type + , createConnectorOptionsSyncInterval :: Maybe Int -- ^ Sync interval in minutes + , createConnectorOptionsName :: Maybe Text -- ^ Name of connector + , createConnectorOptionsEmailAddress :: Maybe Text -- ^ Email address of external inbox + , createConnectorOptionsEnabled :: Maybe Bool -- ^ Is connector enabled + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateConnectorOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createConnectorOptions") +instance ToJSON CreateConnectorOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createConnectorOptions") + + +-- | +data CreateConnectorSmtpConnectionOptions = CreateConnectorSmtpConnectionOptions + { createConnectorSmtpConnectionOptionsEnabled :: Maybe Bool -- ^ + , createConnectorSmtpConnectionOptionsSmtpHost :: Text -- ^ + , createConnectorSmtpConnectionOptionsSmtpPort :: Maybe Int -- ^ + , createConnectorSmtpConnectionOptionsSmtpSsl :: Maybe Bool -- ^ + , createConnectorSmtpConnectionOptionsSmtpUsername :: Maybe Text -- ^ + , createConnectorSmtpConnectionOptionsSmtpPassword :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateConnectorSmtpConnectionOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createConnectorSmtpConnectionOptions") +instance ToJSON CreateConnectorSmtpConnectionOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createConnectorSmtpConnectionOptions") + + +-- | Options for creating an email contact in address book +data CreateContactOptions = CreateContactOptions + { createContactOptionsFirstName :: Maybe Text -- ^ + , createContactOptionsLastName :: Maybe Text -- ^ + , createContactOptionsCompany :: Maybe Text -- ^ + , createContactOptionsEmailAddresses :: Maybe [Text] -- ^ Set of email addresses belonging to the contact + , createContactOptionsTags :: Maybe [Text] -- ^ Tags that can be used to search and group contacts + , createContactOptionsMetaData :: Maybe Value -- ^ + , createContactOptionsOptOut :: Maybe Bool -- ^ Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. + , createContactOptionsGroupId :: Maybe UUID -- ^ Group IDs that contact belongs to + , createContactOptionsVerifyEmailAddresses :: Maybe Bool -- ^ Whether to validate contact email address exists + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateContactOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createContactOptions") +instance ToJSON CreateContactOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createContactOptions") + + +-- | Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not function correctly until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. Domains can be either `HTTP` or `SMTP` type. The type of domain determines which inboxes can be used with it. `SMTP` inboxes use a mail server running `mx.mailslurp.com` while `HTTP` inboxes are handled by AWS SES. +data CreateDomainOptions = CreateDomainOptions + { createDomainOptionsDomain :: Text -- ^ The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. + , createDomainOptionsDescription :: Maybe Text -- ^ Optional description of the domain. + , createDomainOptionsCreatedCatchAllInbox :: Maybe Bool -- ^ Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. + , createDomainOptionsDomainType :: Maybe Text -- ^ Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createDomainOptions") +instance ToJSON CreateDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createDomainOptions") + + +-- | +data CreateEmergencyAddressOptions = CreateEmergencyAddressOptions + { createEmergencyAddressOptionsCustomerName :: Text -- ^ + , createEmergencyAddressOptionsAddress1 :: Text -- ^ + , createEmergencyAddressOptionsCity :: Text -- ^ + , createEmergencyAddressOptionsRegion :: Text -- ^ + , createEmergencyAddressOptionsPostalCode :: Text -- ^ + , createEmergencyAddressOptionsIsoCountryCode :: Text -- ^ + , createEmergencyAddressOptionsDisplayName :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateEmergencyAddressOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createEmergencyAddressOptions") +instance ToJSON CreateEmergencyAddressOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createEmergencyAddressOptions") + + +-- | Create contact group options +data CreateGroupOptions = CreateGroupOptions + { createGroupOptionsName :: Text -- ^ + , createGroupOptionsDescription :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateGroupOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createGroupOptions") +instance ToJSON CreateGroupOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createGroupOptions") + + +-- | Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are processed by a mail server running at `mailslurp.mx` while `HTTP` inboxes are processed by AWS SES backed mailservers. An inbox email address is randomly assigned by default ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random). To specify an address use a custom domain: either pass the `emailAddress` options with `<your-recipient>@<your-domain>`. To create a randomized address for your domain set the `domainName` to the domain you have verified or pass the `domainId`. Virtual inboxes prevent outbound sending and instead trap mail. +data CreateInboxDto = CreateInboxDto + { createInboxDtoEmailAddress :: Maybe Text -- ^ A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + , createInboxDtoDomainName :: Maybe Text -- ^ FQDN domain name for the domain you have verified. Will be appended with a randomly assigned recipient name. Use the `emailAddress` option instead to specify the full custom inbox. + , createInboxDtoDomainId :: Maybe UUID -- ^ ID of custom domain to use for email address. + , createInboxDtoName :: Maybe Text -- ^ Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. + , createInboxDtoDescription :: Maybe Text -- ^ Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with + , createInboxDtoUseDomainPool :: Maybe Bool -- ^ Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. + , createInboxDtoTags :: Maybe [Text] -- ^ Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + , createInboxDtoExpiresAt :: Maybe UTCTime -- ^ Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. + , createInboxDtoFavourite :: Maybe Bool -- ^ Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + , createInboxDtoExpiresIn :: Maybe Integer -- ^ Number of milliseconds that inbox should exist for + , createInboxDtoAllowTeamAccess :: Maybe Bool -- ^ DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. + , createInboxDtoInboxType :: Maybe Text -- ^ Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + , createInboxDtoVirtualInbox :: Maybe Bool -- ^ Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. + , createInboxDtoUseShortAddress :: Maybe Bool -- ^ Use a shorter email address under 31 characters + , createInboxDtoPrefix :: Maybe Text -- ^ Prefix to add before the email address for easier labelling or identification. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateInboxDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createInboxDto") +instance ToJSON CreateInboxDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "createInboxDto") + + +-- | Options for creating an inbox forwarder +data CreateInboxForwarderOptions = CreateInboxForwarderOptions + { createInboxForwarderOptionsField :: Text -- ^ Field to match against to trigger inbox forwarding for inbound email + , createInboxForwarderOptionsMatch :: Text -- ^ String or wildcard style match for field specified when evaluating forwarding rules + , createInboxForwarderOptionsForwardToRecipients :: [Text] -- ^ Email addresses to forward an email to if it matches the field and match criteria of the forwarder + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateInboxForwarderOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createInboxForwarderOptions") +instance ToJSON CreateInboxForwarderOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createInboxForwarderOptions") + + +-- | Options for creating an inbox replier. Repliers can be attached to inboxes and send automated responses when an inbound email matches given criteria. +data CreateInboxReplierOptions = CreateInboxReplierOptions + { createInboxReplierOptionsInboxId :: UUID -- ^ Inbox ID to attach replier to + , createInboxReplierOptionsName :: Maybe Text -- ^ Name for replier + , createInboxReplierOptionsField :: Text -- ^ Field to match against to trigger inbox replier for inbound email + , createInboxReplierOptionsMatch :: Text -- ^ String or wildcard style match for field specified when evaluating reply rules. Use `*` to match anything. + , createInboxReplierOptionsReplyTo :: Maybe Text -- ^ Reply-to email address when sending replying + , createInboxReplierOptionsSubject :: Maybe Text -- ^ Subject override when replying to email + , createInboxReplierOptionsFrom :: Maybe Text -- ^ Send email from address + , createInboxReplierOptionsCharset :: Maybe Text -- ^ Email reply charset + , createInboxReplierOptionsIgnoreReplyTo :: Maybe Bool -- ^ Ignore sender replyTo when responding. Send directly to the sender if enabled. + , createInboxReplierOptionsIsHTML :: Maybe Bool -- ^ Send HTML email + , createInboxReplierOptionsBody :: Maybe Text -- ^ Email body for reply + , createInboxReplierOptionsTemplateId :: Maybe UUID -- ^ ID of template to use when sending a reply + , createInboxReplierOptionsTemplateVariables :: Maybe (Map.Map String Value) -- ^ Template variable values + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateInboxReplierOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createInboxReplierOptions") +instance ToJSON CreateInboxReplierOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createInboxReplierOptions") + + +-- | Options for creating inbox rulesets. Inbox rulesets can be used to block, allow, filter, or forward emails when sending or receiving using the inbox. +data CreateInboxRulesetOptions = CreateInboxRulesetOptions + { createInboxRulesetOptionsScope :: Text -- ^ What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. + , createInboxRulesetOptionsAction :: Text -- ^ Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. + , createInboxRulesetOptionsTarget :: Text -- ^ Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateInboxRulesetOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createInboxRulesetOptions") +instance ToJSON CreateInboxRulesetOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createInboxRulesetOptions") + + +-- | Create template options +data CreateTemplateOptions = CreateTemplateOptions + { createTemplateOptionsName :: Text -- ^ Name of template + , createTemplateOptionsContent :: Text -- ^ Template content. Can include moustache style variables such as {{var_name}} + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateTemplateOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createTemplateOptions") +instance ToJSON CreateTemplateOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createTemplateOptions") + + +-- | Options for creating a tracking pixel for email open tracking +data CreateTrackingPixelOptions = CreateTrackingPixelOptions + { createTrackingPixelOptionsName :: Maybe Text -- ^ + , createTrackingPixelOptionsRecipient :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateTrackingPixelOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createTrackingPixelOptions") +instance ToJSON CreateTrackingPixelOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createTrackingPixelOptions") + + +-- | Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. Customize the payload sent to your endpoint by setting the `requestBodyTemplate` property to a string with moustache style variables. Property names from the standard payload model for the given event are available as variables. +data CreateWebhookOptions = CreateWebhookOptions + { createWebhookOptionsUrl :: Text -- ^ Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. + , createWebhookOptionsBasicAuth :: Maybe BasicAuthOptions -- ^ + , createWebhookOptionsName :: Maybe Text -- ^ Optional name for the webhook + , createWebhookOptionsEventName :: Maybe Text -- ^ Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. + , createWebhookOptionsIncludeHeaders :: Maybe WebhookHeaders -- ^ + , createWebhookOptionsRequestBodyTemplate :: Maybe Text -- ^ Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style `{{variableName}}` templating to use parts of the standard webhook payload for the given event. + , createWebhookOptionsUseStaticIpRange :: Maybe Bool -- ^ Use static IP range when calling webhook endpoint + , createWebhookOptionsIgnoreInsecureSslCertificates :: Maybe Bool -- ^ Ignore insecure SSL certificates when sending request. Useful for self-signed certs. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON CreateWebhookOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "createWebhookOptions") +instance ToJSON CreateWebhookOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "createWebhookOptions") + + +-- | Options for DNS query. +data DNSLookupOptions = DNSLookupOptions + { dNSLookupOptionsHostname :: Text -- ^ List of record types you wish to query such as MX, DNS, TXT, NS, A etc. + , dNSLookupOptionsRecordTypes :: [Text] -- ^ List of record types you wish to query such as MX, DNS, TXT, NS, A etc. + , dNSLookupOptionsOmitFinalDNSDot :: Bool -- ^ Optionally control whether to omit the final dot in full DNS name values. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DNSLookupOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "dNSLookupOptions") +instance ToJSON DNSLookupOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "dNSLookupOptions") + + +-- | DNS lookup result. Includes record type, time to live, raw response, and name value for the name server response. +data DNSLookupResult = DNSLookupResult + { dNSLookupResultRecordType :: Text -- ^ Domain Name Server Record Types + , dNSLookupResultTtl :: Integer -- ^ + , dNSLookupResultRecordEntries :: [Text] -- ^ + , dNSLookupResultName :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DNSLookupResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "dNSLookupResult") +instance ToJSON DNSLookupResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "dNSLookupResult") + + +-- | Results of query on domain name servers +data DNSLookupResults = DNSLookupResults + { dNSLookupResultsResults :: [DNSLookupResult] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DNSLookupResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "dNSLookupResults") +instance ToJSON DNSLookupResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "dNSLookupResults") + + +-- | Options for multiple DNS queries +data DNSLookupsOptions = DNSLookupsOptions + { dNSLookupsOptionsLookups :: [DNSLookupOptions] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DNSLookupsOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "dNSLookupsOptions") +instance ToJSON DNSLookupsOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "dNSLookupsOptions") + + +-- | +data DeliveryStatusDto = DeliveryStatusDto + { deliveryStatusDtoId :: UUID -- ^ + , deliveryStatusDtoUserId :: UUID -- ^ + , deliveryStatusDtoSentId :: Maybe UUID -- ^ + , deliveryStatusDtoRemoteMtaIp :: Maybe Text -- ^ + , deliveryStatusDtoInboxId :: Maybe UUID -- ^ + , deliveryStatusDtoReportingMta :: Maybe Text -- ^ + , deliveryStatusDtoRecipients :: Maybe [Text] -- ^ + , deliveryStatusDtoSmtpResponse :: Maybe Text -- ^ + , deliveryStatusDtoSmtpStatusCode :: Maybe Int -- ^ + , deliveryStatusDtoProcessingTimeMillis :: Maybe Integer -- ^ + , deliveryStatusDtoReceived :: Maybe UTCTime -- ^ + , deliveryStatusDtoSubject :: Maybe Text -- ^ + , deliveryStatusDtoCreatedAt :: UTCTime -- ^ + , deliveryStatusDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DeliveryStatusDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "deliveryStatusDto") +instance ToJSON DeliveryStatusDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "deliveryStatusDto") + + +-- | Domain record description +data DescribeDomainOptions = DescribeDomainOptions + { describeDomainOptionsDomain :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DescribeDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "describeDomainOptions") +instance ToJSON DescribeDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "describeDomainOptions") + + +-- | Name Server lookup result +data DescribeMailServerDomainResult = DescribeMailServerDomainResult + { describeMailServerDomainResultMxRecords :: [NameServerRecord] -- ^ + , describeMailServerDomainResultDomain :: Text -- ^ + , describeMailServerDomainResultMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DescribeMailServerDomainResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "describeMailServerDomainResult") +instance ToJSON DescribeMailServerDomainResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "describeMailServerDomainResult") + + +-- | Domain plus verification records and status +data DomainDto = DomainDto + { domainDtoId :: UUID -- ^ + , domainDtoUserId :: UUID -- ^ + , domainDtoDomain :: Text -- ^ Custom domain name + , domainDtoVerificationToken :: Text -- ^ Verification tokens + , domainDtoDkimTokens :: [Text] -- ^ Unique token DKIM tokens + , domainDtoMissingRecordsMessage :: Maybe Text -- ^ If the domain is missing records then show which pairs are missing. + , domainDtoHasMissingRecords :: Bool -- ^ Whether the domain has missing required records. If true then see the domain in the dashboard app. + , domainDtoIsVerified :: Bool -- ^ Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. + , domainDtoDomainNameRecords :: [DomainNameRecord] -- ^ List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. + , domainDtoCatchAllInboxId :: Maybe UUID -- ^ The optional catch all inbox that will receive emails sent to the domain that cannot be matched. + , domainDtoCreatedAt :: UTCTime -- ^ + , domainDtoUpdatedAt :: UTCTime -- ^ + , domainDtoDomainType :: Text -- ^ Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainDto") +instance ToJSON DomainDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainDto") + + +-- | +data DomainGroup = DomainGroup + { domainGroupLabel :: Text -- ^ + , domainGroupDomains :: [DomainInformation] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainGroup where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainGroup") +instance ToJSON DomainGroup where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainGroup") + + +-- | +data DomainGroupsDto = DomainGroupsDto + { domainGroupsDtoDomainGroups :: [DomainGroup] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainGroupsDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainGroupsDto") +instance ToJSON DomainGroupsDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainGroupsDto") + + +-- | +data DomainInformation = DomainInformation + { domainInformationDomainName :: Text -- ^ + , domainInformationVerified :: Bool -- ^ + , domainInformationDomainType :: Text -- ^ Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainInformation where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainInformation") +instance ToJSON DomainInformation where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainInformation") + + +-- | +data DomainIssuesDto = DomainIssuesDto + { domainIssuesDtoHasIssues :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainIssuesDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainIssuesDto") +instance ToJSON DomainIssuesDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainIssuesDto") + + +-- | DNS Record required for verification of a domain. Record vary depending on domain type. +data DomainNameRecord = DomainNameRecord + { domainNameRecordLabel :: Text -- ^ Domain Name Server Record Label + , domainNameRecordRequired :: Bool -- ^ + , domainNameRecordRecordType :: Text -- ^ Domain Name Server Record Types + , domainNameRecordName :: Text -- ^ + , domainNameRecordRecordEntries :: [Text] -- ^ + , domainNameRecordTtl :: Integer -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainNameRecord where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainNameRecord") +instance ToJSON DomainNameRecord where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainNameRecord") + + +-- | Preview object for domain entity +data DomainPreview = DomainPreview + { domainPreviewId :: UUID -- ^ + , domainPreviewDomain :: Text -- ^ + , domainPreviewCatchAllInboxId :: Maybe UUID -- ^ + , domainPreviewCreatedAt :: UTCTime -- ^ + , domainPreviewDomainType :: Text -- ^ Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. + , domainPreviewIsVerified :: Bool -- ^ + , domainPreviewHasMissingRecords :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DomainPreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "domainPreview") +instance ToJSON DomainPreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "domainPreview") + + +-- | Content of attachment +data DownloadAttachmentDto = DownloadAttachmentDto + { downloadAttachmentDtoBase64FileContents :: Text -- ^ Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. + , downloadAttachmentDtoContentType :: Text -- ^ Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. + , downloadAttachmentDtoSizeBytes :: Integer -- ^ Size in bytes of attachment content + } deriving (Show, Eq, Generic, Data) + +instance FromJSON DownloadAttachmentDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "downloadAttachmentDto") +instance ToJSON DownloadAttachmentDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "downloadAttachmentDto") + + +-- | Email entity (also known as EmailDto). When an SMTP email message is received by MailSlurp it is parsed. The body and attachments are written to disk and the fields such as to, from, subject etc are stored in a database. The `body` contains the email content. If you want the original SMTP message see the `getRawEmail` endpoints. The attachments can be fetched using the AttachmentController +data Email = Email + { emailId :: UUID -- ^ ID of the email entity + , emailUserId :: UUID -- ^ ID of user that email belongs to + , emailInboxId :: UUID -- ^ ID of the inbox that received the email + , emailDomainId :: Maybe UUID -- ^ ID of the domain that received the email + , emailTo :: [Text] -- ^ List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + , emailFrom :: Maybe Text -- ^ Who the email was sent from. An email address - see fromName for the sender name. + , emailSender :: Maybe Sender -- ^ + , emailRecipients :: Maybe EmailRecipients -- ^ + , emailReplyTo :: Maybe Text -- ^ The `replyTo` field on the received email message + , emailCc :: Maybe [Text] -- ^ List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + , emailBcc :: Maybe [Text] -- ^ List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + , emailHeaders :: Maybe (Map.Map String Text) -- ^ Collection of SMTP headers attached to email + , emailHeadersMap :: Maybe (Map.Map String [Text]) -- ^ Multi-value map of SMTP headers attached to email + , emailAttachments :: Maybe [Text] -- ^ List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. + , emailSubject :: Maybe Text -- ^ The subject line of the email message as specified by SMTP subject header + , emailBody :: Maybe Text -- ^ The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. + , emailBodyExcerpt :: Maybe Text -- ^ An excerpt of the body of the email message for quick preview. Takes HTML content part if exists falls back to TEXT content part if not + , emailTextExcerpt :: Maybe Text -- ^ An excerpt of the body of the email message for quick preview. Takes TEXT content part if exists + , emailBodyMD5Hash :: Maybe Text -- ^ A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. + , emailIsHTML :: Maybe Bool -- ^ Is the email body content type HTML? + , emailCharset :: Maybe Text -- ^ Detected character set of the email body such as UTF-8 + , emailAnalysis :: Maybe EmailAnalysis -- ^ + , emailCreatedAt :: UTCTime -- ^ When was the email received by MailSlurp + , emailUpdatedAt :: UTCTime -- ^ When was the email last updated + , emailRead :: Bool -- ^ Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. + , emailTeamAccess :: Bool -- ^ Can the email be accessed by organization team members + , emailIsXAmpHtml :: Maybe Bool -- ^ Is the email body content type x-amp-html Amp4Email? + , emailBodyPartContentTypes :: Maybe [Text] -- ^ A list of detected multipart mime message body part content types such as text/plain and text/html. Can be used with email bodyPart endpoints to fetch individual body parts. + , emailHtml :: Maybe Bool -- ^ + , emailXampHtml :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON Email where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "email") +instance ToJSON Email where + toJSON = genericToJSON (removeFieldLabelPrefix False "email") + + +-- | Analysis result for email. Each verdict property is a string PASS|FAIL|GRAY or dynamic error message +data EmailAnalysis = EmailAnalysis + { emailAnalysisSpamVerdict :: Maybe Text -- ^ Verdict of spam ranking analysis + , emailAnalysisVirusVerdict :: Maybe Text -- ^ Verdict of virus scan analysis + , emailAnalysisSpfVerdict :: Maybe Text -- ^ Verdict of Send Policy Framework record spoofing analysis + , emailAnalysisDkimVerdict :: Maybe Text -- ^ Verdict of DomainKeys Identified Mail analysis + , emailAnalysisDmarcVerdict :: Maybe Text -- ^ Verdict of Domain-based Message Authentication Reporting and Conformance analysis + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailAnalysis where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailAnalysis") +instance ToJSON EmailAnalysis where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailAnalysis") + + +-- | Matches for the given pattern +data EmailContentMatchResult = EmailContentMatchResult + { emailContentMatchResultPattern :: Text -- ^ + , emailContentMatchResultMatches :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailContentMatchResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailContentMatchResult") +instance ToJSON EmailContentMatchResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailContentMatchResult") + + +-- | +data EmailContentPartResult = EmailContentPartResult + { emailContentPartResultContent :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailContentPartResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailContentPartResult") +instance ToJSON EmailContentPartResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailContentPartResult") + + +-- | +data EmailFeatureCategoryName = EmailFeatureCategoryName + { emailFeatureCategoryNameSlug :: Text -- ^ + , emailFeatureCategoryNameName :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureCategoryName where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureCategoryName") +instance ToJSON EmailFeatureCategoryName where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureCategoryName") + + +-- | +data EmailFeatureFamilyName = EmailFeatureFamilyName + { emailFeatureFamilyNameSlug :: Text -- ^ + , emailFeatureFamilyNameName :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureFamilyName where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureFamilyName") +instance ToJSON EmailFeatureFamilyName where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureFamilyName") + + +-- | +data EmailFeatureFamilyStatistics = EmailFeatureFamilyStatistics + { emailFeatureFamilyStatisticsFeature :: Text -- ^ + , emailFeatureFamilyStatisticsFamily :: Text -- ^ + , emailFeatureFamilyStatisticsPlatforms :: [EmailFeaturePlatformStatistics] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureFamilyStatistics where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureFamilyStatistics") +instance ToJSON EmailFeatureFamilyStatistics where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureFamilyStatistics") + + +-- | +data EmailFeatureNames = EmailFeatureNames + { emailFeatureNamesFamily :: [EmailFeatureFamilyName] -- ^ + , emailFeatureNamesPlatform :: [EmailFeaturePlatformName] -- ^ + , emailFeatureNamesCategory :: [EmailFeatureCategoryName] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureNames where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureNames") +instance ToJSON EmailFeatureNames where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureNames") + + +-- | +data EmailFeatureOverview = EmailFeatureOverview + { emailFeatureOverviewFeature :: Text -- ^ + , emailFeatureOverviewTitle :: Maybe Text -- ^ + , emailFeatureOverviewDescription :: Maybe Text -- ^ + , emailFeatureOverviewCategory :: Maybe Text -- ^ + , emailFeatureOverviewNotes :: Maybe Text -- ^ + , emailFeatureOverviewNotesNumbers :: Maybe (Map.Map String Text) -- ^ + , emailFeatureOverviewFeatureStatistics :: Maybe [EmailFeatureFamilyStatistics] -- ^ + , emailFeatureOverviewStatuses :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureOverview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureOverview") +instance ToJSON EmailFeatureOverview where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureOverview") + + +-- | +data EmailFeaturePlatformName = EmailFeaturePlatformName + { emailFeaturePlatformNameSlug :: Text -- ^ + , emailFeaturePlatformNameName :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeaturePlatformName where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeaturePlatformName") +instance ToJSON EmailFeaturePlatformName where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeaturePlatformName") + + +-- | +data EmailFeaturePlatformStatistics = EmailFeaturePlatformStatistics + { emailFeaturePlatformStatisticsPlatform :: Text -- ^ + , emailFeaturePlatformStatisticsVersions :: [EmailFeatureVersionStatistics] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeaturePlatformStatistics where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeaturePlatformStatistics") +instance ToJSON EmailFeaturePlatformStatistics where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeaturePlatformStatistics") + + +-- | +data EmailFeatureSupportFlags = EmailFeatureSupportFlags + { emailFeatureSupportFlagsStatus :: Text -- ^ + , emailFeatureSupportFlagsNotes :: Maybe [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureSupportFlags where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureSupportFlags") +instance ToJSON EmailFeatureSupportFlags where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureSupportFlags") + + +-- | +data EmailFeatureSupportResult = EmailFeatureSupportResult + { emailFeatureSupportResultNames :: EmailFeatureNames -- ^ + , emailFeatureSupportResultDetectedFeatures :: [Text] -- ^ + , emailFeatureSupportResultFeatureOverviews :: [EmailFeatureOverview] -- ^ + , emailFeatureSupportResultFeaturePercentages :: [EmailFeatureSupportStatusPercentage] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureSupportResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureSupportResult") +instance ToJSON EmailFeatureSupportResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureSupportResult") + + +-- | +data EmailFeatureSupportStatusPercentage = EmailFeatureSupportStatusPercentage + { emailFeatureSupportStatusPercentageStatus :: Text -- ^ + , emailFeatureSupportStatusPercentagePercentage :: Float -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureSupportStatusPercentage where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureSupportStatusPercentage") +instance ToJSON EmailFeatureSupportStatusPercentage where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureSupportStatusPercentage") + + +-- | +data EmailFeatureVersionStatistics = EmailFeatureVersionStatistics + { emailFeatureVersionStatisticsVersion :: Text -- ^ + , emailFeatureVersionStatisticsSupportFlags :: EmailFeatureSupportFlags -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailFeatureVersionStatistics where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailFeatureVersionStatistics") +instance ToJSON EmailFeatureVersionStatistics where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailFeatureVersionStatistics") + + +-- | +data EmailHtmlDto = EmailHtmlDto + { emailHtmlDtoSubject :: Maybe Text -- ^ + , emailHtmlDtoBody :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailHtmlDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailHtmlDto") +instance ToJSON EmailHtmlDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailHtmlDto") + + +-- | Links found in HTML +data EmailLinksResult = EmailLinksResult + { emailLinksResultLinks :: [Text] -- ^ + , emailLinksResultBody :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailLinksResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailLinksResult") +instance ToJSON EmailLinksResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailLinksResult") + + +-- | Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID. +data EmailPreview = EmailPreview + { emailPreviewId :: UUID -- ^ ID of the email entity + , emailPreviewDomainId :: Maybe UUID -- ^ ID of the domain that received the email + , emailPreviewSubject :: Maybe Text -- ^ The subject line of the email message as specified by SMTP subject header + , emailPreviewTo :: [Text] -- ^ List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + , emailPreviewFrom :: Maybe Text -- ^ Who the email was sent from. An email address - see fromName for the sender name. + , emailPreviewBcc :: Maybe [Text] -- ^ List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + , emailPreviewCc :: Maybe [Text] -- ^ List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + , emailPreviewCreatedAt :: UTCTime -- ^ When was the email received by MailSlurp + , emailPreviewRead :: Bool -- ^ Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. + , emailPreviewAttachments :: Maybe [Text] -- ^ List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailPreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailPreview") +instance ToJSON EmailPreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailPreview") + + +-- | URLs for email body +data EmailPreviewUrls = EmailPreviewUrls + { emailPreviewUrlsRawSmtpMessageUrl :: Text -- ^ + , emailPreviewUrlsPlainHtmlBodyUrl :: Text -- ^ + , emailPreviewUrlsOrigin :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailPreviewUrls where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailPreviewUrls") +instance ToJSON EmailPreviewUrls where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailPreviewUrls") + + +-- | A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties. +data EmailProjection = EmailProjection + { emailProjectionInboxId :: UUID -- ^ + , emailProjectionAttachments :: Maybe [Text] -- ^ + , emailProjectionTo :: [Text] -- ^ + , emailProjectionDomainId :: Maybe UUID -- ^ + , emailProjectionBcc :: Maybe [Text] -- ^ + , emailProjectionCc :: Maybe [Text] -- ^ + , emailProjectionRead :: Bool -- ^ + , emailProjectionBodyExcerpt :: Maybe Text -- ^ + , emailProjectionTeamAccess :: Bool -- ^ + , emailProjectionBodyMD5Hash :: Maybe Text -- ^ + , emailProjectionTextExcerpt :: Maybe Text -- ^ + , emailProjectionCreatedAt :: UTCTime -- ^ + , emailProjectionSubject :: Maybe Text -- ^ + , emailProjectionId :: UUID -- ^ + , emailProjectionFrom :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailProjection") +instance ToJSON EmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailProjection") + + +-- | The `To`,`CC`,`BCC` recipients stored in object form with email address and name accessible. +data EmailRecipients = EmailRecipients + { emailRecipientsTo :: Maybe [Recipient] -- ^ + , emailRecipientsCc :: Maybe [Recipient] -- ^ + , emailRecipientsBcc :: Maybe [Recipient] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailRecipients where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailRecipients") +instance ToJSON EmailRecipients where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailRecipients") + + +-- | +data EmailScreenshotResult = EmailScreenshotResult + { emailScreenshotResultBase64EncodedImage :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailScreenshotResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailScreenshotResult") +instance ToJSON EmailScreenshotResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailScreenshotResult") + + +-- | Parsed text of an email +data EmailTextLinesResult = EmailTextLinesResult + { emailTextLinesResultLines :: [Text] -- ^ + , emailTextLinesResultBody :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailTextLinesResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailTextLinesResult") +instance ToJSON EmailTextLinesResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailTextLinesResult") + + +-- | Email validation request +data EmailValidationRequestDto = EmailValidationRequestDto + { emailValidationRequestDtoId :: UUID -- ^ + , emailValidationRequestDtoUserId :: UUID -- ^ + , emailValidationRequestDtoEmailAddress :: Text -- ^ + , emailValidationRequestDtoIsValid :: Bool -- ^ + , emailValidationRequestDtoCreatedAt :: UTCTime -- ^ + , emailValidationRequestDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailValidationRequestDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailValidationRequestDto") +instance ToJSON EmailValidationRequestDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailValidationRequestDto") + + +-- | Email verification result. Valid means email address exists according to response from mail server running at the domain and port given. +data EmailVerificationResult = EmailVerificationResult + { emailVerificationResultDomainName :: Text -- ^ + , emailVerificationResultPort :: Int -- ^ + , emailVerificationResultEmailAddress :: Text -- ^ + , emailVerificationResultIsValid :: Bool -- ^ + , emailVerificationResultError :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmailVerificationResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emailVerificationResult") +instance ToJSON EmailVerificationResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "emailVerificationResult") + + +-- | +data EmergencyAddress = EmergencyAddress + { emergencyAddressId :: Maybe UUID -- ^ + , emergencyAddressSid :: Text -- ^ + , emergencyAddressUserId :: UUID -- ^ + , emergencyAddressDisplayName :: Text -- ^ + , emergencyAddressCustomerName :: Text -- ^ + , emergencyAddressAddress1 :: Text -- ^ + , emergencyAddressCity :: Text -- ^ + , emergencyAddressRegion :: Text -- ^ + , emergencyAddressPostalCode :: Text -- ^ + , emergencyAddressPhoneCountry :: Text -- ^ + , emergencyAddressAccountSid :: Text -- ^ + , emergencyAddressCreatedAt :: UTCTime -- ^ + , emergencyAddressUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmergencyAddress where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emergencyAddress") +instance ToJSON EmergencyAddress where + toJSON = genericToJSON (removeFieldLabelPrefix False "emergencyAddress") + + +-- | +data EmergencyAddressDto = EmergencyAddressDto + { emergencyAddressDtoId :: UUID -- ^ + , emergencyAddressDtoAddress1 :: Text -- ^ + , emergencyAddressDtoPhoneCountry :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmergencyAddressDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emergencyAddressDto") +instance ToJSON EmergencyAddressDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "emergencyAddressDto") + + +-- | +data EmptyResponseDto = EmptyResponseDto + { emptyResponseDtoMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON EmptyResponseDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "emptyResponseDto") +instance ToJSON EmptyResponseDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "emptyResponseDto") + + +-- | Expiration defaults for your account +data ExpirationDefaults = ExpirationDefaults + { expirationDefaultsDefaultExpirationMillis :: Maybe Integer -- ^ + , expirationDefaultsMaxExpirationMillis :: Maybe Integer -- ^ + , expirationDefaultsDefaultExpiresAt :: Maybe UTCTime -- ^ + , expirationDefaultsCanPermanentInbox :: Bool -- ^ + , expirationDefaultsNextInboxAllowsPermanent :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ExpirationDefaults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "expirationDefaults") +instance ToJSON ExpirationDefaults where + toJSON = genericToJSON (removeFieldLabelPrefix False "expirationDefaults") + + +-- | Expired inbox +data ExpiredInboxDto = ExpiredInboxDto + { expiredInboxDtoId :: UUID -- ^ + , expiredInboxDtoInboxId :: UUID -- ^ + , expiredInboxDtoEmailAddress :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ExpiredInboxDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "expiredInboxDto") +instance ToJSON ExpiredInboxDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "expiredInboxDto") + + +-- | Record of inbox expiration +data ExpiredInboxRecordProjection = ExpiredInboxRecordProjection + { expiredInboxRecordProjectionUserId :: UUID -- ^ + , expiredInboxRecordProjectionEmailAddress :: Text -- ^ + , expiredInboxRecordProjectionCreatedAt :: UTCTime -- ^ + , expiredInboxRecordProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ExpiredInboxRecordProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "expiredInboxRecordProjection") +instance ToJSON ExpiredInboxRecordProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "expiredInboxRecordProjection") + + +-- | Export download link +data ExportLink = ExportLink + { exportLinkDownloadLink :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ExportLink where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "exportLink") +instance ToJSON ExportLink where + toJSON = genericToJSON (removeFieldLabelPrefix False "exportLink") + + +-- | Options for exporting user data +data ExportOptions = ExportOptions + { exportOptionsOutputFormat :: Text -- ^ + , exportOptionsExcludePreviouslyExported :: Maybe Bool -- ^ + , exportOptionsCreatedEarliestTime :: Maybe UTCTime -- ^ + , exportOptionsCreatedOldestTime :: Maybe UTCTime -- ^ + , exportOptionsFilter :: Maybe Text -- ^ + , exportOptionsListSeparatorToken :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ExportOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "exportOptions") +instance ToJSON ExportOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "exportOptions") + + +-- | +data FakeEmailDto = FakeEmailDto + { fakeEmailDtoId :: UUID -- ^ + , fakeEmailDtoEmailAddress :: Text -- ^ + , fakeEmailDtoSender :: Maybe Sender -- ^ + , fakeEmailDtoRecipients :: Maybe EmailRecipients -- ^ + , fakeEmailDtoSubject :: Maybe Text -- ^ + , fakeEmailDtoPreview :: Maybe Text -- ^ + , fakeEmailDtoBody :: Text -- ^ + , fakeEmailDtoSeen :: Bool -- ^ + , fakeEmailDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON FakeEmailDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "fakeEmailDto") +instance ToJSON FakeEmailDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "fakeEmailDto") + + +-- | +data FakeEmailPreview = FakeEmailPreview + { fakeEmailPreviewId :: UUID -- ^ + , fakeEmailPreviewEmailAddress :: Text -- ^ + , fakeEmailPreviewSender :: Maybe Sender -- ^ + , fakeEmailPreviewRecipients :: Maybe EmailRecipients -- ^ + , fakeEmailPreviewSubject :: Maybe Text -- ^ + , fakeEmailPreviewPreview :: Maybe Text -- ^ + , fakeEmailPreviewCreatedAt :: UTCTime -- ^ + , fakeEmailPreviewSeen :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON FakeEmailPreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "fakeEmailPreview") +instance ToJSON FakeEmailPreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "fakeEmailPreview") + + +-- | +data FakeEmailResult = FakeEmailResult + { fakeEmailResultEmail :: Maybe FakeEmailDto -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON FakeEmailResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "fakeEmailResult") +instance ToJSON FakeEmailResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "fakeEmailResult") + + +-- | Options for filtering bounced email recipients +data FilterBouncedRecipientsOptions = FilterBouncedRecipientsOptions + { filterBouncedRecipientsOptionsEmailRecipients :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON FilterBouncedRecipientsOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "filterBouncedRecipientsOptions") +instance ToJSON FilterBouncedRecipientsOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "filterBouncedRecipientsOptions") + + +-- | Remaining recipients that were filtered to remove bounced recipients +data FilterBouncedRecipientsResult = FilterBouncedRecipientsResult + { filterBouncedRecipientsResultFilteredRecipients :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON FilterBouncedRecipientsResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "filterBouncedRecipientsResult") +instance ToJSON FilterBouncedRecipientsResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "filterBouncedRecipientsResult") + + +-- | Result from calling expire on any inboxes that have applicable expiration dates given current time. +data FlushExpiredInboxesResult = FlushExpiredInboxesResult + { flushExpiredInboxesResultInboxIds :: [UUID] -- ^ Inbox IDs affected by expiration + , flushExpiredInboxesResultExpireBefore :: UTCTime -- ^ DateTime to filter inboxes so that those expiring before this time are expired + } deriving (Show, Eq, Generic, Data) + +instance FromJSON FlushExpiredInboxesResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "flushExpiredInboxesResult") +instance ToJSON FlushExpiredInboxesResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "flushExpiredInboxesResult") + + +-- | Options for forwarding an email +data ForwardEmailOptions = ForwardEmailOptions + { forwardEmailOptionsTo :: [Text] -- ^ To recipients for forwarded email + , forwardEmailOptionsSubject :: Maybe Text -- ^ Subject for forwarded email + , forwardEmailOptionsCc :: Maybe [Text] -- ^ Optional cc recipients + , forwardEmailOptionsBcc :: Maybe [Text] -- ^ Optional bcc recipients + , forwardEmailOptionsFrom :: Maybe Text -- ^ Optional from override + , forwardEmailOptionsUseInboxName :: Maybe Bool -- ^ Optionally use inbox name as display name for sender email address + , forwardEmailOptionsFilterBouncedRecipients :: Maybe Bool -- ^ Filter recipients to remove any bounced recipients from to, bcc, and cc before sending + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ForwardEmailOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "forwardEmailOptions") +instance ToJSON ForwardEmailOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "forwardEmailOptions") + + +-- | +data GenerateBimiRecordOptions = GenerateBimiRecordOptions + { generateBimiRecordOptionsDomain :: Text -- ^ + , generateBimiRecordOptionsVersion :: Text -- ^ + , generateBimiRecordOptionsLogoUrl :: Text -- ^ + , generateBimiRecordOptionsVmcUrl :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateBimiRecordOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateBimiRecordOptions") +instance ToJSON GenerateBimiRecordOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateBimiRecordOptions") + + +-- | +data GenerateBimiRecordResults = GenerateBimiRecordResults + { generateBimiRecordResultsName :: Text -- ^ + , generateBimiRecordResultsType :: Text -- ^ Domain Name Server Record Types + , generateBimiRecordResultsTtl :: Int -- ^ + , generateBimiRecordResultsValue :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateBimiRecordResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateBimiRecordResults") +instance ToJSON GenerateBimiRecordResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateBimiRecordResults") + + +-- | +data GenerateDmarcRecordOptions = GenerateDmarcRecordOptions + { generateDmarcRecordOptionsDomain :: Text -- ^ + , generateDmarcRecordOptionsVersion :: Text -- ^ + , generateDmarcRecordOptionsPolicy :: Text -- ^ + , generateDmarcRecordOptionsSubdomainPolicy :: Maybe Text -- ^ + , generateDmarcRecordOptionsReportEmailAddress :: Maybe [Text] -- ^ + , generateDmarcRecordOptionsForensicEmailAddress :: Maybe [Text] -- ^ + , generateDmarcRecordOptionsPercentage :: Maybe Int -- ^ + , generateDmarcRecordOptionsReportFormat :: Maybe Text -- ^ + , generateDmarcRecordOptionsSecondsBetweenReports :: Maybe Int -- ^ + , generateDmarcRecordOptionsAdkim :: Maybe Text -- ^ + , generateDmarcRecordOptionsAspf :: Maybe Text -- ^ + , generateDmarcRecordOptionsFo :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateDmarcRecordOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateDmarcRecordOptions") +instance ToJSON GenerateDmarcRecordOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateDmarcRecordOptions") + + +-- | +data GenerateDmarcRecordResults = GenerateDmarcRecordResults + { generateDmarcRecordResultsName :: Text -- ^ + , generateDmarcRecordResultsType :: Text -- ^ Domain Name Server Record Types + , generateDmarcRecordResultsTtl :: Int -- ^ + , generateDmarcRecordResultsValue :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateDmarcRecordResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateDmarcRecordResults") +instance ToJSON GenerateDmarcRecordResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateDmarcRecordResults") + + +-- | +data GenerateMtaStsRecordOptions = GenerateMtaStsRecordOptions + { generateMtaStsRecordOptionsHost :: Text -- ^ + , generateMtaStsRecordOptionsVersion :: Text -- ^ + , generateMtaStsRecordOptionsMode :: Text -- ^ + , generateMtaStsRecordOptionsTtl :: Int -- ^ + , generateMtaStsRecordOptionsMaxAgeSeconds :: Int -- ^ + , generateMtaStsRecordOptionsMxRecords :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateMtaStsRecordOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateMtaStsRecordOptions") +instance ToJSON GenerateMtaStsRecordOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateMtaStsRecordOptions") + + +-- | +data GenerateMtaStsRecordResults = GenerateMtaStsRecordResults + { generateMtaStsRecordResultsName :: Text -- ^ + , generateMtaStsRecordResultsType :: Text -- ^ Domain Name Server Record Types + , generateMtaStsRecordResultsTtl :: Int -- ^ + , generateMtaStsRecordResultsValue :: Text -- ^ + , generateMtaStsRecordResultsWellKnownValue :: Text -- ^ + , generateMtaStsRecordResultsWellKnownUrl :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateMtaStsRecordResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateMtaStsRecordResults") +instance ToJSON GenerateMtaStsRecordResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateMtaStsRecordResults") + + +-- | +data GenerateTlsReportingRecordOptions = GenerateTlsReportingRecordOptions + { generateTlsReportingRecordOptionsReportingAddresses :: [Text] -- ^ + , generateTlsReportingRecordOptionsReportingUrl :: Maybe Text -- ^ + , generateTlsReportingRecordOptionsHost :: Text -- ^ + , generateTlsReportingRecordOptionsVersion :: Text -- ^ + , generateTlsReportingRecordOptionsTtl :: Int -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateTlsReportingRecordOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateTlsReportingRecordOptions") +instance ToJSON GenerateTlsReportingRecordOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateTlsReportingRecordOptions") + + +-- | +data GenerateTlsReportingRecordResults = GenerateTlsReportingRecordResults + { generateTlsReportingRecordResultsName :: Text -- ^ + , generateTlsReportingRecordResultsType :: Text -- ^ Domain Name Server Record Types + , generateTlsReportingRecordResultsTtl :: Int -- ^ + , generateTlsReportingRecordResultsValue :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GenerateTlsReportingRecordResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "generateTlsReportingRecordResults") +instance ToJSON GenerateTlsReportingRecordResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "generateTlsReportingRecordResults") + + +-- | Options taking a screenshot capture of a rendered email +data GetEmailScreenshotOptions = GetEmailScreenshotOptions + { getEmailScreenshotOptionsHeight :: Maybe Int -- ^ Window height in pixels + , getEmailScreenshotOptionsWidth :: Maybe Int -- ^ Window width in pixels + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GetEmailScreenshotOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "getEmailScreenshotOptions") +instance ToJSON GetEmailScreenshotOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "getEmailScreenshotOptions") + + +-- | User image +data GravatarUrl = GravatarUrl + { gravatarUrlUrl :: Text -- ^ + , gravatarUrlHash :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GravatarUrl where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "gravatarUrl") +instance ToJSON GravatarUrl where + toJSON = genericToJSON (removeFieldLabelPrefix False "gravatarUrl") + + +-- | Describes contacts attached to a contact group +data GroupContactsDto = GroupContactsDto + { groupContactsDtoGroup :: GroupDto -- ^ + , groupContactsDtoContacts :: [ContactDto] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GroupContactsDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "groupContactsDto") +instance ToJSON GroupContactsDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "groupContactsDto") + + +-- | Contact group data +data GroupDto = GroupDto + { groupDtoId :: UUID -- ^ + , groupDtoName :: Text -- ^ + , groupDtoDescription :: Maybe Text -- ^ + , groupDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GroupDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "groupDto") +instance ToJSON GroupDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "groupDto") + + +-- | Data for contact group +data GroupProjection = GroupProjection + { groupProjectionCreatedAt :: UTCTime -- ^ + , groupProjectionName :: Text -- ^ + , groupProjectionId :: UUID -- ^ + , groupProjectionDescription :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON GroupProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "groupProjection") +instance ToJSON GroupProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "groupProjection") + + +-- | HTML Validation Results +data HTMLValidationResult = HTMLValidationResult + { hTMLValidationResultIsValid :: Bool -- ^ Is HTML validation result valid + , hTMLValidationResultInfos :: [ValidationMessage] -- ^ Optional infos resulting from HTML validation + , hTMLValidationResultErrors :: [ValidationMessage] -- ^ Optional errors resulting from HTML validation + , hTMLValidationResultWarnings :: [ValidationMessage] -- ^ Optional warnings resulting from HTML validation + } deriving (Show, Eq, Generic, Data) + +instance FromJSON HTMLValidationResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "hTMLValidationResult") +instance ToJSON HTMLValidationResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "hTMLValidationResult") + + +-- | IP Address look up result for a given domain / hostname +data IPAddressResult = IPAddressResult + { iPAddressResultAddress :: Text -- ^ + , iPAddressResultHostname :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON IPAddressResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "iPAddressResult") +instance ToJSON IPAddressResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "iPAddressResult") + + +-- | +data ImageIssue = ImageIssue + { imageIssueUrl :: Text -- ^ + , imageIssueResponseStatus :: Maybe Int -- ^ + , imageIssueSeverity :: Text -- ^ + , imageIssueMessage :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImageIssue where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imageIssue") +instance ToJSON ImageIssue where + toJSON = genericToJSON (removeFieldLabelPrefix False "imageIssue") + + +-- | Access details for inbox using IMAP +data ImapAccessDetails = ImapAccessDetails + { imapAccessDetailsImapServerHost :: Text -- ^ IMAP server host domain + , imapAccessDetailsImapServerPort :: Int -- ^ IMAP server host port + , imapAccessDetailsImapUsername :: Text -- ^ IMAP username for login + , imapAccessDetailsImapPassword :: Text -- ^ IMAP password for login + , imapAccessDetailsImapMailbox :: Text -- ^ IMAP mailbox to SELECT + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapAccessDetails where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapAccessDetails") +instance ToJSON ImapAccessDetails where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapAccessDetails") + + +-- | +data ImapEmailProjection = ImapEmailProjection + { imapEmailProjectionRead :: Maybe Bool -- ^ + , imapEmailProjectionUid :: Integer -- ^ + , imapEmailProjectionSeqNum :: Integer -- ^ + , imapEmailProjectionCreatedAt :: UTCTime -- ^ + , imapEmailProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapEmailProjection") +instance ToJSON ImapEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapEmailProjection") + + +-- | IMAP operation flags +data ImapFlagOperationOptions = ImapFlagOperationOptions + { imapFlagOperationOptionsFlagOperation :: Text -- ^ + , imapFlagOperationOptionsFlags :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapFlagOperationOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapFlagOperationOptions") +instance ToJSON ImapFlagOperationOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapFlagOperationOptions") + + +-- | +data ImapMailboxStatus = ImapMailboxStatus + { imapMailboxStatusName :: Text -- ^ The mailbox name. + , imapMailboxStatusReadOnly :: Bool -- ^ True if the mailbox is open in read-only mode. + , imapMailboxStatusItems :: Value -- ^ Results map + , imapMailboxStatusFlags :: [Text] -- ^ The mailbox flags. + , imapMailboxStatusPermanentFlags :: [Text] -- ^ The mailbox permanent flags. + , imapMailboxStatusUnseenSeqNum :: Integer -- ^ The sequence number of the first unseen message in the mailbox. + , imapMailboxStatusMessages :: Int -- ^ The number of messages in this mailbox. + , imapMailboxStatusRecent :: Int -- ^ The number of messages not seen since the last time the mailbox was opened. + , imapMailboxStatusUnseen :: Int -- ^ The number of unread messages. + , imapMailboxStatusUidNext :: Integer -- ^ The next UID. + , imapMailboxStatusUidValidity :: Int -- ^ Together with a UID, it is a unique identifier for a message. Must be greater than or equal to 1. + , imapMailboxStatusAppendLimit :: Maybe Int -- ^ Per-mailbox limit of message size. Set only if server supports the APPENDLIMIT extension + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapMailboxStatus where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapMailboxStatus") +instance ToJSON ImapMailboxStatus where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapMailboxStatus") + + +-- | IMAP fetch content in raw format +data ImapServerFetchItem = ImapServerFetchItem + { imapServerFetchItemContent :: Text -- ^ Content of the email + , imapServerFetchItemId :: UUID -- ^ ID of the email + , imapServerFetchItemUid :: Integer -- ^ UID of the email + , imapServerFetchItemSeqNum :: Integer -- ^ Sequence number of the email + , imapServerFetchItemRead :: Bool -- ^ Read status of the email + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerFetchItem where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerFetchItem") +instance ToJSON ImapServerFetchItem where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerFetchItem") + + +-- | IMAP fetch email result +data ImapServerFetchResult = ImapServerFetchResult + { imapServerFetchResultResult :: Maybe ImapServerFetchItem -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerFetchResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerFetchResult") +instance ToJSON ImapServerFetchResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerFetchResult") + + +-- | +data ImapServerGetResult = ImapServerGetResult + { imapServerGetResultResult :: Maybe ImapEmailProjection -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerGetResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerGetResult") +instance ToJSON ImapServerGetResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerGetResult") + + +-- | +data ImapServerListOptions = ImapServerListOptions + { imapServerListOptionsUidSet :: Maybe Text -- ^ + , imapServerListOptionsSeqSet :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerListOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerListOptions") +instance ToJSON ImapServerListOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerListOptions") + + +-- | +data ImapServerListResult = ImapServerListResult + { imapServerListResultResults :: [ImapEmailProjection] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerListResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerListResult") +instance ToJSON ImapServerListResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerListResult") + + +-- | IMAP server search options +data ImapServerSearchOptions = ImapServerSearchOptions + { imapServerSearchOptionsSeqNum :: Maybe Text -- ^ + , imapServerSearchOptionsUid :: Maybe Text -- ^ + , imapServerSearchOptionsSince :: Maybe UTCTime -- ^ + , imapServerSearchOptionsBefore :: Maybe UTCTime -- ^ + , imapServerSearchOptionsSentSince :: Maybe UTCTime -- ^ + , imapServerSearchOptionsSentBefore :: Maybe UTCTime -- ^ + , imapServerSearchOptionsHeader :: Maybe (Map.Map String [Text]) -- ^ + , imapServerSearchOptionsBody :: Maybe [Text] -- ^ + , imapServerSearchOptionsText :: Maybe [Text] -- ^ + , imapServerSearchOptionsWithFlags :: Maybe [Text] -- ^ + , imapServerSearchOptionsWithoutFlags :: Maybe [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerSearchOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerSearchOptions") +instance ToJSON ImapServerSearchOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerSearchOptions") + + +-- | +data ImapServerSearchResult = ImapServerSearchResult + { imapServerSearchResultResults :: [ImapEmailProjection] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerSearchResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerSearchResult") +instance ToJSON ImapServerSearchResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerSearchResult") + + +-- | +data ImapServerStatusOptions = ImapServerStatusOptions + { imapServerStatusOptionsName :: Maybe Text -- ^ + , imapServerStatusOptionsStatusItems :: Maybe [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerStatusOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerStatusOptions") +instance ToJSON ImapServerStatusOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerStatusOptions") + + +-- | +data ImapServerStatusResult = ImapServerStatusResult + { imapServerStatusResultResult :: Maybe ImapMailboxStatus -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapServerStatusResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapServerStatusResult") +instance ToJSON ImapServerStatusResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapServerStatusResult") + + +-- | Access details for inbox using SMTP or IMAP +data ImapSmtpAccessDetails = ImapSmtpAccessDetails + { imapSmtpAccessDetailsSecureSmtpServerHost :: Text -- ^ Secure TLS SMTP server host domain + , imapSmtpAccessDetailsSecureSmtpServerPort :: Int -- ^ Secure TLS SMTP server host port + , imapSmtpAccessDetailsSecureSmtpUsername :: Text -- ^ Secure TLS SMTP username for login + , imapSmtpAccessDetailsSecureSmtpPassword :: Text -- ^ Secure TLS SMTP password for login + , imapSmtpAccessDetailsSmtpServerHost :: Text -- ^ SMTP server host domain + , imapSmtpAccessDetailsSmtpServerPort :: Int -- ^ SMTP server host port + , imapSmtpAccessDetailsSmtpUsername :: Text -- ^ SMTP username for login + , imapSmtpAccessDetailsSmtpPassword :: Text -- ^ SMTP password for login + , imapSmtpAccessDetailsImapServerHost :: Text -- ^ IMAP server host domain + , imapSmtpAccessDetailsImapServerPort :: Int -- ^ IMAP server host port + , imapSmtpAccessDetailsImapUsername :: Text -- ^ IMAP username for login + , imapSmtpAccessDetailsImapPassword :: Text -- ^ IMAP password for login + , imapSmtpAccessDetailsImapMailbox :: Text -- ^ IMAP mailbox to SELECT + , imapSmtpAccessDetailsMailFromDomain :: Maybe Text -- ^ Mail from domain or SMTP HELO value + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapSmtpAccessDetails where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapSmtpAccessDetails") +instance ToJSON ImapSmtpAccessDetails where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapSmtpAccessDetails") + + +-- | +data ImapUpdateFlagsOptions = ImapUpdateFlagsOptions + { imapUpdateFlagsOptionsOperation :: Text -- ^ + , imapUpdateFlagsOptionsFlags :: Maybe [Text] -- ^ + , imapUpdateFlagsOptionsUidSet :: Maybe Text -- ^ + , imapUpdateFlagsOptionsSeqSet :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ImapUpdateFlagsOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "imapUpdateFlagsOptions") +instance ToJSON ImapUpdateFlagsOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "imapUpdateFlagsOptions") + + +-- | Result of search for inbox by email address +data InboxByEmailAddressResult = InboxByEmailAddressResult + { inboxByEmailAddressResultInboxId :: Maybe UUID -- ^ + , inboxByEmailAddressResultExists :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxByEmailAddressResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxByEmailAddressResult") +instance ToJSON InboxByEmailAddressResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxByEmailAddressResult") + + +-- | Result of search for inbox by name +data InboxByNameResult = InboxByNameResult + { inboxByNameResultInboxId :: Maybe UUID -- ^ + , inboxByNameResultExists :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxByNameResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxByNameResult") +instance ToJSON InboxByNameResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxByNameResult") + + +-- | Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts and do not support IMAP or POP3. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and support SMTP login, IMAP and POP3. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching. +data InboxDto = InboxDto + { inboxDtoId :: UUID -- ^ ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + , inboxDtoUserId :: Maybe UUID -- ^ ID of user that inbox belongs to + , inboxDtoCreatedAt :: UTCTime -- ^ When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + , inboxDtoName :: Maybe Text -- ^ Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + , inboxDtoDomainId :: Maybe UUID -- ^ ID of custom domain used by the inbox if any + , inboxDtoDescription :: Maybe Text -- ^ Description of an inbox for labelling and searching purposes + , inboxDtoEmailAddress :: Text -- ^ The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + , inboxDtoExpiresAt :: Maybe Text -- ^ Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + , inboxDtoFavourite :: Bool -- ^ Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + , inboxDtoTags :: Maybe [Text] -- ^ Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + , inboxDtoInboxType :: Maybe Text -- ^ Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + , inboxDtoReadOnly :: Bool -- ^ Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. + , inboxDtoVirtualInbox :: Bool -- ^ Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + , inboxDtoFunctionsAs :: Maybe Text -- ^ Inbox function if used as a primitive for another system. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxDto") +instance ToJSON InboxDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxDto") + + +-- | Result of email exists query +data InboxExistsDto = InboxExistsDto + { inboxExistsDtoExists :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxExistsDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxExistsDto") +instance ToJSON InboxExistsDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxExistsDto") + + +-- | Inbox forwarder. Describes how an inbox will forward matching emails to designated recipients. +data InboxForwarderDto = InboxForwarderDto + { inboxForwarderDtoId :: UUID -- ^ + , inboxForwarderDtoInboxId :: UUID -- ^ + , inboxForwarderDtoName :: Maybe Text -- ^ Name of inbox forwarder + , inboxForwarderDtoField :: Text -- ^ Which field to match against + , inboxForwarderDtoMatch :: Text -- ^ Wild-card type pattern to apply to field + , inboxForwarderDtoForwardToRecipients :: [Text] -- ^ Who to send forwarded email to + , inboxForwarderDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxForwarderDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxForwarderDto") +instance ToJSON InboxForwarderDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxForwarderDto") + + +-- | Inbox forwarder event. Describes how an email was handled by an inbox forwarder. +data InboxForwarderEventDto = InboxForwarderEventDto + { inboxForwarderEventDtoId :: Maybe UUID -- ^ + , inboxForwarderEventDtoInboxId :: Maybe UUID -- ^ + , inboxForwarderEventDtoEmailId :: Maybe UUID -- ^ + , inboxForwarderEventDtoUserId :: Maybe UUID -- ^ + , inboxForwarderEventDtoForwarderId :: Maybe UUID -- ^ + , inboxForwarderEventDtoMessage :: Maybe Text -- ^ + , inboxForwarderEventDtoStatus :: Maybe Text -- ^ + , inboxForwarderEventDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxForwarderEventDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxForwarderEventDto") +instance ToJSON InboxForwarderEventDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxForwarderEventDto") + + +-- | Inbox forwarder event +data InboxForwarderEventProjection = InboxForwarderEventProjection + { inboxForwarderEventProjectionUserId :: Maybe UUID -- ^ + , inboxForwarderEventProjectionEmailId :: Maybe UUID -- ^ + , inboxForwarderEventProjectionInboxId :: Maybe UUID -- ^ + , inboxForwarderEventProjectionForwarderId :: Maybe UUID -- ^ + , inboxForwarderEventProjectionCreatedAt :: UTCTime -- ^ + , inboxForwarderEventProjectionMessage :: Maybe Text -- ^ + , inboxForwarderEventProjectionId :: Maybe UUID -- ^ + , inboxForwarderEventProjectionStatus :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxForwarderEventProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxForwarderEventProjection") +instance ToJSON InboxForwarderEventProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxForwarderEventProjection") + + +-- | Options for testing an inbox forwarder against a value +data InboxForwarderTestOptions = InboxForwarderTestOptions + { inboxForwarderTestOptionsTestValue :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxForwarderTestOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxForwarderTestOptions") +instance ToJSON InboxForwarderTestOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxForwarderTestOptions") + + +-- | Results of inbox forwarder test +data InboxForwarderTestResult = InboxForwarderTestResult + { inboxForwarderTestResultMatches :: (Map.Map String Bool) -- ^ + , inboxForwarderTestResultDoesMatch :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxForwarderTestResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxForwarderTestResult") +instance ToJSON InboxForwarderTestResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxForwarderTestResult") + + +-- | Inbox ID and email address pair +data InboxIdItem = InboxIdItem + { inboxIdItemId :: UUID -- ^ + , inboxIdItemEmailAddress :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxIdItem where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxIdItem") +instance ToJSON InboxIdItem where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxIdItem") + + +-- | List of inbox IDs and email addresses +data InboxIdsResult = InboxIdsResult + { inboxIdsResultInboxIds :: [InboxIdItem] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxIdsResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxIdsResult") +instance ToJSON InboxIdsResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxIdsResult") + + +-- | Inbox data preview element. +data InboxPreview = InboxPreview + { inboxPreviewId :: UUID -- ^ ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + , inboxPreviewDomainId :: Maybe UUID -- ^ ID of custom domain used by the inbox if any + , inboxPreviewEmailAddress :: Maybe Text -- ^ The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + , inboxPreviewCreatedAt :: UTCTime -- ^ When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + , inboxPreviewFavourite :: Bool -- ^ Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + , inboxPreviewName :: Maybe Text -- ^ Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + , inboxPreviewTags :: Maybe [Text] -- ^ Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + , inboxPreviewTeamAccess :: Bool -- ^ Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ + , inboxPreviewInboxType :: Maybe Text -- ^ Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + , inboxPreviewVirtualInbox :: Bool -- ^ Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + , inboxPreviewExpiresAt :: Maybe Text -- ^ Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + , inboxPreviewFunctionsAs :: Maybe Text -- ^ Inbox function if used as a primitive for another system. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxPreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxPreview") +instance ToJSON InboxPreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxPreview") + + +-- | Inbox replier. Will automatically reply to inbound emails that match given field for an inbox. +data InboxReplierDto = InboxReplierDto + { inboxReplierDtoId :: UUID -- ^ + , inboxReplierDtoInboxId :: UUID -- ^ + , inboxReplierDtoName :: Maybe Text -- ^ + , inboxReplierDtoField :: Text -- ^ + , inboxReplierDtoMatch :: Text -- ^ + , inboxReplierDtoReplyTo :: Maybe Text -- ^ + , inboxReplierDtoSubject :: Maybe Text -- ^ + , inboxReplierDtoFrom :: Maybe Text -- ^ + , inboxReplierDtoCharset :: Maybe Text -- ^ + , inboxReplierDtoIsHTML :: Bool -- ^ + , inboxReplierDtoTemplateId :: Maybe UUID -- ^ + , inboxReplierDtoTemplateVariables :: Maybe (Map.Map String Value) -- ^ + , inboxReplierDtoIgnoreReplyTo :: Bool -- ^ + , inboxReplierDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxReplierDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxReplierDto") +instance ToJSON InboxReplierDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxReplierDto") + + +-- | Inbox replier event +data InboxReplierEventProjection = InboxReplierEventProjection + { inboxReplierEventProjectionRecipients :: Maybe [Text] -- ^ + , inboxReplierEventProjectionUserId :: Maybe UUID -- ^ + , inboxReplierEventProjectionEmailId :: Maybe UUID -- ^ + , inboxReplierEventProjectionInboxId :: Maybe UUID -- ^ + , inboxReplierEventProjectionSentId :: Maybe UUID -- ^ + , inboxReplierEventProjectionReplierId :: Maybe UUID -- ^ + , inboxReplierEventProjectionCreatedAt :: UTCTime -- ^ + , inboxReplierEventProjectionMessage :: Maybe Text -- ^ + , inboxReplierEventProjectionId :: Maybe UUID -- ^ + , inboxReplierEventProjectionStatus :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxReplierEventProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxReplierEventProjection") +instance ToJSON InboxReplierEventProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxReplierEventProjection") + + +-- | Rules for inbox +data InboxRulesetDto = InboxRulesetDto + { inboxRulesetDtoId :: UUID -- ^ + , inboxRulesetDtoInboxId :: Maybe UUID -- ^ + , inboxRulesetDtoScope :: Text -- ^ + , inboxRulesetDtoAction :: Text -- ^ + , inboxRulesetDtoTarget :: Text -- ^ + , inboxRulesetDtoHandler :: Text -- ^ + , inboxRulesetDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxRulesetDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxRulesetDto") +instance ToJSON InboxRulesetDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxRulesetDto") + + +-- | Test options for inbox ruleset +data InboxRulesetTestOptions = InboxRulesetTestOptions + { inboxRulesetTestOptionsTestTarget :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxRulesetTestOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxRulesetTestOptions") +instance ToJSON InboxRulesetTestOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxRulesetTestOptions") + + +-- | Result of test of inbox ruleset +data InboxRulesetTestResult = InboxRulesetTestResult + { inboxRulesetTestResultRulesetMatches :: (Map.Map String Bool) -- ^ Map of inbox ruleset ID to boolean of if target matches + , inboxRulesetTestResultMatches :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InboxRulesetTestResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inboxRulesetTestResult") +instance ToJSON InboxRulesetTestResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "inboxRulesetTestResult") + + +-- | +data InlineObject = InlineObject + { inlineObjectContentTypeHeader :: Maybe Text -- ^ Optional content type header of attachment + , inlineObjectFile :: FilePath -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON InlineObject where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "inlineObject") +instance ToJSON InlineObject where + toJSON = genericToJSON (removeFieldLabelPrefix False "inlineObject") + + +-- | JSONSchema for payload +data JSONSchemaDto = JSONSchemaDto + { jSONSchemaDtoValue :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON JSONSchemaDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "jSONSchemaDto") +instance ToJSON JSONSchemaDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "jSONSchemaDto") + + +-- | +data LinkIssue = LinkIssue + { linkIssueUrl :: Text -- ^ + , linkIssueResponseStatus :: Maybe Int -- ^ + , linkIssueSeverity :: Text -- ^ + , linkIssueMessage :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LinkIssue where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "linkIssue") +instance ToJSON LinkIssue where + toJSON = genericToJSON (removeFieldLabelPrefix False "linkIssue") + + +-- | List unsubscribe recipient +data ListUnsubscribeRecipientProjection = ListUnsubscribeRecipientProjection + { listUnsubscribeRecipientProjectionEmailAddress :: Text -- ^ + , listUnsubscribeRecipientProjectionDomainId :: Maybe UUID -- ^ + , listUnsubscribeRecipientProjectionCreatedAt :: UTCTime -- ^ + , listUnsubscribeRecipientProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ListUnsubscribeRecipientProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "listUnsubscribeRecipientProjection") +instance ToJSON ListUnsubscribeRecipientProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "listUnsubscribeRecipientProjection") + + +-- | +data LookupBimiDomainOptions = LookupBimiDomainOptions + { lookupBimiDomainOptionsHost :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupBimiDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupBimiDomainOptions") +instance ToJSON LookupBimiDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupBimiDomainOptions") + + +-- | +data LookupBimiDomainResults = LookupBimiDomainResults + { lookupBimiDomainResultsValid :: Bool -- ^ + , lookupBimiDomainResultsQuery :: DNSLookupOptions -- ^ + , lookupBimiDomainResultsRecords :: [DNSLookupResult] -- ^ + , lookupBimiDomainResultsErrors :: [Text] -- ^ + , lookupBimiDomainResultsWarnings :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupBimiDomainResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupBimiDomainResults") +instance ToJSON LookupBimiDomainResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupBimiDomainResults") + + +-- | +data LookupDmarcDomainOptions = LookupDmarcDomainOptions + { lookupDmarcDomainOptionsHost :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupDmarcDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupDmarcDomainOptions") +instance ToJSON LookupDmarcDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupDmarcDomainOptions") + + +-- | +data LookupDmarcDomainResults = LookupDmarcDomainResults + { lookupDmarcDomainResultsValid :: Bool -- ^ + , lookupDmarcDomainResultsQuery :: DNSLookupOptions -- ^ + , lookupDmarcDomainResultsRecords :: [DNSLookupResult] -- ^ + , lookupDmarcDomainResultsErrors :: [Text] -- ^ + , lookupDmarcDomainResultsWarnings :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupDmarcDomainResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupDmarcDomainResults") +instance ToJSON LookupDmarcDomainResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupDmarcDomainResults") + + +-- | +data LookupMtaStsDomainOptions = LookupMtaStsDomainOptions + { lookupMtaStsDomainOptionsHost :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupMtaStsDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupMtaStsDomainOptions") +instance ToJSON LookupMtaStsDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupMtaStsDomainOptions") + + +-- | +data LookupMtaStsDomainResults = LookupMtaStsDomainResults + { lookupMtaStsDomainResultsValid :: Bool -- ^ + , lookupMtaStsDomainResultsQuery :: DNSLookupOptions -- ^ + , lookupMtaStsDomainResultsRecords :: [DNSLookupResult] -- ^ + , lookupMtaStsDomainResultsWellKnownQuery :: Text -- ^ + , lookupMtaStsDomainResultsWellKnownPresent :: Bool -- ^ + , lookupMtaStsDomainResultsWellKnownValue :: Text -- ^ + , lookupMtaStsDomainResultsErrors :: [Text] -- ^ + , lookupMtaStsDomainResultsWarnings :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupMtaStsDomainResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupMtaStsDomainResults") +instance ToJSON LookupMtaStsDomainResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupMtaStsDomainResults") + + +-- | +data LookupTlsReportingDomainOptions = LookupTlsReportingDomainOptions + { lookupTlsReportingDomainOptionsHost :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupTlsReportingDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupTlsReportingDomainOptions") +instance ToJSON LookupTlsReportingDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupTlsReportingDomainOptions") + + +-- | +data LookupTlsReportingDomainResults = LookupTlsReportingDomainResults + { lookupTlsReportingDomainResultsValid :: Bool -- ^ + , lookupTlsReportingDomainResultsQuery :: DNSLookupOptions -- ^ + , lookupTlsReportingDomainResultsRecords :: [DNSLookupResult] -- ^ + , lookupTlsReportingDomainResultsErrors :: [Text] -- ^ + , lookupTlsReportingDomainResultsWarnings :: [Text] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON LookupTlsReportingDomainResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "lookupTlsReportingDomainResults") +instance ToJSON LookupTlsReportingDomainResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "lookupTlsReportingDomainResults") + + +-- | Options for matching emails in an inbox. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `SUBJECT` should `CONTAIN` value. +data MatchOption = MatchOption + { matchOptionField :: Text -- ^ Fields of an email object that can be used to filter results + , matchOptionShould :: Text -- ^ How the value of the email field specified should be compared to the value given in the match options. + , matchOptionValue :: Text -- ^ The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON MatchOption where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "matchOption") +instance ToJSON MatchOption where + toJSON = genericToJSON (removeFieldLabelPrefix False "matchOption") + + +-- | Optional filter for matching emails based on fields. For instance filter results to only include emails whose `SUBJECT` value does `CONTAIN` given match value. An example payload would be `{ matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }`. You can also pass conditions such as `HAS_ATTACHMENT`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController. +data MatchOptions = MatchOptions + { matchOptionsMatches :: Maybe [MatchOption] -- ^ Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results + , matchOptionsConditions :: Maybe [ConditionOption] -- ^ Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON MatchOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "matchOptions") +instance ToJSON MatchOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "matchOptions") + + +-- | Missed email +data MissedEmailDto = MissedEmailDto + { missedEmailDtoId :: UUID -- ^ + , missedEmailDtoUserId :: Maybe UUID -- ^ + , missedEmailDtoSubject :: Maybe Text -- ^ + , missedEmailDtoBodyExcerpt :: Maybe Text -- ^ + , missedEmailDtoAttachmentCount :: Int -- ^ + , missedEmailDtoFrom :: Maybe Text -- ^ + , missedEmailDtoRawUrl :: Maybe Text -- ^ + , missedEmailDtoRawKey :: Maybe Text -- ^ + , missedEmailDtoRawBucket :: Maybe Text -- ^ + , missedEmailDtoCanRestore :: Maybe Bool -- ^ + , missedEmailDtoTo :: [Text] -- ^ + , missedEmailDtoCc :: [Text] -- ^ + , missedEmailDtoBcc :: [Text] -- ^ + , missedEmailDtoInboxIds :: [UUID] -- ^ + , missedEmailDtoCreatedAt :: UTCTime -- ^ + , missedEmailDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON MissedEmailDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "missedEmailDto") +instance ToJSON MissedEmailDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "missedEmailDto") + + +-- | Missed email data +data MissedEmailProjection = MissedEmailProjection + { missedEmailProjectionUserId :: Maybe UUID -- ^ + , missedEmailProjectionCreatedAt :: UTCTime -- ^ + , missedEmailProjectionSubject :: Maybe Text -- ^ + , missedEmailProjectionId :: UUID -- ^ + , missedEmailProjectionFrom :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON MissedEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "missedEmailProjection") +instance ToJSON MissedEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "missedEmailProjection") + + +-- | Name Server Record +data NameServerRecord = NameServerRecord + { nameServerRecordRaw :: Text -- ^ + , nameServerRecordRecordType :: Text -- ^ + , nameServerRecordPriority :: Text -- ^ + , nameServerRecordValue :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON NameServerRecord where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "nameServerRecord") +instance ToJSON NameServerRecord where + toJSON = genericToJSON (removeFieldLabelPrefix False "nameServerRecord") + + +-- | +data NewFakeEmailAddressResult = NewFakeEmailAddressResult + { newFakeEmailAddressResultEmailAddress :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON NewFakeEmailAddressResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "newFakeEmailAddressResult") +instance ToJSON NewFakeEmailAddressResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "newFakeEmailAddressResult") + + +-- | Organization team inbox +data OrganizationInboxProjection = OrganizationInboxProjection + { organizationInboxProjectionId :: UUID -- ^ ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. + , organizationInboxProjectionDomainId :: Maybe UUID -- ^ ID of custom domain used by the inbox if any + , organizationInboxProjectionCreatedAt :: UTCTime -- ^ When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. + , organizationInboxProjectionName :: Maybe Text -- ^ Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + , organizationInboxProjectionEmailAddress :: Maybe Text -- ^ The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + , organizationInboxProjectionFavourite :: Bool -- ^ Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + , organizationInboxProjectionTags :: Maybe [Text] -- ^ Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + , organizationInboxProjectionTeamAccess :: Bool -- ^ Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ + , organizationInboxProjectionInboxType :: Maybe Text -- ^ Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + , organizationInboxProjectionReadOnly :: Bool -- ^ Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. + , organizationInboxProjectionVirtualInbox :: Bool -- ^ Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. + , organizationInboxProjectionFunctionsAs :: Maybe Text -- ^ Inbox function if used as a primitive for another system. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON OrganizationInboxProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "organizationInboxProjection") +instance ToJSON OrganizationInboxProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "organizationInboxProjection") + + +-- | Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageAlias = PageAlias + { pageAliasContent :: Maybe [AliasProjection] -- ^ + , pageAliasPageable :: Maybe PageableObject -- ^ + , pageAliasTotalPages :: Int -- ^ + , pageAliasTotalElements :: Integer -- ^ + , pageAliasLast :: Maybe Bool -- ^ + , pageAliasNumberOfElements :: Maybe Int -- ^ + , pageAliasFirst :: Maybe Bool -- ^ + , pageAliasSize :: Maybe Int -- ^ + , pageAliasNumber :: Maybe Int -- ^ + , pageAliasSort :: Maybe SortObject -- ^ + , pageAliasEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageAlias where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageAlias") +instance ToJSON PageAlias where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageAlias") + + +-- | Paginated attachment entity results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageAttachmentEntity = PageAttachmentEntity + { pageAttachmentEntityContent :: Maybe [AttachmentProjection] -- ^ + , pageAttachmentEntityPageable :: Maybe PageableObject -- ^ + , pageAttachmentEntityTotalPages :: Int -- ^ + , pageAttachmentEntityTotalElements :: Integer -- ^ + , pageAttachmentEntityLast :: Maybe Bool -- ^ + , pageAttachmentEntityNumberOfElements :: Maybe Int -- ^ + , pageAttachmentEntityFirst :: Maybe Bool -- ^ + , pageAttachmentEntitySize :: Maybe Int -- ^ + , pageAttachmentEntityNumber :: Maybe Int -- ^ + , pageAttachmentEntitySort :: Maybe SortObject -- ^ + , pageAttachmentEntityEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageAttachmentEntity where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageAttachmentEntity") +instance ToJSON PageAttachmentEntity where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageAttachmentEntity") + + +-- | Paginated bounced email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageBouncedEmail = PageBouncedEmail + { pageBouncedEmailContent :: Maybe [BounceProjection] -- ^ + , pageBouncedEmailPageable :: Maybe PageableObject -- ^ + , pageBouncedEmailTotalPages :: Int -- ^ + , pageBouncedEmailTotalElements :: Integer -- ^ + , pageBouncedEmailLast :: Maybe Bool -- ^ + , pageBouncedEmailNumberOfElements :: Maybe Int -- ^ + , pageBouncedEmailFirst :: Maybe Bool -- ^ + , pageBouncedEmailSize :: Maybe Int -- ^ + , pageBouncedEmailNumber :: Maybe Int -- ^ + , pageBouncedEmailSort :: Maybe SortObject -- ^ + , pageBouncedEmailEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageBouncedEmail where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageBouncedEmail") +instance ToJSON PageBouncedEmail where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageBouncedEmail") + + +-- | Paginated bounced recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageBouncedRecipients = PageBouncedRecipients + { pageBouncedRecipientsContent :: Maybe [BounceRecipientProjection] -- ^ + , pageBouncedRecipientsPageable :: Maybe PageableObject -- ^ + , pageBouncedRecipientsTotalPages :: Int -- ^ + , pageBouncedRecipientsTotalElements :: Integer -- ^ + , pageBouncedRecipientsLast :: Maybe Bool -- ^ + , pageBouncedRecipientsNumberOfElements :: Maybe Int -- ^ + , pageBouncedRecipientsFirst :: Maybe Bool -- ^ + , pageBouncedRecipientsSize :: Maybe Int -- ^ + , pageBouncedRecipientsNumber :: Maybe Int -- ^ + , pageBouncedRecipientsSort :: Maybe SortObject -- ^ + , pageBouncedRecipientsEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageBouncedRecipients where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageBouncedRecipients") +instance ToJSON PageBouncedRecipients where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageBouncedRecipients") + + +-- | Paginated complaint email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageComplaint = PageComplaint + { pageComplaintContent :: Maybe [Complaint] -- ^ + , pageComplaintPageable :: Maybe PageableObject -- ^ + , pageComplaintTotalPages :: Int -- ^ + , pageComplaintTotalElements :: Integer -- ^ + , pageComplaintLast :: Maybe Bool -- ^ + , pageComplaintNumberOfElements :: Maybe Int -- ^ + , pageComplaintFirst :: Maybe Bool -- ^ + , pageComplaintSize :: Maybe Int -- ^ + , pageComplaintNumber :: Maybe Int -- ^ + , pageComplaintSort :: Maybe SortObject -- ^ + , pageComplaintEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageComplaint where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageComplaint") +instance ToJSON PageComplaint where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageComplaint") + + +-- | Paginated inbox connectors. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageConnector = PageConnector + { pageConnectorContent :: Maybe [ConnectorProjection] -- ^ + , pageConnectorPageable :: Maybe PageableObject -- ^ + , pageConnectorTotalPages :: Int -- ^ + , pageConnectorTotalElements :: Integer -- ^ + , pageConnectorLast :: Maybe Bool -- ^ + , pageConnectorNumberOfElements :: Maybe Int -- ^ + , pageConnectorFirst :: Maybe Bool -- ^ + , pageConnectorSize :: Maybe Int -- ^ + , pageConnectorNumber :: Maybe Int -- ^ + , pageConnectorSort :: Maybe SortObject -- ^ + , pageConnectorEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageConnector where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageConnector") +instance ToJSON PageConnector where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageConnector") + + +-- | Paginated inbox connector sync events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageConnectorSyncEvents = PageConnectorSyncEvents + { pageConnectorSyncEventsContent :: Maybe [ConnectorSyncEventProjection] -- ^ + , pageConnectorSyncEventsPageable :: Maybe PageableObject -- ^ + , pageConnectorSyncEventsTotalPages :: Int -- ^ + , pageConnectorSyncEventsTotalElements :: Integer -- ^ + , pageConnectorSyncEventsLast :: Maybe Bool -- ^ + , pageConnectorSyncEventsNumberOfElements :: Maybe Int -- ^ + , pageConnectorSyncEventsFirst :: Maybe Bool -- ^ + , pageConnectorSyncEventsSize :: Maybe Int -- ^ + , pageConnectorSyncEventsNumber :: Maybe Int -- ^ + , pageConnectorSyncEventsSort :: Maybe SortObject -- ^ + , pageConnectorSyncEventsEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageConnectorSyncEvents where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageConnectorSyncEvents") +instance ToJSON PageConnectorSyncEvents where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageConnectorSyncEvents") + + +-- | Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageContactProjection = PageContactProjection + { pageContactProjectionContent :: Maybe [ContactProjection] -- ^ + , pageContactProjectionPageable :: Maybe PageableObject -- ^ + , pageContactProjectionTotalPages :: Int -- ^ + , pageContactProjectionTotalElements :: Integer -- ^ + , pageContactProjectionLast :: Maybe Bool -- ^ + , pageContactProjectionNumberOfElements :: Maybe Int -- ^ + , pageContactProjectionFirst :: Maybe Bool -- ^ + , pageContactProjectionSize :: Maybe Int -- ^ + , pageContactProjectionNumber :: Maybe Int -- ^ + , pageContactProjectionSort :: Maybe SortObject -- ^ + , pageContactProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageContactProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageContactProjection") +instance ToJSON PageContactProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageContactProjection") + + +-- | Paginated delivery status results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageDeliveryStatus = PageDeliveryStatus + { pageDeliveryStatusContent :: Maybe [DeliveryStatusDto] -- ^ + , pageDeliveryStatusPageable :: Maybe PageableObject -- ^ + , pageDeliveryStatusTotalPages :: Int -- ^ + , pageDeliveryStatusTotalElements :: Integer -- ^ + , pageDeliveryStatusLast :: Maybe Bool -- ^ + , pageDeliveryStatusNumberOfElements :: Maybe Int -- ^ + , pageDeliveryStatusFirst :: Maybe Bool -- ^ + , pageDeliveryStatusSize :: Maybe Int -- ^ + , pageDeliveryStatusNumber :: Maybe Int -- ^ + , pageDeliveryStatusSort :: Maybe SortObject -- ^ + , pageDeliveryStatusEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageDeliveryStatus where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageDeliveryStatus") +instance ToJSON PageDeliveryStatus where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageDeliveryStatus") + + +-- | Paginated email preview results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. +data PageEmailPreview = PageEmailPreview + { pageEmailPreviewContent :: Maybe [EmailPreview] -- ^ + , pageEmailPreviewPageable :: Maybe PageableObject -- ^ + , pageEmailPreviewTotalPages :: Int -- ^ + , pageEmailPreviewTotalElements :: Integer -- ^ + , pageEmailPreviewLast :: Maybe Bool -- ^ + , pageEmailPreviewNumberOfElements :: Maybe Int -- ^ + , pageEmailPreviewFirst :: Maybe Bool -- ^ + , pageEmailPreviewSize :: Maybe Int -- ^ + , pageEmailPreviewNumber :: Maybe Int -- ^ + , pageEmailPreviewSort :: Maybe SortObject -- ^ + , pageEmailPreviewEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageEmailPreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageEmailPreview") +instance ToJSON PageEmailPreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageEmailPreview") + + +-- | Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. +data PageEmailProjection = PageEmailProjection + { pageEmailProjectionContent :: Maybe [EmailProjection] -- ^ + , pageEmailProjectionPageable :: Maybe PageableObject -- ^ + , pageEmailProjectionTotalPages :: Int -- ^ + , pageEmailProjectionTotalElements :: Integer -- ^ + , pageEmailProjectionLast :: Maybe Bool -- ^ + , pageEmailProjectionNumberOfElements :: Maybe Int -- ^ + , pageEmailProjectionFirst :: Maybe Bool -- ^ + , pageEmailProjectionSize :: Maybe Int -- ^ + , pageEmailProjectionNumber :: Maybe Int -- ^ + , pageEmailProjectionSort :: Maybe SortObject -- ^ + , pageEmailProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageEmailProjection") +instance ToJSON PageEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageEmailProjection") + + +-- | Paginated email validation request records. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageEmailValidationRequest = PageEmailValidationRequest + { pageEmailValidationRequestContent :: Maybe [EmailValidationRequestDto] -- ^ + , pageEmailValidationRequestPageable :: Maybe PageableObject -- ^ + , pageEmailValidationRequestTotalPages :: Int -- ^ + , pageEmailValidationRequestTotalElements :: Integer -- ^ + , pageEmailValidationRequestLast :: Maybe Bool -- ^ + , pageEmailValidationRequestNumberOfElements :: Maybe Int -- ^ + , pageEmailValidationRequestFirst :: Maybe Bool -- ^ + , pageEmailValidationRequestSize :: Maybe Int -- ^ + , pageEmailValidationRequestNumber :: Maybe Int -- ^ + , pageEmailValidationRequestSort :: Maybe SortObject -- ^ + , pageEmailValidationRequestEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageEmailValidationRequest where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageEmailValidationRequest") +instance ToJSON PageEmailValidationRequest where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageEmailValidationRequest") + + +-- | Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageExpiredInboxRecordProjection = PageExpiredInboxRecordProjection + { pageExpiredInboxRecordProjectionContent :: Maybe [ExpiredInboxRecordProjection] -- ^ + , pageExpiredInboxRecordProjectionPageable :: Maybe PageableObject -- ^ + , pageExpiredInboxRecordProjectionTotalPages :: Int -- ^ + , pageExpiredInboxRecordProjectionTotalElements :: Integer -- ^ + , pageExpiredInboxRecordProjectionLast :: Maybe Bool -- ^ + , pageExpiredInboxRecordProjectionNumberOfElements :: Maybe Int -- ^ + , pageExpiredInboxRecordProjectionFirst :: Maybe Bool -- ^ + , pageExpiredInboxRecordProjectionSize :: Maybe Int -- ^ + , pageExpiredInboxRecordProjectionNumber :: Maybe Int -- ^ + , pageExpiredInboxRecordProjectionSort :: Maybe SortObject -- ^ + , pageExpiredInboxRecordProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageExpiredInboxRecordProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageExpiredInboxRecordProjection") +instance ToJSON PageExpiredInboxRecordProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageExpiredInboxRecordProjection") + + +-- | Paginated missed email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageGroupProjection = PageGroupProjection + { pageGroupProjectionContent :: Maybe [GroupProjection] -- ^ + , pageGroupProjectionPageable :: Maybe PageableObject -- ^ + , pageGroupProjectionTotalPages :: Int -- ^ + , pageGroupProjectionTotalElements :: Integer -- ^ + , pageGroupProjectionLast :: Maybe Bool -- ^ + , pageGroupProjectionNumberOfElements :: Maybe Int -- ^ + , pageGroupProjectionFirst :: Maybe Bool -- ^ + , pageGroupProjectionSize :: Maybe Int -- ^ + , pageGroupProjectionNumber :: Maybe Int -- ^ + , pageGroupProjectionSort :: Maybe SortObject -- ^ + , pageGroupProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageGroupProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageGroupProjection") +instance ToJSON PageGroupProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageGroupProjection") + + +-- | Paginated inbox forwarder results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageInboxForwarderDto = PageInboxForwarderDto + { pageInboxForwarderDtoContent :: Maybe [InboxForwarderDto] -- ^ + , pageInboxForwarderDtoPageable :: Maybe PageableObject -- ^ + , pageInboxForwarderDtoTotalPages :: Int -- ^ + , pageInboxForwarderDtoTotalElements :: Integer -- ^ + , pageInboxForwarderDtoLast :: Maybe Bool -- ^ + , pageInboxForwarderDtoNumberOfElements :: Maybe Int -- ^ + , pageInboxForwarderDtoFirst :: Maybe Bool -- ^ + , pageInboxForwarderDtoSize :: Maybe Int -- ^ + , pageInboxForwarderDtoNumber :: Maybe Int -- ^ + , pageInboxForwarderDtoSort :: Maybe SortObject -- ^ + , pageInboxForwarderDtoEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageInboxForwarderDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageInboxForwarderDto") +instance ToJSON PageInboxForwarderDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageInboxForwarderDto") + + +-- | Paginated inbox forwarder events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageInboxForwarderEvents = PageInboxForwarderEvents + { pageInboxForwarderEventsContent :: Maybe [InboxForwarderEventProjection] -- ^ + , pageInboxForwarderEventsPageable :: Maybe PageableObject -- ^ + , pageInboxForwarderEventsTotalPages :: Int -- ^ + , pageInboxForwarderEventsTotalElements :: Integer -- ^ + , pageInboxForwarderEventsLast :: Maybe Bool -- ^ + , pageInboxForwarderEventsNumberOfElements :: Maybe Int -- ^ + , pageInboxForwarderEventsFirst :: Maybe Bool -- ^ + , pageInboxForwarderEventsSize :: Maybe Int -- ^ + , pageInboxForwarderEventsNumber :: Maybe Int -- ^ + , pageInboxForwarderEventsSort :: Maybe SortObject -- ^ + , pageInboxForwarderEventsEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageInboxForwarderEvents where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageInboxForwarderEvents") +instance ToJSON PageInboxForwarderEvents where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageInboxForwarderEvents") + + +-- | Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageInboxProjection = PageInboxProjection + { pageInboxProjectionContent :: Maybe [InboxPreview] -- ^ + , pageInboxProjectionPageable :: Maybe PageableObject -- ^ + , pageInboxProjectionTotalPages :: Int -- ^ + , pageInboxProjectionTotalElements :: Integer -- ^ + , pageInboxProjectionLast :: Maybe Bool -- ^ + , pageInboxProjectionNumberOfElements :: Maybe Int -- ^ + , pageInboxProjectionFirst :: Maybe Bool -- ^ + , pageInboxProjectionSize :: Maybe Int -- ^ + , pageInboxProjectionNumber :: Maybe Int -- ^ + , pageInboxProjectionSort :: Maybe SortObject -- ^ + , pageInboxProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageInboxProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageInboxProjection") +instance ToJSON PageInboxProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageInboxProjection") + + +-- | Paginated inbox replier results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageInboxReplierDto = PageInboxReplierDto + { pageInboxReplierDtoContent :: Maybe [InboxReplierDto] -- ^ + , pageInboxReplierDtoPageable :: Maybe PageableObject -- ^ + , pageInboxReplierDtoTotalPages :: Int -- ^ + , pageInboxReplierDtoTotalElements :: Integer -- ^ + , pageInboxReplierDtoLast :: Maybe Bool -- ^ + , pageInboxReplierDtoNumberOfElements :: Maybe Int -- ^ + , pageInboxReplierDtoFirst :: Maybe Bool -- ^ + , pageInboxReplierDtoSize :: Maybe Int -- ^ + , pageInboxReplierDtoNumber :: Maybe Int -- ^ + , pageInboxReplierDtoSort :: Maybe SortObject -- ^ + , pageInboxReplierDtoEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageInboxReplierDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageInboxReplierDto") +instance ToJSON PageInboxReplierDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageInboxReplierDto") + + +-- | Paginated inbox replier events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageInboxReplierEvents = PageInboxReplierEvents + { pageInboxReplierEventsContent :: Maybe [InboxReplierEventProjection] -- ^ + , pageInboxReplierEventsPageable :: Maybe PageableObject -- ^ + , pageInboxReplierEventsTotalPages :: Int -- ^ + , pageInboxReplierEventsTotalElements :: Integer -- ^ + , pageInboxReplierEventsLast :: Maybe Bool -- ^ + , pageInboxReplierEventsNumberOfElements :: Maybe Int -- ^ + , pageInboxReplierEventsFirst :: Maybe Bool -- ^ + , pageInboxReplierEventsSize :: Maybe Int -- ^ + , pageInboxReplierEventsNumber :: Maybe Int -- ^ + , pageInboxReplierEventsSort :: Maybe SortObject -- ^ + , pageInboxReplierEventsEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageInboxReplierEvents where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageInboxReplierEvents") +instance ToJSON PageInboxReplierEvents where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageInboxReplierEvents") + + +-- | Paginated inbox ruleset results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageInboxRulesetDto = PageInboxRulesetDto + { pageInboxRulesetDtoContent :: Maybe [InboxRulesetDto] -- ^ + , pageInboxRulesetDtoPageable :: Maybe PageableObject -- ^ + , pageInboxRulesetDtoTotalPages :: Int -- ^ + , pageInboxRulesetDtoTotalElements :: Integer -- ^ + , pageInboxRulesetDtoLast :: Maybe Bool -- ^ + , pageInboxRulesetDtoNumberOfElements :: Maybe Int -- ^ + , pageInboxRulesetDtoFirst :: Maybe Bool -- ^ + , pageInboxRulesetDtoSize :: Maybe Int -- ^ + , pageInboxRulesetDtoNumber :: Maybe Int -- ^ + , pageInboxRulesetDtoSort :: Maybe SortObject -- ^ + , pageInboxRulesetDtoEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageInboxRulesetDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageInboxRulesetDto") +instance ToJSON PageInboxRulesetDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageInboxRulesetDto") + + +-- | Paginated list unsubscribe recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageListUnsubscribeRecipients = PageListUnsubscribeRecipients + { pageListUnsubscribeRecipientsContent :: Maybe [ListUnsubscribeRecipientProjection] -- ^ + , pageListUnsubscribeRecipientsPageable :: Maybe PageableObject -- ^ + , pageListUnsubscribeRecipientsTotalPages :: Int -- ^ + , pageListUnsubscribeRecipientsTotalElements :: Integer -- ^ + , pageListUnsubscribeRecipientsLast :: Maybe Bool -- ^ + , pageListUnsubscribeRecipientsNumberOfElements :: Maybe Int -- ^ + , pageListUnsubscribeRecipientsFirst :: Maybe Bool -- ^ + , pageListUnsubscribeRecipientsSize :: Maybe Int -- ^ + , pageListUnsubscribeRecipientsNumber :: Maybe Int -- ^ + , pageListUnsubscribeRecipientsSort :: Maybe SortObject -- ^ + , pageListUnsubscribeRecipientsEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageListUnsubscribeRecipients where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageListUnsubscribeRecipients") +instance ToJSON PageListUnsubscribeRecipients where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageListUnsubscribeRecipients") + + +-- | Paginated MissedEmail results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageMissedEmailProjection = PageMissedEmailProjection + { pageMissedEmailProjectionContent :: Maybe [MissedEmailProjection] -- ^ + , pageMissedEmailProjectionPageable :: Maybe PageableObject -- ^ + , pageMissedEmailProjectionTotalPages :: Int -- ^ + , pageMissedEmailProjectionTotalElements :: Integer -- ^ + , pageMissedEmailProjectionLast :: Maybe Bool -- ^ + , pageMissedEmailProjectionNumberOfElements :: Maybe Int -- ^ + , pageMissedEmailProjectionFirst :: Maybe Bool -- ^ + , pageMissedEmailProjectionSize :: Maybe Int -- ^ + , pageMissedEmailProjectionNumber :: Maybe Int -- ^ + , pageMissedEmailProjectionSort :: Maybe SortObject -- ^ + , pageMissedEmailProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageMissedEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageMissedEmailProjection") +instance ToJSON PageMissedEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageMissedEmailProjection") + + +-- | Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageOrganizationInboxProjection = PageOrganizationInboxProjection + { pageOrganizationInboxProjectionContent :: Maybe [OrganizationInboxProjection] -- ^ + , pageOrganizationInboxProjectionPageable :: Maybe PageableObject -- ^ + , pageOrganizationInboxProjectionTotalPages :: Int -- ^ + , pageOrganizationInboxProjectionTotalElements :: Integer -- ^ + , pageOrganizationInboxProjectionLast :: Maybe Bool -- ^ + , pageOrganizationInboxProjectionNumberOfElements :: Maybe Int -- ^ + , pageOrganizationInboxProjectionFirst :: Maybe Bool -- ^ + , pageOrganizationInboxProjectionSize :: Maybe Int -- ^ + , pageOrganizationInboxProjectionNumber :: Maybe Int -- ^ + , pageOrganizationInboxProjectionSort :: Maybe SortObject -- ^ + , pageOrganizationInboxProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageOrganizationInboxProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageOrganizationInboxProjection") +instance ToJSON PageOrganizationInboxProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageOrganizationInboxProjection") + + +-- | Paginated phone numbers. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PagePhoneNumberProjection = PagePhoneNumberProjection + { pagePhoneNumberProjectionContent :: Maybe [PhoneNumberProjection] -- ^ + , pagePhoneNumberProjectionPageable :: Maybe PageableObject -- ^ + , pagePhoneNumberProjectionTotalPages :: Int -- ^ + , pagePhoneNumberProjectionTotalElements :: Integer -- ^ + , pagePhoneNumberProjectionLast :: Maybe Bool -- ^ + , pagePhoneNumberProjectionNumberOfElements :: Maybe Int -- ^ + , pagePhoneNumberProjectionFirst :: Maybe Bool -- ^ + , pagePhoneNumberProjectionSize :: Maybe Int -- ^ + , pagePhoneNumberProjectionNumber :: Maybe Int -- ^ + , pagePhoneNumberProjectionSort :: Maybe SortObject -- ^ + , pagePhoneNumberProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PagePhoneNumberProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pagePhoneNumberProjection") +instance ToJSON PagePhoneNumberProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pagePhoneNumberProjection") + + +-- | Paginated scheduled jobs results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageScheduledJobs = PageScheduledJobs + { pageScheduledJobsContent :: Maybe [ScheduledJob] -- ^ + , pageScheduledJobsPageable :: Maybe PageableObject -- ^ + , pageScheduledJobsTotalPages :: Int -- ^ + , pageScheduledJobsTotalElements :: Integer -- ^ + , pageScheduledJobsLast :: Maybe Bool -- ^ + , pageScheduledJobsNumberOfElements :: Maybe Int -- ^ + , pageScheduledJobsFirst :: Maybe Bool -- ^ + , pageScheduledJobsSize :: Maybe Int -- ^ + , pageScheduledJobsNumber :: Maybe Int -- ^ + , pageScheduledJobsSort :: Maybe SortObject -- ^ + , pageScheduledJobsEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageScheduledJobs where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageScheduledJobs") +instance ToJSON PageScheduledJobs where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageScheduledJobs") + + +-- | Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. +data PageSentEmailProjection = PageSentEmailProjection + { pageSentEmailProjectionContent :: Maybe [SentEmailProjection] -- ^ + , pageSentEmailProjectionPageable :: Maybe PageableObject -- ^ + , pageSentEmailProjectionTotalPages :: Int -- ^ + , pageSentEmailProjectionTotalElements :: Integer -- ^ + , pageSentEmailProjectionLast :: Maybe Bool -- ^ + , pageSentEmailProjectionNumberOfElements :: Maybe Int -- ^ + , pageSentEmailProjectionFirst :: Maybe Bool -- ^ + , pageSentEmailProjectionSize :: Maybe Int -- ^ + , pageSentEmailProjectionNumber :: Maybe Int -- ^ + , pageSentEmailProjectionSort :: Maybe SortObject -- ^ + , pageSentEmailProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageSentEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageSentEmailProjection") +instance ToJSON PageSentEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageSentEmailProjection") + + +-- | Paginated sent email results for emails sent with queue. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. +data PageSentEmailWithQueueProjection = PageSentEmailWithQueueProjection + { pageSentEmailWithQueueProjectionContent :: Maybe [SendWithQueueResult] -- ^ + , pageSentEmailWithQueueProjectionPageable :: Maybe PageableObject -- ^ + , pageSentEmailWithQueueProjectionTotalPages :: Int -- ^ + , pageSentEmailWithQueueProjectionTotalElements :: Integer -- ^ + , pageSentEmailWithQueueProjectionLast :: Maybe Bool -- ^ + , pageSentEmailWithQueueProjectionNumberOfElements :: Maybe Int -- ^ + , pageSentEmailWithQueueProjectionFirst :: Maybe Bool -- ^ + , pageSentEmailWithQueueProjectionSize :: Maybe Int -- ^ + , pageSentEmailWithQueueProjectionNumber :: Maybe Int -- ^ + , pageSentEmailWithQueueProjectionSort :: Maybe SortObject -- ^ + , pageSentEmailWithQueueProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageSentEmailWithQueueProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageSentEmailWithQueueProjection") +instance ToJSON PageSentEmailWithQueueProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageSentEmailWithQueueProjection") + + +-- | Paginated SMS messages. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageSmsProjection = PageSmsProjection + { pageSmsProjectionContent :: Maybe [SmsProjection] -- ^ + , pageSmsProjectionPageable :: Maybe PageableObject -- ^ + , pageSmsProjectionTotalPages :: Int -- ^ + , pageSmsProjectionTotalElements :: Integer -- ^ + , pageSmsProjectionLast :: Maybe Bool -- ^ + , pageSmsProjectionNumberOfElements :: Maybe Int -- ^ + , pageSmsProjectionFirst :: Maybe Bool -- ^ + , pageSmsProjectionSize :: Maybe Int -- ^ + , pageSmsProjectionNumber :: Maybe Int -- ^ + , pageSmsProjectionSort :: Maybe SortObject -- ^ + , pageSmsProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageSmsProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageSmsProjection") +instance ToJSON PageSmsProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageSmsProjection") + + +-- | Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageTemplateProjection = PageTemplateProjection + { pageTemplateProjectionContent :: Maybe [TemplateProjection] -- ^ + , pageTemplateProjectionPageable :: Maybe PageableObject -- ^ + , pageTemplateProjectionTotalPages :: Int -- ^ + , pageTemplateProjectionTotalElements :: Integer -- ^ + , pageTemplateProjectionLast :: Maybe Bool -- ^ + , pageTemplateProjectionNumberOfElements :: Maybe Int -- ^ + , pageTemplateProjectionFirst :: Maybe Bool -- ^ + , pageTemplateProjectionSize :: Maybe Int -- ^ + , pageTemplateProjectionNumber :: Maybe Int -- ^ + , pageTemplateProjectionSort :: Maybe SortObject -- ^ + , pageTemplateProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageTemplateProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageTemplateProjection") +instance ToJSON PageTemplateProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageTemplateProjection") + + +-- | Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. +data PageThreadProjection = PageThreadProjection + { pageThreadProjectionContent :: Maybe [ThreadProjection] -- ^ + , pageThreadProjectionPageable :: Maybe PageableObject -- ^ + , pageThreadProjectionTotalPages :: Int -- ^ + , pageThreadProjectionTotalElements :: Integer -- ^ + , pageThreadProjectionLast :: Maybe Bool -- ^ + , pageThreadProjectionNumberOfElements :: Maybe Int -- ^ + , pageThreadProjectionFirst :: Maybe Bool -- ^ + , pageThreadProjectionSize :: Maybe Int -- ^ + , pageThreadProjectionNumber :: Maybe Int -- ^ + , pageThreadProjectionSort :: Maybe SortObject -- ^ + , pageThreadProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageThreadProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageThreadProjection") +instance ToJSON PageThreadProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageThreadProjection") + + +-- | Paginated TrackingPixel results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageTrackingPixelProjection = PageTrackingPixelProjection + { pageTrackingPixelProjectionContent :: Maybe [TrackingPixelProjection] -- ^ + , pageTrackingPixelProjectionPageable :: Maybe PageableObject -- ^ + , pageTrackingPixelProjectionTotalPages :: Int -- ^ + , pageTrackingPixelProjectionTotalElements :: Integer -- ^ + , pageTrackingPixelProjectionLast :: Maybe Bool -- ^ + , pageTrackingPixelProjectionNumberOfElements :: Maybe Int -- ^ + , pageTrackingPixelProjectionFirst :: Maybe Bool -- ^ + , pageTrackingPixelProjectionSize :: Maybe Int -- ^ + , pageTrackingPixelProjectionNumber :: Maybe Int -- ^ + , pageTrackingPixelProjectionSort :: Maybe SortObject -- ^ + , pageTrackingPixelProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageTrackingPixelProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageTrackingPixelProjection") +instance ToJSON PageTrackingPixelProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageTrackingPixelProjection") + + +-- | Paginated unknown MissedEmail results. Unknown missed emails are emails that were sent to MailSlurp /Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageUnknownMissedEmailProjection = PageUnknownMissedEmailProjection + { pageUnknownMissedEmailProjectionContent :: Maybe [UnknownMissedEmailProjection] -- ^ + , pageUnknownMissedEmailProjectionPageable :: Maybe PageableObject -- ^ + , pageUnknownMissedEmailProjectionTotalPages :: Int -- ^ + , pageUnknownMissedEmailProjectionTotalElements :: Integer -- ^ + , pageUnknownMissedEmailProjectionLast :: Maybe Bool -- ^ + , pageUnknownMissedEmailProjectionNumberOfElements :: Maybe Int -- ^ + , pageUnknownMissedEmailProjectionFirst :: Maybe Bool -- ^ + , pageUnknownMissedEmailProjectionSize :: Maybe Int -- ^ + , pageUnknownMissedEmailProjectionNumber :: Maybe Int -- ^ + , pageUnknownMissedEmailProjectionSort :: Maybe SortObject -- ^ + , pageUnknownMissedEmailProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageUnknownMissedEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageUnknownMissedEmailProjection") +instance ToJSON PageUnknownMissedEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageUnknownMissedEmailProjection") + + +-- | Paginated webhook entity. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageWebhookProjection = PageWebhookProjection + { pageWebhookProjectionContent :: Maybe [WebhookProjection] -- ^ + , pageWebhookProjectionPageable :: Maybe PageableObject -- ^ + , pageWebhookProjectionTotalPages :: Int -- ^ + , pageWebhookProjectionTotalElements :: Integer -- ^ + , pageWebhookProjectionLast :: Maybe Bool -- ^ + , pageWebhookProjectionNumberOfElements :: Maybe Int -- ^ + , pageWebhookProjectionFirst :: Maybe Bool -- ^ + , pageWebhookProjectionSize :: Maybe Int -- ^ + , pageWebhookProjectionNumber :: Maybe Int -- ^ + , pageWebhookProjectionSort :: Maybe SortObject -- ^ + , pageWebhookProjectionEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageWebhookProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageWebhookProjection") +instance ToJSON PageWebhookProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageWebhookProjection") + + +-- | Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +data PageWebhookResult = PageWebhookResult + { pageWebhookResultContent :: Maybe [WebhookResultDto] -- ^ + , pageWebhookResultPageable :: Maybe PageableObject -- ^ + , pageWebhookResultTotalPages :: Int -- ^ + , pageWebhookResultTotalElements :: Integer -- ^ + , pageWebhookResultLast :: Maybe Bool -- ^ + , pageWebhookResultNumberOfElements :: Maybe Int -- ^ + , pageWebhookResultFirst :: Maybe Bool -- ^ + , pageWebhookResultSize :: Maybe Int -- ^ + , pageWebhookResultNumber :: Maybe Int -- ^ + , pageWebhookResultSort :: Maybe SortObject -- ^ + , pageWebhookResultEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageWebhookResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageWebhookResult") +instance ToJSON PageWebhookResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageWebhookResult") + + +-- | +data PageableObject = PageableObject + { pageableObjectPageNumber :: Maybe Int -- ^ + , pageableObjectPageSize :: Maybe Int -- ^ + , pageableObjectUnpaged :: Maybe Bool -- ^ + , pageableObjectPaged :: Maybe Bool -- ^ + , pageableObjectOffset :: Maybe Integer -- ^ + , pageableObjectSort :: Maybe SortObject -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PageableObject where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "pageableObject") +instance ToJSON PageableObject where + toJSON = genericToJSON (removeFieldLabelPrefix False "pageableObject") + + +-- | +data PhoneNumberDto = PhoneNumberDto + { phoneNumberDtoId :: UUID -- ^ + , phoneNumberDtoUserId :: UUID -- ^ + , phoneNumberDtoComplianceAddress :: Maybe UUID -- ^ + , phoneNumberDtoEmergencyAddress :: Maybe UUID -- ^ + , phoneNumberDtoPhoneNumber :: Text -- ^ + , phoneNumberDtoPhoneCountry :: Text -- ^ + , phoneNumberDtoPhonePlan :: UUID -- ^ + , phoneNumberDtoCreatedAt :: UTCTime -- ^ + , phoneNumberDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PhoneNumberDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "phoneNumberDto") +instance ToJSON PhoneNumberDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "phoneNumberDto") + + +-- | Phone number projection +data PhoneNumberProjection = PhoneNumberProjection + { phoneNumberProjectionUserId :: UUID -- ^ + , phoneNumberProjectionPhoneNumber :: Text -- ^ + , phoneNumberProjectionPhoneCountry :: Text -- ^ + , phoneNumberProjectionCreatedAt :: UTCTime -- ^ + , phoneNumberProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PhoneNumberProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "phoneNumberProjection") +instance ToJSON PhoneNumberProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "phoneNumberProjection") + + +-- | +data PhonePlanDto = PhonePlanDto + { phonePlanDtoId :: UUID -- ^ + , phonePlanDtoUserId :: UUID -- ^ + , phonePlanDtoPhoneCountry :: Text -- ^ + , phonePlanDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON PhonePlanDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "phonePlanDto") +instance ToJSON PhonePlanDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "phonePlanDto") + + +-- | Content in raw format +data RawEmailJson = RawEmailJson + { rawEmailJsonContent :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON RawEmailJson where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "rawEmailJson") +instance ToJSON RawEmailJson where + toJSON = genericToJSON (removeFieldLabelPrefix False "rawEmailJson") + + +-- | Email recipient +data Recipient = Recipient + { recipientRawValue :: Text -- ^ + , recipientEmailAddress :: Text -- ^ + , recipientName :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON Recipient where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "recipient") +instance ToJSON Recipient where + toJSON = genericToJSON (removeFieldLabelPrefix False "recipient") + + +-- | +data ReplyForSms = ReplyForSms + { replyForSmsReply :: Maybe SentSmsDto -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ReplyForSms where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "replyForSms") +instance ToJSON ReplyForSms where + toJSON = genericToJSON (removeFieldLabelPrefix False "replyForSms") + + +-- | Options for replying to an alias email using the alias inbox +data ReplyToAliasEmailOptions = ReplyToAliasEmailOptions + { replyToAliasEmailOptionsBody :: Text -- ^ Body of the reply email you want to send + , replyToAliasEmailOptionsIsHTML :: Bool -- ^ Is the reply HTML + , replyToAliasEmailOptionsCharset :: Maybe Text -- ^ The charset that your message should be sent with. Optional. Default is UTF-8 + , replyToAliasEmailOptionsAttachments :: Maybe [Text] -- ^ List of uploaded attachments to send with the reply. Optional. + , replyToAliasEmailOptionsTemplateVariables :: Maybe (Map.Map String Value) -- ^ Template variables if using a template + , replyToAliasEmailOptionsTemplate :: Maybe UUID -- ^ Template ID to use instead of body. Will use template variable map to fill defined variable slots. + , replyToAliasEmailOptionsSendStrategy :: Maybe Text -- ^ How an email should be sent based on its recipients + , replyToAliasEmailOptionsCustomHeaders :: Maybe (Map.Map String Text) -- ^ Optional custom headers + , replyToAliasEmailOptionsUseInboxName :: Maybe Bool -- ^ Optionally use inbox name as display name for sender email address + , replyToAliasEmailOptionsHtml :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ReplyToAliasEmailOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "replyToAliasEmailOptions") +instance ToJSON ReplyToAliasEmailOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "replyToAliasEmailOptions") + + +-- | Options for replying to email with API +data ReplyToEmailOptions = ReplyToEmailOptions + { replyToEmailOptionsBody :: Text -- ^ Body of the reply email you want to send + , replyToEmailOptionsIsHTML :: Bool -- ^ Is the reply HTML + , replyToEmailOptionsFrom :: Maybe Text -- ^ The from header that should be used. Optional + , replyToEmailOptionsReplyTo :: Maybe Text -- ^ The replyTo header that should be used. Optional + , replyToEmailOptionsCustomHeaders :: Maybe (Map.Map String Text) -- ^ Optional custom headers + , replyToEmailOptionsCharset :: Maybe Text -- ^ The charset that your message should be sent with. Optional. Default is UTF-8 + , replyToEmailOptionsAttachments :: Maybe [Text] -- ^ List of uploaded attachments to send with the reply. Optional. + , replyToEmailOptionsTemplateVariables :: Maybe (Map.Map String Value) -- ^ Template variables if using a template + , replyToEmailOptionsTemplate :: Maybe UUID -- ^ Template ID to use instead of body. Will use template variable map to fill defined variable slots. + , replyToEmailOptionsSendStrategy :: Maybe Text -- ^ How an email should be sent based on its recipients + , replyToEmailOptionsUseInboxName :: Maybe Bool -- ^ Optionally use inbox name as display name for sender email address + , replyToEmailOptionsHtml :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ReplyToEmailOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "replyToEmailOptions") +instance ToJSON ReplyToEmailOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "replyToEmailOptions") + + +-- | +data ScheduledJob = ScheduledJob + { scheduledJobId :: UUID -- ^ + , scheduledJobUserId :: UUID -- ^ + , scheduledJobInboxId :: UUID -- ^ + , scheduledJobJobId :: Text -- ^ + , scheduledJobGroupId :: Text -- ^ + , scheduledJobTriggerId :: Text -- ^ + , scheduledJobStatus :: Text -- ^ + , scheduledJobSendAtTimestamp :: UTCTime -- ^ + , scheduledJobCreatedAt :: UTCTime -- ^ + , scheduledJobUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ScheduledJob where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "scheduledJob") +instance ToJSON ScheduledJob where + toJSON = genericToJSON (removeFieldLabelPrefix False "scheduledJob") + + +-- | +data ScheduledJobDto = ScheduledJobDto + { scheduledJobDtoId :: UUID -- ^ + , scheduledJobDtoUserId :: UUID -- ^ + , scheduledJobDtoInboxId :: UUID -- ^ + , scheduledJobDtoJobId :: Text -- ^ + , scheduledJobDtoGroupId :: Text -- ^ + , scheduledJobDtoTriggerId :: Text -- ^ + , scheduledJobDtoStatus :: Text -- ^ + , scheduledJobDtoSendAtTimestamp :: UTCTime -- ^ + , scheduledJobDtoCreatedAt :: UTCTime -- ^ + , scheduledJobDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ScheduledJobDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "scheduledJobDto") +instance ToJSON ScheduledJobDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "scheduledJobDto") + + +-- | +data SearchEmailsOptions = SearchEmailsOptions + { searchEmailsOptionsInboxIds :: Maybe [UUID] -- ^ Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. + , searchEmailsOptionsPageIndex :: Maybe Int -- ^ Optional page index in email list pagination + , searchEmailsOptionsPageSize :: Maybe Int -- ^ Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results + , searchEmailsOptionsSortDirection :: Maybe Text -- ^ Optional createdAt sort direction ASC or DESC + , searchEmailsOptionsUnreadOnly :: Maybe Bool -- ^ Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly + , searchEmailsOptionsSearchFilter :: Maybe Text -- ^ Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body + , searchEmailsOptionsSince :: Maybe UTCTime -- ^ Optional filter emails received after given date time + , searchEmailsOptionsBefore :: Maybe UTCTime -- ^ Optional filter emails received before given date time + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SearchEmailsOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "searchEmailsOptions") +instance ToJSON SearchEmailsOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "searchEmailsOptions") + + +-- | +data SearchInboxesOptions = SearchInboxesOptions + { searchInboxesOptionsPageIndex :: Maybe Int -- ^ Optional page index in list pagination + , searchInboxesOptionsPageSize :: Maybe Int -- ^ Optional page size in list pagination + , searchInboxesOptionsSortDirection :: Maybe Text -- ^ Optional createdAt sort direction ASC or DESC + , searchInboxesOptionsFavourite :: Maybe Bool -- ^ Optionally filter results for favourites only + , searchInboxesOptionsSearch :: Maybe Text -- ^ Optionally filter by search words partial matching ID, tags, name, and email address + , searchInboxesOptionsTag :: Maybe Text -- ^ Optionally filter by tags. Will return inboxes that include given tags + , searchInboxesOptionsSince :: Maybe UTCTime -- ^ Optional filter by created after given date time + , searchInboxesOptionsBefore :: Maybe UTCTime -- ^ Optional filter by created before given date time + , searchInboxesOptionsInboxType :: Maybe Text -- ^ Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). + , searchInboxesOptionsInboxFunction :: Maybe Text -- ^ Optional filter by inbox function + , searchInboxesOptionsDomainId :: Maybe UUID -- ^ Optional domain ID filter + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SearchInboxesOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "searchInboxesOptions") +instance ToJSON SearchInboxesOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "searchInboxesOptions") + + +-- | Email body content parts for multipart mime message. Will override body. +data SendEmailBodyPart = SendEmailBodyPart + { sendEmailBodyPartContentType :: Text -- ^ + , sendEmailBodyPartContentBody :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SendEmailBodyPart where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sendEmailBodyPart") +instance ToJSON SendEmailBodyPart where + toJSON = genericToJSON (removeFieldLabelPrefix False "sendEmailBodyPart") + + +-- | Options for the email to be sent +data SendEmailOptions = SendEmailOptions + { sendEmailOptionsToContacts :: Maybe [UUID] -- ^ Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. + , sendEmailOptionsToGroup :: Maybe UUID -- ^ Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients + , sendEmailOptionsTo :: Maybe [Text] -- ^ List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. + , sendEmailOptionsFrom :: Maybe Text -- ^ Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox `). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name `. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. + , sendEmailOptionsCc :: Maybe [Text] -- ^ Optional list of cc destination email addresses + , sendEmailOptionsBcc :: Maybe [Text] -- ^ Optional list of bcc destination email addresses + , sendEmailOptionsSubject :: Maybe Text -- ^ Optional email subject line + , sendEmailOptionsReplyTo :: Maybe Text -- ^ Optional replyTo header + , sendEmailOptionsCustomHeaders :: Maybe (Map.Map String Text) -- ^ Optional custom headers + , sendEmailOptionsBody :: Maybe Text -- ^ Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. + , sendEmailOptionsHtml :: Maybe Bool -- ^ Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) + , sendEmailOptionsIsHTML :: Maybe Bool -- ^ Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients + , sendEmailOptionsCharset :: Maybe Text -- ^ Optional charset + , sendEmailOptionsAttachments :: Maybe [Text] -- ^ Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. + , sendEmailOptionsTemplateVariables :: Maybe (Map.Map String Value) -- ^ Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. + , sendEmailOptionsTemplate :: Maybe UUID -- ^ Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. + , sendEmailOptionsSendStrategy :: Maybe Text -- ^ How an email should be sent based on its recipients + , sendEmailOptionsUseInboxName :: Maybe Bool -- ^ Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name ` if the inbox has a name. + , sendEmailOptionsAddTrackingPixel :: Maybe Bool -- ^ Add tracking pixel to email + , sendEmailOptionsFilterBouncedRecipients :: Maybe Bool -- ^ Filter recipients to remove any bounced recipients from to, bcc, and cc before sending + , sendEmailOptionsValidateEmailAddresses :: Maybe Text -- ^ Validate recipient email addresses before sending + , sendEmailOptionsIgnoreEmptyRecipients :: Maybe Bool -- ^ Ignore empty recipients after validation removes all recipients as invalid and fail silently + , sendEmailOptionsIsXAmpHtml :: Maybe Bool -- ^ Is content AMP4EMAIL compatible. If set will send as x-amp-html part. + , sendEmailOptionsBodyParts :: Maybe [SendEmailBodyPart] -- ^ Email body content parts for multipart mime message. Will override body. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SendEmailOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sendEmailOptions") +instance ToJSON SendEmailOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "sendEmailOptions") + + +-- | Options for the email envelope +data SendSMTPEnvelopeOptions = SendSMTPEnvelopeOptions + { sendSMTPEnvelopeOptionsRcptTo :: [Text] -- ^ + , sendSMTPEnvelopeOptionsMailFrom :: Text -- ^ + , sendSMTPEnvelopeOptionsData :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SendSMTPEnvelopeOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sendSMTPEnvelopeOptions") +instance ToJSON SendSMTPEnvelopeOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "sendSMTPEnvelopeOptions") + + +-- | +data SendWithQueueResult = SendWithQueueResult + { sendWithQueueResultId :: UUID -- ^ + , sendWithQueueResultUserId :: UUID -- ^ + , sendWithQueueResultSubject :: Maybe Text -- ^ + , sendWithQueueResultInboxId :: Maybe UUID -- ^ + , sendWithQueueResultHeaderId :: Text -- ^ + , sendWithQueueResultDelivered :: Bool -- ^ + , sendWithQueueResultExceptionName :: Maybe Text -- ^ + , sendWithQueueResultMessage :: Maybe Text -- ^ + , sendWithQueueResultCreatedAt :: UTCTime -- ^ + , sendWithQueueResultUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SendWithQueueResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sendWithQueueResult") +instance ToJSON SendWithQueueResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "sendWithQueueResult") + + +-- | Sender object containing from email address and from personal name if provided in address +data Sender = Sender + { senderRawValue :: Text -- ^ + , senderEmailAddress :: Text -- ^ + , senderName :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON Sender where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sender") +instance ToJSON Sender where + toJSON = genericToJSON (removeFieldLabelPrefix False "sender") + + +-- | Sent email details +data SentEmailDto = SentEmailDto + { sentEmailDtoId :: UUID -- ^ ID of sent email + , sentEmailDtoUserId :: UUID -- ^ User ID + , sentEmailDtoInboxId :: UUID -- ^ Inbox ID email was sent from + , sentEmailDtoDomainId :: Maybe UUID -- ^ Domain ID + , sentEmailDtoTo :: Maybe [Text] -- ^ Recipients email was sent to + , sentEmailDtoFrom :: Maybe Text -- ^ Sent from address + , sentEmailDtoReplyTo :: Maybe Text -- ^ + , sentEmailDtoCc :: Maybe [Text] -- ^ + , sentEmailDtoBcc :: Maybe [Text] -- ^ + , sentEmailDtoAttachments :: Maybe [Text] -- ^ Array of IDs of attachments that were sent with this email + , sentEmailDtoSubject :: Maybe Text -- ^ + , sentEmailDtoBodyMD5Hash :: Maybe Text -- ^ MD5 Hash + , sentEmailDtoBody :: Maybe Text -- ^ Sent email body + , sentEmailDtoToContacts :: Maybe [UUID] -- ^ + , sentEmailDtoToGroup :: Maybe UUID -- ^ + , sentEmailDtoCharset :: Maybe Text -- ^ + , sentEmailDtoIsHTML :: Maybe Bool -- ^ + , sentEmailDtoSentAt :: UTCTime -- ^ + , sentEmailDtoPixelIds :: Maybe [UUID] -- ^ + , sentEmailDtoMessageId :: Maybe Text -- ^ + , sentEmailDtoMessageIds :: Maybe [Text] -- ^ + , sentEmailDtoVirtualSend :: Maybe Bool -- ^ + , sentEmailDtoTemplateId :: Maybe UUID -- ^ + , sentEmailDtoTemplateVariables :: Maybe (Map.Map String Value) -- ^ + , sentEmailDtoHeaders :: Maybe (Map.Map String Text) -- ^ + , sentEmailDtoHtml :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SentEmailDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sentEmailDto") +instance ToJSON SentEmailDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "sentEmailDto") + + +-- | +data SentEmailProjection = SentEmailProjection + { sentEmailProjectionId :: UUID -- ^ + , sentEmailProjectionFrom :: Maybe Text -- ^ + , sentEmailProjectionSubject :: Maybe Text -- ^ + , sentEmailProjectionUserId :: UUID -- ^ + , sentEmailProjectionInboxId :: UUID -- ^ + , sentEmailProjectionAttachments :: [Text] -- ^ + , sentEmailProjectionTo :: [Text] -- ^ + , sentEmailProjectionBcc :: [Text] -- ^ + , sentEmailProjectionCc :: [Text] -- ^ + , sentEmailProjectionCreatedAt :: UTCTime -- ^ + , sentEmailProjectionBodyMD5Hash :: Maybe Text -- ^ + , sentEmailProjectionVirtualSend :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SentEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sentEmailProjection") +instance ToJSON SentEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "sentEmailProjection") + + +-- | +data SentSmsDto = SentSmsDto + { sentSmsDtoId :: UUID -- ^ + , sentSmsDtoUserId :: UUID -- ^ + , sentSmsDtoPhoneNumber :: UUID -- ^ + , sentSmsDtoFromNumber :: Text -- ^ + , sentSmsDtoToNumber :: Text -- ^ + , sentSmsDtoBody :: Text -- ^ + , sentSmsDtoSid :: Text -- ^ + , sentSmsDtoReplyToSid :: Text -- ^ + , sentSmsDtoReplyToId :: UUID -- ^ + , sentSmsDtoCreatedAt :: UTCTime -- ^ + , sentSmsDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SentSmsDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sentSmsDto") +instance ToJSON SentSmsDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "sentSmsDto") + + +-- | Options for setting inbox favourite state +data SetInboxFavouritedOptions = SetInboxFavouritedOptions + { setInboxFavouritedOptionsState :: Bool -- ^ Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SetInboxFavouritedOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "setInboxFavouritedOptions") +instance ToJSON SetInboxFavouritedOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "setInboxFavouritedOptions") + + +-- | Simplified send email options +data SimpleSendEmailOptions = SimpleSendEmailOptions + { simpleSendEmailOptionsSenderId :: Maybe UUID -- ^ ID of inbox to send from. If null an inbox will be created for sending + , simpleSendEmailOptionsTo :: Text -- ^ Email address to send to + , simpleSendEmailOptionsBody :: Maybe Text -- ^ Body of the email message. Supports HTML + , simpleSendEmailOptionsSubject :: Maybe Text -- ^ Subject line of the email + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SimpleSendEmailOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "simpleSendEmailOptions") +instance ToJSON SimpleSendEmailOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "simpleSendEmailOptions") + + +-- | +data SmsDto = SmsDto + { smsDtoId :: UUID -- ^ + , smsDtoUserId :: UUID -- ^ + , smsDtoPhoneNumber :: UUID -- ^ + , smsDtoFromNumber :: Text -- ^ + , smsDtoBody :: Text -- ^ + , smsDtoRead :: Bool -- ^ + , smsDtoCreatedAt :: UTCTime -- ^ + , smsDtoUpdatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SmsDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "smsDto") +instance ToJSON SmsDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "smsDto") + + +-- | Options for matching SMS messages in a phone number. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `BODY` should `CONTAIN` value. +data SmsMatchOption = SmsMatchOption + { smsMatchOptionField :: Text -- ^ Fields of an SMS object that can be used to filter results + , smsMatchOptionShould :: Text -- ^ How the value of the email field specified should be compared to the value given in the match options. + , smsMatchOptionValue :: Text -- ^ The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SmsMatchOption where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "smsMatchOption") +instance ToJSON SmsMatchOption where + toJSON = genericToJSON (removeFieldLabelPrefix False "smsMatchOption") + + +-- | +data SmsPreview = SmsPreview + { smsPreviewId :: UUID -- ^ + , smsPreviewUserId :: UUID -- ^ + , smsPreviewBody :: Text -- ^ + , smsPreviewPhoneNumber :: UUID -- ^ + , smsPreviewFromNumber :: Text -- ^ + , smsPreviewCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SmsPreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "smsPreview") +instance ToJSON SmsPreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "smsPreview") + + +-- | SMS projection +data SmsProjection = SmsProjection + { smsProjectionUserId :: UUID -- ^ + , smsProjectionPhoneNumber :: UUID -- ^ + , smsProjectionFromNumber :: Text -- ^ + , smsProjectionRead :: Bool -- ^ + , smsProjectionBody :: Text -- ^ + , smsProjectionCreatedAt :: UTCTime -- ^ + , smsProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SmsProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "smsProjection") +instance ToJSON SmsProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "smsProjection") + + +-- | +data SmsReplyOptions = SmsReplyOptions + { smsReplyOptionsBody :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SmsReplyOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "smsReplyOptions") +instance ToJSON SmsReplyOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "smsReplyOptions") + + +-- | Access details for inbox using SMTP +data SmtpAccessDetails = SmtpAccessDetails + { smtpAccessDetailsSecureSmtpServerHost :: Text -- ^ Secure TLS SMTP server host domain + , smtpAccessDetailsSecureSmtpServerPort :: Int -- ^ Secure TLS SMTP server host port + , smtpAccessDetailsSecureSmtpUsername :: Text -- ^ Secure TLS SMTP username for login + , smtpAccessDetailsSecureSmtpPassword :: Text -- ^ Secure TLS SMTP password for login + , smtpAccessDetailsSmtpServerHost :: Text -- ^ SMTP server host domain + , smtpAccessDetailsSmtpServerPort :: Int -- ^ SMTP server host port + , smtpAccessDetailsSmtpUsername :: Text -- ^ SMTP username for login + , smtpAccessDetailsSmtpPassword :: Text -- ^ SMTP password for login + , smtpAccessDetailsMailFromDomain :: Maybe Text -- ^ Mail from domain or SMTP HELO value + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SmtpAccessDetails where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "smtpAccessDetails") +instance ToJSON SmtpAccessDetails where + toJSON = genericToJSON (removeFieldLabelPrefix False "smtpAccessDetails") + + +-- | +data SortObject = SortObject + { sortObjectSorted :: Maybe Bool -- ^ + , sortObjectUnsorted :: Maybe Bool -- ^ + , sortObjectEmpty :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SortObject where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "sortObject") +instance ToJSON SortObject where + toJSON = genericToJSON (removeFieldLabelPrefix False "sortObject") + + +-- | +data SpellingIssue = SpellingIssue + { spellingIssueGroup :: Text -- ^ + , spellingIssueSuggestion :: Text -- ^ + , spellingIssueSeverity :: Text -- ^ + , spellingIssueMessage :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON SpellingIssue where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "spellingIssue") +instance ToJSON SpellingIssue where + toJSON = genericToJSON (removeFieldLabelPrefix False "spellingIssue") + + +-- | Email template +data TemplateDto = TemplateDto + { templateDtoId :: UUID -- ^ ID of template + , templateDtoName :: Text -- ^ Template name + , templateDtoVariables :: [TemplateVariable] -- ^ Variables available in template that can be replaced with values + , templateDtoContent :: Text -- ^ Content of the template + , templateDtoCreatedAt :: UTCTime -- ^ Created at time + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TemplateDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "templateDto") +instance ToJSON TemplateDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "templateDto") + + +-- | +data TemplatePreview = TemplatePreview + { templatePreviewPreview :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TemplatePreview where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "templatePreview") +instance ToJSON TemplatePreview where + toJSON = genericToJSON (removeFieldLabelPrefix False "templatePreview") + + +-- | Email template data +data TemplateProjection = TemplateProjection + { templateProjectionVariables :: [Text] -- ^ + , templateProjectionCreatedAt :: UTCTime -- ^ + , templateProjectionUpdatedAt :: UTCTime -- ^ + , templateProjectionName :: Text -- ^ + , templateProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TemplateProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "templateProjection") +instance ToJSON TemplateProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "templateProjection") + + +-- | Variable for use with email template +data TemplateVariable = TemplateVariable + { templateVariableName :: Text -- ^ Name of variable. This can be used in a template as {{name}} + , templateVariableVariableType :: Text -- ^ The type of variable + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TemplateVariable where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "templateVariable") +instance ToJSON TemplateVariable where + toJSON = genericToJSON (removeFieldLabelPrefix False "templateVariable") + + +-- | Test options for inbox ruleset receiving test +data TestInboxRulesetReceivingOptions = TestInboxRulesetReceivingOptions + { testInboxRulesetReceivingOptionsInboxId :: UUID -- ^ + , testInboxRulesetReceivingOptionsFromSender :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestInboxRulesetReceivingOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testInboxRulesetReceivingOptions") +instance ToJSON TestInboxRulesetReceivingOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "testInboxRulesetReceivingOptions") + + +-- | +data TestInboxRulesetReceivingResult = TestInboxRulesetReceivingResult + { testInboxRulesetReceivingResultCanReceive :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestInboxRulesetReceivingResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testInboxRulesetReceivingResult") +instance ToJSON TestInboxRulesetReceivingResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "testInboxRulesetReceivingResult") + + +-- | Test options for inbox ruleset sending test +data TestInboxRulesetSendingOptions = TestInboxRulesetSendingOptions + { testInboxRulesetSendingOptionsInboxId :: UUID -- ^ + , testInboxRulesetSendingOptionsRecipient :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestInboxRulesetSendingOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testInboxRulesetSendingOptions") +instance ToJSON TestInboxRulesetSendingOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "testInboxRulesetSendingOptions") + + +-- | +data TestInboxRulesetSendingResult = TestInboxRulesetSendingResult + { testInboxRulesetSendingResultCanSend :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestInboxRulesetSendingResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testInboxRulesetSendingResult") +instance ToJSON TestInboxRulesetSendingResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "testInboxRulesetSendingResult") + + +-- | Options for testing new inbox forwarder rules +data TestNewInboxForwarderOptions = TestNewInboxForwarderOptions + { testNewInboxForwarderOptionsInboxForwarderTestOptions :: InboxForwarderTestOptions -- ^ + , testNewInboxForwarderOptionsCreateInboxForwarderOptions :: CreateInboxForwarderOptions -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestNewInboxForwarderOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testNewInboxForwarderOptions") +instance ToJSON TestNewInboxForwarderOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "testNewInboxForwarderOptions") + + +-- | Test inbox ruleset options +data TestNewInboxRulesetOptions = TestNewInboxRulesetOptions + { testNewInboxRulesetOptionsInboxRulesetTestOptions :: InboxRulesetTestOptions -- ^ + , testNewInboxRulesetOptionsCreateInboxRulesetOptions :: CreateInboxRulesetOptions -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestNewInboxRulesetOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testNewInboxRulesetOptions") +instance ToJSON TestNewInboxRulesetOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "testNewInboxRulesetOptions") + + +-- | +data TestPhoneNumberOptions = TestPhoneNumberOptions + { testPhoneNumberOptionsMessage :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TestPhoneNumberOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "testPhoneNumberOptions") +instance ToJSON TestPhoneNumberOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "testPhoneNumberOptions") + + +-- | A thread is a message thread created for a message received by an alias +data ThreadProjection = ThreadProjection + { threadProjectionUserId :: UUID -- ^ User ID + , threadProjectionInboxId :: UUID -- ^ Inbox ID + , threadProjectionTo :: [Text] -- ^ To recipients + , threadProjectionBcc :: Maybe [Text] -- ^ BCC recipients + , threadProjectionCc :: Maybe [Text] -- ^ CC recipients + , threadProjectionAliasId :: UUID -- ^ Alias ID + , threadProjectionCreatedAt :: UTCTime -- ^ Created at DateTime + , threadProjectionUpdatedAt :: UTCTime -- ^ Updated at DateTime + , threadProjectionSubject :: Maybe Text -- ^ Thread subject + , threadProjectionName :: Maybe Text -- ^ Name of thread + , threadProjectionId :: UUID -- ^ ID of email thread + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ThreadProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "threadProjection") +instance ToJSON ThreadProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "threadProjection") + + +-- | Tracking pixel +data TrackingPixelDto = TrackingPixelDto + { trackingPixelDtoId :: UUID -- ^ + , trackingPixelDtoSeen :: Bool -- ^ + , trackingPixelDtoRecipient :: Maybe Text -- ^ + , trackingPixelDtoHtml :: Text -- ^ + , trackingPixelDtoUrl :: Text -- ^ + , trackingPixelDtoInboxId :: Maybe UUID -- ^ + , trackingPixelDtoSentEmailId :: Maybe UUID -- ^ + , trackingPixelDtoSeenAt :: Maybe UTCTime -- ^ + , trackingPixelDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TrackingPixelDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "trackingPixelDto") +instance ToJSON TrackingPixelDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "trackingPixelDto") + + +-- | Tracking pixel data +data TrackingPixelProjection = TrackingPixelProjection + { trackingPixelProjectionUserId :: UUID -- ^ + , trackingPixelProjectionInboxId :: Maybe UUID -- ^ + , trackingPixelProjectionSentEmailId :: Maybe UUID -- ^ + , trackingPixelProjectionRecipient :: Maybe Text -- ^ + , trackingPixelProjectionSeen :: Bool -- ^ + , trackingPixelProjectionSeenAt :: Maybe UTCTime -- ^ + , trackingPixelProjectionCreatedAt :: UTCTime -- ^ + , trackingPixelProjectionName :: Maybe Text -- ^ + , trackingPixelProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON TrackingPixelProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "trackingPixelProjection") +instance ToJSON TrackingPixelProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "trackingPixelProjection") + + +-- | Unknown missed email projection +data UnknownMissedEmailProjection = UnknownMissedEmailProjection + { unknownMissedEmailProjectionTo :: Maybe [Text] -- ^ + , unknownMissedEmailProjectionCreatedAt :: UTCTime -- ^ + , unknownMissedEmailProjectionSubject :: Maybe Text -- ^ + , unknownMissedEmailProjectionId :: UUID -- ^ + , unknownMissedEmailProjectionFrom :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UnknownMissedEmailProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "unknownMissedEmailProjection") +instance ToJSON UnknownMissedEmailProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "unknownMissedEmailProjection") + + +-- | Number of unread entities +data UnreadCount = UnreadCount + { unreadCountCount :: Integer -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UnreadCount where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "unreadCount") +instance ToJSON UnreadCount where + toJSON = genericToJSON (removeFieldLabelPrefix False "unreadCount") + + +-- | Number of unseen errors +data UnseenErrorCountDto = UnseenErrorCountDto + { unseenErrorCountDtoCount :: Integer -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UnseenErrorCountDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "unseenErrorCountDto") +instance ToJSON UnseenErrorCountDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "unseenErrorCountDto") + + +-- | Update an email alias +data UpdateAliasOptions = UpdateAliasOptions + { updateAliasOptionsName :: Maybe Text -- ^ Optional name for alias + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UpdateAliasOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "updateAliasOptions") +instance ToJSON UpdateAliasOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "updateAliasOptions") + + +-- | Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. +data UpdateDomainOptions = UpdateDomainOptions + { updateDomainOptionsCatchAllInboxId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UpdateDomainOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "updateDomainOptions") +instance ToJSON UpdateDomainOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "updateDomainOptions") + + +-- | Update group contacts options. Pass a list of contact ids to replace existing group contacts. +data UpdateGroupContacts = UpdateGroupContacts + { updateGroupContactsContactIds :: [UUID] -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UpdateGroupContacts where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "updateGroupContacts") +instance ToJSON UpdateGroupContacts where + toJSON = genericToJSON (removeFieldLabelPrefix False "updateGroupContacts") + + +-- | Options for updating inbox properties +data UpdateInboxOptions = UpdateInboxOptions + { updateInboxOptionsName :: Maybe Text -- ^ Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search + , updateInboxOptionsDescription :: Maybe Text -- ^ Description of an inbox for labelling and searching purposes + , updateInboxOptionsTags :: Maybe [Text] -- ^ Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + , updateInboxOptionsExpiresAt :: Maybe UTCTime -- ^ Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. + , updateInboxOptionsFavourite :: Maybe Bool -- ^ Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UpdateInboxOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "updateInboxOptions") +instance ToJSON UpdateInboxOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "updateInboxOptions") + + +-- | Options for updating an inbox replier +data UpdateInboxReplierOptions = UpdateInboxReplierOptions + { updateInboxReplierOptionsInboxId :: UUID -- ^ Inbox ID to attach replier to + , updateInboxReplierOptionsName :: Maybe Text -- ^ Name for replier + , updateInboxReplierOptionsField :: Text -- ^ Field to match against to trigger inbox replier for inbound email + , updateInboxReplierOptionsMatch :: Text -- ^ String or wildcard style match for field specified when evaluating reply rules + , updateInboxReplierOptionsReplyTo :: Maybe Text -- ^ Reply-to email address when sending replying + , updateInboxReplierOptionsSubject :: Maybe Text -- ^ Subject override when replying to email + , updateInboxReplierOptionsFrom :: Maybe Text -- ^ Send email from address + , updateInboxReplierOptionsCharset :: Maybe Text -- ^ Email reply charset + , updateInboxReplierOptionsIsHTML :: Maybe Bool -- ^ Send HTML email + , updateInboxReplierOptionsIgnoreReplyTo :: Maybe Bool -- ^ Ignore sender replyTo when responding. Send directly to the sender if enabled. + , updateInboxReplierOptionsBody :: Maybe Text -- ^ Email body for reply + , updateInboxReplierOptionsTemplateId :: Maybe UUID -- ^ ID of template to use when sending a reply + , updateInboxReplierOptionsTemplateVariables :: Maybe (Map.Map String Value) -- ^ Template variable values + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UpdateInboxReplierOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "updateInboxReplierOptions") +instance ToJSON UpdateInboxReplierOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "updateInboxReplierOptions") + + +-- | Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your `SendEmailOptions` when sending an email. This way you can use attachments multiple times once they have been uploaded. +data UploadAttachmentOptions = UploadAttachmentOptions + { uploadAttachmentOptionsContentId :: Maybe Text -- ^ Optional contentId for file. + , uploadAttachmentOptionsContentType :: Maybe Text -- ^ Optional contentType for file. For instance `application/pdf` + , uploadAttachmentOptionsFilename :: Maybe Text -- ^ Optional filename to save upload with. Will be the name that is shown in email clients + , uploadAttachmentOptionsBase64Contents :: Text -- ^ Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UploadAttachmentOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "uploadAttachmentOptions") +instance ToJSON UploadAttachmentOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "uploadAttachmentOptions") + + +-- | +data UserInfoDto = UserInfoDto + { userInfoDtoId :: UUID -- ^ + , userInfoDtoEmailAddress :: Text -- ^ + , userInfoDtoAccountState :: Text -- ^ + , userInfoDtoSubscriptionType :: Maybe Text -- ^ + , userInfoDtoAccountType :: Text -- ^ + , userInfoDtoCreatedAt :: UTCTime -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON UserInfoDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "userInfoDto") +instance ToJSON UserInfoDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "userInfoDto") + + +-- | Options for validating a list of email addresses +data ValidateEmailAddressListOptions = ValidateEmailAddressListOptions + { validateEmailAddressListOptionsEmailAddressList :: [Text] -- ^ + , validateEmailAddressListOptionsIgnoreOldResults :: Maybe Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ValidateEmailAddressListOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "validateEmailAddressListOptions") +instance ToJSON ValidateEmailAddressListOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "validateEmailAddressListOptions") + + +-- | Result of validating a list of email addresses +data ValidateEmailAddressListResult = ValidateEmailAddressListResult + { validateEmailAddressListResultValidEmailAddresses :: [Text] -- ^ + , validateEmailAddressListResultInvalidEmailAddresses :: [Text] -- ^ + , validateEmailAddressListResultResultMapEmailAddressIsValid :: (Map.Map String Bool) -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ValidateEmailAddressListResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "validateEmailAddressListResult") +instance ToJSON ValidateEmailAddressListResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "validateEmailAddressListResult") + + +-- | Response object for email validation operation +data ValidationDto = ValidationDto + { validationDtoEmailId :: UUID -- ^ ID of the email validated + , validationDtoHtml :: HTMLValidationResult -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ValidationDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "validationDto") +instance ToJSON ValidationDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "validationDto") + + +-- | Optional warnings resulting from HTML validation +data ValidationMessage = ValidationMessage + { validationMessageLineNumber :: Int -- ^ + , validationMessageMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON ValidationMessage where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "validationMessage") +instance ToJSON ValidationMessage where + toJSON = genericToJSON (removeFieldLabelPrefix False "validationMessage") + + +-- | Options for verifying that an email address exists at a remote mail server. +data VerifyEmailAddressOptions = VerifyEmailAddressOptions + { verifyEmailAddressOptionsMailServerDomain :: Maybe Text -- ^ + , verifyEmailAddressOptionsEmailAddress :: Text -- ^ + , verifyEmailAddressOptionsSenderEmailAddress :: Maybe Text -- ^ + , verifyEmailAddressOptionsPort :: Maybe Int -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON VerifyEmailAddressOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "verifyEmailAddressOptions") +instance ToJSON VerifyEmailAddressOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "verifyEmailAddressOptions") + + +-- | +data VerifyWebhookSignatureOptions = VerifyWebhookSignatureOptions + { verifyWebhookSignatureOptionsMessageId :: Text -- ^ + , verifyWebhookSignatureOptionsSignature :: Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON VerifyWebhookSignatureOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "verifyWebhookSignatureOptions") +instance ToJSON VerifyWebhookSignatureOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "verifyWebhookSignatureOptions") + + +-- | +data VerifyWebhookSignatureResults = VerifyWebhookSignatureResults + { verifyWebhookSignatureResultsIsValid :: Bool -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON VerifyWebhookSignatureResults where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "verifyWebhookSignatureResults") +instance ToJSON VerifyWebhookSignatureResults where + toJSON = genericToJSON (removeFieldLabelPrefix False "verifyWebhookSignatureResults") + + +-- | Conditions to apply to emails that you are waiting for +data WaitForConditions = WaitForConditions + { waitForConditionsInboxId :: UUID -- ^ ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. + , waitForConditionsCount :: Maybe Int -- ^ Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. + , waitForConditionsDelayTimeout :: Maybe Integer -- ^ Max time in milliseconds to wait between retries if a `timeout` is specified. + , waitForConditionsTimeout :: Integer -- ^ Max time in milliseconds to retry the `waitFor` operation until conditions are met. + , waitForConditionsUnreadOnly :: Maybe Bool -- ^ Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. + , waitForConditionsCountType :: Maybe Text -- ^ How result size should be compared with the expected size. Exactly or at-least matching result? + , waitForConditionsMatches :: Maybe [MatchOption] -- ^ Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. + , waitForConditionsSortDirection :: Maybe Text -- ^ Direction to sort matching emails by created time + , waitForConditionsSince :: Maybe UTCTime -- ^ ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date + , waitForConditionsBefore :: Maybe UTCTime -- ^ ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WaitForConditions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "waitForConditions") +instance ToJSON WaitForConditions where + toJSON = genericToJSON (removeFieldLabelPrefix False "waitForConditions") + + +-- | +data WaitForSingleSmsOptions = WaitForSingleSmsOptions + { waitForSingleSmsOptionsPhoneNumberId :: UUID -- ^ + , waitForSingleSmsOptionsTimeout :: Integer -- ^ + , waitForSingleSmsOptionsUnreadOnly :: Maybe Bool -- ^ + , waitForSingleSmsOptionsBefore :: Maybe UTCTime -- ^ + , waitForSingleSmsOptionsSince :: Maybe UTCTime -- ^ + , waitForSingleSmsOptionsSortDirection :: Maybe Text -- ^ + , waitForSingleSmsOptionsDelay :: Maybe Integer -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WaitForSingleSmsOptions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "waitForSingleSmsOptions") +instance ToJSON WaitForSingleSmsOptions where + toJSON = genericToJSON (removeFieldLabelPrefix False "waitForSingleSmsOptions") + + +-- | Conditions to apply to emails that you are waiting for +data WaitForSmsConditions = WaitForSmsConditions + { waitForSmsConditionsPhoneNumberId :: UUID -- ^ ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. + , waitForSmsConditionsLimit :: Maybe Int -- ^ Limit results + , waitForSmsConditionsCount :: Integer -- ^ Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. + , waitForSmsConditionsDelayTimeout :: Maybe Integer -- ^ Max time in milliseconds to wait between retries if a `timeout` is specified. + , waitForSmsConditionsTimeout :: Integer -- ^ Max time in milliseconds to retry the `waitFor` operation until conditions are met. + , waitForSmsConditionsUnreadOnly :: Maybe Bool -- ^ Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. + , waitForSmsConditionsCountType :: Maybe Text -- ^ How result size should be compared with the expected size. Exactly or at-least matching result? + , waitForSmsConditionsMatches :: Maybe [SmsMatchOption] -- ^ Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. + , waitForSmsConditionsSortDirection :: Maybe Text -- ^ Direction to sort matching SMSs by created time + , waitForSmsConditionsSince :: Maybe UTCTime -- ^ ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date + , waitForSmsConditionsBefore :: Maybe UTCTime -- ^ ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WaitForSmsConditions where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "waitForSmsConditions") +instance ToJSON WaitForSmsConditions where + toJSON = genericToJSON (removeFieldLabelPrefix False "waitForSmsConditions") + + +-- | BOUNCE webhook payload. Sent to your webhook url endpoint via HTTP POST when an email bounced or was rejected by a recipient. Save the recipients to a ban list on your server and avoid emailing them again. It is recommended you also listen to the BOUNCE_RECIPIENT payload. +data WebhookBouncePayload = WebhookBouncePayload + { webhookBouncePayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookBouncePayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookBouncePayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookBouncePayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookBouncePayloadBounceId :: UUID -- ^ ID of the bounce email record. Use the ID with the bounce controller to view more information + , webhookBouncePayloadSentToRecipients :: Maybe [Text] -- ^ Email sent to recipients + , webhookBouncePayloadSender :: Text -- ^ Sender causing bounce + , webhookBouncePayloadBounceRecipients :: Maybe [Text] -- ^ Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookBouncePayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookBouncePayload") +instance ToJSON WebhookBouncePayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookBouncePayload") + + +-- | BOUNCE_RECIPIENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email caused a bounce to occur for a recipient. Save the recipient to a ban list of your server and avoid email them again. +data WebhookBounceRecipientPayload = WebhookBounceRecipientPayload + { webhookBounceRecipientPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookBounceRecipientPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookBounceRecipientPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookBounceRecipientPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookBounceRecipientPayloadRecipient :: Text -- ^ Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookBounceRecipientPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookBounceRecipientPayload") +instance ToJSON WebhookBounceRecipientPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookBounceRecipientPayload") + + +-- | DELIVERY_STATUS webhook payload. Sent to your webhook url endpoint via HTTP POST when an email delivery status is created. This could be a successful delivery or a delivery failure. +data WebhookDeliveryStatusPayload = WebhookDeliveryStatusPayload + { webhookDeliveryStatusPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookDeliveryStatusPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookDeliveryStatusPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookDeliveryStatusPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookDeliveryStatusPayloadId :: UUID -- ^ ID of delivery status + , webhookDeliveryStatusPayloadUserId :: UUID -- ^ User ID of event + , webhookDeliveryStatusPayloadSentId :: Maybe UUID -- ^ ID of sent email + , webhookDeliveryStatusPayloadRemoteMtaIp :: Maybe Text -- ^ IP address of the remote Mail Transfer Agent + , webhookDeliveryStatusPayloadInboxId :: Maybe UUID -- ^ Id of the inbox + , webhookDeliveryStatusPayloadReportingMta :: Maybe Text -- ^ Mail Transfer Agent reporting delivery status + , webhookDeliveryStatusPayloadRecipients :: Maybe [Text] -- ^ Recipients for delivery + , webhookDeliveryStatusPayloadSmtpResponse :: Maybe Text -- ^ SMTP server response message + , webhookDeliveryStatusPayloadSmtpStatusCode :: Maybe Int -- ^ SMTP server status + , webhookDeliveryStatusPayloadProcessingTimeMillis :: Maybe Integer -- ^ Time in milliseconds for delivery processing + , webhookDeliveryStatusPayloadReceived :: Maybe UTCTime -- ^ Time event was received + , webhookDeliveryStatusPayloadSubject :: Maybe Text -- ^ Email subject + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookDeliveryStatusPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookDeliveryStatusPayload") +instance ToJSON WebhookDeliveryStatusPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookDeliveryStatusPayload") + + +-- | Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://api.mailslurp.com/schemas/webhook-payload for the payload schema. +data WebhookDto = WebhookDto + { webhookDtoId :: UUID -- ^ ID of the Webhook + , webhookDtoUserId :: UUID -- ^ User ID of the Webhook + , webhookDtoBasicAuth :: Bool -- ^ Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. + , webhookDtoName :: Maybe Text -- ^ Name of the webhook + , webhookDtoPhoneId :: Maybe UUID -- ^ The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set + , webhookDtoInboxId :: Maybe UUID -- ^ The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set + , webhookDtoRequestBodyTemplate :: Maybe Text -- ^ Request body template for HTTP request that will be sent for the webhook. Use Moustache style template variables to insert values from the original event payload. + , webhookDtoUrl :: Text -- ^ URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. + , webhookDtoMethod :: Text -- ^ HTTP method that your server endpoint must listen for + , webhookDtoPayloadJsonSchema :: Text -- ^ Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method + , webhookDtoCreatedAt :: UTCTime -- ^ When the webhook was created + , webhookDtoUpdatedAt :: UTCTime -- ^ + , webhookDtoEventName :: Maybe Text -- ^ Webhook trigger event name + , webhookDtoRequestHeaders :: Maybe WebhookHeaders -- ^ + , webhookDtoIgnoreInsecureSslCertificates :: Maybe Bool -- ^ Should notifier ignore insecure SSL certificates + , webhookDtoUseStaticIpRange :: Maybe Bool -- ^ Should notifier use static IP range when sending webhook payload + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookDto") +instance ToJSON WebhookDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookDto") + + +-- | EMAIL_OPENED webhook payload. Sent to your webhook url endpoint via HTTP POST when an email containing a tracking pixel is opened and the pixel image is loaded by a reader. +data WebhookEmailOpenedPayload = WebhookEmailOpenedPayload + { webhookEmailOpenedPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookEmailOpenedPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookEmailOpenedPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookEmailOpenedPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookEmailOpenedPayloadInboxId :: UUID -- ^ Id of the inbox + , webhookEmailOpenedPayloadPixelId :: UUID -- ^ ID of the tracking pixel + , webhookEmailOpenedPayloadSentEmailId :: UUID -- ^ ID of sent email + , webhookEmailOpenedPayloadRecipient :: Text -- ^ Email address for the recipient of the tracking pixel + , webhookEmailOpenedPayloadCreatedAt :: UTCTime -- ^ Date time of event creation + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookEmailOpenedPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookEmailOpenedPayload") +instance ToJSON WebhookEmailOpenedPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookEmailOpenedPayload") + + +-- | EMAIL_READ webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is read. This happens when an email is requested in full from the API or a user views the email in the dashboard. +data WebhookEmailReadPayload = WebhookEmailReadPayload + { webhookEmailReadPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookEmailReadPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookEmailReadPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookEmailReadPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookEmailReadPayloadEmailId :: UUID -- ^ ID of the email that was received. Use this ID for fetching the email with the `EmailController`. + , webhookEmailReadPayloadInboxId :: UUID -- ^ Id of the inbox + , webhookEmailReadPayloadEmailIsRead :: Bool -- ^ Is the email read + , webhookEmailReadPayloadCreatedAt :: UTCTime -- ^ Date time of event creation + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookEmailReadPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookEmailReadPayload") +instance ToJSON WebhookEmailReadPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookEmailReadPayload") + + +-- | Name value pair for webhook header +data WebhookHeaderNameValue = WebhookHeaderNameValue + { webhookHeaderNameValueName :: Text -- ^ Name of header + , webhookHeaderNameValueValue :: Text -- ^ Value of header + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookHeaderNameValue where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookHeaderNameValue") +instance ToJSON WebhookHeaderNameValue where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookHeaderNameValue") + + +-- | Webhook HTTP headers to include with each request from MailSlurp to your server +data WebhookHeaders = WebhookHeaders + { webhookHeadersHeaders :: [WebhookHeaderNameValue] -- ^ List of header name value pairs to include with webhook requests + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookHeaders where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookHeaders") +instance ToJSON WebhookHeaders where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookHeaders") + + +-- | NEW_ATTACHMENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains an attachment. You can use the attachmentId to download the attachment. +data WebhookNewAttachmentPayload = WebhookNewAttachmentPayload + { webhookNewAttachmentPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookNewAttachmentPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookNewAttachmentPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookNewAttachmentPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookNewAttachmentPayloadAttachmentId :: Text -- ^ ID of attachment. Use the `AttachmentController` to + , webhookNewAttachmentPayloadName :: Text -- ^ Filename of the attachment if present + , webhookNewAttachmentPayloadContentType :: Text -- ^ Content type of attachment such as 'image/png' or 'application/pdf + , webhookNewAttachmentPayloadContentLength :: Integer -- ^ Size of attachment in bytes + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookNewAttachmentPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookNewAttachmentPayload") +instance ToJSON WebhookNewAttachmentPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookNewAttachmentPayload") + + +-- | NEW_CONTACT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains a recipient that has not been saved as a contact. +data WebhookNewContactPayload = WebhookNewContactPayload + { webhookNewContactPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookNewContactPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookNewContactPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookNewContactPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookNewContactPayloadContactId :: UUID -- ^ Contact ID + , webhookNewContactPayloadGroupId :: Maybe UUID -- ^ Contact group ID + , webhookNewContactPayloadFirstName :: Maybe Text -- ^ Contact first name + , webhookNewContactPayloadLastName :: Maybe Text -- ^ Contact last name + , webhookNewContactPayloadCompany :: Maybe Text -- ^ Contact company name + , webhookNewContactPayloadPrimaryEmailAddress :: Maybe Text -- ^ Primary email address for contact + , webhookNewContactPayloadEmailAddresses :: [Text] -- ^ Email addresses for contact + , webhookNewContactPayloadTags :: [Text] -- ^ Tags for contact + , webhookNewContactPayloadMetaData :: Maybe Value -- ^ + , webhookNewContactPayloadOptOut :: Bool -- ^ Has contact opted out of emails + , webhookNewContactPayloadCreatedAt :: UTCTime -- ^ Date time of event creation + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookNewContactPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookNewContactPayload") +instance ToJSON WebhookNewContactPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookNewContactPayload") + + +-- | NEW_EMAIL webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to. Use the email ID to fetch the full email body or attachments. +data WebhookNewEmailPayload = WebhookNewEmailPayload + { webhookNewEmailPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookNewEmailPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookNewEmailPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookNewEmailPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookNewEmailPayloadInboxId :: UUID -- ^ Id of the inbox + , webhookNewEmailPayloadDomainId :: Maybe UUID -- ^ Id of the domain that received an email + , webhookNewEmailPayloadEmailId :: UUID -- ^ ID of the email that was received. Use this ID for fetching the email with the `EmailController`. + , webhookNewEmailPayloadCreatedAt :: UTCTime -- ^ Date time of event creation + , webhookNewEmailPayloadTo :: [Text] -- ^ List of `To` recipient email addresses that the email was addressed to. See recipients object for names. + , webhookNewEmailPayloadFrom :: Text -- ^ Who the email was sent from. An email address - see fromName for the sender name. + , webhookNewEmailPayloadCc :: [Text] -- ^ List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. + , webhookNewEmailPayloadBcc :: [Text] -- ^ List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. + , webhookNewEmailPayloadSubject :: Maybe Text -- ^ The subject line of the email message as specified by SMTP subject header + , webhookNewEmailPayloadAttachmentMetaDatas :: [AttachmentMetaData] -- ^ List of attachment meta data objects if attachments present + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookNewEmailPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookNewEmailPayload") +instance ToJSON WebhookNewEmailPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookNewEmailPayload") + + +-- | NEW_SMS webhook payload. Sent to your webhook url endpoint via HTTP POST when an sms is received by the phone number that your webhook is attached to. Use the SMS ID to fetch the full SMS details. +data WebhookNewSmsPayload = WebhookNewSmsPayload + { webhookNewSmsPayloadMessageId :: Text -- ^ Idempotent message ID. Store this ID locally or in a database to prevent message duplication. + , webhookNewSmsPayloadWebhookId :: UUID -- ^ ID of webhook entity being triggered + , webhookNewSmsPayloadEventName :: Text -- ^ Name of the event type webhook is being triggered for. + , webhookNewSmsPayloadWebhookName :: Maybe Text -- ^ Name of the webhook being triggered + , webhookNewSmsPayloadSmsId :: UUID -- ^ ID of SMS message + , webhookNewSmsPayloadUserId :: UUID -- ^ User ID of event + , webhookNewSmsPayloadPhoneNumber :: UUID -- ^ ID of phone number receiving SMS + , webhookNewSmsPayloadToNumber :: Text -- ^ Recipient phone number + , webhookNewSmsPayloadFromNumber :: Text -- ^ Sender phone number + , webhookNewSmsPayloadBody :: Text -- ^ SMS message body + , webhookNewSmsPayloadRead :: Bool -- ^ SMS has been read + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookNewSmsPayload where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookNewSmsPayload") +instance ToJSON WebhookNewSmsPayload where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookNewSmsPayload") + + +-- | Representation of a webhook +data WebhookProjection = WebhookProjection + { webhookProjectionUrl :: Text -- ^ + , webhookProjectionInboxId :: Maybe UUID -- ^ + , webhookProjectionEventName :: Maybe Text -- ^ + , webhookProjectionPhoneNumberId :: Maybe UUID -- ^ + , webhookProjectionCreatedAt :: UTCTime -- ^ + , webhookProjectionUpdatedAt :: UTCTime -- ^ + , webhookProjectionName :: Maybe Text -- ^ + , webhookProjectionId :: UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookProjection where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookProjection") +instance ToJSON WebhookProjection where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookProjection") + + +-- | Result of retrying all failed webhook +data WebhookRedriveAllResult = WebhookRedriveAllResult + { webhookRedriveAllResultSuccess :: Bool -- ^ + , webhookRedriveAllResultMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookRedriveAllResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookRedriveAllResult") +instance ToJSON WebhookRedriveAllResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookRedriveAllResult") + + +-- | Result of retrying webhook +data WebhookRedriveResult = WebhookRedriveResult + { webhookRedriveResultWebhookResultId :: UUID -- ^ + , webhookRedriveResultSuccess :: Bool -- ^ + , webhookRedriveResultMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookRedriveResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookRedriveResult") +instance ToJSON WebhookRedriveResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookRedriveResult") + + +-- | Result of a webhook notification +data WebhookResultDto = WebhookResultDto + { webhookResultDtoId :: Maybe UUID -- ^ + , webhookResultDtoUserId :: UUID -- ^ + , webhookResultDtoWebhookId :: UUID -- ^ + , webhookResultDtoWebhookUrl :: Text -- ^ + , webhookResultDtoMessageId :: Text -- ^ + , webhookResultDtoRedriveId :: Maybe UUID -- ^ + , webhookResultDtoHttpMethod :: Text -- ^ + , webhookResultDtoWebhookEvent :: Text -- ^ + , webhookResultDtoResponseStatus :: Maybe Int -- ^ + , webhookResultDtoResponseTimeMillis :: Integer -- ^ + , webhookResultDtoResponseBodyExtract :: Maybe Text -- ^ + , webhookResultDtoResultType :: Maybe Text -- ^ + , webhookResultDtoCreatedAt :: UTCTime -- ^ + , webhookResultDtoUpdatedAt :: UTCTime -- ^ + , webhookResultDtoSeen :: Bool -- ^ + , webhookResultDtoInboxId :: Maybe UUID -- ^ + , webhookResultDtoEmailId :: Maybe UUID -- ^ + , webhookResultDtoAttachmentId :: Maybe UUID -- ^ + , webhookResultDtoPhoneId :: Maybe UUID -- ^ + , webhookResultDtoSmsId :: Maybe UUID -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookResultDto where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookResultDto") +instance ToJSON WebhookResultDto where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookResultDto") + + +-- | Result of webhook test request +data WebhookTestRequest = WebhookTestRequest + { webhookTestRequestUrl :: Text -- ^ + , webhookTestRequestMethod :: Text -- ^ + , webhookTestRequestHeaders :: (Map.Map String Text) -- ^ + , webhookTestRequestPayload :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookTestRequest where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookTestRequest") +instance ToJSON WebhookTestRequest where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookTestRequest") + + +-- | Response from webhook test request +data WebhookTestResponse = WebhookTestResponse + { webhookTestResponseStatusCode :: Maybe Int -- ^ + , webhookTestResponseMessage :: Maybe Text -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookTestResponse where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookTestResponse") +instance ToJSON WebhookTestResponse where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookTestResponse") + + +-- | Results of testing a webhook +data WebhookTestResult = WebhookTestResult + { webhookTestResultMessage :: Maybe Text -- ^ + , webhookTestResultResponse :: WebhookTestResponse -- ^ + , webhookTestResultRequest :: WebhookTestRequest -- ^ + } deriving (Show, Eq, Generic, Data) + +instance FromJSON WebhookTestResult where + parseJSON = genericParseJSON (removeFieldLabelPrefix True "webhookTestResult") +instance ToJSON WebhookTestResult where + toJSON = genericToJSON (removeFieldLabelPrefix False "webhookTestResult") + + +uncapitalize :: String -> String +uncapitalize (first:rest) = Char.toLower first : rest +uncapitalize [] = [] + +-- | Remove a field label prefix during JSON parsing. +-- Also perform any replacements for special characters. +-- The @forParsing@ parameter is to distinguish between the cases in which we're using this +-- to power a @FromJSON@ or a @ToJSON@ instance. In the first case we're parsing, and we want +-- to replace special characters with their quoted equivalents (because we cannot have special +-- chars in identifier names), while we want to do viceversa when sending data instead. +removeFieldLabelPrefix :: Bool -> String -> Options +removeFieldLabelPrefix forParsing prefix = + defaultOptions + { omitNothingFields = True + , fieldLabelModifier = uncapitalize . fromMaybe (error ("did not find prefix " ++ prefix)) . stripPrefix prefix . replaceSpecialChars + } + where + replaceSpecialChars field = foldl (&) field (map mkCharReplacement specialChars) + specialChars = + [ ("@", "'At") + , ("\\", "'Back_Slash") + , ("<=", "'Less_Than_Or_Equal_To") + , ("\"", "'Double_Quote") + , ("[", "'Left_Square_Bracket") + , ("]", "'Right_Square_Bracket") + , ("^", "'Caret") + , ("_", "'Underscore") + , ("`", "'Backtick") + , ("!", "'Exclamation") + , ("#", "'Hash") + , ("$", "'Dollar") + , ("%", "'Percent") + , ("&", "'Ampersand") + , ("'", "'Quote") + , ("(", "'Left_Parenthesis") + , (")", "'Right_Parenthesis") + , ("*", "'Star") + , ("+", "'Plus") + , (",", "'Comma") + , ("-", "'Dash") + , (".", "'Period") + , ("/", "'Slash") + , (":", "'Colon") + , ("{", "'Left_Curly_Bracket") + , ("|", "'Pipe") + , ("<", "'LessThan") + , ("!=", "'Not_Equal") + , ("=", "'Equal") + , ("}", "'Right_Curly_Bracket") + , (">", "'GreaterThan") + , ("~", "'Tilde") + , ("?", "'Question_Mark") + , (">=", "'Greater_Than_Or_Equal_To") + , ("~=", "'Tilde_Equal") + ] + mkCharReplacement (replaceStr, searchStr) = T.unpack . replacer (T.pack searchStr) (T.pack replaceStr) . T.pack + replacer = + if forParsing + then flip T.replace + else T.replace diff --git a/mailslurp.cabal b/mailslurp.cabal new file mode 100644 index 0000000..28c3160 --- /dev/null +++ b/mailslurp.cabal @@ -0,0 +1,41 @@ +name: mailslurp +version: 0.1.0.0 +synopsis: Auto-generated API bindings for mailslurp +description: Please see README.md +homepage: https://openapi-generator.tech +author: Author Name Here +maintainer: author.name@email.com +copyright: YEAR - AUTHOR +category: Web +build-type: Simple +cabal-version: >=1.10 + +library + hs-source-dirs: lib + exposed-modules: MailSlurp.API + , MailSlurp.Types + ghc-options: -Wall + build-depends: base + , aeson + , text + , containers + , exceptions + , network-uri + , servant + , http-api-data + , servant + , servant-client + , servant-client-core + , servant-server + , servant + , wai + , warp + , transformers + , mtl + , time + , http-client + , http-client-tls + , http-types + , swagger2 + , uuid + default-language: Haskell2010 diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..df636e0 --- /dev/null +++ b/stack.yaml @@ -0,0 +1,12 @@ +resolver: lts-13.20 +extra-deps: +- servant-0.16 +- servant-server-0.16 +- servant-client-0.16 +- servant-client-core-0.16 +packages: +- '.' +nix: + enable: false + packages: + - zlib \ No newline at end of file