Office365-REST-Python-Client 2.5.12__py3-none-any.whl → 2.5.13__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.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/METADATA +1 -1
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/RECORD +86 -51
- office365/backuprestore/__init__.py +0 -0
- office365/backuprestore/root.py +39 -0
- office365/backuprestore/service_status.py +5 -0
- office365/booking/solutions/root.py +14 -1
- office365/directory/applications/application.py +17 -0
- office365/directory/applications/optional_claim.py +5 -0
- office365/directory/applications/optional_claims.py +16 -0
- office365/directory/authentication/conditions/event_listener.py +9 -0
- office365/directory/device_local_credential_info.py +21 -0
- office365/directory/identities/container.py +18 -0
- office365/directory/policies/authentication_flows.py +8 -0
- office365/directory/policies/root.py +17 -0
- office365/directory/policies/unified_role_management.py +7 -0
- office365/directory/protection/policy/__init__.py +0 -0
- office365/directory/protection/policy/base.py +24 -0
- office365/directory/protection/policy/one_drive_for_business.py +10 -0
- office365/directory/security/attacksimulations/users/details.py +7 -0
- office365/directory/serviceprincipals/service_principal.py +65 -14
- office365/directory/users/user.py +23 -3
- office365/graph_client.py +3 -1
- office365/intune/devices/management/management.py +26 -0
- office365/intune/devices/management/terms_and_conditions.py +10 -0
- office365/intune/devices/management/virtual_endpoint.py +8 -0
- office365/runtime/client_object.py +9 -1
- office365/runtime/client_object_collection.py +2 -2
- office365/runtime/client_result.py +19 -2
- office365/runtime/odata/v4/batch_request.py +12 -15
- office365/sharepoint/apps/context_site.py +41 -0
- office365/sharepoint/authpolicy/events/collection.py +11 -0
- office365/sharepoint/authpolicy/events/{auth_event.py → event.py} +1 -0
- office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +5 -0
- office365/sharepoint/brandcenter/__init__.py +0 -0
- office365/sharepoint/brandcenter/brand_center.py +9 -0
- office365/sharepoint/brandcenter/configuration.py +5 -0
- office365/sharepoint/changes/change.py +1 -3
- office365/sharepoint/changes/collection.py +3 -0
- office365/sharepoint/changes/folder.py +6 -0
- office365/sharepoint/changes/group.py +3 -0
- office365/sharepoint/changes/list.py +13 -0
- office365/sharepoint/changes/view.py +25 -0
- office365/sharepoint/client_context.py +19 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +3 -0
- office365/sharepoint/copilot/__init__.py +0 -0
- office365/sharepoint/copilot/file_collection.py +27 -0
- office365/sharepoint/copilot/file_collection_query_result.py +10 -0
- office365/sharepoint/copilot/list_item_extensions.py +5 -0
- office365/sharepoint/directory/provider/alternate_id_data.py +5 -0
- office365/sharepoint/directory/provider/notification.py +8 -0
- office365/sharepoint/directory/provider/object_changes.py +5 -0
- office365/sharepoint/directory/provider/object_data.py +26 -3
- office365/sharepoint/directory/provider/provider.py +1 -0
- office365/sharepoint/directory/provider/session_data.py +9 -0
- office365/sharepoint/lists/list.py +64 -1
- office365/sharepoint/logger/log_export.py +2 -0
- office365/sharepoint/migrationcenter/service/performance/data.py +5 -5
- office365/sharepoint/multigeo/services.py +24 -0
- office365/sharepoint/navigation/menu_node.py +43 -1
- office365/sharepoint/navigation/node_collection.py +1 -1
- office365/sharepoint/oauth/token.py +22 -0
- office365/sharepoint/oauth/token_response.py +5 -0
- office365/sharepoint/publishing/pages/campaign_publication.py +10 -0
- office365/sharepoint/securestore/target_application.py +2 -0
- office365/sharepoint/sharing/inherited_from.py +5 -0
- office365/sharepoint/sharing/internal/__init__.py +0 -0
- office365/sharepoint/sharing/internal/sharing_restrictions.py +22 -0
- office365/sharepoint/sharing/internal/types.py +17 -0
- office365/sharepoint/sharing/link_info.py +24 -0
- office365/sharepoint/sites/site.py +9 -0
- office365/sharepoint/sites/version_policy_manager.py +8 -0
- office365/sharepoint/tenant/administration/policies/__init__.py +0 -0
- office365/sharepoint/tenant/administration/policies/definition.py +5 -0
- office365/sharepoint/tenant/administration/settings_service.py +9 -1
- office365/sharepoint/tenant/administration/sites/properties.py +45 -0
- office365/sharepoint/tenant/administration/tenant.py +14 -0
- office365/sharepoint/tenant/administration/types.py +17 -1
- office365/sharepoint/utilities/wopi_host.py +45 -0
- office365/sharepoint/webs/regional_settings.py +6 -0
- office365/sharepoint/webs/web.py +56 -0
- office365/sharepoint/workflow/definition.py +5 -0
- office365/sharepoint/workflowservices/deployment_service.py +23 -0
- office365/teams/members/settings.py +2 -2
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from office365.sharepoint.entity import Entity
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class BrandCenter(Entity):
|
|
5
|
+
"""
|
|
6
|
+
The SharePoint brand center API offers a centralized branding management application
|
|
7
|
+
that empowers your brand managers or designated brand owners to help your organization to customize
|
|
8
|
+
the look and feel of their experiences.
|
|
9
|
+
"""
|
|
@@ -16,9 +16,7 @@ class Change(Entity):
|
|
|
16
16
|
|
|
17
17
|
@property
|
|
18
18
|
def change_token(self):
|
|
19
|
-
"""
|
|
20
|
-
Returns an ChangeToken that represents the change.
|
|
21
|
-
"""
|
|
19
|
+
"""Returns an ChangeToken that represents the change."""
|
|
22
20
|
return self.properties.get("ChangeToken", ChangeToken())
|
|
23
21
|
|
|
24
22
|
@property
|
|
@@ -22,6 +22,7 @@ class ChangeCollection(EntityCollection[Change]):
|
|
|
22
22
|
from office365.sharepoint.changes.item import ChangeItem
|
|
23
23
|
from office365.sharepoint.changes.list import ChangeList
|
|
24
24
|
from office365.sharepoint.changes.user import ChangeUser
|
|
25
|
+
from office365.sharepoint.changes.view import ChangeView
|
|
25
26
|
from office365.sharepoint.changes.web import ChangeWeb
|
|
26
27
|
|
|
27
28
|
if "ItemId" in properties and "ListId" in properties:
|
|
@@ -40,3 +41,5 @@ class ChangeCollection(EntityCollection[Change]):
|
|
|
40
41
|
self._item_type = ChangeAlert
|
|
41
42
|
elif "FieldId" in properties:
|
|
42
43
|
self._item_type = ChangeField
|
|
44
|
+
elif "ViewId" in properties:
|
|
45
|
+
self._item_type = ChangeView
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.changes.change import Change
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,8 +8,12 @@ class ChangeFolder(Change):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def unique_id(self):
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""Identifies the folder that has changed."""
|
|
9
13
|
return self.properties.get("UniqueId", None)
|
|
10
14
|
|
|
11
15
|
@property
|
|
12
16
|
def web_id(self):
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""Identifies the site that contains the changed folder."""
|
|
13
19
|
return self.properties.get("WebId", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.changes.change import Change
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,5 +8,6 @@ class ChangeGroup(Change):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def group_id(self):
|
|
11
|
+
# type: () -> Optional[int]
|
|
9
12
|
"""Identifies the changed group."""
|
|
10
13
|
return self.properties.get("GroupId", None)
|
|
@@ -16,9 +16,22 @@ class ChangeList(Change):
|
|
|
16
16
|
|
|
17
17
|
@property
|
|
18
18
|
def base_template(self):
|
|
19
|
+
# type: () -> Optional[int]
|
|
19
20
|
"""An SP.ListTemplateType object that returns the list template type of the list."""
|
|
20
21
|
return self.properties.get("BaseTemplate", None)
|
|
21
22
|
|
|
23
|
+
@property
|
|
24
|
+
def editor(self):
|
|
25
|
+
# type: () -> Optional[str]
|
|
26
|
+
"""A string that returns the name of the user who modified the list."""
|
|
27
|
+
return self.properties.get("Editor", None)
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def hidden(self):
|
|
31
|
+
# type: () -> Optional[bool]
|
|
32
|
+
"""Returns a Boolean value that indicates whether a list is a hidden list."""
|
|
33
|
+
return self.properties.get("Hidden", None)
|
|
34
|
+
|
|
22
35
|
@property
|
|
23
36
|
def list_id(self):
|
|
24
37
|
# type: () -> Optional[str]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from office365.sharepoint.changes.change import Change
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ChangeView(Change):
|
|
7
|
+
"""Specifies a change on a view."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def view_id(self):
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""Identifies the changed view."""
|
|
13
|
+
return self.properties.get("ViewId", None)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def list_id(self):
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""Identifies the list that contains the changed view."""
|
|
19
|
+
return self.properties.get("ListId", None)
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def web_id(self):
|
|
23
|
+
# type: () -> Optional[str]
|
|
24
|
+
"""Identifies the site that contains the changed view."""
|
|
25
|
+
return self.properties.get("WebId", None)
|
|
@@ -42,7 +42,7 @@ class ClientContext(ClientRuntimeContext):
|
|
|
42
42
|
"""SharePoint client context (SharePoint v1 API)"""
|
|
43
43
|
|
|
44
44
|
def __init__(self, base_url, auth_context=None):
|
|
45
|
-
# type: (str, AuthenticationContext) -> None
|
|
45
|
+
# type: (str, AuthenticationContext | None) -> None
|
|
46
46
|
"""
|
|
47
47
|
Instantiates a SharePoint client context
|
|
48
48
|
|
|
@@ -411,6 +411,14 @@ class ClientContext(ClientRuntimeContext):
|
|
|
411
411
|
|
|
412
412
|
return AnnouncementsController(self, ResourcePath("Announcements"))
|
|
413
413
|
|
|
414
|
+
@property
|
|
415
|
+
def brand_center(self):
|
|
416
|
+
"""Alias to BrandCenter"""
|
|
417
|
+
|
|
418
|
+
from office365.sharepoint.brandcenter.brand_center import BrandCenter
|
|
419
|
+
|
|
420
|
+
return BrandCenter(self, ResourcePath("BrandCenter"))
|
|
421
|
+
|
|
414
422
|
@property
|
|
415
423
|
def client_people_picker(self):
|
|
416
424
|
"""Query principals service alias"""
|
|
@@ -702,6 +710,16 @@ class ClientContext(ClientRuntimeContext):
|
|
|
702
710
|
|
|
703
711
|
return WorkflowServicesManager.current(self)
|
|
704
712
|
|
|
713
|
+
@property
|
|
714
|
+
def workflow_deployment_service(self):
|
|
715
|
+
"""Alias to WorkflowServicesManager"""
|
|
716
|
+
|
|
717
|
+
from office365.sharepoint.workflowservices.deployment_service import (
|
|
718
|
+
WorkflowDeploymentService,
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
return WorkflowDeploymentService(self)
|
|
722
|
+
|
|
705
723
|
@property
|
|
706
724
|
def work_items(self):
|
|
707
725
|
""""""
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing_extensions import Self
|
|
2
|
+
|
|
1
3
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
2
4
|
from office365.runtime.queries.create_entity import CreateEntityQuery
|
|
3
5
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
@@ -52,6 +54,7 @@ class FieldLinkCollection(EntityCollection[FieldLink]):
|
|
|
52
54
|
)
|
|
53
55
|
|
|
54
56
|
def reorder(self, internal_names):
|
|
57
|
+
# type: (list[str]) -> Self
|
|
55
58
|
"""
|
|
56
59
|
Rearranges the collection of field links in the order in which field internal names are specified.
|
|
57
60
|
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from office365.runtime.client_result import ClientResult
|
|
2
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
|
+
from office365.sharepoint.copilot.file_collection_query_result import (
|
|
4
|
+
CopilotFileCollectionQueryResult,
|
|
5
|
+
)
|
|
6
|
+
from office365.sharepoint.entity import Entity
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CopilotFileCollection(Entity):
|
|
10
|
+
""" """
|
|
11
|
+
|
|
12
|
+
@staticmethod
|
|
13
|
+
def get_working_set_files(context, top=None, order_by=None, skip_token=None):
|
|
14
|
+
""" """
|
|
15
|
+
payload = {"top": top, "orderBy": order_by, "skipToken": skip_token}
|
|
16
|
+
return_type = ClientResult(context, CopilotFileCollectionQueryResult())
|
|
17
|
+
qry = ServiceOperationQuery(
|
|
18
|
+
CopilotFileCollection(context),
|
|
19
|
+
"GetWorkingSetFiles",
|
|
20
|
+
None,
|
|
21
|
+
payload,
|
|
22
|
+
None,
|
|
23
|
+
return_type,
|
|
24
|
+
True,
|
|
25
|
+
)
|
|
26
|
+
context.add_query(qry)
|
|
27
|
+
return return_type
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class CopilotFileCollectionQueryResult(ClientValue):
|
|
5
|
+
""" """
|
|
6
|
+
|
|
7
|
+
@property
|
|
8
|
+
def entity_type_name(self):
|
|
9
|
+
# type: () -> str
|
|
10
|
+
return "Microsoft.SharePoint.Copilot.CopilotFileCollectionQueryResult"
|
|
@@ -4,6 +4,11 @@ from office365.runtime.client_value import ClientValue
|
|
|
4
4
|
class AlternateIdData(ClientValue):
|
|
5
5
|
""""""
|
|
6
6
|
|
|
7
|
+
def __init__(self, email=None, identifying_property=None, user_principal_name=None):
|
|
8
|
+
self.Email = email
|
|
9
|
+
self.IdentifyingProperty = identifying_property
|
|
10
|
+
self.UserPrincipalName = user_principal_name
|
|
11
|
+
|
|
7
12
|
@property
|
|
8
13
|
def entity_type_name(self):
|
|
9
14
|
return "SP.Directory.Provider.AlternateIdData"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
3
|
from office365.sharepoint.entity import Entity
|
|
3
4
|
|
|
4
5
|
|
|
@@ -10,6 +11,13 @@ class DirectoryNotification(Entity):
|
|
|
10
11
|
resource_path = ResourcePath("SP.Directory.Provider.DirectoryNotification")
|
|
11
12
|
super(DirectoryNotification, self).__init__(context, resource_path)
|
|
12
13
|
|
|
14
|
+
def notify_changes(self, directory_object_changes):
|
|
15
|
+
""" """
|
|
16
|
+
payload = {"directoryObjectChanges": directory_object_changes}
|
|
17
|
+
qry = ServiceOperationQuery(self, "NotifyChanges", None, payload, None, None)
|
|
18
|
+
self.context.add_query(qry)
|
|
19
|
+
return self
|
|
20
|
+
|
|
13
21
|
@property
|
|
14
22
|
def entity_type_name(self):
|
|
15
23
|
return "SP.Directory.Provider.DirectoryNotification"
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
from office365.runtime.client_value import ClientValue
|
|
2
2
|
from office365.sharepoint.directory.provider.alternate_id_data import AlternateIdData
|
|
3
|
+
from office365.sharepoint.directory.provider.session_data import DirectorySessionData
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class DirectoryObjectData(ClientValue):
|
|
6
7
|
""""""
|
|
7
8
|
|
|
8
|
-
def __init__(
|
|
9
|
-
self
|
|
10
|
-
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
alternate_id=AlternateIdData(),
|
|
12
|
+
attribute_expiration_times=None,
|
|
13
|
+
change_marker=None,
|
|
14
|
+
directory_object_sub_type=None,
|
|
15
|
+
directory_object_type=None,
|
|
16
|
+
directory_session_data=DirectorySessionData(),
|
|
17
|
+
id_=None,
|
|
18
|
+
is_new=None,
|
|
19
|
+
last_modified_time=None,
|
|
20
|
+
tenant_context_id=None,
|
|
21
|
+
version=None,
|
|
22
|
+
):
|
|
23
|
+
self.AlternateId = alternate_id
|
|
24
|
+
self.AttributeExpirationTimes = attribute_expiration_times
|
|
25
|
+
self.ChangeMarker = change_marker
|
|
26
|
+
self.DirectoryObjectSubType = directory_object_sub_type
|
|
27
|
+
self.DirectoryObjectType = directory_object_type
|
|
28
|
+
self.DirectorySessionData = directory_session_data
|
|
29
|
+
self.Id = id_
|
|
30
|
+
self.IsNew = is_new
|
|
31
|
+
self.LastModifiedTime = last_modified_time
|
|
32
|
+
self.TenantContextId = tenant_context_id
|
|
33
|
+
self.Version = version
|
|
11
34
|
|
|
12
35
|
@property
|
|
13
36
|
def entity_type_name(self):
|
|
@@ -14,6 +14,7 @@ class SharePointDirectoryProvider(Entity):
|
|
|
14
14
|
super(SharePointDirectoryProvider, self).__init__(context, resource_path)
|
|
15
15
|
|
|
16
16
|
def read_directory_object(self, data):
|
|
17
|
+
# type: (DirectoryObjectData) -> ClientResult[DirectoryObjectData]
|
|
17
18
|
""""""
|
|
18
19
|
return_type = ClientResult(self.context, DirectoryObjectData())
|
|
19
20
|
payload = {"data": data}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import os
|
|
2
3
|
from datetime import datetime
|
|
3
|
-
from typing import TYPE_CHECKING, AnyStr, Dict, Optional
|
|
4
|
+
from typing import IO, TYPE_CHECKING, AnyStr, Callable, Dict, Optional
|
|
5
|
+
|
|
6
|
+
from typing_extensions import Self
|
|
4
7
|
|
|
5
8
|
from office365.runtime.client_result import ClientResult
|
|
6
9
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
@@ -24,6 +27,7 @@ from office365.sharepoint.files.checked_out_file_collection import (
|
|
|
24
27
|
CheckedOutFileCollection,
|
|
25
28
|
)
|
|
26
29
|
from office365.sharepoint.files.file import File
|
|
30
|
+
from office365.sharepoint.files.system_object_type import FileSystemObjectType
|
|
27
31
|
from office365.sharepoint.flows.synchronization_result import FlowSynchronizationResult
|
|
28
32
|
from office365.sharepoint.folders.folder import Folder
|
|
29
33
|
from office365.sharepoint.forms.collection import FormCollection
|
|
@@ -77,6 +81,64 @@ class List(SecurableObject):
|
|
|
77
81
|
def __repr__(self):
|
|
78
82
|
return self.id or self.title or self.entity_type_name
|
|
79
83
|
|
|
84
|
+
def export(self, local_file, include_content=False, item_exported=None):
|
|
85
|
+
# type: (IO, bool, Callable[[ListItem|File|Folder], None]) -> Self
|
|
86
|
+
"""Exports SharePoint List"""
|
|
87
|
+
import zipfile
|
|
88
|
+
|
|
89
|
+
def _append_file(name, data):
|
|
90
|
+
with zipfile.ZipFile(local_file.name, "a", zipfile.ZIP_DEFLATED) as zf:
|
|
91
|
+
zf.writestr(name, data)
|
|
92
|
+
|
|
93
|
+
def _download_content(list_item):
|
|
94
|
+
# type: (ListItem) -> None
|
|
95
|
+
def _after_downloaded(result):
|
|
96
|
+
# type: (ClientResult[AnyStr]) -> None
|
|
97
|
+
item_path = list_item.properties["FileRef"].replace(
|
|
98
|
+
self.root_folder.serverRelativeUrl, ""
|
|
99
|
+
)
|
|
100
|
+
_append_file(item_path, result.value)
|
|
101
|
+
|
|
102
|
+
list_item.file.get_content().after_execute(_after_downloaded)
|
|
103
|
+
|
|
104
|
+
def _export_items(items):
|
|
105
|
+
# type: (ListItemCollection) -> None
|
|
106
|
+
|
|
107
|
+
for item in items:
|
|
108
|
+
# item_path = item.properties["FileRef"].replace(self.root_folder.serverRelativeUrl, "")
|
|
109
|
+
item_path = str(item.id) + ".json"
|
|
110
|
+
|
|
111
|
+
if item.file_system_object_type == FileSystemObjectType.Folder:
|
|
112
|
+
pass
|
|
113
|
+
else:
|
|
114
|
+
_append_file(item_path, json.dumps(item.to_json()))
|
|
115
|
+
|
|
116
|
+
if include_content:
|
|
117
|
+
_download_content(item)
|
|
118
|
+
|
|
119
|
+
if callable(item_exported):
|
|
120
|
+
item_exported(item)
|
|
121
|
+
|
|
122
|
+
def _save_schema():
|
|
123
|
+
(
|
|
124
|
+
self.items.select(
|
|
125
|
+
[
|
|
126
|
+
"*",
|
|
127
|
+
"Id",
|
|
128
|
+
"FileRef",
|
|
129
|
+
"FileDirRef",
|
|
130
|
+
"FileLeafRef",
|
|
131
|
+
"FileSystemObjectType",
|
|
132
|
+
]
|
|
133
|
+
)
|
|
134
|
+
# .expand(["File", "Folder"])
|
|
135
|
+
.get().paged(page_loaded=_export_items)
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
self.ensure_properties(["SchemaXml", "RootFolder"], _save_schema)
|
|
139
|
+
|
|
140
|
+
return self
|
|
141
|
+
|
|
80
142
|
def clear(self):
|
|
81
143
|
"""Clears the list."""
|
|
82
144
|
|
|
@@ -125,6 +187,7 @@ class List(SecurableObject):
|
|
|
125
187
|
return self
|
|
126
188
|
|
|
127
189
|
def get_async_action_config(self):
|
|
190
|
+
""" """
|
|
128
191
|
return_type = ClientResult(self.context)
|
|
129
192
|
qry = ServiceOperationQuery(
|
|
130
193
|
self, "GetAsyncActionConfig", return_type=return_type
|
|
@@ -14,12 +14,14 @@ class LogExport(Entity):
|
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
def get_files(self):
|
|
17
|
+
""" """
|
|
17
18
|
return_type = LogFileInfoCollection(self.context)
|
|
18
19
|
qry = ServiceOperationQuery(self, "GetFiles", None, None, None, return_type)
|
|
19
20
|
self.context.add_query(qry)
|
|
20
21
|
return return_type
|
|
21
22
|
|
|
22
23
|
def get_log_types(self):
|
|
24
|
+
""" """
|
|
23
25
|
return_type = ClientResult(self.context)
|
|
24
26
|
qry = ServiceOperationQuery(self, "GetLogTypes", None, None, None, return_type)
|
|
25
27
|
self.context.add_query(qry)
|
|
@@ -31,14 +31,14 @@ class PerformanceDataCollection(EntityCollection[PerformanceData]):
|
|
|
31
31
|
context, PerformanceData, resource_path
|
|
32
32
|
)
|
|
33
33
|
|
|
34
|
-
def get_data(self,
|
|
34
|
+
def get_data(self, start_time=None, end_time=None, agent_id=None, time_unit=None):
|
|
35
35
|
""" """
|
|
36
36
|
return_type = ClientResult(self.context, PerformanceDashboardData())
|
|
37
37
|
payload = {
|
|
38
|
-
"StartTime":
|
|
39
|
-
"EndTime":
|
|
40
|
-
"AgentId":
|
|
41
|
-
"TimeUnit":
|
|
38
|
+
"StartTime": start_time,
|
|
39
|
+
"EndTime": end_time,
|
|
40
|
+
"AgentId": agent_id,
|
|
41
|
+
"TimeUnit": time_unit,
|
|
42
42
|
}
|
|
43
43
|
qry = ServiceOperationQuery(self, "GetData", None, payload, None, return_type)
|
|
44
44
|
self.context.add_query(qry)
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
3
|
from office365.sharepoint.entity import Entity
|
|
3
4
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
4
5
|
from office365.sharepoint.multigeo.unified_group import UnifiedGroup
|
|
6
|
+
from office365.sharepoint.multigeo.user_personal_site_location import (
|
|
7
|
+
UserPersonalSiteLocation,
|
|
8
|
+
)
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
class MultiGeoServices(Entity):
|
|
@@ -15,6 +19,26 @@ class MultiGeoServices(Entity):
|
|
|
15
19
|
data residency requirements.
|
|
16
20
|
"""
|
|
17
21
|
|
|
22
|
+
def __init__(self, context):
|
|
23
|
+
static_path = ResourcePath(
|
|
24
|
+
"Microsoft.Online.SharePoint.MultiGeo.Service.MultiGeoServicesBeta"
|
|
25
|
+
)
|
|
26
|
+
super(MultiGeoServices, self).__init__(context, static_path)
|
|
27
|
+
|
|
28
|
+
def user_personal_site_location(self, user_principal_name):
|
|
29
|
+
# type: (str) -> UserPersonalSiteLocation
|
|
30
|
+
return_type = UserPersonalSiteLocation(self.context)
|
|
31
|
+
qry = ServiceOperationQuery(
|
|
32
|
+
self,
|
|
33
|
+
"UserPersonalSiteLocation",
|
|
34
|
+
[user_principal_name],
|
|
35
|
+
None,
|
|
36
|
+
None,
|
|
37
|
+
return_type,
|
|
38
|
+
)
|
|
39
|
+
self.context.add_query(qry)
|
|
40
|
+
return return_type
|
|
41
|
+
|
|
18
42
|
@property
|
|
19
43
|
def unified_groups(self):
|
|
20
44
|
# type: () -> EntityCollection[UnifiedGroup]
|
|
@@ -1,15 +1,57 @@
|
|
|
1
1
|
from office365.runtime.client_value import ClientValue
|
|
2
|
+
from office365.runtime.client_value_collection import ClientValueCollection
|
|
3
|
+
from office365.sharepoint.translation.resource_entry import SPResourceEntry
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class MenuNode(ClientValue):
|
|
5
7
|
"""Represents a navigation node in the navigation hierarchy. A navigation hierarchy is a tree structure of
|
|
6
8
|
navigation nodes."""
|
|
7
9
|
|
|
8
|
-
def __init__(
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
audience_ids=None,
|
|
13
|
+
current_lcid=None,
|
|
14
|
+
title=None,
|
|
15
|
+
is_deleted=None,
|
|
16
|
+
is_hidden=None,
|
|
17
|
+
key=None,
|
|
18
|
+
nodes=None,
|
|
19
|
+
node_type=None,
|
|
20
|
+
open_in_new_window=None,
|
|
21
|
+
simple_url=None,
|
|
22
|
+
translations=None,
|
|
23
|
+
):
|
|
9
24
|
"""
|
|
25
|
+
:param list[str] audience_ids:
|
|
10
26
|
:param int current_lcid:
|
|
11
27
|
:param str title: Specifies the title of the navigation node. The value is in the preferred language of the
|
|
12
28
|
user, if available, or is in the default language of the site (2) as a fallback.
|
|
29
|
+
:param int node_type: Specifies the type of the navigation node.
|
|
30
|
+
:param bool is_deleted: A client MUST use this property set to TRUE to indicate that this node MUST be
|
|
31
|
+
deleted by the server. When set to TRUE the server MUST delete the node including all the child nodes
|
|
32
|
+
when present. When set to FALSE the server SHOULD NOT delete this node.
|
|
33
|
+
:param bool is_hidden: Specifies whether the node will be hidden in the navigation menu. During editing,
|
|
34
|
+
all nodes temporarily become visible so that they can be edited.
|
|
35
|
+
:param str key: Specifies the identifier for the navigation node in the menu tree. If the navigation node does
|
|
36
|
+
not exist on the protocol server, this value MUST be an empty string.
|
|
37
|
+
:param list[MenuNode] nodes:
|
|
38
|
+
:param bool open_in_new_window:
|
|
39
|
+
:param str simple_url: If the NodeType (section 3.2.5.244.1.1.7) property is set to "SimpleLink",
|
|
40
|
+
this property represents the URL of the navigation node. The URL can be relative or absolute.
|
|
41
|
+
If the value is a relative URL, it can begin with URL tokens "~site" and "~sitecollection".
|
|
42
|
+
These tokens indicate that the URL is either relative to the site (2) or to the site collection
|
|
43
|
+
respectively. If the NodeType (section 3.2.5.244.1.1.7) property is not set to "SimpleLink",
|
|
44
|
+
the value MUST be an empty string.
|
|
45
|
+
:param list[SPResourceEntry] translations:
|
|
13
46
|
"""
|
|
47
|
+
self.AudienceIds = audience_ids
|
|
14
48
|
self.CurrentLCID = current_lcid
|
|
49
|
+
self.IsDeleted = is_deleted
|
|
50
|
+
self.IsHidden = is_hidden
|
|
51
|
+
self.Key = key
|
|
52
|
+
self.Nodes = ClientValueCollection(MenuNode, nodes)
|
|
53
|
+
self.NodeType = node_type
|
|
54
|
+
self.OpenInNewWindow = open_in_new_window
|
|
55
|
+
self.SimpleUrl = simple_url
|
|
15
56
|
self.Title = title
|
|
57
|
+
self.Translations = ClientValueCollection(SPResourceEntry, translations)
|
|
@@ -39,7 +39,7 @@ class NavigationNodeCollection(EntityCollection[NavigationNode]):
|
|
|
39
39
|
:param int previous_node_id: Identifier of the navigation node after which the node identified by nodeId moves to
|
|
40
40
|
"""
|
|
41
41
|
params = {"nodeId": node_id, "previousNodeId": previous_node_id}
|
|
42
|
-
qry = ServiceOperationQuery(self, "
|
|
42
|
+
qry = ServiceOperationQuery(self, "MoveAfter", params)
|
|
43
43
|
self.context.add_query(qry)
|
|
44
44
|
return self
|
|
45
45
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
|
+
from office365.sharepoint.entity import Entity
|
|
4
|
+
from office365.sharepoint.oauth.token_response import TokenResponse
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Token(Entity):
|
|
8
|
+
""""""
|
|
9
|
+
|
|
10
|
+
def __init__(self, context):
|
|
11
|
+
super(Token, self).__init__(context, ResourcePath("SP.OAuth.Token"))
|
|
12
|
+
|
|
13
|
+
def acquire(self):
|
|
14
|
+
""" """
|
|
15
|
+
return_type = TokenResponse(self.context)
|
|
16
|
+
qry = ServiceOperationQuery(self, "Acquire", return_type=return_type)
|
|
17
|
+
self.context.add_query(qry)
|
|
18
|
+
return return_type
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def entity_type_name(self):
|
|
22
|
+
return "SP.OAuth.Token"
|
|
@@ -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]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
|
+
from office365.sharepoint.client_context import ClientContext
|
|
2
3
|
from office365.sharepoint.entity import Entity
|
|
3
4
|
|
|
4
5
|
|
|
@@ -10,6 +11,7 @@ class TargetApplication(Entity):
|
|
|
10
11
|
|
|
11
12
|
@staticmethod
|
|
12
13
|
def create(context, application_id, friendly_name):
|
|
14
|
+
# type: (ClientContext, str, str) -> "TargetApplication"
|
|
13
15
|
"""
|
|
14
16
|
Creates a target application
|
|
15
17
|
|