-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Microsoft Graph API -- -- Bindings to the Microsoft Graph API @package ms-graph-api @version 0.7.0.0 -- | Common functions for the MS Graph API v1.0 -- -- -- https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0&preserve-view=true module MSGraphAPI.Internal.Common -- |
-- GET https://graph.microsoft.com/v1.0/... --get :: FromJSON a => [Text] -> Option 'Https -> AccessToken -> Req a -- |
-- GET https://graph.microsoft.com/v1.0/... ---- -- Returns the response body as a bytestring, e.g. for endpoints that -- download files or general bytestring payloads getLbs :: [Text] -> Option 'Https -> AccessToken -> Req ByteString -- | Like get but catches HttpExceptions to allow pattern -- matching getE :: FromJSON a => [Text] -> Option 'Https -> AccessToken -> Req (Either HttpException a) -- |
-- POST https://graph.microsoft.com/v1.0/... --post :: (ToJSON a, FromJSON b) => [Text] -> Option 'Https -> a -> AccessToken -> Req b -- | Like post but catches HttpExceptions to allow pattern -- matching postE :: (ToJSON a, FromJSON b) => [Text] -> Option 'Https -> a -> AccessToken -> Req (Either HttpException b) -- | Run a computation in the Req monad with the given -- HttpConfig. In the case of an exceptional situation an -- HttpException will be thrown. runReq :: MonadIO m => HttpConfig -> Req a -> m a -- | Specialized version of try to HttpExceptions -- -- This can be used to catch exceptions of composite Req -- statements, e.g. around a do block tryReq :: Req a -> Req (Either HttpException a) -- | a collection of items with key value data Collection a Collection :: [a] -> Collection a [cValue] :: Collection a -> [a] -- | drop the prefix and lowercase first character -- -- e.g. userDisplayName -> displayName aesonOptions :: String -> Options instance GHC.Generics.Generic (MSGraphAPI.Internal.Common.Collection a) instance GHC.Show.Show a => GHC.Show.Show (MSGraphAPI.Internal.Common.Collection a) instance GHC.Classes.Eq a => GHC.Classes.Eq (MSGraphAPI.Internal.Common.Collection a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (MSGraphAPI.Internal.Common.Collection a) module MSGraphAPI.Files.DriveItem data DriveItem DriveItem :: Text -> Text -> LocalTime -> DriveItem [diId] :: DriveItem -> Text [diName] :: DriveItem -> Text [diLastModifiedDateTime] :: DriveItem -> LocalTime -- | download a complete file from user's directory -- --
-- GET /me/drive/items/{item-id}/content
--
--
--
-- https://learn.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0&tabs=http#request
downloadFileMe :: Text -> AccessToken -> Req ByteString
-- | download a file from a drive
--
--
-- GET /drives/{drive-id}/items/{item-id}/content
--
--
--
-- https://learn.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0&tabs=http#request
downloadFile :: Text -> Text -> AccessToken -> Req ByteString
instance GHC.Generics.Generic MSGraphAPI.Files.DriveItem.DriveItem
instance GHC.Show.Show MSGraphAPI.Files.DriveItem.DriveItem
instance GHC.Classes.Ord MSGraphAPI.Files.DriveItem.DriveItem
instance GHC.Classes.Eq MSGraphAPI.Files.DriveItem.DriveItem
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Files.DriveItem.DriveItem
module MSGraphAPI.Drive
-- | Get drive of current user
getDriveMe :: AccessToken -> Req Drive
-- | List children in the root of the current user's drive
--
--
-- https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=http#list-children-in-the-root-of-the-current-users-drive
getDriveItemsMe :: AccessToken -> Req (Collection DriveItem)
-- | List children in the root of the current user's drive
--
--
-- GET /drives/{drive-id}/items/{item-id}/children
--
--
--
-- https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=http#list-children-in-the-root-of-the-current-users-drive
getDriveItemChildren :: Text -> Text -> AccessToken -> Req (Collection DriveItem)
data Drive
Drive :: Text -> Drive
[dId] :: Drive -> Text
data DriveItem
DriveItem :: Text -> Maybe Int64 -> DriveItem
[diName] :: DriveItem -> Text
[diSize] :: DriveItem -> Maybe Int64
instance GHC.Generics.Generic MSGraphAPI.Drive.Drive
instance GHC.Show.Show MSGraphAPI.Drive.Drive
instance GHC.Classes.Eq MSGraphAPI.Drive.Drive
instance GHC.Generics.Generic MSGraphAPI.Drive.DriveItem
instance GHC.Show.Show MSGraphAPI.Drive.DriveItem
instance GHC.Classes.Eq MSGraphAPI.Drive.DriveItem
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Drive.DriveItem
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Drive.Drive
module MSGraphAPI.ChangeNotifications.Subscription
-- | Creating a subscription requires read scope to the resource. For
-- example, to get change notifications on messages, your app needs the
-- Mail.Read permission.
createSubscription :: FromJSON b => Subscription -> AccessToken -> Req b
-- | A subscription allows a client app to receive change notifications
-- about changes to data in Microsoft Graph.
--
--
-- https://learn.microsoft.com/en-us/graph/api/resources/subscription?view=graph-rest-1.0
data Subscription
Subscription :: Text -> NonEmpty ChangeType -> Text -> LocalTime -> Text -> Text -> LatestTLSVer -> Subscription
[cnsId] :: Subscription -> Text
[cnsChangeType] :: Subscription -> NonEmpty ChangeType
[cnsClientState] :: Subscription -> Text
[cnsExpirationDateTime] :: Subscription -> LocalTime
-- | The URL of the endpoint that will receive the change notifications.
-- This URL must make use of the HTTPS protocol. Any query string
-- parameter included in the notificationUrl property will be included in
-- the HTTP POST request when Microsoft Graph sends the change
-- notifications.
[cnsNotificationUrl] :: Subscription -> Text
-- | Specifies the resource that will be monitored for changes. Do not
-- include the base URL (https:/graph.microsoft.comv1.0/)
[cnsResource] :: Subscription -> Text
[cnsLatestSupportedTLSVersion] :: Subscription -> LatestTLSVer
data LatestTLSVer
LTV10 :: LatestTLSVer
LTV11 :: LatestTLSVer
LTV12 :: LatestTLSVer
LTV13 :: LatestTLSVer
data ChangeType
CTCreated :: ChangeType
CTUpdated :: ChangeType
CTDeleted :: ChangeType
instance GHC.Generics.Generic MSGraphAPI.ChangeNotifications.Subscription.LatestTLSVer
instance GHC.Show.Show MSGraphAPI.ChangeNotifications.Subscription.LatestTLSVer
instance GHC.Classes.Eq MSGraphAPI.ChangeNotifications.Subscription.LatestTLSVer
instance GHC.Generics.Generic MSGraphAPI.ChangeNotifications.Subscription.ChangeType
instance GHC.Show.Show MSGraphAPI.ChangeNotifications.Subscription.ChangeType
instance GHC.Classes.Eq MSGraphAPI.ChangeNotifications.Subscription.ChangeType
instance GHC.Generics.Generic MSGraphAPI.ChangeNotifications.Subscription.Subscription
instance GHC.Show.Show MSGraphAPI.ChangeNotifications.Subscription.Subscription
instance GHC.Classes.Eq MSGraphAPI.ChangeNotifications.Subscription.Subscription
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.ChangeNotifications.Subscription.Subscription
instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.ChangeNotifications.Subscription.Subscription
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.ChangeNotifications.Subscription.ChangeType
instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.ChangeNotifications.Subscription.ChangeType
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.ChangeNotifications.Subscription.LatestTLSVer
instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.ChangeNotifications.Subscription.LatestTLSVer
module MSGraphAPI.User
-- | User
module MSGraphAPI.Users.Group
-- | Groups are collections of principals with shared access to resources
-- in Microsoft services or in your app. Different principals such as
-- users, other groups, devices, and applications can be part of groups.
--
--
-- https://learn.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0&tabs=http
data Group
Group :: Text -> Text -> Text -> Group
[gId] :: Group -> Text
[gDisplayName] :: Group -> Text
[gDescription] :: Group -> Text
-- | Get the teams in Microsoft Teams that the user is a direct member of.
--
--
-- GET /users/{id | user-principal-name}/joinedTeams
--
--
--
-- https://learn.microsoft.com/en-us/graph/api/user-list-joinedteams?view=graph-rest-1.0&tabs=http
getUserJoinedTeams :: Text -> AccessToken -> Req (Collection Group)
-- | Get the DriveItems in the Group storage, starting from
-- the root item
--
--
-- GET /groups/{group-id}/drive/root/children
--
--
--
-- https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=http
getGroupsDriveItems :: Text -> AccessToken -> Req (Collection DriveItem)
instance GHC.Generics.Generic MSGraphAPI.Users.Group.Group
instance GHC.Show.Show MSGraphAPI.Users.Group.Group
instance GHC.Classes.Ord MSGraphAPI.Users.Group.Group
instance GHC.Classes.Eq MSGraphAPI.Users.Group.Group
instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Users.Group.Group
-- | User
module MSGraphAPI.Users.User
data User
User :: Text -> Text -> Text -> User
[uId] :: User -> Text
[uUserPrincipalName] :: User -> Text
[uDisplayName] :: User -> Text
-- | Get user information
--
--
-- GET /users/{user-id}
--
--
--
-- https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http#request
get :: Text -> AccessToken -> Req User
-- | Get information on signed-in user
--
-- Calling the /me endpoint requires a signed-in user and therefore a
-- delegated permission. Application permissions are not supported when
-- using the /me endpoint.
--
-- -- GET /me ---- -- -- https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http#request-1 getMe :: AccessToken -> Req User instance GHC.Generics.Generic MSGraphAPI.Users.User.User instance GHC.Show.Show MSGraphAPI.Users.User.User instance GHC.Classes.Ord MSGraphAPI.Users.User.User instance GHC.Classes.Eq MSGraphAPI.Users.User.User instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Users.User.User