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.
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/METADATA +1 -1
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/RECORD +135 -78
- office365/booking/business/business.py +13 -0
- office365/booking/business/collection.py +8 -4
- office365/communications/callrecords/collection.py +42 -0
- office365/communications/callrecords/direct_routing_log_row.py +5 -0
- office365/communications/cloud_communications.py +2 -3
- office365/directory/applications/application.py +16 -2
- office365/directory/applications/required_resource_access.py +23 -0
- office365/directory/applications/resource_access.py +26 -0
- office365/directory/authentication/methods/details.py +29 -0
- office365/directory/authentication/methods/root.py +8 -0
- office365/directory/permissions/scope.py +15 -3
- office365/directory/policies/authentication_strength.py +21 -0
- office365/directory/policies/update_allowed_combinations_result.py +5 -0
- office365/directory/security/alerts/evidence.py +2 -1
- office365/directory/security/alerts/malware_evidence.py +5 -0
- office365/directory/security/alerts/process_evidence.py +5 -0
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/attacksimulations/user_coverage.py +3 -0
- office365/directory/security/attacksimulations/users/details.py +6 -1
- office365/directory/serviceprincipals/service_principal.py +86 -37
- office365/onedrive/driveitems/driveItem.py +1 -1
- office365/onedrive/driveitems/retention_label.py +33 -0
- office365/onedrive/driveitems/retention_label_settings.py +7 -0
- office365/onedrive/sitepages/base.py +3 -0
- office365/onedrive/sitepages/collection.py +12 -0
- office365/onedrive/sitepages/site_page.py +9 -9
- office365/onedrive/sites/archival_details.py +5 -0
- office365/onedrive/sites/site_collection.py +10 -1
- office365/onedrive/workbooks/functions/functions.py +23 -0
- office365/partners/billing/__init__.py +0 -0
- office365/planner/tasks/check_list_item.py +5 -1
- office365/runtime/client_object.py +15 -7
- office365/runtime/client_object_collection.py +2 -2
- office365/runtime/client_result.py +2 -0
- office365/runtime/client_value.py +1 -1
- office365/runtime/csom/request.py +11 -0
- office365/runtime/types/exceptions.py +18 -0
- office365/search/acronym.py +10 -0
- office365/search/aggregation_option.py +6 -0
- office365/search/answer.py +9 -0
- office365/search/entity.py +67 -14
- office365/search/entity_type.py +28 -0
- office365/search/request.py +32 -3
- office365/sharepoint/apps/access_requests.py +5 -0
- office365/sharepoint/apps/management/__init__.py +0 -0
- office365/sharepoint/apps/management/principal_info.py +9 -0
- office365/sharepoint/authpolicy/events/collection.py +28 -0
- office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +4 -0
- office365/sharepoint/documentmanagement/document_id.py +28 -3
- office365/sharepoint/files/file.py +11 -4
- office365/sharepoint/files/versions/event.py +9 -0
- office365/sharepoint/flows/permissions.py +30 -0
- office365/sharepoint/listhome/favorite_item.py +9 -0
- office365/sharepoint/listitems/listitem.py +79 -4
- office365/sharepoint/listitems/update_parameters.py +4 -1
- office365/sharepoint/lists/data_parameters.py +5 -0
- office365/sharepoint/lists/exporter.py +73 -0
- office365/sharepoint/lists/list.py +148 -61
- office365/sharepoint/lists/render_data_parameters.py +31 -0
- office365/sharepoint/lists/version_policy_manager.py +5 -0
- office365/sharepoint/migration/copy_migration_options.py +5 -0
- office365/sharepoint/portal/groups/site_manager.py +32 -0
- office365/sharepoint/portal/project/__init__.py +9 -0
- office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
- office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
- office365/sharepoint/publishing/pages/coauth_state.py +8 -0
- office365/sharepoint/publishing/pages/page.py +11 -0
- office365/sharepoint/publishing/pages/stream_content.py +9 -0
- office365/sharepoint/publishing/pages/stream_data.py +8 -0
- office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
- office365/sharepoint/request.py +3 -0
- office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
- office365/sharepoint/search/ranking_labeling.py +1 -0
- office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/item.py +5 -0
- office365/sharepoint/search/reports/noresult/__init__.py +0 -0
- office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/top_queries.py +7 -0
- office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/topqueries/data.py +9 -0
- office365/sharepoint/search/reports/topqueries/item.py +15 -0
- office365/sharepoint/search/scs_endpoint.py +9 -0
- office365/sharepoint/securestore/target_application.py +8 -0
- office365/sharepoint/sharing/document_manager.py +3 -3
- office365/sharepoint/sharing/result.py +21 -0
- office365/sharepoint/sites/html_field_security_setting.py +5 -0
- office365/sharepoint/sites/site.py +30 -1
- office365/sharepoint/sites/version_policy_manager.py +25 -0
- office365/sharepoint/sitescripts/metadata.py +28 -3
- office365/sharepoint/sitescripts/utility.py +17 -0
- office365/sharepoint/smartcache/__init__.py +0 -0
- office365/sharepoint/smartcache/item.py +9 -0
- office365/sharepoint/tenant/administration/app_billing_properties.py +21 -0
- office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
- office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
- office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
- office365/sharepoint/tenant/administration/internal/{permission_grant.py → appservice/permission_request.py} +4 -2
- office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
- office365/sharepoint/tenant/administration/settings_service.py +4 -1
- office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
- office365/sharepoint/tenant/administration/tenant.py +110 -4
- office365/sharepoint/tenant/administration/types.py +13 -1
- office365/sharepoint/tenant/cdn_api.py +3 -1
- office365/sharepoint/tenant/management/office365_tenant.py +2 -0
- office365/sharepoint/tenant/settings.py +10 -0
- office365/sharepoint/utilities/utility.py +6 -0
- office365/sharepoint/viva/connections_page.py +8 -0
- office365/sharepoint/viva/dashboard_configuration.py +8 -0
- office365/sharepoint/viva/employee_engagement.py +39 -1
- office365/sharepoint/viva/resource_get_endpoint.py +8 -0
- office365/sharepoint/viva/resource_link.py +8 -0
- office365/sharepoint/webs/information.py +66 -1
- office365/sharepoint/webs/regional_settings.py +32 -0
- office365/sharepoint/webs/templates/__init__.py +0 -0
- office365/sharepoint/webs/time_zone.py +1 -1
- office365/sharepoint/webs/web.py +58 -0
- office365/sharepoint/workflow/task.py +5 -0
- office365/subscriptions/collection.py +16 -0
- office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
- office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/top_level.txt +0 -0
- /office365/{sharepoint/userprofiles/sharedwithme → partners}/__init__.py +0 -0
- /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
|
@@ -19,6 +19,9 @@ from office365.sharepoint.lists.render_override_parameters import (
|
|
|
19
19
|
from office365.sharepoint.publishing.portal_health_status import PortalHealthStatus
|
|
20
20
|
from office365.sharepoint.sites.home_sites_details import HomeSitesDetails
|
|
21
21
|
from office365.sharepoint.sites.site import Site
|
|
22
|
+
from office365.sharepoint.tenant.administration.app_billing_properties import (
|
|
23
|
+
SPOAppBillingProperties,
|
|
24
|
+
)
|
|
22
25
|
from office365.sharepoint.tenant.administration.collaboration.insights_data import (
|
|
23
26
|
CollaborationInsightsData,
|
|
24
27
|
)
|
|
@@ -88,8 +91,28 @@ class Tenant(Entity):
|
|
|
88
91
|
)
|
|
89
92
|
super(Tenant, self).__init__(context, static_path)
|
|
90
93
|
|
|
94
|
+
def accept_syntex_repository_terms_of_service(self):
|
|
95
|
+
"""
|
|
96
|
+
Used to accept the Microsoft Syntex repository terms of service for your organization.
|
|
97
|
+
This acceptance is often necessary for enabling features related to document processing or repositories
|
|
98
|
+
in Microsoft Syntex.
|
|
99
|
+
"""
|
|
100
|
+
qry = ServiceOperationQuery(self, "AcceptSyntexRepositoryTermsOfService")
|
|
101
|
+
self.context.add_query(qry)
|
|
102
|
+
return self
|
|
103
|
+
|
|
104
|
+
def activate_application_billing_policy(self, billing_policy_id):
|
|
105
|
+
""" """
|
|
106
|
+
payload = {"billingPolicyId": billing_policy_id}
|
|
107
|
+
return_type = ClientResult(self.context, SPOAppBillingProperties())
|
|
108
|
+
qry = ServiceOperationQuery(
|
|
109
|
+
self, "ActivateApplicationBillingPolicy", None, payload, None, return_type
|
|
110
|
+
)
|
|
111
|
+
self.context.add_query(qry)
|
|
112
|
+
return return_type
|
|
113
|
+
|
|
91
114
|
def add_recent_admin_action_report(self):
|
|
92
|
-
""""""
|
|
115
|
+
"""Logs recent administrative actions within a SharePoint Online tenant"""
|
|
93
116
|
return_type = ClientResult(self.context, RecentAdminActionReport())
|
|
94
117
|
payload = {"payload": RecentAdminActionReportPayload()}
|
|
95
118
|
qry = ServiceOperationQuery(
|
|
@@ -121,6 +144,9 @@ class Tenant(Entity):
|
|
|
121
144
|
|
|
122
145
|
def delete_policy_definition(self, item_id):
|
|
123
146
|
"""
|
|
147
|
+
Deletes a policy definition from a Microsoft 365 tenant.
|
|
148
|
+
Policy definitions may refer to specific settings related to compliance, security,
|
|
149
|
+
or site governance (such as site or group creation policies).
|
|
124
150
|
:param int item_id:
|
|
125
151
|
"""
|
|
126
152
|
qry = ServiceOperationQuery(
|
|
@@ -140,6 +166,7 @@ class Tenant(Entity):
|
|
|
140
166
|
return self
|
|
141
167
|
|
|
142
168
|
def get_spo_tenant_all_web_templates(self):
|
|
169
|
+
""" """
|
|
143
170
|
return_type = SPOTenantWebTemplateCollection(self.context)
|
|
144
171
|
qry = ServiceOperationQuery(
|
|
145
172
|
self, "GetSPOTenantAllWebTemplates", None, None, None, return_type
|
|
@@ -148,6 +175,7 @@ class Tenant(Entity):
|
|
|
148
175
|
return return_type
|
|
149
176
|
|
|
150
177
|
def get_onedrive_site_sharing_insights(self, query_mode):
|
|
178
|
+
"""Retrieves insights or reports related to OneDrive for Business site sharing activities"""
|
|
151
179
|
return_type = ClientResult(self.context, OneDriveSiteSharingInsights())
|
|
152
180
|
payload = {"queryMode": query_mode}
|
|
153
181
|
qry = ServiceOperationQuery(
|
|
@@ -229,6 +257,7 @@ class Tenant(Entity):
|
|
|
229
257
|
|
|
230
258
|
def get_home_sites(self):
|
|
231
259
|
# type: () -> ClientResult[ClientValueCollection[HomeSitesDetails]]
|
|
260
|
+
"""Retrieves the Home Site that has been designated for your Microsoft 365 tenant."""
|
|
232
261
|
return_type = ClientResult(
|
|
233
262
|
self.context,
|
|
234
263
|
ClientValueCollection(HomeSitesDetails), # pylint: disable=E1120
|
|
@@ -238,6 +267,7 @@ class Tenant(Entity):
|
|
|
238
267
|
return return_type
|
|
239
268
|
|
|
240
269
|
def get_home_sites_details(self):
|
|
270
|
+
"""Retrieves detailed information about the Home Sites configured in a SharePoint Online tenant."""
|
|
241
271
|
return_type = ClientResult(
|
|
242
272
|
self.context, ClientValueCollection(HomeSitesDetails)
|
|
243
273
|
)
|
|
@@ -267,12 +297,23 @@ class Tenant(Entity):
|
|
|
267
297
|
self.context.add_query(qry)
|
|
268
298
|
return return_type
|
|
269
299
|
|
|
270
|
-
def export_to_csv(
|
|
300
|
+
def export_to_csv(
|
|
301
|
+
self, view_xml=None, time_zone_id=None, columns_info=None, list_name=None
|
|
302
|
+
):
|
|
271
303
|
"""
|
|
304
|
+
Exports tenant-level data to a CSV file.
|
|
272
305
|
:param str view_xml:
|
|
306
|
+
:param int time_zone_id:
|
|
307
|
+
:param list columns_info:
|
|
308
|
+
:param str list_name:
|
|
273
309
|
"""
|
|
274
310
|
return_type = ClientResult(self.context)
|
|
275
|
-
payload = {
|
|
311
|
+
payload = {
|
|
312
|
+
"viewXml": view_xml,
|
|
313
|
+
"timeZoneId": time_zone_id,
|
|
314
|
+
"columnsInfo": columns_info,
|
|
315
|
+
"listName": list_name,
|
|
316
|
+
}
|
|
276
317
|
qry = ServiceOperationQuery(
|
|
277
318
|
self, "ExportToCSV", None, payload, None, return_type
|
|
278
319
|
)
|
|
@@ -334,6 +375,16 @@ class Tenant(Entity):
|
|
|
334
375
|
self.context.add_query(qry)
|
|
335
376
|
return return_type
|
|
336
377
|
|
|
378
|
+
def get_ransomware_events_overview(self):
|
|
379
|
+
# type: () -> ClientResult[AnyStr]
|
|
380
|
+
""" """
|
|
381
|
+
return_type = ClientResult(self.context)
|
|
382
|
+
qry = ServiceOperationQuery(
|
|
383
|
+
self, "GetRansomwareEventsOverview", None, None, None, return_type
|
|
384
|
+
)
|
|
385
|
+
self.context.add_query(qry)
|
|
386
|
+
return return_type
|
|
387
|
+
|
|
337
388
|
def get_sp_list_item_count(self, list_name):
|
|
338
389
|
# type: (str) -> ClientResult[int]
|
|
339
390
|
""" """
|
|
@@ -659,9 +710,23 @@ class Tenant(Entity):
|
|
|
659
710
|
self.context.add_query(qry)
|
|
660
711
|
return return_type
|
|
661
712
|
|
|
713
|
+
def get_billing_policy_id_for_app(self, application_id):
|
|
714
|
+
""" """
|
|
715
|
+
return_type = ClientResult(self.context)
|
|
716
|
+
payload = {"applicationId": application_id}
|
|
717
|
+
qry = ServiceOperationQuery(
|
|
718
|
+
self, "GetBillingPolicyIdForApp", None, payload, None, return_type
|
|
719
|
+
)
|
|
720
|
+
self.context.add_query(qry)
|
|
721
|
+
return return_type
|
|
722
|
+
|
|
662
723
|
def connect_site_to_hub_site_by_id(self, site_url, hub_site_id):
|
|
663
724
|
# type: (str, str) -> Self
|
|
664
|
-
"""Connects Site to Hub Site
|
|
725
|
+
"""Connects Site to Hub Site
|
|
726
|
+
|
|
727
|
+
:param str site_url:
|
|
728
|
+
:param str hub_site_id:
|
|
729
|
+
"""
|
|
665
730
|
params = {"siteUrl": site_url, "hubSiteId": hub_site_id}
|
|
666
731
|
qry = ServiceOperationQuery(
|
|
667
732
|
self, "ConnectSiteToHubSiteById", None, params, None, None
|
|
@@ -669,6 +734,12 @@ class Tenant(Entity):
|
|
|
669
734
|
self.context.add_query(qry)
|
|
670
735
|
return self
|
|
671
736
|
|
|
737
|
+
def ensure_brand_center_feature(self):
|
|
738
|
+
"""Ensures that the Brand Center feature is enabled"""
|
|
739
|
+
qry = ServiceOperationQuery(self, "EnsureBrandCenterFeature")
|
|
740
|
+
self.context.add_query(qry)
|
|
741
|
+
return self
|
|
742
|
+
|
|
672
743
|
def send_email(self, site_url):
|
|
673
744
|
# type: (str) -> ClientResult[bool]
|
|
674
745
|
""" """
|
|
@@ -749,6 +820,41 @@ class Tenant(Entity):
|
|
|
749
820
|
""""""
|
|
750
821
|
return self.properties.get("DefaultContentCenterSite", SiteInfoForSitePicker())
|
|
751
822
|
|
|
823
|
+
@property
|
|
824
|
+
def no_access_redirect_url(self):
|
|
825
|
+
# type: () -> Optional[bool]
|
|
826
|
+
"""Specifies the URL of the redirected site for those site collections which have the locked state "NoAccess"""
|
|
827
|
+
return self.properties.get("NoAccessRedirectUrl", None)
|
|
828
|
+
|
|
829
|
+
@property
|
|
830
|
+
def notifications_in_share_point_enabled(self):
|
|
831
|
+
# type: () -> Optional[bool]
|
|
832
|
+
"""Enables or disables notifications in SharePoint."""
|
|
833
|
+
return self.properties.get("NotificationsInSharePointEnabled", None)
|
|
834
|
+
|
|
835
|
+
@property
|
|
836
|
+
def notify_owners_when_invitations_accepted(self):
|
|
837
|
+
# type: () -> Optional[bool]
|
|
838
|
+
"""When this parameter is set to true and when an external user accepts an invitation to a resource
|
|
839
|
+
in a user's OneDrive for Business, the OneDrive for Business owner is notified by e-mail.
|
|
840
|
+
"""
|
|
841
|
+
return self.properties.get("NotifyOwnersWhenInvitationsAccepted", None)
|
|
842
|
+
|
|
843
|
+
@property
|
|
844
|
+
def one_drive_storage_quota(self):
|
|
845
|
+
# type: () -> Optional[int]
|
|
846
|
+
"""Gets a default OneDrive for Business storage quota for the tenant. It will be used for new OneDrive
|
|
847
|
+
for Business sites created."""
|
|
848
|
+
return self.properties.get("OneDriveStorageQuota", None)
|
|
849
|
+
|
|
850
|
+
@property
|
|
851
|
+
def notify_owners_when_items_reshared(self):
|
|
852
|
+
# type: () -> Optional[bool]
|
|
853
|
+
"""When is set to true and another user re-shares a document from a
|
|
854
|
+
user's OneDrive for Business, the OneDrive for Business owner is notified by e-mail.
|
|
855
|
+
"""
|
|
856
|
+
return self.properties.get("NotifyOwnersWhenItemsReshared", None)
|
|
857
|
+
|
|
752
858
|
@property
|
|
753
859
|
def root_site_url(self):
|
|
754
860
|
# type: () -> Optional[str]
|
|
@@ -6,16 +6,28 @@ class DisableGroupify(ClientValue):
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class AutoQuotaEnabled(ClientValue):
|
|
9
|
-
""" """
|
|
9
|
+
"""Automatic quota management type"""
|
|
10
10
|
|
|
11
11
|
def __init__(self, is_read_only=None, value=None):
|
|
12
12
|
self.IsReadOnly = is_read_only
|
|
13
13
|
self.Value = value
|
|
14
14
|
|
|
15
|
+
@property
|
|
16
|
+
def entity_type_name(self):
|
|
17
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.AutoQuotaEnabled"
|
|
18
|
+
|
|
15
19
|
|
|
16
20
|
class CreatePolicyRequest(ClientValue):
|
|
17
21
|
""" """
|
|
18
22
|
|
|
19
23
|
def __init__(self, is_preview_run=None, policy_custom_name=None):
|
|
24
|
+
"""
|
|
25
|
+
:param bool is_preview_run:
|
|
26
|
+
:param str policy_custom_name:
|
|
27
|
+
"""
|
|
20
28
|
self.isPreviewRun = is_preview_run
|
|
21
29
|
self.policyCustomName = policy_custom_name
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def entity_type_name(self):
|
|
33
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.CreatePolicyRequest"
|
|
@@ -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.paths.resource_path import ResourcePath
|
|
4
5
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
5
6
|
from office365.sharepoint.entity import Entity
|
|
@@ -16,6 +17,15 @@ class TenantSettings(Entity):
|
|
|
16
17
|
self.context.add_query(qry)
|
|
17
18
|
return self
|
|
18
19
|
|
|
20
|
+
def get_data_access_governance_report_config(self):
|
|
21
|
+
""" """
|
|
22
|
+
return_type = ClientResult(self.context, str())
|
|
23
|
+
qry = ServiceOperationQuery(
|
|
24
|
+
self, "GetDataAccessGovernanceReportConfig", None, None, None, return_type
|
|
25
|
+
)
|
|
26
|
+
self.context.add_query(qry)
|
|
27
|
+
return return_type
|
|
28
|
+
|
|
19
29
|
def set_corporate_catalog(self, url):
|
|
20
30
|
"""
|
|
21
31
|
:param str url:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_result import ClientResult
|
|
2
4
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
3
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -8,6 +10,9 @@ from office365.sharepoint.files.file import File
|
|
|
8
10
|
from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
|
|
9
11
|
from office365.sharepoint.utilities.principal_info import PrincipalInfo
|
|
10
12
|
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from office365.sharepoint.client_context import ClientContext
|
|
15
|
+
|
|
11
16
|
|
|
12
17
|
class Utility(Entity):
|
|
13
18
|
"""
|
|
@@ -161,6 +166,7 @@ class Utility(Entity):
|
|
|
161
166
|
|
|
162
167
|
@staticmethod
|
|
163
168
|
def log_custom_app_error(context, error):
|
|
169
|
+
# type: (ClientContext, str) -> ClientResult[int]
|
|
164
170
|
"""
|
|
165
171
|
Logs an error from a SharePoint Add-in. The return value indicates the success or failure of this operation.
|
|
166
172
|
These errors are of interest to administrators who monitor such apps (2).
|
|
@@ -4,6 +4,8 @@ from office365.runtime.queries.function import FunctionQuery
|
|
|
4
4
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
5
5
|
from office365.sharepoint.entity import Entity
|
|
6
6
|
from office365.sharepoint.viva.app_configuration import AppConfiguration
|
|
7
|
+
from office365.sharepoint.viva.connections_page import VivaConnectionsPage
|
|
8
|
+
from office365.sharepoint.viva.dashboard_configuration import DashboardConfiguration
|
|
7
9
|
from office365.sharepoint.viva.home import VivaHome
|
|
8
10
|
|
|
9
11
|
|
|
@@ -18,13 +20,31 @@ class EmployeeEngagement(Entity):
|
|
|
18
20
|
:param str override_language_code:
|
|
19
21
|
"""
|
|
20
22
|
return_type = ClientResult(self.context, str())
|
|
21
|
-
payload = {"
|
|
23
|
+
payload = {"override_language_code": override_language_code}
|
|
22
24
|
qry = ServiceOperationQuery(
|
|
23
25
|
self, "DashboardContent", None, payload, None, return_type
|
|
24
26
|
)
|
|
25
27
|
self.context.add_query(qry)
|
|
26
28
|
return return_type
|
|
27
29
|
|
|
30
|
+
def full_dashboard_content(
|
|
31
|
+
self, canvas_as_json=None, include_personalization_data=None
|
|
32
|
+
):
|
|
33
|
+
"""
|
|
34
|
+
:param bool canvas_as_json:
|
|
35
|
+
:param bool include_personalization_data:
|
|
36
|
+
"""
|
|
37
|
+
return_type = ClientResult(self.context, DashboardConfiguration())
|
|
38
|
+
payload = {
|
|
39
|
+
"canvasAsJson": canvas_as_json,
|
|
40
|
+
"includePersonalizationData": include_personalization_data,
|
|
41
|
+
}
|
|
42
|
+
qry = ServiceOperationQuery(
|
|
43
|
+
self, "FullDashboardContent", None, payload, None, return_type
|
|
44
|
+
)
|
|
45
|
+
self.context.add_query(qry)
|
|
46
|
+
return return_type
|
|
47
|
+
|
|
28
48
|
def viva_home_configuration(self):
|
|
29
49
|
return_type = ClientResult(self.context, {})
|
|
30
50
|
qry = FunctionQuery(self, "VivaHomeConfiguration", None, return_type)
|
|
@@ -45,3 +65,21 @@ class EmployeeEngagement(Entity):
|
|
|
45
65
|
self.context, ResourcePath("AppConfiguration", self.resource_path)
|
|
46
66
|
),
|
|
47
67
|
)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def viva_connections_page(self):
|
|
71
|
+
return self.properties.get(
|
|
72
|
+
"VivaConnectionsPage",
|
|
73
|
+
VivaConnectionsPage(
|
|
74
|
+
self.context, ResourcePath("VivaConnectionsPage", self.resource_path)
|
|
75
|
+
),
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def get_property(self, name, default_value=None):
|
|
79
|
+
if default_value is None:
|
|
80
|
+
property_mapping = {
|
|
81
|
+
"AppConfiguration": self.app_configuration,
|
|
82
|
+
"VivaConnectionsPage": self.viva_connections_page,
|
|
83
|
+
}
|
|
84
|
+
default_value = property_mapping.get(name, None)
|
|
85
|
+
return super(EmployeeEngagement, self).get_property(name, default_value)
|
|
@@ -1,7 +1,72 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
1
4
|
from office365.sharepoint.entity import Entity
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
class WebInformation(Entity):
|
|
5
8
|
"""Specifies metadata about a site"""
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
def __repr__(self):
|
|
11
|
+
return self.server_relative_url or self.entity_type_name
|
|
12
|
+
|
|
13
|
+
@property
|
|
14
|
+
def configuration(self):
|
|
15
|
+
# type: () -> Optional[str]
|
|
16
|
+
"""Specifies the identifier (ID) of the site definition configuration that was used to create the site"""
|
|
17
|
+
return self.properties.get("Configuration", None)
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def created(self):
|
|
21
|
+
# type: () -> Optional[datetime]
|
|
22
|
+
"""Specifies when the site (2) was created."""
|
|
23
|
+
return self.properties.get("Created", datetime.min)
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def description(self):
|
|
27
|
+
# type: () -> Optional[str]
|
|
28
|
+
"""Specifies the description for the site"""
|
|
29
|
+
return self.properties.get("Description", None)
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def id(self):
|
|
33
|
+
# type: () -> Optional[str]
|
|
34
|
+
"""Specifies the site identifier for the site"""
|
|
35
|
+
return self.properties.get("Id", None)
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def language(self):
|
|
39
|
+
# type: () -> Optional[int]
|
|
40
|
+
"""Specifies the language code identifier (LCID) for the language that is used on the site"""
|
|
41
|
+
return self.properties.get("Language", None)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def last_item_modified_date(self):
|
|
45
|
+
# type: () -> Optional[datetime]
|
|
46
|
+
"""Gets the date and time that an item was last modified in the site by a non-system update.
|
|
47
|
+
A non-system update is a change to a list item that is visible to end users."""
|
|
48
|
+
return self.properties.get("LastItemModifiedDate", datetime.min)
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def server_relative_url(self):
|
|
52
|
+
# type: () -> Optional[str]
|
|
53
|
+
"""Specifies the server-relative URL of the site"""
|
|
54
|
+
return self.properties.get("ServerRelativeUrl", None)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def title(self):
|
|
58
|
+
# type: () -> Optional[str]
|
|
59
|
+
"""Specifies the title for the site. Its length MUST be equal to or less than 255."""
|
|
60
|
+
return self.properties.get("Title", None)
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def web_template(self):
|
|
64
|
+
# type: () -> Optional[str]
|
|
65
|
+
"""Specifies the name of the site template that was used to create the site."""
|
|
66
|
+
return self.properties.get("WebTemplate", None)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def web_template_id(self):
|
|
70
|
+
# type: () -> Optional[int]
|
|
71
|
+
"""Specifies the identifier of the site template that was used to create the site"""
|
|
72
|
+
return self.properties.get("WebTemplateId", None)
|
|
@@ -108,6 +108,38 @@ class RegionalSettings(Entity):
|
|
|
108
108
|
""" """
|
|
109
109
|
return self.properties.get("NegativeSign", None)
|
|
110
110
|
|
|
111
|
+
@property
|
|
112
|
+
def neg_number_mode(self):
|
|
113
|
+
# type: () -> Optional[int]
|
|
114
|
+
"""Specifies the negative number mode that is used for displaying negative numbers in calculated fields
|
|
115
|
+
based on the locale of the server."""
|
|
116
|
+
return self.properties.get("NegNumberMode", None)
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def pm(self):
|
|
120
|
+
# type: () -> Optional[str]
|
|
121
|
+
"""Specifies the string that is used to represent time after noon on the site"""
|
|
122
|
+
return self.properties.get("PM", None)
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def positive_sign(self):
|
|
126
|
+
# type: () -> Optional[str]
|
|
127
|
+
"""Specifies the symbol that is used to represent a positive number on the site"""
|
|
128
|
+
return self.properties.get("PositiveSign", None)
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def show_weeks(self):
|
|
132
|
+
# type: () -> Optional[bool]
|
|
133
|
+
"""Specifies whether to display the week number in day or week views of a calendar."""
|
|
134
|
+
return self.properties.get("ShowWeeks", None)
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def thousand_separator(self):
|
|
138
|
+
# type: () -> Optional[str]
|
|
139
|
+
"""Specifies the symbol that is used to separate thousands for numbers on the site. For example,
|
|
140
|
+
if the symbol is "," the number 123456789 would appear as "123,456,789"."""
|
|
141
|
+
return self.properties.get("ThousandSeparator", None)
|
|
142
|
+
|
|
111
143
|
@property
|
|
112
144
|
def work_days(self):
|
|
113
145
|
# type: () -> Optional[int]
|
|
File without changes
|
|
@@ -44,7 +44,7 @@ class TimeZone(Entity):
|
|
|
44
44
|
return self.properties.get("Information", TimeZoneInformation())
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
class TimeZoneCollection(EntityCollection):
|
|
47
|
+
class TimeZoneCollection(EntityCollection[TimeZone]):
|
|
48
48
|
"""TimeZone collection"""
|
|
49
49
|
|
|
50
50
|
def __init__(self, context, resource_path=None):
|
office365/sharepoint/webs/web.py
CHANGED
|
@@ -6,6 +6,7 @@ from office365.runtime.client_result import ClientResult
|
|
|
6
6
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
7
7
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
8
8
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
9
|
+
from office365.runtime.queries.client_query import ClientQuery
|
|
9
10
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
10
11
|
from office365.runtime.types.collections import StringCollection
|
|
11
12
|
from office365.sharepoint.activities.entity import SPActivityEntity
|
|
@@ -51,6 +52,7 @@ from office365.sharepoint.lists.document_library_information import (
|
|
|
51
52
|
)
|
|
52
53
|
from office365.sharepoint.lists.get_parameters import GetListsParameters
|
|
53
54
|
from office365.sharepoint.lists.list import List
|
|
55
|
+
from office365.sharepoint.lists.render_data_parameters import RenderListDataParameters
|
|
54
56
|
from office365.sharepoint.lists.template_collection import ListTemplateCollection
|
|
55
57
|
from office365.sharepoint.lists.template_type import ListTemplateType
|
|
56
58
|
from office365.sharepoint.marketplace.corporatecuratedgallery.available_addins_response import (
|
|
@@ -159,6 +161,7 @@ class Web(SecurableObject):
|
|
|
159
161
|
return return_type
|
|
160
162
|
|
|
161
163
|
def add_cross_farm_message(self, message):
|
|
164
|
+
# type: (str) -> ClientResult[bool]
|
|
162
165
|
"""
|
|
163
166
|
:param str message:
|
|
164
167
|
"""
|
|
@@ -170,6 +173,30 @@ class Web(SecurableObject):
|
|
|
170
173
|
self.context.add_query(qry)
|
|
171
174
|
return return_type
|
|
172
175
|
|
|
176
|
+
def get_access_request_list(self):
|
|
177
|
+
""" """
|
|
178
|
+
return_type = List(self.context)
|
|
179
|
+
self.lists.add_child(return_type)
|
|
180
|
+
|
|
181
|
+
def _get_access_request_list():
|
|
182
|
+
return_type.set_property("Url", self.access_request_list_url)
|
|
183
|
+
|
|
184
|
+
self.ensure_properties(["AccessRequestListUrl"], _get_access_request_list)
|
|
185
|
+
return return_type
|
|
186
|
+
|
|
187
|
+
def get_document_by_doc_id(self, doc_id):
|
|
188
|
+
""" """
|
|
189
|
+
return_type = ClientResult(self.context)
|
|
190
|
+
qry = ClientQuery(self.context, return_type=return_type)
|
|
191
|
+
|
|
192
|
+
def _construct_request(request):
|
|
193
|
+
request.url = "{0}/_layouts/15/DocIdRedir.aspx?ID={1}".format(
|
|
194
|
+
self.context.base_url, doc_id
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
self.context.add_query(qry).before_query_execute(_construct_request)
|
|
198
|
+
return return_type
|
|
199
|
+
|
|
173
200
|
def get_site_script(
|
|
174
201
|
self,
|
|
175
202
|
include_branding=True,
|
|
@@ -211,6 +238,35 @@ class Web(SecurableObject):
|
|
|
211
238
|
self.context.add_query(qry)
|
|
212
239
|
return return_type
|
|
213
240
|
|
|
241
|
+
def get_list_data_as_stream(self, path, view_xml=None):
|
|
242
|
+
"""Returns list data from the specified list url and for the specified query parameters.
|
|
243
|
+
|
|
244
|
+
:param str path: A string that contains the site-relative URL for a list, for example, /Lists/Announcements.
|
|
245
|
+
:param str view_xml:
|
|
246
|
+
"""
|
|
247
|
+
if view_xml is None:
|
|
248
|
+
view_xml = "<View><Query></Query></View>"
|
|
249
|
+
return_type = ClientResult(self.context, dict())
|
|
250
|
+
|
|
251
|
+
def _get_list_data_as_stream():
|
|
252
|
+
list_abs_url = self.url + path
|
|
253
|
+
parameters = RenderListDataParameters(view_xml=view_xml)
|
|
254
|
+
List.get_list_data_as_stream(
|
|
255
|
+
self.context, list_abs_url, parameters, return_type=return_type
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
self.ensure_property("Url", _get_list_data_as_stream)
|
|
259
|
+
return return_type
|
|
260
|
+
|
|
261
|
+
def get_onedrive_list_data_as_stream(self, view_xml=None):
|
|
262
|
+
"""Returns list data from the specified list url and for the specified query parameters.
|
|
263
|
+
|
|
264
|
+
:param str view_xml:
|
|
265
|
+
"""
|
|
266
|
+
if view_xml is None:
|
|
267
|
+
view_xml = "<View><Query></Query></View>"
|
|
268
|
+
return List.get_onedrive_list_data_as_stream(self.context, view_xml)
|
|
269
|
+
|
|
214
270
|
def get_list_operation(self, list_id, operation_id):
|
|
215
271
|
# type: (str, str) -> SPLargeOperation
|
|
216
272
|
""" """
|
|
@@ -1262,6 +1318,7 @@ class Web(SecurableObject):
|
|
|
1262
1318
|
display_format=DateTimeFieldFormatType.DateTime,
|
|
1263
1319
|
calendar_type=CalendarType.None_,
|
|
1264
1320
|
):
|
|
1321
|
+
# type: (str, int, int) -> ClientResult[str]
|
|
1265
1322
|
"""
|
|
1266
1323
|
Returns parsed DateTime value.
|
|
1267
1324
|
|
|
@@ -1932,6 +1989,7 @@ class Web(SecurableObject):
|
|
|
1932
1989
|
@property
|
|
1933
1990
|
def access_request_list_url(self):
|
|
1934
1991
|
# type: () -> Optional[str]
|
|
1992
|
+
"""Gets the URL of the access request list to the current site"""
|
|
1935
1993
|
return self.properties.get("AccessRequestListUrl", None)
|
|
1936
1994
|
|
|
1937
1995
|
@property
|