Office365-REST-Python-Client 2.5.5__py3-none-any.whl → 2.5.7__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.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +6 -6
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +269 -222
- office365/booking/virtualevents/__init__.py +0 -0
- office365/booking/virtualevents/root.py +5 -0
- office365/communications/calls/participant.py +4 -5
- office365/directory/administrative_unit.py +9 -2
- office365/directory/applications/application.py +3 -3
- office365/directory/applications/roles/assignment_collection.py +1 -1
- office365/directory/applications/roles/collection.py +6 -2
- office365/directory/applications/roles/role.py +1 -1
- office365/directory/audit/provisioning/object_summary.py +30 -1
- office365/directory/authentication/method_configuration.py +9 -0
- office365/directory/authentication/method_mode_detail.py +8 -0
- office365/directory/authentication/method_target.py +5 -0
- office365/directory/authentication/methods/fido.py +8 -0
- office365/directory/authentication/methods/password.py +23 -0
- office365/directory/authentication/strength_root.py +5 -0
- office365/directory/certificates/auth_configuration.py +1 -3
- office365/directory/custom_security_attribute_definition.py +7 -0
- office365/directory/device_local_credential_info.py +6 -0
- office365/directory/directory.py +40 -12
- office365/directory/groups/group.py +2 -6
- office365/directory/identities/conditional_access_root.py +10 -1
- office365/directory/identities/container.py +3 -9
- office365/directory/identities/providers/builtin_identity.py +3 -2
- office365/directory/identities/providers/saml_or_wsfed.py +4 -5
- office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
- office365/directory/identitygovernance/governance.py +14 -3
- office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/root.py +5 -0
- office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
- office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
- office365/directory/insights/resource_reference.py +1 -1
- office365/directory/key_credential.py +3 -0
- office365/directory/licenses/assignment_state.py +26 -2
- office365/directory/licenses/details.py +4 -3
- office365/directory/licenses/subscribed_sku.py +8 -10
- office365/directory/object_collection.py +40 -25
- office365/directory/password_credential.py +3 -0
- office365/directory/permissions/default_user_role.py +5 -0
- office365/directory/permissions/grants/condition_set.py +4 -2
- office365/directory/permissions/grants/oauth2.py +7 -10
- office365/directory/policies/authorization.py +50 -3
- office365/directory/policies/device_registration.py +6 -0
- office365/directory/policies/permission_grant.py +2 -0
- office365/directory/policies/root.py +13 -0
- office365/directory/profile_photo.py +6 -6
- office365/directory/protection/riskyusers/risky_user.py +4 -4
- office365/directory/rolemanagement/resource_action.py +10 -0
- office365/directory/rolemanagement/role_permission.py +10 -0
- office365/directory/security/alerts/alert.py +5 -7
- office365/directory/security/attacksimulations/landing_page.py +5 -0
- office365/directory/security/attacksimulations/operation.py +5 -0
- office365/directory/security/attacksimulations/report.py +8 -1
- office365/directory/security/attacksimulations/root.py +33 -0
- office365/directory/security/attacksimulations/users/__init__.py +0 -0
- office365/directory/security/attacksimulations/users/details.py +5 -0
- office365/directory/security/hunting_query_results.py +5 -0
- office365/directory/security/incidents/incident.py +8 -13
- office365/directory/security/security.py +20 -3
- office365/directory/security/threatintelligence/article_indicator.py +7 -0
- office365/directory/serviceprincipals/service_principal.py +6 -12
- office365/directory/synchronization/schema.py +16 -0
- office365/directory/synchronization/synchronization.py +2 -0
- office365/directory/users/activities/history_item.py +3 -2
- office365/directory/users/user.py +60 -10
- office365/entity_collection.py +3 -2
- office365/graph_client.py +58 -30
- office365/intune/audit/event.py +1 -3
- office365/intune/audit/event_collection.py +1 -1
- office365/intune/devices/alternative_security_id.py +4 -0
- office365/intune/devices/collection.py +57 -0
- office365/intune/devices/device.py +38 -10
- office365/intune/devices/management/management.py +12 -0
- office365/intune/organizations/organization.py +1 -0
- office365/onedrive/analytics/item_activity_stat.py +9 -0
- office365/onedrive/analytics/item_analytics.py +1 -0
- office365/onedrive/contenttypes/content_type.py +4 -12
- office365/onedrive/driveitems/driveItem.py +76 -7
- office365/onedrive/files/hashes.py +5 -0
- office365/onedrive/lists/collection.py +2 -2
- office365/onedrive/lists/list.py +1 -1
- office365/onedrive/operations/long_running.py +6 -6
- office365/onedrive/operations/rich_long_running.py +4 -3
- office365/onedrive/permissions/collection.py +1 -14
- office365/onedrive/sharepoint_settings.py +6 -6
- office365/onedrive/sitepages/__init__.py +0 -0
- office365/onedrive/sitepages/base.py +29 -0
- office365/onedrive/sitepages/canvas_layout.py +43 -0
- office365/onedrive/sitepages/collection.py +32 -0
- office365/onedrive/sitepages/horizontal_section.py +23 -0
- office365/onedrive/sitepages/horizontal_section_column.py +27 -0
- office365/onedrive/sitepages/site_page.py +116 -0
- office365/onedrive/sitepages/title_area.py +13 -0
- office365/onedrive/sitepages/vertical_section.py +27 -0
- office365/onedrive/sitepages/web_part.py +5 -0
- office365/onedrive/sites/site.py +10 -0
- office365/onedrive/sites/sites_with_root.py +1 -3
- office365/onedrive/termstore/store.py +2 -4
- office365/onedrive/termstore/terms/collection.py +1 -2
- office365/onedrive/workbooks/charts/data_labels.py +13 -1
- office365/onedrive/workbooks/filter.py +9 -0
- office365/onedrive/workbooks/filter_criteria.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +6 -3
- office365/onedrive/workbooks/functions/result.py +2 -0
- office365/onedrive/workbooks/operations/workbook.py +7 -10
- office365/onedrive/workbooks/tables/pivot_table.py +9 -9
- office365/onedrive/workbooks/tables/sort.py +5 -0
- office365/onedrive/workbooks/tables/table.py +57 -0
- office365/onedrive/workbooks/worksheets/collection.py +0 -6
- office365/onedrive/workbooks/worksheets/protection.py +22 -1
- office365/onedrive/workbooks/worksheets/protection_options.py +7 -0
- office365/outlook/calendar/calendar.py +1 -3
- office365/outlook/calendar/events/event.py +45 -0
- office365/outlook/calendar/permissions/permission.py +7 -7
- office365/outlook/calendar/place.py +5 -3
- office365/outlook/calendar/response_status.py +11 -0
- office365/outlook/calendar/rooms/room.py +14 -0
- office365/outlook/mail/attachments/collection.py +6 -1
- office365/outlook/mail/automatic_replies_mailtips.py +5 -0
- office365/outlook/mail/conversation.py +1 -3
- office365/outlook/mail/folders/folder.py +1 -3
- office365/outlook/mail/messages/message.py +1 -1
- office365/outlook/mail/tips.py +17 -0
- office365/planner/plans/plan.py +11 -1
- office365/reports/root.py +83 -4
- office365/runtime/auth/authentication_context.py +12 -2
- office365/runtime/auth/providers/acs_token_provider.py +10 -7
- office365/runtime/auth/sts_profile.py +0 -1
- office365/runtime/client_object.py +18 -14
- office365/runtime/client_object_collection.py +8 -23
- office365/runtime/client_request_exception.py +1 -3
- office365/runtime/client_result.py +11 -14
- office365/runtime/client_runtime_context.py +11 -21
- office365/runtime/odata/json_format.py +7 -9
- office365/runtime/odata/request.py +12 -2
- office365/runtime/odata/v3/batch_request.py +7 -15
- office365/runtime/odata/v4/batch_request.py +13 -21
- office365/runtime/queries/upload_session.py +5 -0
- office365/runtime/types/event_handler.py +1 -1
- office365/search/entity.py +3 -2
- office365/sharepoint/activities/facets/delete.py +1 -1
- office365/sharepoint/activities/tracked_item_service.py +2 -3
- office365/sharepoint/administration/web_application.py +8 -7
- office365/sharepoint/alerts/collection.py +2 -1
- office365/sharepoint/attachments/attachment.py +3 -9
- office365/sharepoint/audit/audit.py +3 -2
- office365/sharepoint/changes/alert.py +4 -3
- office365/sharepoint/changes/collection.py +7 -10
- office365/sharepoint/changes/content_type.py +4 -4
- office365/sharepoint/changes/field.py +4 -5
- office365/sharepoint/changes/item.py +34 -7
- office365/sharepoint/changes/list.py +4 -4
- office365/sharepoint/changes/user.py +5 -6
- office365/sharepoint/client_context.py +4 -2
- office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
- office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
- office365/sharepoint/contenttypes/content_type.py +13 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -7
- office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
- office365/sharepoint/directory/helper.py +2 -0
- office365/sharepoint/entity.py +12 -5
- office365/sharepoint/entity_collection.py +1 -3
- office365/sharepoint/eventreceivers/definition.py +8 -12
- office365/sharepoint/features/collection.py +1 -2
- office365/sharepoint/features/definitions/definition.py +6 -3
- office365/sharepoint/fields/calculated.py +8 -14
- office365/sharepoint/fields/collection.py +46 -13
- office365/sharepoint/fields/computed.py +4 -5
- office365/sharepoint/fields/currency.py +7 -11
- office365/sharepoint/fields/date_time.py +4 -8
- office365/sharepoint/fields/field.py +6 -16
- office365/sharepoint/fields/lookup.py +11 -9
- office365/sharepoint/fields/multi_choice.py +8 -12
- office365/sharepoint/fields/multi_line_text.py +10 -14
- office365/sharepoint/fields/number.py +13 -26
- office365/sharepoint/fields/rating_scale.py +6 -10
- office365/sharepoint/fields/related_field.py +10 -17
- office365/sharepoint/fields/url.py +4 -5
- office365/sharepoint/fields/user.py +10 -9
- office365/sharepoint/files/collection.py +17 -15
- office365/sharepoint/files/file.py +30 -23
- office365/sharepoint/folders/collection.py +22 -5
- office365/sharepoint/folders/coloring.py +11 -9
- office365/sharepoint/folders/coloring_information.py +38 -0
- office365/sharepoint/folders/folder.py +23 -25
- office365/sharepoint/likes/liked_by_information.py +7 -10
- office365/sharepoint/likes/user_entity.py +6 -8
- office365/sharepoint/listitems/form_update_value.py +17 -1
- office365/sharepoint/listitems/listitem.py +2 -2
- office365/sharepoint/lists/bloom_filter.py +5 -7
- office365/sharepoint/lists/creatables_info.py +5 -6
- office365/sharepoint/lists/list.py +24 -9
- office365/sharepoint/lists/template.py +7 -4
- office365/sharepoint/lists/template_collection.py +2 -4
- office365/sharepoint/marketplace/app_metadata.py +14 -23
- office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
- office365/sharepoint/migrationcenter/deploy_status.py +5 -0
- office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
- office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
- office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
- office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
- office365/sharepoint/navigation/node.py +5 -8
- office365/sharepoint/permissions/irm/effective_settings.py +6 -8
- office365/sharepoint/permissions/irm/file_settings.py +8 -6
- office365/sharepoint/permissions/irm/settings.py +25 -43
- office365/sharepoint/portal/groups/site_manager.py +6 -7
- office365/sharepoint/principal/principal.py +2 -4
- office365/sharepoint/publishing/embed_data_v1.py +8 -15
- office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
- office365/sharepoint/publishing/primary_city_time.py +8 -9
- office365/sharepoint/publishing/video/service_discoverer.py +4 -3
- office365/sharepoint/pushnotifications/subscriber.py +11 -15
- office365/sharepoint/recyclebin/item.py +107 -7
- office365/sharepoint/sharing/information.py +9 -0
- office365/sharepoint/sharing/link_info.py +6 -0
- office365/sharepoint/sharing/object_sharing_settings.py +24 -46
- office365/sharepoint/sharing/permission_collection.py +18 -0
- office365/sharepoint/sharing/permission_information.py +5 -5
- office365/sharepoint/sharing/result.py +1 -0
- office365/sharepoint/sitedesigns/run.py +4 -3
- office365/sharepoint/sites/script_safe_domain.py +5 -0
- office365/sharepoint/sites/site.py +17 -20
- office365/sharepoint/taxonomy/field.py +32 -21
- office365/sharepoint/taxonomy/field_value.py +1 -1
- office365/sharepoint/taxonomy/groups/group.py +12 -1
- office365/sharepoint/taxonomy/sets/set.py +6 -0
- office365/sharepoint/taxonomy/stores/store.py +4 -2
- office365/sharepoint/teams/channel.py +6 -6
- office365/sharepoint/tenant/administration/endpoints.py +4 -3
- office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
- office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
- office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
- office365/sharepoint/tenant/administration/sites/properties.py +0 -1
- office365/sharepoint/tenant/administration/spo_operation.py +4 -4
- office365/sharepoint/tenant/administration/tenant.py +1 -0
- office365/sharepoint/tenant/insights/report.py +11 -0
- office365/sharepoint/tenant/insights/report_manager.py +5 -0
- office365/sharepoint/tenant/insights/report_metadata.py +5 -0
- office365/sharepoint/tenant/settings.py +4 -3
- office365/sharepoint/translation/sync_translator.py +3 -2
- office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
- office365/sharepoint/usercustomactions/action.py +12 -20
- office365/sharepoint/userprofiles/followed_content.py +6 -10
- office365/sharepoint/userprofiles/people_manager.py +0 -1
- office365/sharepoint/userprofiles/person_properties.py +14 -30
- office365/sharepoint/userprofiles/personal_cache.py +4 -3
- office365/sharepoint/userprofiles/properties_for_user.py +4 -5
- office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
- office365/sharepoint/utilities/move_copy_util.py +19 -19
- office365/sharepoint/utilities/upload_status.py +7 -10
- office365/sharepoint/views/field_collection.py +9 -14
- office365/sharepoint/views/view.py +43 -64
- office365/sharepoint/webhooks/subscription.py +11 -19
- office365/sharepoint/webparts/webpart.py +3 -1
- office365/sharepoint/webs/information_collection.py +1 -1
- office365/sharepoint/webs/modernize_homepage_result.py +4 -3
- office365/sharepoint/webs/regional_settings.py +79 -16
- office365/sharepoint/webs/template.py +3 -5
- office365/sharepoint/webs/web.py +24 -25
- office365/teams/apps/catalog.py +1 -0
- office365/teams/chats/chat.py +4 -0
- office365/teams/operations/async_operation.py +5 -7
- office365/teams/schedule/schedule.py +6 -2
- office365/runtime/paths/item.py +0 -8
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import json
|
|
2
|
+
from typing import Any, Dict, Iterator, List, Optional, Tuple
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
+
from requests import Response
|
|
4
5
|
from requests.structures import CaseInsensitiveDict
|
|
5
6
|
|
|
6
7
|
from office365.runtime.http.http_method import HttpMethod
|
|
7
8
|
from office365.runtime.http.request_options import RequestOptions
|
|
8
9
|
from office365.runtime.odata.request import ODataRequest
|
|
10
|
+
from office365.runtime.queries.batch import BatchQuery
|
|
11
|
+
from office365.runtime.queries.client_query import ClientQuery
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
class ODataV4BatchRequest(ODataRequest):
|
|
12
15
|
"""JSON batch request"""
|
|
13
16
|
|
|
14
17
|
def build_request(self, query):
|
|
15
|
-
|
|
16
|
-
Builds a batch request
|
|
17
|
-
|
|
18
|
-
:type query: office365.runtime.queries.batch.BatchQuery
|
|
19
|
-
"""
|
|
18
|
+
# type: (BatchQuery) -> RequestOptions
|
|
19
|
+
"""Builds a batch request"""
|
|
20
20
|
request = RequestOptions(query.url)
|
|
21
21
|
request.method = HttpMethod.Post
|
|
22
22
|
request.ensure_header("Content-Type", "application/json")
|
|
@@ -25,24 +25,19 @@ class ODataV4BatchRequest(ODataRequest):
|
|
|
25
25
|
return request
|
|
26
26
|
|
|
27
27
|
def process_response(self, response, query):
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
:type response: requests.Response
|
|
31
|
-
:type query: office365.runtime.queries.batch.BatchQuery
|
|
32
|
-
"""
|
|
28
|
+
# type: (Response, BatchQuery) -> None
|
|
29
|
+
"""Parses an HTTP response."""
|
|
33
30
|
for sub_qry, sub_resp in self._extract_response(response, query):
|
|
34
31
|
sub_resp.raise_for_status()
|
|
35
32
|
super(ODataV4BatchRequest, self).process_response(sub_resp, sub_qry)
|
|
36
33
|
|
|
37
34
|
@staticmethod
|
|
38
35
|
def _extract_response(response, query):
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
:type query: office365.runtime.queries.batch.BatchQuery
|
|
42
|
-
"""
|
|
36
|
+
# type: (Response, BatchQuery) -> Iterator[Tuple[ClientQuery, Response]]
|
|
37
|
+
""" """
|
|
43
38
|
json_responses = response.json()
|
|
44
39
|
for json_resp in json_responses["responses"]:
|
|
45
|
-
resp =
|
|
40
|
+
resp = Response()
|
|
46
41
|
resp.status_code = int(json_resp["status"])
|
|
47
42
|
resp.headers = CaseInsensitiveDict(json_resp["headers"])
|
|
48
43
|
resp._content = json.dumps(json_resp["body"]).encode("utf-8")
|
|
@@ -65,11 +60,8 @@ class ODataV4BatchRequest(ODataRequest):
|
|
|
65
60
|
|
|
66
61
|
@staticmethod
|
|
67
62
|
def _normalize_request(query, query_id, depends_on=None):
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
:type query_id: str
|
|
71
|
-
:type depends_on: list[str] or None
|
|
72
|
-
"""
|
|
63
|
+
# type: (ClientQuery, str, Optional[List[str]]) -> Dict[str, Any]
|
|
64
|
+
""" """
|
|
73
65
|
request = query.build_request()
|
|
74
66
|
allowed_props = ["id", "method", "headers", "url", "body"]
|
|
75
67
|
request_json = dict(
|
|
@@ -4,6 +4,11 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class UploadSessionQuery(ServiceOperationQuery):
|
|
7
|
+
"""
|
|
8
|
+
The UploadSession query provides information about how to upload large files to OneDrive, OneDrive for
|
|
9
|
+
Business, or SharePoint document libraries
|
|
10
|
+
"""
|
|
11
|
+
|
|
7
12
|
def __init__(self, binding_type, parameters_type):
|
|
8
13
|
super(UploadSessionQuery, self).__init__(
|
|
9
14
|
binding_type, "createUploadSession", None, parameters_type
|
office365/search/entity.py
CHANGED
|
@@ -38,8 +38,9 @@ class SearchEntity(Entity):
|
|
|
38
38
|
# self.context.pending_request().map_json(search_hit.resource, resource)
|
|
39
39
|
# search_hit.set_property("resource", resource)
|
|
40
40
|
|
|
41
|
-
def _process_response():
|
|
42
|
-
|
|
41
|
+
def _process_response(result):
|
|
42
|
+
# type: (ClientResult[ClientValueCollection[SearchResponse]]) -> None
|
|
43
|
+
for item in result.value:
|
|
43
44
|
for hcs in item.hitsContainers:
|
|
44
45
|
[_patch_hit(hit) for hit in hcs.hits]
|
|
45
46
|
|
|
@@ -3,15 +3,14 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
3
3
|
from office365.sharepoint.activities.tracked_item_updates_request import (
|
|
4
4
|
TrackedItemUpdatesRequest,
|
|
5
5
|
)
|
|
6
|
+
from office365.sharepoint.client_context import ClientContext
|
|
6
7
|
from office365.sharepoint.entity import Entity
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class TrackedItemService(Entity):
|
|
10
11
|
@staticmethod
|
|
11
12
|
def get_tracked_item_updates_for_user(context):
|
|
12
|
-
|
|
13
|
-
:type context: office365.sharepoint.client_context.ClientContext
|
|
14
|
-
"""
|
|
13
|
+
# type: (ClientContext) -> ClientResult[str]
|
|
15
14
|
return_type = ClientResult(context)
|
|
16
15
|
payload = {"request": TrackedItemUpdatesRequest()}
|
|
17
16
|
qry = ServiceOperationQuery(
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
4
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
5
|
+
from office365.sharepoint.client_context import ClientContext
|
|
3
6
|
from office365.sharepoint.entity import Entity
|
|
4
7
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
5
8
|
from office365.sharepoint.sites.site import Site
|
|
@@ -8,10 +11,8 @@ from office365.sharepoint.sites.site import Site
|
|
|
8
11
|
class WebApplication(Entity):
|
|
9
12
|
@staticmethod
|
|
10
13
|
def lookup(context, request_uri):
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
:type request_uri str
|
|
14
|
-
"""
|
|
14
|
+
# type: (ClientContext, str) -> WebApplication
|
|
15
|
+
""" """
|
|
15
16
|
return_type = WebApplication(context)
|
|
16
17
|
payload = {"requestUri": request_uri}
|
|
17
18
|
qry = ServiceOperationQuery(
|
|
@@ -22,13 +23,13 @@ class WebApplication(Entity):
|
|
|
22
23
|
|
|
23
24
|
@property
|
|
24
25
|
def outbound_mail_sender_address(self):
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"""
|
|
26
|
+
# type: () -> Optional[str]
|
|
27
|
+
""" """
|
|
28
28
|
return self.properties.get("OutboundMailSenderAddress", None)
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def sites(self):
|
|
32
|
+
# type: () -> EntityCollection[Site]
|
|
32
33
|
return self.properties.get(
|
|
33
34
|
"Sites",
|
|
34
35
|
EntityCollection(
|
|
@@ -5,7 +5,7 @@ from office365.sharepoint.alerts.alert import Alert
|
|
|
5
5
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class AlertCollection(EntityCollection):
|
|
8
|
+
class AlertCollection(EntityCollection[Alert]):
|
|
9
9
|
"""Content Type resource collection"""
|
|
10
10
|
|
|
11
11
|
def __init__(self, context, resource_path=None):
|
|
@@ -26,6 +26,7 @@ class AlertCollection(EntityCollection):
|
|
|
26
26
|
return return_type
|
|
27
27
|
|
|
28
28
|
def contains(self, id_alert):
|
|
29
|
+
# type: (str) -> ClientResult[bool]
|
|
29
30
|
"""
|
|
30
31
|
Returns true if the given alert exists in the alert collection. False otherwise.
|
|
31
32
|
|
|
@@ -76,16 +76,12 @@ class Attachment(Entity):
|
|
|
76
76
|
@property
|
|
77
77
|
def file_name(self):
|
|
78
78
|
# type: () -> Optional[str]
|
|
79
|
-
"""
|
|
80
|
-
Specifies the file name of the list item attachment.
|
|
81
|
-
"""
|
|
79
|
+
"""Specifies the file name of the list item attachment."""
|
|
82
80
|
return self.properties.get("FileName", None)
|
|
83
81
|
|
|
84
82
|
@property
|
|
85
83
|
def file_name_as_path(self):
|
|
86
|
-
"""
|
|
87
|
-
The file name of the attachment as a SP.ResourcePath.
|
|
88
|
-
"""
|
|
84
|
+
"""The file name of the attachment as a SP.ResourcePath."""
|
|
89
85
|
return self.properties.get("FileNameAsPath", SPResPath())
|
|
90
86
|
|
|
91
87
|
@property
|
|
@@ -96,9 +92,7 @@ class Attachment(Entity):
|
|
|
96
92
|
|
|
97
93
|
@property
|
|
98
94
|
def server_relative_path(self):
|
|
99
|
-
"""
|
|
100
|
-
The server-relative-path of the attachment.
|
|
101
|
-
"""
|
|
95
|
+
"""The server-relative-path of the attachment."""
|
|
102
96
|
return self.properties.get("ServerRelativePath", SPResPath())
|
|
103
97
|
|
|
104
98
|
@property
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
@@ -8,11 +10,10 @@ class Audit(Entity):
|
|
|
8
10
|
|
|
9
11
|
@property
|
|
10
12
|
def allow_designer(self):
|
|
13
|
+
# type: () -> Optional[bool]
|
|
11
14
|
"""
|
|
12
15
|
Specifies whether a designer can be used on this site collection.
|
|
13
16
|
See Microsoft.SharePoint.Client.Web.AllowDesignerForCurrentUser, which is the scalar property used
|
|
14
17
|
to determine the behavior for the current user. The default, if not disabled on the Web application, is "true".
|
|
15
|
-
|
|
16
|
-
:rtype: bool or None
|
|
17
18
|
"""
|
|
18
19
|
return self.properties.get("AllowDesigner", 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,7 +8,6 @@ class ChangeAlert(Change):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def alert_id(self):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""Identifies the changed alert."""
|
|
12
13
|
return self.properties.get("AlertId", None)
|
|
@@ -9,15 +9,12 @@ class ChangeCollection(EntityCollection[Change]):
|
|
|
9
9
|
super(ChangeCollection, self).__init__(context, Change, resource_path)
|
|
10
10
|
|
|
11
11
|
def set_property(self, key, value, persist_changes=False):
|
|
12
|
-
self.
|
|
12
|
+
self._resolve_change_type(value)
|
|
13
13
|
super(ChangeCollection, self).set_property(key, value)
|
|
14
14
|
|
|
15
|
-
def
|
|
16
|
-
|
|
17
|
-
Resolves a change type
|
|
18
|
-
|
|
19
|
-
:type properties: dict
|
|
20
|
-
"""
|
|
15
|
+
def _resolve_change_type(self, properties):
|
|
16
|
+
# type: (dict) -> None
|
|
17
|
+
"""Resolves a change type"""
|
|
21
18
|
from office365.sharepoint.changes.alert import ChangeAlert
|
|
22
19
|
from office365.sharepoint.changes.content_type import ChangeContentType
|
|
23
20
|
from office365.sharepoint.changes.field import ChangeField
|
|
@@ -27,10 +24,10 @@ class ChangeCollection(EntityCollection[Change]):
|
|
|
27
24
|
from office365.sharepoint.changes.user import ChangeUser
|
|
28
25
|
from office365.sharepoint.changes.web import ChangeWeb
|
|
29
26
|
|
|
30
|
-
if "
|
|
31
|
-
self._item_type = ChangeList
|
|
32
|
-
elif "ItemId" in properties and "ListId" in properties:
|
|
27
|
+
if "ItemId" in properties and "ListId" in properties:
|
|
33
28
|
self._item_type = ChangeItem
|
|
29
|
+
elif "ListId" in properties and "WebId" in properties:
|
|
30
|
+
self._item_type = ChangeList
|
|
34
31
|
elif "WebId" in properties:
|
|
35
32
|
self._item_type = ChangeWeb
|
|
36
33
|
elif "UserId" in properties:
|
|
@@ -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,6 @@ class ChangeContentType(Change):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def content_type_id(self):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
:rtype: str or None
|
|
12
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""Identifies the content type that has changed."""
|
|
13
13
|
return self.properties.get("ContentTypeId", 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,9 +8,6 @@ class ChangeField(Change):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def field_id(self):
|
|
9
|
-
|
|
10
|
-
Identifies the changed field
|
|
11
|
-
|
|
12
|
-
:rtype: str or None
|
|
13
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""Identifies the changed field"""
|
|
14
13
|
return self.properties.get("FieldId", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
2
4
|
from office365.sharepoint.changes.change import Change
|
|
3
5
|
from office365.sharepoint.contenttypes.content_type_id import ContentTypeId
|
|
@@ -9,19 +11,38 @@ class ChangeItem(Change):
|
|
|
9
11
|
|
|
10
12
|
@property
|
|
11
13
|
def activity_type(self):
|
|
12
|
-
|
|
13
|
-
Returns activity type defined in ChangeActivityType
|
|
14
|
-
:rtype: str or None
|
|
15
|
-
"""
|
|
14
|
+
# type: () -> Optional[str]
|
|
15
|
+
"""Returns activity type defined in ChangeActivityType"""
|
|
16
16
|
return self.properties.get("ActivityType", None)
|
|
17
17
|
|
|
18
18
|
@property
|
|
19
19
|
def content_type_id(self):
|
|
20
|
-
"""
|
|
21
|
-
Specifies an identifier for the content type
|
|
22
|
-
"""
|
|
20
|
+
"""Specifies an identifier for the content type"""
|
|
23
21
|
return self.properties.get("ContentTypeId", ContentTypeId())
|
|
24
22
|
|
|
23
|
+
@property
|
|
24
|
+
def file_type(self):
|
|
25
|
+
# type: () -> Optional[str]
|
|
26
|
+
"""Returns the list item’s file type."""
|
|
27
|
+
return self.properties.get("FileType", None)
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def item_id(self):
|
|
31
|
+
# type: () -> Optional[int]
|
|
32
|
+
"""Identifies the changed item."""
|
|
33
|
+
return self.properties.get("ItemId", None)
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def is_recycle_bin_operation(self):
|
|
37
|
+
# type: () -> Optional[bool]
|
|
38
|
+
return self.properties.get("IsRecycleBinOperation", None)
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def server_relative_url(self):
|
|
42
|
+
# type: () -> Optional[str]
|
|
43
|
+
"""Specifies the server-relative URL of the item."""
|
|
44
|
+
return self.properties.get("ServerRelativeUrl", None)
|
|
45
|
+
|
|
25
46
|
@property
|
|
26
47
|
def shared_by_user(self):
|
|
27
48
|
"""Return the sharedBy User Information in sharing action for change log."""
|
|
@@ -34,6 +55,12 @@ class ChangeItem(Change):
|
|
|
34
55
|
"SharedWithUsers", ClientValueCollection(SharedWithUser)
|
|
35
56
|
)
|
|
36
57
|
|
|
58
|
+
@property
|
|
59
|
+
def unique_id(self):
|
|
60
|
+
# type: () -> Optional[str]
|
|
61
|
+
"""The Document identifier of the item."""
|
|
62
|
+
return self.properties.get("UniqueId", None)
|
|
63
|
+
|
|
37
64
|
def get_property(self, name, default_value=None):
|
|
38
65
|
if default_value is None:
|
|
39
66
|
property_mapping = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
4
|
from office365.sharepoint.changes.change import Change
|
|
3
5
|
|
|
@@ -19,10 +21,8 @@ class ChangeList(Change):
|
|
|
19
21
|
|
|
20
22
|
@property
|
|
21
23
|
def list_id(self):
|
|
22
|
-
|
|
23
|
-
Identifies the changed list
|
|
24
|
-
:rtype: str or None
|
|
25
|
-
"""
|
|
24
|
+
# type: () -> Optional[str]
|
|
25
|
+
"""Identifies the changed list"""
|
|
26
26
|
return self.properties.get("ListId", None)
|
|
27
27
|
|
|
28
28
|
@property
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.changes.change import Change
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,21 +8,18 @@ class ChangeUser(Change):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def activate(self):
|
|
11
|
+
# type: () -> Optional[bool]
|
|
9
12
|
"""
|
|
10
13
|
Specifies whether a user has changed from an inactive state to an active state.
|
|
11
14
|
|
|
12
15
|
When a user is added to a site and only has browse permissions, the user is in an inactive state.
|
|
13
16
|
However, once the user can author list items, add documents, be assigned tasks, or make any contribution
|
|
14
17
|
to the site, the user is in an active state.
|
|
15
|
-
|
|
16
|
-
:rtype: bool or None
|
|
17
18
|
"""
|
|
18
19
|
return self.properties.get("Activate", None)
|
|
19
20
|
|
|
20
21
|
@property
|
|
21
22
|
def user_id(self):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:rtype: str or None
|
|
25
|
-
"""
|
|
23
|
+
# type: () -> Optional[str]
|
|
24
|
+
"""Uniquely identifies the changed user."""
|
|
26
25
|
return self.properties.get("UserId", None)
|
|
@@ -82,8 +82,9 @@ class ClientContext(ClientRuntimeContext):
|
|
|
82
82
|
cert_path=None,
|
|
83
83
|
private_key=None,
|
|
84
84
|
scopes=None,
|
|
85
|
+
passphrase=None,
|
|
85
86
|
):
|
|
86
|
-
# type: (str, str, str, Optional[str], Optional[str], Optional[List[str]]) -> Self
|
|
87
|
+
# type: (str, str, str, Optional[str], Optional[str], Optional[List[str]], Optional[str]) -> Self
|
|
87
88
|
"""
|
|
88
89
|
Creates authenticated SharePoint context via certificate credentials
|
|
89
90
|
|
|
@@ -93,9 +94,10 @@ class ClientContext(ClientRuntimeContext):
|
|
|
93
94
|
:param str thumbprint: Hex encoded thumbprint of the certificate.
|
|
94
95
|
:param str client_id: The OAuth client id of the calling application.
|
|
95
96
|
:param list[str] or None scopes: Scopes requested to access a protected API (a resource)
|
|
97
|
+
:param str passphrase: Passphrase if the private_key is encrypted
|
|
96
98
|
"""
|
|
97
99
|
self.authentication_context.with_client_certificate(
|
|
98
|
-
tenant, client_id, thumbprint, cert_path, private_key, scopes
|
|
100
|
+
tenant, client_id, thumbprint, cert_path, private_key, scopes, passphrase
|
|
99
101
|
)
|
|
100
102
|
return self
|
|
101
103
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,9 +8,8 @@ class ComponentContextInfo(Entity):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def serialized_data(self):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
""""""
|
|
12
13
|
return self.properties.get("SerializedData", None)
|
|
13
14
|
|
|
14
15
|
@property
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class SPMachineLearningEnabled(Entity):
|
|
5
7
|
@property
|
|
6
8
|
def is_syntex_payg_enabled(self):
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"""
|
|
9
|
+
# type: () -> Optional[bool]
|
|
10
|
+
""" """
|
|
10
11
|
return self.properties.get("IsSyntexPAYGEnabled", None)
|
|
11
12
|
|
|
12
13
|
@property
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_result import ClientResult
|
|
2
4
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
3
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -73,16 +75,14 @@ class SPMachineLearningHub(Entity):
|
|
|
73
75
|
|
|
74
76
|
@property
|
|
75
77
|
def is_default_content_center(self):
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"""
|
|
78
|
+
# type: () -> Optional[bool]
|
|
79
|
+
""" """
|
|
79
80
|
return self.properties.get("IsDefaultContentCenter", None)
|
|
80
81
|
|
|
81
82
|
@property
|
|
82
83
|
def machine_learning_capture_enabled(self):
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"""
|
|
84
|
+
# type: () -> Optional[bool]
|
|
85
|
+
""" """
|
|
86
86
|
return self.properties.get("MachineLearningCaptureEnabled", None)
|
|
87
87
|
|
|
88
88
|
@property
|
|
@@ -5,7 +5,7 @@ from office365.sharepoint.contentcenter.machinelearning.models.model import (
|
|
|
5
5
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class SPMachineLearningModelCollection(EntityCollection):
|
|
8
|
+
class SPMachineLearningModelCollection(EntityCollection[SPMachineLearningModel]):
|
|
9
9
|
def __init__(self, context, resource_path=None):
|
|
10
10
|
super(SPMachineLearningModelCollection, self).__init__(
|
|
11
11
|
context, SPMachineLearningModel, resource_path
|
|
@@ -20,7 +20,7 @@ class ContentType(Entity):
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
def __str__(self):
|
|
23
|
-
return self.name
|
|
23
|
+
return self.name or self.entity_type_name
|
|
24
24
|
|
|
25
25
|
def __repr__(self):
|
|
26
26
|
return self.string_id or str(self.id) or self.entity_type_name
|
|
@@ -111,6 +111,12 @@ class ContentType(Entity):
|
|
|
111
111
|
"""
|
|
112
112
|
return self.properties.get("Id", ContentTypeId())
|
|
113
113
|
|
|
114
|
+
@property
|
|
115
|
+
def scope(self):
|
|
116
|
+
# type: () -> Optional[str]
|
|
117
|
+
"""Specifies a server-relative path to the content type scope of the content type."""
|
|
118
|
+
return self.properties.get("Scope", None)
|
|
119
|
+
|
|
114
120
|
@property
|
|
115
121
|
def sealed(self):
|
|
116
122
|
# type: () -> Optional[bool]
|
|
@@ -142,6 +148,12 @@ class ContentType(Entity):
|
|
|
142
148
|
item forms"""
|
|
143
149
|
return self.properties.get("NewFormClientSideComponentProperties", None)
|
|
144
150
|
|
|
151
|
+
@property
|
|
152
|
+
def new_form_url(self):
|
|
153
|
+
# type: () -> Optional[str]
|
|
154
|
+
"""Specifies the URL of a custom new form to use for list items that have been assigned the content type."""
|
|
155
|
+
return self.properties.get("NewFormUrl", None)
|
|
156
|
+
|
|
145
157
|
@property
|
|
146
158
|
def description(self):
|
|
147
159
|
# type: () -> Optional[str]
|
|
@@ -7,7 +7,7 @@ from office365.sharepoint.entity_collection import EntityCollection
|
|
|
7
7
|
from office365.sharepoint.fields.field import Field
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class FieldLinkCollection(EntityCollection):
|
|
10
|
+
class FieldLinkCollection(EntityCollection[FieldLink]):
|
|
11
11
|
"""Specifies a Collection for field links."""
|
|
12
12
|
|
|
13
13
|
def __init__(self, context, resource_path=None):
|
|
@@ -21,10 +21,8 @@ class FieldLinkCollection(EntityCollection):
|
|
|
21
21
|
:param str or office365.sharepoint.fields.field.Field field: Specifies the internal name of the field or type
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
def
|
|
25
|
-
|
|
26
|
-
:type field_internal_name: str
|
|
27
|
-
"""
|
|
24
|
+
def _add(field_internal_name):
|
|
25
|
+
# type: (str) -> None
|
|
28
26
|
return_type.set_property("FieldInternalName", field_internal_name)
|
|
29
27
|
qry = CreateEntityQuery(self, return_type, return_type)
|
|
30
28
|
self.context.add_query(qry)
|
|
@@ -34,11 +32,11 @@ class FieldLinkCollection(EntityCollection):
|
|
|
34
32
|
if isinstance(field, Field):
|
|
35
33
|
|
|
36
34
|
def _field_loaded():
|
|
37
|
-
|
|
35
|
+
_add(field.internal_name)
|
|
38
36
|
|
|
39
37
|
field.ensure_property("InternalName", _field_loaded)
|
|
40
38
|
else:
|
|
41
|
-
|
|
39
|
+
_add(field)
|
|
42
40
|
return return_type
|
|
43
41
|
|
|
44
42
|
def get_by_id(self, _id):
|