Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Paginated a = Page {
- _pageData :: !a
- _pageCursor :: !(Maybe Cursor)
- data Cursor
- data Push s = Push {
- pushData :: !(PushData s)
- pushSourceDevice :: !(Maybe DeviceId)
- pushTarget :: !(PushTarget s)
- pushGuid :: !(Maybe Guid)
- pushId :: !(EqT Existing s PushId)
- pushActive :: !(EqT Existing s Bool)
- pushCreated :: !(EqT Existing s PushbulletTime)
- pushModified :: !(EqT Existing s PushbulletTime)
- pushDismissed :: !(EqT Existing s Bool)
- pushDirection :: !(EqT Existing s PushDirection)
- pushSender :: !(EqT Existing s UserId)
- pushSenderEmail :: !(EqT Existing s EmailAddress)
- pushSenderEmailNormalized :: !(EqT Existing s EmailAddress)
- pushSenderName :: !(EqT Existing s Name)
- pushReceiver :: !(EqT Existing s UserId)
- pushReceiverEmail :: !(EqT Existing s EmailAddress)
- pushReceiverEmailNormalized :: !(EqT Existing s EmailAddress)
- pushOrigin :: !(EqT Existing s (Maybe PushOrigin))
- data PushData s
- = NotePush { }
- | LinkPush { }
- | FilePush {
- pushBody :: !Text
- pushFileName :: !Text
- pushFileType :: !MimeType
- pushFileUrl :: !Url
- pushFileTitle :: !(EqT Existing s Text)
- pushImageUrl :: !(EqT Existing s (Maybe Url))
- pushImageWidth :: !(EqT Existing s (Maybe Int))
- pushImageHeight :: !(EqT Existing s (Maybe Int))
- data PushTarget s where
- ToAll :: PushTarget New
- ToDevice :: !DeviceId -> PushTarget New
- ToEmail :: !EmailAddress -> PushTarget New
- ToChannel :: !ChannelTag -> PushTarget New
- ToClient :: !ClientId -> PushTarget New
- SentBroadcast :: PushTarget Existing
- SentToDevice :: !DeviceId -> PushTarget Existing
- simpleNewPush :: PushTarget New -> PushData New -> Push New
- newtype ExistingPushes = ExistingPushes [Push Existing]
- data Ephemeral
- data Device s = Device {
- _deviceId :: !(EqT Existing s DeviceId)
- _deviceActive :: !(EqT Existing s Bool)
- _deviceCreated :: !(EqT Existing s PushbulletTime)
- _deviceModified :: !(EqT Existing s PushbulletTime)
- _deviceIcon :: !DeviceIcon
- _deviceNickname :: !(Maybe Nickname)
- _deviceGeneratedNickname :: !(EqT Existing s Bool)
- _deviceManufacturer :: !(Maybe Manufacturer)
- _deviceModel :: !(Maybe Model)
- _deviceAppVersion :: !(Maybe AppVersion)
- _deviceFingerprint :: !(EqT Existing s (Maybe Fingerprint))
- _deviceKeyFingerprint :: !(EqT Existing s (Maybe KeyFingerprint))
- _deviceHasSms :: !HasSms
- _devicePushToken :: !(Maybe PushToken)
- newtype DeviceId = DeviceId Text
- newtype Nickname = Nickname Text
- newtype DeviceIcon = DeviceIcon Text
- data HasSms
- newtype ExistingDevices = ExistingDevices {}
- newDevice :: HasSms -> DeviceIcon -> Nickname -> Maybe Manufacturer -> Maybe Model -> Maybe AppVersion -> Device New
- data User = User {}
- newtype UserId = UserId Text
- data Permanent p where
- ThreadsOf :: !DeviceId -> Permanent ThreadList
- MessagesIn :: !DeviceId -> !SmsThreadId -> Permanent MessageList
- data PermanentK
- newtype SmsThreads = SmsThreads {
- unSmsThreads :: [SmsThread]
- data SmsThread = SmsThread {}
- newtype SmsThreadId = SmsThreadId Text
- data SmsThreadRecipient = SmsThreadRecipient {}
- newtype SmsMessages = SmsMessages {
- unSmsMessages :: [SmsMessage]
- data SmsMessage = SmsMessage {
- _smsDirection :: !SmsDirection
- _smsTime :: !PushbulletTime
- _smsBody :: !Text
- _smsId :: !SmsId
- _smsSent :: !(Maybe Bool)
- _smsType :: !SmsMessageType
- newtype SmsId = SmsId Text
- data SmsDirection
- data SmsMessageType
- newtype EmailAddress = EmailAddress Text
- newtype ChannelTag = ChannelTag Text
- newtype ClientId = ClientId Text
- newtype MimeType = MimeType Text
- newtype Url = Url Text
- newtype Guid = Guid Text
- newtype TrivialObject = TrivialObject ()
- data Status
- newtype PushbulletTime = PushbulletTime UTCTime
- newtype PhoneNumber = PhoneNumber Text
- newtype Name = Name {}
- type family EqT (s :: k) (s' :: k) (a :: *) :: * where ...
Pagination
A single page of data, possibly with a cursor attached to it. The cursor may be used in routes that return paginated data to produce the next page of data.
Page | |
|
Cursors are opaque.
Pushes
A push. We reuse the same datatype for representing new pushes and
existing pushes. The EqT
type family is used to enable fields selectively
according to whether we're making a new push or representing an existing
one.
Push | |
|
The actual contents of a push.
NotePush | |
LinkPush | |
FilePush | |
|
data PushTarget s where Source #
The target of a push.
ToAll :: PushTarget New | |
ToDevice :: !DeviceId -> PushTarget New | |
ToEmail :: !EmailAddress -> PushTarget New | |
ToChannel :: !ChannelTag -> PushTarget New | |
ToClient :: !ClientId -> PushTarget New | |
SentBroadcast :: PushTarget Existing | |
SentToDevice :: !DeviceId -> PushTarget Existing |
Eq (PushTarget s) Source # | |
Show (PushTarget s) Source # | |
simpleNewPush :: PushTarget New -> PushData New -> Push New Source #
Constructs a new Push
with the source device and guid set to Nothing
.
newtype ExistingPushes Source #
A newtype wrapper for a list of existing pushes. We need this to get a
nonstandard FromJSON
instance for the list, because Pushbullet gives us
the list wrapped in a trivial object with one key.
Ephemerals
Devices
A device attached to a Pushbullet account.
Device | |
|
newtype DeviceIcon Source #
Whether the device has SMS capabilities.
newtype ExistingDevices Source #
A newtype wrapper for a list of existing devices. We need this to get a
nonstandard FromJSON
instance for the list, because Pushbullet gives us
the list wrapped in a trivial object with one key.
newDevice :: HasSms -> DeviceIcon -> Nickname -> Maybe Manufacturer -> Maybe Model -> Maybe AppVersion -> Device New Source #
Smart constructor for a new device that fills in the ignored fields.
Users
Permanents
data Permanent p where Source #
ThreadsOf :: !DeviceId -> Permanent ThreadList | |
MessagesIn :: !DeviceId -> !SmsThreadId -> Permanent MessageList |
SMS
newtype SmsThreads Source #
newtype SmsThreadId Source #
newtype SmsMessages Source #
data SmsMessage Source #
SmsMessage | |
|
data SmsDirection Source #
data SmsMessageType Source #
Misc
Data
newtype EmailAddress Source #
newtype ChannelTag Source #
newtype TrivialObject Source #
newtype PushbulletTime Source #
newtype PhoneNumber Source #