Office365-REST-Python-Client 2.6.1__py3-none-any.whl → 2.6.2__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.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +1 -1
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +232 -155
- office365/admin/people_settings.py +16 -0
- office365/admin/sharepoint_settings.py +50 -1
- office365/admin/sharing_capabilities.py +2 -0
- office365/communications/calls/participant.py +6 -0
- office365/communications/onlinemeetings/broadcast_settings.py +5 -0
- office365/communications/onlinemeetings/collection.py +29 -0
- office365/communications/onlinemeetings/online_meeting.py +1 -1
- office365/communications/onlinemeetings/recordings/call.py +5 -0
- office365/communications/onlinemeetings/restricted.py +5 -0
- office365/directory/applications/collection.py +11 -0
- office365/directory/audit/directory.py +31 -0
- office365/directory/audit/signins/signin.py +14 -0
- office365/directory/audit/target_resource.py +5 -0
- office365/directory/authentication/conditions/conditions.py +5 -1
- office365/directory/datapolicy/operation.py +39 -0
- office365/directory/directory.py +13 -0
- office365/directory/identitygovernance/accessreview/instance.py +29 -0
- office365/directory/identitygovernance/accessreview/stage.py +13 -0
- office365/directory/identitygovernance/accessreview/stages.py +11 -0
- office365/directory/identitygovernance/appconsent/request.py +9 -0
- office365/directory/identitygovernance/privilegedaccess/group.py +1 -1
- office365/directory/identitygovernance/privilegedaccess/schedule/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/{group_assignment_schedule_instance.py → schedule/group_assignment_instance.py} +1 -1
- office365/directory/identitygovernance/privilegedaccess/schedule/schedule.py +6 -0
- office365/directory/insights/trending.py +25 -0
- office365/directory/licenses/assignment_state.py +5 -5
- office365/directory/licenses/details.py +6 -0
- office365/directory/permissions/scoped_role_membership.py +8 -0
- office365/directory/policies/applied_conditional_access.py +31 -0
- office365/directory/policies/feature_rollout.py +24 -0
- office365/directory/protection/information.py +73 -2
- office365/directory/protection/riskyusers/collection.py +1 -1
- office365/directory/protection/threatassessment/requests/__init__.py +0 -0
- office365/directory/protection/threatassessment/{email_file_request.py → requests/email_file.py} +9 -1
- office365/directory/protection/threatassessment/requests/file.py +10 -0
- office365/directory/protection/threatassessment/{mail_request.py → requests/mail.py} +1 -1
- office365/directory/protection/threatassessment/requests/url.py +9 -0
- office365/directory/rolemanagement/app_scope.py +14 -0
- office365/directory/rolemanagement/application.py +3 -2
- office365/directory/rolemanagement/role.py +15 -0
- office365/directory/rolemanagement/unifiedrole/__init__.py +0 -0
- office365/directory/rolemanagement/{unified_role_assignment.py → unifiedrole/assignment.py} +37 -1
- office365/directory/rolemanagement/{unified_role_definition.py → unifiedrole/definition.py} +6 -1
- office365/directory/security/alerts/file_security_state.py +5 -0
- office365/directory/security/attacksimulations/automation.py +8 -0
- office365/directory/security/attacksimulations/automation_run.py +8 -0
- office365/directory/security/attacksimulations/repeat_offender.py +7 -0
- office365/directory/security/attacksimulations/report.py +2 -2
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/incidents/incident.py +6 -1
- office365/directory/security/security.py +5 -0
- office365/directory/subscriptions/__init__.py +0 -0
- office365/directory/subscriptions/company.py +7 -0
- office365/directory/synchronization/progress.py +12 -0
- office365/directory/users/activities/activity.py +10 -1
- office365/directory/users/settings.py +51 -1
- office365/directory/users/storage.py +5 -0
- office365/directory/users/user.py +114 -3
- office365/entity_collection.py +21 -0
- office365/onedrive/contenttypes/collection.py +2 -0
- office365/onedrive/driveitems/driveItem.py +3 -2
- office365/onedrive/driveitems/publication_facet.py +6 -1
- office365/onedrive/filestorage/container.py +22 -0
- office365/onedrive/filestorage/container_collection.py +37 -0
- office365/onedrive/filestorage/file_storage.py +4 -4
- office365/onedrive/listitems/collection.py +38 -0
- office365/onedrive/lists/list.py +3 -5
- office365/onedrive/sitepages/base.py +8 -0
- office365/onedrive/sitepages/collection.py +8 -2
- office365/onedrive/sitepages/site_page.py +13 -2
- office365/onedrive/sites/site.py +1 -1
- office365/onedrive/workbooks/charts/title.py +12 -0
- office365/onedrive/workbooks/charts/title_format.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +16 -0
- office365/onedrive/workbooks/ranges/border.py +30 -0
- office365/onedrive/workbooks/ranges/font.py +39 -0
- office365/onedrive/workbooks/ranges/range.py +6 -0
- office365/onedrive/workbooks/worksheets/protection_options.py +34 -5
- office365/outlook/calendar/events/event.py +57 -0
- office365/outlook/mail/automatic_replies_mailtips.py +20 -0
- office365/outlook/mail/folders/folder.py +3 -4
- office365/outlook/mail/messages/message.py +21 -4
- office365/outlook/mail/messages/rules/collection.py +26 -0
- office365/outlook/mail/tips/__init__.py +0 -0
- office365/outlook/mail/tips/error.py +5 -0
- office365/outlook/mail/tips/tips.py +41 -0
- office365/outlook/people/__init__.py +0 -0
- office365/outlook/people/profile_card_property.py +15 -0
- office365/outlook/person.py +7 -0
- office365/planner/category_descriptions.py +6 -0
- office365/planner/external_references.py +7 -0
- office365/planner/planner.py +4 -4
- office365/planner/plans/container.py +12 -0
- office365/planner/plans/details.py +31 -0
- office365/planner/tasks/collection.py +37 -0
- office365/planner/tasks/task.py +24 -0
- office365/planner/tasks/task_details.py +34 -1
- office365/planner/user_ids.py +8 -0
- office365/reports/internal/queries/create_report_query.py +12 -3
- office365/reports/root.py +61 -2
- office365/runtime/auth/authentication_context.py +10 -1
- office365/runtime/auth/sts_profile.py +3 -1
- office365/runtime/client_object.py +1 -1
- office365/runtime/client_object_collection.py +3 -5
- office365/runtime/client_result.py +3 -3
- office365/runtime/client_runtime_context.py +2 -2
- office365/runtime/odata/json_format.py +14 -3
- office365/runtime/odata/request.py +1 -3
- office365/runtime/odata/v3/json_light_format.py +18 -0
- office365/runtime/odata/v4/json_format.py +19 -0
- office365/runtime/queries/client_query.py +13 -8
- office365/runtime/queries/create_entity.py +7 -5
- office365/runtime/queries/delete_entity.py +6 -2
- office365/runtime/queries/function.py +3 -4
- office365/runtime/queries/read_entity.py +3 -5
- office365/runtime/queries/service_operation.py +2 -7
- office365/search/acronyms/__init__.py +0 -0
- office365/search/answer.py +35 -0
- office365/search/bookmarks/__init__.py +0 -0
- office365/search/bookmarks/bookmark.py +7 -0
- office365/search/entity.py +81 -2
- office365/search/entity_type.py +6 -1
- office365/search/external/item.py +5 -0
- office365/search/identity_set.py +11 -0
- office365/search/qnas/__init__.py +0 -0
- office365/search/qnas/qna.py +9 -0
- office365/sharepoint/activities/client_response.py +2 -2
- office365/sharepoint/apps/launcher.py +9 -0
- office365/sharepoint/brandcenter/brand_center.py +26 -0
- office365/sharepoint/client_context.py +19 -1
- office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
- office365/sharepoint/compliance/store_proxy.py +75 -0
- office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
- office365/sharepoint/copilot/file_metadata.py +5 -0
- office365/sharepoint/fields/builtin_field_id.py +8 -0
- office365/sharepoint/files/collection.py +10 -0
- office365/sharepoint/files/file.py +24 -3
- office365/sharepoint/listitems/listitem.py +61 -3
- office365/sharepoint/lists/exporter.py +1 -0
- office365/sharepoint/lists/list.py +37 -3
- office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
- office365/sharepoint/migrationcenter/common/task.py +8 -0
- office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
- office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
- office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
- office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
- office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
- office365/sharepoint/migrationcenter/service/services.py +13 -1
- office365/sharepoint/migrationcenter/service/teams.py +11 -0
- office365/sharepoint/navigation/node.py +7 -16
- office365/sharepoint/policy/license_utilities.py +1 -0
- office365/sharepoint/portal/groups/creation_context.py +11 -0
- office365/sharepoint/portal/groups/service.py +1 -1
- office365/sharepoint/portal/groups/site_manager.py +1 -1
- office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
- office365/sharepoint/publishing/pages/3d/types.py +5 -0
- office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
- office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
- office365/sharepoint/publishing/pages/campaign/types.py +18 -0
- office365/sharepoint/publishing/pages/coauth_state.py +20 -0
- office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
- office365/sharepoint/publishing/pages/metadata.py +0 -10
- office365/sharepoint/publishing/pages/page.py +29 -0
- office365/sharepoint/publishing/pages/service.py +27 -6
- office365/sharepoint/publishing/pages/topics/collection.py +1 -1
- office365/sharepoint/request.py +5 -1
- office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
- office365/sharepoint/sharing/access_request_settings.py +18 -0
- office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
- office365/sharepoint/sharing/information.py +2 -0
- office365/sharepoint/sharing/links/partial_success_response.py +4 -0
- office365/sharepoint/sites/azure_container_Info.py +4 -1
- office365/sharepoint/sites/brand_center_configuration.py +5 -0
- office365/sharepoint/sites/manager/__init__.py +0 -0
- office365/sharepoint/sites/manager/service.py +34 -0
- office365/sharepoint/sites/manager/types.py +5 -0
- office365/sharepoint/sites/site.py +54 -0
- office365/sharepoint/sites/themes.py +5 -0
- office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
- office365/sharepoint/tenant/administration/group.py +34 -0
- office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
- office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
- office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
- office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
- office365/sharepoint/tenant/administration/tenant.py +182 -5
- office365/sharepoint/userprofiles/people_manager.py +3 -1
- office365/sharepoint/utilities/utility.py +16 -0
- office365/sharepoint/webparts/definition.py +26 -0
- office365/sharepoint/webparts/limited_manager.py +53 -0
- office365/sharepoint/webparts/webpart.py +47 -0
- office365/sharepoint/webs/regional_settings.py +27 -0
- office365/sharepoint/webs/web.py +20 -1
- office365/teams/apps/app.py +17 -0
- office365/teams/apps/authorization.py +16 -0
- office365/teams/apps/permission_set.py +14 -0
- office365/teams/apps/resource_specific_permission.py +5 -0
- office365/teams/chats/chat.py +60 -0
- office365/teams/chats/messages/message.py +17 -0
- office365/teams/chats/type.py +13 -0
- office365/teams/chats/viewpoint.py +5 -0
- office365/teams/fun_settings.py +14 -2
- office365/teams/info.py +1 -1
- office365/teams/schedule/entity.py +3 -0
- office365/teams/schedule/shifts/item.py +1 -0
- office365/teams/schedule/shifts/offer/request.py +41 -1
- office365/teams/teamwork/activity_topic.py +5 -0
- office365/teams/teamwork/online_meeting_info.py +21 -0
- office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
- office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
- office365/teams/teamwork/user.py +48 -1
- office365/teams/teamwork/user_identity.py +5 -0
- office365/teams/viva/community.py +13 -0
- office365/teams/viva/employee_experience.py +27 -0
- office365/teams/viva/employee_experience_user.py +16 -0
- office365/teams/viva/learning/courses/self_initiated.py +5 -0
- office365/todo/attachments/task_file.py +3 -0
- office365/todo/checklist_item.py +11 -0
- office365/todo/tasks/list.py +11 -0
- office365/todo/tasks/task.py +31 -0
- office365/outlook/mail/tips.py +0 -17
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
- /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
- /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
- /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
- /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
- /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class IdentitySet(ClientValue):
|
|
5
|
+
"""Represents a keyed collection of identity resources. It is used to represent a set of
|
|
6
|
+
identities associated with various events for an item, such as created by or last modified by.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def entity_type_name(self):
|
|
11
|
+
return "microsoft.graph.search.identitySet"
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from office365.search.answer import SearchAnswer
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Qna(SearchAnswer):
|
|
5
|
+
"""Represents a question and answer (Q&A) in Microsoft Search. Q&As are administrative answer results in the
|
|
6
|
+
search results page that provide answers for specific search keywords. Q&As allow administrators
|
|
7
|
+
to answer the user's questions directly in search instead of providing a link to a webpage.
|
|
8
|
+
A Q&A has many properties that allow administrators to make common resources more accessible in their organization.
|
|
9
|
+
"""
|
|
@@ -4,12 +4,12 @@ from office365.runtime.client_value import ClientValue
|
|
|
4
4
|
class ActivityClientResponse(ClientValue):
|
|
5
5
|
""""""
|
|
6
6
|
|
|
7
|
-
def __init__(self, id_, message=None,
|
|
7
|
+
def __init__(self, id_, message=None, server_id=None, status=None):
|
|
8
8
|
# type: (str, str, str, int) -> None
|
|
9
9
|
""" """
|
|
10
10
|
self.id = id_
|
|
11
11
|
self.message = message
|
|
12
|
-
self.serverId =
|
|
12
|
+
self.serverId = server_id
|
|
13
13
|
self.status = status
|
|
14
14
|
|
|
15
15
|
@property
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
from office365.runtime.client_result import ClientResult
|
|
2
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
3
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
4
|
+
from office365.sharepoint.brandcenter.configuration import BrandCenterConfiguration
|
|
1
5
|
from office365.sharepoint.entity import Entity
|
|
6
|
+
from office365.sharepoint.sites.themes import SiteThemes
|
|
2
7
|
|
|
3
8
|
|
|
4
9
|
class BrandCenter(Entity):
|
|
@@ -7,3 +12,24 @@ class BrandCenter(Entity):
|
|
|
7
12
|
that empowers your brand managers or designated brand owners to help your organization to customize
|
|
8
13
|
the look and feel of their experiences.
|
|
9
14
|
"""
|
|
15
|
+
|
|
16
|
+
def __init__(self, context):
|
|
17
|
+
super(BrandCenter, self).__init__(context, ResourcePath("SP.BrandCenter"))
|
|
18
|
+
|
|
19
|
+
def configuration(self):
|
|
20
|
+
""" """
|
|
21
|
+
return_type = ClientResult(self.context, BrandCenterConfiguration())
|
|
22
|
+
qry = ServiceOperationQuery(
|
|
23
|
+
self, "Configuration", None, None, None, return_type
|
|
24
|
+
)
|
|
25
|
+
self.context.add_query(qry)
|
|
26
|
+
return return_type
|
|
27
|
+
|
|
28
|
+
def get_site_themes(self):
|
|
29
|
+
""" """
|
|
30
|
+
return_type = ClientResult(self.context, SiteThemes())
|
|
31
|
+
qry = ServiceOperationQuery(
|
|
32
|
+
self, "GetSiteThemes", None, None, None, return_type
|
|
33
|
+
)
|
|
34
|
+
self.context.add_query(qry)
|
|
35
|
+
return return_type
|
|
@@ -405,7 +405,7 @@ class ClientContext(ClientRuntimeContext):
|
|
|
405
405
|
|
|
406
406
|
from office365.sharepoint.brandcenter.brand_center import BrandCenter
|
|
407
407
|
|
|
408
|
-
return BrandCenter(self
|
|
408
|
+
return BrandCenter(self)
|
|
409
409
|
|
|
410
410
|
@property
|
|
411
411
|
def client_people_picker(self):
|
|
@@ -417,6 +417,16 @@ class ClientContext(ClientRuntimeContext):
|
|
|
417
417
|
|
|
418
418
|
return ClientPeoplePickerWebServiceInterface(self)
|
|
419
419
|
|
|
420
|
+
@property
|
|
421
|
+
def component_context_info(self):
|
|
422
|
+
"""ComponentContextInfo alias"""
|
|
423
|
+
|
|
424
|
+
from office365.sharepoint.clientsidecomponent.component_context_info import (
|
|
425
|
+
ComponentContextInfo,
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
return ComponentContextInfo(self, ResourcePath("ComponentContextInfo"))
|
|
429
|
+
|
|
420
430
|
@property
|
|
421
431
|
def consumer_permissions(self):
|
|
422
432
|
"""Consumer permissions alias"""
|
|
@@ -631,6 +641,14 @@ class ClientContext(ClientRuntimeContext):
|
|
|
631
641
|
|
|
632
642
|
return SPSiteManager(self, ResourcePath("spSiteManager"))
|
|
633
643
|
|
|
644
|
+
@property
|
|
645
|
+
def site_manager_svc(self):
|
|
646
|
+
"""Alias to SiteManagerService."""
|
|
647
|
+
|
|
648
|
+
from office365.sharepoint.sites.manager.service import SiteManagerService
|
|
649
|
+
|
|
650
|
+
return SiteManagerService(self)
|
|
651
|
+
|
|
634
652
|
@property
|
|
635
653
|
def social_feed_manager(self):
|
|
636
654
|
"""Alias to SocialFeedManager."""
|
|
@@ -12,6 +12,8 @@ if TYPE_CHECKING:
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class SPPolicyStoreProxy(Entity):
|
|
15
|
+
""" """
|
|
16
|
+
|
|
15
17
|
@staticmethod
|
|
16
18
|
def check_site_is_deletable_by_id(context, site_id, return_type=None):
|
|
17
19
|
# type: (ClientContext, str, Optional[ClientResult[bool]]) -> ClientResult[bool]
|
|
@@ -84,6 +86,79 @@ class SPPolicyStoreProxy(Entity):
|
|
|
84
86
|
self.context.add_query(qry)
|
|
85
87
|
return return_type
|
|
86
88
|
|
|
89
|
+
@staticmethod
|
|
90
|
+
def get_list_compliance_tag(context, list_url, return_type=None):
|
|
91
|
+
""" """
|
|
92
|
+
if return_type is None:
|
|
93
|
+
return_type = ClientResult(context, ComplianceTag())
|
|
94
|
+
payload = {"listUrl": list_url}
|
|
95
|
+
qry = ServiceOperationQuery(
|
|
96
|
+
SPPolicyStoreProxy(context),
|
|
97
|
+
"GetListComplianceTag",
|
|
98
|
+
None,
|
|
99
|
+
payload,
|
|
100
|
+
None,
|
|
101
|
+
return_type,
|
|
102
|
+
True,
|
|
103
|
+
)
|
|
104
|
+
context.add_query(qry)
|
|
105
|
+
return return_type
|
|
106
|
+
|
|
107
|
+
@staticmethod
|
|
108
|
+
def set_list_compliance_tag(
|
|
109
|
+
context,
|
|
110
|
+
list_url,
|
|
111
|
+
compliance_tag_value,
|
|
112
|
+
block_delete=None,
|
|
113
|
+
block_edit=None,
|
|
114
|
+
sync_to_items=None,
|
|
115
|
+
):
|
|
116
|
+
""" """
|
|
117
|
+
payload = {
|
|
118
|
+
"listUrl": list_url,
|
|
119
|
+
"complianceTagValue": compliance_tag_value,
|
|
120
|
+
"blockDelete": block_delete,
|
|
121
|
+
"blockEdit": block_edit,
|
|
122
|
+
"syncToItems": sync_to_items,
|
|
123
|
+
}
|
|
124
|
+
binding_type = SPPolicyStoreProxy(context)
|
|
125
|
+
qry = ServiceOperationQuery(
|
|
126
|
+
binding_type,
|
|
127
|
+
"SetListComplianceTag",
|
|
128
|
+
None,
|
|
129
|
+
payload,
|
|
130
|
+
None,
|
|
131
|
+
None,
|
|
132
|
+
True,
|
|
133
|
+
)
|
|
134
|
+
context.add_query(qry)
|
|
135
|
+
return binding_type
|
|
136
|
+
|
|
137
|
+
@staticmethod
|
|
138
|
+
def lock_record_item(
|
|
139
|
+
context, list_url, item_id, refresh_labeled_time, return_type=None
|
|
140
|
+
):
|
|
141
|
+
""" """
|
|
142
|
+
if return_type is None:
|
|
143
|
+
return_type = ClientResult(context, int())
|
|
144
|
+
payload = {
|
|
145
|
+
"listUrl": list_url,
|
|
146
|
+
"itemId": item_id,
|
|
147
|
+
"refreshLabeledTime": refresh_labeled_time,
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
qry = ServiceOperationQuery(
|
|
151
|
+
SPPolicyStoreProxy(context),
|
|
152
|
+
"LockRecordItem",
|
|
153
|
+
None,
|
|
154
|
+
payload,
|
|
155
|
+
None,
|
|
156
|
+
return_type,
|
|
157
|
+
True,
|
|
158
|
+
)
|
|
159
|
+
context.add_query(qry)
|
|
160
|
+
return return_type
|
|
161
|
+
|
|
87
162
|
@property
|
|
88
163
|
def entity_type_name(self):
|
|
89
164
|
return "SP.CompliancePolicy.SPPolicyStoreProxy"
|
|
@@ -10,6 +10,14 @@ class SPBuiltInFieldId:
|
|
|
10
10
|
FSObjType = "FSObjType"
|
|
11
11
|
"""Identifies a field that contains information about the file system type"""
|
|
12
12
|
|
|
13
|
+
FileDirRef = "FileDirRef"
|
|
14
|
+
"""Identifies a field that contains information about the file directory for the specified
|
|
15
|
+
SharePoint Foundation object."""
|
|
16
|
+
|
|
17
|
+
FileLeafRef = "FileLeafRef"
|
|
18
|
+
"""Identifies a field that contains information about the server-relative URL for the file node that is
|
|
19
|
+
associated with the specified SharePoint Foundation object."""
|
|
20
|
+
|
|
13
21
|
FileType = "FileType"
|
|
14
22
|
"""Identifies a field that contains information about the file type for version history of the specified
|
|
15
23
|
SharePoint Foundation library picture object."""
|
|
@@ -11,6 +11,7 @@ from office365.sharepoint.client_context import ClientContext
|
|
|
11
11
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
12
12
|
from office365.sharepoint.files.creation_information import FileCreationInformation
|
|
13
13
|
from office365.sharepoint.files.file import File
|
|
14
|
+
from office365.sharepoint.files.publish.status import FileStatus
|
|
14
15
|
from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
|
|
15
16
|
|
|
16
17
|
if TYPE_CHECKING:
|
|
@@ -24,6 +25,15 @@ class FileCollection(EntityCollection[File]):
|
|
|
24
25
|
# type: (ClientContext, ResourcePath, Folder) -> None
|
|
25
26
|
super(FileCollection, self).__init__(context, File, resource_path, parent)
|
|
26
27
|
|
|
28
|
+
def get_published_file(self, base_file_path):
|
|
29
|
+
""" """
|
|
30
|
+
return_type = FileStatus(self.context)
|
|
31
|
+
qry = ServiceOperationQuery(
|
|
32
|
+
self, "GetPublishedFile", [base_file_path], None, None, return_type
|
|
33
|
+
)
|
|
34
|
+
self.context.add_query(qry)
|
|
35
|
+
return return_type
|
|
36
|
+
|
|
27
37
|
def upload(self, path_or_file, file_name=None):
|
|
28
38
|
# type: (str|IO, str) -> File
|
|
29
39
|
"""Uploads a file into folder.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
from typing import TYPE_CHECKING, AnyStr
|
|
3
|
-
from urllib.parse import quote
|
|
3
|
+
from urllib.parse import quote, unquote
|
|
4
4
|
|
|
5
5
|
import requests
|
|
6
6
|
|
|
@@ -608,9 +608,13 @@ class File(AbstractFile):
|
|
|
608
608
|
:type server_relative_url: str
|
|
609
609
|
:type content: str
|
|
610
610
|
"""
|
|
611
|
+
try:
|
|
612
|
+
decoded_server_relative_url = unquote(server_relative_url)
|
|
613
|
+
except (ValueError, AttributeError, TypeError):
|
|
614
|
+
decoded_server_relative_url = server_relative_url
|
|
611
615
|
url = quote(
|
|
612
616
|
r"{0}/web/getFileByServerRelativePath(DecodedUrl='{1}')/\$value".format(
|
|
613
|
-
context.service_root_url(),
|
|
617
|
+
context.service_root_url(), decoded_server_relative_url
|
|
614
618
|
),
|
|
615
619
|
safe=":/",
|
|
616
620
|
)
|
|
@@ -630,9 +634,13 @@ class File(AbstractFile):
|
|
|
630
634
|
:type server_relative_url: str
|
|
631
635
|
:return Response
|
|
632
636
|
"""
|
|
637
|
+
try:
|
|
638
|
+
decoded_server_relative_url = unquote(server_relative_url)
|
|
639
|
+
except (ValueError, AttributeError, TypeError):
|
|
640
|
+
decoded_server_relative_url = server_relative_url
|
|
633
641
|
url = quote(
|
|
634
642
|
r"{0}/web/getFileByServerRelativePath(DecodedUrl='{1}')/\$value".format(
|
|
635
|
-
context.service_root_url(),
|
|
643
|
+
context.service_root_url(), decoded_server_relative_url
|
|
636
644
|
),
|
|
637
645
|
safe=":/",
|
|
638
646
|
)
|
|
@@ -717,6 +725,19 @@ class File(AbstractFile):
|
|
|
717
725
|
""""""
|
|
718
726
|
return self.properties.get("ActivityCapabilities", ActivityCapabilities())
|
|
719
727
|
|
|
728
|
+
@property
|
|
729
|
+
def checkin_comment(self):
|
|
730
|
+
# type: () -> Optional[str]
|
|
731
|
+
"""Specifies the comment used when a document is checked into a document library.
|
|
732
|
+
Its length MUST be equal to or less than 1023."""
|
|
733
|
+
return self.properties.get("CheckInComment", None)
|
|
734
|
+
|
|
735
|
+
@property
|
|
736
|
+
def content_tag(self):
|
|
737
|
+
# type: () -> Optional[str]
|
|
738
|
+
"""Returns internal version of content, used to validate document equality for read purposes."""
|
|
739
|
+
return self.properties.get("ContentTag", None)
|
|
740
|
+
|
|
720
741
|
@property
|
|
721
742
|
def author(self):
|
|
722
743
|
"""Specifies the user who added the file."""
|
|
@@ -3,7 +3,10 @@ from typing import TYPE_CHECKING
|
|
|
3
3
|
|
|
4
4
|
from office365.runtime.client_result import ClientResult
|
|
5
5
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
6
|
+
from office365.runtime.http.http_method import HttpMethod
|
|
7
|
+
from office365.runtime.http.request_options import RequestOptions
|
|
6
8
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
9
|
+
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
7
10
|
from office365.runtime.paths.v3.entity import EntityPath
|
|
8
11
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
9
12
|
from office365.sharepoint.attachments.collection import AttachmentCollection
|
|
@@ -56,6 +59,13 @@ class ListItem(SecurableObject):
|
|
|
56
59
|
if parent_list is not None:
|
|
57
60
|
self.set_property("ParentList", parent_list, False)
|
|
58
61
|
|
|
62
|
+
def archive(self):
|
|
63
|
+
"""Archives the list item."""
|
|
64
|
+
return_type = ClientResult(self.context, str())
|
|
65
|
+
qry = ServiceOperationQuery(self, "Archive", None, None, None, return_type)
|
|
66
|
+
self.context.add_query(qry)
|
|
67
|
+
return return_type
|
|
68
|
+
|
|
59
69
|
def share_link(self, link_kind, expiration=None, role=None, password=None):
|
|
60
70
|
# type: (int, Optional[datetime.datetime], Optional[int], Optional[str]) -> ClientResult[ShareLinkResponse]
|
|
61
71
|
"""Creates a tokenized sharing link for a list item based on the specified parameters and optionally
|
|
@@ -334,7 +344,7 @@ class ListItem(SecurableObject):
|
|
|
334
344
|
|
|
335
345
|
def _after_system_update(result):
|
|
336
346
|
# type: (ClientResult[ClientValueCollection[ListItemFormUpdateValue]]) -> None
|
|
337
|
-
has_any_error = any(
|
|
347
|
+
has_any_error = any(item.HasException for item in result.value)
|
|
338
348
|
if has_any_error:
|
|
339
349
|
raise ValueError("Update ListItem failed")
|
|
340
350
|
|
|
@@ -396,9 +406,16 @@ class ListItem(SecurableObject):
|
|
|
396
406
|
|
|
397
407
|
def get_comments(self):
|
|
398
408
|
"""Retrieve ListItem comments"""
|
|
399
|
-
return_type = CommentCollection(
|
|
409
|
+
return_type = CommentCollection(
|
|
410
|
+
self.context, ServiceOperationPath("GetComments", [], self.resource_path)
|
|
411
|
+
)
|
|
400
412
|
qry = ServiceOperationQuery(self, "GetComments", [], None, None, return_type)
|
|
401
|
-
|
|
413
|
+
|
|
414
|
+
def _create_request(request):
|
|
415
|
+
# type: (RequestOptions) -> None
|
|
416
|
+
request.method = HttpMethod.Get
|
|
417
|
+
|
|
418
|
+
self.context.add_query(qry).before_query_execute(_create_request)
|
|
402
419
|
return return_type
|
|
403
420
|
|
|
404
421
|
def override_policy_tip(self, user_action, justification):
|
|
@@ -495,6 +512,17 @@ class ListItem(SecurableObject):
|
|
|
495
512
|
|
|
496
513
|
return self.properties.get("EffectiveBasePermissions", BasePermissions())
|
|
497
514
|
|
|
515
|
+
@property
|
|
516
|
+
def effective_base_permissions_for_ui(self):
|
|
517
|
+
"""Specifies the effective base permissions for the current user, as they SHOULD be displayed in the user
|
|
518
|
+
interface (UI). If the list is not in read-only UI mode, the value of EffectiveBasePermissionsForUI
|
|
519
|
+
MUST be the same as the value of EffectiveBasePermissions (section 3.2.5.87.1.1.2).
|
|
520
|
+
If the list is in read-only UI mode, the value of EffectiveBasePermissionsForUI MUST be a subset of the
|
|
521
|
+
value of EffectiveBasePermissions."""
|
|
522
|
+
from office365.sharepoint.permissions.base_permissions import BasePermissions
|
|
523
|
+
|
|
524
|
+
return self.properties.get("EffectiveBasePermissionsForUI", BasePermissions())
|
|
525
|
+
|
|
498
526
|
@property
|
|
499
527
|
def field_values(self):
|
|
500
528
|
# type: () -> Optional[dict]
|
|
@@ -513,12 +541,41 @@ class ListItem(SecurableObject):
|
|
|
513
541
|
"""Gets a value that specifies whether the list item is a file or a list folder"""
|
|
514
542
|
return self.properties.get("FileSystemObjectType", None)
|
|
515
543
|
|
|
544
|
+
@property
|
|
545
|
+
def icon_overlay(self):
|
|
546
|
+
# type: () -> Optional[str]
|
|
547
|
+
"""This is an overlay icon for the item. If the parent list of the item does not already have the IconOverlay
|
|
548
|
+
field and The user setting the property does not have rights to add the field to the list then the property
|
|
549
|
+
will not be set for the item."""
|
|
550
|
+
return self.properties.get("IconOverlay", None)
|
|
551
|
+
|
|
516
552
|
@property
|
|
517
553
|
def id(self):
|
|
518
554
|
# type: () -> Optional[int]
|
|
519
555
|
"""Gets a value that specifies the list item identifier."""
|
|
520
556
|
return self.properties.get("Id", None)
|
|
521
557
|
|
|
558
|
+
@property
|
|
559
|
+
def server_redirected_embed_uri(self):
|
|
560
|
+
# type: () -> Optional[str]
|
|
561
|
+
"""Returns the path for previewing a document in the browser, often in an interactive way, if
|
|
562
|
+
that feature exists."""
|
|
563
|
+
return self.properties.get("ServerRedirectedEmbedUri", None)
|
|
564
|
+
|
|
565
|
+
@property
|
|
566
|
+
def server_redirected_embed_url(self):
|
|
567
|
+
# type: () -> Optional[str]
|
|
568
|
+
"""Returns the URL for previewing a document in the browser, often in an interactive way, if that feature
|
|
569
|
+
exists. This is currently used in the hovering panel of search results and document library.
|
|
570
|
+
"""
|
|
571
|
+
return self.properties.get("ServerRedirectedEmbedUri", None)
|
|
572
|
+
|
|
573
|
+
@property
|
|
574
|
+
def client_title(self):
|
|
575
|
+
# type: () -> Optional[str]
|
|
576
|
+
""" """
|
|
577
|
+
return self.properties.get("Client_Title", None)
|
|
578
|
+
|
|
522
579
|
@property
|
|
523
580
|
def compliance_info(self):
|
|
524
581
|
return self.properties.get("ComplianceInfo", ListItemComplianceInfo())
|
|
@@ -589,6 +646,7 @@ class ListItem(SecurableObject):
|
|
|
589
646
|
"ComplianceInfo": self.compliance_info,
|
|
590
647
|
"OData__dlc_DocIdUrl": self.doc_id_url,
|
|
591
648
|
"EffectiveBasePermissions": self.effective_base_permissions,
|
|
649
|
+
"EffectiveBasePermissionsForUI": self.effective_base_permissions_for_ui,
|
|
592
650
|
"GetDlpPolicyTip": self.get_dlp_policy_tip,
|
|
593
651
|
"FieldValuesAsHtml": self.field_values_as_html,
|
|
594
652
|
"LikedByInformation": self.liked_by_information,
|
|
@@ -13,6 +13,7 @@ from office365.sharepoint.changes.collection import ChangeCollection
|
|
|
13
13
|
from office365.sharepoint.changes.log_item_query import ChangeLogItemQuery
|
|
14
14
|
from office365.sharepoint.changes.query import ChangeQuery
|
|
15
15
|
from office365.sharepoint.changes.token import ChangeToken
|
|
16
|
+
from office365.sharepoint.compliance.tag import ComplianceTag
|
|
16
17
|
from office365.sharepoint.contenttypes.collection import ContentTypeCollection
|
|
17
18
|
from office365.sharepoint.customactions.element_collection import (
|
|
18
19
|
CustomActionElementCollection,
|
|
@@ -174,6 +175,23 @@ class List(SecurableObject):
|
|
|
174
175
|
self.context.add_query(qry)
|
|
175
176
|
return return_type
|
|
176
177
|
|
|
178
|
+
def get_compliance_tag(self):
|
|
179
|
+
""" """
|
|
180
|
+
from office365.sharepoint.compliance.store_proxy import SPPolicyStoreProxy
|
|
181
|
+
|
|
182
|
+
return_type = ClientResult(self.context, ComplianceTag())
|
|
183
|
+
list_folder = self.root_folder
|
|
184
|
+
|
|
185
|
+
def _get_compliance_tag():
|
|
186
|
+
SPPolicyStoreProxy.get_list_compliance_tag(
|
|
187
|
+
self.context,
|
|
188
|
+
list_folder.serverRelativeUrl,
|
|
189
|
+
return_type=return_type,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
list_folder.ensure_property("ServerRelativeUrl", _get_compliance_tag)
|
|
193
|
+
return return_type
|
|
194
|
+
|
|
177
195
|
def get_metadata_navigation_settings(self):
|
|
178
196
|
"""Retrieves the configured metadata navigation settings for the list."""
|
|
179
197
|
from office365.sharepoint.navigation.metadata_settings import (
|
|
@@ -407,7 +425,7 @@ class List(SecurableObject):
|
|
|
407
425
|
:param ClientResult[dict] return_type: The return type.
|
|
408
426
|
"""
|
|
409
427
|
if return_type is None:
|
|
410
|
-
return_type = ClientResult(context,
|
|
428
|
+
return_type = ClientResult(context, {})
|
|
411
429
|
payload = {
|
|
412
430
|
"listFullUrl": list_full_url,
|
|
413
431
|
"parameters": parameters,
|
|
@@ -433,7 +451,7 @@ class List(SecurableObject):
|
|
|
433
451
|
:param ClientResult[dict] return_type: The return type.
|
|
434
452
|
"""
|
|
435
453
|
if return_type is None:
|
|
436
|
-
return_type = ClientResult(context,
|
|
454
|
+
return_type = ClientResult(context, {})
|
|
437
455
|
payload = {
|
|
438
456
|
"parameters": parameters,
|
|
439
457
|
}
|
|
@@ -758,7 +776,7 @@ class List(SecurableObject):
|
|
|
758
776
|
:param int render_options: Specifies the type of output to return.
|
|
759
777
|
:param bool expand_groups: Specifies whether to expand the grouping or not.
|
|
760
778
|
"""
|
|
761
|
-
return_type = ClientResult(self.context,
|
|
779
|
+
return_type = ClientResult(self.context, {})
|
|
762
780
|
if view_xml is None:
|
|
763
781
|
view_xml = "<View/>"
|
|
764
782
|
payload = {
|
|
@@ -825,6 +843,22 @@ class List(SecurableObject):
|
|
|
825
843
|
self.ensure_property("RootFolder", _loaded)
|
|
826
844
|
return self
|
|
827
845
|
|
|
846
|
+
def set_exempt_from_block_download_of_non_viewable_files(self, value):
|
|
847
|
+
"""
|
|
848
|
+
Method to set the ExemptFromBlockDownloadOfNonViewableFiles property.
|
|
849
|
+
Ensures that only a tenant administrator can set the exemption.
|
|
850
|
+
"""
|
|
851
|
+
qry = ServiceOperationQuery(
|
|
852
|
+
self,
|
|
853
|
+
"SetExemptFromBlockDownloadOfNonViewableFiles",
|
|
854
|
+
[value],
|
|
855
|
+
None,
|
|
856
|
+
None,
|
|
857
|
+
None,
|
|
858
|
+
)
|
|
859
|
+
self.context.add_query(qry)
|
|
860
|
+
return self
|
|
861
|
+
|
|
828
862
|
@property
|
|
829
863
|
def id(self):
|
|
830
864
|
# type: () -> Optional[str]
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
from office365.runtime.client_value import ClientValue
|
|
2
|
+
from office365.runtime.types.collections import StringCollection
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class BatchCreationResult(ClientValue):
|
|
5
6
|
""""""
|
|
7
|
+
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
created_count=None,
|
|
11
|
+
created_task_id_list=None,
|
|
12
|
+
error_code=None,
|
|
13
|
+
error_message=None,
|
|
14
|
+
field_error=None,
|
|
15
|
+
processing_milliseconds=None,
|
|
16
|
+
total_count=None,
|
|
17
|
+
):
|
|
18
|
+
self.CreatedCount = created_count
|
|
19
|
+
self.CreatedTaskIdList = StringCollection(created_task_id_list)
|
|
20
|
+
self.ErrorCode = error_code
|
|
21
|
+
self.ErrorMessage = error_message
|
|
22
|
+
self.FieldError = field_error
|
|
23
|
+
self.ProcessingMilliseconds = processing_milliseconds
|
|
24
|
+
self.TotalCount = total_count
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def entity_type_name(self):
|
|
28
|
+
# type: () -> str
|
|
29
|
+
return "Microsoft.Online.SharePoint.MigrationCenter.Common.BatchCreationResult"
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
1
2
|
from office365.sharepoint.migrationcenter.common.task_entity_data import (
|
|
2
3
|
MigrationTaskEntityData,
|
|
3
4
|
)
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class MigrationTask(MigrationTaskEntityData):
|
|
8
|
+
|
|
9
|
+
def __init__(self, context):
|
|
10
|
+
static_path = ResourcePath(
|
|
11
|
+
"Microsoft.Online.SharePoint.MigrationCenter.Service.MigrationTask"
|
|
12
|
+
)
|
|
13
|
+
super(MigrationTask, self).__init__(context, static_path)
|
|
14
|
+
|
|
7
15
|
@property
|
|
8
16
|
def entity_type_name(self):
|
|
9
17
|
return "Microsoft.Online.SharePoint.MigrationCenter.Service.MigrationTask"
|
|
@@ -2,4 +2,10 @@ from office365.runtime.client_value import ClientValue
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class MigrationTaskDefinition(ClientValue):
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
@property
|
|
7
|
+
def entity_type_name(self):
|
|
8
|
+
# type: () -> str
|
|
9
|
+
return (
|
|
10
|
+
"Microsoft.Online.SharePoint.MigrationCenter.Common.MigrationTaskDefinition"
|
|
11
|
+
)
|
|
File without changes
|