nylas-0.1.1: Client for the Nylas API

Safe HaskellNone
LanguageHaskell2010

Network.Nylas.Types

Contents

Synopsis

Types

newtype AccessToken Source

The access token from Nylas to access data from a single inbox.

Constructors

AccessToken Text 

newtype NylasId Source

The unique ID for a Nylas object.

Constructors

NylasId 

Fields

_nylasId :: Text
 

Nylas Object Types

data Mailbox Source

A tuple of an email address and the optional name accompanying it, for participants in Threads and Messages.

Constructors

Mailbox 

data File Source

A file attached to a Message.

data ReadStatus Source

Whether a Message has been read in the inbox.

Constructors

MessageRead 
MessageUnread 

data StarStatus Source

Whether a Message or Thread has been starred in the inbox.

Constructors

Starred 
Unstarred 

data Label Source

A Gmail-style label applied to a Message or Thread.

Constructors

Label 

data Folder Source

An IMAP-style folder in which Messages can reside. A Thread can contain Messages spanning multiple folders.

Streaming Types

newtype Cursor Source

The transactional cursor as of a certain Delta. When requesting a stream of updates, clients should provide the Cursor for the last Delta they successfully consumed.

Constructors

Cursor 

Fields

_cursorId :: Text
 

data StreamingError Source

An error in a streaming pipeline involving consumeDeltas.

Constructors

ParsingError DecodingError (Producer ByteString IO ())

An error in parsing JSON

ConsumerError Text

An error produced by clients while consuming Deltas

data Change a Source

The change operation wrapping the affected object in a Delta. If the object has been created or modified (as opposed to deleted), the object is nested within the Change.

Constructors

Create a 
Modify a 
Delete 

Instances

Eq a => Eq (Change a) Source 
Show a => Show (Change a) Source 

data Delta Source

A change to an inbox with a transactional Cursor to continue processing from this Delta in the future.

Lenses

_Delete :: forall a. Prism' (Change a) () Source

_Modify :: forall a. Prism' (Change a) a Source

_Create :: forall a. Prism' (Change a) a Source

Utilities

recipients :: Message -> [Mailbox] Source

A list of the recipients of all types for a Message.