Office365-REST-Python-Client 2.5.13__py3-none-any.whl → 2.5.14__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 (137) hide show
  1. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/RECORD +135 -78
  3. office365/booking/business/business.py +13 -0
  4. office365/booking/business/collection.py +8 -4
  5. office365/communications/callrecords/collection.py +42 -0
  6. office365/communications/callrecords/direct_routing_log_row.py +5 -0
  7. office365/communications/cloud_communications.py +2 -3
  8. office365/directory/applications/application.py +16 -2
  9. office365/directory/applications/required_resource_access.py +23 -0
  10. office365/directory/applications/resource_access.py +26 -0
  11. office365/directory/authentication/methods/details.py +29 -0
  12. office365/directory/authentication/methods/root.py +8 -0
  13. office365/directory/permissions/scope.py +15 -3
  14. office365/directory/policies/authentication_strength.py +21 -0
  15. office365/directory/policies/update_allowed_combinations_result.py +5 -0
  16. office365/directory/security/alerts/evidence.py +2 -1
  17. office365/directory/security/alerts/malware_evidence.py +5 -0
  18. office365/directory/security/alerts/process_evidence.py +5 -0
  19. office365/directory/security/attacksimulations/user.py +5 -0
  20. office365/directory/security/attacksimulations/user_coverage.py +3 -0
  21. office365/directory/security/attacksimulations/users/details.py +6 -1
  22. office365/directory/serviceprincipals/service_principal.py +86 -37
  23. office365/onedrive/driveitems/driveItem.py +1 -1
  24. office365/onedrive/driveitems/retention_label.py +33 -0
  25. office365/onedrive/driveitems/retention_label_settings.py +7 -0
  26. office365/onedrive/sitepages/base.py +3 -0
  27. office365/onedrive/sitepages/collection.py +12 -0
  28. office365/onedrive/sitepages/site_page.py +9 -9
  29. office365/onedrive/sites/archival_details.py +5 -0
  30. office365/onedrive/sites/site_collection.py +10 -1
  31. office365/onedrive/workbooks/functions/functions.py +23 -0
  32. office365/partners/billing/__init__.py +0 -0
  33. office365/planner/tasks/check_list_item.py +5 -1
  34. office365/runtime/client_object.py +15 -7
  35. office365/runtime/client_object_collection.py +2 -2
  36. office365/runtime/client_result.py +2 -0
  37. office365/runtime/client_value.py +1 -1
  38. office365/runtime/csom/request.py +11 -0
  39. office365/runtime/types/exceptions.py +18 -0
  40. office365/search/acronym.py +10 -0
  41. office365/search/aggregation_option.py +6 -0
  42. office365/search/answer.py +9 -0
  43. office365/search/entity.py +67 -14
  44. office365/search/entity_type.py +28 -0
  45. office365/search/request.py +32 -3
  46. office365/sharepoint/apps/access_requests.py +5 -0
  47. office365/sharepoint/apps/management/__init__.py +0 -0
  48. office365/sharepoint/apps/management/principal_info.py +9 -0
  49. office365/sharepoint/authpolicy/events/collection.py +28 -0
  50. office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +4 -0
  51. office365/sharepoint/documentmanagement/document_id.py +28 -3
  52. office365/sharepoint/files/file.py +11 -4
  53. office365/sharepoint/files/versions/event.py +9 -0
  54. office365/sharepoint/flows/permissions.py +30 -0
  55. office365/sharepoint/listhome/favorite_item.py +9 -0
  56. office365/sharepoint/listitems/listitem.py +79 -4
  57. office365/sharepoint/listitems/update_parameters.py +4 -1
  58. office365/sharepoint/lists/data_parameters.py +5 -0
  59. office365/sharepoint/lists/exporter.py +73 -0
  60. office365/sharepoint/lists/list.py +148 -61
  61. office365/sharepoint/lists/render_data_parameters.py +31 -0
  62. office365/sharepoint/lists/version_policy_manager.py +5 -0
  63. office365/sharepoint/migration/copy_migration_options.py +5 -0
  64. office365/sharepoint/portal/groups/site_manager.py +32 -0
  65. office365/sharepoint/portal/project/__init__.py +9 -0
  66. office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
  67. office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
  68. office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
  69. office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
  70. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
  71. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
  72. office365/sharepoint/publishing/pages/coauth_state.py +8 -0
  73. office365/sharepoint/publishing/pages/page.py +11 -0
  74. office365/sharepoint/publishing/pages/stream_content.py +9 -0
  75. office365/sharepoint/publishing/pages/stream_data.py +8 -0
  76. office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
  77. office365/sharepoint/request.py +3 -0
  78. office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
  79. office365/sharepoint/search/ranking_labeling.py +1 -0
  80. office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
  81. office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
  82. office365/sharepoint/search/reports/abandonedqueries/item.py +5 -0
  83. office365/sharepoint/search/reports/noresult/__init__.py +0 -0
  84. office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
  85. office365/sharepoint/search/reports/top_queries.py +7 -0
  86. office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
  87. office365/sharepoint/search/reports/topqueries/data.py +9 -0
  88. office365/sharepoint/search/reports/topqueries/item.py +15 -0
  89. office365/sharepoint/search/scs_endpoint.py +9 -0
  90. office365/sharepoint/securestore/target_application.py +8 -0
  91. office365/sharepoint/sharing/document_manager.py +3 -3
  92. office365/sharepoint/sharing/result.py +21 -0
  93. office365/sharepoint/sites/html_field_security_setting.py +5 -0
  94. office365/sharepoint/sites/site.py +30 -1
  95. office365/sharepoint/sites/version_policy_manager.py +25 -0
  96. office365/sharepoint/sitescripts/metadata.py +28 -3
  97. office365/sharepoint/sitescripts/utility.py +17 -0
  98. office365/sharepoint/smartcache/__init__.py +0 -0
  99. office365/sharepoint/smartcache/item.py +9 -0
  100. office365/sharepoint/tenant/administration/app_billing_properties.py +21 -0
  101. office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
  102. office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
  103. office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
  104. office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
  105. office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
  106. office365/sharepoint/tenant/administration/internal/{permission_grant.py → appservice/permission_request.py} +4 -2
  107. office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
  108. office365/sharepoint/tenant/administration/settings_service.py +4 -1
  109. office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
  110. office365/sharepoint/tenant/administration/tenant.py +110 -4
  111. office365/sharepoint/tenant/administration/types.py +13 -1
  112. office365/sharepoint/tenant/cdn_api.py +3 -1
  113. office365/sharepoint/tenant/management/office365_tenant.py +2 -0
  114. office365/sharepoint/tenant/settings.py +10 -0
  115. office365/sharepoint/utilities/utility.py +6 -0
  116. office365/sharepoint/viva/connections_page.py +8 -0
  117. office365/sharepoint/viva/dashboard_configuration.py +8 -0
  118. office365/sharepoint/viva/employee_engagement.py +39 -1
  119. office365/sharepoint/viva/resource_get_endpoint.py +8 -0
  120. office365/sharepoint/viva/resource_link.py +8 -0
  121. office365/sharepoint/webs/information.py +66 -1
  122. office365/sharepoint/webs/regional_settings.py +32 -0
  123. office365/sharepoint/webs/templates/__init__.py +0 -0
  124. office365/sharepoint/webs/time_zone.py +1 -1
  125. office365/sharepoint/webs/web.py +58 -0
  126. office365/sharepoint/workflow/task.py +5 -0
  127. office365/subscriptions/collection.py +16 -0
  128. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
  129. office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
  130. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/LICENSE +0 -0
  131. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/WHEEL +0 -0
  132. {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/top_level.txt +0 -0
  133. /office365/{sharepoint/userprofiles/sharedwithme → partners}/__init__.py +0 -0
  134. /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
  135. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
  136. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
  137. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
@@ -1,4 +1,3 @@
1
- import json
2
1
  import os
3
2
  from datetime import datetime
4
3
  from typing import IO, TYPE_CHECKING, AnyStr, Callable, Dict, Optional
@@ -22,12 +21,12 @@ from office365.sharepoint.eventreceivers.definition_collection import (
22
21
  EventReceiverDefinitionCollection,
23
22
  )
24
23
  from office365.sharepoint.fields.collection import FieldCollection
24
+ from office365.sharepoint.fields.field import Field
25
25
  from office365.sharepoint.fields.related_field_collection import RelatedFieldCollection
26
26
  from office365.sharepoint.files.checked_out_file_collection import (
27
27
  CheckedOutFileCollection,
28
28
  )
29
29
  from office365.sharepoint.files.file import File
30
- from office365.sharepoint.files.system_object_type import FileSystemObjectType
31
30
  from office365.sharepoint.flows.synchronization_result import FlowSynchronizationResult
32
31
  from office365.sharepoint.folders.folder import Folder
33
32
  from office365.sharepoint.forms.collection import FormCollection
@@ -44,7 +43,9 @@ from office365.sharepoint.listitems.listitem import ListItem
44
43
  from office365.sharepoint.lists.bloom_filter import ListBloomFilter
45
44
  from office365.sharepoint.lists.creatables_info import CreatablesInfo
46
45
  from office365.sharepoint.lists.data_source import ListDataSource
46
+ from office365.sharepoint.lists.render_data_parameters import RenderListDataParameters
47
47
  from office365.sharepoint.lists.rule import SPListRule
48
+ from office365.sharepoint.lists.version_policy_manager import VersionPolicyManager
48
49
  from office365.sharepoint.navigation.configured_metadata_items import (
49
50
  ConfiguredMetadataNavigationItemCollection,
50
51
  )
@@ -84,60 +85,9 @@ class List(SecurableObject):
84
85
  def export(self, local_file, include_content=False, item_exported=None):
85
86
  # type: (IO, bool, Callable[[ListItem|File|Folder], None]) -> Self
86
87
  """Exports SharePoint List"""
87
- import zipfile
88
-
89
- def _append_file(name, data):
90
- with zipfile.ZipFile(local_file.name, "a", zipfile.ZIP_DEFLATED) as zf:
91
- zf.writestr(name, data)
92
-
93
- def _download_content(list_item):
94
- # type: (ListItem) -> None
95
- def _after_downloaded(result):
96
- # type: (ClientResult[AnyStr]) -> None
97
- item_path = list_item.properties["FileRef"].replace(
98
- self.root_folder.serverRelativeUrl, ""
99
- )
100
- _append_file(item_path, result.value)
101
-
102
- list_item.file.get_content().after_execute(_after_downloaded)
103
-
104
- def _export_items(items):
105
- # type: (ListItemCollection) -> None
106
-
107
- for item in items:
108
- # item_path = item.properties["FileRef"].replace(self.root_folder.serverRelativeUrl, "")
109
- item_path = str(item.id) + ".json"
110
-
111
- if item.file_system_object_type == FileSystemObjectType.Folder:
112
- pass
113
- else:
114
- _append_file(item_path, json.dumps(item.to_json()))
115
-
116
- if include_content:
117
- _download_content(item)
118
-
119
- if callable(item_exported):
120
- item_exported(item)
121
-
122
- def _save_schema():
123
- (
124
- self.items.select(
125
- [
126
- "*",
127
- "Id",
128
- "FileRef",
129
- "FileDirRef",
130
- "FileLeafRef",
131
- "FileSystemObjectType",
132
- ]
133
- )
134
- # .expand(["File", "Folder"])
135
- .get().paged(page_loaded=_export_items)
136
- )
88
+ from office365.sharepoint.lists.exporter import ListExporter
137
89
 
138
- self.ensure_properties(["SchemaXml", "RootFolder"], _save_schema)
139
-
140
- return self
90
+ return ListExporter.export(self, local_file, include_content, item_exported)
141
91
 
142
92
  def clear(self):
143
93
  """Clears the list."""
@@ -263,6 +213,16 @@ class List(SecurableObject):
263
213
  self.ensure_property("RootFolder", _list_loaded)
264
214
  return return_type
265
215
 
216
+ def ensure_signoff_status_field(self):
217
+ """"""
218
+ return_type = Field(self.context)
219
+ self.fields.add_child(return_type)
220
+ qry = ServiceOperationQuery(
221
+ self, "EnsureSignoffStatusField", None, None, None, return_type
222
+ )
223
+ self.context.add_query(qry)
224
+ return return_type
225
+
266
226
  def get_all_rules(self):
267
227
  """Retrieves rules of a List"""
268
228
  return_type = ClientResult(self.context, ClientValueCollection(SPListRule))
@@ -392,25 +352,72 @@ class List(SecurableObject):
392
352
  return return_type
393
353
 
394
354
  @staticmethod
395
- def get_list_data_as_stream(context, list_full_url, parameters=None):
355
+ def get_list_data_as_stream(
356
+ context,
357
+ list_full_url,
358
+ parameters=None,
359
+ casc_del_warn_message=None,
360
+ custom_action=None,
361
+ drill_down=None,
362
+ field=None,
363
+ field_internal_name=None,
364
+ return_type=None,
365
+ ):
396
366
  """
397
367
  Returns list data from the specified list url and for the specified query parameters.
398
368
 
399
369
  :param office365.sharepoint.client_context.ClientContext context: Client context
400
370
  :param str list_full_url: The absolute URL of the list.
401
371
  :param RenderListDataParameters parameters: The parameters to be used.
402
- """
403
- result = ClientResult(context)
372
+ :param str casc_del_warn_message:
373
+ :param str custom_action:
374
+ :param str drill_down:
375
+ :param str field:
376
+ :param str field_internal_name:
377
+ :param ClientResult[dict] return_type: The return type.
378
+ """
379
+ if return_type is None:
380
+ return_type = ClientResult(context, dict())
404
381
  payload = {
405
382
  "listFullUrl": list_full_url,
406
383
  "parameters": parameters,
384
+ "CascDelWarnMessage": casc_del_warn_message,
385
+ "CustomAction": custom_action,
386
+ "DrillDown": drill_down,
387
+ "Field": field,
388
+ "FieldInternalName": field_internal_name,
407
389
  }
408
- target_list = context.web.get_list(list_full_url)
409
390
  qry = ServiceOperationQuery(
410
- target_list, "GetListDataAsStream", None, payload, None, result
391
+ List(context), "GetListDataAsStream", None, payload, None, return_type, True
411
392
  )
412
393
  context.add_query(qry)
413
- return result
394
+ return return_type
395
+
396
+ @staticmethod
397
+ def get_onedrive_list_data_as_stream(context, parameters=None, return_type=None):
398
+ """
399
+ Returns list data from the specified list url and for the specified query parameters.
400
+
401
+ :param office365.sharepoint.client_context.ClientContext context: Client context
402
+ :param RenderListDataParameters parameters: The parameters to be used.
403
+ :param ClientResult[dict] return_type: The return type.
404
+ """
405
+ if return_type is None:
406
+ return_type = ClientResult(context, dict())
407
+ payload = {
408
+ "parameters": parameters,
409
+ }
410
+ qry = ServiceOperationQuery(
411
+ List(context),
412
+ "GetOneDriveListDataAsStream",
413
+ None,
414
+ payload,
415
+ None,
416
+ return_type,
417
+ True,
418
+ )
419
+ context.add_query(qry)
420
+ return return_type
414
421
 
415
422
  def bulk_validate_update_list_items(
416
423
  self,
@@ -450,6 +457,7 @@ class List(SecurableObject):
450
457
 
451
458
  def get_lookup_field_choices(self, target_field_name, paging_info=None):
452
459
  """
460
+ Retrieves the possible choices or values for a lookup field in a SharePoint list
453
461
  :param str target_field_name:
454
462
  :param str paging_info:
455
463
  """
@@ -711,6 +719,31 @@ class List(SecurableObject):
711
719
  self.context.add_query(qry)
712
720
  return return_type
713
721
 
722
+ def render_list_data_as_stream(
723
+ self, view_xml=None, render_options=None, expand_groups=None
724
+ ):
725
+ """Returns the data for the specified query view.
726
+
727
+ :param str view_xml: Specifies the CAML view XML.
728
+ :param int render_options: Specifies the type of output to return.
729
+ :param bool expand_groups: Specifies whether to expand the grouping or not.
730
+ """
731
+ return_type = ClientResult(self.context, dict())
732
+ if view_xml is None:
733
+ view_xml = "<View/>"
734
+ payload = {
735
+ "parameters": RenderListDataParameters(
736
+ view_xml=view_xml,
737
+ render_options=render_options,
738
+ expand_groups=expand_groups,
739
+ ),
740
+ }
741
+ qry = ServiceOperationQuery(
742
+ self, "RenderListDataAsStream", None, payload, None, return_type
743
+ )
744
+ self.context.add_query(qry)
745
+ return return_type
746
+
714
747
  def reserve_list_item_id(self):
715
748
  # type: () -> ClientResult[int]
716
749
  """Reserves the returned list item identifier for the idempotent creation of a list item."""
@@ -751,6 +784,17 @@ class List(SecurableObject):
751
784
  self.context.add_query(qry)
752
785
  return return_type
753
786
 
787
+ def reset_doc_id(self):
788
+ """"""
789
+ from office365.sharepoint.documentmanagement.document_id import DocumentId
790
+
791
+ def _loaded():
792
+ doc_mng = DocumentId(self.context)
793
+ doc_mng.reset_doc_ids_in_library(self.root_folder.serverRelativeUrl)
794
+
795
+ self.ensure_property("RootFolder", _loaded)
796
+ return self
797
+
754
798
  @property
755
799
  def id(self):
756
800
  # type: () -> Optional[str]
@@ -1016,6 +1060,34 @@ class List(SecurableObject):
1016
1060
  """ """
1017
1061
  return self.properties.get("HasContentAssemblyTemplates", None)
1018
1062
 
1063
+ @property
1064
+ def has_external_data_source(self):
1065
+ # type: () -> Optional[bool]
1066
+ """
1067
+ Specifies whether the list is an external list.
1068
+ """
1069
+ return self.properties.get("HasExternalDataSource", None)
1070
+
1071
+ @property
1072
+ def has_folder_coloring_fields(self):
1073
+ # type: () -> Optional[bool]
1074
+ """ """
1075
+ return self.properties.get("HasFolderColoringFields", None)
1076
+
1077
+ @property
1078
+ def irm_enabled(self):
1079
+ # type: () -> Optional[bool]
1080
+ """Gets a Boolean value that specifies whether Information Rights Management (IRM) is enabled for the list."""
1081
+ return self.properties.get("IrmEnabled", None)
1082
+
1083
+ @property
1084
+ def irm_expire(self):
1085
+ # type: () -> Optional[bool]
1086
+ """Gets a Boolean value that specifies whether Information Rights Management (IRM) expiration is enabled
1087
+ for the list
1088
+ """
1089
+ return self.properties.get("IrmExpire", None)
1090
+
1019
1091
  @property
1020
1092
  def items(self):
1021
1093
  # type: () -> ListItemCollection
@@ -1128,6 +1200,16 @@ class List(SecurableObject):
1128
1200
  ),
1129
1201
  )
1130
1202
 
1203
+ @property
1204
+ def version_policies(self):
1205
+ """ """
1206
+ return self.properties.get(
1207
+ "VersionPolicies",
1208
+ VersionPolicyManager(
1209
+ self.context, ResourcePath("VersionPolicies", self.resource_path)
1210
+ ),
1211
+ )
1212
+
1131
1213
  @property
1132
1214
  def custom_action_elements(self):
1133
1215
  return self.properties.get(
@@ -1408,6 +1490,7 @@ class List(SecurableObject):
1408
1490
  "RootFolder": self.root_folder,
1409
1491
  "TitleResource": self.title_resource,
1410
1492
  "UserCustomActions": self.user_custom_actions,
1493
+ "VersionPolicies": self.version_policies,
1411
1494
  }
1412
1495
  default_value = property_mapping.get(name, None)
1413
1496
  return super(List, self).get_property(name, default_value)
@@ -1420,4 +1503,8 @@ class List(SecurableObject):
1420
1503
  self._resource_path = self.parent_collection.get_by_id(
1421
1504
  value
1422
1505
  ).resource_path
1506
+ elif name == "Url":
1507
+ self._resource_path = ServiceOperationPath(
1508
+ "getList", [value], self.context.web.resource_path
1509
+ )
1423
1510
  return self
@@ -1,6 +1,25 @@
1
1
  from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
+ class RenderListDataOptions:
5
+ """The type of data to return when rendering a list view as JSON."""
6
+
7
+ """Default render type."""
8
+ None_ = 0
9
+
10
+ """ Returns the list data context information. """
11
+ ContextInfo = 1
12
+
13
+ """ Returns the list data. """
14
+ ListData = 2
15
+
16
+ """ Returns the list schema. """
17
+ ListSchema = 4
18
+
19
+ """ Returns the menu view of the list. """
20
+ MenuView = 8
21
+
22
+
4
23
  class RenderListDataParameters(ClientValue):
5
24
  """Specifies the parameters to be used to render list data as a JSON string"""
6
25
 
@@ -16,6 +35,10 @@ class RenderListDataParameters(ClientValue):
16
35
  expand_groups=None,
17
36
  expand_user_field=None,
18
37
  filter_out_channel_folders_in_default_doc_lib=None,
38
+ render_options=None,
39
+ require_folder_coloring_fields=None,
40
+ show_stub_file=None,
41
+ view_xml=None,
19
42
  ):
20
43
  """
21
44
  :param bool add_all_fields:
@@ -29,6 +52,10 @@ class RenderListDataParameters(ClientValue):
29
52
  :param bool expand_groups: Specifies whether to expand the grouping or not.
30
53
  :param bool expand_user_field:
31
54
  :param bool filter_out_channel_folders_in_default_doc_lib:
55
+ :param int render_options: Specifies the type of output to return.
56
+ :param bool require_folder_coloring_fields:
57
+ :param bool show_stub_file:
58
+ :param str view_xml: Specifies the CAML view XML.
32
59
  """
33
60
  self.AddAllFields = add_all_fields
34
61
  self.AddAllViewFields = add_all_view_fields
@@ -44,6 +71,10 @@ class RenderListDataParameters(ClientValue):
44
71
  self.FilterOutChannelFoldersInDefaultDocLib = (
45
72
  filter_out_channel_folders_in_default_doc_lib
46
73
  )
74
+ self.RenderOptions = render_options
75
+ self.RequireFolderColoringFields = require_folder_coloring_fields
76
+ self.ShowStubFile = show_stub_file
77
+ self.ViewXml = view_xml
47
78
 
48
79
  @property
49
80
  def entity_type_name(self):
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class VersionPolicyManager(Entity):
5
+ """ """
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class CopyMigrationOptions(ClientValue):
5
+ """ """
@@ -4,6 +4,7 @@ from office365.runtime.http.http_method import HttpMethod
4
4
  from office365.runtime.http.request_options import RequestOptions
5
5
  from office365.runtime.paths.resource_path import ResourcePath
6
6
  from office365.runtime.queries.service_operation import ServiceOperationQuery
7
+ from office365.sharepoint.portal.channels.info_collection import ChannelInfoCollection
7
8
  from office365.sharepoint.portal.groups.creation_context import GroupCreationContext
8
9
  from office365.sharepoint.portal.groups.creation_information import (
9
10
  GroupCreationInformation,
@@ -15,12 +16,17 @@ from office365.sharepoint.portal.teams.recent_and_joined_response import (
15
16
 
16
17
 
17
18
  class GroupSiteManager(ClientObject):
19
+ """Management of Group Sites in SharePoint. Group Sites, also known as Microsoft 365 Groups,
20
+ provide collaboration spaces that integrate with various Microsoft 365 services like Teams, Outlook, and Planner.
21
+ """
22
+
18
23
  def __init__(self, context, resource_path=None):
19
24
  if resource_path is None:
20
25
  resource_path = ResourcePath("GroupSiteManager")
21
26
  super(GroupSiteManager, self).__init__(context, resource_path)
22
27
 
23
28
  def can_user_create_group(self):
29
+ """Determines if the current user can create group site"""
24
30
  return_type = ClientResult(self.context, bool())
25
31
  qry = ServiceOperationQuery(
26
32
  self, "CanUserCreateGroup", None, None, None, return_type
@@ -83,6 +89,7 @@ class GroupSiteManager(ClientObject):
83
89
  return self
84
90
 
85
91
  def ensure_team_for_group(self):
92
+ """ """
86
93
  return_type = ClientResult(self.context)
87
94
  qry = ServiceOperationQuery(
88
95
  self, "EnsureTeamForGroup", None, None, None, return_type
@@ -91,6 +98,7 @@ class GroupSiteManager(ClientObject):
91
98
  return return_type
92
99
 
93
100
  def get_group_creation_context(self):
101
+ """ """
94
102
  return_type = ClientResult(self.context, GroupCreationContext())
95
103
  qry = ServiceOperationQuery(
96
104
  self, "GetGroupCreationContext", None, None, None, return_type
@@ -131,6 +139,7 @@ class GroupSiteManager(ClientObject):
131
139
  return result
132
140
 
133
141
  def get_current_user_shared_channel_member_groups(self):
142
+ """ """
134
143
  return_type = ClientResult(self.context)
135
144
  qry = ServiceOperationQuery(
136
145
  self,
@@ -145,6 +154,8 @@ class GroupSiteManager(ClientObject):
145
154
 
146
155
  def get_team_channels(self, team_id, use_staging_endpoint=False):
147
156
  """
157
+ Retrieves the channels associated with a specific Microsoft 365 Group (or Team)
158
+
148
159
  :param str team_id:
149
160
  :param bool use_staging_endpoint:
150
161
  """
@@ -170,6 +181,21 @@ class GroupSiteManager(ClientObject):
170
181
  self.context.add_query(qry)
171
182
  return return_type
172
183
 
184
+ def get_team_channels_with_site_url(self, site_url):
185
+ """
186
+ Returns a list of team channels associated with a Microsoft 365 Group.
187
+ :param str site_url:
188
+ """
189
+ return_type = ClientResult(self.context, ChannelInfoCollection())
190
+ payload = {
191
+ "siteUrl": site_url,
192
+ }
193
+ qry = ServiceOperationQuery(
194
+ self, "GetTeamChannelsWithSiteUrl", None, payload, None, return_type
195
+ )
196
+ self.context.add_query(qry)
197
+ return return_type
198
+
173
199
  def notebook(self, group_id):
174
200
  """
175
201
  :param str group_id:
@@ -188,6 +214,8 @@ class GroupSiteManager(ClientObject):
188
214
  existing_joined_teams_data=None,
189
215
  ):
190
216
  """
217
+ Retrieves a list of teams that a user has recently accessed or joined
218
+
191
219
  :param bool include_recent:
192
220
  :param bool include_teams:
193
221
  :param bool include_pinned:
@@ -205,3 +233,7 @@ class GroupSiteManager(ClientObject):
205
233
  )
206
234
  self.context.add_query(qry)
207
235
  return return_type
236
+
237
+ @property
238
+ def entity_type_name(self):
239
+ return "Microsoft.SharePoint.Portal.GroupSiteManager"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class MyRecsCacheBlob(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Portal.Project.MyRecsCacheBlob"
@@ -0,0 +1,38 @@
1
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
2
+ from office365.sharepoint.entity import Entity
3
+ from office365.sharepoint.entity_collection import EntityCollection
4
+ from office365.sharepoint.portal.userprofiles.sharedwithme.document import (
5
+ SharedWithMeDocument,
6
+ )
7
+
8
+
9
+ class DocumentsSharedWithGroup(Entity):
10
+ """
11
+ Provides methods for working with a list that shares documents with a SharePoint Group on the user's personal site.
12
+ """
13
+
14
+ @staticmethod
15
+ def get_shared_with_group_docs(context, group_id=None):
16
+ """
17
+ Gets a shared documents for a group.
18
+
19
+ :param office365.sharepoint.client_context.ClientContext context: SharePoint context
20
+ :param str group_id:
21
+ """
22
+ return_type = EntityCollection(context, SharedWithMeDocument)
23
+ payload = {"groupId": group_id}
24
+ qry = ServiceOperationQuery(
25
+ DocumentsSharedWithGroup(context),
26
+ "GetSharedWithGroupDocs",
27
+ None,
28
+ payload,
29
+ None,
30
+ return_type,
31
+ True,
32
+ )
33
+ context.add_query(qry)
34
+ return return_type
35
+
36
+ @property
37
+ def entity_type_name(self):
38
+ return "Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithGroup"
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class DocumentsSharedWithPerson(Entity):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithPerson"
@@ -3,7 +3,7 @@ from typing import Optional
3
3
 
4
4
  from office365.runtime.client_value_collection import ClientValueCollection
5
5
  from office365.sharepoint.entity import Entity
6
- from office365.sharepoint.userprofiles.sharedwithme.document_user import (
6
+ from office365.sharepoint.portal.userprofiles.sharedwithme.document_user import (
7
7
  SharedWithMeDocumentUser,
8
8
  )
9
9
 
@@ -1,7 +1,9 @@
1
1
  from office365.runtime.queries.service_operation import ServiceOperationQuery
2
2
  from office365.sharepoint.entity import Entity
3
3
  from office365.sharepoint.entity_collection import EntityCollection
4
- from office365.sharepoint.userprofiles.sharedwithme.document import SharedWithMeDocument
4
+ from office365.sharepoint.portal.userprofiles.sharedwithme.document import (
5
+ SharedWithMeDocument,
6
+ )
5
7
 
6
8
 
7
9
  class SharedWithMeItems(Entity):
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SitePageCoAuthState(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "SP.Publishing.SitePageCoAuthState"
@@ -5,6 +5,7 @@ from office365.runtime.client_value import ClientValue
5
5
  from office365.runtime.paths.resource_path import ResourcePath
6
6
  from office365.runtime.queries.service_operation import ServiceOperationQuery
7
7
  from office365.runtime.types.collections import StringCollection
8
+ from office365.sharepoint.publishing.pages.coauth_state import SitePageCoAuthState
8
9
  from office365.sharepoint.publishing.pages.fields_data import SitePageFieldsData
9
10
  from office365.sharepoint.publishing.pages.metadata import SitePageMetadata
10
11
  from office365.sharepoint.translation.status_collection import (
@@ -135,6 +136,16 @@ class SitePage(SitePageMetadata):
135
136
  self.context.add_query(qry)
136
137
  return return_type
137
138
 
139
+ def save_page_co_auth(self, page_stream):
140
+ """ """
141
+ return_type = ClientResult(self.context, SitePageCoAuthState())
142
+ payload = {"pageStream": page_stream}
143
+ qry = ServiceOperationQuery(
144
+ self, "SavePageCoAuth", None, payload, None, return_type
145
+ )
146
+ self.context.add_query(qry)
147
+ return return_type
148
+
138
149
  def demote_from_news(self):
139
150
  """
140
151
  Updates the promoted state of the site page to 0. On success MUST return true.
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SitePageStreamContent(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "SP.Publishing.SitePageStreamContent"
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class SitePageStreamData(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "SP.Publishing.SitePageStreamData"
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class NonQuotaBackfillApi(Entity):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.QuotaManagement.Consumer.NonQuotaBackfillApi"
@@ -13,6 +13,9 @@ from office365.runtime.odata.v3.json_light_format import JsonLightFormat
13
13
 
14
14
  class SharePointRequest(ODataRequest):
15
15
  def __init__(self, base_url):
16
+ """
17
+ :param str base_url: Absolute Web or Site Url
18
+ """
16
19
  super().__init__(JsonLightFormat())
17
20
  self._auth_context = AuthenticationContext(url=base_url)
18
21
  self.beforeExecute += self._authenticate_request
@@ -1,7 +1,18 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
1
3
  from office365.sharepoint.entity import Entity
2
4
 
3
5
 
4
6
  class SiteContentProcessingInfoProvider(Entity):
7
+
8
+ def get_azure_container_token(self):
9
+ return_type = ClientResult(self.context, str())
10
+ qry = ServiceOperationQuery(
11
+ self, "GetAzureContainerToken", None, None, None, return_type
12
+ )
13
+ self.context.add_query(qry)
14
+ return return_type
15
+
5
16
  @property
6
17
  def entity_type_name(self):
7
18
  return "Microsoft.SharePoint.Client.Search.Administration.SiteContentProcessingInfoProvider"
@@ -28,6 +28,7 @@ class RankingLabeling(Entity):
28
28
  return self
29
29
 
30
30
  def normalize_result_url(self, url):
31
+ # type: (str) -> ClientResult[str]
31
32
  """
32
33
  A URL string after normalization. The input and output URL strings MUST resolve to the same document.
33
34