Office365-REST-Python-Client 2.5.4__py3-none-any.whl → 2.5.6__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 (225) hide show
  1. {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/METADATA +2 -2
  2. {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/RECORD +224 -204
  3. office365/booking/business/business.py +5 -3
  4. office365/booking/virtualevents/__init__.py +0 -0
  5. office365/booking/virtualevents/root.py +5 -0
  6. office365/communications/calls/participant.py +4 -5
  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 +2 -2
  10. office365/directory/authentication/method_configuration.py +9 -0
  11. office365/directory/authentication/method_mode_detail.py +8 -0
  12. office365/directory/authentication/method_target.py +5 -0
  13. office365/directory/authentication/strength_root.py +5 -0
  14. office365/directory/certificates/auth_configuration.py +1 -3
  15. office365/directory/extensions/extended_property.py +4 -4
  16. office365/directory/extensions/open_type.py +4 -4
  17. office365/directory/groups/group.py +2 -6
  18. office365/directory/identities/conditional_access_root.py +10 -1
  19. office365/directory/identities/container.py +3 -9
  20. office365/directory/identities/providers/base.py +7 -5
  21. office365/directory/identities/providers/builtin_identity.py +3 -2
  22. office365/directory/identities/providers/saml_or_wsfed.py +4 -5
  23. office365/directory/identities/providers/social_identity.py +5 -3
  24. office365/directory/identities/userflows/b2x/user_flow.py +6 -5
  25. office365/directory/identities/userflows/language_configuration.py +10 -7
  26. office365/directory/identitygovernance/governance.py +14 -3
  27. office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
  28. office365/directory/identitygovernance/privilegedaccess/root.py +5 -0
  29. office365/directory/key_credential.py +3 -0
  30. office365/directory/licenses/assignment_state.py +26 -2
  31. office365/directory/licenses/details.py +8 -6
  32. office365/directory/licenses/subscribed_sku.py +8 -10
  33. office365/directory/object_collection.py +40 -25
  34. office365/directory/password_credential.py +3 -0
  35. office365/directory/permissions/default_user_role.py +5 -0
  36. office365/directory/permissions/grants/condition_set.py +4 -2
  37. office365/directory/permissions/grants/oauth2.py +7 -10
  38. office365/directory/policies/authorization.py +50 -3
  39. office365/directory/policies/permission_grant.py +2 -0
  40. office365/directory/profile_photo.py +6 -6
  41. office365/directory/protection/riskyusers/risky_user.py +4 -4
  42. office365/directory/rolemanagement/resource_action.py +10 -0
  43. office365/directory/rolemanagement/role_permission.py +10 -0
  44. office365/directory/security/alerts/alert.py +5 -7
  45. office365/directory/security/attacksimulations/landing_page.py +5 -0
  46. office365/directory/security/attacksimulations/operation.py +5 -0
  47. office365/directory/security/attacksimulations/report.py +8 -1
  48. office365/directory/security/attacksimulations/root.py +33 -0
  49. office365/directory/security/attacksimulations/users/__init__.py +0 -0
  50. office365/directory/security/attacksimulations/users/details.py +5 -0
  51. office365/directory/security/hunting_query_results.py +5 -0
  52. office365/directory/security/incidents/incident.py +8 -13
  53. office365/directory/security/security.py +20 -3
  54. office365/directory/serviceprincipals/service_principal.py +3 -4
  55. office365/directory/synchronization/synchronization.py +2 -0
  56. office365/directory/users/activities/history_item.py +3 -2
  57. office365/directory/users/user.py +37 -10
  58. office365/entity_collection.py +3 -2
  59. office365/graph_client.py +58 -30
  60. office365/intune/audit/event.py +1 -3
  61. office365/intune/audit/event_collection.py +1 -1
  62. office365/intune/devices/alternative_security_id.py +4 -0
  63. office365/intune/devices/collection.py +57 -0
  64. office365/intune/devices/device.py +38 -10
  65. office365/intune/devices/management/management.py +12 -0
  66. office365/intune/organizations/organization.py +1 -0
  67. office365/onedrive/analytics/item_activity_stat.py +9 -0
  68. office365/onedrive/analytics/item_analytics.py +1 -0
  69. office365/onedrive/contenttypes/content_type.py +4 -12
  70. office365/onedrive/driveitems/driveItem.py +9 -10
  71. office365/onedrive/files/hashes.py +5 -0
  72. office365/onedrive/lists/collection.py +2 -2
  73. office365/onedrive/operations/long_running.py +6 -6
  74. office365/onedrive/operations/rich_long_running.py +4 -3
  75. office365/onedrive/permissions/collection.py +1 -14
  76. office365/onedrive/sharepoint_settings.py +6 -6
  77. office365/onedrive/sites/sites_with_root.py +1 -3
  78. office365/onedrive/termstore/store.py +2 -4
  79. office365/onedrive/termstore/terms/collection.py +1 -2
  80. office365/onedrive/workbooks/comments/comment.py +7 -6
  81. office365/onedrive/workbooks/filter.py +9 -0
  82. office365/onedrive/workbooks/filter_criteria.py +5 -0
  83. office365/onedrive/workbooks/functions/functions.py +6 -3
  84. office365/onedrive/workbooks/functions/result.py +2 -0
  85. office365/onedrive/workbooks/operations/workbook.py +7 -10
  86. office365/onedrive/workbooks/tables/pivot_table.py +9 -9
  87. office365/onedrive/workbooks/worksheets/collection.py +0 -6
  88. office365/onedrive/workbooks/worksheets/protection.py +2 -0
  89. office365/onedrive/workbooks/worksheets/worksheet.py +30 -2
  90. office365/onenote/notebooks/collection.py +0 -1
  91. office365/outlook/calendar/events/event.py +24 -46
  92. office365/outlook/calendar/permissions/permission.py +7 -7
  93. office365/outlook/calendar/place.py +5 -3
  94. office365/outlook/mail/attachments/collection.py +6 -1
  95. office365/outlook/mail/attachments/file.py +9 -16
  96. office365/outlook/mail/messages/message.py +1 -1
  97. office365/planner/user.py +3 -7
  98. office365/reports/root.py +50 -4
  99. office365/runtime/auth/providers/acs_token_provider.py +10 -7
  100. office365/runtime/auth/sts_profile.py +0 -1
  101. office365/runtime/client_object.py +21 -17
  102. office365/runtime/client_object_collection.py +9 -24
  103. office365/runtime/client_request_exception.py +1 -3
  104. office365/runtime/client_result.py +11 -14
  105. office365/runtime/client_runtime_context.py +20 -32
  106. office365/runtime/odata/json_format.py +4 -7
  107. office365/runtime/odata/request.py +3 -3
  108. office365/runtime/odata/v3/batch_request.py +17 -31
  109. office365/runtime/odata/v4/batch_request.py +13 -21
  110. office365/runtime/queries/batch.py +5 -11
  111. office365/runtime/queries/function.py +5 -6
  112. office365/runtime/types/event_handler.py +1 -1
  113. office365/search/entity.py +3 -2
  114. office365/sharepoint/activities/facets/delete.py +1 -1
  115. office365/sharepoint/activities/tracked_item_service.py +2 -3
  116. office365/sharepoint/administration/web_application.py +8 -7
  117. office365/sharepoint/alerts/alert.py +8 -12
  118. office365/sharepoint/audit/audit.py +3 -2
  119. office365/sharepoint/changes/alert.py +4 -3
  120. office365/sharepoint/changes/collection.py +7 -10
  121. office365/sharepoint/changes/content_type.py +4 -4
  122. office365/sharepoint/changes/field.py +4 -5
  123. office365/sharepoint/changes/item.py +34 -7
  124. office365/sharepoint/changes/list.py +4 -4
  125. office365/sharepoint/changes/user.py +5 -6
  126. office365/sharepoint/client_context.py +20 -20
  127. office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
  128. office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
  129. office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
  130. office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
  131. office365/sharepoint/contenttypes/fieldlinks/collection.py +4 -6
  132. office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
  133. office365/sharepoint/entity.py +12 -5
  134. office365/sharepoint/entity_collection.py +1 -3
  135. office365/sharepoint/eventreceivers/definition.py +8 -12
  136. office365/sharepoint/features/collection.py +3 -6
  137. office365/sharepoint/features/definitions/definition.py +6 -3
  138. office365/sharepoint/fields/calculated.py +8 -14
  139. office365/sharepoint/fields/collection.py +42 -10
  140. office365/sharepoint/fields/computed.py +4 -5
  141. office365/sharepoint/fields/currency.py +7 -11
  142. office365/sharepoint/fields/date_time.py +4 -8
  143. office365/sharepoint/fields/field.py +6 -16
  144. office365/sharepoint/fields/lookup.py +11 -9
  145. office365/sharepoint/fields/multi_choice.py +8 -12
  146. office365/sharepoint/fields/multi_line_text.py +10 -14
  147. office365/sharepoint/fields/number.py +13 -26
  148. office365/sharepoint/fields/rating_scale.py +6 -10
  149. office365/sharepoint/fields/related_field.py +10 -17
  150. office365/sharepoint/fields/url.py +4 -5
  151. office365/sharepoint/fields/user.py +10 -9
  152. office365/sharepoint/files/checked_out_file.py +4 -3
  153. office365/sharepoint/files/collection.py +17 -15
  154. office365/sharepoint/files/file.py +33 -27
  155. office365/sharepoint/folders/collection.py +22 -5
  156. office365/sharepoint/folders/coloring.py +11 -9
  157. office365/sharepoint/folders/coloring_information.py +38 -0
  158. office365/sharepoint/folders/folder.py +26 -30
  159. office365/sharepoint/likes/liked_by_information.py +7 -10
  160. office365/sharepoint/likes/user_entity.py +6 -8
  161. office365/sharepoint/listitems/form_update_value.py +17 -1
  162. office365/sharepoint/listitems/listitem.py +9 -11
  163. office365/sharepoint/lists/bloom_filter.py +5 -7
  164. office365/sharepoint/lists/creatables_info.py +5 -6
  165. office365/sharepoint/lists/list.py +25 -10
  166. office365/sharepoint/lists/template.py +7 -4
  167. office365/sharepoint/lists/template_collection.py +2 -4
  168. office365/sharepoint/marketplace/app_metadata.py +14 -23
  169. office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
  170. office365/sharepoint/navigation/node.py +5 -8
  171. office365/sharepoint/permissions/irm/effective_settings.py +6 -8
  172. office365/sharepoint/permissions/irm/file_settings.py +8 -6
  173. office365/sharepoint/permissions/irm/settings.py +25 -43
  174. office365/sharepoint/portal/groups/site_manager.py +6 -7
  175. office365/sharepoint/portal/sites/manager.py +4 -3
  176. office365/sharepoint/publishing/embed_data_v1.py +8 -15
  177. office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
  178. office365/sharepoint/publishing/primary_city_time.py +8 -9
  179. office365/sharepoint/publishing/video/service_discoverer.py +4 -3
  180. office365/sharepoint/pushnotifications/subscriber.py +11 -15
  181. office365/sharepoint/sharing/object_sharing_settings.py +24 -46
  182. office365/sharepoint/sharing/permission_information.py +5 -5
  183. office365/sharepoint/sharing/result.py +1 -0
  184. office365/sharepoint/sitedesigns/run.py +4 -3
  185. office365/sharepoint/sites/site.py +7 -16
  186. office365/sharepoint/taxonomy/field.py +32 -21
  187. office365/sharepoint/taxonomy/groups/group.py +12 -1
  188. office365/sharepoint/taxonomy/sets/set.py +6 -0
  189. office365/sharepoint/taxonomy/stores/store.py +4 -2
  190. office365/sharepoint/teams/channel.py +6 -6
  191. office365/sharepoint/tenant/administration/endpoints.py +4 -3
  192. office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
  193. office365/sharepoint/tenant/administration/sites/properties.py +0 -1
  194. office365/sharepoint/tenant/administration/spo_operation.py +4 -4
  195. office365/sharepoint/tenant/administration/tenant.py +1 -0
  196. office365/sharepoint/tenant/insights/report.py +11 -0
  197. office365/sharepoint/tenant/insights/report_manager.py +5 -0
  198. office365/sharepoint/tenant/insights/report_metadata.py +5 -0
  199. office365/sharepoint/tenant/settings.py +4 -3
  200. office365/sharepoint/translation/sync_translator.py +3 -2
  201. office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
  202. office365/sharepoint/usercustomactions/action.py +12 -20
  203. office365/sharepoint/userprofiles/followed_content.py +6 -10
  204. office365/sharepoint/userprofiles/people_manager.py +0 -1
  205. office365/sharepoint/userprofiles/person_properties.py +14 -30
  206. office365/sharepoint/userprofiles/personal_cache.py +4 -3
  207. office365/sharepoint/userprofiles/properties_for_user.py +4 -5
  208. office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
  209. office365/sharepoint/utilities/move_copy_util.py +19 -19
  210. office365/sharepoint/utilities/upload_status.py +7 -10
  211. office365/sharepoint/views/field_collection.py +9 -14
  212. office365/sharepoint/views/view.py +43 -64
  213. office365/sharepoint/webhooks/subscription.py +11 -19
  214. office365/sharepoint/webparts/webpart.py +3 -1
  215. office365/sharepoint/webs/modernize_homepage_result.py +4 -3
  216. office365/sharepoint/webs/regional_settings.py +9 -17
  217. office365/sharepoint/webs/template.py +18 -18
  218. office365/sharepoint/webs/theme_info.py +6 -6
  219. office365/sharepoint/webs/web.py +16 -23
  220. office365/teams/members/aad_user_conversation.py +4 -4
  221. office365/teams/operations/async_operation.py +5 -7
  222. office365/runtime/paths/item.py +0 -8
  223. {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/LICENSE +0 -0
  224. {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/WHEEL +0 -0
  225. {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,5 @@
1
1
  from datetime import datetime
2
+ from typing import Optional
2
3
 
3
4
  from office365.runtime.paths.service_operation import ServiceOperationPath
4
5
  from office365.sharepoint.entity import Entity
@@ -9,41 +10,32 @@ class Subscription(Entity):
9
10
 
10
11
  @property
11
12
  def application_id(self):
12
- """
13
- Identifier of the application used to create the subscription.
14
- :rtype: str
15
- """
13
+ # type: () -> Optional[str]
14
+ """Identifier of the application used to create the subscription."""
16
15
  return self.properties.get("applicationId", None)
17
16
 
18
17
  @property
19
18
  def notification_url(self):
20
- """
21
- Gets endpoint that will be called when an event occurs.
22
- :rtype: str
23
- """
19
+ # type: () -> Optional[str]
20
+ """Gets endpoint that will be called when an event occurs."""
24
21
  return self.properties.get("notificationUrl", None)
25
22
 
26
23
  @notification_url.setter
27
24
  def notification_url(self, value):
28
- """
29
- Sets endpoint that will be called when an event occurs.
30
- """
25
+ # type: (str) -> None
26
+ """Sets endpoint that will be called when an event occurs."""
31
27
  self.set_property("notificationUrl", value)
32
28
 
33
29
  @property
34
30
  def expiration_datetime(self):
35
- """
36
- Gets endpoint that will be called when an event occurs.
37
-
38
- :rtype: str
39
- """
31
+ # type: () -> Optional[datetime]
32
+ """Gets endpoint that will be called when an event occurs."""
40
33
  return self.properties.get("expirationDateTime", None)
41
34
 
42
35
  @expiration_datetime.setter
43
36
  def expiration_datetime(self, value):
44
- """
45
- Sets endpoint that will be called when an event occurs.
46
- """
37
+ # type: (datetime|str) -> None
38
+ """Sets endpoint that will be called when an event occurs."""
47
39
  if isinstance(value, datetime):
48
40
  self.set_property("expirationDateTime", value.isoformat())
49
41
  else:
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
@@ -9,11 +11,11 @@ class WebPart(Entity):
9
11
 
10
12
  @property
11
13
  def zone_index(self):
14
+ # type: () -> Optional[int]
12
15
  """
13
16
  An integer that specifies the relative position of a Web Part in a Web Part zone.
14
17
  Web Parts are positioned from the smallest to the largest zone index. If two or more Web Parts have the
15
18
  same zone index they are positioned adjacent to each other in an undefined order
16
- :rtype: int or None
17
19
  """
18
20
  return self.properties.get("ZoneIndex", None)
19
21
 
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
@@ -6,7 +8,6 @@ class ModernizeHomepageResult(Entity):
6
8
 
7
9
  @property
8
10
  def can_modernize_homepage(self):
9
- """
10
- :rtype: bool or None
11
- """
11
+ # type: () -> Optional[bool]
12
+ """"""
12
13
  return self.properties.get("CanModernizeHomepage", None)
@@ -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.sites.language_collection import LanguageCollection
@@ -9,40 +11,30 @@ class RegionalSettings(Entity):
9
11
 
10
12
  @property
11
13
  def collation(self):
14
+ # type: () -> Optional[int]
12
15
  """
13
16
  Specifies the collation order of the site (2), which indicates an additional sorting order that SHOULD
14
17
  be processed by any back-end database server associated with the site (2). The collation method is an
15
18
  implementation-specific capability of the front-end Web server and back-end database server.
16
-
17
- :rtype: int or None
18
19
  """
19
20
  return self.properties.get("Collation", None)
20
21
 
21
22
  @property
22
23
  def date_format(self):
23
- """
24
- Gets the date format that is used on the server.
25
-
26
- :rtype: int or None
27
- """
24
+ # type: () -> Optional[int]
25
+ """Gets the date format that is used on the server."""
28
26
  return self.properties.get("DateFormat", None)
29
27
 
30
28
  @property
31
29
  def locale_id(self):
32
- """
33
- Gets the locale identifier in use on the server.
34
-
35
- :rtype: int or None
36
- """
30
+ # type: () -> Optional[int]
31
+ """Gets the locale identifier in use on the server."""
37
32
  return self.properties.get("LocaleId", None)
38
33
 
39
34
  @property
40
35
  def work_days(self):
41
- """
42
- Gets a number that represents the work days of Web site calendars.
43
-
44
- :rtype: int or None
45
- """
36
+ # type: () -> Optional[int]
37
+ """Gets a number that represents the work days of Web site calendars."""
46
38
  return self.properties.get("WorkDays", None)
47
39
 
48
40
  @property
@@ -1,80 +1,80 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
4
6
  class WebTemplate(Entity):
5
7
  """Specifies a site definition or a site template that is used to instantiate a site."""
6
8
 
9
+ def __str__(self):
10
+ return self.title or self.entity_type_name
11
+
7
12
  def __repr__(self):
8
13
  return self.name
9
14
 
10
15
  @property
11
16
  def description(self):
12
- """Gets a value that specifies the description of the list template.
13
- :rtype: str or None
14
- """
17
+ # type: () -> Optional[str]
18
+ """Gets a value that specifies the description of the list template."""
15
19
  return self.properties.get("Description", None)
16
20
 
17
21
  @property
18
22
  def display_category(self):
23
+ # type: () -> Optional[str]
19
24
  """
20
25
  Specifies the display name for the category that this site definition configuration or site template is
21
26
  a part of.
22
- :rtype: str or None
23
27
  """
24
28
  return self.properties.get("DisplayCategory", None)
25
29
 
26
30
  @property
27
31
  def image_url(self):
32
+ # type: () -> Optional[str]
28
33
  """
29
34
  Specifies the URL for the image that is associated with the site definition configuration or site template.
30
- :rtype: str or None
31
35
  """
32
36
  return self.properties.get("ImageUrl", None)
33
37
 
34
38
  @property
35
39
  def is_hidden(self):
40
+ # type: () -> Optional[bool]
36
41
  """
37
42
  Specifies whether the site definition configuration is displayed in the user interface for creating new sites
38
- :rtype: bool or None
39
43
  """
40
44
  return self.properties.get("IsHidden", None)
41
45
 
42
46
  @property
43
47
  def is_root_web_only(self):
48
+ # type: () -> Optional[bool]
44
49
  """
45
50
  Specifies whether the site definition configuration or site template can only be applied to the top-level site
46
51
  in the site collection.
47
- :rtype: bool or None
48
52
  """
49
53
  return self.properties.get("IsRootWebOnly", None)
50
54
 
51
55
  @property
52
56
  def is_sub_web_only(self):
57
+ # type: () -> Optional[bool]
53
58
  """
54
59
  Specifies whether the site definition configuration or site template can only be applied to subsites
55
60
  created within the site collection.
56
- :rtype: bool or None
57
61
  """
58
62
  return self.properties.get("IsSubWebOnly", None)
59
63
 
60
64
  @property
61
65
  def lcid(self):
62
- """
63
- Specifies the LCID for the site definition configuration or site template.
64
- :rtype: int or None
65
- """
66
+ # type: () -> Optional[int]
67
+ """Specifies the LCID for the site definition configuration or site template."""
66
68
  return self.properties.get("Lcid", None)
67
69
 
68
70
  @property
69
71
  def name(self):
70
- """Gets a value that specifies the display name of the list template.
71
- :rtype: str or None
72
- """
72
+ # type: () -> Optional[str]
73
+ """Gets a value that specifies the display name of the list template."""
73
74
  return self.properties.get("Name", None)
74
75
 
75
76
  @property
76
77
  def title(self):
77
- """Specifies the display name for the site definition configuration or site template.
78
- :rtype: str or None
79
- """
78
+ # type: () -> Optional[str]
79
+ """Specifies the display name for the site definition configuration or site template."""
80
80
  return self.properties.get("Title", None)
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.client_result import ClientResult
2
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
3
5
  from office365.sharepoint.entity import Entity
@@ -23,14 +25,12 @@ class ThemeInfo(Entity):
23
25
 
24
26
  @property
25
27
  def accessible_description(self):
26
- """Specifies the accessible description for this theme.
27
- :rtype: str or None
28
- """
28
+ # type: () -> Optional[str]
29
+ """Specifies the accessible description for this theme."""
29
30
  return self.properties.get("AccessibleDescription", None)
30
31
 
31
32
  @property
32
33
  def theme_background_image_uri(self):
33
- """Specifies the URI of the background image for this theme.
34
- :rtype: str or None
35
- """
34
+ # type: () -> Optional[str]
35
+ """Specifies the URI of the background image for this theme."""
36
36
  return self.properties.get("ThemeBackgroundImageUri", None)
@@ -1068,9 +1068,7 @@ class Web(SecurableObject):
1068
1068
  return return_type
1069
1069
 
1070
1070
  def increment_site_client_tag(self):
1071
- """
1072
- Increments the client cache control number for this site collection.
1073
- """
1071
+ """Increments the client cache control number for this site collection."""
1074
1072
  qry = ServiceOperationQuery(self, "IncrementSiteClientTag")
1075
1073
  self.context.add_query(qry)
1076
1074
  return self
@@ -1080,7 +1078,6 @@ class Web(SecurableObject):
1080
1078
  Applies the specified site definition or site template to the website that has no template applied to it.
1081
1079
 
1082
1080
  :param str web_template: The name of the site definition or the file name of the site template to be applied.
1083
- :return:
1084
1081
  """
1085
1082
  qry = ServiceOperationQuery(
1086
1083
  self, "ApplyWebTemplate", {"webTemplate": web_template}
@@ -1089,9 +1086,7 @@ class Web(SecurableObject):
1089
1086
  return self
1090
1087
 
1091
1088
  def get_custom_list_templates(self):
1092
- """
1093
- Specifies the collection of custom list templates for a given site.
1094
- """
1089
+ """Specifies the collection of custom list templates for a given site."""
1095
1090
  return_type = ListTemplateCollection(self.context)
1096
1091
  qry = ServiceOperationQuery(
1097
1092
  self, "GetCustomListTemplates", None, None, None, return_type
@@ -1283,12 +1278,19 @@ class Web(SecurableObject):
1283
1278
  :param str email_subject: The email subject.
1284
1279
  :param str email_body: The email subject.
1285
1280
  """
1281
+
1286
1282
  return_type = SharingResult(self.context)
1287
1283
 
1288
- def _share(picker_result, group):
1289
- # type: (ClientResult[str], Group) -> None
1284
+ def _share(picker_result):
1285
+ # type: (ClientResult[str]) -> None
1286
+ groups = {
1287
+ ExternalSharingSiteOption.View: self.associated_visitor_group,
1288
+ ExternalSharingSiteOption.Edit: self.associated_member_group,
1289
+ ExternalSharingSiteOption.Owner: self.associated_owner_group,
1290
+ } # type: dict[ExternalSharingSiteOption, Group]
1291
+
1290
1292
  picker_input = "[{0}]".format(picker_result.value)
1291
- role_value = "group:{groupId}".format(groupId=group.id)
1293
+ role_value = "group:{groupId}".format(groupId=groups[share_option].id)
1292
1294
  Web.share_object(
1293
1295
  self.context,
1294
1296
  self.url,
@@ -1304,15 +1306,9 @@ class Web(SecurableObject):
1304
1306
  )
1305
1307
 
1306
1308
  def _web_resolved():
1307
- groups = {
1308
- ExternalSharingSiteOption.View: self.associated_visitor_group,
1309
- ExternalSharingSiteOption.Edit: self.associated_member_group,
1310
- ExternalSharingSiteOption.Owner: self.associated_owner_group,
1311
- } # type: dict[ExternalSharingSiteOption, Group]
1312
-
1313
1309
  ClientPeoplePickerWebServiceInterface.client_people_picker_resolve_user(
1314
1310
  self.context, user_principal_name
1315
- ).after_execute(_share, groups[share_option])
1311
+ ).after_execute(_share)
1316
1312
 
1317
1313
  self.ensure_properties(
1318
1314
  [
@@ -1974,9 +1970,7 @@ class Web(SecurableObject):
1974
1970
  @property
1975
1971
  def site_users(self):
1976
1972
  # type: () -> UserCollection
1977
- """
1978
- Specifies the collection of users in the site collection that contains the site
1979
- """
1973
+ """Specifies the collection of users in the site collection that contains the site"""
1980
1974
  return self.properties.get(
1981
1975
  "SiteUsers",
1982
1976
  UserCollection(self.context, ResourcePath("siteUsers", self.resource_path)),
@@ -2185,9 +2179,8 @@ class Web(SecurableObject):
2185
2179
 
2186
2180
  @property
2187
2181
  def quick_launch_enabled(self):
2188
- """Gets a value that specifies whether the Quick Launch area is enabled on the site.
2189
- :rtype: bool or None
2190
- """
2182
+ # type: () -> Optional[bool]
2183
+ """Gets a value that specifies whether the Quick Launch area is enabled on the site."""
2191
2184
  return self.properties.get("QuickLaunchEnabled", None)
2192
2185
 
2193
2186
  @property
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.paths.resource_path import ResourcePath
2
4
  from office365.teams.members.conversation import ConversationMember
3
5
 
@@ -7,10 +9,8 @@ class AadUserConversationMember(ConversationMember):
7
9
 
8
10
  @property
9
11
  def user_id(self):
10
- """
11
- The guid of the user.
12
- :rtype: str or None
13
- """
12
+ # type: () -> Optional[str]
13
+ """The guid of the user."""
14
14
  return self.properties.get("userId", None)
15
15
 
16
16
  @property
@@ -38,9 +38,7 @@ class TeamsAsyncOperation(Entity):
38
38
  """
39
39
 
40
40
  def _poll_for_status(polling_number):
41
- """
42
- :type polling_number: int
43
- """
41
+ # type: (int) -> None
44
42
  if polling_number > max_polling_count:
45
43
  if callable(failure_callback):
46
44
  failure_callback(self)
@@ -48,16 +46,16 @@ class TeamsAsyncOperation(Entity):
48
46
  raise TypeError("The maximum polling count has been reached")
49
47
 
50
48
  def _verify_status(return_type):
51
- if self.status != status_type:
49
+ if return_type.status != status_type:
52
50
  time.sleep(polling_interval_secs)
53
51
  _poll_for_status(polling_number + 1)
54
52
  else:
55
53
  if callable(success_callback):
56
- success_callback(self)
54
+ success_callback(return_type)
57
55
 
58
- self.context.load(self, after_loaded=_verify_status)
56
+ self.get().after_execute(_verify_status, execute_first=True)
59
57
 
60
- self.ensure_property("id", _poll_for_status, 1)
58
+ _poll_for_status(1)
61
59
  return self
62
60
 
63
61
  @property
@@ -1,8 +0,0 @@
1
- from office365.runtime.paths.v4.entity import EntityPath
2
-
3
-
4
- class ItemPath(EntityPath):
5
- """ """
6
-
7
- def __init__(self, parent=None):
8
- super(ItemPath, self).__init__(None, parent, parent)