-- 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.10.0.0 -- | Files.DriveItem module MSGraphAPI.Files.DriveItem -- | List children in the root of the current user's drive -- --
--   GET /me/drive/root/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 listRootChildrenMe :: AccessToken -> Req (Collection DriveItem) -- | List children of an item of a group drive -- --
--   GET /groups/{group-id}/drive/items/{item-id}/children
--   
-- -- -- https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=http listGroupItemChildren :: Text -> Text -> AccessToken -> Req (Collection DriveItem) -- | 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 -- | 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 -- | The DriveItem resource represents a file, folder, or other item -- stored in a drive. -- -- All file system objects in OneDrive and SharePoint are returned as -- driveItem resources. -- -- -- https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0 data DriveItem DriveItem :: Text -> Text -> ZonedTime -> DIItem -> DriveItem [diId] :: DriveItem -> Text [diName] :: DriveItem -> Text [diLastModifiedDateTime] :: DriveItem -> ZonedTime [diItem] :: DriveItem -> DIItem -- | A sum type for the various drive item types -- -- This is a departure from the original API but makes it convenient to -- pattern match on constructors data DIItem DIIFile :: File -> DIItem DIIFolder :: Folder -> DIItem DIIRemoteItem :: DIItem DIIPhoto :: DIItem DIIVideo :: DIItem DIIBundle :: DIItem DIIPackage :: Package -> DIItem -- | The File resource groups file-related data items into a single -- structure. -- -- -- https://learn.microsoft.com/en-us/graph/api/resources/file?view=graph-rest-1.0 data File File :: Text -> File [difiMimeType] :: File -> Text -- | The Folder resource groups folder-related data on an item into a -- single structure. DriveItems with a non-null folder facet are -- containers for other DriveItems. -- -- -- https://learn.microsoft.com/en-us/graph/api/resources/folder?view=graph-rest-1.0 data Folder Folder :: Int32 -> Folder [difoChildCount] :: Folder -> Int32 data Package Package :: Text -> Package [dipType] :: Package -> Text instance GHC.Generics.Generic MSGraphAPI.Files.DriveItem.Folder instance GHC.Show.Show MSGraphAPI.Files.DriveItem.Folder instance GHC.Classes.Ord MSGraphAPI.Files.DriveItem.Folder instance GHC.Classes.Eq MSGraphAPI.Files.DriveItem.Folder instance GHC.Generics.Generic MSGraphAPI.Files.DriveItem.File instance GHC.Show.Show MSGraphAPI.Files.DriveItem.File instance GHC.Classes.Ord MSGraphAPI.Files.DriveItem.File instance GHC.Classes.Eq MSGraphAPI.Files.DriveItem.File instance GHC.Generics.Generic MSGraphAPI.Files.DriveItem.Package instance GHC.Show.Show MSGraphAPI.Files.DriveItem.Package instance GHC.Classes.Ord MSGraphAPI.Files.DriveItem.Package instance GHC.Classes.Eq MSGraphAPI.Files.DriveItem.Package instance GHC.Generics.Generic MSGraphAPI.Files.DriveItem.DIItem instance GHC.Show.Show MSGraphAPI.Files.DriveItem.DIItem instance GHC.Classes.Ord MSGraphAPI.Files.DriveItem.DIItem instance GHC.Classes.Eq MSGraphAPI.Files.DriveItem.DIItem instance GHC.Generics.Generic MSGraphAPI.Files.DriveItem.DriveItem instance GHC.Show.Show MSGraphAPI.Files.DriveItem.DriveItem instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Files.DriveItem.DriveItem instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Files.DriveItem.DriveItem instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Files.DriveItem.DIItem instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Files.DriveItem.Package instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Files.DriveItem.Package instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Files.DriveItem.File instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Files.DriveItem.File instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Files.DriveItem.Folder instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Files.DriveItem.Folder module MSGraphAPI.Files.Drive -- | List the current user's drives -- --
--   GET /me/drives
--   
listDrivesMe :: AccessToken -> Req (Collection Drive) -- | To list the document libraries for a group, your app requests the -- drives relationship on the Group. -- --
--   GET /groups/{groupId}/drives
--   
listDrivesGroup :: Text -> AccessToken -> Req (Collection Drive) -- | The top-level object that represents a user's OneDrive or a document -- library in SharePoint. -- -- OneDrive users will always have at least one drive available, their -- default drive. Users without a OneDrive license may not have a default -- drive available. -- -- -- https://learn.microsoft.com/en-us/graph/api/resources/drive?view=graph-rest-1.0 data Drive Drive :: Text -> Text -> Text -> ZonedTime -> Text -> Drive [dId] :: Drive -> Text [dName] :: Drive -> Text [dDescription] :: Drive -> Text [dLastModifiedDateTime] :: Drive -> ZonedTime [dDriveType] :: Drive -> Text instance GHC.Generics.Generic MSGraphAPI.Files.Drive.Drive instance GHC.Show.Show MSGraphAPI.Files.Drive.Drive instance Data.Aeson.Types.FromJSON.FromJSON MSGraphAPI.Files.Drive.Drive instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Files.Drive.Drive 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 -- | a collection of items with key value data Collection a Collection :: [a] -> Maybe Text -> Collection a [cValue] :: Collection a -> [a] [cNextLink] :: Collection a -> Maybe Text -- | Run a Req computation run :: MonadIO m => HttpConfig -> Req a -> m (Either HttpException 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) -- | Create a new TLS manager, which should be reused throughout the -- program withTLS :: MonadIO m => (HttpConfig -> Manager -> m b) -> m b module MSGraphAPI.User -- | Users.Group module MSGraphAPI.Users.Group -- | Get the teams in Microsoft Teams that the given 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 teams in Microsoft Teams that the current user is a direct -- member of. -- --
--   GET /me/joinedTeams
--   
-- -- -- https://learn.microsoft.com/en-us/graph/api/user-list-joinedteams?view=graph-rest-1.0&tabs=http getMeJoinedTeams :: 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 -- -- NB : requires Files.Read.All, since it tries to access all -- files a user has access to. getGroupsDriveItems :: Text -> AccessToken -> Req (Collection DriveItem) -- | 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 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 instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Users.Group.Group -- | Users.User module MSGraphAPI.Users.User -- | 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 -- | Representation of a user in the MS Graph API -- -- -- https://learn.microsoft.com/en-us/graph/api/resources/users?view=graph-rest-1.0 data User User :: Text -> Text -> Text -> User [uId] :: User -> Text [uUserPrincipalName] :: User -> Text [uDisplayName] :: User -> Text 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 instance Data.Aeson.Types.ToJSON.ToJSON MSGraphAPI.Users.User.User -- | Subscription to change notifications through webhooks -- -- NB: Creating a subscription requires read scope to the resource. For -- example, to get change notifications on messages, your app needs the -- Mail.Read permission. -- -- Currently, subscriptions are enabled for the following resources. -- Note: Subscriptions to resources marked with an asterisk (*) are -- supported on the /beta endpoint only. -- -- -- -- See -- https://learn.microsoft.com/en-us/graph/webhooks#supported-resources -- for an up to date list of resources that can produce change -- notifications -- -- see -- https://learn.microsoft.com/en-us/graph/change-notifications-delivery-webhooks?tabs=http -- for protocol details module MSGraphAPI.ChangeNotifications.Subscription -- | Create a subscription -- https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http -- --
--   POST https://graph.microsoft.com/v1.0/subscriptions
--   
-- -- NB: Creating a subscription requires read scope to the resource. For -- example, to get change notifications on messages, your app needs the -- Mail.Read permission. -- -- NB2: When you create a subscription to receive change notifications -- through webhooks, MS Graph first validates the notification endpoint -- that's provided in the notificationUrl property of the -- subscription request. MS Graph encodes a validation token and includes -- it in a POST request to the notification URL, the client must -- properly decode the URL to get the plain text validation token, and -- respond within 10 seconds. See -- https://learn.microsoft.com/en-us/graph/change-notifications-delivery-webhooks?tabs=http#notificationurl-validation -- for full details 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 :: NonEmpty ChangeType -> Text -> UTCTime -> Text -> Text -> Subscription -- | Type of change in the subscribed resource that will raise a change -- notification. [cnsChangeType] :: Subscription -> NonEmpty ChangeType -- | Value of the clientState property sent by the service in each change -- notification. The maximum length is 128 characters. The client can -- check that the change notification came from the service by comparing -- the value of the clientState property sent with the subscription with -- the value of the clientState property received with each change -- notification. [cnsClientState] :: Subscription -> Text -- | date and time when the webhook subscription expires. The time is in -- UTC, and can be an amount of time from subscription creation that -- varies for the resource subscribed to. For the maximum supported -- subscription length of time, see -- https://learn.microsoft.com/en-us/graph/api/resources/subscription?view=graph-rest-1.0#maximum-length-of-subscription-per-resource-type [cnsExpirationDateTime] :: Subscription -> UTCTime -- | 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 -- | The resource that will be monitored for changes, e.g. -- "/users/{id}/drive/root". Do not include the base URL -- (https://graph.microsoft.com/v1.0/) [cnsResource] :: Subscription -> Text -- | the type of change in the subscribed resource that will raise a change -- notification. -- -- Note: -- -- data ChangeType -- | created CTCreated :: ChangeType -- | updated CTUpdated :: ChangeType -- | deleted CTDeleted :: ChangeType -- | Represents the notification sent to the subscriber. -- https://learn.microsoft.com/en-us/graph/api/resources/changenotification?view=graph-rest-1.0 data ChangeNotification a ChangeNotification :: ChangeType -> Text -> Text -> Text -> Maybe a -> Text -> Text -> ChangeNotification a -- | type of change that will raise the change notification. [cnChangeType] :: ChangeNotification a -> ChangeType -- | Value of the clientState property sent in the subscription request (if -- any). The maximum length is 255 characters. The client can check -- whether the change notification came from the service by comparing the -- values of the clientState property. [cnClientState] :: ChangeNotification a -> Text -- | Unique ID for the notification. [cnId] :: ChangeNotification a -> Text -- | The URI of the resource that emitted the change notification relative -- to https://graph.microsoft.com [cnResource] :: ChangeNotification a -> Text [cnResourceData] :: ChangeNotification a -> Maybe a [cnSubscriptionId] :: ChangeNotification a -> Text [cnTenantId] :: ChangeNotification a -> Text 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 GHC.Generics.Generic (MSGraphAPI.ChangeNotifications.Subscription.ChangeNotification a) instance GHC.Show.Show a => GHC.Show.Show (MSGraphAPI.ChangeNotifications.Subscription.ChangeNotification a) instance GHC.Classes.Eq a => GHC.Classes.Eq (MSGraphAPI.ChangeNotifications.Subscription.ChangeNotification a) instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (MSGraphAPI.ChangeNotifications.Subscription.ChangeNotification a) 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