Office365-REST-Python-Client 2.4.3__py3-none-any.whl → 2.4.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +8 -7
  2. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +254 -162
  3. office365/base_item.py +26 -4
  4. office365/communications/calls/invitation_participant_info.py +17 -1
  5. office365/communications/calls/options.py +9 -0
  6. office365/communications/onlinemeetings/provider_type.py +3 -0
  7. office365/communications/presences/presence.py +14 -0
  8. office365/communications/presences/status_message.py +12 -0
  9. office365/directory/audit/signins/activity.py +31 -0
  10. office365/directory/audit/signins/location.py +17 -0
  11. office365/directory/audit/signins/signin.py +25 -0
  12. office365/directory/authentication/authentication.py +9 -0
  13. office365/directory/authentication/methods/details.py +18 -0
  14. office365/directory/authentication/methods/email.py +16 -0
  15. office365/directory/authentication/methods/root.py +10 -0
  16. office365/directory/certificates/authority.py +6 -1
  17. office365/directory/extensions/extended_property.py +8 -1
  18. office365/directory/extensions/extension_property.py +0 -3
  19. office365/directory/extensions/open_type.py +8 -0
  20. office365/directory/groups/group.py +2 -1
  21. office365/directory/identities/governance.py +2 -0
  22. office365/directory/insights/shared.py +15 -1
  23. office365/directory/insights/usage_details.py +16 -0
  24. office365/directory/insights/used.py +7 -0
  25. office365/directory/licenses/assigned_plan.py +14 -2
  26. office365/directory/licenses/service_plan_info.py +4 -0
  27. office365/directory/licenses/subscribed_sku.py +26 -0
  28. office365/directory/licenses/units_detail.py +11 -0
  29. office365/directory/permissions/email_identity.py +5 -0
  30. office365/directory/permissions/grants/condition_set.py +26 -0
  31. office365/directory/permissions/grants/resource_specific.py +21 -0
  32. office365/directory/policies/authentication_flows.py +9 -0
  33. office365/directory/policies/authentication_strength.py +10 -0
  34. office365/directory/policies/authorization.py +8 -0
  35. office365/directory/policies/cross_tenant_access.py +5 -0
  36. office365/directory/policies/root.py +35 -2
  37. office365/directory/rolemanagement/template.py +8 -0
  38. office365/directory/rolemanagement/unified_role_assignment.py +37 -0
  39. office365/directory/security/alerts/alert.py +21 -0
  40. office365/directory/security/alerts/history_state.py +5 -0
  41. office365/directory/security/attacksimulations/automation.py +21 -0
  42. office365/directory/security/attacksimulations/automation_run.py +5 -0
  43. office365/directory/security/attacksimulations/repeat_offender.py +6 -0
  44. office365/directory/security/attacksimulations/root.py +26 -0
  45. office365/directory/security/attacksimulations/simulation.py +17 -0
  46. office365/directory/security/cases/ediscovery.py +6 -0
  47. office365/directory/security/cases/root.py +22 -0
  48. office365/directory/security/incidents/incident.py +67 -0
  49. office365/directory/security/security.py +10 -1
  50. office365/directory/serviceprincipals/service_principal.py +88 -3
  51. office365/directory/synchronization/job.py +16 -0
  52. office365/directory/synchronization/progress.py +5 -0
  53. office365/directory/synchronization/status.py +13 -0
  54. office365/directory/synchronization/synchronization.py +24 -0
  55. office365/directory/tenant_information.py +12 -0
  56. office365/directory/users/password_profile.py +15 -3
  57. office365/directory/users/user.py +136 -8
  58. office365/graph_client.py +28 -1
  59. office365/intune/audit/actor.py +5 -0
  60. office365/intune/audit/event.py +21 -25
  61. office365/intune/audit/event_collection.py +26 -0
  62. office365/intune/audit/property.py +5 -0
  63. office365/intune/audit/resource.py +11 -0
  64. office365/intune/brand.py +6 -0
  65. office365/intune/devices/compliance/__init__.py +0 -0
  66. office365/intune/devices/compliance/policy.py +6 -0
  67. office365/intune/devices/compliance/policy_state.py +5 -0
  68. office365/intune/devices/enrollment/__init__.py +0 -0
  69. office365/intune/devices/enrollment/configuration.py +25 -0
  70. office365/intune/devices/enrollment/configuration_assignment.py +5 -0
  71. office365/intune/devices/enrollment/limit_configuration.py +5 -0
  72. office365/intune/devices/managed.py +28 -3
  73. office365/intune/devices/management/__init__.py +0 -0
  74. office365/intune/devices/management/management.py +69 -0
  75. office365/intune/devices/management/reports/__init__.py +0 -0
  76. office365/intune/devices/management/reports/reports.py +5 -0
  77. office365/intune/devices/management/settings.py +18 -0
  78. office365/intune/organizations/branding.py +15 -0
  79. office365/intune/organizations/organization.py +14 -0
  80. office365/intune/printing/base.py +11 -0
  81. office365/intune/printing/capabilities.py +5 -0
  82. office365/intune/printing/connectors/__init__.py +0 -0
  83. office365/intune/printing/connectors/connector.py +6 -0
  84. office365/intune/printing/operations/__init__.py +0 -0
  85. office365/intune/printing/print.py +24 -0
  86. office365/intune/printing/printer.py +6 -0
  87. office365/intune/printing/services/__init__.py +0 -0
  88. office365/intune/printing/services/endpoint.py +5 -0
  89. office365/intune/printing/services/service.py +17 -0
  90. office365/intune/printing/share.py +5 -0
  91. office365/intune/printing/shares/__init__.py +0 -0
  92. office365/intune/printing/taskdefinitions/__init__.py +0 -0
  93. office365/intune/provisioned_plan.py +5 -1
  94. office365/intune/servicecommunications/issues/issue.py +15 -0
  95. office365/intune/vpp_token.py +10 -0
  96. office365/onedrive/columns/content_approval_status.py +5 -0
  97. office365/onedrive/columns/datetime.py +15 -0
  98. office365/onedrive/columns/definition.py +49 -3
  99. office365/onedrive/columns/definition_collection.py +17 -6
  100. office365/onedrive/columns/types.py +13 -0
  101. office365/onedrive/driveitems/audio.py +12 -1
  102. office365/onedrive/driveitems/driveItem.py +66 -15
  103. office365/onedrive/driveitems/image.py +8 -1
  104. office365/onedrive/driveitems/remote_item.py +19 -4
  105. office365/onedrive/drives/recipient.py +4 -0
  106. office365/onedrive/files/system_info.py +8 -6
  107. office365/onedrive/lists/collection.py +11 -5
  108. office365/onedrive/lists/list.py +13 -5
  109. office365/onedrive/operations/pending.py +13 -0
  110. office365/onedrive/operations/pending_content_update.py +5 -0
  111. office365/onedrive/permissions/collection.py +1 -1
  112. office365/onedrive/sensitivitylabels/__init__.py +0 -0
  113. office365/onedrive/sensitivitylabels/assignment.py +17 -0
  114. office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
  115. office365/onedrive/sensitivitylabels/extract_result.py +13 -0
  116. office365/onedrive/sharepoint_settings.py +25 -0
  117. office365/outlook/calendar/calendar.py +116 -5
  118. office365/outlook/calendar/dateTimeTimeZone.py +3 -0
  119. office365/outlook/calendar/email_address.py +7 -0
  120. office365/outlook/calendar/events/event.py +0 -4
  121. office365/outlook/calendar/events/reminder.py +22 -3
  122. office365/outlook/calendar/group.py +0 -2
  123. office365/outlook/calendar/location_constraint.py +16 -1
  124. office365/outlook/calendar/permissions/__init__.py +0 -0
  125. office365/outlook/calendar/permissions/collection.py +24 -0
  126. office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
  127. office365/outlook/calendar/role_type.py +17 -0
  128. office365/outlook/calendar/sharing_message.py +2 -2
  129. office365/outlook/calendar/time_zone_base.py +3 -0
  130. office365/outlook/calendar/working_hours.py +17 -1
  131. office365/outlook/contacts/collection.py +39 -0
  132. office365/outlook/contacts/contact.py +21 -11
  133. office365/outlook/geo_coordinates.py +20 -0
  134. office365/outlook/item.py +5 -2
  135. office365/outlook/locale_info.py +3 -0
  136. office365/outlook/mail/folders/folder.py +51 -2
  137. office365/outlook/mail/folders/search.py +11 -0
  138. office365/outlook/mail/importance.py +1 -0
  139. office365/outlook/mail/item_body.py +3 -0
  140. office365/outlook/mail/location.py +27 -2
  141. office365/outlook/mail/location_constraint_item.py +5 -0
  142. office365/outlook/mail/messages/collection.py +7 -0
  143. office365/outlook/mail/messages/followup_flag.py +21 -0
  144. office365/outlook/mail/messages/internet_header.py +16 -0
  145. office365/outlook/mail/messages/message.py +183 -4
  146. office365/outlook/mail/messages/rules/actions.py +33 -0
  147. office365/outlook/mail/patterned_recurrence.py +14 -1
  148. office365/outlook/mail/physical_address.py +5 -1
  149. office365/outlook/mail/recipient.py +3 -0
  150. office365/outlook/mail/recurrence_pattern.py +18 -1
  151. office365/outlook/mail/recurrence_range.py +16 -2
  152. office365/reports/root.py +19 -1
  153. office365/reports/security/__init__.py +0 -0
  154. office365/reports/security/root.py +21 -0
  155. office365/reports/userregistration/__init__.py +0 -0
  156. office365/reports/userregistration/method_count.py +17 -0
  157. office365/reports/userregistration/method_summary.py +21 -0
  158. office365/sharepoint/activities/logger.py +25 -0
  159. office365/sharepoint/addtoonedrive/mount_point.py +25 -0
  160. office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
  161. office365/sharepoint/alerts/alert.py +31 -0
  162. office365/sharepoint/changes/item.py +14 -0
  163. office365/sharepoint/client_context.py +6 -0
  164. office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
  165. office365/sharepoint/clientsidecomponent/identifier.py +3 -0
  166. office365/sharepoint/compliance/tag_info.py +17 -0
  167. office365/sharepoint/contenttypes/content_type.py +42 -0
  168. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
  169. office365/sharepoint/features/known_list.py +2 -0
  170. office365/sharepoint/fields/collection.py +60 -41
  171. office365/sharepoint/fields/creation_information.py +5 -4
  172. office365/sharepoint/fields/field.py +73 -15
  173. office365/sharepoint/fields/user.py +3 -3
  174. office365/sharepoint/files/file.py +9 -4
  175. office365/sharepoint/folders/coloring.py +39 -0
  176. office365/sharepoint/folders/coloring_information.py +15 -0
  177. office365/sharepoint/folders/folder.py +21 -10
  178. office365/sharepoint/forms/customization.py +8 -0
  179. office365/sharepoint/listitems/listitem.py +10 -3
  180. office365/sharepoint/lists/bloom_filter.py +0 -1
  181. office365/sharepoint/lists/creation_information.py +18 -4
  182. office365/sharepoint/lists/list.py +199 -24
  183. office365/sharepoint/lists/render_data_parameters.py +21 -1
  184. office365/sharepoint/navigation/configured_metadata_items.py +25 -1
  185. office365/sharepoint/navigation/metadata_settings.py +6 -4
  186. office365/sharepoint/permissions/irm/file_settings.py +43 -0
  187. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
  188. office365/sharepoint/publishing/base_custom_property.py +8 -0
  189. office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
  190. office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
  191. office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
  192. office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
  193. office365/sharepoint/publishing/pages/page.py +4 -1
  194. office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
  195. office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
  196. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
  197. office365/sharepoint/search/query/auto_completion_match.py +3 -0
  198. office365/sharepoint/search/query/property_value.py +18 -0
  199. office365/sharepoint/search/request.py +16 -2
  200. office365/sharepoint/sharing/abilities.py +22 -0
  201. office365/sharepoint/sharing/direct_abilities.py +27 -0
  202. office365/sharepoint/sharing/link_abilities.py +9 -1
  203. office365/sharepoint/sharing/links/data.py +26 -1
  204. office365/sharepoint/sharing/links/info.py +1 -1
  205. office365/sharepoint/sharing/links/partial_success_response.py +5 -0
  206. office365/sharepoint/sharing/links/share_settings.py +24 -1
  207. office365/sharepoint/sharing/object_sharing_information.py +65 -2
  208. office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
  209. office365/sharepoint/sharing/object_sharing_settings.py +17 -4
  210. office365/sharepoint/sharing/principal.py +10 -0
  211. office365/sharepoint/sharing/securable_object_extensions.py +1 -17
  212. office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
  213. office365/sharepoint/sharing/user_sharing_result.py +18 -8
  214. office365/sharepoint/sitehealth/result.py +10 -0
  215. office365/sharepoint/sites/language.py +11 -1
  216. office365/sharepoint/sites/language_collection.py +1 -0
  217. office365/sharepoint/sites/site.py +34 -6
  218. office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
  219. office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
  220. office365/sharepoint/tenant/administration/tenant.py +1 -0
  221. office365/sharepoint/tenant/apps/information.py +3 -1
  222. office365/sharepoint/tenant/management/office365_tenant.py +0 -1
  223. office365/sharepoint/types/resource_path.py +3 -1
  224. office365/sharepoint/userprofiles/people_manager.py +0 -2
  225. office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
  226. office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
  227. office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
  228. office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
  229. office365/sharepoint/webs/web.py +2 -3
  230. office365/subscriptions/collection.py +12 -6
  231. office365/subscriptions/subscription.py +119 -1
  232. office365/teams/channels/iIdentity.py +5 -0
  233. office365/teams/chats/collection.py +1 -2
  234. office365/teams/chats/messages/info.py +9 -0
  235. office365/teams/chats/messages/message.py +17 -2
  236. office365/teams/members/aad_user_conversation.py +2 -2
  237. office365/teams/members/conversation_collection.py +3 -3
  238. office365/teams/schedule/change_tracked_entity.py +11 -2
  239. office365/teams/tabs/configuration.py +12 -1
  240. office365/teams/tabs/tab.py +0 -1
  241. office365/teams/team.py +23 -1
  242. office365/teams/teamwork/__init__.py +0 -0
  243. office365/teams/teamwork/activity_topic.py +5 -0
  244. office365/teams/teamwork/tags/__init__.py +0 -0
  245. office365/teams/teamwork/tags/member.py +5 -0
  246. office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
  247. office365/intune/devices/management.py +0 -35
  248. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
  249. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
  250. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
  251. /office365/{teams/messages → directory/security/cases}/__init__.py +0 -0
  252. /office365/{teams/tags → directory/synchronization}/__init__.py +0 -0
  253. /office365/teams/{tags → teamwork/tags}/identity.py +0 -0
  254. /office365/teams/{tags → teamwork/tags}/tag.py +0 -0
  255. /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
@@ -4,6 +4,7 @@ from office365.sharepoint.sites.language import Language
4
4
 
5
5
 
6
6
  class LanguageCollection(BaseEntity):
7
+ """Represents a collection of SPLanguage objects"""
7
8
 
8
9
  def __init__(self, context, resource_path=None):
9
10
  """Represents a collection of SPLanguage objects."""
@@ -413,6 +413,15 @@ class Site(BaseEntity):
413
413
  self.context.add_query(qry)
414
414
  return self
415
415
 
416
+ @property
417
+ def allow_create_declarative_workflow(self):
418
+ """
419
+ Specifies whether a designer can be used to create declarative workflows on this site collection
420
+
421
+ :rtype: bool or None
422
+ """
423
+ return self.properties.get("AllowCreateDeclarativeWorkflow", None)
424
+
416
425
  @property
417
426
  def allow_designer(self):
418
427
  """
@@ -485,7 +494,6 @@ class Site(BaseEntity):
485
494
  def lock_issue(self):
486
495
  """
487
496
  Specifies the comment that is used when a site collection is locked
488
-
489
497
  :rtype: str or None
490
498
  """
491
499
  return self.properties.get("LockIssue", None)
@@ -533,7 +541,6 @@ class Site(BaseEntity):
533
541
  def server_relative_url(self):
534
542
  """
535
543
  Specifies the server-relative URL of the top-level site in the site collection.
536
-
537
544
  :rtype: str
538
545
  """
539
546
  return self.properties.get("ServerRelativeUrl", None)
@@ -542,16 +549,22 @@ class Site(BaseEntity):
542
549
  def share_by_email_enabled(self):
543
550
  """
544
551
  When true, users will be able to grant permissions to guests for resources within the site collection.
545
-
546
552
  :rtype: bool or none
547
553
  """
548
554
  return self.properties.get('ShareByEmailEnabled', None)
549
555
 
556
+ @property
557
+ def status_bar_text(self):
558
+ """
559
+ Gets or sets the status bar message text for this site.
560
+ :rtype: str or none
561
+ """
562
+ return self.properties.get('StatusBarText', None)
563
+
550
564
  @property
551
565
  def trim_audit_log(self):
552
566
  """
553
567
  When this flag is set for the site, the audit events are trimmed periodically.
554
-
555
568
  :rtype: bool or none
556
569
  """
557
570
  return self.properties.get('TrimAuditLog', None)
@@ -583,7 +596,6 @@ class Site(BaseEntity):
583
596
  def is_hub_site(self):
584
597
  """
585
598
  Returns whether the specified site is a hub site
586
-
587
599
  :rtype: bool
588
600
  """
589
601
  return self.properties.get("IsHubSite", None)
@@ -591,7 +603,6 @@ class Site(BaseEntity):
591
603
  @property
592
604
  def server_relative_path(self):
593
605
  """Gets the server-relative Path of the Site.
594
-
595
606
  :rtype: SPResPath or None
596
607
  """
597
608
  return self.properties.get("ServerRelativePath", SPResPath())
@@ -625,6 +636,23 @@ class Site(BaseEntity):
625
636
  FeatureCollection(self.context,
626
637
  ResourcePath("Features", self.resource_path), self))
627
638
 
639
+ @property
640
+ def max_items_per_throttled_operation(self):
641
+ """
642
+ Specifies the maximum number of list items allowed to be returned for each retrieve request before throttling
643
+ occurs. If throttling occurs, list items MUST NOT be returned.
644
+ :rtype: int or None
645
+ """
646
+ return self.properties.get("MaxItemsPerThrottledOperation", None)
647
+
648
+ @property
649
+ def needs_b2b_upgrade(self):
650
+ """
651
+ Specifies whether the site needs a Build-to-Build upgrade.
652
+ :rtype: bool or None
653
+ """
654
+ return self.properties.get("NeedsB2BUpgrade", None)
655
+
628
656
  @property
629
657
  def event_receivers(self):
630
658
  """
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class AuditSearchRequestStatus(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.Administration.TenantAdmin.AuditSearchRequestStatus"
@@ -3,6 +3,16 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class HubSitePermission(ClientValue):
5
5
 
6
+ def __init__(self, display_name=None, principal_name=None, rights=None):
7
+ """
8
+ :param str display_name:
9
+ :param str principal_name:
10
+ :param int rights:
11
+ """
12
+ self.DisplayName = display_name
13
+ self.PrincipalName = principal_name
14
+ self.Rights = rights
15
+
6
16
  @property
7
17
  def entity_type_name(self):
8
18
  return "Microsoft.Online.SharePoint.TenantAdministration.HubSitePermission"
@@ -86,6 +86,7 @@ class Tenant(BaseEntity):
86
86
  return return_type
87
87
 
88
88
  def get_collaboration_insights_data(self):
89
+ """"""
89
90
  return_type = ClientResult(self.context, CollaborationInsightsData())
90
91
  qry = ServiceOperationQuery(self, "GetCollaborationInsightsData", None, None, None, return_type)
91
92
  self.context.add_query(qry)
@@ -4,10 +4,12 @@ from office365.runtime.client_value import ClientValue
4
4
  class TenantAppInformation(ClientValue):
5
5
  """Specifies the information for the tenant-scoped app."""
6
6
 
7
- def __init__(self, app_principal_id=None, app_web_full_url=None):
7
+ def __init__(self, app_principal_id=None, app_web_full_url=None, creation_time=None):
8
8
  """
9
9
  :param str app_principal_id: Specifies the OAuth Id for the tenant-scoped app.
10
10
  :param str app_web_full_url: Specifies the web full URL for the tenant-scoped app.
11
+ :param datetime.datetime creation_time: Specifies the creation time for the tenant-scoped app.
11
12
  """
12
13
  self.AppPrincipalId = app_principal_id
13
14
  self.AppWebFullUrl = app_web_full_url
15
+ self.CreationTime = creation_time
@@ -242,7 +242,6 @@ class Office365Tenant(BaseEntity):
242
242
  def delete_tenant_theme(self, name):
243
243
  """
244
244
  Removes a theme from tenant
245
-
246
245
  :type name: str
247
246
  """
248
247
  payload = {
@@ -17,6 +17,7 @@ class ResourcePath(ClientValue):
17
17
  @staticmethod
18
18
  def create_absolute(site_url, path):
19
19
  """
20
+ Creates absolute path
20
21
  :param str site_url: Site url
21
22
  :param str path: Resource path
22
23
  """
@@ -29,11 +30,12 @@ class ResourcePath(ClientValue):
29
30
  @staticmethod
30
31
  def create_relative(site_url, path):
31
32
  """
33
+ Creates server relative path
32
34
  :param str site_url: Site url
33
35
  :param str path: Resource path
34
36
  """
35
37
  site_path = urlparse(site_url).path
36
- if not path.startswith(site_path):
38
+ if not path.lower().startswith(site_path.lower()):
37
39
  return ResourcePath("/".join([site_path, path]))
38
40
  else:
39
41
  return ResourcePath(path)
@@ -265,8 +265,6 @@ class PeopleManager(BaseEntity):
265
265
  def set_multi_valued_profile_property(self, account_name, property_name, property_values):
266
266
  """
267
267
  Sets the value of a multivalued user profile property.
268
-
269
-
270
268
  :param str account_name: Specifies the user by account name.
271
269
  :param str property_name: The name of the property to set.
272
270
  :param list[str] property_values: The values being set on the property.
@@ -1,3 +1,5 @@
1
+ from datetime import datetime
2
+
1
3
  from office365.runtime.client_value_collection import ClientValueCollection
2
4
  from office365.sharepoint.base_entity import BaseEntity
3
5
  from office365.sharepoint.userprofiles.sharedwithme.document_user import SharedWithMeDocumentUser
@@ -15,12 +17,16 @@ class SharedWithMeDocument(BaseEntity):
15
17
 
16
18
  @property
17
19
  def caller_stack(self):
20
+ """
21
+ :rtype: str
22
+ """
18
23
  return self.properties.get('CallerStack', None)
19
24
 
20
25
  @property
21
26
  def content_type_id(self):
22
27
  """
23
28
  Specifies the identifier of the content type of the document.
29
+ :rtype: str
24
30
  """
25
31
  return self.properties.get('ContentTypeId', None)
26
32
 
@@ -28,6 +34,7 @@ class SharedWithMeDocument(BaseEntity):
28
34
  def doc_id(self):
29
35
  """
30
36
  Specifies the document identifier.
37
+ :rtype: str
31
38
  """
32
39
  return self.properties.get('DocId', None)
33
40
 
@@ -37,3 +44,12 @@ class SharedWithMeDocument(BaseEntity):
37
44
  Specifies a list of users that can edit the document.
38
45
  """
39
46
  return self.properties.get('Editors', ClientValueCollection(SharedWithMeDocumentUser))
47
+
48
+ @property
49
+ def modified(self):
50
+ """Specifies the date and time when the document was last modified."""
51
+ return self.properties.get("Modified", datetime.min)
52
+
53
+ @property
54
+ def entity_type_name(self):
55
+ return "Microsoft.SharePoint.Portal.UserProfiles.SharedWithMeDocument"
@@ -4,6 +4,18 @@ from office365.runtime.client_value import ClientValue
4
4
  class SharedWithMeDocumentUser(ClientValue):
5
5
  """Represents a user of a document that is shared with the current user."""
6
6
 
7
+ def __init__(self, _id=None, login_name=None, sip_address=None, title=None):
8
+ """
9
+ :param str _id: Identifier
10
+ :param str login_name: Specifies the login name of the user.
11
+ :param str sip_address: Specifies the sip address of the user.
12
+ :param str title: Specifies the title of the user.
13
+ """
14
+ self.Id = _id
15
+ self.LoginName = login_name
16
+ self.SipAddress = sip_address
17
+ self.Title = title
18
+
7
19
  @property
8
20
  def entity_type_name(self):
9
21
  return "Microsoft.SharePoint.Portal.UserProfiles.SharedWithMeDocumentUser"
@@ -0,0 +1,41 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
3
+ from office365.sharepoint.base_entity import BaseEntity
4
+
5
+
6
+ class SharedWithMeItemCollection(BaseEntity):
7
+ """"""
8
+
9
+ @staticmethod
10
+ def get_shared_with_me_external_items(context, top):
11
+ """
12
+ :param office365.sharepoint.client_context.ClientContext context: Client context
13
+ :param int top:
14
+ """
15
+ binding_type = SharedWithMeItemCollection(context)
16
+ return_type = ClientResult(context, str())
17
+ params = {"top": top}
18
+ qry = ServiceOperationQuery(binding_type, "GetSharedWithMeExternalItems", params,
19
+ return_type=return_type, is_static=True)
20
+ context.add_query(qry)
21
+ return return_type
22
+
23
+ @staticmethod
24
+ def get_shared_with_me_items(context, top, skip_token=None, include_sharing_history=None):
25
+ """
26
+ :param office365.sharepoint.client_context.ClientContext context: Client context
27
+ :param int top:
28
+ :param str skip_token:
29
+ :param bool include_sharing_history:
30
+ """
31
+ binding_type = SharedWithMeItemCollection(context)
32
+ return_type = ClientResult(context, str())
33
+ params = {
34
+ "top": top,
35
+ "skiptoken": skip_token,
36
+ "includeSharingHistory": include_sharing_history
37
+ }
38
+ qry = ServiceOperationQuery(binding_type, "GetSharedWithMeItems", None, params,
39
+ return_type=return_type, is_static=True)
40
+ context.add_query(qry)
41
+ return return_type
@@ -1,5 +1,22 @@
1
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
1
2
  from office365.sharepoint.base_entity import BaseEntity
3
+ from office365.sharepoint.base_entity_collection import BaseEntityCollection
4
+ from office365.sharepoint.userprofiles.sharedwithme.document import SharedWithMeDocument
2
5
 
3
6
 
4
7
  class SharedWithMeItems(BaseEntity):
5
- pass
8
+
9
+ @staticmethod
10
+ def shared_with_me(context):
11
+ """
12
+ :param office365.sharepoint.client_context.ClientContext context: Client context
13
+ """
14
+ binding_type = SharedWithMeItems(context)
15
+ return_type = BaseEntityCollection(context, SharedWithMeDocument)
16
+ qry = ServiceOperationQuery(binding_type, "SharedWithMe", return_type=return_type, is_static=True)
17
+ context.add_query(qry)
18
+ return return_type
19
+
20
+ @property
21
+ def entity_type_name(self):
22
+ return "Microsoft.SharePoint.Portal.UserProfiles.SharedWithMeItems"
@@ -389,7 +389,6 @@ class Web(SecurableObject):
389
389
  def add_supported_ui_language(self, lcid):
390
390
  """
391
391
  Adds a supported UI language by its language identifier.
392
-
393
392
  :param int lcid: Specifies the language identifier to be added.
394
393
  """
395
394
  qry = ServiceOperationQuery(self, "AddSupportedUILanguage", {"lcid": lcid})
@@ -1416,8 +1415,8 @@ class Web(SecurableObject):
1416
1415
 
1417
1416
  @property
1418
1417
  def allow_rss_feeds(self):
1419
- """Gets a Boolean value that specifies whether the site collection allows RSS feeds.
1420
-
1418
+ """
1419
+ Gets a Boolean value that specifies whether the site collection allows RSS feeds.
1421
1420
  :rtype: str
1422
1421
  """
1423
1422
  return self.properties.get("AllowRssFeeds", None)
@@ -14,12 +14,18 @@ class SubscriptionCollection(EntityCollection):
14
14
  Subscribes a listener application to receive change notifications when the requested type of changes occur
15
15
  to the specified resource in Microsoft Graph.
16
16
 
17
- :param str change_type:
18
- :param str notification_url:
19
- :param ResourcePath resource_path:
20
- :param datetime.datetime expiration:
21
- :param str client_state:
22
- :param str latest_supported_tls_version:
17
+ :param str change_type: Indicates the type of change in the subscribed resource that will raise a change
18
+ notification
19
+ :param str notification_url: The URL of the endpoint that will receive the change notifications.
20
+ This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl
21
+ property will be included in the HTTP POST request when Microsoft Graph sends the change notifications.
22
+ :param office365.runtime.paths.resource_path.ResourcePath or str resource_path:
23
+ :param datetime.datetime expiration: Specifies the date and time when the webhook subscription expires.
24
+ :param str client_state: Specifies the value of the clientState property sent by the service in each change
25
+ notification
26
+ :param str latest_supported_tls_version: Specifies the latest version of Transport Layer Security (TLS) that
27
+ the notification endpoint, specified by notificationUrl, supports.
28
+ The possible values are: v1_0, v1_1, v1_2, v1_3.
23
29
  """
24
30
  return_type = Subscription(self.context)
25
31
  self.add_child(return_type)
@@ -1,3 +1,5 @@
1
+ import datetime
2
+
1
3
  from office365.entity import Entity
2
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
3
5
 
@@ -15,11 +17,119 @@ class Subscription(Entity):
15
17
  def application_id(self):
16
18
  """
17
19
  Identifier of the application used to create the subscription.
18
-
19
20
  :rtype: str or None
20
21
  """
21
22
  return self.properties.get("applicationId", None)
22
23
 
24
+ @property
25
+ def change_type(self):
26
+ """
27
+ Required. Indicates the type of change in the subscribed resource that will raise a change notification.
28
+ The supported values are: created, updated, deleted.
29
+ Multiple values can be combined using a comma-separated list.
30
+
31
+ Note:
32
+ Drive root item and list change notifications support only the updated changeType.
33
+ User and group change notifications support updated and deleted changeType. Use updated to receive
34
+ notifications when user or group is created, updated or soft deleted. Use deleted to receive notifications
35
+ when user or group is permanently deleted.
36
+ :rtype: str or None
37
+ """
38
+ return self.properties.get("changeType", None)
39
+
40
+ @property
41
+ def client_state(self):
42
+ """
43
+ Required. Specifies the value of the clientState property sent by the service in each change notification.
44
+ The maximum length is 128 characters. The client can check that the change notification came from the service
45
+ by comparing the value of the clientState property sent with the subscription with the value of the clientState
46
+ property received with each change notification.
47
+ :rtype: str or None
48
+ """
49
+ return self.properties.get("clientState", None)
50
+
51
+ @property
52
+ def creator_id(self):
53
+ """
54
+ Optional. Identifier of the user or service principal that created the subscription. If the app used
55
+ delegated permissions to create the subscription, this field contains the id of the signed-in user the app
56
+ called on behalf of. If the app used application permissions, this field contains the id of the service
57
+ principal corresponding to the app. Read-only.
58
+ :rtype: str or None
59
+ """
60
+ return self.properties.get("creatorId", None)
61
+
62
+ @property
63
+ def encryption_certificate(self):
64
+ """
65
+ Optional. A base64-encoded representation of a certificate with a public key used to encrypt resource data in
66
+ change notifications. Optional but required when includeResourceData is true.
67
+ :rtype: str or None
68
+ """
69
+ return self.properties.get("encryptionCertificate", None)
70
+
71
+ @property
72
+ def encryption_certificate_id(self):
73
+ """
74
+ Optional. A custom app-provided identifier to help identify the certificate needed to decrypt resource data.
75
+ :rtype: str or None
76
+ """
77
+ return self.properties.get("encryptionCertificateId", None)
78
+
79
+ @property
80
+ def expiration_datetime(self):
81
+ """
82
+ Required. Specifies the date and time when the webhook subscription expires. The time is in UTC, and can be
83
+ an amount of time from subscription creation that varies for the resource subscribed to
84
+ """
85
+ return self.properties.get("expirationDateTime", datetime.datetime)
86
+
87
+ @property
88
+ def include_resource_data(self):
89
+ """
90
+ Optional. When set to true, change notifications include resource data (such as content of a chat message).
91
+ :rtype: bool
92
+ """
93
+ return self.properties.get("includeResourceData", None)
94
+
95
+ @property
96
+ def latest_supported_tls_version(self):
97
+ """
98
+ Optional. Specifies the latest version of Transport Layer Security (TLS) that the notification endpoint,
99
+ specified by notificationUrl, supports. The possible values are: v1_0, v1_1, v1_2, v1_3.
100
+
101
+ For subscribers whose notification endpoint supports a version lower than the currently recommended
102
+ version (TLS 1.2), specifying this property by a set timeline allows them to temporarily use their deprecated
103
+ version of TLS before completing their upgrade to TLS 1.2. For these subscribers, not setting this property
104
+ per the timeline would result in subscription operations failing.
105
+
106
+ For subscribers whose notification endpoint already supports TLS 1.2, setting this property is optional.
107
+ In such cases, Microsoft Graph defaults the property to v1_2.
108
+ :rtype: str
109
+ """
110
+ return self.properties.get("latestSupportedTlsVersion", None)
111
+
112
+ @property
113
+ def lifecycle_notification_url(self):
114
+ """
115
+ Required for Teams resources if the expirationDateTime value is more than 1 hour from now; optional otherwise.
116
+ The URL of the endpoint that receives lifecycle notifications, including subscriptionRemoved,
117
+ reauthorizationRequired, and missed notifications. This URL must make use of the HTTPS protocol.
118
+ For more information, see Reduce missing subscriptions and change notifications.
119
+ :rtype: str or None
120
+ """
121
+ return self.properties.get("lifecycleNotificationUrl", None)
122
+
123
+ @property
124
+ def notification_url(self):
125
+ """
126
+ Required. The URL of the endpoint that will receive the change notifications. This URL must make use of
127
+ the HTTPS protocol. Any query string parameter included in the notificationUrl property will be included
128
+ in the HTTP POST request when Microsoft Graph sends the change notifications.
129
+ :rtype: str or None
130
+ """
131
+ return self.properties.get("notificationUrl", None)
132
+
23
133
  @property
24
134
  def resource(self):
25
135
  """
@@ -30,3 +140,11 @@ class Subscription(Entity):
30
140
  :rtype: str or None
31
141
  """
32
142
  return self.properties.get("resource", None)
143
+
144
+ def get_property(self, name, default_value=None):
145
+ if default_value is None:
146
+ property_mapping = {
147
+ "expirationDateTime": self.expiration_datetime,
148
+ }
149
+ default_value = property_mapping.get(name, None)
150
+ return super(Subscription, self).get_property(name, default_value)
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ChannelIdentity(ClientValue):
5
+ """Contains basic identification information about a channel in Microsoft Teams."""
@@ -18,6 +18,5 @@ class ChatCollection(EntityCollection):
18
18
  :param str chat_type: Specifies the type of chat. Possible values are: group and oneOnOne.
19
19
  :rtype: Chat
20
20
  """
21
- return super(ChatCollection, self).add(chatType=chat_type)
22
-
23
21
 
22
+ return super(ChatCollection, self).add(chatType=chat_type)
@@ -1,5 +1,14 @@
1
1
  from office365.entity import Entity
2
+ from office365.outlook.mail.item_body import ItemBody
2
3
 
3
4
 
4
5
  class ChatMessageInfo(Entity):
5
6
  """Represents a preview of a chatMessage resource. This object can only be fetched as part of a list of chats."""
7
+
8
+ @property
9
+ def body(self):
10
+ """
11
+ Body of the chatMessage. This will still contain markers for @mentions and attachments even though the
12
+ object does not return @mentions and attachments..
13
+ """
14
+ return self.properties.get("body", ItemBody())
@@ -1,7 +1,9 @@
1
1
  from office365.entity import Entity
2
2
  from office365.entity_collection import EntityCollection
3
+ from office365.outlook.mail.item_body import ItemBody
3
4
  from office365.runtime.client_value_collection import ClientValueCollection
4
5
  from office365.runtime.paths.resource_path import ResourcePath
6
+ from office365.teams.channels.iIdentity import ChannelIdentity
5
7
  from office365.teams.chats.messages.attachment import ChatMessageAttachment
6
8
 
7
9
 
@@ -16,6 +18,21 @@ class ChatMessage(Entity):
16
18
  """The collection of replies."""
17
19
  return self.properties.get("attachments", ClientValueCollection(ChatMessageAttachment))
18
20
 
21
+ @property
22
+ def body(self):
23
+ """
24
+ Plaintext/HTML representation of the content of the chat message. Representation is specified by the
25
+ contentType inside the body. The content is always in HTML if the chat message contains a chatMessageMention.
26
+ """
27
+ return self.properties.get("body", ItemBody())
28
+
29
+ @property
30
+ def channel_identity(self):
31
+ """
32
+ If the message was sent in a channel, represents identity of the channel.
33
+ """
34
+ return self.properties.get("channelIdentity", ChannelIdentity())
35
+
19
36
  @property
20
37
  def replies(self):
21
38
  """
@@ -29,7 +46,6 @@ class ChatMessage(Entity):
29
46
  def web_url(self):
30
47
  """
31
48
  Link to the message in Microsoft Teams.
32
-
33
49
  :rtype: str
34
50
  """
35
51
  return self.properties.get("webUrl", None)
@@ -38,7 +54,6 @@ class ChatMessage(Entity):
38
54
  def importance(self):
39
55
  """
40
56
  The importance of the chat message. The possible values are: normal, high, urgent.
41
-
42
57
  :rtype: str
43
58
  """
44
59
  return self.properties.get("importance", None)
@@ -7,8 +7,8 @@ class AadUserConversationMember(ConversationMember):
7
7
 
8
8
  @property
9
9
  def user_id(self):
10
- """The guid of the user.
11
-
10
+ """
11
+ The guid of the user.
12
12
  :rtype: str or None
13
13
  """
14
14
  return self.properties.get("userId", None)
@@ -7,16 +7,16 @@ class ConversationMemberCollection(EntityCollection):
7
7
  def __init__(self, context, resource_path=None):
8
8
  super(ConversationMemberCollection, self).__init__(context, ConversationMember, resource_path)
9
9
 
10
- def add(self, user, roles, visible_history_start_date_time=None):
10
+ def add(self, user, roles, visible_history_start_datetime=None):
11
11
  """
12
12
  Add a conversationMember.
13
13
 
14
- :param str or office365.directory.users.user.User user: The conversation members that should be added.
14
+ :param str or office365.directory.users.user.User user: The conversation members that should be added.
15
15
  Every user who will participate in the chat, including the user who initiates the create request,
16
16
  must be specified in this list.
17
17
  Each member must be assigned a role of owner or guest. Guest tenant members must be assigned the guest role
18
18
  :param list[str] roles: The roles for that user.
19
- :param datetime.datetime visible_history_start_date_time:
19
+ :param datetime.datetime visible_history_start_datetime:
20
20
 
21
21
  :rtype: ConversationMember
22
22
  """
@@ -1,3 +1,5 @@
1
+ from datetime import datetime
2
+
1
3
  from office365.directory.permissions.identity_set import IdentitySet
2
4
  from office365.entity import Entity
3
5
 
@@ -11,7 +13,7 @@ class ChangeTrackedEntity(Entity):
11
13
  The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
12
14
  For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
13
15
  """
14
- return self.properties.get('createdDateTime', None)
16
+ return self.properties.get('createdDateTime', datetime.min)
15
17
 
16
18
  @property
17
19
  def last_modified_datetime(self):
@@ -19,9 +21,16 @@ class ChangeTrackedEntity(Entity):
19
21
  The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
20
22
  For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
21
23
  """
22
- return self.properties.get('lastModifiedDateTime', None)
24
+ return self.properties.get('lastModifiedDateTime', datetime.min)
23
25
 
24
26
  @property
25
27
  def last_modified_by(self):
26
28
  """Identity of the person who last modified the entity."""
27
29
  return self.properties.get('lastModifiedBy', IdentitySet())
30
+
31
+ def get_property(self, name, default_value=None):
32
+ if default_value is None:
33
+ property_mapping = {
34
+ }
35
+ default_value = property_mapping.get(name, None)
36
+ return super(ChangeTrackedEntity, self).get_property(name, default_value)