-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Authentication for Yesod.
--   
--   API docs and the README are available at
--   <a>http://www.stackage.org/package/yesod-auth</a>
@package yesod-auth
@version 1.4.6

module Yesod.Auth.Message
data AuthMessage
NoOpenID :: AuthMessage
LoginOpenID :: AuthMessage
LoginGoogle :: AuthMessage
LoginYahoo :: AuthMessage
Email :: AuthMessage
IdentifierNotFound :: Text -> AuthMessage
Password :: AuthMessage
Register :: AuthMessage
RegisterLong :: AuthMessage
EnterEmail :: AuthMessage
ConfirmationEmailSentTitle :: AuthMessage
ConfirmationEmailSent :: Text -> AuthMessage
AddressVerified :: AuthMessage
InvalidKeyTitle :: AuthMessage
InvalidKey :: AuthMessage
InvalidEmailPass :: AuthMessage
BadSetPass :: AuthMessage
SetPassTitle :: AuthMessage
SetPass :: AuthMessage
NewPass :: AuthMessage
ConfirmPass :: AuthMessage
PassMismatch :: AuthMessage
PassUpdated :: AuthMessage
Facebook :: AuthMessage
LoginViaEmail :: AuthMessage
InvalidLogin :: AuthMessage
NowLoggedIn :: AuthMessage
LoginTitle :: AuthMessage
PleaseProvideUsername :: AuthMessage
PleaseProvidePassword :: AuthMessage
NoIdentifierProvided :: AuthMessage
InvalidEmailAddress :: AuthMessage
PasswordResetTitle :: AuthMessage
ProvideIdentifier :: AuthMessage
SendPasswordResetEmail :: AuthMessage
PasswordResetPrompt :: AuthMessage
InvalidUsernamePass :: AuthMessage
Logout :: AuthMessage
AuthError :: AuthMessage

-- | Defaults to <a>englishMessage</a>.
defaultMessage :: AuthMessage -> Text
englishMessage :: AuthMessage -> Text
portugueseMessage :: AuthMessage -> Text
swedishMessage :: AuthMessage -> Text
germanMessage :: AuthMessage -> Text
frenchMessage :: AuthMessage -> Text
norwegianBokmålMessage :: AuthMessage -> Text
japaneseMessage :: AuthMessage -> Text
finnishMessage :: AuthMessage -> Text
chineseMessage :: AuthMessage -> Text
spanishMessage :: AuthMessage -> Text
czechMessage :: AuthMessage -> Text
russianMessage :: AuthMessage -> Text
dutchMessage :: AuthMessage -> Text

module Yesod.Auth
data Auth
type AuthRoute = Route Auth

-- | The <a>type-safe URLs</a> associated with a site argument.
data AuthPlugin master
AuthPlugin :: Text -> (Method -> [Piece] -> AuthHandler master TypedContent) -> ((Route Auth -> Route master) -> WidgetT master IO ()) -> AuthPlugin master
apName :: AuthPlugin master -> Text
apDispatch :: AuthPlugin master -> Method -> [Piece] -> AuthHandler master TypedContent
apLogin :: AuthPlugin master -> (Route Auth -> Route master) -> WidgetT master IO ()
getAuth :: a -> Auth
class (Yesod master, PathPiece (AuthId master), RenderMessage master FormMessage) => YesodAuth master where type family AuthId master authLayout = defaultLayout authenticate creds = do { muid <- getAuthId creds; return $ maybe (UserError InvalidLogin) Authenticated muid } getAuthId creds = do { auth <- authenticate creds; return $ case auth of { Authenticated auid -> Just auid _ -> Nothing } } loginHandler = do { tp <- getRouteToParent; lift $ authLayout $ do { setTitleI LoginTitle; master <- getYesod; mapM_ (flip apLogin tp) (authPlugins master) } } renderAuthMessage _ _ = defaultMessage redirectToReferer _ = False onLogin = setMessageI NowLoggedIn onLogout = return () maybeAuthId = defaultMaybeAuthId onErrorHtml dest msg = do { setMessage $ toHtml msg; fmap asHtml $ redirect dest }
authLayout :: YesodAuth master => WidgetT master IO () -> HandlerT master IO Html
loginDest :: YesodAuth master => master -> Route master
logoutDest :: YesodAuth master => master -> Route master
authenticate :: YesodAuth master => Creds master -> HandlerT master IO (AuthenticationResult master)
getAuthId :: YesodAuth master => Creds master -> HandlerT master IO (Maybe (AuthId master))
authPlugins :: YesodAuth master => master -> [AuthPlugin master]
loginHandler :: YesodAuth master => AuthHandler master Html
renderAuthMessage :: YesodAuth master => master -> [Text] -> AuthMessage -> Text
redirectToReferer :: YesodAuth master => master -> Bool
authHttpManager :: YesodAuth master => master -> Manager
onLogin :: YesodAuth master => HandlerT master IO ()
onLogout :: YesodAuth master => HandlerT master IO ()
maybeAuthId :: YesodAuth master => HandlerT master IO (Maybe (AuthId master))
onErrorHtml :: (YesodAuth master, MonadResourceBase m) => Route master -> Text -> HandlerT master m Html

-- | Class which states that the given site is an instance of
--   <tt>YesodAuth</tt> and that its <tt>AuthId</tt> is a lookup key for
--   the full user information in a <tt>YesodPersist</tt> database.
--   
--   The default implementation of <tt>getAuthEntity</tt> assumes that the
--   <tt>AuthId</tt> for the <tt>YesodAuth</tt> superclass is in fact a
--   persistent <tt>Key</tt> for the given value. This is the common case
--   in Yesod, and means that you can easily look up the full information
--   on a given user.
--   
--   Since 1.4.0
class (YesodAuth master, YesodPersist master) => YesodAuthPersist master where type family AuthEntity master :: * type instance AuthEntity master = KeyEntity (AuthId master) getAuthEntity = runDB . get
getAuthEntity :: YesodAuthPersist master => AuthId master -> HandlerT master IO (Maybe (AuthEntity master))

-- | User credentials
data Creds master
Creds :: Text -> Text -> [(Text, Text)] -> Creds master

-- | How the user was authenticated
credsPlugin :: Creds master -> Text

-- | Identifier. Exact meaning depends on plugin.
credsIdent :: Creds master -> Text
credsExtra :: Creds master -> [(Text, Text)]

-- | Sets user credentials for the session after checking them with
--   authentication backends.
setCreds :: YesodAuth master => Bool -> Creds master -> HandlerT master IO ()
setCredsRedirect :: YesodAuth master => Creds master -> HandlerT master IO TypedContent

-- | Clears current user credentials for the session.
--   
--   Since 1.1.7
clearCreds :: YesodAuth master => Bool -> HandlerT master IO ()

-- | For HTML, set the message and redirect to the route. For JSON, send
--   the message and a 401 status
loginErrorMessage :: (YesodAuth master, MonadResourceBase m) => Route master -> Text -> HandlerT master m TypedContent
loginErrorMessageI :: (MonadResourceBase m, YesodAuth master) => Route child -> AuthMessage -> HandlerT child (HandlerT master m) TypedContent

-- | The result of an authentication based on credentials
--   
--   Since 1.4.4
data AuthenticationResult master

-- | Authenticated successfully
Authenticated :: (AuthId master) -> AuthenticationResult master

-- | Invalid credentials provided by user
UserError :: AuthMessage -> AuthenticationResult master

-- | Some other error
ServerError :: Text -> AuthenticationResult master

-- | Retrieves user credentials from the session, if user is authenticated.
--   
--   This function does <i>not</i> confirm that the credentials are valid,
--   see <tt>maybeAuthIdRaw</tt> for more information.
--   
--   Since 1.1.2
defaultMaybeAuthId :: (YesodAuthPersist master, Typeable (AuthEntity master)) => HandlerT master IO (Maybe (AuthId master))

-- | Similar to <a>maybeAuth</a>, but doesn’t assume that you are using a
--   Persistent database.
--   
--   Since 1.4.0
maybeAuthPair :: (YesodAuthPersist master, Typeable (AuthEntity master)) => HandlerT master IO (Maybe (AuthId master, AuthEntity master))

-- | Similar to <a>maybeAuthId</a>, but additionally look up the value
--   associated with the user's database identifier to get the value in the
--   database. This assumes that you are using a Persistent database.
--   
--   Since 1.1.0
maybeAuth :: (YesodAuthPersist master, val ~ AuthEntity master, Key val ~ AuthId master, PersistEntity val, Typeable val) => HandlerT master IO (Maybe (Entity val))

-- | Similar to <a>maybeAuthId</a>, but redirects to a login page if user
--   is not authenticated or responds with error 401 if this is an API
--   client (expecting JSON).
--   
--   Since 1.1.0
requireAuthId :: YesodAuth master => HandlerT master IO (AuthId master)

-- | Similar to <a>requireAuth</a>, but not tied to Persistent's
--   <a>Entity</a> type. Instead, the <a>AuthId</a> and <a>AuthEntity</a>
--   are returned in a tuple.
--   
--   Since 1.4.0
requireAuthPair :: (YesodAuthPersist master, Typeable (AuthEntity master)) => HandlerT master IO (AuthId master, AuthEntity master)

-- | Similar to <a>maybeAuth</a>, but redirects to a login page if user is
--   not authenticated or responds with error 401 if this is an API client
--   (expecting JSON).
--   
--   Since 1.1.0
requireAuth :: (YesodAuthPersist master, val ~ AuthEntity master, Key val ~ AuthId master, PersistEntity val, Typeable val) => HandlerT master IO (Entity val)
data AuthException
InvalidFacebookResponse :: AuthException
type AuthHandler master a = YesodAuth master => HandlerT Auth (HandlerT master IO) a

-- | Internal session key used to hold the authentication information.
--   
--   Since 1.2.3
credsKey :: Text
provideJsonMessage :: Monad m => Text -> Writer (Endo [ProvidedRep m]) ()
messageJson401 :: MonadResourceBase m => Text -> HandlerT master m Html -> HandlerT master m TypedContent
asHtml :: Html -> Html
instance Typeable CachedMaybeAuth
instance Typeable AuthException
instance Show AuthException
instance YesodAuth master => YesodSubDispatch Auth (HandlerT master IO)
instance Exception AuthException
instance YesodAuth master => RenderMessage master AuthMessage

module Yesod.Auth.BrowserId
authBrowserId :: YesodAuth m => BrowserIdSettings -> AuthPlugin m

-- | Generates a function to handle on-click events, and returns that
--   function name.
createOnClick :: BrowserIdSettings -> (Route Auth -> Route master) -> WidgetT master IO Text

-- | Generates a function to handle on-click events, and returns that
--   function name.
createOnClickOverride :: BrowserIdSettings -> (Route Auth -> Route master) -> Maybe (Route master) -> WidgetT master IO Text
def :: Default a => a

-- | A settings type for various configuration options relevant to
--   BrowserID.
--   
--   See: <a>http://www.yesodweb.com/book/settings-types</a>
--   
--   Since 1.2.0
data BrowserIdSettings

-- | BrowserID audience value. If <tt>Nothing</tt>, will be extracted based
--   on the approot.
--   
--   Default: <tt>Nothing</tt>
--   
--   Since 1.2.0
bisAudience :: BrowserIdSettings -> Maybe Text

-- | Use asynchronous Javascript loading for the BrowserID JS file.
--   
--   Default: <tt>True</tt>.
--   
--   Since 1.2.0
bisLazyLoad :: BrowserIdSettings -> Bool
forwardUrl :: AuthRoute
instance Default BrowserIdSettings


-- | Provides a dummy authentication module that simply lets a user specify
--   his/her identifier. This is not intended for real world use, just for
--   testing.
module Yesod.Auth.Dummy
authDummy :: YesodAuth m => AuthPlugin m


-- | A Yesod plugin for Authentication via e-mail
--   
--   This plugin works out of the box by only setting a few methods on the
--   type class that tell the plugin how to interoprate with your user data
--   storage (your database). However, almost everything is customizeable
--   by setting more methods on the type class. In addition, you can send
--   all the form submissions via JSON and completely control the user's
--   flow. This is a standard registration e-mail flow
--   
--   1) A user registers a new e-mail address, and an e-mail is sent there
--   2) The user clicks on the registration link in the e-mail Note that at
--   this point they are actually logged in (without a password) That means
--   that when they log out they will need to reset their password 3) The
--   user sets their password and is redirected to the site. 4) The user
--   can now * logout and sign in * reset their password
module Yesod.Auth.Email
authEmail :: YesodAuthEmail m => AuthPlugin m
class (YesodAuth site, PathPiece (AuthEmailId site), RenderMessage site AuthMessage) => YesodAuthEmail site where type family AuthEmailId site randomKey _ = nonce128urlT defaultNonceGen needOldPassword aid' = do { mkey <- lookupSession loginLinkKey; case mkey >>= readMay . unpack of { Just (aidT, time) | Just aid <- fromPathPiece aidT, toPathPiece (aid `asTypeOf` aid') == toPathPiece aid' -> do { now <- liftIO getCurrentTime; return $ addUTCTime (60 * 30) time <= now } _ -> return True } } checkPasswordSecurity _ x | length x >= 3 = return $ Right () | otherwise = return $ Left "Password must be at least three characters" confirmationEmailSentResponse identifier = do { mr <- getMessageRender; selectRep $ do { provideJsonMessage (mr msg); provideRep $ authLayout $ do { setTitleI ConfirmationEmailSentTitle; (do { (asWidgetT . toWidget) ((preEscapedText . pack) "<p>"); ((liftM (toHtml .) getMessageRender) >>= (\ urender_a19QR -> (asWidgetT . toWidget) (urender_a19QR msg))); (asWidgetT . toWidget) ((preEscapedText . pack) "</p>") }) } } } where msg = ConfirmationEmailSent identifier normalizeEmailAddress _ = toLower registerHandler = defaultRegisterHandler forgotPasswordHandler = defaultForgotPasswordHandler setPasswordHandler = defaultSetPasswordHandler
addUnverified :: YesodAuthEmail site => Email -> VerKey -> HandlerT site IO (AuthEmailId site)
sendVerifyEmail :: YesodAuthEmail site => Email -> VerKey -> VerUrl -> HandlerT site IO ()
getVerifyKey :: YesodAuthEmail site => AuthEmailId site -> HandlerT site IO (Maybe VerKey)
setVerifyKey :: YesodAuthEmail site => AuthEmailId site -> VerKey -> HandlerT site IO ()
verifyAccount :: YesodAuthEmail site => AuthEmailId site -> HandlerT site IO (Maybe (AuthId site))
getPassword :: YesodAuthEmail site => AuthId site -> HandlerT site IO (Maybe SaltedPass)
setPassword :: YesodAuthEmail site => AuthId site -> SaltedPass -> HandlerT site IO ()
getEmailCreds :: YesodAuthEmail site => Identifier -> HandlerT site IO (Maybe (EmailCreds site))
getEmail :: YesodAuthEmail site => AuthEmailId site -> HandlerT site IO (Maybe Email)
randomKey :: YesodAuthEmail site => site -> IO Text
afterPasswordRoute :: YesodAuthEmail site => site -> Route site
needOldPassword :: YesodAuthEmail site => AuthId site -> HandlerT site IO Bool
checkPasswordSecurity :: YesodAuthEmail site => AuthId site -> Text -> HandlerT site IO (Either Text ())
confirmationEmailSentResponse :: YesodAuthEmail site => Text -> HandlerT site IO TypedContent
normalizeEmailAddress :: YesodAuthEmail site => site -> Text -> Text
registerHandler :: YesodAuthEmail site => AuthHandler site Html
forgotPasswordHandler :: YesodAuthEmail site => AuthHandler site Html
setPasswordHandler :: YesodAuthEmail site => Bool -> AuthHandler site TypedContent

-- | Data stored in a database for each e-mail address.
data EmailCreds site
EmailCreds :: AuthEmailId site -> Maybe (AuthId site) -> VerStatus -> Maybe VerKey -> Email -> EmailCreds site
emailCredsId :: EmailCreds site -> AuthEmailId site
emailCredsAuthId :: EmailCreds site -> Maybe (AuthId site)
emailCredsStatus :: EmailCreds site -> VerStatus
emailCredsVerkey :: EmailCreds site -> Maybe VerKey
emailCredsEmail :: EmailCreds site -> Email

-- | Salt a password with a randomly generated salt.
saltPass :: Text -> IO Text
loginR :: AuthRoute
registerR :: AuthRoute
forgotPasswordR :: AuthRoute
setpassR :: AuthRoute

-- | Since 1.4.5
verifyR :: Text -> Text -> AuthRoute
isValidPass :: Text -> SaltedPass -> Bool
type Email = Text
type VerKey = Text
type VerUrl = Text
type SaltedPass = Text
type VerStatus = Bool

-- | An Identifier generalizes an email address to allow users to log in
--   with some other form of credentials (e.g., username).
--   
--   Note that any of these other identifiers must not be valid email
--   addresses.
--   
--   Since 1.2.0
type Identifier = Text

-- | Session variable set when user logged in via a login link. See
--   <a>needOldPassword</a>.
--   
--   Since 1.2.1
loginLinkKey :: Text

-- | Set <a>loginLinkKey</a> to the current time.
--   
--   Since 1.2.1
setLoginLinkKey :: (YesodAuthEmail site, MonadHandler m, HandlerSite m ~ site) => AuthId site -> m ()

-- | Default implementation of <a>registerHandler</a>.
--   
--   Since: 1.2.6
defaultRegisterHandler :: YesodAuthEmail master => AuthHandler master Html

-- | Default implementation of <a>forgotPasswordHandler</a>.
--   
--   Since: 1.2.6
defaultForgotPasswordHandler :: YesodAuthEmail master => AuthHandler master Html

-- | Default implementation of <a>setPasswordHandler</a>.
--   
--   Since: 1.2.6
defaultSetPasswordHandler :: YesodAuthEmail master => Bool -> AuthHandler master TypedContent

module Yesod.Auth.OpenId
authOpenId :: YesodAuth master => IdentifierType -> [(Text, Text)] -> AuthPlugin master
forwardUrl :: AuthRoute

-- | The main identifier provided by the OpenID authentication plugin is
--   the "OP-local identifier". There is also sometimes a "claimed"
--   identifier available.
--   
--   In the <a>credsExtra</a> field of the <a>Creds</a> datatype, you can
--   lookup this key to find the claimed identifier, if available.
--   
--   <pre>
--   let finalID = fromMaybe (credsIdent creds)
--               $ lookup claimedKey (credsExtra creds)
--   </pre>
--   
--   Since 1.0.2
claimedKey :: Text
opLocalKey :: Text

-- | A helper function which will get the claimed identifier, if available,
--   falling back to the OP local identifier.
--   
--   See <a>claimedKey</a>.
--   
--   Since 1.0.2
credsIdentClaimed :: Creds m -> Text
data IdentifierType
Claimed :: IdentifierType
OPLocal :: IdentifierType

module Yesod.Auth.Rpxnow
authRpxnow :: YesodAuth m => String -> String -> AuthPlugin m


-- | Use an email address as an identifier via Google's OpenID login
--   system.
--   
--   This backend will not use the OpenID identifier at all. It only uses
--   OpenID as a login system. By using this plugin, you are trusting
--   Google to validate an email address, and requiring users to have a
--   Google account. On the plus side, you get to use email addresses as
--   the identifier, many users have existing Google accounts, the login
--   system has been long tested (as opposed to BrowserID), and it requires
--   no credential managing or setup (as opposed to Email).
module Yesod.Auth.GoogleEmail
authGoogleEmail :: YesodAuth m => AuthPlugin m
forwardUrl :: AuthRoute


-- | Use an email address as an identifier via Google's login system.
--   
--   Note that this is a replacement for <a>Yesod.Auth.GoogleEmail</a>,
--   which depends on Google's now deprecated OpenID system. For more
--   information, see
--   <a>https://developers.google.com/+/api/auth-migration</a>.
--   
--   By using this plugin, you are trusting Google to validate an email
--   address, and requiring users to have a Google account. On the plus
--   side, you get to use email addresses as the identifier, many users
--   have existing Google accounts, the login system has been long tested
--   (as opposed to BrowserID), and it requires no credential managing or
--   setup (as opposed to Email).
--   
--   In order to use this plugin:
--   
--   <ul>
--   <li>Create an application on the Google Developer Console
--   <a>https://console.developers.google.com/</a></li>
--   <li>Create OAuth credentials. The redirect URI will be
--   <a>http://yourdomain/auth/page/googleemail2/complete</a>. (If you have
--   your authentication subsite at a different root than /auth/, please
--   adjust accordingly.)</li>
--   <li>Enable the Google+ API.</li>
--   </ul>
--   
--   Since 1.3.1
module Yesod.Auth.GoogleEmail2
authGoogleEmail :: YesodAuth m => Text -> Text -> AuthPlugin m

-- | An alternative version which stores user access token in the session
--   variable. Use it if you want to request user's profile from your app.
--   
--   Since 1.4.3
authGoogleEmailSaveToken :: YesodAuth m => Text -> Text -> AuthPlugin m
forwardUrl :: AuthRoute

-- | An authentication token which was acquired from OAuth callback. The
--   token gets saved into the session storage only if you use
--   <a>authGoogleEmailSaveToken</a>. You can acquire saved token with
--   <a>getUserAccessToken</a>.
--   
--   Since 1.4.3
data Token
Token :: Text -> Text -> Token
accessToken :: Token -> Text
tokenType :: Token -> Text

-- | Get user's access token from the session. Returns Nothing if it's not
--   found (probably because the user is not logged in via
--   <a>GoogleEmail2</a> or you are not using
--   <a>authGoogleEmailSaveToken</a>)
getUserAccessToken :: MonadHandler m => m (Maybe Token)

-- | Allows to fetch information about a user from Google's API. In case of
--   parsing error returns <a>Nothing</a>. Will throw
--   <tt>HttpException</tt> in case of network problems or error response
--   code.
--   
--   Since 1.4.3
getPerson :: Manager -> Token -> HandlerT site IO (Maybe Person)

-- | Information about the user Full description of the resource
--   https:/<i>developers.google.com</i>+<i>api</i>latest/people
--   
--   Since 1.4.3
data Person
Person :: Text -> Maybe Text -> Maybe Name -> Maybe Text -> Maybe Text -> Maybe Gender -> Maybe Text -> Maybe PersonImage -> Maybe Text -> Maybe RelationshipStatus -> [PersonURI] -> [Organization] -> [Place] -> Maybe Text -> Maybe Bool -> Maybe Text -> Maybe Int -> Maybe Int -> Maybe Bool -> Maybe Text -> [Email] -> Maybe Text -> Maybe Text -> Maybe Text -> Person
personId :: Person -> Text

-- | The name of this person, which is suitable for display
personDisplayName :: Person -> Maybe Text
personName :: Person -> Maybe Name
personNickname :: Person -> Maybe Text

-- | Birthday formatted as YYYY-MM-DD
personBirthday :: Person -> Maybe Text
personGender :: Person -> Maybe Gender

-- | The URI of this person's profile
personProfileUri :: Person -> Maybe Text
personImage :: Person -> Maybe PersonImage

-- | A short biography for this person
personAboutMe :: Person -> Maybe Text
personRelationshipStatus :: Person -> Maybe RelationshipStatus
personUris :: Person -> [PersonURI]
personOrganizations :: Person -> [Organization]
personPlacesLived :: Person -> [Place]

-- | The brief description of this person
personTagline :: Person -> Maybe Text

-- | Whether this user has signed up for Google+
personIsPlusUser :: Person -> Maybe Bool

-- | The "bragging rights" line of this person
personBraggingRights :: Person -> Maybe Text

-- | if a Google+ page, the number of people who have +1'd this page
personPlusOneCount :: Person -> Maybe Int

-- | For followers who are visible, the number of people who have added
--   this person or page to a circle.
personCircledByCount :: Person -> Maybe Int

-- | Whether the person or Google+ Page has been verified. This is used
--   only for pages with a higher risk of being impersonated or similar.
--   This flag will not be present on most profiles.
personVerified :: Person -> Maybe Bool

-- | The user's preferred language for rendering.
personLanguage :: Person -> Maybe Text
personEmails :: Person -> [Email]
personDomain :: Person -> Maybe Text

-- | The occupation of this person
personOccupation :: Person -> Maybe Text

-- | The person's skills
personSkills :: Person -> Maybe Text

-- | Individual components of a name
--   
--   Since 1.4.3
data Name
Name :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Name

-- | The full name of this person, including middle names, suffixes, etc
nameFormatted :: Name -> Maybe Text

-- | The family name (last name) of this person
nameFamily :: Name -> Maybe Text

-- | The given name (first name) of this person
nameGiven :: Name -> Maybe Text

-- | The middle name of this person.
nameMiddle :: Name -> Maybe Text

-- | The honorific prefixes (such as "Dr." or "Mrs.") for this person
nameHonorificPrefix :: Name -> Maybe Text

-- | The honorific suffixes (such as "Jr.") for this person
nameHonorificSuffix :: Name -> Maybe Text

-- | Gender of the person
--   
--   Since 1.4.3
data Gender
Male :: Gender
Female :: Gender
OtherGender :: Gender

-- | The URI of the person's profile photo.
--   
--   Since 1.4.3
newtype PersonImage
PersonImage :: Text -> PersonImage
imageUri :: PersonImage -> Text

-- | <tt>resizePersonImage img 30</tt> would set query part to
--   <tt>?sz=30</tt> which would resize the image under the URI. If for
--   some reason you need to modify the query part, you should do it after
--   resizing.
--   
--   Since 1.4.3
resizePersonImage :: PersonImage -> Int -> PersonImage

-- | The person's relationship status.
--   
--   Since 1.4.3
data RelationshipStatus

-- | Person is single
Single :: RelationshipStatus

-- | Person is in a relationship
InRelationship :: RelationshipStatus

-- | Person is engaged
Engaged :: RelationshipStatus

-- | Person is married
Married :: RelationshipStatus

-- | The relationship is complicated
Complicated :: RelationshipStatus

-- | Person is in an open relationship
OpenRelationship :: RelationshipStatus

-- | Person is widowed
Widowed :: RelationshipStatus

-- | Person is in a domestic partnership
DomesticPartnership :: RelationshipStatus

-- | Person is in a civil union
CivilUnion :: RelationshipStatus

-- | Something else
RelationshipStatus :: Text -> RelationshipStatus

-- | URIs specified in the person's profile
--   
--   Since 1.4.3
data PersonURI
PersonURI :: Maybe Text -> Maybe Text -> Maybe PersonURIType -> PersonURI
uriLabel :: PersonURI -> Maybe Text
uriValue :: PersonURI -> Maybe Text
uriType :: PersonURI -> Maybe PersonURIType

-- | The type of URI
--   
--   Since 1.4.3
data PersonURIType

-- | URI for another profile
OtherProfile :: PersonURIType

-- | URI to a site for which this person is a contributor
Contributor :: PersonURIType

-- | URI for this Google+ Page's primary website
Website :: PersonURIType

-- | Other URL
OtherURI :: PersonURIType

-- | Something else
PersonURIType :: Text -> PersonURIType

-- | Current or past organizations with which this person is associated
--   
--   Since 1.4.3
data Organization
Organization :: Maybe Text -> Maybe Text -> Maybe OrganizationType -> Maybe Text -> Maybe Text -> Maybe Bool -> Organization

-- | The person's job title or role within the organization
orgName :: Organization -> Maybe Text
orgTitle :: Organization -> Maybe Text

-- | The date that the person joined this organization.
orgType :: Organization -> Maybe OrganizationType

-- | The date that the person left this organization.
orgStartDate :: Organization -> Maybe Text

-- | If <tt>True</tt>, indicates this organization is the person's ^
--   primary one, which is typically interpreted as the current one.
orgEndDate :: Organization -> Maybe Text
orgPrimary :: Organization -> Maybe Bool

-- | The type of an organization
--   
--   Since 1.4.3
data OrganizationType
Work :: OrganizationType
School :: OrganizationType

-- | Something else
OrganizationType :: Text -> OrganizationType

-- | A place where the person has lived or is living at the moment.
--   
--   Since 1.4.3
data Place
Place :: Maybe Text -> Maybe Bool -> Place

-- | A place where this person has lived. For example: "Seattle, WA", "Near
--   Toronto".
placeValue :: Place -> Maybe Text

-- | If <tt>True</tt>, this place of residence is this person's primary
--   residence.
placePrimary :: Place -> Maybe Bool

-- | Person's email
--   
--   Since 1.4.3
data Email
Email :: Text -> EmailType -> Email
emailValue :: Email -> Text
emailType :: Email -> EmailType

-- | Type of email
--   
--   Since 1.4.3
data EmailType

-- | Google account email address
EmailAccount :: EmailType

-- | Home email address
EmailHome :: EmailType

-- | Work email adress
EmailWork :: EmailType

-- | Other email address
EmailOther :: EmailType

-- | Something else
EmailType :: Text -> EmailType
instance Show Token
instance Eq Token
instance Show Gender
instance Eq Gender
instance Show PersonURIType
instance Eq PersonURIType
instance Show PersonURI
instance Eq PersonURI
instance Show OrganizationType
instance Eq OrganizationType
instance Show Organization
instance Eq Organization
instance Show Place
instance Eq Place
instance Show Name
instance Eq Name
instance Show RelationshipStatus
instance Eq RelationshipStatus
instance Show PersonImage
instance Eq PersonImage
instance Show EmailType
instance Eq EmailType
instance Show Email
instance Eq Email
instance Show Person
instance Eq Person
instance FromJSON EmailType
instance FromJSON Email
instance FromJSON Person
instance FromJSON PersonImage
instance FromJSON RelationshipStatus
instance FromJSON Name
instance FromJSON Place
instance FromJSON OrganizationType
instance FromJSON Organization
instance FromJSON PersonURIType
instance FromJSON PersonURI
instance FromJSON Gender
instance FromJSON Token
