Copyright | (c) Naoto Shimazaki 2017 |
---|---|
License | MIT (see the file LICENSE) |
Maintainer | https://github.com/nshimaza |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module defines most of types and records used in cisco-spark-api package. Records used for REST communications are designed to be converted from / to JSON using Aeson package. Those records are also designed to allow create lenses by Control.Lens.TH.makeFields.
Following example creates overloaded accessors for Person
, Room
and Team
.
makeFields ''Person makeFields ''Room makeFields ''Team
You can access personId
, roomId
and teamId
via overloaded accessor function id
like this.
let yourPersonId = yourPerson ^. id yourRoomId = yourRoom ^. id yourTeamId = yourTeam ^. id
This package doesn't pre-generate those lenses for you because it is so easy. Please create them by yourself as needed.
Synopsis
- peoplePath :: ByteString
- roomsPath :: ByteString
- membershipsPath :: ByteString
- messagesPath :: ByteString
- teamsPath :: ByteString
- teamMembershipsPath :: ByteString
- organizationsPath :: ByteString
- licensesPath :: ByteString
- rolesPath :: ByteString
- webhooksPath :: ByteString
- class FromJSON (ToList i) => SparkListItem i where
- class SparkApiPath a where
- class FromJSON (ToResponse a) => SparkResponse a where
- type ToResponse a :: *
- class (SparkApiPath a, SparkResponse a) => SparkDetail a where
- class (SparkApiPath a, SparkResponse a) => SparkFilter a where
- class (SparkApiPath a, SparkResponse a, ToJSON a) => SparkCreate a
- class (SparkApiPath a, SparkResponse a, ToJSON a) => SparkUpdate a
- newtype Timestamp = Timestamp Text
- newtype ErrorCode = ErrorCode Text
- data ErrorTitle = ErrorTitle {}
- newtype Errors = Errors {}
- newtype PersonId = PersonId Text
- newtype Email = Email Text
- newtype DisplayName = DisplayName Text
- newtype NickName = NickName Text
- newtype FirstName = FirstName Text
- newtype LastName = LastName Text
- newtype AvatarUrl = AvatarUrl Text
- newtype OrganizationId = OrganizationId Text
- newtype RoleId = RoleId Text
- newtype LicenseId = LicenseId Text
- newtype Timezone = Timezone Text
- data PersonStatus
- data PersonType
- data Person = Person {
- personId :: PersonId
- personErrors :: Maybe Errors
- personEmails :: Maybe [Email]
- personDisplayName :: Maybe DisplayName
- personNickName :: Maybe NickName
- personFirstName :: Maybe FirstName
- personLastName :: Maybe LastName
- personAvatar :: Maybe AvatarUrl
- personOrgId :: Maybe OrganizationId
- personRoles :: Maybe [RoleId]
- personLicenses :: Maybe [LicenseId]
- personCreated :: Maybe Timestamp
- personTimezone :: Maybe Timezone
- personLastActivity :: Maybe Timestamp
- personStatus :: Maybe PersonStatus
- personInvitePending :: Maybe Bool
- personLoginEnabled :: Maybe Bool
- personType :: Maybe PersonType
- newtype PersonList = PersonList {
- personListItems :: [Person]
- data PersonFilter = PersonFilter {}
- data CreatePerson = CreatePerson {
- createPersonEmails :: Maybe [Email]
- createPersonDisplayName :: Maybe DisplayName
- createPersonFirstName :: Maybe FirstName
- createPersonLastName :: Maybe LastName
- createPersonAvatar :: Maybe AvatarUrl
- createPersonOrgId :: Maybe OrganizationId
- createPersonRoles :: Maybe [RoleId]
- createPersonLicenses :: Maybe [LicenseId]
- data UpdatePerson = UpdatePerson {}
- newtype TeamId = TeamId Text
- newtype TeamName = TeamName Text
- data Team = Team {}
- newtype TeamList = TeamList {
- teamListItems :: [Team]
- newtype CreateTeam = CreateTeam {}
- newtype UpdateTeam = UpdateTeam {}
- newtype TeamMembershipId = TeamMembershipId Text
- data TeamMembership = TeamMembership {
- teamMembershipId :: TeamMembershipId
- teamMembershipErrors :: Maybe Errors
- teamMembershipTeamId :: Maybe TeamId
- teamMembershipPersonId :: Maybe PersonId
- teamMembershipPersonEmail :: Maybe Email
- teamMembershipPersonDisplayName :: Maybe DisplayName
- teamMembershipPersonOrgId :: Maybe OrganizationId
- teamMembershipIsModerator :: Maybe Bool
- teamMembershipCreated :: Maybe Timestamp
- newtype TeamMembershipList = TeamMembershipList {}
- newtype TeamMembershipFilter = TeamMembershipFilter {}
- defaultTeamMembershipFilter :: TeamId -> TeamMembershipFilter
- data CreateTeamMembership = CreateTeamMembership {}
- newtype UpdateTeamMembership = UpdateTeamMembership {}
- newtype RoomId = RoomId Text
- newtype RoomTitle = RoomTitle Text
- newtype SipAddr = SipAddr Text
- data RoomType
- data Room = Room {}
- newtype RoomList = RoomList {
- roomListItems :: [Room]
- data RoomFilterSortBy
- data RoomFilter = RoomFilter {}
- roomTypeToFilterString :: RoomType -> ByteString
- roomFilterSortByToFilterString :: RoomFilterSortBy -> ByteString
- data CreateRoom = CreateRoom {}
- newtype UpdateRoom = UpdateRoom {}
- newtype MembershipId = MembershipId Text
- data Membership = Membership {
- membershipId :: MembershipId
- membershipErrors :: Maybe Errors
- membershipRoomId :: Maybe RoomId
- membershipPersonId :: Maybe PersonId
- membershipPersonEmail :: Maybe Email
- membershipPersonDisplayName :: Maybe DisplayName
- membershipPersonOrgId :: Maybe OrganizationId
- membershipIsModerator :: Maybe Bool
- membershipIsMonitor :: Maybe Bool
- membershipCreated :: Maybe Timestamp
- newtype MembershipList = MembershipList {}
- data MembershipFilter = MembershipFilter {}
- data CreateMembership = CreateMembership {}
- newtype UpdateMembership = UpdateMembership {}
- newtype MessageId = MessageId Text
- newtype MessageText = MessageText Text
- newtype MessageHtml = MessageHtml Text
- newtype MessageMarkdown = MessageMarkdown Text
- newtype FileUrl = FileUrl Text
- data Message = Message {
- messageId :: MessageId
- messageErrors :: Maybe Errors
- messageRoomId :: Maybe RoomId
- messageRoomType :: Maybe RoomType
- messageToPersonId :: Maybe PersonId
- messageToPersonEmail :: Maybe Email
- messageText :: Maybe MessageText
- messageHtml :: Maybe MessageHtml
- messageFiles :: Maybe [FileUrl]
- messagePersonId :: Maybe PersonId
- messagePersonEmail :: Maybe Email
- messageCreated :: Maybe Timestamp
- messageMentionedPeople :: Maybe [PersonId]
- newtype MessageList = MessageList {
- messageListItems :: [Message]
- data MentionedPeople
- data MessageFilter = MessageFilter {}
- defaultMessageFilter :: RoomId -> MessageFilter
- mentionedPeopleToFilterString :: MentionedPeople -> ByteString
- data CreateMessage = CreateMessage {}
- newtype OrganizationDisplayName = OrganizationDisplayName Text
- data Organization = Organization {}
- newtype OrganizationList = OrganizationList {}
- newtype LicenseName = LicenseName Text
- newtype LicenseUnit = LicenseUnit Integer
- data License = License {}
- newtype LicenseList = LicenseList {
- licenseListItems :: [License]
- newtype LicenseFilter = LicenseFilter {}
- newtype RoleName = RoleName Text
- data Role = Role {}
- newtype RoleList = RoleList {
- roleListItems :: [Role]
- newtype WebhookId = WebhookId Text
- newtype WebhookName = WebhookName Text
- newtype WebhookUrl = WebhookUrl Text
- newtype WebhookFilter = WebhookFilter Text
- newtype WebhookSecret = WebhookSecret Text
- data WebhookResource
- data WebhookEvent
- data Webhook = Webhook {}
- newtype WebhookList = WebhookList {
- webhookListItems :: [Webhook]
- data CreateWebhook = CreateWebhook {}
- data UpdateWebhook = UpdateWebhook {}
- data WebhookMembershipFilter = WebhookMembershipFilter {}
- data WebhookMessageFilter = WebhookMessageFilter {}
- data WebhookRoomFilter = WebhookRoomFilter {}
- newtype AppId = AppId Text
- data WebhookNotifyOwnedBy
- data WebhookNotifyStatus
- data WebhookNotify = WebhookNotify {
- webhookNotifyId :: WebhookId
- webhookNotifyName :: WebhookName
- webhookNotifyResource :: WebhookResource
- webhookNotifyEvent :: WebhookEvent
- webhookNotifyFilter :: WebhookFilter
- webhookNotifyOrgId :: Organization
- webhookNotifyCreatedBy :: PersonId
- webhookNotifyAppId :: AppId
- webhookNotifyOwnedBy :: WebhookNotifyOwnedBy
- webhookNotifyStatus :: WebhookNotifyStatus
- webhookNotifyActorId :: PersonId
- newtype WebhookNotifyMembership = WebhookNotifyMembership {}
- newtype WebhookNotifyMessage = WebhookNotifyMessage {}
- newtype WebhookNotifyRoom = WebhookNotifyRoom {}
Documentation
peoplePath :: ByteString Source #
URL path for people API.
roomsPath :: ByteString Source #
URL path for rooms API.
membershipsPath :: ByteString Source #
URL path for memberships API.
messagesPath :: ByteString Source #
URL path for messages API.
teamsPath :: ByteString Source #
URL path for teams API.
teamMembershipsPath :: ByteString Source #
URL path for team memberships API.
organizationsPath :: ByteString Source #
URL path for organizations API.
licensesPath :: ByteString Source #
URL path for licenes API.
rolesPath :: ByteString Source #
URL path for roles API.
webhooksPath :: ByteString Source #
URL path for webhooks API.
class FromJSON (ToList i) => SparkListItem i where Source #
SparkListItem is a type class grouping types with following common usage.
- It is used for return value of get-detail APIs.
- It is used for element of return value of list APIs.
SparkListItem also associates the above type to wrapping list type (e.g. associates Person
to PersonList
).
Wrapping type (PersonList in this case) is necessary for parsing JSON from REST API but what we are
interested in is bare list such like [Person]. Type family association defined in this class
is used for type translation from type of items to type of wrapper.
unwrap :: ToList i -> [i] Source #
Get bare list from wrapped type which can be parsed directly from JSON.
Instances
SparkListItem Person Source # |
|
SparkListItem Team Source # | |
SparkListItem TeamMembership Source # | |
Defined in Network.CiscoSpark.Types type ToList TeamMembership :: * Source # unwrap :: ToList TeamMembership -> [TeamMembership] Source # | |
SparkListItem Room Source # | |
SparkListItem Membership Source # |
|
Defined in Network.CiscoSpark.Types type ToList Membership :: * Source # unwrap :: ToList Membership -> [Membership] Source # | |
SparkListItem Message Source # |
|
SparkListItem Organization Source # |
|
Defined in Network.CiscoSpark.Types type ToList Organization :: * Source # unwrap :: ToList Organization -> [Organization] Source # | |
SparkListItem License Source # |
|
SparkListItem Role Source # | |
SparkListItem Webhook Source # |
|
class SparkApiPath a where Source #
Type class for getting URL path of API category from given type of value.
apiPath :: a -> ByteString Source #
Instances
class FromJSON (ToResponse a) => SparkResponse a Source #
Type family to associate a type appears in an argument to response type.
type ToResponse a :: * Source #
Instances
class (SparkApiPath a, SparkResponse a) => SparkDetail a where Source #
Extract containing entity ID string from given type of value.
Instances
SparkDetail LicenseId Source # | User can get detail of a license. |
SparkDetail RoleId Source # | User can get detail of a role. |
SparkDetail OrganizationId Source # | User can get detail of a organization. |
Defined in Network.CiscoSpark.Types toIdStr :: OrganizationId -> Text Source # | |
SparkDetail PersonId Source # | User can get detail of a person. |
SparkDetail TeamId Source # | User can get detail of a team. |
SparkDetail TeamMembershipId Source # | User can get detail of a team membership. |
Defined in Network.CiscoSpark.Types toIdStr :: TeamMembershipId -> Text Source # | |
SparkDetail RoomId Source # | User can get detail of a room. |
SparkDetail MembershipId Source # | User can get detail of a membership. |
Defined in Network.CiscoSpark.Types toIdStr :: MembershipId -> Text Source # | |
SparkDetail MessageId Source # | User can get detail of a message. |
SparkDetail WebhookId Source # | User can get detail of a webhook. |
class (SparkApiPath a, SparkResponse a) => SparkFilter a where Source #
Convert given filter condition parameter in a concrete type to HTTP query strings.
toFilterList :: a -> [(ByteString, Maybe ByteString)] Source #
Instances
class (SparkApiPath a, SparkResponse a, ToJSON a) => SparkCreate a Source #
Type class for parameter type for create entity API.
Instances
SparkCreate CreatePerson Source # | User can create a person. |
Defined in Network.CiscoSpark.Types | |
SparkCreate CreateTeam Source # | User can create a team. |
Defined in Network.CiscoSpark.Types | |
SparkCreate CreateTeamMembership Source # | User can create a teamMembership. |
Defined in Network.CiscoSpark.Types | |
SparkCreate CreateRoom Source # | User can create a room. |
Defined in Network.CiscoSpark.Types | |
SparkCreate CreateMembership Source # | User can create a membership. |
Defined in Network.CiscoSpark.Types | |
SparkCreate CreateMessage Source # | User can create a message. |
Defined in Network.CiscoSpark.Types | |
SparkCreate CreateWebhook Source # | User can create a webhook. |
Defined in Network.CiscoSpark.Types |
class (SparkApiPath a, SparkResponse a, ToJSON a) => SparkUpdate a Source #
Type class for parameter type for update entity API.
Instances
SparkUpdate UpdatePerson Source # | User can update a person. |
Defined in Network.CiscoSpark.Types | |
SparkUpdate UpdateTeam Source # | User can update a team. |
Defined in Network.CiscoSpark.Types | |
SparkUpdate UpdateTeamMembership Source # | User can update a teamMembership. |
Defined in Network.CiscoSpark.Types | |
SparkUpdate UpdateRoom Source # | User can update a room. |
Defined in Network.CiscoSpark.Types | |
SparkUpdate UpdateMembership Source # | User can update a membership. |
Defined in Network.CiscoSpark.Types | |
SparkUpdate UpdateWebhook Source # | User can update a webhook. |
Defined in Network.CiscoSpark.Types |
Type representing timestamp. For now, it is just copied from API response JSON.
Instances
Eq Timestamp Source # | |
Show Timestamp Source # | |
Generic Timestamp Source # | |
FromJSON Timestamp Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Timestamp parseJSONList :: Value -> Parser [Timestamp] | |
ToJSON Timestamp Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: Timestamp -> Encoding toJSONList :: [Timestamp] -> Value toEncodingList :: [Timestamp] -> Encoding | |
type Rep Timestamp Source # | |
Defined in Network.CiscoSpark.Types |
Error code for element level error potentially contained in List API responses.
Instances
Eq ErrorCode Source # | |
Show ErrorCode Source # | |
Generic ErrorCode Source # | |
FromJSON ErrorCode Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser ErrorCode parseJSONList :: Value -> Parser [ErrorCode] | |
ToJSON ErrorCode Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: ErrorCode -> Encoding toJSONList :: [ErrorCode] -> Value toEncodingList :: [ErrorCode] -> Encoding | |
type Rep ErrorCode Source # | |
Defined in Network.CiscoSpark.Types |
data ErrorTitle Source #
ErrorTitle
represent concrete error code and reason. It appears in Errors
.
ErrorTitle | |
|
Instances
Eq ErrorTitle Source # | |
Defined in Network.CiscoSpark.Types (==) :: ErrorTitle -> ErrorTitle -> Bool # (/=) :: ErrorTitle -> ErrorTitle -> Bool # | |
Show ErrorTitle Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> ErrorTitle -> ShowS # show :: ErrorTitle -> String # showList :: [ErrorTitle] -> ShowS # | |
FromJSON ErrorTitle Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser ErrorTitle parseJSONList :: Value -> Parser [ErrorTitle] | |
ToJSON ErrorTitle Source # | |
Defined in Network.CiscoSpark.Types toJSON :: ErrorTitle -> Value toEncoding :: ErrorTitle -> Encoding toJSONList :: [ErrorTitle] -> Value toEncodingList :: [ErrorTitle] -> Encoding |
Errors
is used for element level error in List API.
When list API failed to retrieve an element, it returns this object for the element
and response API status as successful instead of failing entire API request.
Refer to API Document for more detail.
Instances
Eq Errors Source # | |
Show Errors Source # | |
FromJSON Errors Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Errors parseJSONList :: Value -> Parser [Errors] | |
ToJSON Errors Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: Errors -> Encoding toJSONList :: [Errors] -> Value toEncodingList :: [Errors] -> Encoding |
Identifying Person
describing detail of Cisco Spark user or bot.
Instances
Eq PersonId Source # | |
Show PersonId Source # | |
Generic PersonId Source # | |
FromJSON PersonId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser PersonId parseJSONList :: Value -> Parser [PersonId] | |
ToJSON PersonId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: PersonId -> Encoding toJSONList :: [PersonId] -> Value toEncodingList :: [PersonId] -> Encoding | |
SparkDetail PersonId Source # | User can get detail of a person. |
SparkResponse PersonId Source # | Get detail for a person API uses "PersonId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse PersonId :: * Source # | |
SparkApiPath PersonId Source # | Get detail for a person API uses |
Defined in Network.CiscoSpark.Types apiPath :: PersonId -> ByteString Source # | |
type Rep PersonId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse PersonId Source # | |
Defined in Network.CiscoSpark.Types |
Email address of user.
Instances
Eq Email Source # | |
Show Email Source # | |
Generic Email Source # | |
FromJSON Email Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Email parseJSONList :: Value -> Parser [Email] | |
ToJSON Email Source # | |
Defined in Network.CiscoSpark.Types | |
type Rep Email Source # | |
Defined in Network.CiscoSpark.Types |
newtype DisplayName Source #
Display name of user.
Instances
Nickname of user.
Instances
Eq NickName Source # | |
Show NickName Source # | |
Generic NickName Source # | |
FromJSON NickName Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser NickName parseJSONList :: Value -> Parser [NickName] | |
ToJSON NickName Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: NickName -> Encoding toJSONList :: [NickName] -> Value toEncodingList :: [NickName] -> Encoding | |
type Rep NickName Source # | |
Defined in Network.CiscoSpark.Types |
First name of user.
Instances
Eq FirstName Source # | |
Show FirstName Source # | |
Generic FirstName Source # | |
FromJSON FirstName Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser FirstName parseJSONList :: Value -> Parser [FirstName] | |
ToJSON FirstName Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: FirstName -> Encoding toJSONList :: [FirstName] -> Value toEncodingList :: [FirstName] -> Encoding | |
type Rep FirstName Source # | |
Defined in Network.CiscoSpark.Types |
Last name of user.
Instances
Eq LastName Source # | |
Show LastName Source # | |
Generic LastName Source # | |
FromJSON LastName Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser LastName parseJSONList :: Value -> Parser [LastName] | |
ToJSON LastName Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: LastName -> Encoding toJSONList :: [LastName] -> Value toEncodingList :: [LastName] -> Encoding | |
type Rep LastName Source # | |
Defined in Network.CiscoSpark.Types |
URL pointing to image file of Avatar.
Instances
Eq AvatarUrl Source # | |
Show AvatarUrl Source # | |
Generic AvatarUrl Source # | |
FromJSON AvatarUrl Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser AvatarUrl parseJSONList :: Value -> Parser [AvatarUrl] | |
ToJSON AvatarUrl Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: AvatarUrl -> Encoding toJSONList :: [AvatarUrl] -> Value toEncodingList :: [AvatarUrl] -> Encoding | |
type Rep AvatarUrl Source # | |
Defined in Network.CiscoSpark.Types |
newtype OrganizationId Source #
Organization
identifier which user or team belongs to.
Instances
Instances
Eq RoleId Source # | |
Show RoleId Source # | |
Generic RoleId Source # | |
FromJSON RoleId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoleId parseJSONList :: Value -> Parser [RoleId] | |
ToJSON RoleId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoleId -> Encoding toJSONList :: [RoleId] -> Value toEncodingList :: [RoleId] -> Encoding | |
SparkDetail RoleId Source # | User can get detail of a role. |
SparkResponse RoleId Source # | Get detail for a role API uses "RoleId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse RoleId :: * Source # | |
SparkApiPath RoleId Source # | Get detail for role API uses |
Defined in Network.CiscoSpark.Types apiPath :: RoleId -> ByteString Source # | |
type Rep RoleId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse RoleId Source # | |
Defined in Network.CiscoSpark.Types |
Instances
Eq LicenseId Source # | |
Show LicenseId Source # | |
Generic LicenseId Source # | |
FromJSON LicenseId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser LicenseId parseJSONList :: Value -> Parser [LicenseId] | |
ToJSON LicenseId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: LicenseId -> Encoding toJSONList :: [LicenseId] -> Value toEncodingList :: [LicenseId] -> Encoding | |
SparkDetail LicenseId Source # | User can get detail of a license. |
SparkResponse LicenseId Source # | Get detail for a license API uses "LicenseId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse LicenseId :: * Source # | |
SparkApiPath LicenseId Source # | Get detail for license API uses |
Defined in Network.CiscoSpark.Types apiPath :: LicenseId -> ByteString Source # | |
type Rep LicenseId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse LicenseId Source # | |
Defined in Network.CiscoSpark.Types |
Timezone in timezone name.
Instances
Eq Timezone Source # | |
Show Timezone Source # | |
Generic Timezone Source # | |
FromJSON Timezone Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Timezone parseJSONList :: Value -> Parser [Timezone] | |
ToJSON Timezone Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: Timezone -> Encoding toJSONList :: [Timezone] -> Value toEncodingList :: [Timezone] -> Encoding | |
type Rep Timezone Source # | |
Defined in Network.CiscoSpark.Types |
data PersonStatus Source #
Current status of Person
.
It can be updated automatically by recent activity or explicitly updated by user's operation
or propagated from vacation setting on email system.
PersonStatusActive | The |
PersonStatusInactive | The |
PersonStatusOutOfOffice | Email system of the |
PersonStatusDoNotDisturb | The |
PersonStatusUnknown | The status of the |
Instances
data PersonType Source #
PersonType
indicates whether the Person is real human or bot.
PersonTypePerson | The |
PersonTypeBot | The |
Instances
Eq PersonType Source # | |
Defined in Network.CiscoSpark.Types (==) :: PersonType -> PersonType -> Bool # (/=) :: PersonType -> PersonType -> Bool # | |
Show PersonType Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> PersonType -> ShowS # show :: PersonType -> String # showList :: [PersonType] -> ShowS # | |
FromJSON PersonType Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser PersonType parseJSONList :: Value -> Parser [PersonType] | |
ToJSON PersonType Source # | |
Defined in Network.CiscoSpark.Types toJSON :: PersonType -> Value toEncoding :: PersonType -> Encoding toJSONList :: [PersonType] -> Value toEncodingList :: [PersonType] -> Encoding |
Person
is detail description of Cisco Spark user or bot.
Person is decoded from response JSON of Get Person Details REST call.
It is also element type of response of List People call.
Person | |
|
Instances
Eq Person Source # | |
Show Person Source # | |
FromJSON Person Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Person parseJSONList :: Value -> Parser [Person] | |
ToJSON Person Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: Person -> Encoding toJSONList :: [Person] -> Value toEncodingList :: [Person] -> Encoding | |
SparkListItem Person Source # |
|
type ToList Person Source # | |
Defined in Network.CiscoSpark.Types |
newtype PersonList Source #
PersonList
is decoded from response JSON of List People REST call. It is list of Person
.
Instances
Eq PersonList Source # | |
Defined in Network.CiscoSpark.Types (==) :: PersonList -> PersonList -> Bool # (/=) :: PersonList -> PersonList -> Bool # | |
Show PersonList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> PersonList -> ShowS # show :: PersonList -> String # showList :: [PersonList] -> ShowS # | |
FromJSON PersonList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser PersonList parseJSONList :: Value -> Parser [PersonList] | |
ToJSON PersonList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: PersonList -> Value toEncoding :: PersonList -> Encoding toJSONList :: [PersonList] -> Value toEncodingList :: [PersonList] -> Encoding |
data PersonFilter Source #
Optional query strings for people list API.
PersonFilter | |
|
Instances
data CreatePerson Source #
CreatePerson
is encoded to request body JSON of Create a Person REST call.
CreatePerson | |
|
Instances
data UpdatePerson Source #
UpdatePerson
is encoded to request body JSON of Update a Person REST call.
UpdatePerson | |
|
Instances
Identifying Team.
Instances
Eq TeamId Source # | |
Show TeamId Source # | |
Generic TeamId Source # | |
FromJSON TeamId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser TeamId parseJSONList :: Value -> Parser [TeamId] | |
ToJSON TeamId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: TeamId -> Encoding toJSONList :: [TeamId] -> Value toEncodingList :: [TeamId] -> Encoding | |
SparkDetail TeamId Source # | User can get detail of a team. |
SparkResponse TeamId Source # | Get detail for a team API uses "TeamId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse TeamId :: * Source # | |
SparkApiPath TeamId Source # | Get detail for a team API uses |
Defined in Network.CiscoSpark.Types apiPath :: TeamId -> ByteString Source # | |
type Rep TeamId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse TeamId Source # | |
Defined in Network.CiscoSpark.Types |
Name of Team
Instances
Eq TeamName Source # | |
Show TeamName Source # | |
Generic TeamName Source # | |
FromJSON TeamName Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser TeamName parseJSONList :: Value -> Parser [TeamName] | |
ToJSON TeamName Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: TeamName -> Encoding toJSONList :: [TeamName] -> Value toEncodingList :: [TeamName] -> Encoding | |
type Rep TeamName Source # | |
Defined in Network.CiscoSpark.Types |
Team
is group of Person
and group of Room
.
A Person can belong to multiple Team but a Room can belong to at most one Team.
Team is decoded from response JSON of Get Team Details REST call.
It is also element type of response of List Teams call.
Team | |
|
Instances
Eq Team Source # | |
Show Team Source # | |
FromJSON Team Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Team parseJSONList :: Value -> Parser [Team] | |
ToJSON Team Source # | |
Defined in Network.CiscoSpark.Types | |
SparkListItem Team Source # | |
type ToList Team Source # | |
Defined in Network.CiscoSpark.Types |
TeamList | |
|
Instances
Eq TeamList Source # | |
Show TeamList Source # | |
FromJSON TeamList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser TeamList parseJSONList :: Value -> Parser [TeamList] | |
ToJSON TeamList Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: TeamList -> Encoding toJSONList :: [TeamList] -> Value toEncodingList :: [TeamList] -> Encoding |
newtype CreateTeam Source #
CreateTeam
is encoded to request body JSON of Create a Team REST call.
Instances
newtype UpdateTeam Source #
UpdateTeam
is encoded to request body JSON of Update a Team REST call.
Instances
newtype TeamMembershipId Source #
Identifying TeamMembership.
Instances
data TeamMembership Source #
TeamMembership
is association between Team
and Person
.
It can be N:N relation. A Person can belong to multiple Team.
TeamMembership is decoded from response JSON of Get Team Membership Details REST call.
It is also element type of response of List Team Memberships call.
TeamMembership | |
|
Instances
newtype TeamMembershipList Source #
TeamMembershipList
is decoded from response JSON of List Team Memberships REST call. It is list of TeamMembership
.
Instances
Eq TeamMembershipList Source # | |
Defined in Network.CiscoSpark.Types (==) :: TeamMembershipList -> TeamMembershipList -> Bool # (/=) :: TeamMembershipList -> TeamMembershipList -> Bool # | |
Show TeamMembershipList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> TeamMembershipList -> ShowS # show :: TeamMembershipList -> String # showList :: [TeamMembershipList] -> ShowS # | |
FromJSON TeamMembershipList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser TeamMembershipList parseJSONList :: Value -> Parser [TeamMembershipList] | |
ToJSON TeamMembershipList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: TeamMembershipList -> Value toEncoding :: TeamMembershipList -> Encoding toJSONList :: [TeamMembershipList] -> Value toEncodingList :: [TeamMembershipList] -> Encoding |
newtype TeamMembershipFilter Source #
Optional query strings for team membership list API
TeamMembershipFilter | |
|
Instances
defaultTeamMembershipFilter :: TeamId -> TeamMembershipFilter Source #
Default value of query strings for team membership list API.
Because TeamId
is mandatory, user have to supply it in order to get rest of defaults.
As of writing, there is no filter parameter other than TeamId but TeamMembershipFilter
is
used for providing consistent API like streamEntityWithFilter
.
data CreateTeamMembership Source #
CreateTeamMembership
is encoded to request body JSON of Create a Team Membership REST call.
CreateTeamMembership | |
|
Instances
newtype UpdateTeamMembership Source #
UpdateTeamMembership
is encoded to request body JSON of Update a Team Membership REST call.
Instances
Identifying Room
.
Instances
Eq RoomId Source # | |
Show RoomId Source # | |
Generic RoomId Source # | |
FromJSON RoomId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoomId parseJSONList :: Value -> Parser [RoomId] | |
ToJSON RoomId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoomId -> Encoding toJSONList :: [RoomId] -> Value toEncodingList :: [RoomId] -> Encoding | |
SparkDetail RoomId Source # | User can get detail of a room. |
SparkResponse RoomId Source # | Get detail for a room API uses "RoomId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse RoomId :: * Source # | |
SparkApiPath RoomId Source # | Get detail for a room API uses |
Defined in Network.CiscoSpark.Types apiPath :: RoomId -> ByteString Source # | |
type Rep RoomId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse RoomId Source # | |
Defined in Network.CiscoSpark.Types |
Title text of Room
.
Instances
Eq RoomTitle Source # | |
Show RoomTitle Source # | |
Generic RoomTitle Source # | |
FromJSON RoomTitle Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoomTitle parseJSONList :: Value -> Parser [RoomTitle] | |
ToJSON RoomTitle Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoomTitle -> Encoding toJSONList :: [RoomTitle] -> Value toEncodingList :: [RoomTitle] -> Encoding | |
type Rep RoomTitle Source # | |
Defined in Network.CiscoSpark.Types |
SIP address.
Instances
Eq SipAddr Source # | |
Show SipAddr Source # | |
Generic SipAddr Source # | |
FromJSON SipAddr Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser SipAddr parseJSONList :: Value -> Parser [SipAddr] | |
ToJSON SipAddr Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: SipAddr -> Encoding toJSONList :: [SipAddr] -> Value toEncodingList :: [SipAddr] -> Encoding | |
type Rep SipAddr Source # | |
Defined in Network.CiscoSpark.Types |
RoomTypeDirect | The Room is for 1:1. Decoded from "direct". |
RoomTypeGroup | The Room is for group. Decoded from "group". |
Instances
Eq RoomType Source # | |
Show RoomType Source # | |
FromJSON RoomType Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoomType parseJSONList :: Value -> Parser [RoomType] | |
ToJSON RoomType Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoomType -> Encoding toJSONList :: [RoomType] -> Value toEncodingList :: [RoomType] -> Encoding |
Room
is communication space in Cisco Spark and called "Space" on UI.
Historically it was called Room on UI too but UI has been changed to "Space" in order to avoid
confusion with the concept "Room" associated to hardware facility of video conferencing on Spark.
The name of Room is kept unchanged for backward compatibility.
Room is decoded from response JSON of Get Room Details REST call. It is also element type of response of List Rooms call.
Room | |
|
Instances
Eq Room Source # | |
Show Room Source # | |
FromJSON Room Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Room parseJSONList :: Value -> Parser [Room] | |
ToJSON Room Source # | |
Defined in Network.CiscoSpark.Types | |
SparkListItem Room Source # | |
type ToList Room Source # | |
Defined in Network.CiscoSpark.Types |
RoomList | |
|
Instances
Eq RoomList Source # | |
Show RoomList Source # | |
FromJSON RoomList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoomList parseJSONList :: Value -> Parser [RoomList] | |
ToJSON RoomList Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoomList -> Encoding toJSONList :: [RoomList] -> Value toEncodingList :: [RoomList] -> Encoding |
data RoomFilterSortBy Source #
Sorting option for room list API.
Instances
Eq RoomFilterSortBy Source # | |
Defined in Network.CiscoSpark.Types (==) :: RoomFilterSortBy -> RoomFilterSortBy -> Bool # (/=) :: RoomFilterSortBy -> RoomFilterSortBy -> Bool # | |
Show RoomFilterSortBy Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> RoomFilterSortBy -> ShowS # show :: RoomFilterSortBy -> String # showList :: [RoomFilterSortBy] -> ShowS # |
data RoomFilter Source #
Optional query strings for room list API
RoomFilter | |
|
Instances
roomTypeToFilterString :: RoomType -> ByteString Source #
Sum type to ByteString converter for RoomType
.
roomFilterSortByToFilterString :: RoomFilterSortBy -> ByteString Source #
Sum type to ByteString converter for RoomFilterSortBy
.
data CreateRoom Source #
CreateRoom
is encoded to request body JSON of Create a Room REST call.
CreateRoom | |
|
Instances
newtype UpdateRoom Source #
UpdateRoom
is encoded to request body JSON of Update a Room REST call.
Instances
newtype MembershipId Source #
Identifying Membership
.
Instances
data Membership Source #
Membership
is association between Room
and Person
.
It can be N:N relation. A Person can belong to multiple Room.
Membership is decoded from response JSON of Get Membership Details REST call.
It is also element type of response of List Memberships call.
Membership | |
|
Instances
newtype MembershipList Source #
MembershipList
is decoded from response JSON of List Memberships REST call. It is list of Membership
.
Instances
Eq MembershipList Source # | |
Defined in Network.CiscoSpark.Types (==) :: MembershipList -> MembershipList -> Bool # (/=) :: MembershipList -> MembershipList -> Bool # | |
Show MembershipList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> MembershipList -> ShowS # show :: MembershipList -> String # showList :: [MembershipList] -> ShowS # | |
FromJSON MembershipList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser MembershipList parseJSONList :: Value -> Parser [MembershipList] | |
ToJSON MembershipList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: MembershipList -> Value toEncoding :: MembershipList -> Encoding toJSONList :: [MembershipList] -> Value toEncodingList :: [MembershipList] -> Encoding |
data MembershipFilter Source #
Optional query strings for room membership list API
MembershipFilter | |
|
Instances
data CreateMembership Source #
CreateMembership
is encoded to request body JSON of Create a Membership REST call.
CreateMembership | |
|
Instances
newtype UpdateMembership Source #
UpdateMembership
is encoded to request body JSON of Update a Membership REST call.
Instances
Identifying Message
.
Instances
Eq MessageId Source # | |
Show MessageId Source # | |
Generic MessageId Source # | |
FromJSON MessageId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser MessageId parseJSONList :: Value -> Parser [MessageId] | |
ToJSON MessageId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: MessageId -> Encoding toJSONList :: [MessageId] -> Value toEncodingList :: [MessageId] -> Encoding | |
SparkDetail MessageId Source # | User can get detail of a message. |
SparkResponse MessageId Source # | Get detail for a message API uses "MessageId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse MessageId :: * Source # | |
SparkApiPath MessageId Source # | Get detail for message API uses |
Defined in Network.CiscoSpark.Types apiPath :: MessageId -> ByteString Source # | |
type Rep MessageId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse MessageId Source # | |
Defined in Network.CiscoSpark.Types |
newtype MessageText Source #
Body of message in plain text.
Instances
newtype MessageHtml Source #
Body of message in html.
Instances
newtype MessageMarkdown Source #
Body of message in markdown.
Instances
URL pointing attached file of message.
Instances
Eq FileUrl Source # | |
Show FileUrl Source # | |
Generic FileUrl Source # | |
FromJSON FileUrl Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser FileUrl parseJSONList :: Value -> Parser [FileUrl] | |
ToJSON FileUrl Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: FileUrl -> Encoding toJSONList :: [FileUrl] -> Value toEncodingList :: [FileUrl] -> Encoding | |
type Rep FileUrl Source # | |
Defined in Network.CiscoSpark.Types |
Message
is a message posted to a Room
by some Person
.
Room is decoded from response JSON of Get Message Details REST call.
It is also element type of response of List Messages call.
Message | |
|
Instances
Eq Message Source # | |
Show Message Source # | |
FromJSON Message Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Message parseJSONList :: Value -> Parser [Message] | |
ToJSON Message Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: Message -> Encoding toJSONList :: [Message] -> Value toEncodingList :: [Message] -> Encoding | |
SparkListItem Message Source # |
|
type ToList Message Source # | |
Defined in Network.CiscoSpark.Types |
newtype MessageList Source #
MessageList
is decoded from response JSON of List Messages REST call. It is list of Message
.
Instances
Eq MessageList Source # | |
Defined in Network.CiscoSpark.Types (==) :: MessageList -> MessageList -> Bool # (/=) :: MessageList -> MessageList -> Bool # | |
Show MessageList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> MessageList -> ShowS # show :: MessageList -> String # showList :: [MessageList] -> ShowS # | |
FromJSON MessageList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser MessageList parseJSONList :: Value -> Parser [MessageList] | |
ToJSON MessageList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: MessageList -> Value toEncoding :: MessageList -> Encoding toJSONList :: [MessageList] -> Value toEncodingList :: [MessageList] -> Encoding |
data MentionedPeople Source #
Sum type for mentionedPeople query string. It can be "me" or PersonId
.
Instances
Eq MentionedPeople Source # | |
Defined in Network.CiscoSpark.Types (==) :: MentionedPeople -> MentionedPeople -> Bool # (/=) :: MentionedPeople -> MentionedPeople -> Bool # | |
Show MentionedPeople Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> MentionedPeople -> ShowS # show :: MentionedPeople -> String # showList :: [MentionedPeople] -> ShowS # |
data MessageFilter Source #
Optional query strings for message list API
MessageFilter | |
|
Instances
Eq MessageFilter Source # | |
Defined in Network.CiscoSpark.Types (==) :: MessageFilter -> MessageFilter -> Bool # (/=) :: MessageFilter -> MessageFilter -> Bool # | |
Show MessageFilter Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> MessageFilter -> ShowS # show :: MessageFilter -> String # showList :: [MessageFilter] -> ShowS # | |
SparkFilter MessageFilter Source # | User can list messages with filter parameter. |
Defined in Network.CiscoSpark.Types toFilterList :: MessageFilter -> [(ByteString, Maybe ByteString)] Source # | |
SparkResponse MessageFilter Source # | List messages API uses |
Defined in Network.CiscoSpark.Types type ToResponse MessageFilter :: * Source # | |
SparkApiPath MessageFilter Source # | List messages API uses |
Defined in Network.CiscoSpark.Types apiPath :: MessageFilter -> ByteString Source # | |
type ToResponse MessageFilter Source # | |
Defined in Network.CiscoSpark.Types |
defaultMessageFilter :: RoomId -> MessageFilter Source #
Default value of query strings for message list API.
Because RoomId
is mandatory, user have to supply it in order to get rest of defaults.
mentionedPeopleToFilterString :: MentionedPeople -> ByteString Source #
Sum type to ByteString converter for mentionedPeople query string.
data CreateMessage Source #
CreateMessage
is encoded to request body JSON of Create a Message REST call.
CreateMessage | |
|
Instances
newtype OrganizationDisplayName Source #
Display name of Organization
Instances
data Organization Source #
Organization
is an administrative group of Cisco Spark users.
Each Person
belongs to one Organization.
Organization is decoded from response JSON of Get Organization Details REST call.
It is also element type of response of List Organizations call.
Organization | |
|
Instances
newtype OrganizationList Source #
OrganizationList
is decoded from response JSON of List Organizations REST call. It is list of Organization
.
Instances
Eq OrganizationList Source # | |
Defined in Network.CiscoSpark.Types (==) :: OrganizationList -> OrganizationList -> Bool # (/=) :: OrganizationList -> OrganizationList -> Bool # | |
Show OrganizationList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> OrganizationList -> ShowS # show :: OrganizationList -> String # showList :: [OrganizationList] -> ShowS # | |
FromJSON OrganizationList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser OrganizationList parseJSONList :: Value -> Parser [OrganizationList] | |
ToJSON OrganizationList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: OrganizationList -> Value toEncoding :: OrganizationList -> Encoding toJSONList :: [OrganizationList] -> Value toEncodingList :: [OrganizationList] -> Encoding |
newtype LicenseName Source #
Display name of License
Instances
newtype LicenseUnit Source #
Counting number of granted or consumed License
Instances
License
is allowance for features and services of Cisco Spark subscription.
License is decoded from response JSON of Get License Details REST call.
It is also element type of response of List Licenses call.
License | |
|
Instances
Eq License Source # | |
Show License Source # | |
FromJSON License Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser License parseJSONList :: Value -> Parser [License] | |
ToJSON License Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: License -> Encoding toJSONList :: [License] -> Value toEncodingList :: [License] -> Encoding | |
SparkListItem License Source # |
|
type ToList License Source # | |
Defined in Network.CiscoSpark.Types |
newtype LicenseList Source #
LicenseList
is decoded from response JSON of List Licenses REST call. It is list of License
.
Instances
Eq LicenseList Source # | |
Defined in Network.CiscoSpark.Types (==) :: LicenseList -> LicenseList -> Bool # (/=) :: LicenseList -> LicenseList -> Bool # | |
Show LicenseList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> LicenseList -> ShowS # show :: LicenseList -> String # showList :: [LicenseList] -> ShowS # | |
FromJSON LicenseList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser LicenseList parseJSONList :: Value -> Parser [LicenseList] | |
ToJSON LicenseList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: LicenseList -> Value toEncoding :: LicenseList -> Encoding toJSONList :: [LicenseList] -> Value toEncodingList :: [LicenseList] -> Encoding |
newtype LicenseFilter Source #
Optional query strings for license list API
LicenseFilter | |
|
Instances
Name of Role
.
Instances
Eq RoleName Source # | |
Show RoleName Source # | |
Generic RoleName Source # | |
FromJSON RoleName Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoleName parseJSONList :: Value -> Parser [RoleName] | |
ToJSON RoleName Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoleName -> Encoding toJSONList :: [RoleName] -> Value toEncodingList :: [RoleName] -> Encoding | |
type Rep RoleName Source # | |
Defined in Network.CiscoSpark.Types |
A persona for an authenticated user, corresponding to a set of privileges within an organization. Role is decoded from response JSON of Get Role Details REST call. It is also element type of response of List Roles call.
Instances
Eq Role Source # | |
Show Role Source # | |
FromJSON Role Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Role parseJSONList :: Value -> Parser [Role] | |
ToJSON Role Source # | |
Defined in Network.CiscoSpark.Types | |
SparkListItem Role Source # | |
type ToList Role Source # | |
Defined in Network.CiscoSpark.Types |
RoleList | |
|
Instances
Eq RoleList Source # | |
Show RoleList Source # | |
FromJSON RoleList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser RoleList parseJSONList :: Value -> Parser [RoleList] | |
ToJSON RoleList Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: RoleList -> Encoding toJSONList :: [RoleList] -> Value toEncodingList :: [RoleList] -> Encoding |
Instances
Eq WebhookId Source # | |
Show WebhookId Source # | |
Generic WebhookId Source # | |
FromJSON WebhookId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookId parseJSONList :: Value -> Parser [WebhookId] | |
ToJSON WebhookId Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: WebhookId -> Encoding toJSONList :: [WebhookId] -> Value toEncodingList :: [WebhookId] -> Encoding | |
SparkDetail WebhookId Source # | User can get detail of a webhook. |
SparkResponse WebhookId Source # | Get detail for a webhook API uses "WebhookId' and responses |
Defined in Network.CiscoSpark.Types type ToResponse WebhookId :: * Source # | |
SparkApiPath WebhookId Source # | Get detail for webhook API uses |
Defined in Network.CiscoSpark.Types apiPath :: WebhookId -> ByteString Source # | |
type Rep WebhookId Source # | |
Defined in Network.CiscoSpark.Types | |
type ToResponse WebhookId Source # | |
Defined in Network.CiscoSpark.Types |
newtype WebhookName Source #
Name of Webhook
.
Instances
newtype WebhookUrl Source #
URL pointing to webhook target.
Instances
newtype WebhookFilter Source #
URL-encoded set of webhook filtering criteria.
Instances
newtype WebhookSecret Source #
Shared secret supplied by user to authenticate Spark Cloud by webhook receiver.
Instances
data WebhookResource Source #
WebhookResource
indicates source of event which triggered webhook access.
WebhookResourceAll | |
WebhookResourceTeams | |
WebhookResourceMemberships | |
WebhookResourceMessages | |
WebhookResourceRooms |
Instances
Eq WebhookResource Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookResource -> WebhookResource -> Bool # (/=) :: WebhookResource -> WebhookResource -> Bool # | |
Show WebhookResource Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookResource -> ShowS # show :: WebhookResource -> String # showList :: [WebhookResource] -> ShowS # | |
FromJSON WebhookResource Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookResource parseJSONList :: Value -> Parser [WebhookResource] | |
ToJSON WebhookResource Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookResource -> Value toEncoding :: WebhookResource -> Encoding toJSONList :: [WebhookResource] -> Value toEncodingList :: [WebhookResource] -> Encoding |
data WebhookEvent Source #
WebhookEvent indicates which event triggered Webhook access.
Instances
Eq WebhookEvent Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookEvent -> WebhookEvent -> Bool # (/=) :: WebhookEvent -> WebhookEvent -> Bool # | |
Show WebhookEvent Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookEvent -> ShowS # show :: WebhookEvent -> String # showList :: [WebhookEvent] -> ShowS # | |
FromJSON WebhookEvent Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookEvent parseJSONList :: Value -> Parser [WebhookEvent] | |
ToJSON WebhookEvent Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookEvent -> Value toEncoding :: WebhookEvent -> Encoding toJSONList :: [WebhookEvent] -> Value toEncodingList :: [WebhookEvent] -> Encoding |
Webhook
allow your app to be notified via HTTP when a specific event occurs on Spark. For example,
your app can register a webhook to be notified when a new message is posted into a specific room.
Webhook | |
|
Instances
Eq Webhook Source # | |
Show Webhook Source # | |
FromJSON Webhook Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser Webhook parseJSONList :: Value -> Parser [Webhook] | |
ToJSON Webhook Source # | |
Defined in Network.CiscoSpark.Types toEncoding :: Webhook -> Encoding toJSONList :: [Webhook] -> Value toEncodingList :: [Webhook] -> Encoding | |
SparkListItem Webhook Source # |
|
type ToList Webhook Source # | |
Defined in Network.CiscoSpark.Types |
newtype WebhookList Source #
WebhookList
is decoded from response JSON of List Webhook REST call. It is list of Webhook
.
Instances
Eq WebhookList Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookList -> WebhookList -> Bool # (/=) :: WebhookList -> WebhookList -> Bool # | |
Show WebhookList Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookList -> ShowS # show :: WebhookList -> String # showList :: [WebhookList] -> ShowS # | |
FromJSON WebhookList Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookList parseJSONList :: Value -> Parser [WebhookList] | |
ToJSON WebhookList Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookList -> Value toEncoding :: WebhookList -> Encoding toJSONList :: [WebhookList] -> Value toEncodingList :: [WebhookList] -> Encoding |
data CreateWebhook Source #
CreateWebhook
is encoded to request body JSON of Create a Webhook REST call.
CreateWebhook | |
|
Instances
data UpdateWebhook Source #
UpdateWebhook
is encoded to request body JSON of Update a Webhook REST call.
UpdateWebhook | |
|
Instances
data WebhookMembershipFilter Source #
Optional query strings for membership event.
WebhookMembershipFilter | |
|
Instances
Eq WebhookMembershipFilter Source # | |
Defined in Network.CiscoSpark.Types | |
Show WebhookMembershipFilter Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookMembershipFilter -> ShowS # show :: WebhookMembershipFilter -> String # showList :: [WebhookMembershipFilter] -> ShowS # | |
SparkFilter WebhookMembershipFilter Source # | User can filter Webhook events from membership. |
Defined in Network.CiscoSpark.Types toFilterList :: WebhookMembershipFilter -> [(ByteString, Maybe ByteString)] Source # | |
SparkResponse WebhookMembershipFilter Source # | List team memberships API accepts |
Defined in Network.CiscoSpark.Types type ToResponse WebhookMembershipFilter :: * Source # | |
SparkApiPath WebhookMembershipFilter Source # | Create webhook API accepts |
Defined in Network.CiscoSpark.Types | |
type ToResponse WebhookMembershipFilter Source # | |
Defined in Network.CiscoSpark.Types |
data WebhookMessageFilter Source #
Optional query strings for message event.
WebhookMessageFilter | |
|
Instances
data WebhookRoomFilter Source #
Optional query strings for room event.
WebhookRoomFilter | |
|
Instances
Eq WebhookRoomFilter Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookRoomFilter -> WebhookRoomFilter -> Bool # (/=) :: WebhookRoomFilter -> WebhookRoomFilter -> Bool # | |
Show WebhookRoomFilter Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookRoomFilter -> ShowS # show :: WebhookRoomFilter -> String # showList :: [WebhookRoomFilter] -> ShowS # | |
SparkFilter WebhookRoomFilter Source # | User can filter Webhook events from room. |
Defined in Network.CiscoSpark.Types toFilterList :: WebhookRoomFilter -> [(ByteString, Maybe ByteString)] Source # | |
SparkResponse WebhookRoomFilter Source # | List team memberships API accepts |
Defined in Network.CiscoSpark.Types type ToResponse WebhookRoomFilter :: * Source # | |
SparkApiPath WebhookRoomFilter Source # | Create webhook API accepts |
Defined in Network.CiscoSpark.Types | |
type ToResponse WebhookRoomFilter Source # | |
Defined in Network.CiscoSpark.Types |
Identifier of app.
Instances
Eq AppId Source # | |
Show AppId Source # | |
Generic AppId Source # | |
FromJSON AppId Source # | |
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser AppId parseJSONList :: Value -> Parser [AppId] | |
ToJSON AppId Source # | |
Defined in Network.CiscoSpark.Types | |
type Rep AppId Source # | |
Defined in Network.CiscoSpark.Types |
data WebhookNotifyOwnedBy Source #
WebhookNotifyOwnedBy
indicates if the webhook is owned by the org or the creator.
Instances
Eq WebhookNotifyOwnedBy Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookNotifyOwnedBy -> WebhookNotifyOwnedBy -> Bool # (/=) :: WebhookNotifyOwnedBy -> WebhookNotifyOwnedBy -> Bool # | |
Show WebhookNotifyOwnedBy Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookNotifyOwnedBy -> ShowS # show :: WebhookNotifyOwnedBy -> String # showList :: [WebhookNotifyOwnedBy] -> ShowS # | |
FromJSON WebhookNotifyOwnedBy Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookNotifyOwnedBy parseJSONList :: Value -> Parser [WebhookNotifyOwnedBy] | |
ToJSON WebhookNotifyOwnedBy Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookNotifyOwnedBy -> Value toEncoding :: WebhookNotifyOwnedBy -> Encoding toJSONList :: [WebhookNotifyOwnedBy] -> Value toEncodingList :: [WebhookNotifyOwnedBy] -> Encoding |
data WebhookNotifyStatus Source #
WebhookNotifyStatus
indicates if the webhook is active.
Instances
Eq WebhookNotifyStatus Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookNotifyStatus -> WebhookNotifyStatus -> Bool # (/=) :: WebhookNotifyStatus -> WebhookNotifyStatus -> Bool # | |
Show WebhookNotifyStatus Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookNotifyStatus -> ShowS # show :: WebhookNotifyStatus -> String # showList :: [WebhookNotifyStatus] -> ShowS # | |
FromJSON WebhookNotifyStatus Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookNotifyStatus parseJSONList :: Value -> Parser [WebhookNotifyStatus] | |
ToJSON WebhookNotifyStatus Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookNotifyStatus -> Value toEncoding :: WebhookNotifyStatus -> Encoding toJSONList :: [WebhookNotifyStatus] -> Value toEncodingList :: [WebhookNotifyStatus] -> Encoding |
data WebhookNotify Source #
Webhook
decodes webhook notification from Spark Cloud except data field.
Data field can be one of Membership
, Message
or Room
. Type of data field is
shown as value of resource field.
Instances
Eq WebhookNotify Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookNotify -> WebhookNotify -> Bool # (/=) :: WebhookNotify -> WebhookNotify -> Bool # | |
Show WebhookNotify Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookNotify -> ShowS # show :: WebhookNotify -> String # showList :: [WebhookNotify] -> ShowS # | |
FromJSON WebhookNotify Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookNotify parseJSONList :: Value -> Parser [WebhookNotify] | |
ToJSON WebhookNotify Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookNotify -> Value toEncoding :: WebhookNotify -> Encoding toJSONList :: [WebhookNotify] -> Value toEncodingList :: [WebhookNotify] -> Encoding |
newtype WebhookNotifyMembership Source #
Data part of webhook notification is decoded to Membership
when resource field value is "memberships".
Instances
Eq WebhookNotifyMembership Source # | |
Defined in Network.CiscoSpark.Types | |
Show WebhookNotifyMembership Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookNotifyMembership -> ShowS # show :: WebhookNotifyMembership -> String # showList :: [WebhookNotifyMembership] -> ShowS # | |
FromJSON WebhookNotifyMembership Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookNotifyMembership parseJSONList :: Value -> Parser [WebhookNotifyMembership] | |
ToJSON WebhookNotifyMembership Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookNotifyMembership -> Value toEncoding :: WebhookNotifyMembership -> Encoding toJSONList :: [WebhookNotifyMembership] -> Value toEncodingList :: [WebhookNotifyMembership] -> Encoding |
newtype WebhookNotifyMessage Source #
Data part of webhook notification is decoded to Message
when resource field value is "messages".
Instances
Eq WebhookNotifyMessage Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookNotifyMessage -> WebhookNotifyMessage -> Bool # (/=) :: WebhookNotifyMessage -> WebhookNotifyMessage -> Bool # | |
Show WebhookNotifyMessage Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookNotifyMessage -> ShowS # show :: WebhookNotifyMessage -> String # showList :: [WebhookNotifyMessage] -> ShowS # | |
FromJSON WebhookNotifyMessage Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookNotifyMessage parseJSONList :: Value -> Parser [WebhookNotifyMessage] | |
ToJSON WebhookNotifyMessage Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookNotifyMessage -> Value toEncoding :: WebhookNotifyMessage -> Encoding toJSONList :: [WebhookNotifyMessage] -> Value toEncodingList :: [WebhookNotifyMessage] -> Encoding |
newtype WebhookNotifyRoom Source #
Data part of webhook notification is decoded to Room
when resource field value is "rooms".
Instances
Eq WebhookNotifyRoom Source # | |
Defined in Network.CiscoSpark.Types (==) :: WebhookNotifyRoom -> WebhookNotifyRoom -> Bool # (/=) :: WebhookNotifyRoom -> WebhookNotifyRoom -> Bool # | |
Show WebhookNotifyRoom Source # | |
Defined in Network.CiscoSpark.Types showsPrec :: Int -> WebhookNotifyRoom -> ShowS # show :: WebhookNotifyRoom -> String # showList :: [WebhookNotifyRoom] -> ShowS # | |
FromJSON WebhookNotifyRoom Source # |
|
Defined in Network.CiscoSpark.Types parseJSON :: Value -> Parser WebhookNotifyRoom parseJSONList :: Value -> Parser [WebhookNotifyRoom] | |
ToJSON WebhookNotifyRoom Source # | |
Defined in Network.CiscoSpark.Types toJSON :: WebhookNotifyRoom -> Value toEncoding :: WebhookNotifyRoom -> Encoding toJSONList :: [WebhookNotifyRoom] -> Value toEncodingList :: [WebhookNotifyRoom] -> Encoding |