Office365-REST-Python-Client 2.5.5__py3-none-any.whl → 2.5.7__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 (270) hide show
  1. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +6 -6
  2. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +269 -222
  3. office365/booking/virtualevents/__init__.py +0 -0
  4. office365/booking/virtualevents/root.py +5 -0
  5. office365/communications/calls/participant.py +4 -5
  6. office365/directory/administrative_unit.py +9 -2
  7. office365/directory/applications/application.py +3 -3
  8. office365/directory/applications/roles/assignment_collection.py +1 -1
  9. office365/directory/applications/roles/collection.py +6 -2
  10. office365/directory/applications/roles/role.py +1 -1
  11. office365/directory/audit/provisioning/object_summary.py +30 -1
  12. office365/directory/authentication/method_configuration.py +9 -0
  13. office365/directory/authentication/method_mode_detail.py +8 -0
  14. office365/directory/authentication/method_target.py +5 -0
  15. office365/directory/authentication/methods/fido.py +8 -0
  16. office365/directory/authentication/methods/password.py +23 -0
  17. office365/directory/authentication/strength_root.py +5 -0
  18. office365/directory/certificates/auth_configuration.py +1 -3
  19. office365/directory/custom_security_attribute_definition.py +7 -0
  20. office365/directory/device_local_credential_info.py +6 -0
  21. office365/directory/directory.py +40 -12
  22. office365/directory/groups/group.py +2 -6
  23. office365/directory/identities/conditional_access_root.py +10 -1
  24. office365/directory/identities/container.py +3 -9
  25. office365/directory/identities/providers/builtin_identity.py +3 -2
  26. office365/directory/identities/providers/saml_or_wsfed.py +4 -5
  27. office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
  28. office365/directory/identitygovernance/governance.py +14 -3
  29. office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
  30. office365/directory/identitygovernance/privilegedaccess/root.py +5 -0
  31. office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
  32. office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
  33. office365/directory/insights/resource_reference.py +1 -1
  34. office365/directory/key_credential.py +3 -0
  35. office365/directory/licenses/assignment_state.py +26 -2
  36. office365/directory/licenses/details.py +4 -3
  37. office365/directory/licenses/subscribed_sku.py +8 -10
  38. office365/directory/object_collection.py +40 -25
  39. office365/directory/password_credential.py +3 -0
  40. office365/directory/permissions/default_user_role.py +5 -0
  41. office365/directory/permissions/grants/condition_set.py +4 -2
  42. office365/directory/permissions/grants/oauth2.py +7 -10
  43. office365/directory/policies/authorization.py +50 -3
  44. office365/directory/policies/device_registration.py +6 -0
  45. office365/directory/policies/permission_grant.py +2 -0
  46. office365/directory/policies/root.py +13 -0
  47. office365/directory/profile_photo.py +6 -6
  48. office365/directory/protection/riskyusers/risky_user.py +4 -4
  49. office365/directory/rolemanagement/resource_action.py +10 -0
  50. office365/directory/rolemanagement/role_permission.py +10 -0
  51. office365/directory/security/alerts/alert.py +5 -7
  52. office365/directory/security/attacksimulations/landing_page.py +5 -0
  53. office365/directory/security/attacksimulations/operation.py +5 -0
  54. office365/directory/security/attacksimulations/report.py +8 -1
  55. office365/directory/security/attacksimulations/root.py +33 -0
  56. office365/directory/security/attacksimulations/users/__init__.py +0 -0
  57. office365/directory/security/attacksimulations/users/details.py +5 -0
  58. office365/directory/security/hunting_query_results.py +5 -0
  59. office365/directory/security/incidents/incident.py +8 -13
  60. office365/directory/security/security.py +20 -3
  61. office365/directory/security/threatintelligence/article_indicator.py +7 -0
  62. office365/directory/serviceprincipals/service_principal.py +6 -12
  63. office365/directory/synchronization/schema.py +16 -0
  64. office365/directory/synchronization/synchronization.py +2 -0
  65. office365/directory/users/activities/history_item.py +3 -2
  66. office365/directory/users/user.py +60 -10
  67. office365/entity_collection.py +3 -2
  68. office365/graph_client.py +58 -30
  69. office365/intune/audit/event.py +1 -3
  70. office365/intune/audit/event_collection.py +1 -1
  71. office365/intune/devices/alternative_security_id.py +4 -0
  72. office365/intune/devices/collection.py +57 -0
  73. office365/intune/devices/device.py +38 -10
  74. office365/intune/devices/management/management.py +12 -0
  75. office365/intune/organizations/organization.py +1 -0
  76. office365/onedrive/analytics/item_activity_stat.py +9 -0
  77. office365/onedrive/analytics/item_analytics.py +1 -0
  78. office365/onedrive/contenttypes/content_type.py +4 -12
  79. office365/onedrive/driveitems/driveItem.py +76 -7
  80. office365/onedrive/files/hashes.py +5 -0
  81. office365/onedrive/lists/collection.py +2 -2
  82. office365/onedrive/lists/list.py +1 -1
  83. office365/onedrive/operations/long_running.py +6 -6
  84. office365/onedrive/operations/rich_long_running.py +4 -3
  85. office365/onedrive/permissions/collection.py +1 -14
  86. office365/onedrive/sharepoint_settings.py +6 -6
  87. office365/onedrive/sitepages/__init__.py +0 -0
  88. office365/onedrive/sitepages/base.py +29 -0
  89. office365/onedrive/sitepages/canvas_layout.py +43 -0
  90. office365/onedrive/sitepages/collection.py +32 -0
  91. office365/onedrive/sitepages/horizontal_section.py +23 -0
  92. office365/onedrive/sitepages/horizontal_section_column.py +27 -0
  93. office365/onedrive/sitepages/site_page.py +116 -0
  94. office365/onedrive/sitepages/title_area.py +13 -0
  95. office365/onedrive/sitepages/vertical_section.py +27 -0
  96. office365/onedrive/sitepages/web_part.py +5 -0
  97. office365/onedrive/sites/site.py +10 -0
  98. office365/onedrive/sites/sites_with_root.py +1 -3
  99. office365/onedrive/termstore/store.py +2 -4
  100. office365/onedrive/termstore/terms/collection.py +1 -2
  101. office365/onedrive/workbooks/charts/data_labels.py +13 -1
  102. office365/onedrive/workbooks/filter.py +9 -0
  103. office365/onedrive/workbooks/filter_criteria.py +5 -0
  104. office365/onedrive/workbooks/functions/functions.py +6 -3
  105. office365/onedrive/workbooks/functions/result.py +2 -0
  106. office365/onedrive/workbooks/operations/workbook.py +7 -10
  107. office365/onedrive/workbooks/tables/pivot_table.py +9 -9
  108. office365/onedrive/workbooks/tables/sort.py +5 -0
  109. office365/onedrive/workbooks/tables/table.py +57 -0
  110. office365/onedrive/workbooks/worksheets/collection.py +0 -6
  111. office365/onedrive/workbooks/worksheets/protection.py +22 -1
  112. office365/onedrive/workbooks/worksheets/protection_options.py +7 -0
  113. office365/outlook/calendar/calendar.py +1 -3
  114. office365/outlook/calendar/events/event.py +45 -0
  115. office365/outlook/calendar/permissions/permission.py +7 -7
  116. office365/outlook/calendar/place.py +5 -3
  117. office365/outlook/calendar/response_status.py +11 -0
  118. office365/outlook/calendar/rooms/room.py +14 -0
  119. office365/outlook/mail/attachments/collection.py +6 -1
  120. office365/outlook/mail/automatic_replies_mailtips.py +5 -0
  121. office365/outlook/mail/conversation.py +1 -3
  122. office365/outlook/mail/folders/folder.py +1 -3
  123. office365/outlook/mail/messages/message.py +1 -1
  124. office365/outlook/mail/tips.py +17 -0
  125. office365/planner/plans/plan.py +11 -1
  126. office365/reports/root.py +83 -4
  127. office365/runtime/auth/authentication_context.py +12 -2
  128. office365/runtime/auth/providers/acs_token_provider.py +10 -7
  129. office365/runtime/auth/sts_profile.py +0 -1
  130. office365/runtime/client_object.py +18 -14
  131. office365/runtime/client_object_collection.py +8 -23
  132. office365/runtime/client_request_exception.py +1 -3
  133. office365/runtime/client_result.py +11 -14
  134. office365/runtime/client_runtime_context.py +11 -21
  135. office365/runtime/odata/json_format.py +7 -9
  136. office365/runtime/odata/request.py +12 -2
  137. office365/runtime/odata/v3/batch_request.py +7 -15
  138. office365/runtime/odata/v4/batch_request.py +13 -21
  139. office365/runtime/queries/upload_session.py +5 -0
  140. office365/runtime/types/event_handler.py +1 -1
  141. office365/search/entity.py +3 -2
  142. office365/sharepoint/activities/facets/delete.py +1 -1
  143. office365/sharepoint/activities/tracked_item_service.py +2 -3
  144. office365/sharepoint/administration/web_application.py +8 -7
  145. office365/sharepoint/alerts/collection.py +2 -1
  146. office365/sharepoint/attachments/attachment.py +3 -9
  147. office365/sharepoint/audit/audit.py +3 -2
  148. office365/sharepoint/changes/alert.py +4 -3
  149. office365/sharepoint/changes/collection.py +7 -10
  150. office365/sharepoint/changes/content_type.py +4 -4
  151. office365/sharepoint/changes/field.py +4 -5
  152. office365/sharepoint/changes/item.py +34 -7
  153. office365/sharepoint/changes/list.py +4 -4
  154. office365/sharepoint/changes/user.py +5 -6
  155. office365/sharepoint/client_context.py +4 -2
  156. office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
  157. office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
  158. office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
  159. office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
  160. office365/sharepoint/contenttypes/content_type.py +13 -1
  161. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -7
  162. office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
  163. office365/sharepoint/directory/helper.py +2 -0
  164. office365/sharepoint/entity.py +12 -5
  165. office365/sharepoint/entity_collection.py +1 -3
  166. office365/sharepoint/eventreceivers/definition.py +8 -12
  167. office365/sharepoint/features/collection.py +1 -2
  168. office365/sharepoint/features/definitions/definition.py +6 -3
  169. office365/sharepoint/fields/calculated.py +8 -14
  170. office365/sharepoint/fields/collection.py +46 -13
  171. office365/sharepoint/fields/computed.py +4 -5
  172. office365/sharepoint/fields/currency.py +7 -11
  173. office365/sharepoint/fields/date_time.py +4 -8
  174. office365/sharepoint/fields/field.py +6 -16
  175. office365/sharepoint/fields/lookup.py +11 -9
  176. office365/sharepoint/fields/multi_choice.py +8 -12
  177. office365/sharepoint/fields/multi_line_text.py +10 -14
  178. office365/sharepoint/fields/number.py +13 -26
  179. office365/sharepoint/fields/rating_scale.py +6 -10
  180. office365/sharepoint/fields/related_field.py +10 -17
  181. office365/sharepoint/fields/url.py +4 -5
  182. office365/sharepoint/fields/user.py +10 -9
  183. office365/sharepoint/files/collection.py +17 -15
  184. office365/sharepoint/files/file.py +30 -23
  185. office365/sharepoint/folders/collection.py +22 -5
  186. office365/sharepoint/folders/coloring.py +11 -9
  187. office365/sharepoint/folders/coloring_information.py +38 -0
  188. office365/sharepoint/folders/folder.py +23 -25
  189. office365/sharepoint/likes/liked_by_information.py +7 -10
  190. office365/sharepoint/likes/user_entity.py +6 -8
  191. office365/sharepoint/listitems/form_update_value.py +17 -1
  192. office365/sharepoint/listitems/listitem.py +2 -2
  193. office365/sharepoint/lists/bloom_filter.py +5 -7
  194. office365/sharepoint/lists/creatables_info.py +5 -6
  195. office365/sharepoint/lists/list.py +24 -9
  196. office365/sharepoint/lists/template.py +7 -4
  197. office365/sharepoint/lists/template_collection.py +2 -4
  198. office365/sharepoint/marketplace/app_metadata.py +14 -23
  199. office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
  200. office365/sharepoint/migrationcenter/deploy_status.py +5 -0
  201. office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
  202. office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
  203. office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
  204. office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
  205. office365/sharepoint/navigation/node.py +5 -8
  206. office365/sharepoint/permissions/irm/effective_settings.py +6 -8
  207. office365/sharepoint/permissions/irm/file_settings.py +8 -6
  208. office365/sharepoint/permissions/irm/settings.py +25 -43
  209. office365/sharepoint/portal/groups/site_manager.py +6 -7
  210. office365/sharepoint/principal/principal.py +2 -4
  211. office365/sharepoint/publishing/embed_data_v1.py +8 -15
  212. office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
  213. office365/sharepoint/publishing/primary_city_time.py +8 -9
  214. office365/sharepoint/publishing/video/service_discoverer.py +4 -3
  215. office365/sharepoint/pushnotifications/subscriber.py +11 -15
  216. office365/sharepoint/recyclebin/item.py +107 -7
  217. office365/sharepoint/sharing/information.py +9 -0
  218. office365/sharepoint/sharing/link_info.py +6 -0
  219. office365/sharepoint/sharing/object_sharing_settings.py +24 -46
  220. office365/sharepoint/sharing/permission_collection.py +18 -0
  221. office365/sharepoint/sharing/permission_information.py +5 -5
  222. office365/sharepoint/sharing/result.py +1 -0
  223. office365/sharepoint/sitedesigns/run.py +4 -3
  224. office365/sharepoint/sites/script_safe_domain.py +5 -0
  225. office365/sharepoint/sites/site.py +17 -20
  226. office365/sharepoint/taxonomy/field.py +32 -21
  227. office365/sharepoint/taxonomy/field_value.py +1 -1
  228. office365/sharepoint/taxonomy/groups/group.py +12 -1
  229. office365/sharepoint/taxonomy/sets/set.py +6 -0
  230. office365/sharepoint/taxonomy/stores/store.py +4 -2
  231. office365/sharepoint/teams/channel.py +6 -6
  232. office365/sharepoint/tenant/administration/endpoints.py +4 -3
  233. office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
  234. office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
  235. office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
  236. office365/sharepoint/tenant/administration/sites/properties.py +0 -1
  237. office365/sharepoint/tenant/administration/spo_operation.py +4 -4
  238. office365/sharepoint/tenant/administration/tenant.py +1 -0
  239. office365/sharepoint/tenant/insights/report.py +11 -0
  240. office365/sharepoint/tenant/insights/report_manager.py +5 -0
  241. office365/sharepoint/tenant/insights/report_metadata.py +5 -0
  242. office365/sharepoint/tenant/settings.py +4 -3
  243. office365/sharepoint/translation/sync_translator.py +3 -2
  244. office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
  245. office365/sharepoint/usercustomactions/action.py +12 -20
  246. office365/sharepoint/userprofiles/followed_content.py +6 -10
  247. office365/sharepoint/userprofiles/people_manager.py +0 -1
  248. office365/sharepoint/userprofiles/person_properties.py +14 -30
  249. office365/sharepoint/userprofiles/personal_cache.py +4 -3
  250. office365/sharepoint/userprofiles/properties_for_user.py +4 -5
  251. office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
  252. office365/sharepoint/utilities/move_copy_util.py +19 -19
  253. office365/sharepoint/utilities/upload_status.py +7 -10
  254. office365/sharepoint/views/field_collection.py +9 -14
  255. office365/sharepoint/views/view.py +43 -64
  256. office365/sharepoint/webhooks/subscription.py +11 -19
  257. office365/sharepoint/webparts/webpart.py +3 -1
  258. office365/sharepoint/webs/information_collection.py +1 -1
  259. office365/sharepoint/webs/modernize_homepage_result.py +4 -3
  260. office365/sharepoint/webs/regional_settings.py +79 -16
  261. office365/sharepoint/webs/template.py +3 -5
  262. office365/sharepoint/webs/web.py +24 -25
  263. office365/teams/apps/catalog.py +1 -0
  264. office365/teams/chats/chat.py +4 -0
  265. office365/teams/operations/async_operation.py +5 -7
  266. office365/teams/schedule/schedule.py +6 -2
  267. office365/runtime/paths/item.py +0 -8
  268. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
  269. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
  270. {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.paths.resource_path import ResourcePath
2
4
  from office365.sharepoint.entity import Entity
3
5
  from office365.sharepoint.sharing.object_sharing_information import (
@@ -18,84 +20,64 @@ class ObjectSharingSettings(Entity):
18
20
 
19
21
  @property
20
22
  def web_url(self):
21
- """
22
- The URL pointing to the containing SP.Web object.
23
- :rtype: str
24
- """
23
+ # type: () -> Optional[str]
24
+ """The URL pointing to the containing SP.Web object."""
25
25
  return self.properties.get("WebUrl", None)
26
26
 
27
27
  @property
28
28
  def access_request_mode(self):
29
- """
30
- Boolean indicating whether the sharing context operates under the access request mode.
31
- :rtype: bool
32
- """
29
+ # type: () -> Optional[bool]
30
+ """Boolean indicating whether the sharing context operates under the access request mode."""
33
31
  return self.properties.get("AccessRequestMode", None)
34
32
 
35
33
  @property
36
34
  def block_people_picker_and_sharing(self):
37
- """
38
- Boolean indicating whether the current user can use the People Picker to do any sharing.
39
- :rtype: bool
40
- """
35
+ # type: () -> Optional[bool]
36
+ """Boolean indicating whether the current user can use the People Picker to do any sharing."""
41
37
  return self.properties.get("BlockPeoplePickerAndSharing", None)
42
38
 
43
39
  @property
44
40
  def can_current_user_manage_organization_readonly_link(self):
45
- """
46
- Boolean indicating whether the current user can create or disable an organization View link.
47
- :rtype: bool
48
- """
41
+ # type: () -> Optional[bool]
42
+ """Boolean indicating whether the current user can create or disable an organization View link."""
49
43
  return self.properties.get("CanCurrentUserManageOrganizationReadonlyLink", None)
50
44
 
51
45
  @property
52
46
  def can_current_user_manage_organization_read_write_link(self):
53
- """
54
- Boolean indicating whether the current user can create or disable an organization Edit link.
55
- :rtype: bool
56
- """
47
+ # type: () -> Optional[bool]
48
+ """Boolean indicating whether the current user can create or disable an organization Edit link."""
57
49
  return self.properties.get(
58
50
  "CanCurrentUserManageOrganizationReadWriteLink", None
59
51
  )
60
52
 
61
53
  @property
62
54
  def can_current_user_manage_readonly_link(self):
63
- """
64
- Boolean indicating whether the current user can create or disable an anonymous View link.
65
- :rtype: bool
66
- """
55
+ # type: () -> Optional[bool]
56
+ """Boolean indicating whether the current user can create or disable an anonymous View link."""
67
57
  return self.properties.get("CanCurrentUserManageReadonlyLink", None)
68
58
 
69
59
  @property
70
60
  def can_send_email(self):
71
- """
72
- Boolean indicating whether email invitations can be sent.
73
- :rtype: bool
74
- """
61
+ # type: () -> Optional[bool]
62
+ """Boolean indicating whether email invitations can be sent."""
75
63
  return self.properties.get("CanSendEmail", None)
76
64
 
77
65
  @property
78
66
  def can_send_link(self):
79
- """
80
- Boolean indicating whether the current user can make use of Share-By-Link.
81
- :rtype: bool
82
- """
67
+ # type: () -> Optional[bool]
68
+ """Boolean indicating whether the current user can make use of Share-By-Link."""
83
69
  return self.properties.get("CanSendLink", None)
84
70
 
85
71
  @property
86
72
  def is_user_site_admin(self):
87
- """
88
- Boolean that indicates whether or not the current user is a site collection administrator.
89
- :return: bool
90
- """
73
+ # type: () -> Optional[bool]
74
+ """Boolean that indicates whether or not the current user is a site collection administrator"""
91
75
  return self.properties.get("IsUserSiteAdmin", None)
92
76
 
93
77
  @property
94
78
  def list_id(self):
95
- """
96
- The unique ID of the parent list (if applicable).
97
- :rtype: str
98
- """
79
+ # type: () -> Optional[str]
80
+ """The unique ID of the parent list (if applicable)."""
99
81
  return self.properties.get("ListId", None)
100
82
 
101
83
  @property
@@ -120,9 +102,7 @@ class ObjectSharingSettings(Entity):
120
102
 
121
103
  @property
122
104
  def sharepoint_settings(self):
123
- """
124
- An object that contains the SharePoint UI specific sharing settings.
125
- """
105
+ """An object that contains the SharePoint UI specific sharing settings."""
126
106
  return self.properties.get(
127
107
  "SharePointSettings",
128
108
  SharePointSharingSettings(
@@ -132,9 +112,7 @@ class ObjectSharingSettings(Entity):
132
112
 
133
113
  @property
134
114
  def sharing_permissions(self):
135
- """
136
- A list of SharingPermissionInformation objects that can be used to share.
137
- """
115
+ """A list of SharingPermissionInformation objects that can be used to share."""
138
116
  return self.properties.get(
139
117
  "SharingPermissions",
140
118
  SharingPermissionInformation(
@@ -1,4 +1,7 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.sharing.link_info import LinkInfo
4
+ from office365.sharepoint.utilities.principal_info import PrincipalInfo
2
5
 
3
6
 
4
7
  class PermissionCollection(ClientValue):
@@ -9,6 +12,21 @@ class PermissionCollection(ClientValue):
9
12
  implicit access.
10
13
  """
11
14
 
15
+ def __init__(
16
+ self, hasInheritedLinks=None, links=None, principals=None, siteAdmins=None
17
+ ):
18
+ """
19
+ :param bool hasInheritedLinks:
20
+ :param list[LinkInfo] links: The List of tokenized sharing links with their LinkInfo objects.
21
+ :param list[PrincipalInfo] principals: The List of Principals with their roles on this list item.
22
+ :param list[PrincipalInfo] siteAdmins: The List of Principals who are Site Admins. This property is returned
23
+ only if the caller is an Auditor.
24
+ """
25
+ self.hasInheritedLinks = hasInheritedLinks
26
+ self.links = ClientValueCollection(LinkInfo, links)
27
+ self.principals = ClientValueCollection(PrincipalInfo, principals)
28
+ self.siteAdmins = ClientValueCollection(PrincipalInfo, siteAdmins)
29
+
12
30
  @property
13
31
  def entity_type_name(self):
14
32
  return "SP.Sharing.PermissionCollection"
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
@@ -8,6 +10,7 @@ class SharingPermissionInformation(Entity):
8
10
 
9
11
  @property
10
12
  def is_default_permission(self):
13
+ # type: () -> Optional[bool]
11
14
  """
12
15
  Identifies whether or not the permission entity is a default SP.Group or role (meaning it is recommended
13
16
  for granting permissions).
@@ -20,16 +23,13 @@ class SharingPermissionInformation(Entity):
20
23
  For granting permissions to a file or other non-site object, there can be two default permission entities:
21
24
  a role for view permissions (StandardViewerRoleDefinitionID) and a role for edit permissions
22
25
  (StandardEditorRoleDefinitionID).
23
-
24
- :rtype: bool or None
25
26
  """
26
27
  return self.properties.get("IsDefaultPermission", None)
27
28
 
28
29
  @property
29
30
  def permission_id(self):
30
- """Gets the ID of this permission in the following formats: group:x, role: xxxxxx.
31
- :rtype: str or None
32
- """
31
+ # type: () -> Optional[str]
32
+ """Gets the ID of this permission in the following formats: group:x, role: xxxxxx."""
33
33
  return self.properties.get("PermissionId", None)
34
34
 
35
35
  @property
@@ -91,6 +91,7 @@ class SharingResult(Entity):
91
91
  property_mapping = {
92
92
  "GroupsSharedWith": self.groups_shared_with,
93
93
  "UsersAddedToGroup": self.users_added_to_group,
94
+ "UniquelyPermissionedUsers": self.uniquely_permissioned_users,
94
95
  }
95
96
  default_value = property_mapping.get(name, None)
96
97
  return super(SharingResult, self).get_property(name, default_value)
@@ -1,12 +1,13 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
4
6
  class SiteDesignRun(Entity):
5
7
  @property
6
8
  def site_design_id(self):
7
- """
8
- :rtype: str or None
9
- """
9
+ # type: () -> Optional[str]
10
+ """"""
10
11
  return self.properties.get("SiteDesignID", None)
11
12
 
12
13
  @property
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class ScriptSafeDomain(Entity):
5
+ """"""
@@ -219,7 +219,9 @@ class Site(Entity):
219
219
  specified in the orderBy parameter. A value of true indicates ascending order, and a value of false
220
220
  indicates descending order.
221
221
  """
222
- return_type = RecycleBinItemCollection(self.context)
222
+ return_type = RecycleBinItemCollection(
223
+ self.context, self.recycle_bin.resource_path
224
+ )
223
225
  payload = {"rowLimit": row_limit, "isAscending": is_ascending}
224
226
  qry = ServiceOperationQuery(
225
227
  self, "GetRecycleBinItems", None, payload, None, return_type
@@ -228,9 +230,7 @@ class Site(Entity):
228
230
  return return_type
229
231
 
230
232
  def get_site_administrators(self):
231
- """
232
- Gets site collection administrators
233
- """
233
+ """Gets site collection administrators"""
234
234
  return_type = ClientResult(
235
235
  self.context, ClientValueCollection(SiteAdministratorsInfo)
236
236
  )
@@ -521,6 +521,12 @@ class Site(Entity):
521
521
  """
522
522
  return self.properties.get("CanUpgrade", None)
523
523
 
524
+ @property
525
+ def channel_group_id(self):
526
+ # type: () -> Optional[str]
527
+ """ """
528
+ return self.properties.get("ChannelGroupId", None)
529
+
524
530
  @property
525
531
  def classification(self):
526
532
  # type: () -> Optional[str]
@@ -621,25 +627,20 @@ class Site(Entity):
621
627
 
622
628
  @property
623
629
  def trim_audit_log(self):
624
- """
625
- When this flag is set for the site, the audit events are trimmed periodically.
626
- :rtype: bool or none
627
- """
630
+ # type: () -> Optional[bool]
631
+ """When this flag is set for the site, the audit events are trimmed periodically."""
628
632
  return self.properties.get("TrimAuditLog", None)
629
633
 
630
634
  @property
631
635
  def write_locked(self):
632
- """
633
- :rtype: bool or none
634
- """
636
+ # type: () -> Optional[bool]
637
+ """ """
635
638
  return self.properties.get("WriteLocked", None)
636
639
 
637
640
  @property
638
641
  def id(self):
639
642
  # type: () -> Optional[str]
640
- """
641
- Specifies the GUID that identifies the site collection.
642
- """
643
+ """Specifies the GUID that identifies the site collection."""
643
644
  return self.properties.get("Id", None)
644
645
 
645
646
  @property
@@ -651,9 +652,7 @@ class Site(Entity):
651
652
  @property
652
653
  def is_hub_site(self):
653
654
  # type: () -> Optional[bool]
654
- """
655
- Returns whether the specified site is a hub site
656
- """
655
+ """Returns whether the specified site is a hub site"""
657
656
  return self.properties.get("IsHubSite", None)
658
657
 
659
658
  @property
@@ -665,9 +664,7 @@ class Site(Entity):
665
664
  @property
666
665
  def status_bar_link(self):
667
666
  # type: () -> Optional[str]
668
- """
669
- Gets the status bar message link target for this site.
670
- """
667
+ """Gets the status bar message link target for this site."""
671
668
  return self.properties.get("StatusBarLink", None)
672
669
 
673
670
  @property
@@ -1,4 +1,5 @@
1
1
  import uuid
2
+ from typing import Optional
2
3
 
3
4
  from office365.sharepoint.fields.lookup import FieldLookup
4
5
  from office365.sharepoint.taxonomy.create_xml_parameters import (
@@ -9,6 +10,20 @@ from office365.sharepoint.taxonomy.create_xml_parameters import (
9
10
  class TaxonomyField(FieldLookup):
10
11
  """Represents a taxonomy field."""
11
12
 
13
+ def set_field_value_by_value(self, item, tax_value):
14
+ """
15
+ Sets the value of the corresponding field in the list item to the value of the specified TaxonomyFieldValue
16
+ :param ListItem item: The ListItem object whose field is to be updated.
17
+ :param TaxonomyFieldValue tax_value: The TaxonomyFieldValue object whose value is to be used to
18
+ update this field.
19
+ """
20
+
21
+ def _set_field_value_by_value():
22
+ item.set_property(self.internal_name, tax_value)
23
+
24
+ self.ensure_property("InternalName", _set_field_value_by_value)
25
+ return self
26
+
12
27
  @staticmethod
13
28
  def create(
14
29
  fields,
@@ -77,103 +92,99 @@ class TaxonomyField(FieldLookup):
77
92
 
78
93
  @property
79
94
  def anchor_id(self):
80
- """Gets or sets the GUID of the anchor Term object for a TaxonomyField object.
81
- :rtype: str or None
82
- """
95
+ # type: () -> Optional[str]
96
+ """Gets or sets the GUID of the anchor Term object for a TaxonomyField object."""
83
97
  return self.properties.get("AnchorId", None)
84
98
 
85
99
  @property
86
100
  def create_values_in_edit_form(self):
101
+ # type: () -> Optional[bool]
87
102
  """
88
103
  Specifies a Boolean value that specifies whether the new Term objects can be added to the
89
104
  TermSet while typing in the TaxonomyField editor control.
90
- :rtype: bool or None
91
105
  """
92
106
  return self.properties.get("CreateValuesInEditForm", None)
93
107
 
94
108
  @property
95
109
  def is_anchor_valid(self):
96
- """Gets a Boolean value that specifies whether the Term object identified by the AnchorId property is valid.
97
- :rtype: bool or None
98
- """
110
+ # type: () -> Optional[bool]
111
+ """Gets a Boolean value that specifies whether the Term object identified by the AnchorId property is valid."""
99
112
  return self.properties.get("IsAnchorValid", None)
100
113
 
101
114
  @property
102
115
  def is_doc_tags_enabled(self):
103
- """
104
- :rtype: bool or None
105
- """
116
+ # type: () -> Optional[bool]
117
+ """ """
106
118
  return self.properties.get("IsDocTagsEnabled", None)
107
119
 
108
120
  @property
109
121
  def is_keyword(self):
122
+ # type: () -> Optional[bool]
110
123
  """
111
124
  Specifies a Boolean value that indicates whether the TaxonomyField value points to the
112
125
  keywords term set object.
113
- :rtype: bool or None
114
126
  """
115
127
  return self.properties.get("IsKeyword", None)
116
128
 
117
129
  @property
118
130
  def is_path_rendered(self):
131
+ # type: () -> Optional[bool]
119
132
  """
120
133
  Specifies a Boolean value that specifies whether the default Label objects of all the parent
121
134
  Term objects of a Term in the TaxonomyField object will be rendered in
122
135
  addition to the default label of that Term.
123
- :rtype: bool or None
124
136
  """
125
137
  return self.properties.get("IsPathRendered", None)
126
138
 
127
139
  @property
128
140
  def is_term_set_valid(self):
141
+ # type: () -> Optional[bool]
129
142
  """
130
143
  Gets a Boolean value that specifies whether the TermSet object identified by the TermSetId
131
144
  property exists and is available for tagging.
132
- :rtype: bool or None
133
145
  """
134
146
  return self.properties.get("IsTermSetValid", None)
135
147
 
136
148
  @property
137
149
  def open(self):
150
+ # type: () -> Optional[bool]
138
151
  """
139
152
  Specifies a Boolean value that specifies whether the TaxonomyField object is linked to an
140
153
  open TermSet (section 3.1.5.20) object or a closed TermSet.
141
- :rtype: bool or None
142
154
  """
143
155
  return self.properties.get("Open", None)
144
156
 
145
157
  @property
146
158
  def ssp_id(self):
159
+ # type: () -> Optional[str]
147
160
  """
148
161
  Specifies the GUID that identifies the TermStore object, which contains the Enterprise
149
162
  keywords for the site that the current TaxonomyField belongs to.
150
- :rtype: str or None
151
163
  """
152
164
  return self.properties.get("SspId", None)
153
165
 
154
166
  @property
155
167
  def target_template(self):
168
+ # type: () -> Optional[str]
156
169
  """
157
170
  Specifies the Web-relative Uniform Resource Locator (URL) of the target page that is used to construct the
158
171
  hyperlink on each Term object when the TaxonomyField (section 3.1.5.27) object is rendered.
159
- :rtype: str or None
160
172
  """
161
173
  return self.properties.get("TargetTemplate", None)
162
174
 
163
175
  @property
164
176
  def term_set_id(self):
177
+ # type: () -> Optional[str]
165
178
  """
166
179
  Specifies the GUID of the TermSet object that contains the Term
167
180
  objects used by the current TaxonomyField () object.
168
- :rtype: str or None
169
181
  """
170
182
  return self.properties.get("TermSetId", None)
171
183
 
172
184
  @property
173
185
  def text_field_id(self):
174
- """Gets the GUID that identifies the hidden text field in an item.
175
- :rtype: str or None
176
- """
186
+ # type: () -> Optional[str]
187
+ """Gets the GUID that identifies the hidden text field in an item."""
177
188
  return self.properties.get("TextField", None)
178
189
 
179
190
  @property
@@ -185,10 +196,10 @@ class TaxonomyField(FieldLookup):
185
196
 
186
197
  @property
187
198
  def user_created(self):
199
+ # type: () -> Optional[bool]
188
200
  """
189
201
  Specifies a Boolean value that specifies whether the TaxonomyField object is linked to a
190
202
  customized TermSet object.
191
- :rtype: bool or None
192
203
  """
193
204
  return self.properties.get("UserCreated", None)
194
205
 
@@ -25,7 +25,7 @@ class TaxonomyFieldValue(ClientValue):
25
25
  return "SP.Taxonomy.TaxonomyFieldValue"
26
26
 
27
27
 
28
- class TaxonomyFieldValueCollection(ClientValueCollection):
28
+ class TaxonomyFieldValueCollection(ClientValueCollection[TaxonomyFieldValue]):
29
29
  """Represents the multi-value object for the taxonomy column."""
30
30
 
31
31
  def __init__(self, initial_values):
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.paths.resource_path import ResourcePath
2
4
  from office365.sharepoint.taxonomy.item import TaxonomyItem
3
5
  from office365.sharepoint.taxonomy.item_collection import TaxonomyItemCollection
@@ -8,6 +10,9 @@ from office365.sharepoint.taxonomy.sets.set import TermSet
8
10
  class TermGroup(TaxonomyItem):
9
11
  """Represents the top-level container in a TermStore object."""
10
12
 
13
+ def __str__(self):
14
+ return self.display_name or self.entity_type_name
15
+
11
16
  def get_term_sets_by_name(self, label, lcid=None):
12
17
  """
13
18
  Search term set by name
@@ -26,7 +31,7 @@ class TermGroup(TaxonomyItem):
26
31
  ]
27
32
 
28
33
  def _group_resolved():
29
- self.context.load(self.term_sets, after_loaded=_sets_loaded)
34
+ self.term_sets.get().after_execute(_sets_loaded)
30
35
 
31
36
  self.ensure_property("id", _group_resolved)
32
37
  return return_type
@@ -44,6 +49,12 @@ class TermGroup(TaxonomyItem):
44
49
  ),
45
50
  )
46
51
 
52
+ @property
53
+ def display_name(self):
54
+ # type: () -> Optional[str]
55
+ """Gets the name of the Term Group"""
56
+ return self.properties.get("displayName", None)
57
+
47
58
  def get_property(self, name, default_value=None):
48
59
  if default_value is None:
49
60
  property_mapping = {"termSets": self.term_sets}
@@ -9,6 +9,12 @@ from office365.sharepoint.taxonomy.terms.term import Term
9
9
  class TermSet(TaxonomyItem):
10
10
  """Represents a hierarchical or flat set of Term objects known as a 'TermSet'."""
11
11
 
12
+ def __repr__(self):
13
+ if self.is_property_available("localizedNames"):
14
+ return repr(self.localized_names[0])
15
+ else:
16
+ return self.entity_type_name
17
+
12
18
  @property
13
19
  def localized_names(self):
14
20
  return self.properties.get(
@@ -26,10 +26,12 @@ class TermStore(TaxonomyItem):
26
26
 
27
27
  def _groups_loaded(col):
28
28
  # type: (TermGroupCollection) -> None
29
- for grp in col:
29
+ [
30
30
  grp.get_term_sets_by_name(label, lcid).after_execute(_sets_loaded)
31
+ for grp in col
32
+ ]
31
33
 
32
- self.context.load(self.term_groups, after_loaded=_groups_loaded)
34
+ self.term_groups.get().after_execute(_groups_loaded)
33
35
  return return_type
34
36
 
35
37
  def search_term(self, label, set_id=None, parent_term_id=None, language_tag=None):
@@ -1,17 +1,17 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
4
6
  class TeamChannel(Entity):
5
7
  @property
6
8
  def folder_id(self):
7
- """
8
- :rtype: str or None
9
- """
9
+ # type: () -> Optional[str]
10
+ """ """
10
11
  return self.properties.get("folderId", None)
11
12
 
12
13
  @property
13
14
  def group_id(self):
14
- """
15
- :rtype: str or None
16
- """
15
+ # type: () -> Optional[str]
16
+ """ """
17
17
  return self.properties.get("groupId", None)
@@ -1,12 +1,13 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
4
6
  class TenantAdminEndpoints(Entity):
5
7
  @property
6
8
  def o365_admin_center_endpoint(self):
7
- """
8
- :rtype: str or None
9
- """
9
+ # type: () -> Optional[str]
10
+ """"""
10
11
  return self.properties.get("O365AdminCenterEndpoint", None)
11
12
 
12
13
  @property
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.client_value_collection import ClientValueCollection
2
4
  from office365.sharepoint.entity import Entity
3
5
  from office365.sharepoint.tenant.administration.hubsites.permission import (
@@ -14,11 +16,8 @@ class HubSiteProperties(Entity):
14
16
 
15
17
  @property
16
18
  def site_id(self):
17
- """
18
- Returns the Site identifier
19
-
20
- :rtype: str or None
21
- """
19
+ # type: () -> Optional[str]
20
+ """Returns the Site identifier"""
22
21
  return self.properties.get("SiteId", None)
23
22
 
24
23
  @property
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class PowerAppsEnvironmentContext(ClientValue):
5
+ @property
6
+ def entity_type_name(self):
7
+ # type: () -> str
8
+ return "Microsoft.Online.SharePoint.TenantAdministration.PowerAppsEnvironmentContext"
@@ -108,7 +108,6 @@ class SiteProperties(Entity):
108
108
  - ExternalUserSharingOnly - External user sharing (share by email) is enabled, but guest link sharing
109
109
  is disabled.
110
110
  - ExistingExternalUserSharingOnly - Only guests already in your organization's directory.
111
- :rtype: int
112
111
  """
113
112
  return self.properties.get("SharingCapability", None)
114
113
 
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.client_object import ClientObject
2
4
 
3
5
 
@@ -6,10 +8,8 @@ class SpoOperation(ClientObject):
6
8
 
7
9
  @property
8
10
  def has_timedout(self):
9
- """
10
- Gets a value that indicates whether the maximum wait time for the operation has been exceeded.
11
- :rtype: bool or None
12
- """
11
+ # type: () -> Optional[bool]
12
+ """Gets a value that indicates whether the maximum wait time for the operation has been exceeded."""
13
13
  return self.properties.get("HasTimedout", None)
14
14
 
15
15
  @property
@@ -335,6 +335,7 @@ class Tenant(Entity):
335
335
  return return_type
336
336
 
337
337
  def _poll_site_status(self, site_url, polling_interval_secs):
338
+ # type: (str, int) -> None
338
339
  states = [0, 1, 2]
339
340
  time.sleep(polling_interval_secs)
340
341