Office365-REST-Python-Client 2.5.13__py3-none-any.whl → 2.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/METADATA +2 -2
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/RECORD +324 -169
- office365/admin/admin.py +69 -0
- office365/admin/microsoft365_apps.py +5 -0
- office365/admin/people_settings.py +5 -0
- office365/admin/report_settings.py +5 -0
- office365/{onedrive → admin}/sharepoint.py +1 -1
- office365/azure_env.py +60 -0
- office365/booking/business/business.py +13 -0
- office365/booking/business/collection.py +8 -4
- office365/communications/callrecords/collection.py +42 -0
- office365/communications/callrecords/direct_routing_log_row.py +5 -0
- office365/communications/cloud_communications.py +2 -3
- office365/directory/applications/app_ids.py +6 -0
- office365/directory/applications/application.py +16 -2
- office365/directory/applications/required_resource_access.py +23 -0
- office365/directory/applications/resource_access.py +26 -0
- office365/directory/authentication/authentication.py +16 -0
- office365/directory/authentication/method_target.py +2 -1
- office365/directory/authentication/methods/details.py +29 -0
- office365/directory/authentication/methods/microsoft_authenticator.py +6 -0
- office365/directory/authentication/methods/root.py +19 -0
- office365/directory/authentication/methods/sms.py +9 -0
- office365/directory/certificates/self_signed.py +31 -2
- office365/directory/identities/conditional_access_root.py +14 -0
- office365/directory/identitygovernance/privilegedaccess/approval.py +8 -0
- office365/directory/identitygovernance/privilegedaccess/group.py +30 -0
- office365/directory/identitygovernance/privilegedaccess/group_assignment_schedule_instance.py +7 -0
- office365/directory/identitygovernance/privilegedaccess/unified_role_assignment_schedule_request.py +7 -0
- office365/directory/identitygovernance/userconsent/request_collection.py +10 -0
- office365/directory/identitygovernance/workflow/__init__.py +0 -0
- office365/directory/identitygovernance/workflow/base.py +5 -0
- office365/directory/permissions/scope.py +15 -3
- office365/directory/policies/authentication_strength.py +21 -0
- office365/directory/policies/cross_tenant_access.py +13 -0
- office365/directory/policies/feature_rollout.py +16 -0
- office365/directory/policies/root.py +39 -23
- office365/directory/policies/template.py +5 -0
- office365/directory/policies/update_allowed_combinations_result.py +5 -0
- office365/directory/protection/threatassessment/email_file_request.py +20 -0
- office365/directory/protection/threatassessment/request.py +25 -0
- office365/directory/rolemanagement/application.py +15 -0
- office365/directory/rolemanagement/resource_action.py +8 -4
- office365/directory/rolemanagement/role_permission.py +3 -3
- office365/directory/security/alerts/collection.py +49 -0
- office365/directory/security/alerts/evidence.py +2 -1
- office365/directory/security/alerts/malware_evidence.py +5 -0
- office365/directory/security/alerts/process_evidence.py +5 -0
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/attacksimulations/user_coverage.py +3 -0
- office365/directory/security/attacksimulations/users/details.py +6 -1
- office365/directory/security/scorecontrol/__init__.py +0 -0
- office365/directory/security/scorecontrol/profile.py +6 -0
- office365/directory/security/security.py +17 -4
- office365/directory/serviceprincipals/service_principal.py +112 -55
- office365/directory/tenantinformation/__init__.py +0 -0
- office365/directory/tenantinformation/multi_organization.py +11 -0
- office365/directory/tenantinformation/relationship.py +61 -0
- office365/directory/users/insights_settings.py +5 -0
- office365/graph_client.py +52 -132
- office365/graph_request.py +78 -19
- office365/intune/servicecommunications/health/health.py +1 -1
- office365/intune/servicecommunications/issues/issue.py +2 -2
- office365/onedrive/columns/definition.py +1 -1
- office365/onedrive/contenttypes/content_type.py +1 -1
- office365/onedrive/driveitems/driveItem.py +14 -2
- office365/onedrive/driveitems/retention_label.py +33 -0
- office365/onedrive/driveitems/retention_label_settings.py +7 -0
- office365/onedrive/drives/drive.py +1 -1
- office365/onedrive/filestorage/__init__.py +0 -0
- office365/onedrive/filestorage/container.py +7 -0
- office365/onedrive/filestorage/file_storage.py +20 -0
- office365/onedrive/listitems/field_value_set.py +1 -1
- office365/onedrive/listitems/list_item.py +1 -1
- office365/onedrive/lists/list.py +1 -1
- office365/onedrive/recyclebin/__init__.py +0 -0
- office365/onedrive/recyclebin/item.py +6 -0
- office365/onedrive/recyclebin/recyclebin.py +29 -0
- office365/onedrive/recyclebin/settings.py +13 -0
- office365/onedrive/shares/drive_item.py +1 -1
- office365/onedrive/sitepages/base.py +4 -1
- office365/onedrive/sitepages/canvas_layout.py +2 -2
- office365/onedrive/sitepages/collection.py +12 -0
- office365/onedrive/sitepages/sections/__init__.py +0 -0
- office365/onedrive/sitepages/{horizontal_section.py → sections/horizontal.py} +1 -1
- office365/onedrive/sitepages/site_page.py +9 -9
- office365/onedrive/sitepages/webparts/data.py +5 -0
- office365/onedrive/sitepages/webparts/position.py +5 -0
- office365/onedrive/sitepages/webparts/standard.py +9 -0
- office365/onedrive/sitepages/webparts/web_part.py +12 -0
- office365/onedrive/sites/archival_details.py +5 -0
- office365/onedrive/sites/site.py +1 -1
- office365/onedrive/sites/site_collection.py +10 -1
- office365/onedrive/storage/storage.py +10 -0
- office365/onedrive/workbooks/charts/axes.py +41 -1
- office365/onedrive/workbooks/charts/axis.py +5 -0
- office365/onedrive/workbooks/charts/chart.py +64 -5
- office365/onedrive/workbooks/charts/fill.py +5 -0
- office365/onedrive/workbooks/charts/font.py +5 -0
- office365/onedrive/workbooks/charts/legend/__init__.py +0 -0
- office365/onedrive/workbooks/charts/legend/format.py +5 -0
- office365/onedrive/workbooks/charts/legend/legend.py +26 -0
- office365/onedrive/workbooks/charts/point.py +5 -0
- office365/onedrive/workbooks/charts/series/__init__.py +0 -0
- office365/onedrive/workbooks/charts/series/format.py +5 -0
- office365/onedrive/workbooks/charts/series/series.py +31 -0
- office365/onedrive/workbooks/charts/title.py +5 -0
- office365/onedrive/workbooks/filter.py +10 -0
- office365/onedrive/workbooks/filter_criteria.py +3 -3
- office365/onedrive/workbooks/functions/functions.py +23 -0
- office365/onedrive/workbooks/ranges/fill.py +11 -1
- office365/onedrive/workbooks/ranges/range.py +26 -0
- office365/onedrive/workbooks/ranges/view.py +14 -0
- office365/onedrive/workbooks/sort_field.py +8 -3
- office365/onedrive/workbooks/tables/sort.py +20 -0
- office365/onedrive/workbooks/worksheets/worksheet.py +11 -0
- office365/partners/__init__.py +0 -0
- office365/partners/billing/__init__.py +0 -0
- office365/partners/billing/azure_usage.py +17 -0
- office365/partners/billing/billed_usage.py +21 -0
- office365/partners/billing/billing.py +17 -0
- office365/partners/billing/operation.py +5 -0
- office365/partners/partners.py +17 -0
- office365/planner/tasks/check_list_item.py +5 -1
- office365/reports/root.py +9 -0
- office365/reports/userregistration/feature_summary.py +5 -0
- office365/runtime/auth/auth_cookies.py +48 -0
- office365/runtime/auth/authentication_context.py +36 -19
- office365/runtime/auth/entra/__init__.py +0 -0
- office365/runtime/auth/entra/authentication_context.py +165 -0
- office365/runtime/auth/providers/acs_token_provider.py +12 -27
- office365/runtime/auth/providers/saml_token_provider.py +41 -54
- office365/runtime/auth/sts_profile.py +8 -8
- office365/runtime/auth/token_response.py +4 -0
- office365/runtime/client_object.py +15 -7
- office365/runtime/client_object_collection.py +2 -2
- office365/runtime/client_result.py +2 -0
- office365/runtime/client_value.py +1 -1
- office365/runtime/csom/request.py +11 -0
- office365/runtime/types/exceptions.py +18 -0
- office365/search/acronym.py +10 -0
- office365/search/aggregation_option.py +6 -0
- office365/search/answer.py +9 -0
- office365/search/entity.py +67 -14
- office365/search/entity_type.py +28 -0
- office365/search/request.py +32 -3
- office365/sharepoint/administration/custom_fonts_resource.py +5 -0
- office365/sharepoint/administration/sitemove/__init__.py +0 -0
- office365/sharepoint/administration/sitemove/service.py +68 -0
- office365/sharepoint/administration/sitemove/service_info.py +11 -0
- office365/sharepoint/apps/access_requests.py +5 -0
- office365/sharepoint/apps/management/__init__.py +0 -0
- office365/sharepoint/apps/management/principal_info.py +9 -0
- office365/sharepoint/authpolicy/events/collection.py +28 -0
- office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +4 -0
- office365/sharepoint/changes/item.py +15 -0
- office365/sharepoint/client_context.py +61 -37
- office365/sharepoint/directory/group.py +2 -0
- office365/sharepoint/directory/helper.py +2 -0
- office365/sharepoint/directory/provider/provider.py +6 -0
- office365/sharepoint/directory/user.py +20 -0
- office365/sharepoint/documentmanagement/document_id.py +28 -3
- office365/sharepoint/files/file.py +11 -4
- office365/sharepoint/files/publish/__init__.py +0 -0
- office365/sharepoint/files/publish/status.py +9 -0
- office365/sharepoint/files/versions/event.py +9 -0
- office365/sharepoint/flows/connector_result.py +17 -0
- office365/sharepoint/flows/permissions.py +34 -0
- office365/sharepoint/fontpackages/__init__.py +0 -0
- office365/sharepoint/fontpackages/collection.py +26 -0
- office365/sharepoint/fontpackages/creation_parameters.py +5 -0
- office365/sharepoint/fontpackages/font_package.py +5 -0
- office365/sharepoint/fontpackages/oob_settings.py +5 -0
- office365/sharepoint/forms/customization.py +26 -0
- office365/sharepoint/ir/__init__.py +0 -0
- office365/sharepoint/ir/migration.py +5 -0
- office365/sharepoint/listhome/favorite_item.py +9 -0
- office365/sharepoint/listitems/listitem.py +79 -4
- office365/sharepoint/listitems/update_parameters.py +4 -1
- office365/sharepoint/lists/data_parameters.py +5 -0
- office365/sharepoint/lists/exporter.py +73 -0
- office365/sharepoint/lists/list.py +177 -60
- office365/sharepoint/lists/render_data_parameters.py +31 -0
- office365/sharepoint/lists/version_policy_manager.py +5 -0
- office365/sharepoint/marketplace/app_metadata.py +12 -1
- office365/sharepoint/marketplace/app_metadata_collection.py +8 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/instance_info.py +22 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_failed_info.py +5 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_info.py +12 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_response.py +15 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/principals_response.py +5 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/app_request_information.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/app_response_information.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/available_addins_response.py +4 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/card_design.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/card_designs.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/teams_package_download.py +14 -0
- office365/sharepoint/marketplace/tenant/appcatalog/accessor.py +62 -3
- office365/sharepoint/migration/copy_migration_options.py +5 -0
- office365/sharepoint/multigeo/services.py +14 -0
- office365/sharepoint/multigeo/storage_quota.py +9 -0
- office365/sharepoint/policy/license_utilities.py +27 -0
- office365/sharepoint/portal/groups/site_manager.py +32 -0
- office365/sharepoint/portal/project/__init__.py +9 -0
- office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
- office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
- office365/sharepoint/principal/principal.py +6 -0
- office365/sharepoint/publishing/pages/coauth_state.py +8 -0
- office365/sharepoint/publishing/pages/page.py +11 -0
- office365/sharepoint/publishing/pages/stream_content.py +9 -0
- office365/sharepoint/publishing/pages/stream_data.py +8 -0
- office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
- office365/sharepoint/request.py +98 -10
- office365/sharepoint/search/administration/document_crawl_log.py +16 -2
- office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
- office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +1 -1
- office365/sharepoint/search/ranking_labeling.py +1 -0
- office365/sharepoint/search/reports/abandoned_queries.py +11 -1
- office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/item.py +11 -0
- office365/sharepoint/search/reports/noresult/__init__.py +0 -0
- office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/top_queries.py +7 -0
- office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/topqueries/data.py +9 -0
- office365/sharepoint/search/reports/topqueries/item.py +15 -0
- office365/sharepoint/search/scs_endpoint.py +9 -0
- office365/sharepoint/securestore/target_application.py +8 -0
- office365/sharepoint/sharing/document_manager.py +3 -3
- office365/sharepoint/sharing/domain_restriction_settings.py +5 -0
- office365/sharepoint/sharing/information.py +12 -0
- office365/sharepoint/sharing/result.py +21 -0
- office365/sharepoint/sitehealth/result.py +4 -4
- office365/sharepoint/sitehealth/summary.py +5 -5
- office365/sharepoint/sites/copy_job_progress.py +5 -0
- office365/sharepoint/sites/copy_migration_iInfo.py +5 -0
- office365/sharepoint/sites/home/__init__.py +0 -0
- office365/sharepoint/sites/{sph_site.py → home/site.py} +1 -1
- office365/sharepoint/sites/html_field_security_setting.py +5 -0
- office365/sharepoint/sites/site.py +56 -2
- office365/sharepoint/sites/version_policy_manager.py +25 -0
- office365/sharepoint/sitescripts/metadata.py +28 -3
- office365/sharepoint/sitescripts/utility.py +17 -0
- office365/sharepoint/smartcache/__init__.py +0 -0
- office365/sharepoint/smartcache/item.py +9 -0
- office365/sharepoint/tenant/administration/app_service_principal_public.py +17 -0
- office365/sharepoint/tenant/administration/audit/data.py +12 -0
- office365/sharepoint/tenant/administration/audit/unified_record.py +18 -0
- office365/sharepoint/tenant/administration/coms/__init__.py +0 -0
- office365/sharepoint/tenant/administration/coms/messages_fields_data.py +5 -0
- office365/sharepoint/tenant/administration/coms/messages_service_proxy.py +16 -0
- office365/sharepoint/tenant/administration/copilot/__init__.py +0 -0
- office365/sharepoint/tenant/administration/copilot/adaptive_card_config.py +11 -0
- office365/sharepoint/tenant/administration/datagovernance/__init__.py +0 -0
- office365/sharepoint/tenant/administration/{internal/permission_grant.py → datagovernance/client_base.py} +4 -2
- office365/sharepoint/tenant/administration/datagovernance/insight_client.py +82 -0
- office365/sharepoint/tenant/administration/datagovernance/insight_metadata.py +5 -0
- office365/sharepoint/tenant/administration/default_time_zone_id.py +11 -0
- office365/sharepoint/tenant/administration/endpoints.py +53 -2
- office365/sharepoint/tenant/administration/insights/onedrive_site_sharing.py +4 -0
- office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
- office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
- office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
- office365/sharepoint/tenant/administration/internal/appservice/permission_request.py +13 -0
- office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
- office365/sharepoint/tenant/administration/malware/__init__.py +0 -0
- office365/sharepoint/tenant/administration/malware/file.py +18 -0
- office365/sharepoint/tenant/administration/modified_property.py +5 -0
- office365/sharepoint/tenant/administration/policies/app_billing_properties.py +21 -0
- office365/sharepoint/tenant/administration/policies/content_security_configuration.py +9 -0
- office365/sharepoint/tenant/administration/recent_action.py +9 -0
- office365/sharepoint/tenant/administration/reports/__init__.py +0 -0
- office365/sharepoint/tenant/administration/settings_service.py +42 -6
- office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
- office365/sharepoint/tenant/administration/sites/properties.py +78 -0
- office365/sharepoint/tenant/administration/sites/properties_collection.py +19 -0
- office365/sharepoint/tenant/administration/tenant.py +241 -8
- office365/sharepoint/tenant/administration/types.py +89 -2
- office365/sharepoint/tenant/cdn_api.py +3 -1
- office365/sharepoint/tenant/insights/report_manager.py +29 -0
- office365/sharepoint/tenant/management/office365_tenant.py +9 -4
- office365/sharepoint/tenant/settings.py +10 -0
- office365/sharepoint/translation/job_status.py +22 -0
- office365/sharepoint/userprofiles/user_profile.py +6 -0
- office365/sharepoint/utilities/utility.py +6 -0
- office365/sharepoint/viva/connections_page.py +8 -0
- office365/sharepoint/viva/dashboard_configuration.py +8 -0
- office365/sharepoint/viva/employee_engagement.py +39 -1
- office365/sharepoint/viva/resource_get_endpoint.py +8 -0
- office365/sharepoint/viva/resource_link.py +8 -0
- office365/sharepoint/webparts/tile_data.py +21 -0
- office365/sharepoint/webs/dataleakage_prevention_status_info.py +5 -0
- office365/sharepoint/webs/information.py +66 -1
- office365/sharepoint/webs/regional_settings.py +32 -0
- office365/sharepoint/webs/templates/__init__.py +0 -0
- office365/sharepoint/webs/time_zone.py +1 -1
- office365/sharepoint/webs/web.py +137 -0
- office365/sharepoint/workflow/task.py +5 -0
- office365/subscriptions/collection.py +16 -0
- office365/teams/chats/event_message_detail.py +8 -0
- office365/teams/deleted.py +24 -0
- office365/teams/work.py +35 -0
- office365/directory/tenant_relationship.py +0 -23
- office365/onedrive/admin.py +0 -32
- office365/onedrive/workbooks/charts/legend.py +0 -7
- office365/onedrive/workbooks/charts/series.py +0 -5
- office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
- office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/top_level.txt +0 -0
- /office365/{sharepoint/userprofiles/sharedwithme → admin}/__init__.py +0 -0
- /office365/{onedrive → admin}/sharepoint_settings.py +0 -0
- /office365/directory/{tenant_information.py → tenantinformation/information.py} +0 -0
- /office365/{base_item.py → onedrive/base_item.py} +0 -0
- /office365/onedrive/sitepages/{horizontal_section_column.py → sections/horizontal_column.py} +0 -0
- /office365/onedrive/sitepages/{vertical_section.py → sections/vertical.py} +0 -0
- /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
- /office365/sharepoint/sites/{home_sites_details.py → home/details.py} +0 -0
- /office365/sharepoint/sites/{home_site_reference.py → home/reference.py} +0 -0
|
@@ -30,7 +30,7 @@ class ClientObject(Generic[T]):
|
|
|
30
30
|
# type: (ClientRuntimeContext, Optional[ResourcePath], Optional[ClientObjectCollection]) -> None
|
|
31
31
|
"""Base client object which define named properties and relationships of an entity."""
|
|
32
32
|
self._properties = {}
|
|
33
|
-
self.
|
|
33
|
+
self._properties_to_persist = []
|
|
34
34
|
self._query_options = QueryOptions()
|
|
35
35
|
self._parent_collection = parent_collection
|
|
36
36
|
self._context = context
|
|
@@ -43,9 +43,9 @@ class ClientObject(Generic[T]):
|
|
|
43
43
|
self._properties = {
|
|
44
44
|
k: v
|
|
45
45
|
for k, v in self._properties.items()
|
|
46
|
-
if k not in self.
|
|
46
|
+
if k not in self._properties_to_persist
|
|
47
47
|
}
|
|
48
|
-
self.
|
|
48
|
+
self._properties_to_persist = []
|
|
49
49
|
self._query_options = QueryOptions()
|
|
50
50
|
return self
|
|
51
51
|
|
|
@@ -139,8 +139,8 @@ class ClientObject(Generic[T]):
|
|
|
139
139
|
Marks a property as a serializable
|
|
140
140
|
:param str name: A property name
|
|
141
141
|
"""
|
|
142
|
-
if name not in self.
|
|
143
|
-
self.
|
|
142
|
+
if name not in self._properties_to_persist:
|
|
143
|
+
self._properties_to_persist.append(name)
|
|
144
144
|
return self
|
|
145
145
|
|
|
146
146
|
def get_property(self, name, default_value=None):
|
|
@@ -155,7 +155,7 @@ class ClientObject(Generic[T]):
|
|
|
155
155
|
# type: (str|int, P_T, bool) -> Self
|
|
156
156
|
"""Sets property value"""
|
|
157
157
|
if persist_changes:
|
|
158
|
-
self.
|
|
158
|
+
self._properties_to_persist.append(name)
|
|
159
159
|
|
|
160
160
|
typed_value = self.get_property(name)
|
|
161
161
|
if isinstance(typed_value, (ClientObject, ClientValue)):
|
|
@@ -242,6 +242,14 @@ class ClientObject(Generic[T]):
|
|
|
242
242
|
def properties(self):
|
|
243
243
|
return self._properties
|
|
244
244
|
|
|
245
|
+
@property
|
|
246
|
+
def persistable_properties(self):
|
|
247
|
+
return {
|
|
248
|
+
k: self.get_property(k)
|
|
249
|
+
for k in self._properties_to_persist
|
|
250
|
+
if k in self._properties
|
|
251
|
+
}
|
|
252
|
+
|
|
245
253
|
@property
|
|
246
254
|
def parent_collection(self):
|
|
247
255
|
"""Parent collection"""
|
|
@@ -254,7 +262,7 @@ class ClientObject(Generic[T]):
|
|
|
254
262
|
ser_prop_names = [n for n in self._properties.keys()]
|
|
255
263
|
include_control_info = False
|
|
256
264
|
else:
|
|
257
|
-
ser_prop_names = [n for n in self.
|
|
265
|
+
ser_prop_names = [n for n in self._properties_to_persist]
|
|
258
266
|
include_control_info = (
|
|
259
267
|
self.entity_type_name is not None
|
|
260
268
|
and json_format.include_control_information
|
|
@@ -8,6 +8,7 @@ from office365.runtime.http.request_options import RequestOptions
|
|
|
8
8
|
from office365.runtime.odata.json_format import ODataJsonFormat
|
|
9
9
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
10
10
|
from office365.runtime.types.event_handler import EventHandler
|
|
11
|
+
from office365.runtime.types.exceptions import NotFoundException
|
|
11
12
|
|
|
12
13
|
T = TypeVar("T")
|
|
13
14
|
|
|
@@ -213,8 +214,7 @@ class ClientObjectCollection(ClientObject, Generic[T]):
|
|
|
213
214
|
def _after_loaded(col):
|
|
214
215
|
# type: (ClientObjectCollection) -> None
|
|
215
216
|
if len(col) == 0:
|
|
216
|
-
|
|
217
|
-
raise ValueError(message)
|
|
217
|
+
raise NotFoundException(return_type, expression)
|
|
218
218
|
elif len(col) > 1:
|
|
219
219
|
message = "Ambiguous match found for filter: {0}".format(expression)
|
|
220
220
|
raise ValueError(message)
|
|
@@ -15,7 +15,7 @@ class ClientValue(object):
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
def set_property(self, k, v, persist_changes=True):
|
|
18
|
-
# type: (str, Any, bool) -> Self
|
|
18
|
+
# type: (str|int, Any, bool) -> Self
|
|
19
19
|
prop_type = getattr(self, k, None)
|
|
20
20
|
if isinstance(prop_type, ClientValue) and v is not None:
|
|
21
21
|
if isinstance(v, list):
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from office365.runtime.client_object import ClientObject
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class NotFoundException(Exception):
|
|
5
|
+
def __init__(self, entity=None, query=None):
|
|
6
|
+
# type: (ClientObject, str) -> None
|
|
7
|
+
self.entity = entity
|
|
8
|
+
self.query = query
|
|
9
|
+
|
|
10
|
+
def __str__(self):
|
|
11
|
+
if self.entity is None:
|
|
12
|
+
message = "Entity not found"
|
|
13
|
+
else:
|
|
14
|
+
message = "{0} not found".format(self.entity.entity_type_name)
|
|
15
|
+
|
|
16
|
+
if self.query is not None:
|
|
17
|
+
message = "{0} for query: {1}".format(message, self.query)
|
|
18
|
+
return message
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from office365.search.answer import SearchAnswer
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Acronym(SearchAnswer):
|
|
5
|
+
"""Represents an acronym that is an administrative answer in Microsoft Search results to define common
|
|
6
|
+
acronyms in an organization."""
|
|
7
|
+
|
|
8
|
+
@property
|
|
9
|
+
def entity_type_name(self):
|
|
10
|
+
return "microsoft.graph.search.acronym"
|
office365/search/entity.py
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
from typing import List, Optional
|
|
2
2
|
|
|
3
3
|
from office365.entity import Entity
|
|
4
|
+
from office365.entity_collection import EntityCollection
|
|
4
5
|
from office365.runtime.client_result import ClientResult
|
|
5
6
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
7
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
8
|
+
from office365.runtime.paths.v4.entity import EntityPath
|
|
6
9
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
10
|
+
from office365.search.acronym import Acronym
|
|
7
11
|
from office365.search.entity_type import EntityType
|
|
12
|
+
from office365.search.hit import SearchHit
|
|
8
13
|
from office365.search.query import SearchQuery
|
|
9
14
|
from office365.search.request import SearchRequest
|
|
10
15
|
from office365.search.response import SearchResponse
|
|
@@ -16,27 +21,42 @@ class SearchEntity(Entity):
|
|
|
16
21
|
in Graph, but serves as an anchor to the query action.
|
|
17
22
|
"""
|
|
18
23
|
|
|
19
|
-
def query(
|
|
20
|
-
|
|
24
|
+
def query(
|
|
25
|
+
self,
|
|
26
|
+
query_string,
|
|
27
|
+
entity_types=None,
|
|
28
|
+
page_from=None,
|
|
29
|
+
size=None,
|
|
30
|
+
enable_top_results=None,
|
|
31
|
+
):
|
|
32
|
+
# type: (str, Optional[List[str]], Optional[int], Optional[int], Optional[bool]) -> ClientResult[ClientValueCollection[SearchResponse]]
|
|
21
33
|
"""
|
|
22
34
|
Runs the query specified in the request body. Search results are provided in the response.
|
|
23
35
|
|
|
24
36
|
:param str query_string: Contains the query terms.
|
|
25
37
|
:param list[str] entity_types: One or more types of resources expected in the response.
|
|
26
38
|
Possible values are: list, site, listItem, message, event, drive, driveItem, externalItem.
|
|
39
|
+
:param int page_from: Specifies the offset for the search results. Offset 0 returns the very first result.
|
|
40
|
+
:param int size: The size of the page to be retrieved. The maximum value is 500. Optional.
|
|
41
|
+
:param bool enable_top_results: This triggers hybrid sort for messages
|
|
27
42
|
"""
|
|
28
43
|
search_request = SearchRequest(
|
|
29
|
-
query=SearchQuery(query_string),
|
|
44
|
+
query=SearchQuery(query_string),
|
|
45
|
+
entity_types=entity_types,
|
|
46
|
+
page_from=page_from,
|
|
47
|
+
size=size,
|
|
48
|
+
enable_top_results=enable_top_results,
|
|
30
49
|
)
|
|
31
|
-
payload = {"requests": ClientValueCollection(SearchRequest, [search_request])}
|
|
32
|
-
return_type = ClientResult(self.context, ClientValueCollection(SearchResponse))
|
|
33
|
-
qry = ServiceOperationQuery(self, "query", None, payload, None, return_type)
|
|
34
50
|
|
|
35
51
|
def _patch_hit(search_hit):
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
52
|
+
# type: (SearchHit) -> None
|
|
53
|
+
resource_type_name = search_hit.get_property("resource").get(
|
|
54
|
+
"@odata.type", None
|
|
55
|
+
)
|
|
56
|
+
resource_type = EntityType.resolve(resource_type_name)
|
|
57
|
+
resource = resource_type(self.context, EntityPath())
|
|
58
|
+
self.context.pending_request().map_json(search_hit.resource, resource)
|
|
59
|
+
search_hit.set_property("resource", resource)
|
|
40
60
|
|
|
41
61
|
def _process_response(result):
|
|
42
62
|
# type: (ClientResult[ClientValueCollection[SearchResponse]]) -> None
|
|
@@ -44,14 +64,28 @@ class SearchEntity(Entity):
|
|
|
44
64
|
for hcs in item.hitsContainers:
|
|
45
65
|
[_patch_hit(hit) for hit in hcs.hits]
|
|
46
66
|
|
|
67
|
+
payload = {"requests": ClientValueCollection(SearchRequest, [search_request])}
|
|
68
|
+
return_type = ClientResult(self.context, ClientValueCollection(SearchResponse))
|
|
69
|
+
qry = ServiceOperationQuery(self, "query", None, payload, None, return_type)
|
|
47
70
|
self.context.add_query(qry).after_query_execute(_process_response)
|
|
48
71
|
return return_type
|
|
49
72
|
|
|
50
|
-
def query_messages(
|
|
73
|
+
def query_messages(
|
|
74
|
+
self, query_string, page_from=None, size=None, enable_top_results=None
|
|
75
|
+
):
|
|
51
76
|
"""Searches Outlook messages. Alias to query method
|
|
52
77
|
:param str query_string: Contains the query terms.
|
|
78
|
+
:param int page_from: Specifies the offset for the search results. Offset 0 returns the very first result.
|
|
79
|
+
:param int size: The size of the page to be retrieved. The maximum value is 500. Optional.
|
|
80
|
+
:param bool enable_top_results: This triggers hybrid sort for messages
|
|
53
81
|
"""
|
|
54
|
-
return self.query(
|
|
82
|
+
return self.query(
|
|
83
|
+
query_string,
|
|
84
|
+
entity_types=[EntityType.message],
|
|
85
|
+
page_from=page_from,
|
|
86
|
+
size=size,
|
|
87
|
+
enable_top_results=enable_top_results,
|
|
88
|
+
)
|
|
55
89
|
|
|
56
90
|
def query_events(self, query_string):
|
|
57
91
|
"""Searches Outlook calendar events. Alias to query method
|
|
@@ -59,8 +93,27 @@ class SearchEntity(Entity):
|
|
|
59
93
|
"""
|
|
60
94
|
return self.query(query_string, entity_types=[EntityType.event])
|
|
61
95
|
|
|
62
|
-
def query_drive_items(self, query_string):
|
|
96
|
+
def query_drive_items(self, query_string, page_from=None, size=None):
|
|
63
97
|
"""Searches OneDrive items. Alias to query method
|
|
64
98
|
:param str query_string: Contains the query terms.
|
|
99
|
+
:param int page_from: Specifies the offset for the search results. Offset 0 returns the very first result.
|
|
100
|
+
:param int size: The size of the page to be retrieved. The maximum value is 500.
|
|
65
101
|
"""
|
|
66
|
-
return self.query(
|
|
102
|
+
return self.query(
|
|
103
|
+
query_string,
|
|
104
|
+
entity_types=[EntityType.driveItem],
|
|
105
|
+
page_from=page_from,
|
|
106
|
+
size=size,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def acronyms(self):
|
|
111
|
+
"""Administrative answer in Microsoft Search results to define common acronyms in an organization."""
|
|
112
|
+
return self.properties.get(
|
|
113
|
+
"acronyms",
|
|
114
|
+
EntityCollection(
|
|
115
|
+
self.context,
|
|
116
|
+
Acronym,
|
|
117
|
+
ResourcePath("acronyms", self.resource_path),
|
|
118
|
+
),
|
|
119
|
+
)
|
office365/search/entity_type.py
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
|
+
from typing import Type
|
|
2
|
+
|
|
3
|
+
from office365.onedrive.driveitems.driveItem import DriveItem
|
|
4
|
+
from office365.onedrive.drives.drive import Drive
|
|
5
|
+
from office365.onedrive.listitems.list_item import ListItem
|
|
6
|
+
from office365.onedrive.lists.list import List
|
|
7
|
+
from office365.onedrive.sites.site import Site
|
|
8
|
+
from office365.outlook.calendar.events.event import Event
|
|
9
|
+
from office365.outlook.mail.messages.message import Message
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
class EntityType:
|
|
2
13
|
"""Search resource type"""
|
|
3
14
|
|
|
15
|
+
_types = {
|
|
16
|
+
"event": Event,
|
|
17
|
+
"list": List,
|
|
18
|
+
"site": Site,
|
|
19
|
+
"listItem": ListItem,
|
|
20
|
+
"message": Message,
|
|
21
|
+
"drive": Drive,
|
|
22
|
+
"driveItem": DriveItem,
|
|
23
|
+
# "externalItem": ExternalItem
|
|
24
|
+
}
|
|
25
|
+
|
|
4
26
|
def __init__(self):
|
|
5
27
|
pass
|
|
6
28
|
|
|
29
|
+
@staticmethod
|
|
30
|
+
def resolve(name):
|
|
31
|
+
# type: (str) -> Type[Event | List | Site | ListItem | Message | Drive | DriveItem]
|
|
32
|
+
class_name = name.split(".")[-1]
|
|
33
|
+
return EntityType._types.get(class_name, None)
|
|
34
|
+
|
|
7
35
|
event = "event"
|
|
8
36
|
|
|
9
37
|
list = "list"
|
office365/search/request.py
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
from typing import Dict, Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_value import ClientValue
|
|
2
4
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
5
|
+
from office365.runtime.odata.json_format import ODataJsonFormat
|
|
3
6
|
from office365.runtime.types.collections import StringCollection
|
|
7
|
+
from office365.search.aggregation_option import AggregationOption
|
|
4
8
|
from office365.search.sharepoint_onedrive_options import SharePointOneDriveOptions
|
|
5
9
|
from office365.search.sort_property import SortProperty
|
|
6
10
|
|
|
@@ -11,15 +15,29 @@ class SearchRequest(ClientValue):
|
|
|
11
15
|
def __init__(
|
|
12
16
|
self,
|
|
13
17
|
query,
|
|
18
|
+
aggregation_filters=None,
|
|
19
|
+
aggregations=None,
|
|
20
|
+
enable_top_results=None,
|
|
21
|
+
size=None,
|
|
22
|
+
region=None,
|
|
14
23
|
entity_types=None,
|
|
15
24
|
fields=None,
|
|
16
|
-
|
|
25
|
+
page_from=None,
|
|
17
26
|
sort_properties=None,
|
|
18
27
|
content_sources=None,
|
|
19
28
|
sharepoint_onedrive_options=SharePointOneDriveOptions(),
|
|
20
29
|
):
|
|
21
30
|
"""
|
|
22
31
|
:param office365.search.query.SearchQuery query: Contains the query terms.
|
|
32
|
+
:param list[str] aggregation_filters: Contains one or more filters to obtain search results aggregated and
|
|
33
|
+
filtered to a specific value of a field
|
|
34
|
+
:param list[str] aggregations: Specifies aggregations (also known as refiners) to be returned
|
|
35
|
+
alongside search results.
|
|
36
|
+
:param bool enable_top_results: This triggers hybrid sort for messages : the first 3 messages are
|
|
37
|
+
the most relevant. This property is only applicable to entityType=message. Optional.
|
|
38
|
+
:param int size: The size of the page to be retrieved. The maximum value is 500. Optional.
|
|
39
|
+
:param str region: The geographic location for the search. Required for searches that use application
|
|
40
|
+
permissions. For details, see Get the region value.
|
|
23
41
|
:param list[str] entity_types: One or more types of resources expected in the response.
|
|
24
42
|
Possible values are: list, site, listItem, message, event, drive, driveItem, externalItem.
|
|
25
43
|
See known limitations for those combinations of two or more entity types that are supported in the
|
|
@@ -30,16 +48,27 @@ class SearchRequest(ClientValue):
|
|
|
30
48
|
content that Microsoft Graph connectors bring in. The fields property can use the semantic labels
|
|
31
49
|
applied to properties. For example, if a property is labeled as title, you can retrieve it using
|
|
32
50
|
the following syntax: label_title.
|
|
33
|
-
:param int
|
|
51
|
+
:param int page_from: Specifies the offset for the search results. Offset 0 returns the very first result.
|
|
34
52
|
:param list[SortProperty] sort_properties: Contains the ordered collection of fields and direction to
|
|
35
53
|
sort results. There can be at most 5 sort properties in the collection.
|
|
36
54
|
:param list[str] content_sources: Contains the connection to be targeted.
|
|
37
55
|
"""
|
|
38
56
|
super(SearchRequest, self).__init__()
|
|
39
57
|
self.query = query
|
|
58
|
+
self.aggregationFilters = StringCollection(aggregation_filters)
|
|
59
|
+
self.aggregations = ClientValueCollection(AggregationOption, aggregations)
|
|
60
|
+
self.enableTopResults = enable_top_results
|
|
61
|
+
self.size = size
|
|
62
|
+
self.region = region
|
|
40
63
|
self.entityTypes = entity_types
|
|
41
64
|
self.fields = fields
|
|
42
|
-
self.
|
|
65
|
+
self.page_from = page_from
|
|
43
66
|
self.sortProperties = ClientValueCollection(SortProperty, sort_properties)
|
|
44
67
|
self.contentSources = StringCollection(content_sources)
|
|
45
68
|
self.sharePointOneDriveOptions = sharepoint_onedrive_options
|
|
69
|
+
|
|
70
|
+
def to_json(self, json_format=None):
|
|
71
|
+
# type: (Optional[ODataJsonFormat]) -> Dict
|
|
72
|
+
json_value = super(SearchRequest, self).to_json(json_format)
|
|
73
|
+
json_value["from"] = json_value.pop("page_from", None)
|
|
74
|
+
return json_value
|
|
File without changes
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
3
|
+
from office365.runtime.client_result import ClientResult
|
|
4
|
+
from office365.runtime.client_value import ClientValue
|
|
5
|
+
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
6
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
7
|
+
from office365.sharepoint.entity import Entity
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from office365.sharepoint.client_context import ClientContext
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SystemSiteLockExpirationResult(ClientValue):
|
|
14
|
+
""""""
|
|
15
|
+
|
|
16
|
+
def __init__(self, error=None, expiration=None):
|
|
17
|
+
self.Error = error
|
|
18
|
+
self.Expiration = expiration
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SiteMoveService(Entity):
|
|
22
|
+
""" """
|
|
23
|
+
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
context,
|
|
27
|
+
site_id,
|
|
28
|
+
site_subscription_id=None,
|
|
29
|
+
source_database_id=None,
|
|
30
|
+
target_database_id=None,
|
|
31
|
+
):
|
|
32
|
+
# type: (ClientContext, str, str, str, str) -> None
|
|
33
|
+
""""""
|
|
34
|
+
static_path = ServiceOperationPath(
|
|
35
|
+
"Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService",
|
|
36
|
+
{
|
|
37
|
+
"siteId": site_id,
|
|
38
|
+
"siteSubscriptionId": site_subscription_id,
|
|
39
|
+
"sourceDatabaseId": source_database_id,
|
|
40
|
+
"targetDatabaseId": target_database_id,
|
|
41
|
+
},
|
|
42
|
+
)
|
|
43
|
+
super(SiteMoveService, self).__init__(context, static_path)
|
|
44
|
+
|
|
45
|
+
def acquire_system_site_lock(
|
|
46
|
+
self, lock_requestor, lock_type, lease_duration_in_minutes
|
|
47
|
+
):
|
|
48
|
+
""""""
|
|
49
|
+
return_type = ClientResult(self.context, SystemSiteLockExpirationResult())
|
|
50
|
+
payload = {
|
|
51
|
+
"lockRequestor": lock_requestor,
|
|
52
|
+
"lockType": lock_type,
|
|
53
|
+
"leaseDurationInMinutes": lease_duration_in_minutes,
|
|
54
|
+
}
|
|
55
|
+
qry = ServiceOperationQuery(
|
|
56
|
+
self,
|
|
57
|
+
"AcquireSystemSiteLock",
|
|
58
|
+
None,
|
|
59
|
+
payload,
|
|
60
|
+
None,
|
|
61
|
+
return_type,
|
|
62
|
+
)
|
|
63
|
+
self.context.add_query(qry)
|
|
64
|
+
return return_type
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def entity_type_name(self):
|
|
68
|
+
return "Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"
|
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
1
2
|
from office365.sharepoint.authpolicy.events.event import SPAuthEvent
|
|
2
3
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
3
4
|
|
|
@@ -9,3 +10,30 @@ class SPAuthEventCollection(EntityCollection[SPAuthEvent]):
|
|
|
9
10
|
super(SPAuthEventCollection, self).__init__(
|
|
10
11
|
context, SPAuthEvent, resource_path, parent
|
|
11
12
|
)
|
|
13
|
+
|
|
14
|
+
def role_assignment_ms_graph_notify(
|
|
15
|
+
self, tenant, action, type_, resource_payload, id_, container_id
|
|
16
|
+
):
|
|
17
|
+
"""
|
|
18
|
+
:param str tenant:
|
|
19
|
+
:param str action:
|
|
20
|
+
:param str type_:
|
|
21
|
+
:param RoleAssignmentResourcePayload resource_payload:
|
|
22
|
+
:param str id_:
|
|
23
|
+
:param str container_id:
|
|
24
|
+
"""
|
|
25
|
+
payload = {
|
|
26
|
+
"tenant": tenant,
|
|
27
|
+
"action": action,
|
|
28
|
+
"type": type_,
|
|
29
|
+
"resourcePayload": resource_payload,
|
|
30
|
+
"id": id_,
|
|
31
|
+
"containerId": container_id,
|
|
32
|
+
}
|
|
33
|
+
return_type = SPAuthEvent(self.context)
|
|
34
|
+
self.add_child(return_type)
|
|
35
|
+
qry = ServiceOperationQuery(
|
|
36
|
+
self, "RoleAssignmentMSGraphNotify", None, payload, None, return_type
|
|
37
|
+
)
|
|
38
|
+
self.context.add_query(qry)
|
|
39
|
+
return return_type
|
|
@@ -20,6 +20,21 @@ class ChangeItem(Change):
|
|
|
20
20
|
"""Specifies an identifier for the content type"""
|
|
21
21
|
return self.properties.get("ContentTypeId", ContentTypeId())
|
|
22
22
|
|
|
23
|
+
@property
|
|
24
|
+
def editor(self):
|
|
25
|
+
"""Specifies the editor of the changed item."""
|
|
26
|
+
return self.properties.get("Editor", None)
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def editor_email_hint(self):
|
|
30
|
+
"""Returns the email corresponding to Editor."""
|
|
31
|
+
return self.properties.get("EditorEmailHint", None)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def editor_login_name(self):
|
|
35
|
+
"""Returns login name of the Editor."""
|
|
36
|
+
return self.properties.get("EditorLoginName", None)
|
|
37
|
+
|
|
23
38
|
@property
|
|
24
39
|
def file_type(self):
|
|
25
40
|
# type: () -> Optional[str]
|