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,39 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
3
|
+
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
4
|
+
from office365.sharepoint.entity import Entity
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from office365.sharepoint.client_context import ClientContext
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MigrationUrlParser(Entity):
|
|
11
|
+
""""""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
context,
|
|
16
|
+
user_input_destination_url,
|
|
17
|
+
retrive_all_lists,
|
|
18
|
+
retrieve_all_lists_sub_folders,
|
|
19
|
+
force_my_site_default_list,
|
|
20
|
+
migration_type,
|
|
21
|
+
current_context_site_subscription_id,
|
|
22
|
+
):
|
|
23
|
+
# type: (ClientContext, str, bool, bool, bool, str, str) -> None
|
|
24
|
+
static_path = ServiceOperationPath(
|
|
25
|
+
"SP.AppContextSite",
|
|
26
|
+
{
|
|
27
|
+
"userInputDestinationUrl": user_input_destination_url,
|
|
28
|
+
"retriveAllLists": retrive_all_lists,
|
|
29
|
+
"retrieveAllListsSubFolders": retrieve_all_lists_sub_folders,
|
|
30
|
+
"forceMySiteDefaultList": force_my_site_default_list,
|
|
31
|
+
"migrationType": migration_type,
|
|
32
|
+
"currentContextSiteSubscriptionId": current_context_site_subscription_id,
|
|
33
|
+
},
|
|
34
|
+
)
|
|
35
|
+
super(MigrationUrlParser, self).__init__(context, static_path)
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def entity_type_name(self):
|
|
39
|
+
return "Microsoft.Online.SharePoint.MigrationCenter.Common.MigrationUrlParser"
|
|
@@ -3,6 +3,7 @@ from office365.sharepoint.entity import Entity
|
|
|
3
3
|
from office365.sharepoint.migrationcenter.service.performance.data import (
|
|
4
4
|
PerformanceDataCollection,
|
|
5
5
|
)
|
|
6
|
+
from office365.sharepoint.migrationcenter.service.teams import MigrationCenterTeams
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class MigrationCenterServices(Entity):
|
|
@@ -16,7 +17,7 @@ class MigrationCenterServices(Entity):
|
|
|
16
17
|
@property
|
|
17
18
|
def performance_data(self):
|
|
18
19
|
# type: () -> PerformanceDataCollection
|
|
19
|
-
"""
|
|
20
|
+
""""""
|
|
20
21
|
return self.properties.get(
|
|
21
22
|
"PerformanceData",
|
|
22
23
|
PerformanceDataCollection(
|
|
@@ -24,6 +25,17 @@ class MigrationCenterServices(Entity):
|
|
|
24
25
|
),
|
|
25
26
|
)
|
|
26
27
|
|
|
28
|
+
@property
|
|
29
|
+
def teams(self):
|
|
30
|
+
# type: () -> PerformanceDataCollection
|
|
31
|
+
""""""
|
|
32
|
+
return self.properties.get(
|
|
33
|
+
"Teams",
|
|
34
|
+
MigrationCenterTeams(
|
|
35
|
+
self.context, ResourcePath("Teams", self.resource_path)
|
|
36
|
+
),
|
|
37
|
+
)
|
|
38
|
+
|
|
27
39
|
@property
|
|
28
40
|
def entity_type_name(self):
|
|
29
41
|
return "Microsoft.Online.SharePoint.MigrationCenter.Service.MigrationCenterServices"
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Optional
|
|
2
2
|
|
|
3
3
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
4
|
from office365.sharepoint.entity import Entity
|
|
5
5
|
from office365.sharepoint.translation.user_resource import UserResource
|
|
6
6
|
|
|
7
|
-
if TYPE_CHECKING:
|
|
8
|
-
from office365.sharepoint.navigation.node_collection import NavigationNodeCollection
|
|
9
|
-
|
|
10
7
|
|
|
11
8
|
class NavigationNode(Entity):
|
|
12
9
|
"""
|
|
@@ -22,8 +19,12 @@ class NavigationNode(Entity):
|
|
|
22
19
|
|
|
23
20
|
@property
|
|
24
21
|
def children(self):
|
|
25
|
-
# type: () -> NavigationNodeCollection
|
|
22
|
+
# type: () -> 'NavigationNodeCollection'
|
|
26
23
|
"""Gets the collection of child nodes of the navigation node."""
|
|
24
|
+
from office365.sharepoint.navigation.node_collection import (
|
|
25
|
+
NavigationNodeCollection,
|
|
26
|
+
)
|
|
27
|
+
|
|
27
28
|
return self.properties.get(
|
|
28
29
|
"Children",
|
|
29
30
|
NavigationNodeCollection(
|
|
@@ -68,7 +69,7 @@ class NavigationNode(Entity):
|
|
|
68
69
|
|
|
69
70
|
@property
|
|
70
71
|
def parent_collection(self):
|
|
71
|
-
# type: () -> NavigationNodeCollection
|
|
72
|
+
# type: () -> 'NavigationNodeCollection'
|
|
72
73
|
return self._parent_collection
|
|
73
74
|
|
|
74
75
|
@property
|
|
@@ -86,13 +87,3 @@ class NavigationNode(Entity):
|
|
|
86
87
|
property_mapping = {"TitleResource": self.title_resource}
|
|
87
88
|
default_value = property_mapping.get(name, None)
|
|
88
89
|
return super(NavigationNode, self).get_property(name, default_value)
|
|
89
|
-
|
|
90
|
-
def set_property(self, name, value, persist_changes=True):
|
|
91
|
-
super(NavigationNode, self).set_property(name, value, persist_changes)
|
|
92
|
-
# fallback: create a new resource path
|
|
93
|
-
if self._resource_path is None:
|
|
94
|
-
if name == "Id":
|
|
95
|
-
self._resource_path = self.parent_collection.get_by_id(
|
|
96
|
-
value
|
|
97
|
-
).resource_path
|
|
98
|
-
return self
|
|
@@ -2,6 +2,17 @@ from office365.runtime.client_value import ClientValue
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class GroupCreationContext(ClientValue):
|
|
5
|
+
|
|
6
|
+
def __init__(
|
|
7
|
+
self,
|
|
8
|
+
preferred_language=None,
|
|
9
|
+
sensitivity_label_policy_mandatory=None,
|
|
10
|
+
site_path=None,
|
|
11
|
+
):
|
|
12
|
+
self.PreferredLanguage = preferred_language
|
|
13
|
+
self.SensitivityLabelPolicyMandatory = sensitivity_label_policy_mandatory
|
|
14
|
+
self.SitePath = site_path
|
|
15
|
+
|
|
5
16
|
@property
|
|
6
17
|
def entity_type_name(self):
|
|
7
18
|
return "Microsoft.SharePoint.Portal.GroupCreationContext"
|
|
@@ -26,7 +26,7 @@ class GroupService(Entity):
|
|
|
26
26
|
request.url += "?id='{0}'&hash={1}".format(group_id, image_hash)
|
|
27
27
|
request.method = HttpMethod.Get
|
|
28
28
|
|
|
29
|
-
self.context.add_query(qry).
|
|
29
|
+
self.context.add_query(qry).before_query_execute(_create_request)
|
|
30
30
|
return return_type
|
|
31
31
|
|
|
32
32
|
def sync_group_properties(self):
|
|
@@ -119,7 +119,7 @@ class GroupSiteManager(ClientObject):
|
|
|
119
119
|
request.method = HttpMethod.Get
|
|
120
120
|
request.url += "?groupId='{0}'".format(group_id)
|
|
121
121
|
|
|
122
|
-
self.context.add_query(qry).
|
|
122
|
+
self.context.add_query(qry).before_query_execute(_construct_request)
|
|
123
123
|
return return_type
|
|
124
124
|
|
|
125
125
|
def get_current_user_joined_teams(
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
from office365.sharepoint.publishing.pages.fields_data import SitePageFieldsData
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class CampaignPublicationMailDraftData(ClientValue):
|
|
6
|
+
""" """
|
|
7
|
+
|
|
8
|
+
@property
|
|
9
|
+
def entity_type_name(self):
|
|
10
|
+
return "SP.Publishing.CampaignPublicationMailDraftData"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CampaignPublicationFieldsData(SitePageFieldsData):
|
|
14
|
+
""" """
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def entity_type_name(self):
|
|
18
|
+
return "SP.Publishing.CampaignPublicationFieldsData"
|
|
@@ -3,6 +3,26 @@ from office365.runtime.client_value import ClientValue
|
|
|
3
3
|
|
|
4
4
|
class SitePageCoAuthState(ClientValue):
|
|
5
5
|
|
|
6
|
+
def __init__(
|
|
7
|
+
self,
|
|
8
|
+
action=None,
|
|
9
|
+
has_reached_minor_versions_limit=None,
|
|
10
|
+
is_new_session=None,
|
|
11
|
+
is_partition_flushed=None,
|
|
12
|
+
lock_action=None,
|
|
13
|
+
lock_duration=None,
|
|
14
|
+
overwrite_existing_version=None,
|
|
15
|
+
shared_lock_id=None,
|
|
16
|
+
):
|
|
17
|
+
self.Action = action
|
|
18
|
+
self.HasReachedMinorVersionsLimit = has_reached_minor_versions_limit
|
|
19
|
+
self.IsNewSession = is_new_session
|
|
20
|
+
self.IsPartitionFlushed = is_partition_flushed
|
|
21
|
+
self.LockAction = lock_action
|
|
22
|
+
self.LockDuration = lock_duration
|
|
23
|
+
self.OverwriteExistingVersion = overwrite_existing_version
|
|
24
|
+
self.SharedLockId = shared_lock_id
|
|
25
|
+
|
|
6
26
|
@property
|
|
7
27
|
def entity_type_name(self):
|
|
8
28
|
return "SP.Publishing.SitePageCoAuthState"
|
|
@@ -129,13 +129,3 @@ class SitePageMetadata(Entity):
|
|
|
129
129
|
}
|
|
130
130
|
default_value = property_mapping.get(name, None)
|
|
131
131
|
return super(SitePageMetadata, self).get_property(name, default_value)
|
|
132
|
-
|
|
133
|
-
def set_property(self, name, value, persist_changes=True):
|
|
134
|
-
if name == "Id":
|
|
135
|
-
if self._resource_path is None:
|
|
136
|
-
self._resource_path = self.parent_collection.get_by_id(
|
|
137
|
-
value
|
|
138
|
-
).resource_path
|
|
139
|
-
else:
|
|
140
|
-
self._resource_path.patch(value)
|
|
141
|
-
return super(SitePageMetadata, self).set_property(name, value, persist_changes)
|
|
@@ -2,10 +2,14 @@ from typing import Optional
|
|
|
2
2
|
|
|
3
3
|
from office365.runtime.client_result import ClientResult
|
|
4
4
|
from office365.runtime.client_value import ClientValue
|
|
5
|
+
from office365.runtime.client_value_collection import ClientValueCollection
|
|
5
6
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
6
7
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
7
8
|
from office365.runtime.types.collections import StringCollection
|
|
8
9
|
from office365.sharepoint.publishing.pages.coauth_state import SitePageCoAuthState
|
|
10
|
+
from office365.sharepoint.publishing.pages.dependency_metadata import (
|
|
11
|
+
SitePageDependencyMetadata,
|
|
12
|
+
)
|
|
9
13
|
from office365.sharepoint.publishing.pages.fields_data import SitePageFieldsData
|
|
10
14
|
from office365.sharepoint.publishing.pages.metadata import SitePageMetadata
|
|
11
15
|
from office365.sharepoint.translation.status_collection import (
|
|
@@ -56,6 +60,25 @@ class SitePage(SitePageMetadata):
|
|
|
56
60
|
self.context.add_query(qry)
|
|
57
61
|
return self
|
|
58
62
|
|
|
63
|
+
def get_dependency_metadata(self):
|
|
64
|
+
""" """
|
|
65
|
+
return_type = ClientResult(
|
|
66
|
+
self.context, ClientValueCollection(SitePageDependencyMetadata)
|
|
67
|
+
)
|
|
68
|
+
qry = ServiceOperationQuery(
|
|
69
|
+
self, "GetDependencyMetadata", return_type=return_type
|
|
70
|
+
)
|
|
71
|
+
self.context.add_query(qry)
|
|
72
|
+
return return_type
|
|
73
|
+
|
|
74
|
+
def get_version(self, version_id):
|
|
75
|
+
""" """
|
|
76
|
+
return_type = SitePage(self.context, self.resource_path)
|
|
77
|
+
qry = ServiceOperationQuery(
|
|
78
|
+
self, "GetVersion", [version_id], None, None, return_type
|
|
79
|
+
)
|
|
80
|
+
self.context.add_query(qry)
|
|
81
|
+
|
|
59
82
|
def save_page(
|
|
60
83
|
self, title, canvas_content=None, banner_image_url=None, topic_header=None
|
|
61
84
|
):
|
|
@@ -218,6 +241,12 @@ class SitePage(SitePageMetadata):
|
|
|
218
241
|
"""Gets the CanvasContent1 for the current Site Page"""
|
|
219
242
|
return self.properties.get("CanvasContent1", None)
|
|
220
243
|
|
|
244
|
+
@property
|
|
245
|
+
def language(self):
|
|
246
|
+
# type: () -> Optional[str]
|
|
247
|
+
"""Gets the Language for the Site Page."""
|
|
248
|
+
return self.properties.get("Language", None)
|
|
249
|
+
|
|
221
250
|
@canvas_content.setter
|
|
222
251
|
def canvas_content(self, value):
|
|
223
252
|
# type: (str) -> None
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING, Optional
|
|
2
2
|
|
|
3
3
|
from office365.runtime.client_result import ClientResult
|
|
4
|
+
from office365.runtime.client_value_collection import ClientValueCollection
|
|
4
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
5
6
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
6
7
|
from office365.runtime.types.collections import StringCollection
|
|
7
8
|
from office365.sharepoint.administration.orgassets.org_assets import OrgAssets
|
|
9
|
+
from office365.sharepoint.clientsidecomponent.query_result import (
|
|
10
|
+
SPClientSideComponentQueryResult,
|
|
11
|
+
)
|
|
8
12
|
from office365.sharepoint.entity import Entity
|
|
9
13
|
from office365.sharepoint.files.file import File
|
|
10
14
|
from office365.sharepoint.publishing.file_picker_options import FilePickerOptions
|
|
@@ -50,10 +54,11 @@ class SitePageService(Entity):
|
|
|
50
54
|
def entity_type_name(self):
|
|
51
55
|
return "SP.Publishing.SitePageService"
|
|
52
56
|
|
|
53
|
-
def create_page(self, title):
|
|
54
|
-
# type: (str) -> SitePage
|
|
57
|
+
def create_page(self, title, language=None):
|
|
58
|
+
# type: (str, Optional[str]) -> SitePage
|
|
55
59
|
"""Create a new sitePage in the site pages list in a site.
|
|
56
60
|
:param str title: The title of Site Page
|
|
61
|
+
:param str language: The language of the Site Page.
|
|
57
62
|
"""
|
|
58
63
|
|
|
59
64
|
def _page_created(return_type):
|
|
@@ -61,13 +66,13 @@ class SitePageService(Entity):
|
|
|
61
66
|
|
|
62
67
|
def _draft_saved(result):
|
|
63
68
|
# type: (ClientResult[bool]) -> None
|
|
64
|
-
|
|
69
|
+
return_type.get()
|
|
65
70
|
|
|
66
71
|
return_type.save_draft(title=title).after_execute(
|
|
67
72
|
_draft_saved, execute_first=True
|
|
68
73
|
)
|
|
69
74
|
|
|
70
|
-
return self.pages.add().after_execute(_page_created)
|
|
75
|
+
return self.pages.add().after_execute(_page_created)
|
|
71
76
|
|
|
72
77
|
def create_and_publish_page(self, title):
|
|
73
78
|
"""
|
|
@@ -155,8 +160,24 @@ class SitePageService(Entity):
|
|
|
155
160
|
return return_type
|
|
156
161
|
|
|
157
162
|
@staticmethod
|
|
158
|
-
def get_available_full_page_applications(
|
|
159
|
-
|
|
163
|
+
def get_available_full_page_applications(
|
|
164
|
+
context, include_errors=None, project=None
|
|
165
|
+
):
|
|
166
|
+
return_type = ClientResult(
|
|
167
|
+
context, ClientValueCollection(SPClientSideComponentQueryResult)
|
|
168
|
+
)
|
|
169
|
+
params = {"includeErrors": include_errors, "project": project}
|
|
170
|
+
qry = ServiceOperationQuery(
|
|
171
|
+
SitePageService(context),
|
|
172
|
+
"GetAvailableFullPageApplications",
|
|
173
|
+
None,
|
|
174
|
+
params,
|
|
175
|
+
None,
|
|
176
|
+
return_type,
|
|
177
|
+
True,
|
|
178
|
+
)
|
|
179
|
+
context.add_query(qry)
|
|
180
|
+
return return_type
|
|
160
181
|
|
|
161
182
|
@staticmethod
|
|
162
183
|
def is_file_picker_external_image_search_enabled(context):
|
|
@@ -2,6 +2,6 @@ from office365.sharepoint.entity_collection import EntityCollection
|
|
|
2
2
|
from office365.sharepoint.publishing.pages.topics.topic import TopicSitePage
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class TopicPageCollection(EntityCollection):
|
|
5
|
+
class TopicPageCollection(EntityCollection[TopicSitePage]):
|
|
6
6
|
def __init__(self, context, resource_path=None):
|
|
7
7
|
super(TopicPageCollection, self).__init__(context, TopicSitePage, resource_path)
|
office365/sharepoint/request.py
CHANGED
|
@@ -15,7 +15,11 @@ from office365.runtime.odata.v3.json_light_format import JsonLightFormat
|
|
|
15
15
|
|
|
16
16
|
class SharePointRequest(ODataRequest):
|
|
17
17
|
def __init__(
|
|
18
|
-
self,
|
|
18
|
+
self,
|
|
19
|
+
base_url,
|
|
20
|
+
environment=AzureEnvironment.Global,
|
|
21
|
+
allow_ntlm=False,
|
|
22
|
+
browser_mode=False,
|
|
19
23
|
):
|
|
20
24
|
"""
|
|
21
25
|
:param str base_url: Absolute Web or Site Url
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_result import ClientResult
|
|
2
4
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
5
|
from office365.sharepoint.entity import Entity
|
|
4
6
|
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from office365.sharepoint.client_context import ClientContext
|
|
9
|
+
|
|
5
10
|
|
|
6
11
|
class TenantCrawlVersionsInfoProvider(Entity):
|
|
7
12
|
"""Retrieves information about crawl versions for a tenant in SharePoint"""
|
|
8
13
|
|
|
14
|
+
@staticmethod
|
|
15
|
+
def create(context):
|
|
16
|
+
# type: (ClientContext) -> TenantCrawlVersionsInfoProvider
|
|
17
|
+
return_type = TenantCrawlVersionsInfoProvider(context)
|
|
18
|
+
qry = ServiceOperationQuery(
|
|
19
|
+
return_type, "Create", None, None, None, return_type
|
|
20
|
+
)
|
|
21
|
+
qry.static = True
|
|
22
|
+
context.add_query(qry)
|
|
23
|
+
return return_type
|
|
24
|
+
|
|
9
25
|
def disable_crawl_versions(self, site_id):
|
|
10
26
|
"""
|
|
11
27
|
:param str site_id:
|
|
@@ -7,6 +7,24 @@ class AccessRequestSettings(ClientValue):
|
|
|
7
7
|
Microsoft.SharePoint.Client.Sharing.SecurableObjectExtensions.GetSharingInformation() call on a list item.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
has_pending_access_requests=None,
|
|
13
|
+
pending_access_requests_link=None,
|
|
14
|
+
requires_access_approval=None,
|
|
15
|
+
):
|
|
16
|
+
"""
|
|
17
|
+
:param bool has_pending_access_requests: Boolean indicating whether there are pending access requests
|
|
18
|
+
for the list item.
|
|
19
|
+
:param str pending_access_requests_link: The full URL to the access requests page for the list item,
|
|
20
|
+
or an empty string if the link is not available.
|
|
21
|
+
:param bool requires_access_approval: Boolean indicating whether the current user’s access on the list item
|
|
22
|
+
requires approval from admin for sharing to others.
|
|
23
|
+
"""
|
|
24
|
+
self.hasPendingAccessRequests = has_pending_access_requests
|
|
25
|
+
self.pendingAccessRequestsLink = pending_access_requests_link
|
|
26
|
+
self.requiresAccessApproval = requires_access_approval
|
|
27
|
+
|
|
10
28
|
@property
|
|
11
29
|
def entity_type_name(self):
|
|
12
30
|
return "SP.Sharing.AccessRequestSettings"
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
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.entity import Entity
|
|
5
|
+
from office365.sharepoint.sites.manager.types import TopSiteFilesResult
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SiteManagerService(Entity):
|
|
9
|
+
""" """
|
|
10
|
+
|
|
11
|
+
def __init__(self, context):
|
|
12
|
+
static_path = ResourcePath(
|
|
13
|
+
"Microsoft.SharePoint.SiteManager.SiteManagerService"
|
|
14
|
+
)
|
|
15
|
+
super(SiteManagerService, self).__init__(context, static_path)
|
|
16
|
+
|
|
17
|
+
def top_files(self, max_count=None):
|
|
18
|
+
""" """
|
|
19
|
+
return_type = ClientResult(self.context, TopSiteFilesResult())
|
|
20
|
+
payload = {"maxCount": max_count}
|
|
21
|
+
qry = ServiceOperationQuery(
|
|
22
|
+
self,
|
|
23
|
+
"TopFiles",
|
|
24
|
+
None,
|
|
25
|
+
payload,
|
|
26
|
+
None,
|
|
27
|
+
return_type,
|
|
28
|
+
)
|
|
29
|
+
self.context.add_query(qry)
|
|
30
|
+
return return_type
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def entity_type_name(self):
|
|
34
|
+
return "Microsoft.SharePoint.SiteManager.SiteManagerService"
|
|
@@ -57,6 +57,50 @@ class Site(Entity):
|
|
|
57
57
|
def __init__(self, context, resource_path=None):
|
|
58
58
|
super(Site, self).__init__(context, ResourcePath("Site", resource_path))
|
|
59
59
|
|
|
60
|
+
def create_migration_ingestion_job(
|
|
61
|
+
self,
|
|
62
|
+
g_web_id,
|
|
63
|
+
azure_container_source_uri,
|
|
64
|
+
azure_container_manifest_uri,
|
|
65
|
+
azure_queue_report_uri,
|
|
66
|
+
ingestion_task_key,
|
|
67
|
+
):
|
|
68
|
+
""" """
|
|
69
|
+
return_type = ClientResult(self.context, str())
|
|
70
|
+
payload = {
|
|
71
|
+
"gWebId": g_web_id,
|
|
72
|
+
"azureContainerSourceUri": azure_container_source_uri,
|
|
73
|
+
"azureContainerManifestUri": azure_container_manifest_uri,
|
|
74
|
+
"azureQueueReportUri": azure_queue_report_uri,
|
|
75
|
+
"ingestionTaskKey": ingestion_task_key,
|
|
76
|
+
}
|
|
77
|
+
qry = ServiceOperationQuery(
|
|
78
|
+
self, "CreateMigrationIngestionJob", None, payload, None, return_type
|
|
79
|
+
)
|
|
80
|
+
self.context.add_query(qry)
|
|
81
|
+
return return_type
|
|
82
|
+
|
|
83
|
+
def create_migration_job(
|
|
84
|
+
self,
|
|
85
|
+
g_web_id=None,
|
|
86
|
+
azure_container_source_uri=None,
|
|
87
|
+
azure_container_manifest_uri=None,
|
|
88
|
+
azure_queue_report_uri=None,
|
|
89
|
+
):
|
|
90
|
+
""" """
|
|
91
|
+
return_type = ClientResult(self.context, str())
|
|
92
|
+
payload = {
|
|
93
|
+
"gWebId": g_web_id,
|
|
94
|
+
"azureContainerSourceUri": azure_container_source_uri,
|
|
95
|
+
"azureContainerManifestUri": azure_container_manifest_uri,
|
|
96
|
+
"azureQueueReportUri": azure_queue_report_uri,
|
|
97
|
+
}
|
|
98
|
+
qry = ServiceOperationQuery(
|
|
99
|
+
self, "CreateMigrationJob", None, payload, None, return_type
|
|
100
|
+
)
|
|
101
|
+
self.context.add_query(qry)
|
|
102
|
+
return return_type
|
|
103
|
+
|
|
60
104
|
def create_preview_site(self, upgrade=None, sendemail=None):
|
|
61
105
|
"""
|
|
62
106
|
Schedules the creation of an evaluation copy of the site collection for the purposes of evaluating an upgrade
|
|
@@ -411,6 +455,16 @@ class Site(Entity):
|
|
|
411
455
|
context.add_query(qry)
|
|
412
456
|
return return_type
|
|
413
457
|
|
|
458
|
+
def is_deletable(self):
|
|
459
|
+
""""""
|
|
460
|
+
return_type = ClientResult(self.context, bool())
|
|
461
|
+
|
|
462
|
+
def _is_site_deletable():
|
|
463
|
+
SPPolicyStoreProxy.is_site_deletable(self.context, self.url, return_type)
|
|
464
|
+
|
|
465
|
+
self.ensure_property("Url", _is_site_deletable)
|
|
466
|
+
return return_type
|
|
467
|
+
|
|
414
468
|
def get_catalog(self, type_catalog):
|
|
415
469
|
"""
|
|
416
470
|
Specifies the list template gallery, site template gallery, Web Part gallery, master page gallery,
|