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,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
@@ -6,50 +8,40 @@ class UserCustomAction(Entity):
6
8
 
7
9
  @property
8
10
  def client_side_component_id(self):
9
- """
10
- :rtype: str or None
11
- """
11
+ # type: () -> Optional[str]
12
+ """"""
12
13
  return self.properties.get("ClientSideComponentId", None)
13
14
 
14
15
  @property
15
16
  def script_block(self):
16
- """
17
- Gets the value that specifies the ECMAScript to be executed when the custom action is performed.
18
- :rtype: str or None
19
- """
17
+ # type: () -> Optional[str]
18
+ """Gets the value that specifies the ECMAScript to be executed when the custom action is performed."""
20
19
  return self.properties.get("ScriptBlock", None)
21
20
 
22
21
  @script_block.setter
23
22
  def script_block(self, value):
23
+ # type: (str) -> None
24
24
  """
25
25
  Sets the value that specifies the ECMAScript to be executed when the custom action is performed.
26
-
27
- :type value: str
28
26
  """
29
27
  self.set_property("ScriptBlock", value)
30
28
 
31
29
  @property
32
30
  def script_src(self):
33
- """
34
- Gets a value that specifies the URI of a file which contains the ECMAScript to execute on the page
35
- :rtype: str or None
36
- """
31
+ # type: () -> Optional[str]
32
+ """Gets a value that specifies the URI of a file which contains the ECMAScript to execute on the page"""
37
33
  return self.properties.get("ScriptSrc", None)
38
34
 
39
35
  @script_src.setter
40
36
  def script_src(self, value):
37
+ # type: (str) -> None
41
38
  """
42
39
  Sets a value that specifies the URI of a file which contains the ECMAScript to execute on the page
43
-
44
- :type value: str
45
40
  """
46
41
  self.set_property("ScriptSrc", value)
47
42
 
48
43
  @property
49
44
  def url(self):
50
- """
51
- Gets or sets the URL, URI, or ECMAScript (JScript, JavaScript) function associated with the action.
52
-
53
- :rtype: str or None
54
- """
45
+ # type: () -> Optional[str]
46
+ """Gets or sets the URL, URI, or ECMAScript (JScript, JavaScript) function associated with the action."""
55
47
  return self.properties.get("Url", 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
@@ -25,20 +27,14 @@ class FollowedContent(Entity):
25
27
 
26
28
  @property
27
29
  def followed_documents_url(self):
28
- """
29
- The FollowedDocumentsUrl property gets the location of the followed documents view.
30
-
31
- :rtype: str or None
32
- """
30
+ # type: () -> Optional[str]
31
+ """The FollowedDocumentsUrl property gets the location of the followed documents view."""
33
32
  return self.properties.get("FollowedDocumentsUrl", None)
34
33
 
35
34
  @property
36
35
  def followed_sites_url(self):
37
- """
38
- The FollowedSitesUrl property gets the location of the followed sites view.
39
-
40
- :rtype: str or None
41
- """
36
+ # type: () -> Optional[str]
37
+ """The FollowedSitesUrl property gets the location of the followed sites view."""
42
38
  return self.properties.get("FollowedSitesUrl", None)
43
39
 
44
40
  @property
@@ -80,7 +80,6 @@ class PeopleManager(Entity):
80
80
  Gets the people who are following the specified user.
81
81
 
82
82
  :param str account_name: Account name of the specified user.
83
- :return:
84
83
  """
85
84
  return_type = EntityCollection(self.context, PersonProperties)
86
85
  params = {"accountName": account_name}
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.types.collections import StringCollection
2
4
  from office365.sharepoint.entity import Entity
3
5
 
@@ -10,29 +12,20 @@ class PersonProperties(Entity):
10
12
 
11
13
  @property
12
14
  def account_name(self):
13
- """
14
- The AccountName property specifies the person's account name.
15
-
16
- :rtype: str or None
17
- """
15
+ # type: () -> Optional[str]
16
+ """The AccountName property specifies the person's account name."""
18
17
  return self.properties.get("AccountName", None)
19
18
 
20
19
  @property
21
20
  def email(self):
22
- """
23
- The Email property specifies the person's email address.
24
-
25
- :rtype: str or None
26
- """
21
+ # type: () -> Optional[str]
22
+ """The Email property specifies the person's email address."""
27
23
  return self.properties.get("Email", None)
28
24
 
29
25
  @property
30
26
  def latest_post(self):
31
- """
32
- The LatestPost property specifies the person's latest microblog post.
33
-
34
- :rtype: str or None
35
- """
27
+ # type: () -> Optional[str]
28
+ """The LatestPost property specifies the person's latest microblog post."""
36
29
  return self.properties.get("LatestPost", None)
37
30
 
38
31
  @property
@@ -45,11 +38,8 @@ class PersonProperties(Entity):
45
38
 
46
39
  @property
47
40
  def personal_url(self):
48
- """
49
- The PersonalUrl property specifies the absolute URL of the person's personal page.
50
-
51
- :rtype: str or None
52
- """
41
+ # type: () -> Optional[str]
42
+ """The PersonalUrl property specifies the absolute URL of the person's personal page."""
53
43
  return self.properties.get("PersonalUrl", None)
54
44
 
55
45
  @property
@@ -70,20 +60,14 @@ class PersonProperties(Entity):
70
60
 
71
61
  @property
72
62
  def picture_url(self):
73
- """
74
- The PictureUrl property specifies the URL for the person's profile picture.
75
-
76
- :rtype: str or None
77
- """
63
+ # type: () -> Optional[str]
64
+ """The PictureUrl property specifies the URL for the person's profile picture."""
78
65
  return self.properties.get("PictureUrl", None)
79
66
 
80
67
  @property
81
68
  def user_url(self):
82
- """
83
- The UserUrl property specifies the URL for the person's profile.
84
-
85
- :rtype: str or None
86
- """
69
+ # type: () -> Optional[str]
70
+ """The UserUrl property specifies the URL for the person's profile."""
87
71
  return self.properties.get("UserUrl", None)
88
72
 
89
73
  @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.runtime.queries.service_operation import ServiceOperationQuery
3
5
  from office365.sharepoint.entity import Entity
@@ -21,9 +23,8 @@ class PersonalCache(Entity):
21
23
 
22
24
  @property
23
25
  def cache_name(self):
24
- """
25
- :rtype: str or None
26
- """
26
+ # type: () -> Optional[str]
27
+ """"""
27
28
  return self.properties.get("CacheName", None)
28
29
 
29
30
  @property
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.client_result import ClientResult
2
4
  from office365.runtime.paths.service_operation import ServiceOperationPath
3
5
  from office365.runtime.queries.service_operation import ServiceOperationQuery
@@ -21,11 +23,8 @@ class UserProfilePropertiesForUser(Entity):
21
23
 
22
24
  @property
23
25
  def account_name(self):
24
- """
25
- The AccountName property specifies the account name of the user.
26
-
27
- :rtype: str or None
28
- """
26
+ # type: () -> Optional[str]
27
+ """The AccountName property specifies the account name of the user."""
29
28
  return self.properties.get("AccountName", None)
30
29
 
31
30
  @property
@@ -1,4 +1,5 @@
1
1
  from datetime import datetime
2
+ from typing import Optional
2
3
 
3
4
  from office365.runtime.client_value_collection import ClientValueCollection
4
5
  from office365.sharepoint.entity import Entity
@@ -12,41 +13,33 @@ class SharedWithMeDocument(Entity):
12
13
 
13
14
  @property
14
15
  def authors(self):
15
- """
16
- Specifies a list of users that authored the document.
17
- """
16
+ # type: () -> ClientValueCollection[SharedWithMeDocumentUser]
17
+ """Specifies a list of users that authored the document."""
18
18
  return self.properties.get(
19
19
  "Authors", ClientValueCollection(SharedWithMeDocumentUser)
20
20
  )
21
21
 
22
22
  @property
23
23
  def caller_stack(self):
24
- """
25
- :rtype: str
26
- """
24
+ # type: () -> Optional[str]
25
+ """ """
27
26
  return self.properties.get("CallerStack", None)
28
27
 
29
28
  @property
30
29
  def content_type_id(self):
31
- """
32
- Specifies the identifier of the content type of the document.
33
- :rtype: str
34
- """
30
+ # type: () -> Optional[str]
31
+ """Specifies the identifier of the content type of the document."""
35
32
  return self.properties.get("ContentTypeId", None)
36
33
 
37
34
  @property
38
35
  def doc_id(self):
39
- """
40
- Specifies the document identifier.
41
- :rtype: str
42
- """
36
+ # type: () -> Optional[str]
37
+ """Specifies the document identifier."""
43
38
  return self.properties.get("DocId", None)
44
39
 
45
40
  @property
46
41
  def editors(self):
47
- """
48
- Specifies a list of users that can edit the document.
49
- """
42
+ """Specifies a list of users that can edit the document."""
50
43
  return self.properties.get(
51
44
  "Editors", ClientValueCollection(SharedWithMeDocumentUser)
52
45
  )
@@ -58,10 +51,8 @@ class SharedWithMeDocument(Entity):
58
51
 
59
52
  @property
60
53
  def file_leaf_ref(self):
61
- """
62
- Specifies the name of the document.
63
- :rtype: str
64
- """
54
+ # type: () -> Optional[str]
55
+ """Specifies the name of the document."""
65
56
  return self.properties.get("FileLeafRef", None)
66
57
 
67
58
  @property
@@ -1,5 +1,5 @@
1
1
  import os
2
- from typing import IO, TYPE_CHECKING, Callable
2
+ from typing import IO, TYPE_CHECKING, AnyStr, Callable
3
3
 
4
4
  from office365.runtime.client_result import ClientResult
5
5
  from office365.runtime.queries.service_operation import ServiceOperationQuery
@@ -156,7 +156,8 @@ class MoveCopyUtil(Entity):
156
156
  """
157
157
  import zipfile
158
158
 
159
- def _get_file_name(file):
159
+ def _get_relative_file_path(file):
160
+ # type: (File) -> str
160
161
  return os.path.join(
161
162
  file.parent_folder.serverRelativeUrl.replace(
162
163
  remove_folder.serverRelativeUrl, ""
@@ -164,27 +165,26 @@ class MoveCopyUtil(Entity):
164
165
  file.name,
165
166
  )
166
167
 
167
- def _after_downloaded(result, file):
168
- """
169
- :type result: ClientResult
170
- :type file: office365.sharepoint.files.file.File
171
- """
172
- filename = _get_file_name(file)
173
- if callable(after_file_downloaded):
174
- after_file_downloaded(file)
175
- with zipfile.ZipFile(download_file.name, "a", zipfile.ZIP_DEFLATED) as zf:
176
- zf.writestr(filename, result.value)
168
+ def _download_file(file):
169
+ # type: (File) -> None
170
+
171
+ def _after_downloaded(result):
172
+ # type: (ClientResult[AnyStr]) -> None
173
+ filename = _get_relative_file_path(file)
174
+ if callable(after_file_downloaded):
175
+ after_file_downloaded(file)
176
+ with zipfile.ZipFile(
177
+ download_file.name, "a", zipfile.ZIP_DEFLATED
178
+ ) as zf:
179
+ zf.writestr(filename, result.value)
180
+
181
+ file.get_content().after_execute(_after_downloaded)
177
182
 
178
183
  def _download_folder(folder):
179
- """
180
- :type folder: office365.sharepoint.folders.folder.Folder
181
- """
184
+ # type: (Folder) -> None
182
185
 
183
186
  def _download_files(rt):
184
- [
185
- file.get_content().after_execute(_after_downloaded, file)
186
- for file in folder.files
187
- ]
187
+ [_download_file(file) for file in folder.files]
188
188
  if recursive:
189
189
  [_download_folder(sub_folder) for sub_folder in folder.folders]
190
190
 
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
@@ -6,27 +8,22 @@ class UploadStatus(Entity):
6
8
 
7
9
  @property
8
10
  def expected_content_range(self):
11
+ # type: () -> Optional[str]
9
12
  """The string representation of the byte offset of the stream uploaded in chunk upload session that the
10
13
  next ContinueUpload (3.2.5.64.2.1.17) call uses to continue chunk upload.
11
-
12
- :rtype: str or None
13
14
  """
14
15
  return self.properties.get("ExpectedContentRange", None)
15
16
 
16
17
  @property
17
18
  def expiration_date_time(self):
18
- """The earliest time at which the chunk upload session will be automatically expired and then deleted.
19
-
20
- :rtype: str or None
21
- """
19
+ # type: () -> Optional[str]
20
+ """The earliest time at which the chunk upload session will be automatically expired and then deleted."""
22
21
  return self.properties.get("ExpirationDateTime", None)
23
22
 
24
23
  @property
25
24
  def upload_id(self):
26
- """Unique Id of the chunk session upload.
27
-
28
- :rtype: str or None
29
- """
25
+ # type: () -> Optional[str]
26
+ """Unique Id of the chunk session upload."""
30
27
  return self.properties.get("UploadId", None)
31
28
 
32
29
  @property
@@ -1,3 +1,5 @@
1
+ from typing import List, Optional
2
+
1
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
2
4
  from office365.sharepoint.entity import Entity
3
5
 
@@ -12,10 +14,8 @@ class ViewFieldCollection(Entity):
12
14
  return len(self.items)
13
15
 
14
16
  def __getitem__(self, index):
15
- """
16
- Gets view field by index
17
- :param int index: Index
18
- """
17
+ # type: (int) -> str
18
+ """Gets view field by index"""
19
19
  return self.items[index]
20
20
 
21
21
  def __repr__(self):
@@ -23,17 +23,14 @@ class ViewFieldCollection(Entity):
23
23
 
24
24
  @property
25
25
  def schema_xml(self):
26
- """
27
- Gets Schema Xml.
28
- :rtype: str or None
29
- """
26
+ # type: () -> Optional[str]
27
+ """Gets Schema Xml."""
30
28
  return self.properties.get("SchemaXml", None)
31
29
 
32
30
  @property
33
31
  def items(self):
34
- """Gets items.
35
- :rtype: list[str] or None
36
- """
32
+ # type: () -> Optional[List[str]]
33
+ """Gets items."""
37
34
  return self.properties.get("Items", None)
38
35
 
39
36
  def set_property(self, name, value, persist_changes=False):
@@ -63,9 +60,7 @@ class ViewFieldCollection(Entity):
63
60
  return self
64
61
 
65
62
  def remove_all_view_fields(self):
66
- """
67
- Removes all the fields from the collection.
68
- """
63
+ """Removes all the fields from the collection."""
69
64
  qry = ServiceOperationQuery(self, "RemoveAllViewFields")
70
65
  self.context.add_query(qry)
71
66
  return self
@@ -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