Office365-REST-Python-Client 2.5.12__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 (201) hide show
  1. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/RECORD +199 -107
  3. office365/backuprestore/root.py +39 -0
  4. office365/backuprestore/service_status.py +5 -0
  5. office365/booking/business/business.py +13 -0
  6. office365/booking/business/collection.py +8 -4
  7. office365/booking/solutions/root.py +14 -1
  8. office365/communications/callrecords/collection.py +42 -0
  9. office365/communications/callrecords/direct_routing_log_row.py +5 -0
  10. office365/communications/cloud_communications.py +2 -3
  11. office365/directory/applications/application.py +33 -2
  12. office365/directory/applications/optional_claim.py +5 -0
  13. office365/directory/applications/optional_claims.py +16 -0
  14. office365/directory/applications/required_resource_access.py +23 -0
  15. office365/directory/applications/resource_access.py +26 -0
  16. office365/directory/authentication/conditions/event_listener.py +9 -0
  17. office365/directory/authentication/methods/details.py +29 -0
  18. office365/directory/authentication/methods/root.py +8 -0
  19. office365/directory/device_local_credential_info.py +21 -0
  20. office365/directory/identities/container.py +18 -0
  21. office365/directory/permissions/scope.py +15 -3
  22. office365/directory/policies/authentication_flows.py +8 -0
  23. office365/directory/policies/authentication_strength.py +21 -0
  24. office365/directory/policies/root.py +17 -0
  25. office365/directory/policies/unified_role_management.py +7 -0
  26. office365/directory/policies/update_allowed_combinations_result.py +5 -0
  27. office365/directory/protection/policy/__init__.py +0 -0
  28. office365/directory/protection/policy/base.py +24 -0
  29. office365/directory/protection/policy/one_drive_for_business.py +10 -0
  30. office365/directory/security/alerts/evidence.py +2 -1
  31. office365/directory/security/alerts/malware_evidence.py +5 -0
  32. office365/directory/security/alerts/process_evidence.py +5 -0
  33. office365/directory/security/attacksimulations/user.py +5 -0
  34. office365/directory/security/attacksimulations/user_coverage.py +3 -0
  35. office365/directory/security/attacksimulations/users/details.py +12 -0
  36. office365/directory/serviceprincipals/service_principal.py +118 -18
  37. office365/directory/users/user.py +23 -3
  38. office365/graph_client.py +3 -1
  39. office365/intune/devices/management/management.py +26 -0
  40. office365/intune/devices/management/terms_and_conditions.py +10 -0
  41. office365/intune/devices/management/virtual_endpoint.py +8 -0
  42. office365/onedrive/driveitems/driveItem.py +1 -1
  43. office365/onedrive/driveitems/retention_label.py +33 -0
  44. office365/onedrive/driveitems/retention_label_settings.py +7 -0
  45. office365/onedrive/sitepages/base.py +3 -0
  46. office365/onedrive/sitepages/collection.py +12 -0
  47. office365/onedrive/sitepages/site_page.py +9 -9
  48. office365/onedrive/sites/archival_details.py +5 -0
  49. office365/onedrive/sites/site_collection.py +10 -1
  50. office365/onedrive/workbooks/functions/functions.py +23 -0
  51. office365/partners/__init__.py +0 -0
  52. office365/partners/billing/__init__.py +0 -0
  53. office365/planner/tasks/check_list_item.py +5 -1
  54. office365/runtime/client_object.py +24 -8
  55. office365/runtime/client_object_collection.py +4 -4
  56. office365/runtime/client_result.py +21 -2
  57. office365/runtime/client_value.py +1 -1
  58. office365/runtime/csom/request.py +11 -0
  59. office365/runtime/odata/v4/batch_request.py +12 -15
  60. office365/runtime/types/exceptions.py +18 -0
  61. office365/search/acronym.py +10 -0
  62. office365/search/aggregation_option.py +6 -0
  63. office365/search/answer.py +9 -0
  64. office365/search/entity.py +67 -14
  65. office365/search/entity_type.py +28 -0
  66. office365/search/request.py +32 -3
  67. office365/sharepoint/apps/access_requests.py +5 -0
  68. office365/sharepoint/apps/context_site.py +41 -0
  69. office365/sharepoint/apps/management/__init__.py +0 -0
  70. office365/sharepoint/apps/management/principal_info.py +9 -0
  71. office365/sharepoint/authpolicy/events/collection.py +39 -0
  72. office365/sharepoint/authpolicy/events/{auth_event.py → event.py} +1 -0
  73. office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +9 -0
  74. office365/sharepoint/brandcenter/__init__.py +0 -0
  75. office365/sharepoint/brandcenter/brand_center.py +9 -0
  76. office365/sharepoint/brandcenter/configuration.py +5 -0
  77. office365/sharepoint/changes/change.py +1 -3
  78. office365/sharepoint/changes/collection.py +3 -0
  79. office365/sharepoint/changes/folder.py +6 -0
  80. office365/sharepoint/changes/group.py +3 -0
  81. office365/sharepoint/changes/list.py +13 -0
  82. office365/sharepoint/changes/view.py +25 -0
  83. office365/sharepoint/client_context.py +19 -1
  84. office365/sharepoint/contenttypes/fieldlinks/collection.py +3 -0
  85. office365/sharepoint/copilot/__init__.py +0 -0
  86. office365/sharepoint/copilot/file_collection.py +27 -0
  87. office365/sharepoint/copilot/file_collection_query_result.py +10 -0
  88. office365/sharepoint/copilot/list_item_extensions.py +5 -0
  89. office365/sharepoint/directory/provider/alternate_id_data.py +5 -0
  90. office365/sharepoint/directory/provider/notification.py +8 -0
  91. office365/sharepoint/directory/provider/object_changes.py +5 -0
  92. office365/sharepoint/directory/provider/object_data.py +26 -3
  93. office365/sharepoint/directory/provider/provider.py +1 -0
  94. office365/sharepoint/directory/provider/session_data.py +9 -0
  95. office365/sharepoint/documentmanagement/document_id.py +28 -3
  96. office365/sharepoint/files/file.py +11 -4
  97. office365/sharepoint/files/versions/event.py +9 -0
  98. office365/sharepoint/flows/permissions.py +30 -0
  99. office365/sharepoint/listhome/favorite_item.py +9 -0
  100. office365/sharepoint/listitems/listitem.py +79 -4
  101. office365/sharepoint/listitems/update_parameters.py +4 -1
  102. office365/sharepoint/lists/data_parameters.py +5 -0
  103. office365/sharepoint/lists/exporter.py +73 -0
  104. office365/sharepoint/lists/list.py +157 -7
  105. office365/sharepoint/lists/render_data_parameters.py +31 -0
  106. office365/sharepoint/lists/version_policy_manager.py +5 -0
  107. office365/sharepoint/logger/log_export.py +2 -0
  108. office365/sharepoint/migration/copy_migration_options.py +5 -0
  109. office365/sharepoint/migrationcenter/service/performance/data.py +5 -5
  110. office365/sharepoint/multigeo/services.py +24 -0
  111. office365/sharepoint/navigation/menu_node.py +43 -1
  112. office365/sharepoint/navigation/node_collection.py +1 -1
  113. office365/sharepoint/oauth/token.py +22 -0
  114. office365/sharepoint/oauth/token_response.py +5 -0
  115. office365/sharepoint/portal/groups/site_manager.py +32 -0
  116. office365/sharepoint/portal/project/__init__.py +9 -0
  117. office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
  118. office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
  119. office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
  120. office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
  121. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
  122. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
  123. office365/sharepoint/publishing/pages/campaign_publication.py +10 -0
  124. office365/sharepoint/publishing/pages/coauth_state.py +8 -0
  125. office365/sharepoint/publishing/pages/page.py +11 -0
  126. office365/sharepoint/publishing/pages/stream_content.py +9 -0
  127. office365/sharepoint/publishing/pages/stream_data.py +8 -0
  128. office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
  129. office365/sharepoint/request.py +3 -0
  130. office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
  131. office365/sharepoint/search/ranking_labeling.py +1 -0
  132. office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
  133. office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
  134. office365/sharepoint/search/reports/abandonedqueries/item.py +5 -0
  135. office365/sharepoint/search/reports/noresult/__init__.py +0 -0
  136. office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
  137. office365/sharepoint/search/reports/top_queries.py +7 -0
  138. office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
  139. office365/sharepoint/search/reports/topqueries/data.py +9 -0
  140. office365/sharepoint/search/reports/topqueries/item.py +15 -0
  141. office365/sharepoint/search/scs_endpoint.py +9 -0
  142. office365/sharepoint/securestore/target_application.py +10 -0
  143. office365/sharepoint/sharing/document_manager.py +3 -3
  144. office365/sharepoint/sharing/inherited_from.py +5 -0
  145. office365/sharepoint/sharing/internal/__init__.py +0 -0
  146. office365/sharepoint/sharing/internal/sharing_restrictions.py +22 -0
  147. office365/sharepoint/sharing/internal/types.py +17 -0
  148. office365/sharepoint/sharing/link_info.py +24 -0
  149. office365/sharepoint/sharing/result.py +21 -0
  150. office365/sharepoint/sites/html_field_security_setting.py +5 -0
  151. office365/sharepoint/sites/site.py +39 -1
  152. office365/sharepoint/sites/version_policy_manager.py +33 -0
  153. office365/sharepoint/sitescripts/metadata.py +28 -3
  154. office365/sharepoint/sitescripts/utility.py +17 -0
  155. office365/sharepoint/smartcache/__init__.py +0 -0
  156. office365/sharepoint/smartcache/item.py +9 -0
  157. office365/sharepoint/tenant/administration/app_billing_properties.py +21 -0
  158. office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
  159. office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
  160. office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
  161. office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
  162. office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
  163. office365/sharepoint/tenant/administration/internal/{permission_grant.py → appservice/permission_request.py} +4 -2
  164. office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
  165. office365/sharepoint/tenant/administration/policies/__init__.py +0 -0
  166. office365/sharepoint/tenant/administration/policies/definition.py +5 -0
  167. office365/sharepoint/tenant/administration/settings_service.py +12 -1
  168. office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
  169. office365/sharepoint/tenant/administration/sites/properties.py +45 -0
  170. office365/sharepoint/tenant/administration/tenant.py +124 -4
  171. office365/sharepoint/tenant/administration/types.py +29 -1
  172. office365/sharepoint/tenant/cdn_api.py +3 -1
  173. office365/sharepoint/tenant/management/office365_tenant.py +2 -0
  174. office365/sharepoint/tenant/settings.py +10 -0
  175. office365/sharepoint/utilities/utility.py +6 -0
  176. office365/sharepoint/utilities/wopi_host.py +45 -0
  177. office365/sharepoint/viva/connections_page.py +8 -0
  178. office365/sharepoint/viva/dashboard_configuration.py +8 -0
  179. office365/sharepoint/viva/employee_engagement.py +39 -1
  180. office365/sharepoint/viva/resource_get_endpoint.py +8 -0
  181. office365/sharepoint/viva/resource_link.py +8 -0
  182. office365/sharepoint/webs/information.py +66 -1
  183. office365/sharepoint/webs/regional_settings.py +38 -0
  184. office365/sharepoint/webs/templates/__init__.py +0 -0
  185. office365/sharepoint/webs/time_zone.py +1 -1
  186. office365/sharepoint/webs/web.py +114 -0
  187. office365/sharepoint/workflow/definition.py +5 -0
  188. office365/sharepoint/workflow/task.py +5 -0
  189. office365/sharepoint/workflowservices/deployment_service.py +23 -0
  190. office365/subscriptions/collection.py +16 -0
  191. office365/teams/members/settings.py +2 -2
  192. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
  193. office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
  194. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/LICENSE +0 -0
  195. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/WHEEL +0 -0
  196. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/top_level.txt +0 -0
  197. /office365/{sharepoint/userprofiles/sharedwithme → backuprestore}/__init__.py +0 -0
  198. /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
  199. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
  200. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
  201. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
@@ -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):
@@ -1,5 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
+ from office365.runtime.client_result import ClientResult
3
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
5
  from office365.sharepoint.publishing.highlights_info import HighlightsInfo
5
6
  from office365.sharepoint.publishing.pages.page import SitePage
@@ -15,6 +16,15 @@ class CampaignPublication(SitePage):
15
16
  self.context.add_query(qry)
16
17
  return return_type
17
18
 
19
+ def send_test_email(self):
20
+ """ """
21
+ return_type = ClientResult(self.context)
22
+ qry = ServiceOperationQuery(
23
+ self, "SendTestEmail", None, None, None, return_type
24
+ )
25
+ self.context.add_query(qry)
26
+ return return_type
27
+
18
28
  @property
19
29
  def email_endpoint(self):
20
30
  # type: () -> Optional[str]
@@ -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
 
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ReportAbandonedQueriesItem(ClientValue):
5
+ pass
@@ -1,7 +1,14 @@
1
+ from office365.runtime.client_value_collection import ClientValueCollection
1
2
  from office365.sharepoint.search.reports.base import ReportBase
3
+ from office365.sharepoint.search.reports.topqueries.item import ReportTopQueriesItem
2
4
 
3
5
 
4
6
  class ReportTopQueries(ReportBase):
7
+
8
+ def __init__(self, reports=None):
9
+ super(ReportTopQueries, self).__init__()
10
+ self.Reports = ClientValueCollection(ReportTopQueriesItem, reports)
11
+
5
12
  @property
6
13
  def entity_type_name(self):
7
14
  return "Microsoft.Office.Server.Search.REST.ReportTopQueries"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ReportTopQueriesData(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Office.Server.Search.REST.ReportTopQueriesData"
@@ -0,0 +1,15 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.search.reports.topqueries.data import ReportTopQueriesData
4
+
5
+
6
+ class ReportTopQueriesItem(ClientValue):
7
+ """ """
8
+
9
+ def __init__(self, date=None, report=None):
10
+ self.Date = date
11
+ self.Report = ClientValueCollection(ReportTopQueriesData, report)
12
+
13
+ @property
14
+ def entity_type_name(self):
15
+ return "Microsoft.Office.Server.Search.REST.ReportTopQueriesItem"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ScsEndpoint(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Office.Server.Search.REST.ScsEndpoint"
@@ -1,4 +1,7 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+ from office365.sharepoint.client_context import ClientContext
2
5
  from office365.sharepoint.entity import Entity
3
6
 
4
7
 
@@ -10,6 +13,7 @@ class TargetApplication(Entity):
10
13
 
11
14
  @staticmethod
12
15
  def create(context, application_id, friendly_name):
16
+ # type: (ClientContext, str, str) -> "TargetApplication"
13
17
  """
14
18
  Creates a target application
15
19
 
@@ -25,6 +29,12 @@ class TargetApplication(Entity):
25
29
  context.add_query(qry)
26
30
  return return_type
27
31
 
32
+ @property
33
+ def application_id(self):
34
+ # type: () -> Optional[str]
35
+ """"""
36
+ return self.properties.get("ApplicationId", None)
37
+
28
38
  @property
29
39
  def entity_type_name(self):
30
40
  return "Microsoft.Office.SecureStoreService.Server.TargetApplication"
@@ -3,11 +3,11 @@ from office365.runtime.client_value_collection import ClientValueCollection
3
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
4
  from office365.sharepoint.entity import Entity
5
5
  from office365.sharepoint.permissions.roles.definitions.definition import RoleDefinition
6
- from office365.sharepoint.sharing.user_role_assignment import UserRoleAssignment
7
- from office365.sharepoint.sharing.user_sharing_result import UserSharingResult
8
- from office365.sharepoint.userprofiles.sharedwithme.view_item_removal_result import (
6
+ from office365.sharepoint.portal.userprofiles.sharedwithme.view_item_removal_result import (
9
7
  SharedWithMeViewItemRemovalResult,
10
8
  )
9
+ from office365.sharepoint.sharing.user_role_assignment import UserRoleAssignment
10
+ from office365.sharepoint.sharing.user_sharing_result import UserSharingResult
11
11
 
12
12
 
13
13
  class DocumentSharingManager(Entity):
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class InheritedFrom(ClientValue):
5
+ """ """
File without changes
@@ -0,0 +1,22 @@
1
+ from office365.runtime.paths.resource_path import ResourcePath
2
+ from office365.sharepoint.entity import Entity
3
+ from office365.sharepoint.sharing.internal.types import CAnonymousLinkUseLimit
4
+
5
+
6
+ class SharingRestrictions(Entity):
7
+ """ """
8
+
9
+ def __init__(self, context):
10
+ static_path = ResourcePath(
11
+ "Microsoft.SharePoint.Sharing.Internal.SharingRestrictions"
12
+ )
13
+ super(SharingRestrictions, self).__init__(context, static_path)
14
+
15
+ @property
16
+ def anonymous_link_use_limit(self):
17
+ return self.properties.get("anonymousLinkUseLimit", CAnonymousLinkUseLimit())
18
+
19
+ @property
20
+ def entity_type_name(self):
21
+ # type: () -> str
22
+ return "Microsoft.SharePoint.Sharing.Internal.SharingRestrictions"
@@ -0,0 +1,17 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class CAnonymousLinkUseLimit(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ # type: () -> str
9
+ return "Microsoft.SharePoint.Sharing.Internal.CAnonymousLinkUseLimit"
10
+
11
+
12
+ class CExternalSharingEnforcement(ClientValue):
13
+
14
+ @property
15
+ def entity_type_name(self):
16
+ # type: () -> str
17
+ return "Microsoft.SharePoint.Sharing.Internal.CExternalSharingEnforcement"
@@ -1,6 +1,30 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.sharing.inherited_from import InheritedFrom
4
+ from office365.sharepoint.sharing.links.info import SharingLinkInfo
5
+ from office365.sharepoint.sharing.principal import Principal
2
6
 
3
7
 
4
8
  class LinkInfo(ClientValue):
5
9
  """This class provides metadata for the tokenized sharing link including settings details, inheritance status,
6
10
  and an optional array of members."""
11
+
12
+ def __init__(
13
+ self,
14
+ inherited_from=InheritedFrom(),
15
+ is_inherited=None,
16
+ link_details=SharingLinkInfo(),
17
+ link_members=None,
18
+ link_status=None,
19
+ total_link_members_count=None,
20
+ ):
21
+ """
22
+ :param bool is_inherited: Boolean that indicates if the tokenized sharing link is present due to
23
+ inherited permissions from a parent object.
24
+ """
25
+ self.inherited_from = inherited_from
26
+ self.isInherited = is_inherited
27
+ self.linkDetails = link_details
28
+ self.linkMembers = ClientValueCollection(Principal, link_members)
29
+ self.linkStatus = link_status
30
+ self.totalLinkMembersCount = total_link_members_count
@@ -4,6 +4,8 @@ from office365.runtime.client_value_collection import ClientValueCollection
4
4
  from office365.runtime.paths.resource_path import ResourcePath
5
5
  from office365.sharepoint.entity import Entity
6
6
  from office365.sharepoint.principal.groups.collection import GroupCollection
7
+ from office365.sharepoint.principal.groups.group import Group
8
+ from office365.sharepoint.principal.users.collection import UserCollection
7
9
  from office365.sharepoint.sharing.invitation.creation_result import (
8
10
  SPInvitationCreationResult,
9
11
  )
@@ -78,6 +80,23 @@ class SharingResult(Entity):
78
80
  ),
79
81
  )
80
82
 
83
+ @property
84
+ def group_users_added_to(self):
85
+ return self.properties.get(
86
+ "GroupUsersAddedTo",
87
+ Group(self.context, ResourcePath("GroupUsersAddedTo", self.resource_path)),
88
+ )
89
+
90
+ @property
91
+ def users_with_access_requests(self):
92
+ return self.properties.get(
93
+ "UsersWithAccessRequests",
94
+ UserCollection(
95
+ self.context,
96
+ ResourcePath("UsersWithAccessRequests", self.resource_path),
97
+ ),
98
+ )
99
+
81
100
  @property
82
101
  def users_added_to_group(self):
83
102
  # type: () -> ClientValueCollection[UserSharingResult]
@@ -90,8 +109,10 @@ class SharingResult(Entity):
90
109
  if default_value is None:
91
110
  property_mapping = {
92
111
  "GroupsSharedWith": self.groups_shared_with,
112
+ "GroupUsersAddedTo": self.group_users_added_to,
93
113
  "UsersAddedToGroup": self.users_added_to_group,
94
114
  "UniquelyPermissionedUsers": self.uniquely_permissioned_users,
115
+ "UsersWithAccessRequests": self.users_with_access_requests,
95
116
  }
96
117
  default_value = property_mapping.get(name, None)
97
118
  return super(SharingResult, self).get_property(name, default_value)
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class HTMLFieldSecuritySetting(ClientValue):
5
+ """ """
@@ -27,6 +27,9 @@ from office365.sharepoint.sitehealth.summary import SiteHealthSummary
27
27
  from office365.sharepoint.sites.azure_container_Info import (
28
28
  ProvisionedTemporaryAzureContainerInfo,
29
29
  )
30
+ from office365.sharepoint.sites.html_field_security_setting import (
31
+ HTMLFieldSecuritySetting,
32
+ )
30
33
  from office365.sharepoint.sites.sph_site import SPHSite
31
34
  from office365.sharepoint.sites.upgrade_info import UpgradeInfo
32
35
  from office365.sharepoint.sites.usage_info import UsageInfo
@@ -132,6 +135,15 @@ class Site(Entity):
132
135
  self.ensure_property("Url", _site_loaded)
133
136
  return return_type
134
137
 
138
+ def get_block_download_policy_for_files_data(self):
139
+ """ """
140
+ return_type = ClientResult(self.context, str())
141
+ qry = ServiceOperationQuery(
142
+ self, "GetBlockDownloadPolicyForFilesData", None, None, None, return_type
143
+ )
144
+ self.context.add_query(qry)
145
+ return return_type
146
+
135
147
  def get_migration_status(self):
136
148
  """"""
137
149
  return_type = EntityCollection(self.context, SPMigrationJobStatus)
@@ -495,7 +507,7 @@ class Site(Entity):
495
507
  @property
496
508
  def allowed_external_domains(self):
497
509
  # type: () -> Optional[bool]
498
- return self.properties.get("AllowedExternalDomains", None)
510
+ return self.properties.get("AllowedExternalDomains", HTMLFieldSecuritySetting())
499
511
 
500
512
  @property
501
513
  def allow_master_page_editing(self):
@@ -565,6 +577,32 @@ class Site(Entity):
565
577
  """Gets the current change token that is used in the change log for the site collection."""
566
578
  return self.properties.get("CurrentChangeToken", ChangeToken())
567
579
 
580
+ @property
581
+ def disable_flows(self):
582
+ # type: () -> Optional[bool]
583
+ """"""
584
+ return self.properties.get("DisableFlows", None)
585
+
586
+ @property
587
+ def external_sharing_tips_enabled(self):
588
+ # type: () -> Optional[bool]
589
+ """Gets a Boolean value that specifies whether users will be greeted with a notification bar telling them that
590
+ the site can be shared with external users. The value is true if the notification bar is enabled; otherwise,
591
+ it is false."""
592
+ return self.properties.get("ExternalSharingTipsEnabled", None)
593
+
594
+ @property
595
+ def external_user_expiration_in_days(self):
596
+ # type: () -> Optional[int]
597
+ """"""
598
+ return self.properties.get("ExternalUserExpirationInDays", None)
599
+
600
+ @property
601
+ def geo_location(self):
602
+ # type: () -> Optional[str]
603
+ """"""
604
+ return self.properties.get("GeoLocation", None)
605
+
568
606
  @property
569
607
  def group_id(self):
570
608
  # type: () -> Optional[str]
@@ -1,12 +1,45 @@
1
+ from typing import Optional
2
+
3
+ from office365.runtime.paths.resource_path import ResourcePath
1
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
2
5
  from office365.sharepoint.entity import Entity
6
+ from office365.sharepoint.lists.version_policy_manager import VersionPolicyManager
3
7
 
4
8
 
5
9
  class SiteVersionPolicyManager(Entity):
6
10
  """"""
7
11
 
12
+ @property
13
+ def major_version_limit(self):
14
+ # type: () -> Optional[int]
15
+ """ """
16
+ return self.properties.get("MajorVersionLimit", None)
17
+
18
+ @property
19
+ def version_policies(self):
20
+ return self.properties.get(
21
+ "VersionPolicies",
22
+ VersionPolicyManager(
23
+ self.context, ResourcePath("VersionPolicies", self.resource_path)
24
+ ),
25
+ )
26
+
27
+ def inherit_tenant_settings(self):
28
+ """ """
29
+ qry = ServiceOperationQuery(self, "InheritTenantSettings")
30
+ self.context.add_query(qry)
31
+ return self
32
+
8
33
  def set_auto_expiration(self):
9
34
  """"""
10
35
  qry = ServiceOperationQuery(self, "SetAutoExpiration")
11
36
  self.context.add_query(qry)
12
37
  return self
38
+
39
+ def get_property(self, name, default_value=None):
40
+ if default_value is None:
41
+ property_mapping = {
42
+ "VersionPolicies": self.version_policies,
43
+ }
44
+ default_value = property_mapping.get(name, None)
45
+ return super(SiteVersionPolicyManager, self).get_property(name, default_value)
@@ -2,11 +2,36 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class SiteScriptMetadata(ClientValue):
5
- def __init__(self, _id=None, content=None, description=None):
5
+ """Represents metadata about a SharePoint site script in the SharePoint framework.
6
+ Site scripts are used to automate the provisioning of SharePoint sites by defining actions like
7
+ applying a theme, adding lists, and configuring site settings."""
8
+
9
+ def __init__(
10
+ self,
11
+ id_=None,
12
+ content=None,
13
+ description=None,
14
+ is_site_script_package=None,
15
+ title=None,
16
+ version=None,
17
+ ):
6
18
  """
7
- :param str content:
19
+ :param str id_: unique identifier (GUID) for the site script. This is used to uniquely identify the script
20
+ within SharePoint.
21
+ :param str content: The actual JSON content of the site script. This contains the actions that the script
22
+ will execute when applied to a SharePoint site.
8
23
  :param str description:
24
+ :param bool is_site_script_package:
25
+ :param str title:
26
+ :param int version:
9
27
  """
10
- self.Id = _id
28
+ self.Id = id_
11
29
  self.Content = content
12
30
  self.Description = description
31
+ self.IsSiteScriptPackage = is_site_script_package
32
+ self.Title = title
33
+ self.Version = version
34
+
35
+ @property
36
+ def entity_type_name(self):
37
+ return "Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptMetadata"
@@ -42,6 +42,23 @@ class SiteScriptUtility(Entity):
42
42
  context.add_query(qry)
43
43
  return return_type
44
44
 
45
+ @staticmethod
46
+ def get_list_designs(context, store=None):
47
+ """
48
+ Gets a list designs.
49
+
50
+ :param office365.sharepoint.client_context.ClientContext context: SharePoint context
51
+ :param str store:
52
+ """
53
+ return_type = ClientResult(context, SiteDesignMetadata())
54
+ utility = SiteScriptUtility(context)
55
+ payload = {"store": store}
56
+ qry = ServiceOperationQuery(
57
+ utility, "GetListDesigns", None, payload, None, return_type, True
58
+ )
59
+ context.add_query(qry)
60
+ return return_type
61
+
45
62
  @staticmethod
46
63
  def add_site_design_task(context, web_url, site_design_id):
47
64
  """
File without changes
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class SmartCacheItem(Entity):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.SmartCache.SmartCacheItem"