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
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
from typing import AnyStr
|
|
2
|
+
|
|
3
|
+
from office365.runtime.client_result import ClientResult
|
|
4
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
1
5
|
from office365.sharepoint.entity import Entity
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
class TeamsPackageDownload(Entity):
|
|
5
9
|
""""""
|
|
6
10
|
|
|
11
|
+
def download_teams(self):
|
|
12
|
+
# type: () -> ClientResult[AnyStr]
|
|
13
|
+
""" """
|
|
14
|
+
return_type = ClientResult(self.context)
|
|
15
|
+
qry = ServiceOperationQuery(
|
|
16
|
+
self, "DownloadTeams", None, None, None, return_type
|
|
17
|
+
)
|
|
18
|
+
self.context.add_query(qry)
|
|
19
|
+
return return_type
|
|
20
|
+
|
|
7
21
|
@property
|
|
8
22
|
def entity_type_name(self):
|
|
9
23
|
return "Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.TeamsPackageDownload"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_result import ClientResult
|
|
2
4
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
3
5
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
@@ -8,9 +10,18 @@ from office365.sharepoint.marketplace.app_metadata import CorporateCatalogAppMet
|
|
|
8
10
|
from office365.sharepoint.marketplace.app_metadata_collection import (
|
|
9
11
|
CorporateCatalogAppMetadataCollection,
|
|
10
12
|
)
|
|
13
|
+
from office365.sharepoint.marketplace.corporatecuratedgallery.app_request_information import (
|
|
14
|
+
SPStoreAppRequestInformation,
|
|
15
|
+
)
|
|
16
|
+
from office365.sharepoint.marketplace.corporatecuratedgallery.app_response_information import (
|
|
17
|
+
SPStoreAppResponseInformation,
|
|
18
|
+
)
|
|
11
19
|
from office365.sharepoint.marketplace.corporatecuratedgallery.app_upgrade_availability import (
|
|
12
20
|
AppUpgradeAvailability,
|
|
13
21
|
)
|
|
22
|
+
from office365.sharepoint.marketplace.corporatecuratedgallery.card_designs import (
|
|
23
|
+
CardDesigns,
|
|
24
|
+
)
|
|
14
25
|
from office365.sharepoint.marketplace.corporatecuratedgallery.teams_package_download import (
|
|
15
26
|
TeamsPackageDownload,
|
|
16
27
|
)
|
|
@@ -22,7 +33,7 @@ from office365.sharepoint.marketplace.sitecollection.appcatalog.allowed_items im
|
|
|
22
33
|
class TenantCorporateCatalogAccessor(Entity):
|
|
23
34
|
"""Accessor for the tenant corporate catalog."""
|
|
24
35
|
|
|
25
|
-
def add(self, content, overwrite, url):
|
|
36
|
+
def add(self, content, overwrite, url=None):
|
|
26
37
|
"""
|
|
27
38
|
Adds a file to the corporate catalog.
|
|
28
39
|
|
|
@@ -32,13 +43,34 @@ class TenantCorporateCatalogAccessor(Entity):
|
|
|
32
43
|
:param str url: Specifies the URL of the file to be added.
|
|
33
44
|
"""
|
|
34
45
|
return_type = File(self.context)
|
|
35
|
-
|
|
36
|
-
qry = ServiceOperationQuery(self, "Add",
|
|
46
|
+
params = {"Overwrite": overwrite, "Url": url}
|
|
47
|
+
qry = ServiceOperationQuery(self, "Add", params, content, None, return_type)
|
|
48
|
+
self.context.add_query(qry)
|
|
49
|
+
return return_type
|
|
50
|
+
|
|
51
|
+
def app_from_path(self, path, overwrite):
|
|
52
|
+
# type: (str, bool) -> File
|
|
53
|
+
"""
|
|
54
|
+
Adds a file to the corporate catalog.
|
|
55
|
+
"""
|
|
56
|
+
with open(path, "rb") as f:
|
|
57
|
+
content = f.read()
|
|
58
|
+
url = os.path.basename(path)
|
|
59
|
+
return self.add(content=content, overwrite=overwrite, url=url)
|
|
60
|
+
|
|
61
|
+
def app_requests(self):
|
|
62
|
+
""""""
|
|
63
|
+
return_type = ClientResult(self.context, SPStoreAppResponseInformation())
|
|
64
|
+
payload = {"AppRequestInfo": SPStoreAppRequestInformation()}
|
|
65
|
+
qry = ServiceOperationQuery(
|
|
66
|
+
self, "AppRequests", None, payload, None, return_type
|
|
67
|
+
)
|
|
37
68
|
self.context.add_query(qry)
|
|
38
69
|
return return_type
|
|
39
70
|
|
|
40
71
|
def download_teams_solution(self, _id):
|
|
41
72
|
"""
|
|
73
|
+
Downloads a Microsoft Teams solution package associated with an app from the SharePoint App Catalog
|
|
42
74
|
:param int _id:
|
|
43
75
|
"""
|
|
44
76
|
return_type = TeamsPackageDownload(self.context)
|
|
@@ -60,6 +92,7 @@ class TenantCorporateCatalogAccessor(Entity):
|
|
|
60
92
|
|
|
61
93
|
def is_app_upgrade_available(self, _id):
|
|
62
94
|
"""
|
|
95
|
+
Determines if an upgrade is available for an app in the SharePoint app catalog
|
|
63
96
|
:param int _id:
|
|
64
97
|
"""
|
|
65
98
|
return_type = ClientResult(self.context, AppUpgradeAvailability())
|
|
@@ -70,8 +103,21 @@ class TenantCorporateCatalogAccessor(Entity):
|
|
|
70
103
|
self.context.add_query(qry)
|
|
71
104
|
return return_type
|
|
72
105
|
|
|
106
|
+
def upload(self, content, overwrite, url, xor_hash=None):
|
|
107
|
+
""""""
|
|
108
|
+
payload = {
|
|
109
|
+
"Content": content,
|
|
110
|
+
"Overwrite": overwrite,
|
|
111
|
+
"Url": url,
|
|
112
|
+
"XorHash": xor_hash,
|
|
113
|
+
}
|
|
114
|
+
qry = ServiceOperationQuery(self, "Upload", None, payload)
|
|
115
|
+
self.context.add_query(qry)
|
|
116
|
+
return self
|
|
117
|
+
|
|
73
118
|
def send_app_request_status_notification_email(self, request_guid):
|
|
74
119
|
"""
|
|
120
|
+
Sends email notifications about the status of an app request in the corporate app catalog
|
|
75
121
|
:param str request_guid:
|
|
76
122
|
"""
|
|
77
123
|
qry = ServiceOperationQuery(
|
|
@@ -90,6 +136,14 @@ class TenantCorporateCatalogAccessor(Entity):
|
|
|
90
136
|
),
|
|
91
137
|
)
|
|
92
138
|
|
|
139
|
+
@property
|
|
140
|
+
def card_designs(self):
|
|
141
|
+
"""Returns the card designs available in this corporate catalog."""
|
|
142
|
+
return self.properties.get(
|
|
143
|
+
"CardDesigns",
|
|
144
|
+
CardDesigns(self.context, ResourcePath("CardDesigns", self.resource_path)),
|
|
145
|
+
)
|
|
146
|
+
|
|
93
147
|
@property
|
|
94
148
|
def site_collection_app_catalogs_sites(self):
|
|
95
149
|
"""Returns an accessor to the allow list of site collections allowed to have site collection corporate
|
|
@@ -102,10 +156,15 @@ class TenantCorporateCatalogAccessor(Entity):
|
|
|
102
156
|
),
|
|
103
157
|
)
|
|
104
158
|
|
|
159
|
+
@property
|
|
160
|
+
def entity_type_name(self):
|
|
161
|
+
return "Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.TenantCorporateCatalogAccessor"
|
|
162
|
+
|
|
105
163
|
def get_property(self, name, default_value=None):
|
|
106
164
|
if default_value is None:
|
|
107
165
|
property_mapping = {
|
|
108
166
|
"AvailableApps": self.available_apps,
|
|
167
|
+
"CardDesigns": self.card_designs,
|
|
109
168
|
"SiteCollectionAppCatalogsSites": self.site_collection_app_catalogs_sites,
|
|
110
169
|
}
|
|
111
170
|
default_value = property_mapping.get(name, None)
|
|
@@ -2,6 +2,7 @@ from office365.runtime.paths.resource_path import ResourcePath
|
|
|
2
2
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
3
|
from office365.sharepoint.entity import Entity
|
|
4
4
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
5
|
+
from office365.sharepoint.multigeo.storage_quota import StorageQuota
|
|
5
6
|
from office365.sharepoint.multigeo.unified_group import UnifiedGroup
|
|
6
7
|
from office365.sharepoint.multigeo.user_personal_site_location import (
|
|
7
8
|
UserPersonalSiteLocation,
|
|
@@ -39,6 +40,19 @@ class MultiGeoServices(Entity):
|
|
|
39
40
|
self.context.add_query(qry)
|
|
40
41
|
return return_type
|
|
41
42
|
|
|
43
|
+
@property
|
|
44
|
+
def storage_quotas(self):
|
|
45
|
+
# type: () -> EntityCollection[UnifiedGroup]
|
|
46
|
+
""" """
|
|
47
|
+
return self.properties.get(
|
|
48
|
+
"StorageQuotas",
|
|
49
|
+
EntityCollection(
|
|
50
|
+
self.context,
|
|
51
|
+
StorageQuota,
|
|
52
|
+
ResourcePath("StorageQuotas", self.resource_path),
|
|
53
|
+
),
|
|
54
|
+
)
|
|
55
|
+
|
|
42
56
|
@property
|
|
43
57
|
def unified_groups(self):
|
|
44
58
|
# type: () -> EntityCollection[UnifiedGroup]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from office365.runtime.client_result import ClientResult
|
|
2
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
|
+
from office365.sharepoint.entity import Entity
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PolicyLicenseUtilities(Entity):
|
|
7
|
+
""""""
|
|
8
|
+
|
|
9
|
+
@staticmethod
|
|
10
|
+
def check_tenant_m365_copilot_business_chat_license(context, return_type=None):
|
|
11
|
+
""""""
|
|
12
|
+
if return_type is None:
|
|
13
|
+
return_type = ClientResult(context, bool())
|
|
14
|
+
qry = ServiceOperationQuery(
|
|
15
|
+
PolicyLicenseUtilities(context),
|
|
16
|
+
"CheckTenantM365CopilotBusinessChatLicense",
|
|
17
|
+
None,
|
|
18
|
+
None,
|
|
19
|
+
None,
|
|
20
|
+
return_type,
|
|
21
|
+
)
|
|
22
|
+
context.add_query(qry)
|
|
23
|
+
return return_type
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def entity_type_name(self):
|
|
27
|
+
return "SP.Utilities.PolicyLicenseUtilities"
|
|
@@ -4,6 +4,7 @@ from office365.runtime.http.http_method import HttpMethod
|
|
|
4
4
|
from office365.runtime.http.request_options import RequestOptions
|
|
5
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
6
6
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
7
|
+
from office365.sharepoint.portal.channels.info_collection import ChannelInfoCollection
|
|
7
8
|
from office365.sharepoint.portal.groups.creation_context import GroupCreationContext
|
|
8
9
|
from office365.sharepoint.portal.groups.creation_information import (
|
|
9
10
|
GroupCreationInformation,
|
|
@@ -15,12 +16,17 @@ from office365.sharepoint.portal.teams.recent_and_joined_response import (
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class GroupSiteManager(ClientObject):
|
|
19
|
+
"""Management of Group Sites in SharePoint. Group Sites, also known as Microsoft 365 Groups,
|
|
20
|
+
provide collaboration spaces that integrate with various Microsoft 365 services like Teams, Outlook, and Planner.
|
|
21
|
+
"""
|
|
22
|
+
|
|
18
23
|
def __init__(self, context, resource_path=None):
|
|
19
24
|
if resource_path is None:
|
|
20
25
|
resource_path = ResourcePath("GroupSiteManager")
|
|
21
26
|
super(GroupSiteManager, self).__init__(context, resource_path)
|
|
22
27
|
|
|
23
28
|
def can_user_create_group(self):
|
|
29
|
+
"""Determines if the current user can create group site"""
|
|
24
30
|
return_type = ClientResult(self.context, bool())
|
|
25
31
|
qry = ServiceOperationQuery(
|
|
26
32
|
self, "CanUserCreateGroup", None, None, None, return_type
|
|
@@ -83,6 +89,7 @@ class GroupSiteManager(ClientObject):
|
|
|
83
89
|
return self
|
|
84
90
|
|
|
85
91
|
def ensure_team_for_group(self):
|
|
92
|
+
""" """
|
|
86
93
|
return_type = ClientResult(self.context)
|
|
87
94
|
qry = ServiceOperationQuery(
|
|
88
95
|
self, "EnsureTeamForGroup", None, None, None, return_type
|
|
@@ -91,6 +98,7 @@ class GroupSiteManager(ClientObject):
|
|
|
91
98
|
return return_type
|
|
92
99
|
|
|
93
100
|
def get_group_creation_context(self):
|
|
101
|
+
""" """
|
|
94
102
|
return_type = ClientResult(self.context, GroupCreationContext())
|
|
95
103
|
qry = ServiceOperationQuery(
|
|
96
104
|
self, "GetGroupCreationContext", None, None, None, return_type
|
|
@@ -131,6 +139,7 @@ class GroupSiteManager(ClientObject):
|
|
|
131
139
|
return result
|
|
132
140
|
|
|
133
141
|
def get_current_user_shared_channel_member_groups(self):
|
|
142
|
+
""" """
|
|
134
143
|
return_type = ClientResult(self.context)
|
|
135
144
|
qry = ServiceOperationQuery(
|
|
136
145
|
self,
|
|
@@ -145,6 +154,8 @@ class GroupSiteManager(ClientObject):
|
|
|
145
154
|
|
|
146
155
|
def get_team_channels(self, team_id, use_staging_endpoint=False):
|
|
147
156
|
"""
|
|
157
|
+
Retrieves the channels associated with a specific Microsoft 365 Group (or Team)
|
|
158
|
+
|
|
148
159
|
:param str team_id:
|
|
149
160
|
:param bool use_staging_endpoint:
|
|
150
161
|
"""
|
|
@@ -170,6 +181,21 @@ class GroupSiteManager(ClientObject):
|
|
|
170
181
|
self.context.add_query(qry)
|
|
171
182
|
return return_type
|
|
172
183
|
|
|
184
|
+
def get_team_channels_with_site_url(self, site_url):
|
|
185
|
+
"""
|
|
186
|
+
Returns a list of team channels associated with a Microsoft 365 Group.
|
|
187
|
+
:param str site_url:
|
|
188
|
+
"""
|
|
189
|
+
return_type = ClientResult(self.context, ChannelInfoCollection())
|
|
190
|
+
payload = {
|
|
191
|
+
"siteUrl": site_url,
|
|
192
|
+
}
|
|
193
|
+
qry = ServiceOperationQuery(
|
|
194
|
+
self, "GetTeamChannelsWithSiteUrl", None, payload, None, return_type
|
|
195
|
+
)
|
|
196
|
+
self.context.add_query(qry)
|
|
197
|
+
return return_type
|
|
198
|
+
|
|
173
199
|
def notebook(self, group_id):
|
|
174
200
|
"""
|
|
175
201
|
:param str group_id:
|
|
@@ -188,6 +214,8 @@ class GroupSiteManager(ClientObject):
|
|
|
188
214
|
existing_joined_teams_data=None,
|
|
189
215
|
):
|
|
190
216
|
"""
|
|
217
|
+
Retrieves a list of teams that a user has recently accessed or joined
|
|
218
|
+
|
|
191
219
|
:param bool include_recent:
|
|
192
220
|
:param bool include_teams:
|
|
193
221
|
:param bool include_pinned:
|
|
@@ -205,3 +233,7 @@ class GroupSiteManager(ClientObject):
|
|
|
205
233
|
)
|
|
206
234
|
self.context.add_query(qry)
|
|
207
235
|
return return_type
|
|
236
|
+
|
|
237
|
+
@property
|
|
238
|
+
def entity_type_name(self):
|
|
239
|
+
return "Microsoft.SharePoint.Portal.GroupSiteManager"
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
|
+
from office365.sharepoint.entity import Entity
|
|
3
|
+
from office365.sharepoint.entity_collection import EntityCollection
|
|
4
|
+
from office365.sharepoint.portal.userprofiles.sharedwithme.document import (
|
|
5
|
+
SharedWithMeDocument,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DocumentsSharedWithGroup(Entity):
|
|
10
|
+
"""
|
|
11
|
+
Provides methods for working with a list that shares documents with a SharePoint Group on the user's personal site.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
@staticmethod
|
|
15
|
+
def get_shared_with_group_docs(context, group_id=None):
|
|
16
|
+
"""
|
|
17
|
+
Gets a shared documents for a group.
|
|
18
|
+
|
|
19
|
+
:param office365.sharepoint.client_context.ClientContext context: SharePoint context
|
|
20
|
+
:param str group_id:
|
|
21
|
+
"""
|
|
22
|
+
return_type = EntityCollection(context, SharedWithMeDocument)
|
|
23
|
+
payload = {"groupId": group_id}
|
|
24
|
+
qry = ServiceOperationQuery(
|
|
25
|
+
DocumentsSharedWithGroup(context),
|
|
26
|
+
"GetSharedWithGroupDocs",
|
|
27
|
+
None,
|
|
28
|
+
payload,
|
|
29
|
+
None,
|
|
30
|
+
return_type,
|
|
31
|
+
True,
|
|
32
|
+
)
|
|
33
|
+
context.add_query(qry)
|
|
34
|
+
return return_type
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def entity_type_name(self):
|
|
38
|
+
return "Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithGroup"
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ from typing import Optional
|
|
|
3
3
|
|
|
4
4
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
5
5
|
from office365.sharepoint.entity import Entity
|
|
6
|
-
from office365.sharepoint.userprofiles.sharedwithme.document_user import (
|
|
6
|
+
from office365.sharepoint.portal.userprofiles.sharedwithme.document_user import (
|
|
7
7
|
SharedWithMeDocumentUser,
|
|
8
8
|
)
|
|
9
9
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
2
|
from office365.sharepoint.entity import Entity
|
|
3
3
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
4
|
-
from office365.sharepoint.userprofiles.sharedwithme.document import
|
|
4
|
+
from office365.sharepoint.portal.userprofiles.sharedwithme.document import (
|
|
5
|
+
SharedWithMeDocument,
|
|
6
|
+
)
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class SharedWithMeItems(Entity):
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
+
from office365.runtime.odata.type import ODataType
|
|
3
4
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
4
5
|
from office365.sharepoint.entity import Entity
|
|
6
|
+
from office365.sharepoint.principal.type import PrincipalType
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class Principal(Entity):
|
|
@@ -60,6 +62,10 @@ class Principal(Entity):
|
|
|
60
62
|
"""Gets the type of the principal."""
|
|
61
63
|
return self.properties.get("PrincipalType", None)
|
|
62
64
|
|
|
65
|
+
@property
|
|
66
|
+
def principal_type_name(self):
|
|
67
|
+
return ODataType.resolve_enum_key(PrincipalType, self.principal_type)
|
|
68
|
+
|
|
63
69
|
@property
|
|
64
70
|
def property_ref_name(self):
|
|
65
71
|
return "Id"
|
|
@@ -5,6 +5,7 @@ from office365.runtime.client_value import ClientValue
|
|
|
5
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
6
6
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
7
7
|
from office365.runtime.types.collections import StringCollection
|
|
8
|
+
from office365.sharepoint.publishing.pages.coauth_state import SitePageCoAuthState
|
|
8
9
|
from office365.sharepoint.publishing.pages.fields_data import SitePageFieldsData
|
|
9
10
|
from office365.sharepoint.publishing.pages.metadata import SitePageMetadata
|
|
10
11
|
from office365.sharepoint.translation.status_collection import (
|
|
@@ -135,6 +136,16 @@ class SitePage(SitePageMetadata):
|
|
|
135
136
|
self.context.add_query(qry)
|
|
136
137
|
return return_type
|
|
137
138
|
|
|
139
|
+
def save_page_co_auth(self, page_stream):
|
|
140
|
+
""" """
|
|
141
|
+
return_type = ClientResult(self.context, SitePageCoAuthState())
|
|
142
|
+
payload = {"pageStream": page_stream}
|
|
143
|
+
qry = ServiceOperationQuery(
|
|
144
|
+
self, "SavePageCoAuth", None, payload, None, return_type
|
|
145
|
+
)
|
|
146
|
+
self.context.add_query(qry)
|
|
147
|
+
return return_type
|
|
148
|
+
|
|
138
149
|
def demote_from_news(self):
|
|
139
150
|
"""
|
|
140
151
|
Updates the promoted state of the site page to 0. On success MUST return true.
|
office365/sharepoint/request.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Callable, List, Optional
|
|
2
2
|
|
|
3
3
|
from requests import Response
|
|
4
4
|
from typing_extensions import Self
|
|
5
5
|
|
|
6
6
|
from office365.runtime.auth.authentication_context import AuthenticationContext
|
|
7
7
|
from office365.runtime.auth.client_credential import ClientCredential
|
|
8
|
+
from office365.runtime.auth.token_response import TokenResponse
|
|
8
9
|
from office365.runtime.auth.user_credential import UserCredential
|
|
9
10
|
from office365.runtime.http.request_options import RequestOptions
|
|
10
11
|
from office365.runtime.odata.request import ODataRequest
|
|
@@ -12,28 +13,115 @@ from office365.runtime.odata.v3.json_light_format import JsonLightFormat
|
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class SharePointRequest(ODataRequest):
|
|
15
|
-
def __init__(
|
|
16
|
+
def __init__(
|
|
17
|
+
self, base_url, environment="commercial", allow_ntlm=False, browser_mode=False
|
|
18
|
+
):
|
|
19
|
+
"""
|
|
20
|
+
:param str base_url: Absolute Web or Site Url
|
|
21
|
+
:param str environment: The Office 365 Cloud Environment endpoint used for authentication
|
|
22
|
+
defaults to 'commercial'.
|
|
23
|
+
:param bool allow_ntlm: Flag indicates whether NTLM scheme is enabled. Disabled by default
|
|
24
|
+
:param bool browser_mode: Allow browser authentication
|
|
25
|
+
"""
|
|
16
26
|
super().__init__(JsonLightFormat())
|
|
17
|
-
self._auth_context = AuthenticationContext(
|
|
27
|
+
self._auth_context = AuthenticationContext(
|
|
28
|
+
url=base_url,
|
|
29
|
+
environment=environment,
|
|
30
|
+
allow_ntlm=allow_ntlm,
|
|
31
|
+
browser_mode=browser_mode,
|
|
32
|
+
)
|
|
18
33
|
self.beforeExecute += self._authenticate_request
|
|
19
34
|
|
|
20
35
|
def execute_request(self, path):
|
|
21
36
|
# type: (str) -> Response
|
|
22
|
-
request_url = "{0}/
|
|
37
|
+
request_url = "{0}/{1}".format(self.service_root_url, path)
|
|
23
38
|
return self.execute_request_direct(RequestOptions(request_url))
|
|
24
39
|
|
|
25
|
-
def with_credentials(self, credentials
|
|
26
|
-
# type: (UserCredential|ClientCredential
|
|
40
|
+
def with_credentials(self, credentials):
|
|
41
|
+
# type: (UserCredential|ClientCredential) -> Self
|
|
27
42
|
"""
|
|
28
43
|
Initializes a client to acquire a token via user or client credentials
|
|
29
|
-
:type credentials: UserCredential or ClientCredential
|
|
30
|
-
:param str environment: The Office 365 Cloud Environment endpoint used for authentication
|
|
31
|
-
defaults to 'commercial'.
|
|
32
44
|
"""
|
|
33
|
-
self._auth_context.with_credentials(credentials
|
|
45
|
+
self._auth_context.with_credentials(credentials)
|
|
46
|
+
return self
|
|
47
|
+
|
|
48
|
+
def with_client_certificate(
|
|
49
|
+
self,
|
|
50
|
+
tenant,
|
|
51
|
+
client_id,
|
|
52
|
+
thumbprint,
|
|
53
|
+
cert_path=None,
|
|
54
|
+
private_key=None,
|
|
55
|
+
scopes=None,
|
|
56
|
+
passphrase=None,
|
|
57
|
+
):
|
|
58
|
+
# type: (str, str, str, Optional[str], Optional[str], Optional[List[str]], Optional[str]) -> Self
|
|
59
|
+
"""
|
|
60
|
+
Creates authenticated SharePoint context via certificate credentials
|
|
61
|
+
|
|
62
|
+
:param str tenant: Tenant name
|
|
63
|
+
:param str or None cert_path: Path to A PEM encoded certificate private key.
|
|
64
|
+
:param str or None private_key: A PEM encoded certificate private key.
|
|
65
|
+
:param str thumbprint: Hex encoded thumbprint of the certificate.
|
|
66
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
67
|
+
:param list[str] or None scopes: Scopes requested to access a protected API (a resource)
|
|
68
|
+
:param str passphrase: Passphrase if the private_key is encrypted
|
|
69
|
+
"""
|
|
70
|
+
self._auth_context.with_client_certificate(
|
|
71
|
+
tenant, client_id, thumbprint, cert_path, private_key, scopes, passphrase
|
|
72
|
+
)
|
|
73
|
+
return self
|
|
74
|
+
|
|
75
|
+
def with_device_flow(self, tenant, client_id, scopes=None):
|
|
76
|
+
# type: (str, str, Optional[List[str]]) -> Self
|
|
77
|
+
"""
|
|
78
|
+
Initializes a client to acquire a token via device flow auth.
|
|
79
|
+
|
|
80
|
+
:param str tenant: Tenant name, for example: contoso.onmicrosoft.com
|
|
81
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
82
|
+
:param list[str] or None scopes: Scopes requested to access a protected API (a resource)
|
|
83
|
+
"""
|
|
84
|
+
self._auth_context.with_device_flow(tenant, client_id, scopes)
|
|
85
|
+
return self
|
|
86
|
+
|
|
87
|
+
def with_interactive(self, tenant, client_id, scopes=None):
|
|
88
|
+
# type: (str, str, Optional[List[str]]) -> Self
|
|
89
|
+
"""
|
|
90
|
+
Initializes a client to acquire a token interactively i.e. via a local browser.
|
|
91
|
+
|
|
92
|
+
Prerequisite: In Azure Portal, configure the Redirect URI of your
|
|
93
|
+
"Mobile and Desktop application" as ``http://localhost``.
|
|
94
|
+
|
|
95
|
+
:param str tenant: Tenant name, for example: contoso.onmicrosoft.com
|
|
96
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
97
|
+
:param list[str] or None scopes: Scopes requested to access a protected API (a resource)
|
|
98
|
+
"""
|
|
99
|
+
self._auth_context.with_interactive(tenant, client_id, scopes)
|
|
100
|
+
return self
|
|
101
|
+
|
|
102
|
+
def with_access_token(self, token_func):
|
|
103
|
+
# type: (Callable[[], TokenResponse]) -> Self
|
|
104
|
+
"""
|
|
105
|
+
Initializes a client to acquire a token from a callback
|
|
106
|
+
:param () -> TokenResponse token_func: A token callback
|
|
107
|
+
"""
|
|
108
|
+
self._auth_context.with_access_token(token_func)
|
|
34
109
|
return self
|
|
35
110
|
|
|
36
111
|
def _authenticate_request(self, request):
|
|
37
112
|
# type: (RequestOptions) -> None
|
|
38
113
|
"""Authenticate request"""
|
|
39
114
|
self._auth_context.authenticate_request(request)
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def authentication_context(self):
|
|
118
|
+
return self._auth_context
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def base_url(self):
|
|
122
|
+
"""Represents Base Url"""
|
|
123
|
+
return self._auth_context.url
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def service_root_url(self):
|
|
127
|
+
return "{0}/_api".format(self._auth_context.url)
|
|
@@ -15,15 +15,29 @@ class DocumentCrawlLog(Entity):
|
|
|
15
15
|
)
|
|
16
16
|
super(DocumentCrawlLog, self).__init__(context, static_path)
|
|
17
17
|
|
|
18
|
-
def get_crawled_urls(
|
|
18
|
+
def get_crawled_urls(
|
|
19
|
+
self,
|
|
20
|
+
get_count_only=False,
|
|
21
|
+
max_rows=None,
|
|
22
|
+
query_string=None,
|
|
23
|
+
content_source_id=None,
|
|
24
|
+
):
|
|
19
25
|
"""
|
|
20
26
|
Retrieves information about all the contents that were crawled.
|
|
21
27
|
|
|
22
28
|
:param bool get_count_only: f true, only the count of the contents crawled MUST be returned.
|
|
23
29
|
If false, all the information about the crawled contents MUST be returned.
|
|
30
|
+
:param int max_rows:
|
|
31
|
+
:param str query_string:
|
|
32
|
+
:param int content_source_id:
|
|
24
33
|
"""
|
|
25
34
|
return_type = ClientResult(self.context, SimpleDataTable())
|
|
26
|
-
payload = {
|
|
35
|
+
payload = {
|
|
36
|
+
"getCountOnly": get_count_only,
|
|
37
|
+
"maxRows": max_rows,
|
|
38
|
+
"queryString": query_string,
|
|
39
|
+
"contentSourceID": content_source_id,
|
|
40
|
+
}
|
|
27
41
|
qry = ServiceOperationQuery(
|
|
28
42
|
self, "GetCrawledUrls", None, payload, None, return_type
|
|
29
43
|
)
|