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
|
File without changes
|
|
File without changes
|
|
@@ -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"
|
|
File without changes
|
|
@@ -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"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
4
|
from office365.sharepoint.client_context import ClientContext
|
|
3
5
|
from office365.sharepoint.entity import Entity
|
|
@@ -27,6 +29,12 @@ class TargetApplication(Entity):
|
|
|
27
29
|
context.add_query(qry)
|
|
28
30
|
return return_type
|
|
29
31
|
|
|
32
|
+
@property
|
|
33
|
+
def application_id(self):
|
|
34
|
+
# type: () -> Optional[str]
|
|
35
|
+
""""""
|
|
36
|
+
return self.properties.get("ApplicationId", None)
|
|
37
|
+
|
|
30
38
|
@property
|
|
31
39
|
def entity_type_name(self):
|
|
32
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.
|
|
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):
|
|
@@ -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)
|
|
@@ -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
|
|
@@ -504,7 +507,7 @@ class Site(Entity):
|
|
|
504
507
|
@property
|
|
505
508
|
def allowed_external_domains(self):
|
|
506
509
|
# type: () -> Optional[bool]
|
|
507
|
-
return self.properties.get("AllowedExternalDomains",
|
|
510
|
+
return self.properties.get("AllowedExternalDomains", HTMLFieldSecuritySetting())
|
|
508
511
|
|
|
509
512
|
@property
|
|
510
513
|
def allow_master_page_editing(self):
|
|
@@ -574,6 +577,32 @@ class Site(Entity):
|
|
|
574
577
|
"""Gets the current change token that is used in the change log for the site collection."""
|
|
575
578
|
return self.properties.get("CurrentChangeToken", ChangeToken())
|
|
576
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
|
+
|
|
577
606
|
@property
|
|
578
607
|
def group_id(self):
|
|
579
608
|
# type: () -> Optional[str]
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
3
4
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
4
5
|
from office365.sharepoint.entity import Entity
|
|
6
|
+
from office365.sharepoint.lists.version_policy_manager import VersionPolicyManager
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class SiteVersionPolicyManager(Entity):
|
|
@@ -13,8 +15,31 @@ class SiteVersionPolicyManager(Entity):
|
|
|
13
15
|
""" """
|
|
14
16
|
return self.properties.get("MajorVersionLimit", None)
|
|
15
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
|
+
|
|
16
33
|
def set_auto_expiration(self):
|
|
17
34
|
""""""
|
|
18
35
|
qry = ServiceOperationQuery(self, "SetAutoExpiration")
|
|
19
36
|
self.context.add_query(qry)
|
|
20
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
|
-
|
|
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
|
|
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 =
|
|
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,21 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SPOAppBillingProperties(ClientValue):
|
|
5
|
+
""" """
|
|
6
|
+
|
|
7
|
+
def __init__(self, application_id=None, azure_region=None, is_activated=None):
|
|
8
|
+
"""
|
|
9
|
+
:param str application_id: The application ID.
|
|
10
|
+
:param str azure_region: The Azure region.
|
|
11
|
+
:param bool is_activated:
|
|
12
|
+
"""
|
|
13
|
+
self.ApplicationId = application_id
|
|
14
|
+
self.AzureRegion = azure_region
|
|
15
|
+
self.IsActivated = is_activated
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def entity_type_name(self):
|
|
19
|
+
return (
|
|
20
|
+
"Microsoft.Online.SharePoint.TenantAdministration.SPOAppBillingProperties"
|
|
21
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from typing_extensions import Self
|
|
2
|
+
|
|
3
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
4
|
+
from office365.sharepoint.entity import Entity
|
|
5
|
+
from office365.sharepoint.entity_collection import EntityCollection
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SPO3rdPartyAADPermissionGrant(Entity):
|
|
9
|
+
@property
|
|
10
|
+
def entity_type_name(self):
|
|
11
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPO3rdPartyAADPermissionGrant"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SPO3rdPartyAADPermissionGrantCollection(
|
|
15
|
+
EntityCollection[SPO3rdPartyAADPermissionGrant]
|
|
16
|
+
):
|
|
17
|
+
|
|
18
|
+
def __init__(self, context, resource_path=None):
|
|
19
|
+
super(SPO3rdPartyAADPermissionGrantCollection, self).__init__(
|
|
20
|
+
context, SPO3rdPartyAADPermissionGrant, resource_path
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
def add(self, service_principal_id, resource, scope):
|
|
24
|
+
# type: (str, str, str) -> Self
|
|
25
|
+
payload = {
|
|
26
|
+
"servicePrincipalId": service_principal_id,
|
|
27
|
+
"resource": resource,
|
|
28
|
+
"scope": scope,
|
|
29
|
+
}
|
|
30
|
+
qry = ServiceOperationQuery(self, "Add", None, payload)
|
|
31
|
+
self.context.add_query(qry)
|
|
32
|
+
return self
|
|
File without changes
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from office365.sharepoint.entity import Entity
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class SPOWebAppServicePrincipalPermissionRequest(Entity):
|
|
5
|
+
""" """
|
|
6
|
+
|
|
5
7
|
@property
|
|
6
8
|
def entity_type_name(self):
|
|
7
|
-
return "Microsoft.Online.SharePoint.TenantAdministration.Internal.
|
|
9
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
5
|
+
from office365.runtime.types.collections import StringCollection
|
|
6
|
+
from office365.sharepoint.entity import Entity
|
|
7
|
+
from office365.sharepoint.entity_collection import EntityCollection
|
|
8
|
+
from office365.sharepoint.tenant.administration.internal.aad.permission_grant import (
|
|
9
|
+
SPO3rdPartyAADPermissionGrantCollection,
|
|
10
|
+
)
|
|
11
|
+
from office365.sharepoint.tenant.administration.internal.appservice.permission_grant import (
|
|
12
|
+
SPOWebAppServicePrincipalPermissionGrant,
|
|
13
|
+
)
|
|
14
|
+
from office365.sharepoint.tenant.administration.internal.appservice.permission_request import (
|
|
15
|
+
SPOWebAppServicePrincipalPermissionRequest,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class SPOWebAppServicePrincipal(Entity):
|
|
20
|
+
def __init__(self, context):
|
|
21
|
+
stat_path = ResourcePath(
|
|
22
|
+
"Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal"
|
|
23
|
+
)
|
|
24
|
+
super(SPOWebAppServicePrincipal, self).__init__(context, stat_path)
|
|
25
|
+
|
|
26
|
+
def update_spfx_client_secret(self, secret_value):
|
|
27
|
+
"""
|
|
28
|
+
:param str secret_value:
|
|
29
|
+
"""
|
|
30
|
+
payload = {"secretValue": secret_value}
|
|
31
|
+
qry = ServiceOperationQuery(self, "UpdateSpfxClientSecret", None, payload)
|
|
32
|
+
self.context.add_query(qry)
|
|
33
|
+
return self
|
|
34
|
+
|
|
35
|
+
def update_spfx_third_party_app_id(self, app_id):
|
|
36
|
+
payload = {"appId": app_id}
|
|
37
|
+
qry = ServiceOperationQuery(self, "UpdateSpfxThirdPartyAppId", None, payload)
|
|
38
|
+
self.context.add_query(qry)
|
|
39
|
+
return self
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def account_enabled(self):
|
|
43
|
+
# type: () -> Optional[bool]
|
|
44
|
+
""" """
|
|
45
|
+
return self.properties.get("AccountEnabled", False)
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def app_id(self):
|
|
49
|
+
# type: () -> Optional[str]
|
|
50
|
+
""" """
|
|
51
|
+
return self.properties.get("AppId", False)
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def reply_urls(self):
|
|
55
|
+
# type: () -> StringCollection
|
|
56
|
+
""" """
|
|
57
|
+
return self.properties.get("ReplyUrls", StringCollection())
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def grant_manager(self):
|
|
61
|
+
return self.properties.get(
|
|
62
|
+
"GrantManager",
|
|
63
|
+
SPO3rdPartyAADPermissionGrantCollection(
|
|
64
|
+
self.context,
|
|
65
|
+
ResourcePath("GrantManager", self.resource_path),
|
|
66
|
+
),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def permission_grants(self):
|
|
71
|
+
return self.properties.get(
|
|
72
|
+
"PermissionGrants",
|
|
73
|
+
EntityCollection(
|
|
74
|
+
self.context,
|
|
75
|
+
SPOWebAppServicePrincipalPermissionGrant,
|
|
76
|
+
ResourcePath("PermissionGrants", self.resource_path),
|
|
77
|
+
),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def permission_requests(self):
|
|
82
|
+
return self.properties.get(
|
|
83
|
+
"PermissionRequests",
|
|
84
|
+
EntityCollection(
|
|
85
|
+
self.context,
|
|
86
|
+
SPOWebAppServicePrincipalPermissionRequest,
|
|
87
|
+
ResourcePath("PermissionRequests", self.resource_path),
|
|
88
|
+
),
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def entity_type_name(self):
|
|
93
|
+
return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal"
|
|
94
|
+
|
|
95
|
+
def get_property(self, name, default_value=None):
|
|
96
|
+
if default_value is None:
|
|
97
|
+
property_mapping = {
|
|
98
|
+
"GrantManager": self.grant_manager,
|
|
99
|
+
"PermissionRequests": self.permission_requests,
|
|
100
|
+
"PermissionGrants": self.permission_grants,
|
|
101
|
+
"ReplyUrls": self.reply_urls,
|
|
102
|
+
}
|
|
103
|
+
default_value = property_mapping.get(name, None)
|
|
104
|
+
return super(SPOWebAppServicePrincipal, self).get_property(name, default_value)
|
|
@@ -30,7 +30,10 @@ class TenantAdminSettingsService(Entity):
|
|
|
30
30
|
|
|
31
31
|
@property
|
|
32
32
|
def auto_quota_enabled(self):
|
|
33
|
-
"""
|
|
33
|
+
"""Controls whether automatic quota management is enabled for SharePoint Online site collections.
|
|
34
|
+
When this feature is enabled, SharePoint Online automatically adjusts the storage quota for site collections
|
|
35
|
+
based on their usage, helping to ensure that site collections don't run out of space.
|
|
36
|
+
"""
|
|
34
37
|
return self.properties.get("AutoQuotaEnabled", AutoQuotaEnabled())
|
|
35
38
|
|
|
36
39
|
@property
|
|
@@ -11,20 +11,20 @@ from office365.sharepoint.tenant.administration.sites.creation_data import (
|
|
|
11
11
|
class SiteCreationSource(ClientValue):
|
|
12
12
|
def __init__(
|
|
13
13
|
self,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
is_sync_threshold_limit_reached=None,
|
|
15
|
+
last_refresh_time_stamp=None,
|
|
16
16
|
site_creation_data=None,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
sync_threshold_limit=None,
|
|
18
|
+
total_sites_count=None,
|
|
19
19
|
):
|
|
20
20
|
# type: (bool, datetime, List[SiteCreationData], int, int) -> None
|
|
21
|
-
self.IsSyncThresholdLimitReached =
|
|
22
|
-
self.LastRefreshTimeStamp =
|
|
21
|
+
self.IsSyncThresholdLimitReached = is_sync_threshold_limit_reached
|
|
22
|
+
self.LastRefreshTimeStamp = last_refresh_time_stamp
|
|
23
23
|
self.SiteCreationData = ClientValueCollection(
|
|
24
24
|
SiteCreationData, site_creation_data
|
|
25
25
|
)
|
|
26
|
-
self.SyncThresholdLimit =
|
|
27
|
-
self.TotalSitesCount =
|
|
26
|
+
self.SyncThresholdLimit = sync_threshold_limit
|
|
27
|
+
self.TotalSitesCount = total_sites_count
|
|
28
28
|
|
|
29
29
|
@property
|
|
30
30
|
def entity_type_name(self):
|