Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class HasApiRoot m where
- class DedupSubscriptions m where
- recentlySubscribed :: Address -> m Bool
- class HasClientSessionKey k where
- clientSessionKey :: Lens' k Key
- class HasAllowedOrigins t where
- allowedOrigins :: Lens' t [URIAuth]
- data NewsletterTimeouts = NewsletterTimeouts {}
- class HasNewsletterTimeouts c where
- data RefPolicy
- type NewsletterAPI = NewsletterUnsub :<|> (NewsletterSub :<|> NewsletterSubConfirm)
- newsletterApi :: Proxy NewsletterAPI
- genUnsubLink :: (HasClientSessionKey k, MonadIO m, MonadReader k m, HasApiRoot m, IsElem NewsletterUnsubGet (ApiRoot m)) => Address -> m URI
- genSubConfirmLink :: (HasClientSessionKey k, MonadIO m, MonadReader k m, HasApiRoot m, IsElem NewsletterSubConfirmGet (ApiRoot m)) => Address -> m URI
- type NewsletterUnsub = NewsletterUnsubGet :<|> NewsletterUnsubPost
- type NewsletterUnsubGet = "unsubscribe" :> (Capture "unsub" Text :> Get '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html))
- type NewsletterUnsubPost = "unsubscribe" :> (Capture "unsub" Text :> Post '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html))
- type NewsletterSub = NewsletterSubGet :<|> NewsletterSubPost
- type NewsletterSubGet = Get '[HTML] Html
- type NewsletterSubPost = Header "Origin" String :> (Header "Referer" String :> (ReqBody '[FormUrlEncoded] Form :> Post '[HTML] Html))
- type NewsletterSubConfirm = NewsletterSubConfirmGet :<|> NewsletterSubConfirmPost
- type NewsletterSubConfirmGet = "confirm" :> (Capture "sub" Text :> Get '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html))
- type NewsletterSubConfirmPost = "confirm" :> (Capture "sub" Text :> Post '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html))
- decodeCS :: (HasClientSessionKey k, MonadReader k m) => (ByteString -> Maybe b) -> Text -> m (Maybe b)
- data SignupReq = SignupReq {
- _signupTime :: Day
- _signupAddress :: Text
- encSignup :: (HasClientSessionKey k, MonadIO m, MonadReader k m) => SignupReq -> m Text
- decSignup :: (HasClientSessionKey k, MonadReader k m) => Text -> m (Maybe SignupReq)
Documentation
class HasApiRoot m where Source #
class DedupSubscriptions m where Source #
A class to avoid repeated emailing someone even if they sign up multiple times.
recentlySubscribed :: Address -> m Bool Source #
class HasClientSessionKey k where Source #
clientSessionKey :: Lens' k Key Source #
Instances
HasClientSessionKey Key Source # | |
Defined in Network.Mail.Newsletter.Web.API |
class HasAllowedOrigins t where Source #
allowedOrigins :: Lens' t [URIAuth] Source #
data NewsletterTimeouts Source #
NewsletterTimeouts | |
|
Instances
Show NewsletterTimeouts Source # | |
Defined in Network.Mail.Newsletter.Web.API showsPrec :: Int -> NewsletterTimeouts -> ShowS # show :: NewsletterTimeouts -> String # showList :: [NewsletterTimeouts] -> ShowS # | |
HasNewsletterTimeouts NewsletterTimeouts Source # | |
class HasNewsletterTimeouts c where Source #
newsletterTimeouts :: Lens' c NewsletterTimeouts Source #
nltGrace :: Lens' c Integer Source #
nltSubTimeout :: Lens' c Integer Source #
Instances
Show RefPolicy Source # | |
ToHttpApiData RefPolicy Source # | |
Defined in Network.Mail.Newsletter.Web.API toUrlPiece :: RefPolicy -> Text # toEncodedUrlPiece :: RefPolicy -> Builder # toHeader :: RefPolicy -> ByteString # toQueryParam :: RefPolicy -> Text # |
genUnsubLink :: (HasClientSessionKey k, MonadIO m, MonadReader k m, HasApiRoot m, IsElem NewsletterUnsubGet (ApiRoot m)) => Address -> m URI Source #
genSubConfirmLink :: (HasClientSessionKey k, MonadIO m, MonadReader k m, HasApiRoot m, IsElem NewsletterSubConfirmGet (ApiRoot m)) => Address -> m URI Source #
type NewsletterUnsubGet = "unsubscribe" :> (Capture "unsub" Text :> Get '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html)) Source #
type NewsletterUnsubPost = "unsubscribe" :> (Capture "unsub" Text :> Post '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html)) Source #
type NewsletterSubPost = Header "Origin" String :> (Header "Referer" String :> (ReqBody '[FormUrlEncoded] Form :> Post '[HTML] Html)) Source #
type NewsletterSubConfirmGet = "confirm" :> (Capture "sub" Text :> Get '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html)) Source #
type NewsletterSubConfirmPost = "confirm" :> (Capture "sub" Text :> Post '[HTML] (Headers '[Header "Referrer-Policy" RefPolicy] Html)) Source #
decodeCS :: (HasClientSessionKey k, MonadReader k m) => (ByteString -> Maybe b) -> Text -> m (Maybe b) Source #
SignupReq | |
|
encSignup :: (HasClientSessionKey k, MonadIO m, MonadReader k m) => SignupReq -> m Text Source #
decSignup :: (HasClientSessionKey k, MonadReader k m) => Text -> m (Maybe SignupReq) Source #