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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +8 -7
  2. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +254 -162
  3. office365/base_item.py +26 -4
  4. office365/communications/calls/invitation_participant_info.py +17 -1
  5. office365/communications/calls/options.py +9 -0
  6. office365/communications/onlinemeetings/provider_type.py +3 -0
  7. office365/communications/presences/presence.py +14 -0
  8. office365/communications/presences/status_message.py +12 -0
  9. office365/directory/audit/signins/activity.py +31 -0
  10. office365/directory/audit/signins/location.py +17 -0
  11. office365/directory/audit/signins/signin.py +25 -0
  12. office365/directory/authentication/authentication.py +9 -0
  13. office365/directory/authentication/methods/details.py +18 -0
  14. office365/directory/authentication/methods/email.py +16 -0
  15. office365/directory/authentication/methods/root.py +10 -0
  16. office365/directory/certificates/authority.py +6 -1
  17. office365/directory/extensions/extended_property.py +8 -1
  18. office365/directory/extensions/extension_property.py +0 -3
  19. office365/directory/extensions/open_type.py +8 -0
  20. office365/directory/groups/group.py +2 -1
  21. office365/directory/identities/governance.py +2 -0
  22. office365/directory/insights/shared.py +15 -1
  23. office365/directory/insights/usage_details.py +16 -0
  24. office365/directory/insights/used.py +7 -0
  25. office365/directory/licenses/assigned_plan.py +14 -2
  26. office365/directory/licenses/service_plan_info.py +4 -0
  27. office365/directory/licenses/subscribed_sku.py +26 -0
  28. office365/directory/licenses/units_detail.py +11 -0
  29. office365/directory/permissions/email_identity.py +5 -0
  30. office365/directory/permissions/grants/condition_set.py +26 -0
  31. office365/directory/permissions/grants/resource_specific.py +21 -0
  32. office365/directory/policies/authentication_flows.py +9 -0
  33. office365/directory/policies/authentication_strength.py +10 -0
  34. office365/directory/policies/authorization.py +8 -0
  35. office365/directory/policies/cross_tenant_access.py +5 -0
  36. office365/directory/policies/root.py +35 -2
  37. office365/directory/rolemanagement/template.py +8 -0
  38. office365/directory/rolemanagement/unified_role_assignment.py +37 -0
  39. office365/directory/security/alerts/alert.py +21 -0
  40. office365/directory/security/alerts/history_state.py +5 -0
  41. office365/directory/security/attacksimulations/automation.py +21 -0
  42. office365/directory/security/attacksimulations/automation_run.py +5 -0
  43. office365/directory/security/attacksimulations/repeat_offender.py +6 -0
  44. office365/directory/security/attacksimulations/root.py +26 -0
  45. office365/directory/security/attacksimulations/simulation.py +17 -0
  46. office365/directory/security/cases/ediscovery.py +6 -0
  47. office365/directory/security/cases/root.py +22 -0
  48. office365/directory/security/incidents/incident.py +67 -0
  49. office365/directory/security/security.py +10 -1
  50. office365/directory/serviceprincipals/service_principal.py +88 -3
  51. office365/directory/synchronization/job.py +16 -0
  52. office365/directory/synchronization/progress.py +5 -0
  53. office365/directory/synchronization/status.py +13 -0
  54. office365/directory/synchronization/synchronization.py +24 -0
  55. office365/directory/tenant_information.py +12 -0
  56. office365/directory/users/password_profile.py +15 -3
  57. office365/directory/users/user.py +136 -8
  58. office365/graph_client.py +28 -1
  59. office365/intune/audit/actor.py +5 -0
  60. office365/intune/audit/event.py +21 -25
  61. office365/intune/audit/event_collection.py +26 -0
  62. office365/intune/audit/property.py +5 -0
  63. office365/intune/audit/resource.py +11 -0
  64. office365/intune/brand.py +6 -0
  65. office365/intune/devices/compliance/__init__.py +0 -0
  66. office365/intune/devices/compliance/policy.py +6 -0
  67. office365/intune/devices/compliance/policy_state.py +5 -0
  68. office365/intune/devices/enrollment/__init__.py +0 -0
  69. office365/intune/devices/enrollment/configuration.py +25 -0
  70. office365/intune/devices/enrollment/configuration_assignment.py +5 -0
  71. office365/intune/devices/enrollment/limit_configuration.py +5 -0
  72. office365/intune/devices/managed.py +28 -3
  73. office365/intune/devices/management/__init__.py +0 -0
  74. office365/intune/devices/management/management.py +69 -0
  75. office365/intune/devices/management/reports/__init__.py +0 -0
  76. office365/intune/devices/management/reports/reports.py +5 -0
  77. office365/intune/devices/management/settings.py +18 -0
  78. office365/intune/organizations/branding.py +15 -0
  79. office365/intune/organizations/organization.py +14 -0
  80. office365/intune/printing/base.py +11 -0
  81. office365/intune/printing/capabilities.py +5 -0
  82. office365/intune/printing/connectors/__init__.py +0 -0
  83. office365/intune/printing/connectors/connector.py +6 -0
  84. office365/intune/printing/operations/__init__.py +0 -0
  85. office365/intune/printing/print.py +24 -0
  86. office365/intune/printing/printer.py +6 -0
  87. office365/intune/printing/services/__init__.py +0 -0
  88. office365/intune/printing/services/endpoint.py +5 -0
  89. office365/intune/printing/services/service.py +17 -0
  90. office365/intune/printing/share.py +5 -0
  91. office365/intune/printing/shares/__init__.py +0 -0
  92. office365/intune/printing/taskdefinitions/__init__.py +0 -0
  93. office365/intune/provisioned_plan.py +5 -1
  94. office365/intune/servicecommunications/issues/issue.py +15 -0
  95. office365/intune/vpp_token.py +10 -0
  96. office365/onedrive/columns/content_approval_status.py +5 -0
  97. office365/onedrive/columns/datetime.py +15 -0
  98. office365/onedrive/columns/definition.py +49 -3
  99. office365/onedrive/columns/definition_collection.py +17 -6
  100. office365/onedrive/columns/types.py +13 -0
  101. office365/onedrive/driveitems/audio.py +12 -1
  102. office365/onedrive/driveitems/driveItem.py +66 -15
  103. office365/onedrive/driveitems/image.py +8 -1
  104. office365/onedrive/driveitems/remote_item.py +19 -4
  105. office365/onedrive/drives/recipient.py +4 -0
  106. office365/onedrive/files/system_info.py +8 -6
  107. office365/onedrive/lists/collection.py +11 -5
  108. office365/onedrive/lists/list.py +13 -5
  109. office365/onedrive/operations/pending.py +13 -0
  110. office365/onedrive/operations/pending_content_update.py +5 -0
  111. office365/onedrive/permissions/collection.py +1 -1
  112. office365/onedrive/sensitivitylabels/__init__.py +0 -0
  113. office365/onedrive/sensitivitylabels/assignment.py +17 -0
  114. office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
  115. office365/onedrive/sensitivitylabels/extract_result.py +13 -0
  116. office365/onedrive/sharepoint_settings.py +25 -0
  117. office365/outlook/calendar/calendar.py +116 -5
  118. office365/outlook/calendar/dateTimeTimeZone.py +3 -0
  119. office365/outlook/calendar/email_address.py +7 -0
  120. office365/outlook/calendar/events/event.py +0 -4
  121. office365/outlook/calendar/events/reminder.py +22 -3
  122. office365/outlook/calendar/group.py +0 -2
  123. office365/outlook/calendar/location_constraint.py +16 -1
  124. office365/outlook/calendar/permissions/__init__.py +0 -0
  125. office365/outlook/calendar/permissions/collection.py +24 -0
  126. office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
  127. office365/outlook/calendar/role_type.py +17 -0
  128. office365/outlook/calendar/sharing_message.py +2 -2
  129. office365/outlook/calendar/time_zone_base.py +3 -0
  130. office365/outlook/calendar/working_hours.py +17 -1
  131. office365/outlook/contacts/collection.py +39 -0
  132. office365/outlook/contacts/contact.py +21 -11
  133. office365/outlook/geo_coordinates.py +20 -0
  134. office365/outlook/item.py +5 -2
  135. office365/outlook/locale_info.py +3 -0
  136. office365/outlook/mail/folders/folder.py +51 -2
  137. office365/outlook/mail/folders/search.py +11 -0
  138. office365/outlook/mail/importance.py +1 -0
  139. office365/outlook/mail/item_body.py +3 -0
  140. office365/outlook/mail/location.py +27 -2
  141. office365/outlook/mail/location_constraint_item.py +5 -0
  142. office365/outlook/mail/messages/collection.py +7 -0
  143. office365/outlook/mail/messages/followup_flag.py +21 -0
  144. office365/outlook/mail/messages/internet_header.py +16 -0
  145. office365/outlook/mail/messages/message.py +183 -4
  146. office365/outlook/mail/messages/rules/actions.py +33 -0
  147. office365/outlook/mail/patterned_recurrence.py +14 -1
  148. office365/outlook/mail/physical_address.py +5 -1
  149. office365/outlook/mail/recipient.py +3 -0
  150. office365/outlook/mail/recurrence_pattern.py +18 -1
  151. office365/outlook/mail/recurrence_range.py +16 -2
  152. office365/reports/root.py +19 -1
  153. office365/reports/security/__init__.py +0 -0
  154. office365/reports/security/root.py +21 -0
  155. office365/reports/userregistration/__init__.py +0 -0
  156. office365/reports/userregistration/method_count.py +17 -0
  157. office365/reports/userregistration/method_summary.py +21 -0
  158. office365/sharepoint/activities/logger.py +25 -0
  159. office365/sharepoint/addtoonedrive/mount_point.py +25 -0
  160. office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
  161. office365/sharepoint/alerts/alert.py +31 -0
  162. office365/sharepoint/changes/item.py +14 -0
  163. office365/sharepoint/client_context.py +6 -0
  164. office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
  165. office365/sharepoint/clientsidecomponent/identifier.py +3 -0
  166. office365/sharepoint/compliance/tag_info.py +17 -0
  167. office365/sharepoint/contenttypes/content_type.py +42 -0
  168. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
  169. office365/sharepoint/features/known_list.py +2 -0
  170. office365/sharepoint/fields/collection.py +60 -41
  171. office365/sharepoint/fields/creation_information.py +5 -4
  172. office365/sharepoint/fields/field.py +73 -15
  173. office365/sharepoint/fields/user.py +3 -3
  174. office365/sharepoint/files/file.py +9 -4
  175. office365/sharepoint/folders/coloring.py +39 -0
  176. office365/sharepoint/folders/coloring_information.py +15 -0
  177. office365/sharepoint/folders/folder.py +21 -10
  178. office365/sharepoint/forms/customization.py +8 -0
  179. office365/sharepoint/listitems/listitem.py +10 -3
  180. office365/sharepoint/lists/bloom_filter.py +0 -1
  181. office365/sharepoint/lists/creation_information.py +18 -4
  182. office365/sharepoint/lists/list.py +199 -24
  183. office365/sharepoint/lists/render_data_parameters.py +21 -1
  184. office365/sharepoint/navigation/configured_metadata_items.py +25 -1
  185. office365/sharepoint/navigation/metadata_settings.py +6 -4
  186. office365/sharepoint/permissions/irm/file_settings.py +43 -0
  187. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
  188. office365/sharepoint/publishing/base_custom_property.py +8 -0
  189. office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
  190. office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
  191. office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
  192. office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
  193. office365/sharepoint/publishing/pages/page.py +4 -1
  194. office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
  195. office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
  196. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
  197. office365/sharepoint/search/query/auto_completion_match.py +3 -0
  198. office365/sharepoint/search/query/property_value.py +18 -0
  199. office365/sharepoint/search/request.py +16 -2
  200. office365/sharepoint/sharing/abilities.py +22 -0
  201. office365/sharepoint/sharing/direct_abilities.py +27 -0
  202. office365/sharepoint/sharing/link_abilities.py +9 -1
  203. office365/sharepoint/sharing/links/data.py +26 -1
  204. office365/sharepoint/sharing/links/info.py +1 -1
  205. office365/sharepoint/sharing/links/partial_success_response.py +5 -0
  206. office365/sharepoint/sharing/links/share_settings.py +24 -1
  207. office365/sharepoint/sharing/object_sharing_information.py +65 -2
  208. office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
  209. office365/sharepoint/sharing/object_sharing_settings.py +17 -4
  210. office365/sharepoint/sharing/principal.py +10 -0
  211. office365/sharepoint/sharing/securable_object_extensions.py +1 -17
  212. office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
  213. office365/sharepoint/sharing/user_sharing_result.py +18 -8
  214. office365/sharepoint/sitehealth/result.py +10 -0
  215. office365/sharepoint/sites/language.py +11 -1
  216. office365/sharepoint/sites/language_collection.py +1 -0
  217. office365/sharepoint/sites/site.py +34 -6
  218. office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
  219. office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
  220. office365/sharepoint/tenant/administration/tenant.py +1 -0
  221. office365/sharepoint/tenant/apps/information.py +3 -1
  222. office365/sharepoint/tenant/management/office365_tenant.py +0 -1
  223. office365/sharepoint/types/resource_path.py +3 -1
  224. office365/sharepoint/userprofiles/people_manager.py +0 -2
  225. office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
  226. office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
  227. office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
  228. office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
  229. office365/sharepoint/webs/web.py +2 -3
  230. office365/subscriptions/collection.py +12 -6
  231. office365/subscriptions/subscription.py +119 -1
  232. office365/teams/channels/iIdentity.py +5 -0
  233. office365/teams/chats/collection.py +1 -2
  234. office365/teams/chats/messages/info.py +9 -0
  235. office365/teams/chats/messages/message.py +17 -2
  236. office365/teams/members/aad_user_conversation.py +2 -2
  237. office365/teams/members/conversation_collection.py +3 -3
  238. office365/teams/schedule/change_tracked_entity.py +11 -2
  239. office365/teams/tabs/configuration.py +12 -1
  240. office365/teams/tabs/tab.py +0 -1
  241. office365/teams/team.py +23 -1
  242. office365/teams/teamwork/__init__.py +0 -0
  243. office365/teams/teamwork/activity_topic.py +5 -0
  244. office365/teams/teamwork/tags/__init__.py +0 -0
  245. office365/teams/teamwork/tags/member.py +5 -0
  246. office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
  247. office365/intune/devices/management.py +0 -35
  248. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
  249. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
  250. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
  251. /office365/{teams/messages → directory/security/cases}/__init__.py +0 -0
  252. /office365/{teams/tags → directory/synchronization}/__init__.py +0 -0
  253. /office365/teams/{tags → teamwork/tags}/identity.py +0 -0
  254. /office365/teams/{tags → teamwork/tags}/tag.py +0 -0
  255. /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
@@ -2,6 +2,9 @@ from office365.sharepoint.base_entity import BaseEntity
2
2
 
3
3
 
4
4
  class DocumentsSharedWithGroup(BaseEntity):
5
+ """
6
+ Provides methods for working with a list that shares documents with a SharePoint Group on the user's personal site.
7
+ """
5
8
 
6
9
  @property
7
10
  def entity_type_name(self):
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.base_entity import BaseEntity
2
+
3
+
4
+ class BaseCustomProperty(BaseEntity):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.Publishing.RestOnly.BaseCustomProperty"
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.base_entity import BaseEntity
2
+
3
+
4
+ class StructuralNavigationCacheWrapper(BaseEntity):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "SP.Publishing.Navigation.StructuralNavigationCacheWrapper"
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.base_entity import BaseEntity
2
+
3
+
4
+ class PageCopyResponse(BaseEntity):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.Publishing.PageCopyWithAssets.PageCopyResponse"
@@ -13,6 +13,13 @@ class CampaignPublication(SitePage):
13
13
  self.context.add_query(qry)
14
14
  return return_type
15
15
 
16
+ @property
17
+ def email_endpoint(self):
18
+ """
19
+ :rtype: str
20
+ """
21
+ return self.properties.get("EmailEndpoint", None)
22
+
16
23
  @property
17
24
  def entity_type_name(self):
18
25
  return "SP.Publishing.CampaignPublication"
@@ -11,6 +11,10 @@ from office365.sharepoint.translation.status_collection import TranslationStatus
11
11
  class SharePagePreviewByEmailFieldsData(ClientValue):
12
12
 
13
13
  def __init__(self, message=None, recipient_emails=None):
14
+ """
15
+ :param str message:
16
+ :param list[str] recipient_emails:
17
+ """
14
18
  self.message = message
15
19
  self.recipientEmails = StringCollection(recipient_emails)
16
20
 
@@ -150,7 +154,6 @@ class SitePage(SitePageMetadata):
150
154
  def schedule_publish(self, publish_start_date):
151
155
  """
152
156
  Schedules the page publication for a certain date
153
-
154
157
  :param datetime.datetime publish_start_date: The pending publication scheduled date
155
158
  """
156
159
  payload = SitePageFieldsData(publish_start_date=publish_start_date)
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.publishing.pages.metadata import SitePageMetadata
2
+
3
+
4
+ class RepostPageMetadata(SitePageMetadata):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "SP.Publishing.RepostPageMetadata"
@@ -2,4 +2,7 @@ from office365.sharepoint.base_entity import BaseEntity
2
2
 
3
3
 
4
4
  class PersonMagazine(BaseEntity):
5
- pass
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "SP.Publishing.PersonMagazine"
@@ -20,7 +20,6 @@ class TenantCrawlVersionsInfoProvider(BaseEntity):
20
20
  self.context.add_query(qry)
21
21
  return return_type
22
22
 
23
-
24
23
  def is_crawl_versions_enabled(self, site_id):
25
24
  """
26
25
  :param str site_id:
@@ -33,6 +32,14 @@ class TenantCrawlVersionsInfoProvider(BaseEntity):
33
32
  self.context.add_query(qry)
34
33
  return return_type
35
34
 
35
+ def is_crawl_versions_enabled_for_tenant(self):
36
+ """
37
+ """
38
+ return_type = ClientResult(self.context, bool())
39
+ qry = ServiceOperationQuery(self, "IsCrawlVersionsEnabledForTenant", None, None, None, return_type)
40
+ self.context.add_query(qry)
41
+ return return_type
42
+
36
43
  @property
37
44
  def entity_type_name(self):
38
45
  return "Microsoft.SharePoint.Client.Search.Administration.TenantCrawlVersionsInfoProvider"
@@ -5,6 +5,9 @@ class QueryAutoCompletionMatch(ClientValue):
5
5
  """Represents one match in the Source for the Query"""
6
6
 
7
7
  def __init__(self, alternation=None, key=None):
8
+ """
9
+
10
+ """
8
11
  self.Alternation = alternation
9
12
  self.Key = key
10
13
 
@@ -5,6 +5,24 @@ class QueryPropertyValue(ClientValue):
5
5
  """This object is used to store values of predefined types. The object MUST have a value set for only
6
6
  one of the property."""
7
7
 
8
+ def __init__(self, bool_val=None, int_val=None, str_array=None, str_val=None, query_property_value_type_index=None):
9
+ """
10
+ :param bool bool_val: Specifies any arbitrary value of type CSOM Boolean. This property MUST have a value only
11
+ if QueryPropertyValueTypeIndex is set to 3.
12
+ :param int int_val: Specifies any arbitrary value of type CSOM Int32. This property MUST have a value only
13
+ if QueryPropertyValueTypeIndex is set to 2.
14
+ :param int query_property_value_type_index: Specifies the type of data stored in this object.
15
+ :param list[str] str_array: Specifies any arbitrary value of type CSOM array. This property MUST have a
16
+ value only if QueryPropertyValueTypeIndex is set to 4.
17
+ :param str str_val: Specifies any arbitrary value of type CSOM String. This property MUST have a value
18
+ only if QueryPropertyValueTypeIndex is set to 1.
19
+ """
20
+ self.BoolVal = bool_val
21
+ self.IntVal = int_val
22
+ self.StrArray = str_array
23
+ self.StrVal = str_val
24
+ self.QueryPropertyValueTypeIndex = query_property_value_type_index
25
+
8
26
  @property
9
27
  def entity_type_name(self):
10
28
  return "Microsoft.SharePoint.Client.Search.Query.QueryPropertyValue"
@@ -1,6 +1,7 @@
1
1
  from office365.runtime.client_value import ClientValue
2
2
  from office365.runtime.client_value_collection import ClientValueCollection
3
3
  from office365.runtime.types.collections import StringCollection
4
+ from office365.sharepoint.search.query.property import QueryProperty
4
5
  from office365.sharepoint.search.query.reordering_rule import ReorderingRule
5
6
  from office365.sharepoint.search.query.sort.sort import Sort
6
7
 
@@ -17,7 +18,9 @@ class SearchRequest(ClientValue):
17
18
  row_limit=None, rows_per_page=None, start_row=None,
18
19
  enable_sorting=None, sort_list=None, query_template=None, ranking_model_id=None,
19
20
  summary_length=None, collapse_specification=None, client_type=None,
20
- enable_query_rules=None, source_id=None, reordering_rules=None, **kwargs):
21
+ enable_query_rules=None, source_id=None, reordering_rules=None,
22
+ properties=None, ui_language=None, hit_highlighted_properties=None,
23
+ hit_highlighted_multivalue_property_limit=None, **kwargs):
21
24
  """
22
25
  :param str query_text: The query text of the search query. If this element is not present or a value is not
23
26
  specified, a default value of an empty string MUST be used, and the server MUST return a
@@ -66,7 +69,14 @@ class SearchRequest(ClientValue):
66
69
  :param str or None source_id: Specifies the unique identifier for result source to use for executing the
67
70
  search query. If no value is specified then the protocol server MUST use the id for the default
68
71
  result source.
69
- :param [ReorderingRule] reordering_rules:
72
+ :param list[ReorderingRule] reordering_rules: Specifies the list of rules used to reorder search results.
73
+ :param list[QueryProperty] properties: Used to transport additional and custom search query data, in a
74
+ name-value structure, from the caller to the server.
75
+ :param int ui_language: Specifies the LCID for UI culture.
76
+ :param list[str] hit_highlighted_properties: A list of properties that the protocol server includes in the
77
+ HitHighlightedProperties for each result
78
+ :param int hit_highlighted_multivalue_property_limit: Specifies the maximum number of hit highlighted values
79
+ of multi-value properties to be returned.
70
80
  """
71
81
  super(SearchRequest, self).__init__()
72
82
  self.Querytext = query_text
@@ -86,6 +96,10 @@ class SearchRequest(ClientValue):
86
96
  self.EnableQueryRules = enable_query_rules
87
97
  self.SourceId = source_id
88
98
  self.ReorderingRules = ClientValueCollection(ReorderingRule, reordering_rules)
99
+ self.Properties = ClientValueCollection(QueryProperty, properties)
100
+ self.UILanguage = ui_language
101
+ self.HitHighlightedProperties = StringCollection(hit_highlighted_properties)
102
+ self.HitHighlightedMultivaluePropertyLimit = hit_highlighted_multivalue_property_limit
89
103
  self.__dict__.update(**kwargs)
90
104
 
91
105
  @property
@@ -1,4 +1,6 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.sharepoint.sharing.direct_abilities import DirectSharingAbilities
3
+ from office365.sharepoint.sharing.link_abilities import SharingLinkAbilities
2
4
 
3
5
 
4
6
  class SharingAbilities(ClientValue):
@@ -7,6 +9,26 @@ class SharingAbilities(ClientValue):
7
9
  with the state of each capability for the current user.
8
10
  """
9
11
 
12
+ def __init__(self, anonymous_link_abilities=SharingLinkAbilities(),
13
+ anyone_link_abilities=SharingLinkAbilities(),
14
+ direct_sharing_abilities=DirectSharingAbilities(),
15
+ organization_link_abilities=SharingLinkAbilities(),
16
+ people_sharing_link_abilities=SharingLinkAbilities()):
17
+ """
18
+ :param SharingLinkAbilities anonymous_link_abilities: Indicates abilities for anonymous access links.
19
+ :param SharingLinkAbilities anonymous_link_abilities:
20
+ :param DirectSharingAbilities direct_sharing_abilities: Indicates abilities for direct sharing of a document
21
+ using the canonical URL.
22
+ :param SharingLinkAbilities organization_link_abilities: Indicates abilities for organization access links.
23
+ :param SharingLinkAbilities people_sharing_link_abilities: Indicates abilities for tokenized sharing links that
24
+ are configured to support only a predefined restricted membership set.
25
+ """
26
+ self.anonymousLinkAbilities = anonymous_link_abilities
27
+ self.anyoneLinkAbilities = anyone_link_abilities
28
+ self.directSharingAbilities = direct_sharing_abilities
29
+ self.organizationLinkAbilities = organization_link_abilities
30
+ self.peopleSharingLinkAbilities = people_sharing_link_abilities
31
+
10
32
  @property
11
33
  def entity_type_name(self):
12
34
  return "SP.Sharing.SharingAbilities"
@@ -0,0 +1,27 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.sharepoint.sharing.ability_status import SharingAbilityStatus
3
+
4
+
5
+ class DirectSharingAbilities(ClientValue):
6
+ """Represents the set of capabilities for direct sharing for the current user."""
7
+
8
+ def __init__(self, can_add_external_principal=SharingAbilityStatus(),
9
+ can_add_internal_principal=SharingAbilityStatus(),
10
+ can_request_grant_access=SharingAbilityStatus(),
11
+ supports_review_permission=SharingAbilityStatus()):
12
+ """
13
+ :param SharingAbilityStatus can_add_external_principal: Indicates whether the current user can share to new
14
+ external users.
15
+ :param SharingAbilityStatus can_add_internal_principal: Indicates whether the current user can share to
16
+ internal users.
17
+ :param SharingAbilityStatus can_request_grant_access: Indicates whether the current user can initiate a
18
+ request for someone with higher permissions to grant access.
19
+ """
20
+ self.canAddExternalPrincipal = can_add_external_principal
21
+ self.canAddInternalPrincipal = can_add_internal_principal
22
+ self.canRequestGrantAccess = can_request_grant_access
23
+ self.supportsReviewPermission = supports_review_permission
24
+
25
+ @property
26
+ def entity_type_name(self):
27
+ return "SP.Sharing.DirectSharingAbilities"
@@ -10,14 +10,22 @@ class SharingLinkAbilities(ClientValue):
10
10
 
11
11
  def __init__(self, can_add_new_external_principals=SharingAbilityStatus(),
12
12
  can_delete_edit_link=SharingAbilityStatus(),
13
- can_delete_manage_list_link=SharingAbilityStatus()):
13
+ can_delete_manage_list_link=SharingAbilityStatus(),
14
+ can_get_edit_link=SharingAbilityStatus(),
15
+ can_get_read_link=SharingAbilityStatus()):
14
16
  """
15
17
  :param SharingAbilityStatus can_add_new_external_principals:
16
18
  :param SharingAbilityStatus can_delete_edit_link:
19
+ :param SharingAbilityStatus can_get_edit_link: Indicates whether the current user can get an existing tokenized
20
+ sharing link that provides edit access.
21
+ :param SharingAbilityStatus can_get_read_link: Indicates whether the current user can get an existing tokenized
22
+ sharing link that provides read access.
17
23
  """
18
24
  self.canAddNewExternalPrincipals = can_add_new_external_principals
19
25
  self.canDeleteEditLink = can_delete_edit_link
20
26
  self.canDeleteManageListLink = can_delete_manage_list_link
27
+ self.canGetEditLink = can_get_edit_link
28
+ self.canGetReadLink = can_get_read_link
21
29
 
22
30
  @property
23
31
  def entity_type_name(self):
@@ -7,4 +7,29 @@ class SharingLinkData(ClientValue):
7
7
  about the object the link URL refers to and any additional sharing link data if the link URL
8
8
  is a tokenized sharing link.
9
9
  """
10
- pass
10
+
11
+ def __init__(self, blocks_download=None, description=None, embeddable=None, expiration=None,
12
+ has_external_guest_invitees=None, is_anonymous=None, is_create_only_link=None,
13
+ is_forms_link=None):
14
+ """
15
+ :param bool blocks_download:
16
+ :param str description:
17
+ :param bool embeddable:
18
+ :param str expiration: The UTC date/time string with complete representation for calendar date and time of
19
+ day which represents the time and date of expiry for the tokenized sharing link
20
+ (i.e. is not accessible anymore)
21
+ :param bool has_external_guest_invitees: Boolean indicating whether the link URL is a tokenized sharing link
22
+ that has any external guest invitees (external users explicitly invited by email address).
23
+ :param bool is_anonymous: Boolean indicating if the link is anonymously accessible.
24
+ :param bool is_create_only_link:
25
+ :param bool is_forms_link: Indicates if the link URL is a tokenized sharing link that supports forms sharing.
26
+ This is limited to only tokenized sharing links generated with the Excel Survey feature.
27
+ """
28
+ self.BlocksDownload = blocks_download
29
+ self.Description = description
30
+ self.Embeddable = embeddable
31
+ self.Expiration = expiration
32
+ self.HasExternalGuestInvitees = has_external_guest_invitees
33
+ self.IsAnonymous = is_anonymous
34
+ self.IsCreateOnlyLink = is_create_only_link
35
+ self.IsFormsLink = is_forms_link
@@ -43,7 +43,7 @@ class SharingLinkInfo(ClientValue):
43
43
  return self.Url
44
44
 
45
45
  def __repr__(self):
46
- return self.Url
46
+ return self.Url or ""
47
47
 
48
48
  @property
49
49
  def entity_type_name(self):
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.sharing.links.share_response import ShareLinkResponse
2
+
3
+
4
+ class ShareLinkPartialSuccessResponse(ShareLinkResponse):
5
+ """"""
@@ -4,13 +4,36 @@ from office365.runtime.client_value import ClientValue
4
4
  class ShareLinkSettings(ClientValue):
5
5
  """Represents the settings the retrieval or creation/update of a tokenized sharing link"""
6
6
 
7
- def __init__(self, link_kind, expiration=None):
7
+ def __init__(self, allow_anonymous_access=None, application_link=None, link_kind=None, expiration=None,
8
+ password=None, password_protected=None, role=None,
9
+ track_link_users=None, share_id=None):
8
10
  """
11
+ :param bool allow_anonymous_access: Indicates if the tokenized sharing link supports anonymous access.
12
+ This value is optional and defaults to false for Flexible links (section 3.2.5.315.1.7) and is ignored
13
+ for other link kinds.
14
+ :param bool application_link:
9
15
  :param int link_kind: The kind of the tokenized sharing link to be created/updated or retrieved.
10
16
  This value MUST NOT be set to Uninitialized (section 3.2.5.315.1.1) nor Direct (section 3.2.5.315.1.2)
17
+ :param str password: Optional password value to apply to the tokenized sharing link, if it can support password
18
+ protection. If this value is null or empty when the updatePassword parameter is set, any existing password
19
+ on the tokenized sharing link MUST be cleared. Any other value will be applied to the tokenized sharing link
20
+ as a password setting.
21
+ :param bool password_protected:
22
+ :param int role: The role to be used for the tokenized sharing link. This is required for Flexible links
23
+ and ignored for all other kinds.
24
+ :param bool track_link_users:
25
+ :param str share_id: The optional unique identifier of an existing section tokenized sharing link to be
26
+ retrieved and updated if necessary.
11
27
  """
28
+ self.allowAnonymousAccess = allow_anonymous_access
29
+ self.applicationLink = application_link
12
30
  self.linkKind = link_kind
13
31
  self.expiration = expiration
32
+ self.password = password
33
+ self.passwordProtected = True if password else password_protected
34
+ self.role = role
35
+ self.shareId = share_id
36
+ self.trackLinkUsers = track_link_users
14
37
 
15
38
  @property
16
39
  def entity_type_name(self):
@@ -110,8 +110,7 @@ class ObjectSharingInformation(BaseEntity):
110
110
  :param str list_id: The list identifier for the list which contains the list item for which
111
111
  the sharing state is requested.
112
112
  :param office365.sharepoint.client_context.ClientContext context: SharePoint client context
113
- :param BaseEntity return_type: Return type
114
- :return: ObjectSharingInformation
113
+ :param ObjectSharingInformation return_type: Return type
115
114
  """
116
115
  binding_type = ObjectSharingInformation(context)
117
116
  payload = {
@@ -131,6 +130,70 @@ class ObjectSharingInformation(BaseEntity):
131
130
  context.add_query(qry)
132
131
  return return_type
133
132
 
133
+ @property
134
+ def anonymous_edit_link(self):
135
+ """
136
+ Provides the URL that allows an anonymous user to edit the securable object.
137
+ If such a URL is not available, this property will provide an empty string.
138
+
139
+ :rtype: str
140
+ """
141
+ return self.properties.get('AnonymousEditLink', None)
142
+
143
+ @property
144
+ def anonymous_view_link(self):
145
+ """
146
+ Provides the URL that allows an anonymous user to view the securable object.
147
+ If such a URL is not available, this property will provide an empty string.
148
+
149
+ :rtype: str
150
+ """
151
+ return self.properties.get('AnonymousViewLink', None)
152
+
153
+ @property
154
+ def can_be_shared(self):
155
+ """
156
+ Indicates whether the current securable object can be shared.
157
+ :rtype: bool
158
+ """
159
+ return self.properties.get('CanBeShared', None)
160
+
161
+ @property
162
+ def can_be_unshared(self):
163
+ """
164
+ Indicates whether the current securable object can be unshared.
165
+ :rtype: bool
166
+ """
167
+ return self.properties.get('CanBeUnshared', None)
168
+
169
+ @property
170
+ def can_manage_permissions(self):
171
+ """
172
+ Specifies whether the current user is allowed to change the permissions of the securable object.
173
+ :rtype: bool
174
+ """
175
+ return self.properties.get('CanManagePermissions', None)
176
+
177
+ @property
178
+ def has_pending_access_requests(self):
179
+ """
180
+ Provides information about whether there are any pending access requests for the securable object.
181
+
182
+ This information is only provided if the current user has sufficient permissions to view any pending
183
+ access requests. If the current user does not have such permissions, this property will return false.
184
+ :rtype: bool
185
+ """
186
+ return self.properties.get('HasPendingAccessRequests', None)
187
+
188
+ @property
189
+ def has_permission_levels(self):
190
+ """
191
+ Indicates whether the object sharing information contains permissions information in addition to the identities
192
+ of the users who have access to the securable object.
193
+ :rtype: bool
194
+ """
195
+ return self.properties.get('HasPermissionLevels', None)
196
+
134
197
  @property
135
198
  def sharing_links(self):
136
199
  """Indicates the collection of all available sharing links for the securable object."""
@@ -16,6 +16,15 @@ class ObjectSharingInformationUser(BaseEntity):
16
16
  """
17
17
  return self.properties.get("Email", None)
18
18
 
19
+ @property
20
+ def sip_address(self):
21
+ """
22
+ Specifies the SIP address of the user.
23
+
24
+ :rtype: str or None
25
+ """
26
+ return self.properties.get("SipAddress", None)
27
+
19
28
  @property
20
29
  def login_name(self):
21
30
  """
@@ -23,25 +23,38 @@ class ObjectSharingSettings(BaseEntity):
23
23
  def access_request_mode(self):
24
24
  """
25
25
  Boolean indicating whether the sharing context operates under the access request mode.
26
-
27
26
  :rtype: bool
28
27
  """
29
28
  return self.properties.get("AccessRequestMode", None)
30
29
 
30
+ @property
31
+ def block_people_picker_and_sharing(self):
32
+ """
33
+ Boolean indicating whether the current user can use the People Picker to do any sharing.
34
+ :rtype: bool
35
+ """
36
+ return self.properties.get("BlockPeoplePickerAndSharing", None)
37
+
31
38
  @property
32
39
  def can_send_email(self):
33
40
  """
34
41
  Boolean indicating whether email invitations can be sent.
35
-
36
- :return: bool
42
+ :rtype: bool
37
43
  """
38
44
  return self.properties.get("CanSendEmail", None)
39
45
 
46
+ @property
47
+ def can_send_link(self):
48
+ """
49
+ Boolean indicating whether the current user can make use of Share-By-Link.
50
+ :rtype: bool
51
+ """
52
+ return self.properties.get("CanSendLink", None)
53
+
40
54
  @property
41
55
  def is_user_site_admin(self):
42
56
  """
43
57
  Boolean that indicates whether or not the current user is a site collection administrator.
44
-
45
58
  :return: bool
46
59
  """
47
60
  return self.properties.get("IsUserSiteAdmin", None)
@@ -4,6 +4,16 @@ from office365.runtime.client_value import ClientValue
4
4
  class Principal(ClientValue):
5
5
  """Principal class is a representation of an identity (user/group)."""
6
6
 
7
+ def __init__(self, directory_object_id=None, email=None, expiration=None):
8
+ """
9
+ :param str directory_object_id:
10
+ :param str email: Email address of the Principal.
11
+ :param str expiration:
12
+ """
13
+ self.directoryObjectId = directory_object_id
14
+ self.email = email
15
+ self.expiration = expiration
16
+
7
17
  @property
8
18
  def entity_type_name(self):
9
19
  return "SP.Sharing.Principal"
@@ -1,24 +1,8 @@
1
- from office365.runtime.queries.service_operation import ServiceOperationQuery
2
1
  from office365.sharepoint.base_entity import BaseEntity
3
- from office365.sharepoint.sharing.information import SharingInformation
4
- from office365.sharepoint.sharing.information_request import SharingInformationRequest
5
2
 
6
3
 
7
4
  class SecurableObjectExtensions(BaseEntity):
8
-
9
- @staticmethod
10
- def get_sharing_information(context):
11
- """
12
- Gets the sharing information for a list item.
13
-
14
- :param office365.sharepoint.client_context.ClientContext context: Client context
15
- """
16
- return_type = SharingInformation(context)
17
- request = SharingInformationRequest()
18
- binding_type = SecurableObjectExtensions(context)
19
- qry = ServiceOperationQuery(binding_type, "GetSharingInformation", None, request, None, return_type, True)
20
- context.add_query(qry)
21
- return return_type
5
+ """Contains extension methods of securable object."""
22
6
 
23
7
  @property
24
8
  def entity_type_name(self):
@@ -30,6 +30,7 @@ class SiteSharingReportHelper(BaseEntity):
30
30
  "folderUrl": folder_url
31
31
  }
32
32
  binding_type = SiteSharingReportHelper(context)
33
- qry = ServiceOperationQuery(binding_type, "CreateSharingReportJob", None, payload, None, return_type, True)
33
+ qry = ServiceOperationQuery(binding_type, "CreateSharingReportJob", None, payload,
34
+ None, return_type, True)
34
35
  context.add_query(qry)
35
36
  return return_type
@@ -6,21 +6,31 @@ class UserSharingResult(ClientValue):
6
6
  """Specifies a sharing result for an individual user that method UpdateDocumentSharingInfo
7
7
  (section 3.2.5.187.2.1.1) returns."""
8
8
 
9
- def __init__(self, allowed_roles=None, current_role=None):
9
+ def __init__(self, allowed_roles=None, current_role=None, display_name=None, email=None,
10
+ invitation_link=None, is_user_known=None, message=None, status=None, user=None):
10
11
  """
11
12
  :param list[int] allowed_roles: Specifies a set of roles that can be assigned to the user.
12
13
  :param int current_role: Specifies the role that the user is currently assigned to.
14
+ :param str display_name: Gets the display name of the user.
15
+ :param str email: Gets the user email.
16
+ :param str invitation_link: Gets the invitation link.
17
+ :param bool is_user_known: Specifies whether the user is known to the server. If "true", the user is known to
18
+ the server; if "false", user is unknown.
19
+ :param str message: Specifies a message string that explains the reason when the Status property is "false".
20
+ :param bool status: Specifies whether the sharing update for the user was completed successfully. If "true",
21
+ the sharing update completed successfully for the user; if "false", the sharing update failed for the user.
22
+ :param str user: Specifies the identifier of a user.
13
23
  """
14
24
  super(UserSharingResult, self).__init__()
15
25
  self.AllowedRoles = ClientValueCollection(int, allowed_roles)
16
26
  self.CurrentRole = current_role
17
- self.DisplayName = None
18
- self.Email = None
19
- self.InvitationLink = None
20
- self.IsUserKnown = None
21
- self.Message = None
22
- self.Status = None
23
- self.User = None
27
+ self.DisplayName = display_name
28
+ self.Email = email
29
+ self.InvitationLink = invitation_link
30
+ self.IsUserKnown = is_user_known
31
+ self.Message = message
32
+ self.Status = status
33
+ self.User = user
24
34
 
25
35
  @property
26
36
  def entity_type_name(self):
@@ -4,6 +4,16 @@ from office365.runtime.client_value import ClientValue
4
4
  class SiteHealthResult(ClientValue):
5
5
  """Specifies the result of running a site collection health rule."""
6
6
 
7
+ def __init__(self, message_as_text=None, rule_help_link=None, rule_id=None):
8
+ """
9
+ :param str message_as_text: Specifies a summary of the results of running a site collection health rule.
10
+ :param str rule_help_link: Specifies a hyperlink to help information about the site collection health rule.
11
+ :param str rule_id: Specifies the unique identifier of the site collection health rule.
12
+ """
13
+ self.MessageAsText = message_as_text
14
+ self.RuleHelpLink = rule_help_link
15
+ self.RuleId = rule_id
16
+
7
17
  @property
8
18
  def entity_type_name(self):
9
19
  return "SP.SiteHealth.SiteHealthResult"
@@ -2,4 +2,14 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class Language(ClientValue):
5
- pass
5
+ """Represents a natural language."""
6
+
7
+ def __init__(self, display_name=None, language_tag=None, lcid=None):
8
+ """
9
+ :param str display_name: Specifies the name of the language as displayed in the user interface.
10
+ :param str language_tag: Specifies the corresponding culture name for the language.
11
+ :param int lcid: Specifies the language code identifier (LCID) for the language.
12
+ """
13
+ self.DisplayName = display_name
14
+ self.LanguageTag = language_tag
15
+ self.Lcid = lcid