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
office365/graph_request.py
CHANGED
|
@@ -1,30 +1,89 @@
|
|
|
1
|
+
from typing import Callable, Optional
|
|
2
|
+
|
|
3
|
+
from office365.azure_env import AzureEnvironment
|
|
4
|
+
from office365.runtime.auth.entra.authentication_context import AuthenticationContext
|
|
5
|
+
from office365.runtime.http.request_options import RequestOptions
|
|
1
6
|
from office365.runtime.odata.request import ODataRequest
|
|
2
7
|
from office365.runtime.odata.v4.json_format import V4JsonFormat
|
|
3
8
|
|
|
4
|
-
environments_endpoints = {
|
|
5
|
-
"GCCH": {
|
|
6
|
-
"graph_url": "https://graph.microsoft.com",
|
|
7
|
-
"entra_url": "https://login.microsoftonline.com",
|
|
8
|
-
},
|
|
9
|
-
"GCC High": {
|
|
10
|
-
"graph_url": "https://graph.microsoft.us",
|
|
11
|
-
"entra_url": "https://login.microsoftonline.us",
|
|
12
|
-
},
|
|
13
|
-
"DoD": {
|
|
14
|
-
"graph_url": "https://dod-graph.microsoft.us",
|
|
15
|
-
"entra_url": "https://login.chinacloudapi.cn",
|
|
16
|
-
},
|
|
17
|
-
}
|
|
18
|
-
|
|
19
9
|
|
|
20
10
|
class GraphRequest(ODataRequest):
|
|
21
|
-
def __init__(
|
|
22
|
-
|
|
11
|
+
def __init__(
|
|
12
|
+
self, version="v1.0", tenant=None, environment=AzureEnvironment.Global
|
|
13
|
+
):
|
|
14
|
+
# type: (str, str, str) -> None
|
|
23
15
|
super(GraphRequest, self).__init__(V4JsonFormat())
|
|
24
16
|
self._version = version
|
|
25
|
-
self.
|
|
17
|
+
self._environment = environment
|
|
18
|
+
self._auth_context = AuthenticationContext(
|
|
19
|
+
environment=environment, tenant=tenant
|
|
20
|
+
)
|
|
21
|
+
self.beforeExecute += self.authenticate_request
|
|
22
|
+
|
|
23
|
+
def with_access_token(self, token_callback):
|
|
24
|
+
# type: (Callable[[], dict]) -> "GraphRequest"
|
|
25
|
+
"""
|
|
26
|
+
Initializes the confidential client with token callback.
|
|
27
|
+
"""
|
|
28
|
+
self._auth_context.with_access_token(token_callback)
|
|
29
|
+
return self
|
|
30
|
+
|
|
31
|
+
def with_certificate(self, client_id, thumbprint, private_key):
|
|
32
|
+
# type: (str, str, str) -> "GraphRequest"
|
|
33
|
+
"""
|
|
34
|
+
Initializes the confidential client with client certificate
|
|
35
|
+
|
|
36
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
37
|
+
:param str thumbprint: Thumbprint
|
|
38
|
+
:param str private_key: Private key
|
|
39
|
+
"""
|
|
40
|
+
self._auth_context.with_certificate(client_id, thumbprint, private_key)
|
|
41
|
+
return self
|
|
42
|
+
|
|
43
|
+
def with_client_secret(self, client_id, client_secret):
|
|
44
|
+
# type: (str, str) -> "GraphRequest"
|
|
45
|
+
"""
|
|
46
|
+
Initializes the confidential client with client secret
|
|
47
|
+
|
|
48
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
49
|
+
:param str client_secret: Client secret
|
|
50
|
+
"""
|
|
51
|
+
self._auth_context.with_client_secret(client_id, client_secret)
|
|
52
|
+
return self
|
|
53
|
+
|
|
54
|
+
def with_token_interactive(self, client_id, username=None):
|
|
55
|
+
# type: (str, Optional[str]) -> "GraphRequest"
|
|
56
|
+
"""
|
|
57
|
+
Initializes the client via user credentials
|
|
58
|
+
Note: only works if your app is registered with redirect_uri as http://localhost
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
62
|
+
:param str username: Typically a UPN in the form of an email address.
|
|
63
|
+
"""
|
|
64
|
+
self._auth_context.with_token_interactive(client_id, username)
|
|
65
|
+
return self
|
|
66
|
+
|
|
67
|
+
def with_username_and_password(self, client_id, username, password):
|
|
68
|
+
# type: (str, str, str) -> "GraphRequest"
|
|
69
|
+
"""
|
|
70
|
+
Initializes the client via user credentials
|
|
71
|
+
:param str client_id: The OAuth client id of the calling application.
|
|
72
|
+
:param str username: Typically a UPN in the form of an email address.
|
|
73
|
+
:param str password: The password.
|
|
74
|
+
"""
|
|
75
|
+
self._auth_context.with_username_and_password(client_id, username, password)
|
|
76
|
+
return self
|
|
77
|
+
|
|
78
|
+
def authenticate_request(self, request):
|
|
79
|
+
# type: (RequestOptions) -> None
|
|
80
|
+
"""Authenticate request"""
|
|
81
|
+
token = self._auth_context.acquire_token()
|
|
82
|
+
request.ensure_header("Authorization", "Bearer {0}".format(token.accessToken))
|
|
26
83
|
|
|
27
84
|
@property
|
|
28
85
|
def service_root_url(self):
|
|
29
86
|
# type: () -> str
|
|
30
|
-
return "
|
|
87
|
+
return "{0}/{1}".format(
|
|
88
|
+
AzureEnvironment.get_graph_authority(self._environment), self._version
|
|
89
|
+
)
|
|
@@ -7,9 +7,9 @@ from office365.runtime.queries.function import FunctionQuery
|
|
|
7
7
|
|
|
8
8
|
class ServiceHealthIssue(ServiceAnnouncementBase):
|
|
9
9
|
"""
|
|
10
|
-
Represents a service
|
|
10
|
+
Represents a service sitehealth issue in a service.
|
|
11
11
|
|
|
12
|
-
The service
|
|
12
|
+
The service sitehealth issue can be a service incident or service advisory. For example:
|
|
13
13
|
|
|
14
14
|
- Service incident: "Exchange mailbox service is down".
|
|
15
15
|
- Service advisory: "Users may experience delays in emails reception".
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from office365.base_item import BaseItem
|
|
3
|
+
from office365.onedrive.base_item import BaseItem
|
|
4
4
|
from office365.onedrive.columns.boolean import BooleanColumn
|
|
5
5
|
from office365.onedrive.columns.calculated import CalculatedColumn
|
|
6
6
|
from office365.onedrive.columns.choice import ChoiceColumn
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from office365.base_item import BaseItem
|
|
4
3
|
from office365.entity_collection import EntityCollection
|
|
4
|
+
from office365.onedrive.base_item import BaseItem
|
|
5
5
|
from office365.onedrive.columns.column_link import ColumnLink
|
|
6
6
|
from office365.onedrive.columns.definition import ColumnDefinition
|
|
7
7
|
from office365.onedrive.contenttypes.order import ContentTypeOrder
|
|
@@ -9,11 +9,11 @@ from typing import IO, AnyStr, Callable, Optional, TypeVar
|
|
|
9
9
|
import requests
|
|
10
10
|
from typing_extensions import Self
|
|
11
11
|
|
|
12
|
-
from office365.base_item import BaseItem
|
|
13
12
|
from office365.delta_path import DeltaPath
|
|
14
13
|
from office365.entity_collection import EntityCollection
|
|
15
14
|
from office365.onedrive.analytics.item_activity_stat import ItemActivityStat
|
|
16
15
|
from office365.onedrive.analytics.item_analytics import ItemAnalytics
|
|
16
|
+
from office365.onedrive.base_item import BaseItem
|
|
17
17
|
from office365.onedrive.driveitems.audio import Audio
|
|
18
18
|
from office365.onedrive.driveitems.conflict_behavior import ConflictBehavior
|
|
19
19
|
from office365.onedrive.driveitems.geo_coordinates import GeoCoordinates
|
|
@@ -66,6 +66,7 @@ class DriveItem(BaseItem):
|
|
|
66
66
|
OneDrive and SharePoint are returned as driveItem resources"""
|
|
67
67
|
|
|
68
68
|
def get_files(self, recursive=False, page_size=None):
|
|
69
|
+
# type: (bool, Optional[int]) -> EntityCollection["DriveItem"]
|
|
69
70
|
"""Retrieves files
|
|
70
71
|
:param bool recursive: Determines whether to enumerate folders recursively
|
|
71
72
|
:param int page_size: Page size
|
|
@@ -94,6 +95,7 @@ class DriveItem(BaseItem):
|
|
|
94
95
|
return return_type
|
|
95
96
|
|
|
96
97
|
def get_folders(self, recursive=False, page_size=None):
|
|
98
|
+
# type: (bool, Optional[int]) -> EntityCollection["DriveItem"]
|
|
97
99
|
"""Retrieves folders
|
|
98
100
|
:param bool recursive: Determines whether to enumerate folders recursively
|
|
99
101
|
:param int page_size: Page size
|
|
@@ -177,6 +179,16 @@ class DriveItem(BaseItem):
|
|
|
177
179
|
self.context.add_query(qry)
|
|
178
180
|
return return_type
|
|
179
181
|
|
|
182
|
+
def discard_checkout(self):
|
|
183
|
+
"""Discard the check out of a driveItem. This action releases a driveItem resource that was previously
|
|
184
|
+
checked out. Any changes made to the item while it was checked out are discarded.
|
|
185
|
+
|
|
186
|
+
The same user that performed the checkout must discard it. Another alternative is to use application permissions
|
|
187
|
+
"""
|
|
188
|
+
qry = ServiceOperationQuery(self, "discardCheckout")
|
|
189
|
+
self.context.add_query(qry)
|
|
190
|
+
return self
|
|
191
|
+
|
|
180
192
|
def extract_sensitivity_labels(self):
|
|
181
193
|
# type: () -> ClientResult[ExtractSensitivityLabelsResult]
|
|
182
194
|
"""
|
|
@@ -366,7 +378,7 @@ class DriveItem(BaseItem):
|
|
|
366
378
|
def download_folder(
|
|
367
379
|
self, download_file, after_file_downloaded=None, recursive=True
|
|
368
380
|
):
|
|
369
|
-
# type: (IO, Callable[[
|
|
381
|
+
# type: (IO, Callable[["DriveItem"], None], bool) -> "DriveItem"
|
|
370
382
|
"""
|
|
371
383
|
Download the folder content
|
|
372
384
|
"""
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
from datetime import datetime
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from office365.directory.permissions.identity_set import IdentitySet
|
|
4
5
|
from office365.entity import Entity
|
|
6
|
+
from office365.onedrive.driveitems.retention_label_settings import (
|
|
7
|
+
RetentionLabelSettings,
|
|
8
|
+
)
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
class ItemRetentionLabel(Entity):
|
|
@@ -23,3 +27,32 @@ class ItemRetentionLabel(Entity):
|
|
|
23
27
|
# type: () -> Optional[IdentitySet]
|
|
24
28
|
"""Identity of the user who applied the label. Read-only."""
|
|
25
29
|
return self.properties.get("labelAppliedBy", IdentitySet())
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def label_applied_datetime(self):
|
|
33
|
+
# type: () -> Optional[datetime]
|
|
34
|
+
"""The date and time when the label was applied on the item.
|
|
35
|
+
The timestamp type represents date and time information using ISO 8601 format and is always in UTC.
|
|
36
|
+
"""
|
|
37
|
+
return self.properties.get("labelAppliedDateTime", datetime.min)
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def name(self):
|
|
41
|
+
# type: () -> Optional[str]
|
|
42
|
+
"""The retention label on the document. Read-write."""
|
|
43
|
+
return self.properties.get("name", None)
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def retention_settings(self):
|
|
47
|
+
# type: () -> RetentionLabelSettings
|
|
48
|
+
"""The retention settings enforced on the item. Read-write."""
|
|
49
|
+
return self.properties.get("retentionSettings", RetentionLabelSettings())
|
|
50
|
+
|
|
51
|
+
def get_property(self, name, default_value=None):
|
|
52
|
+
if default_value is None:
|
|
53
|
+
property_mapping = {
|
|
54
|
+
"labelAppliedBy": self.label_applied_by,
|
|
55
|
+
"retentionSettings": self.retention_settings,
|
|
56
|
+
}
|
|
57
|
+
default_value = property_mapping.get(name, None)
|
|
58
|
+
return super(ItemRetentionLabel, self).get_property(name, default_value)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from office365.base_item import BaseItem
|
|
4
3
|
from office365.directory.permissions.identity_set import IdentitySet
|
|
5
4
|
from office365.entity_collection import EntityCollection
|
|
5
|
+
from office365.onedrive.base_item import BaseItem
|
|
6
6
|
from office365.onedrive.driveitems.conflict_behavior import ConflictBehavior
|
|
7
7
|
from office365.onedrive.driveitems.driveItem import DriveItem
|
|
8
8
|
from office365.onedrive.driveitems.system_facet import SystemFacet
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class FileStorageContainer(Entity):
|
|
5
|
+
"""Represents a location where multiple users or a group of users can store files and access them
|
|
6
|
+
via an application. All file system objects in a fileStorageContainer are returned as driveItem resources.
|
|
7
|
+
"""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.entity_collection import EntityCollection
|
|
3
|
+
from office365.onedrive.filestorage.container import FileStorageContainer
|
|
4
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class FileStorage(Entity):
|
|
8
|
+
"""Represents the structure of active and deleted fileStorageContainer objects."""
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def containers(self):
|
|
12
|
+
"""The collection of active fileStorageContainers"""
|
|
13
|
+
return self.properties.get(
|
|
14
|
+
"containers",
|
|
15
|
+
EntityCollection(
|
|
16
|
+
self.context,
|
|
17
|
+
FileStorageContainer,
|
|
18
|
+
ResourcePath("containers", self.resource_path),
|
|
19
|
+
),
|
|
20
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from office365.base_item import BaseItem
|
|
2
1
|
from office365.entity_collection import EntityCollection
|
|
3
2
|
from office365.onedrive.analytics.item_analytics import ItemAnalytics
|
|
3
|
+
from office365.onedrive.base_item import BaseItem
|
|
4
4
|
from office365.onedrive.contenttypes.info import ContentTypeInfo
|
|
5
5
|
from office365.onedrive.documentsets.version import DocumentSetVersion
|
|
6
6
|
from office365.onedrive.internal.queries.get_activities_by_interval import (
|
office365/onedrive/lists/list.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from office365.base_item import BaseItem
|
|
4
3
|
from office365.entity_collection import EntityCollection
|
|
4
|
+
from office365.onedrive.base_item import BaseItem
|
|
5
5
|
from office365.onedrive.columns.definition_collection import ColumnDefinitionCollection
|
|
6
6
|
from office365.onedrive.contenttypes.collection import ContentTypeCollection
|
|
7
7
|
from office365.onedrive.listitems.list_item import ListItem
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from office365.entity_collection import EntityCollection
|
|
2
|
+
from office365.onedrive.base_item import BaseItem
|
|
3
|
+
from office365.onedrive.recyclebin.item import RecycleBinItem
|
|
4
|
+
from office365.onedrive.recyclebin.settings import RecycleBinSettings
|
|
5
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RecycleBin(BaseItem):
|
|
9
|
+
"""Represents a container for a collection of recycleBinItem resources in a SharePoint site or a
|
|
10
|
+
SharePoint Embedded fileStorageContainer."""
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def items(self):
|
|
14
|
+
# type: () -> EntityCollection[RecycleBinItem]
|
|
15
|
+
"""List of the recycleBinItems deleted by a user."""
|
|
16
|
+
return self.properties.setdefault(
|
|
17
|
+
"items",
|
|
18
|
+
EntityCollection(
|
|
19
|
+
self.context,
|
|
20
|
+
RecycleBinItem,
|
|
21
|
+
ResourcePath("items", self.resource_path),
|
|
22
|
+
self,
|
|
23
|
+
),
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def settings(self):
|
|
28
|
+
"""Settings for the recycleBin"""
|
|
29
|
+
return self.properties.get("settings", RecycleBinSettings())
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class RecycleBinSettings(ClientValue):
|
|
5
|
+
"""Represents settings for the recycleBin resource type."""
|
|
6
|
+
|
|
7
|
+
def __init__(self, retention_period_override_days=None):
|
|
8
|
+
"""
|
|
9
|
+
:param int retention_period_override_days: Recycle bin retention period override in days for deleted content.
|
|
10
|
+
The default value is 93; the value range is 7 to 180. The setting applies to newly deleted content only.
|
|
11
|
+
Setting this property to null reverts to its default value.
|
|
12
|
+
"""
|
|
13
|
+
self.retentionPeriodOverrideDays = retention_period_override_days
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from office365.base_item import BaseItem
|
|
2
1
|
from office365.directory.permissions.identity_set import IdentitySet
|
|
3
2
|
from office365.entity_collection import EntityCollection
|
|
3
|
+
from office365.onedrive.base_item import BaseItem
|
|
4
4
|
from office365.onedrive.driveitems.driveItem import DriveItem
|
|
5
5
|
from office365.onedrive.internal.paths.root import RootPath
|
|
6
6
|
from office365.onedrive.listitems.list_item import ListItem
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from office365.base_item import BaseItem
|
|
3
|
+
from office365.onedrive.base_item import BaseItem
|
|
4
4
|
from office365.onedrive.driveitems.publication_facet import PublicationFacet
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class BaseSitePage(BaseItem):
|
|
8
8
|
"""An abstract type that represents a page in the site page library."""
|
|
9
9
|
|
|
10
|
+
def __repr__(self):
|
|
11
|
+
return self.name or self.entity_type_name
|
|
12
|
+
|
|
10
13
|
@property
|
|
11
14
|
def publishing_state(self):
|
|
12
15
|
# type: () -> Optional[str]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
2
|
from office365.entity_collection import EntityCollection
|
|
3
|
-
from office365.onedrive.sitepages.
|
|
4
|
-
from office365.onedrive.sitepages.
|
|
3
|
+
from office365.onedrive.sitepages.sections.horizontal import HorizontalSection
|
|
4
|
+
from office365.onedrive.sitepages.sections.vertical import VerticalSection
|
|
5
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
6
6
|
|
|
7
7
|
|
|
@@ -10,10 +10,22 @@ class SitePageCollection(EntityCollection[SitePage]):
|
|
|
10
10
|
def __init__(self, context, resource_path=None):
|
|
11
11
|
super(SitePageCollection, self).__init__(context, SitePage, resource_path)
|
|
12
12
|
|
|
13
|
+
def get(self):
|
|
14
|
+
def _construct_request(request):
|
|
15
|
+
# type: (RequestOptions) -> None
|
|
16
|
+
# request.url += "/microsoft.graph.sitePage"
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
return super(SitePageCollection, self).get().before_execute(_construct_request)
|
|
20
|
+
|
|
21
|
+
def get_by_name(self, name):
|
|
22
|
+
return self.single("name eq '{0}'".format(name))
|
|
23
|
+
|
|
13
24
|
def add(self, title):
|
|
14
25
|
"""
|
|
15
26
|
Create a new sitePage in the site pages list in a site.
|
|
16
27
|
|
|
28
|
+
:param str title:
|
|
17
29
|
"""
|
|
18
30
|
|
|
19
31
|
def _construct_request(request):
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
2
|
from office365.entity_collection import EntityCollection
|
|
3
|
-
from office365.onedrive.sitepages.
|
|
3
|
+
from office365.onedrive.sitepages.sections.horizontal_column import (
|
|
4
4
|
HorizontalSectionColumn,
|
|
5
5
|
)
|
|
6
6
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -15,23 +15,23 @@ class SitePage(BaseSitePage):
|
|
|
15
15
|
webParts."""
|
|
16
16
|
|
|
17
17
|
def get_web_parts_by_position(
|
|
18
|
-
self,
|
|
18
|
+
self, web_part_index, horizontal_section_id, is_in_vertical_section, column_id
|
|
19
19
|
):
|
|
20
20
|
"""
|
|
21
21
|
Get a collection of webPart by providing webPartPosition information.
|
|
22
22
|
|
|
23
|
-
:param float
|
|
23
|
+
:param float web_part_index: Index of the current WebPart. Represents the order of WebPart in this column or
|
|
24
24
|
section. Only works if either columnId or isInVerticalSection is provided.
|
|
25
|
-
:param float
|
|
26
|
-
:param bool
|
|
27
|
-
:param float
|
|
25
|
+
:param float horizontal_section_id: Indicate the horizontal section where the WebPart located in.
|
|
26
|
+
:param bool is_in_vertical_section: Indicate whether the WebPart located in the vertical section.
|
|
27
|
+
:param float column_id: Indicate the identifier of the column where the WebPart located in. Only works
|
|
28
28
|
if horizontalSectionId is provided.
|
|
29
29
|
"""
|
|
30
30
|
params = {
|
|
31
|
-
"webPartIndex":
|
|
32
|
-
"horizontalSectionId":
|
|
33
|
-
"isInverticalSection":
|
|
34
|
-
"columnId":
|
|
31
|
+
"webPartIndex": web_part_index,
|
|
32
|
+
"horizontalSectionId": horizontal_section_id,
|
|
33
|
+
"isInverticalSection": is_in_vertical_section,
|
|
34
|
+
"columnId": column_id,
|
|
35
35
|
}
|
|
36
36
|
return_type = EntityCollection(
|
|
37
37
|
self.context, WebPart, ResourcePath("webParts", self.resource_path)
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from office365.onedrive.sitepages.webparts.data import WebPartData
|
|
1
4
|
from office365.onedrive.sitepages.webparts.web_part import WebPart
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
class StandardWebPart(WebPart):
|
|
5
8
|
"""Represents a standard web part instance on a SharePoint page."""
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def data(self):
|
|
12
|
+
# type: () -> Optional[WebPartData]
|
|
13
|
+
"""Data of the webPart."""
|
|
14
|
+
return self.properties.get("data", WebPartData())
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.onedrive.sitepages.webparts.position import WebPartPosition
|
|
3
|
+
from office365.runtime.client_result import ClientResult
|
|
4
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
class WebPart(Entity):
|
|
5
8
|
"""Represents a specific web part instance on a SharePoint page."""
|
|
9
|
+
|
|
10
|
+
def get_position_of_web_part(self):
|
|
11
|
+
"""Returns the position of the specified web part in the page."""
|
|
12
|
+
return_type = ClientResult(self.context, WebPartPosition())
|
|
13
|
+
qry = ServiceOperationQuery(
|
|
14
|
+
self, "getPositionOfWebPart", return_type=return_type
|
|
15
|
+
)
|
|
16
|
+
self.context.add_query(qry)
|
|
17
|
+
return self
|
office365/onedrive/sites/site.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
|
-
from office365.base_item import BaseItem
|
|
5
4
|
from office365.entity_collection import EntityCollection
|
|
6
5
|
from office365.onedrive.analytics.item_activity_stat import ItemActivityStat
|
|
7
6
|
from office365.onedrive.analytics.item_analytics import ItemAnalytics
|
|
7
|
+
from office365.onedrive.base_item import BaseItem
|
|
8
8
|
from office365.onedrive.columns.definition_collection import ColumnDefinitionCollection
|
|
9
9
|
from office365.onedrive.contenttypes.collection import ContentTypeCollection
|
|
10
10
|
from office365.onedrive.drives.drive import Drive
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
+
from office365.onedrive.sites.archival_details import SiteArchivalDetails
|
|
1
2
|
from office365.runtime.client_value import ClientValue
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class SiteCollection(ClientValue):
|
|
5
6
|
"""The siteCollection resource provides more information about a site collection."""
|
|
6
7
|
|
|
7
|
-
def __init__(
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
root=None,
|
|
11
|
+
hostname=None,
|
|
12
|
+
data_location_code=None,
|
|
13
|
+
archival_details=SiteArchivalDetails(),
|
|
14
|
+
):
|
|
8
15
|
"""
|
|
9
16
|
|
|
10
17
|
:param office365.onedrive.root.Root root: The hostname for the site collection.
|
|
11
18
|
:param str hostname: The hostname for the site collection.
|
|
12
19
|
:param str data_location_code: The geographic region code for where this site collection resides
|
|
20
|
+
:param str archival_details: Represents the archival details of a siteCollection.
|
|
13
21
|
"""
|
|
14
22
|
super(SiteCollection, self).__init__()
|
|
15
23
|
self.root = root
|
|
16
24
|
self.hostname = hostname
|
|
17
25
|
self.dataLocationCode = data_location_code
|
|
26
|
+
self.archivalDetails = archival_details
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.onedrive.filestorage.file_storage import FileStorage
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class Storage(Entity):
|
|
5
7
|
"""Facilitates the structures of fileStorageContainers."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def file_storage(self):
|
|
11
|
+
"""FileStorageContainer"""
|
|
12
|
+
return self.properties.get(
|
|
13
|
+
"fileStorage",
|
|
14
|
+
FileStorage(self.context, ResourcePath("fileStorage", self.resource_path)),
|
|
15
|
+
)
|
|
@@ -1,7 +1,47 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.onedrive.workbooks.charts.axis import WorkbookChartAxis
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class WorkbookChartAxes(Entity):
|
|
5
7
|
"""Represents the chart axes."""
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
@property
|
|
10
|
+
def category_axis(self):
|
|
11
|
+
"""Represents the category axis in a chart."""
|
|
12
|
+
return self.properties.get(
|
|
13
|
+
"categoryAxis",
|
|
14
|
+
WorkbookChartAxis(
|
|
15
|
+
self.context, ResourcePath("categoryAxis", self.resource_path)
|
|
16
|
+
),
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def series_axis(self):
|
|
21
|
+
"""Represents the series axis of a 3-dimensional chart."""
|
|
22
|
+
return self.properties.get(
|
|
23
|
+
"seriesAxis",
|
|
24
|
+
WorkbookChartAxis(
|
|
25
|
+
self.context, ResourcePath("seriesAxis", self.resource_path)
|
|
26
|
+
),
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def value_axis(self):
|
|
31
|
+
"""Represents the value axis in an axis."""
|
|
32
|
+
return self.properties.get(
|
|
33
|
+
"valueAxis",
|
|
34
|
+
WorkbookChartAxis(
|
|
35
|
+
self.context, ResourcePath("valueAxis", self.resource_path)
|
|
36
|
+
),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def get_property(self, name, default_value=None):
|
|
40
|
+
if default_value is None:
|
|
41
|
+
property_mapping = {
|
|
42
|
+
"categoryAxis": self.category_axis,
|
|
43
|
+
"seriesAxis": self.series_axis,
|
|
44
|
+
"valueAxis": self.value_axis,
|
|
45
|
+
}
|
|
46
|
+
default_value = property_mapping.get(name, None)
|
|
47
|
+
return super(WorkbookChartAxes, self).get_property(name, default_value)
|