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 TYPE_CHECKING, Optional
2
+
1
3
  from office365.runtime.client_result import ClientResult
2
4
  from office365.runtime.paths.resource_path import ResourcePath
3
5
  from office365.runtime.queries.service_operation import ServiceOperationQuery
@@ -9,6 +11,9 @@ from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
9
11
  from office365.sharepoint.views.field_collection import ViewFieldCollection
10
12
  from office365.sharepoint.views.visualization import Visualization
11
13
 
14
+ if TYPE_CHECKING:
15
+ from office365.sharepoint.views.collection import ViewCollection
16
+
12
17
 
13
18
  class View(Entity):
14
19
  """Specifies a List View."""
@@ -37,9 +42,7 @@ class View(Entity):
37
42
  return return_type
38
43
 
39
44
  def render_as_html(self):
40
- """
41
- Returns the list view as HTML.
42
- """
45
+ """Returns the list view as HTML."""
43
46
  return_type = ClientResult(self.context)
44
47
  qry = ServiceOperationQuery(self, "RenderAsHtml", None, None, None, return_type)
45
48
  self.context.add_query(qry)
@@ -56,43 +59,35 @@ class View(Entity):
56
59
 
57
60
  @property
58
61
  def aggregations(self):
59
- """
60
- Specifies fields (2) and functions that define totals shown in a list view.
61
- :rtype: str or None
62
- """
62
+ # type: () -> Optional[str]
63
+ """Specifies fields and functions that define totals shown in a list view."""
63
64
  return self.properties.get("Aggregations", None)
64
65
 
65
66
  @property
66
67
  def aggregations_status(self):
68
+ # type: () -> Optional[str]
67
69
  """
68
70
  Specifies whether totals are shown in the list view.
69
71
  It MUST be NULL If Aggregations is NULL; otherwise it MUST be "On" or "Off".
70
- :rtype: str or None
71
72
  """
72
73
  return self.properties.get("AggregationsStatus", None)
73
74
 
74
75
  @property
75
76
  def associated_content_type_id(self):
76
- """
77
- Represents the content type identifier associated with the view.
78
- :rtype: str or None
79
- """
77
+ # type: () -> Optional[str]
78
+ """Represents the content type identifier associated with the view."""
80
79
  return self.properties.get("AssociatedContentTypeId", None)
81
80
 
82
81
  @property
83
82
  def calendar_view_styles(self):
84
- """
85
- Represents an object specifying the style of a SharePoint calendar view.
86
- :rtype: str or None
87
- """
83
+ # type: () -> Optional[str]
84
+ """Represents an object specifying the style of a SharePoint calendar view."""
88
85
  return self.properties.get("CalendarViewStyles", None)
89
86
 
90
87
  @property
91
88
  def column_width(self):
92
- """
93
- Specifies the width of columns.
94
- :rtype: str or None
95
- """
89
+ # type: () -> Optional[int]
90
+ """Specifies the width of columns."""
96
91
  return self.properties.get("ColumnWidth", None)
97
92
 
98
93
  @property
@@ -102,24 +97,19 @@ class View(Entity):
102
97
 
103
98
  @property
104
99
  def parent_collection(self):
105
- """
106
- :rtype: office365.sharepoint.views.collection.ViewCollection
107
- """
100
+ # type: () -> ViewCollection
108
101
  return self._parent_collection
109
102
 
110
103
  @property
111
104
  def js_link(self):
112
- """
113
- Specifies the JavaScript files used for the view.
114
- :rtype: str or None
115
- """
105
+ # type: () -> Optional[str]
106
+ """Specifies the JavaScript files used for the view."""
116
107
  return self.properties.get("JSLink", None)
117
108
 
118
109
  @property
119
110
  def content_type_id(self):
120
- """Gets the identifier of the content type with which the view is associated.
121
- :rtype: ContentTypeId
122
- """
111
+ # type: () -> Optional[ContentTypeId]
112
+ """Gets the identifier of the content type with which the view is associated."""
123
113
  return self.properties.get("ContentTypeId", ContentTypeId())
124
114
 
125
115
  @content_type_id.setter
@@ -129,64 +119,55 @@ class View(Entity):
129
119
 
130
120
  @property
131
121
  def custom_formatter(self):
132
- """
133
- Specifies the Custom Formatter used for the view.
134
- :rtype: str or None
135
- """
122
+ # type: () -> Optional[str]
123
+ """Specifies the Custom Formatter used for the view."""
136
124
  return self.properties.get("CustomFormatter", None)
137
125
 
138
126
  @property
139
127
  def custom_order(self):
140
- """
141
- :rtype: str or None
142
- """
128
+ # type: () -> Optional[str]
129
+ """"""
143
130
  return self.properties.get("CustomOrder", None)
144
131
 
145
132
  @property
146
133
  def editor_modified(self):
147
- """Specifies whether the list view was modified in an editor.
148
- :rtype: bool or None
149
- """
134
+ # type: () -> Optional[bool]
135
+ """Specifies whether the list view was modified in an editor."""
150
136
  return self.properties.get("EditorModified", None)
151
137
 
152
138
  def formats(self):
153
- """Specifies the column and row formatting for the list view.
154
- :stype: str or None
155
- """
139
+ # type: () -> Optional[str]
140
+ """Specifies the column and row formatting for the list view."""
156
141
  return self.properties.get("Formats", None)
157
142
 
158
143
  @property
159
144
  def hidden(self):
160
- """Gets whether the list view is hidden.
161
- :rtype: bool or None
162
- """
145
+ # type: () -> Optional[bool]
146
+ """Gets whether the list view is hidden."""
163
147
  return self.properties.get("Hidden", None)
164
148
 
165
149
  @hidden.setter
166
150
  def hidden(self, value):
151
+ # type: (bool) -> None
167
152
  """Sets whether the list view is hidden."""
168
153
  self.set_property("Hidden", value)
169
154
 
170
155
  @property
171
156
  def default_view(self):
172
- """Gets whether the list view is the default list view.
173
- :rtype: bool or None
174
- """
157
+ # type: () -> Optional[bool]
158
+ """Gets whether the list view is the default list view."""
175
159
  return self.properties.get("DefaultView", None)
176
160
 
177
161
  @default_view.setter
178
162
  def default_view(self, value):
179
- """
180
- Sets whether the list view is the default list view.
181
- """
163
+ # type: (bool) -> None
164
+ """Sets whether the list view is the default list view."""
182
165
  self.set_property("DefaultView", value)
183
166
 
184
167
  @property
185
168
  def default_view_for_content_type(self):
186
- """
187
- Specifies whether the list view is the default list view for the content type specified by ContentTypeId.
188
- :rtype: bool or None
189
- """
169
+ # type: () -> Optional[bool]
170
+ """Specifies whether the list view is the default list view for the content type specified by ContentTypeId."""
190
171
  return self.properties.get("DefaultViewForContentType", None)
191
172
 
192
173
  @property
@@ -201,18 +182,18 @@ class View(Entity):
201
182
 
202
183
  @property
203
184
  def view_query(self):
204
- """
205
- Gets or sets a value that specifies the query that is used by the list view.
206
- :rtype: str or None
207
- """
185
+ # type: () -> Optional[str]
186
+ """Gets or sets a value that specifies the query that is used by the list view."""
208
187
  return self.properties.get("ViewQuery", None)
209
188
 
210
189
  @property
211
190
  def base_view_id(self):
191
+ # type: () -> Optional[str]
212
192
  """Gets a value that specifies the base view identifier of the list view."""
213
193
  return self.properties.get("BaseViewId", None)
214
194
 
215
195
  def read_only_view(self):
196
+ # type: () -> Optional[bool]
216
197
  """Specifies whether the list view is read-only."""
217
198
  return self.properties.get("ReadOnlyView", None)
218
199
 
@@ -223,10 +204,8 @@ class View(Entity):
223
204
 
224
205
  @property
225
206
  def view_joins(self):
226
- """
227
- Specifies the joins that are used in the list view
228
- :rtype: str or None
229
- """
207
+ # type: () -> Optional[str]
208
+ """Specifies the joins that are used in the list view"""
230
209
  return self.properties.get("ViewJoins", None)
231
210
 
232
211
  @property
@@ -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
 
@@ -3,7 +3,7 @@ from office365.sharepoint.entity_collection import EntityCollection
3
3
  from office365.sharepoint.webs.information import WebInformation
4
4
 
5
5
 
6
- class WebInformationCollection(EntityCollection):
6
+ class WebInformationCollection(EntityCollection[WebInformation]):
7
7
  """Specifies a collection of objects containing metadata about a site"""
8
8
 
9
9
  def __init__(self, context, resource_path=None):
@@ -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
@@ -7,42 +9,103 @@ from office365.sharepoint.webs.time_zone import TimeZone, TimeZoneCollection
7
9
  class RegionalSettings(Entity):
8
10
  """Represents regional settings that are used on the server that is running SharePoint Server."""
9
11
 
12
+ @property
13
+ def adjust_hijri_days(self):
14
+ # type: () -> Optional[int]
15
+ """Specifies the number of days to extend or reduce the current month in Hijri calendars on the site"""
16
+ return self.properties.get("AdjustHijriDays", None)
17
+
18
+ @property
19
+ def alternate_calendar_type(self):
20
+ # type: () -> Optional[int]
21
+ """Gets an alternate calendar type that is used on the site"""
22
+ return self.properties.get("AlternateCalendarType", None)
23
+
24
+ @property
25
+ def am(self):
26
+ # type: () -> Optional[str]
27
+ """Specifies the string that is used to represent time before midday on the site"""
28
+ return self.properties.get("AM", None)
29
+
30
+ @property
31
+ def calendar_type(self):
32
+ # type: () -> Optional[int]
33
+ """Specifies the calendar type that SHOULD be used when processing date values on the site"""
34
+ return self.properties.get("CalendarType", None)
35
+
10
36
  @property
11
37
  def collation(self):
38
+ # type: () -> Optional[int]
12
39
  """
13
40
  Specifies the collation order of the site (2), which indicates an additional sorting order that SHOULD
14
41
  be processed by any back-end database server associated with the site (2). The collation method is an
15
42
  implementation-specific capability of the front-end Web server and back-end database server.
16
-
17
- :rtype: int or None
18
43
  """
19
44
  return self.properties.get("Collation", None)
20
45
 
21
46
  @property
22
- def date_format(self):
23
- """
24
- Gets the date format that is used on the server.
47
+ def collation_lcid(self):
48
+ # type: () -> Optional[int]
49
+ """Gets the language code identifier (LCID) for the collation rules that are used on the site"""
50
+ return self.properties.get("CollationLCID", None)
25
51
 
26
- :rtype: int or None
27
- """
52
+ @property
53
+ def date_format(self):
54
+ # type: () -> Optional[int]
55
+ """Gets the date format that is used on the server."""
28
56
  return self.properties.get("DateFormat", None)
29
57
 
30
58
  @property
31
- def locale_id(self):
32
- """
33
- Gets the locale identifier in use on the server.
59
+ def date_separator(self):
60
+ # type: () -> Optional[str]
61
+ """Gets the separator that is used for dates on the server."""
62
+ return self.properties.get("DateSeparator", None)
63
+
64
+ @property
65
+ def decimal_separator(self):
66
+ # type: () -> Optional[str]
67
+ """Gets the separator that is used for decimals on the server."""
68
+ return self.properties.get("DecimalSeparator", None)
69
+
70
+ @property
71
+ def digit_grouping(self):
72
+ # type: () -> Optional[str]
73
+ """Gets the separator that is used in grouping digits."""
74
+ return self.properties.get("DigitGrouping", None)
75
+
76
+ @property
77
+ def first_day_of_week(self):
78
+ # type: () -> Optional[int]
79
+ """Specifies the first day of the week used in calendars on the server.
80
+ The possible values are specified in the following table:
34
81
 
35
- :rtype: int or None
82
+ - 0 Sunday
83
+ - 1 Monday
84
+ - 2 Tuesday
85
+ - 3 Wednesday
86
+ - 4 Thursday
87
+ - 5 Friday
88
+ - 6 Saturday
36
89
  """
90
+ return self.properties.get("FirstDayOfWeek", None)
91
+
92
+ @property
93
+ def first_week_of_year(self):
94
+ # type: () -> Optional[int]
95
+ """Specifies the first week of the year used in calendars on the server.
96
+ Specifies which week of a year is considered the first week."""
97
+ return self.properties.get("FirstWeekOfYear", None)
98
+
99
+ @property
100
+ def locale_id(self):
101
+ # type: () -> Optional[int]
102
+ """Gets the locale identifier in use on the server."""
37
103
  return self.properties.get("LocaleId", None)
38
104
 
39
105
  @property
40
106
  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
- """
107
+ # type: () -> Optional[int]
108
+ """Gets a number that represents the work days of Web site calendars."""
46
109
  return self.properties.get("WorkDays", None)
47
110
 
48
111
  @property
@@ -54,19 +54,17 @@ class WebTemplate(Entity):
54
54
 
55
55
  @property
56
56
  def is_sub_web_only(self):
57
+ # type: () -> Optional[bool]
57
58
  """
58
59
  Specifies whether the site definition configuration or site template can only be applied to subsites
59
60
  created within the site collection.
60
- :rtype: bool or None
61
61
  """
62
62
  return self.properties.get("IsSubWebOnly", None)
63
63
 
64
64
  @property
65
65
  def lcid(self):
66
- """
67
- Specifies the LCID for the site definition configuration or site template.
68
- :rtype: int or None
69
- """
66
+ # type: () -> Optional[int]
67
+ """Specifies the LCID for the site definition configuration or site template."""
70
68
  return self.properties.get("Lcid", None)
71
69
 
72
70
  @property
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  import datetime
3
- from typing import AnyStr, Optional
3
+ from typing import TYPE_CHECKING, AnyStr, Optional
4
4
 
5
5
  from office365.runtime.client_result import ClientResult
6
6
  from office365.runtime.client_value_collection import ClientValueCollection
@@ -106,6 +106,9 @@ from office365.sharepoint.webs.regional_settings import RegionalSettings
106
106
  from office365.sharepoint.webs.template_collection import WebTemplateCollection
107
107
  from office365.sharepoint.webs.theme_info import ThemeInfo
108
108
 
109
+ if TYPE_CHECKING:
110
+ from office365.sharepoint.client_context import ClientContext
111
+
109
112
 
110
113
  class Web(SecurableObject):
111
114
  """
@@ -549,7 +552,9 @@ class Web(SecurableObject):
549
552
  :param int order_by: the column by which to order the Recycle Bin query.
550
553
  :param int item_state: Recycle Bin stage of items to return in the query.
551
554
  """
552
- return_type = RecycleBinItemCollection(self.context)
555
+ return_type = RecycleBinItemCollection(
556
+ self.context, self.recycle_bin.resource_path
557
+ )
553
558
  payload = {
554
559
  "rowLimit": row_limit,
555
560
  "isAscending": is_ascending,
@@ -651,15 +656,14 @@ class Web(SecurableObject):
651
656
  return return_type
652
657
 
653
658
  def get_sharing_link_data(self, link_url):
659
+ # type: (str) -> ClientResult[SharingLinkData]
654
660
  """
655
661
  This method determines basic information about the supplied link URL, including limited data about the object
656
662
  the link URL refers to and any additional sharing link data if the link URL is a tokenized sharing link
657
663
 
658
664
  :param str link_url: A URL that is either a tokenized sharing link or a canonical URL for a document
659
665
  """
660
- return_type = ClientResult(
661
- self.context, SharingLinkData()
662
- ) # type: ClientResult[SharingLinkData]
666
+ return_type = ClientResult(self.context, SharingLinkData())
663
667
  payload = {"linkUrl": link_url}
664
668
  qry = ServiceOperationQuery(
665
669
  self, "GetSharingLinkData", None, payload, None, return_type
@@ -669,6 +673,7 @@ class Web(SecurableObject):
669
673
 
670
674
  @staticmethod
671
675
  def get_context_web_theme_data(context):
676
+ # type: (ClientContext) -> ClientResult[str]
672
677
  """
673
678
  Get ThemeData for the context web.
674
679
 
@@ -1068,9 +1073,7 @@ class Web(SecurableObject):
1068
1073
  return return_type
1069
1074
 
1070
1075
  def increment_site_client_tag(self):
1071
- """
1072
- Increments the client cache control number for this site collection.
1073
- """
1076
+ """Increments the client cache control number for this site collection."""
1074
1077
  qry = ServiceOperationQuery(self, "IncrementSiteClientTag")
1075
1078
  self.context.add_query(qry)
1076
1079
  return self
@@ -1080,7 +1083,6 @@ class Web(SecurableObject):
1080
1083
  Applies the specified site definition or site template to the website that has no template applied to it.
1081
1084
 
1082
1085
  :param str web_template: The name of the site definition or the file name of the site template to be applied.
1083
- :return:
1084
1086
  """
1085
1087
  qry = ServiceOperationQuery(
1086
1088
  self, "ApplyWebTemplate", {"webTemplate": web_template}
@@ -1089,9 +1091,7 @@ class Web(SecurableObject):
1089
1091
  return self
1090
1092
 
1091
1093
  def get_custom_list_templates(self):
1092
- """
1093
- Specifies the collection of custom list templates for a given site.
1094
- """
1094
+ """Specifies the collection of custom list templates for a given site."""
1095
1095
  return_type = ListTemplateCollection(self.context)
1096
1096
  qry = ServiceOperationQuery(
1097
1097
  self, "GetCustomListTemplates", None, None, None, return_type
@@ -1283,12 +1283,19 @@ class Web(SecurableObject):
1283
1283
  :param str email_subject: The email subject.
1284
1284
  :param str email_body: The email subject.
1285
1285
  """
1286
+
1286
1287
  return_type = SharingResult(self.context)
1287
1288
 
1288
- def _share(picker_result, group):
1289
- # type: (ClientResult[str], Group) -> None
1289
+ def _share(picker_result):
1290
+ # type: (ClientResult[str]) -> None
1291
+ groups = {
1292
+ ExternalSharingSiteOption.View: self.associated_visitor_group,
1293
+ ExternalSharingSiteOption.Edit: self.associated_member_group,
1294
+ ExternalSharingSiteOption.Owner: self.associated_owner_group,
1295
+ } # type: dict[ExternalSharingSiteOption, Group]
1296
+
1290
1297
  picker_input = "[{0}]".format(picker_result.value)
1291
- role_value = "group:{groupId}".format(groupId=group.id)
1298
+ role_value = "group:{groupId}".format(groupId=groups[share_option].id)
1292
1299
  Web.share_object(
1293
1300
  self.context,
1294
1301
  self.url,
@@ -1304,15 +1311,9 @@ class Web(SecurableObject):
1304
1311
  )
1305
1312
 
1306
1313
  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
1314
  ClientPeoplePickerWebServiceInterface.client_people_picker_resolve_user(
1314
1315
  self.context, user_principal_name
1315
- ).after_execute(_share, groups[share_option])
1316
+ ).after_execute(_share)
1316
1317
 
1317
1318
  self.ensure_properties(
1318
1319
  [
@@ -1974,9 +1975,7 @@ class Web(SecurableObject):
1974
1975
  @property
1975
1976
  def site_users(self):
1976
1977
  # type: () -> UserCollection
1977
- """
1978
- Specifies the collection of users in the site collection that contains the site
1979
- """
1978
+ """Specifies the collection of users in the site collection that contains the site"""
1980
1979
  return self.properties.get(
1981
1980
  "SiteUsers",
1982
1981
  UserCollection(self.context, ResourcePath("siteUsers", self.resource_path)),
@@ -9,6 +9,7 @@ class AppCatalogs(Entity):
9
9
 
10
10
  @property
11
11
  def teams_apps(self):
12
+ # type: () -> EntityCollection[TeamsApp]
12
13
  """List apps from the Microsoft Teams app catalog."""
13
14
  return self.properties.get(
14
15
  "teamsApps",
@@ -41,6 +41,7 @@ class Chat(Entity):
41
41
 
42
42
  @property
43
43
  def members(self):
44
+ # type: () -> ConversationMemberCollection
44
45
  """A collection of membership records associated with the chat."""
45
46
  return self.properties.setdefault(
46
47
  "members",
@@ -51,6 +52,7 @@ class Chat(Entity):
51
52
 
52
53
  @property
53
54
  def messages(self):
55
+ # type: () -> EntityCollection[ChatMessage]
54
56
  """A collection of all the messages in the chat. Nullable."""
55
57
  return self.properties.get(
56
58
  "messages",
@@ -61,6 +63,7 @@ class Chat(Entity):
61
63
 
62
64
  @property
63
65
  def operations(self):
66
+ # type: () -> EntityCollection[TeamsAsyncOperation]
64
67
  """
65
68
  A collection of all the Teams async operations that ran or are running on the chat. Nullable.
66
69
  """
@@ -75,6 +78,7 @@ class Chat(Entity):
75
78
 
76
79
  @property
77
80
  def tabs(self):
81
+ # type: () -> EntityCollection[TeamsTab]
78
82
  """A collection of all the tabs in the chat."""
79
83
  return self.properties.get(
80
84
  "tabs",