Office365-REST-Python-Client 2.4.2__py3-none-any.whl → 2.4.4__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.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +65 -31
- {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +401 -259
- office365/base_item.py +27 -5
- office365/booking/business.py +7 -0
- office365/booking/currency.py +5 -0
- office365/booking/solutions_root.py +32 -0
- office365/communications/calls/invitation_participant_info.py +17 -1
- office365/communications/calls/options.py +9 -0
- office365/communications/onlinemeetings/provider_type.py +3 -0
- office365/communications/presences/presence.py +14 -0
- office365/communications/presences/status_message.py +12 -0
- office365/directory/administrative_unit.py +22 -0
- office365/directory/applications/collection.py +2 -1
- office365/directory/applications/roles/assignment.py +45 -5
- office365/directory/applications/roles/assignment_collection.py +8 -0
- office365/directory/applications/roles/role.py +6 -1
- office365/directory/audit/signins/activity.py +31 -0
- office365/directory/audit/signins/location.py +17 -0
- office365/directory/audit/signins/signin.py +33 -0
- office365/directory/authentication/authentication.py +9 -0
- office365/directory/authentication/methods/details.py +25 -0
- office365/directory/authentication/methods/email.py +16 -0
- office365/directory/authentication/methods/root.py +27 -0
- office365/directory/certificates/authority.py +6 -1
- office365/directory/extensions/extended_property.py +8 -1
- office365/directory/extensions/extension.py +1 -1
- office365/directory/extensions/extension_property.py +0 -3
- office365/directory/extensions/open_type.py +8 -0
- office365/directory/groups/collection.py +2 -4
- office365/directory/groups/group.py +18 -4
- office365/directory/identities/governance.py +2 -0
- office365/directory/identities/object_identity.py +3 -3
- office365/directory/insights/resource_reference.py +15 -0
- office365/directory/insights/shared.py +36 -0
- office365/directory/insights/sharing_detail.py +11 -0
- office365/directory/insights/trending.py +8 -0
- office365/directory/insights/usage_details.py +16 -0
- office365/directory/insights/used.py +30 -0
- office365/directory/invitations/invitation.py +33 -1
- office365/directory/licenses/assigned_plan.py +19 -1
- office365/directory/licenses/assignment_state.py +5 -0
- office365/directory/licenses/service_plan_info.py +4 -0
- office365/directory/licenses/subscribed_sku.py +41 -0
- office365/directory/licenses/units_detail.py +11 -0
- office365/directory/object.py +3 -1
- office365/directory/object_collection.py +3 -4
- office365/directory/password_credential.py +5 -1
- office365/directory/permissions/email_identity.py +5 -0
- office365/directory/permissions/grants/condition_set.py +26 -0
- office365/directory/permissions/grants/resource_specific.py +21 -0
- office365/directory/policies/authentication_flows.py +9 -0
- office365/directory/policies/authentication_strength.py +10 -0
- office365/directory/policies/authorization.py +8 -0
- office365/directory/policies/cross_tenant_access.py +5 -0
- office365/directory/policies/root.py +35 -2
- office365/directory/protection/information.py +5 -0
- office365/directory/protection/risk_detection.py +11 -0
- office365/directory/protection/riskyusers/activity.py +5 -0
- office365/directory/protection/riskyusers/collection.py +32 -0
- office365/directory/protection/riskyusers/history_item.py +20 -0
- office365/directory/protection/riskyusers/risky_user.py +26 -0
- office365/directory/protection/root.py +31 -0
- office365/directory/rolemanagement/application.py +35 -0
- office365/directory/{roles → rolemanagement}/management.py +8 -1
- office365/directory/{roles → rolemanagement}/role.py +14 -0
- office365/directory/{roles → rolemanagement}/template.py +8 -0
- office365/directory/rolemanagement/unified_role_assignment.py +45 -0
- office365/directory/rolemanagement/unified_role_definition.py +6 -0
- office365/directory/security/alerts/alert.py +21 -0
- office365/directory/security/alerts/history_state.py +5 -0
- office365/directory/security/attacksimulations/automation.py +21 -0
- office365/directory/security/attacksimulations/automation_run.py +5 -0
- office365/directory/security/attacksimulations/repeat_offender.py +6 -0
- office365/directory/security/attacksimulations/root.py +26 -0
- office365/directory/security/attacksimulations/simulation.py +17 -0
- office365/directory/security/cases/__init__.py +0 -0
- office365/directory/security/cases/ediscovery.py +6 -0
- office365/directory/security/cases/root.py +22 -0
- office365/directory/security/incidents/incident.py +67 -0
- office365/directory/security/security.py +10 -1
- office365/directory/serviceprincipals/service_principal.py +89 -4
- office365/directory/synchronization/__init__.py +0 -0
- office365/directory/synchronization/job.py +16 -0
- office365/directory/synchronization/progress.py +5 -0
- office365/directory/synchronization/status.py +13 -0
- office365/directory/synchronization/synchronization.py +24 -0
- office365/directory/tenant_information.py +17 -0
- office365/directory/tenant_relationship.py +21 -0
- office365/directory/users/activities/activity.py +45 -1
- office365/directory/users/collection.py +8 -0
- office365/directory/users/password_profile.py +18 -2
- office365/directory/users/user.py +254 -29
- office365/entity.py +3 -3
- office365/graph_client.py +64 -12
- office365/intune/audit/actor.py +5 -0
- office365/intune/audit/event.py +21 -24
- office365/intune/audit/event_collection.py +26 -0
- office365/intune/audit/property.py +5 -0
- office365/intune/audit/resource.py +11 -0
- office365/intune/brand.py +6 -0
- office365/intune/devices/compliance/__init__.py +0 -0
- office365/intune/devices/compliance/policy.py +6 -0
- office365/intune/devices/compliance/policy_state.py +5 -0
- office365/intune/devices/data.py +5 -0
- office365/intune/devices/detail.py +10 -0
- office365/intune/devices/enrollment/__init__.py +0 -0
- office365/intune/devices/enrollment/configuration.py +25 -0
- office365/intune/devices/enrollment/configuration_assignment.py +5 -0
- office365/intune/devices/enrollment/limit_configuration.py +5 -0
- office365/intune/devices/managed.py +44 -3
- office365/intune/devices/management/__init__.py +0 -0
- office365/intune/devices/management/management.py +69 -0
- office365/intune/devices/management/reports/__init__.py +0 -0
- office365/intune/devices/management/reports/reports.py +5 -0
- office365/intune/devices/management/settings.py +18 -0
- office365/intune/organizations/branding.py +15 -0
- office365/intune/organizations/organization.py +14 -0
- office365/intune/printing/__init__.py +0 -0
- office365/intune/printing/base.py +11 -0
- office365/intune/printing/capabilities.py +5 -0
- office365/intune/printing/connectors/__init__.py +0 -0
- office365/intune/printing/connectors/connector.py +6 -0
- office365/intune/printing/operations/__init__.py +0 -0
- office365/intune/printing/print.py +24 -0
- office365/intune/printing/printer.py +6 -0
- office365/intune/printing/services/__init__.py +0 -0
- office365/intune/printing/services/endpoint.py +5 -0
- office365/intune/printing/services/service.py +17 -0
- office365/intune/printing/share.py +5 -0
- office365/intune/printing/shares/__init__.py +0 -0
- office365/intune/printing/taskdefinitions/__init__.py +0 -0
- office365/intune/provisioned_plan.py +5 -1
- office365/intune/servicecommunications/__init__.py +0 -0
- office365/intune/servicecommunications/announcement.py +39 -0
- office365/intune/servicecommunications/announcement_base.py +5 -0
- office365/intune/servicecommunications/health/__init__.py +0 -0
- office365/intune/servicecommunications/health/health.py +7 -0
- office365/intune/servicecommunications/issues/__init__.py +0 -0
- office365/intune/servicecommunications/issues/issue.py +29 -0
- office365/intune/servicecommunications/messages/__init__.py +0 -0
- office365/intune/servicecommunications/messages/update.py +10 -0
- office365/intune/termsandconditions/__init__.py +0 -0
- office365/intune/vpp_token.py +10 -0
- office365/onedrive/admin.py +16 -0
- office365/onedrive/columns/content_approval_status.py +5 -0
- office365/onedrive/columns/datetime.py +15 -0
- office365/onedrive/columns/default_value.py +4 -0
- office365/onedrive/columns/definition.py +49 -3
- office365/onedrive/columns/definition_collection.py +17 -6
- office365/onedrive/columns/lookup.py +5 -1
- office365/onedrive/columns/types.py +13 -0
- office365/onedrive/contenttypes/content_type.py +8 -0
- office365/onedrive/driveitems/audio.py +12 -1
- office365/onedrive/driveitems/driveItem.py +147 -69
- office365/onedrive/driveitems/image.py +8 -1
- office365/onedrive/driveitems/item_preview_info.py +20 -2
- office365/onedrive/driveitems/remote_item.py +19 -4
- office365/onedrive/drives/drive.py +7 -1
- office365/onedrive/drives/quota.py +18 -0
- office365/onedrive/drives/recipient.py +4 -0
- office365/onedrive/files/system_info.py +8 -6
- office365/onedrive/folders/folder.py +3 -3
- office365/onedrive/internal/paths/children.py +1 -4
- office365/onedrive/internal/paths/shared.py +7 -2
- office365/onedrive/lists/collection.py +12 -6
- office365/onedrive/lists/list.py +13 -5
- office365/onedrive/operations/long_running.py +7 -0
- office365/onedrive/operations/pending.py +13 -0
- office365/onedrive/operations/pending_content_update.py +5 -0
- office365/onedrive/permissions/collection.py +5 -6
- office365/onedrive/permissions/sharing_link.py +16 -1
- office365/onedrive/sensitivitylabels/__init__.py +0 -0
- office365/onedrive/sensitivitylabels/assignment.py +17 -0
- office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
- office365/onedrive/sensitivitylabels/extract_result.py +13 -0
- office365/onedrive/sharepoint_settings.py +25 -0
- office365/onedrive/sites/sites_with_root.py +11 -1
- office365/onedrive/termstore/groups/collection.py +1 -1
- office365/onedrive/termstore/groups/group.py +1 -0
- office365/onedrive/termstore/sets/collection.py +1 -1
- office365/onenote/operations/operation.py +10 -1
- office365/onenote/resources/resource.py +1 -0
- office365/outlook/calendar/calendar.py +116 -6
- office365/outlook/calendar/dateTimeTimeZone.py +4 -0
- office365/outlook/calendar/email_address.py +7 -0
- office365/outlook/calendar/events/event.py +0 -4
- office365/outlook/calendar/events/reminder.py +22 -3
- office365/outlook/calendar/group.py +0 -2
- office365/outlook/calendar/location_constraint.py +16 -1
- office365/outlook/calendar/meetingtimes/activity_domain.py +10 -0
- office365/outlook/calendar/meetingtimes/suggestion.py +1 -1
- office365/outlook/calendar/meetingtimes/time_constraint.py +18 -0
- office365/outlook/calendar/permissions/__init__.py +0 -0
- office365/outlook/calendar/permissions/collection.py +24 -0
- office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
- office365/outlook/calendar/place.py +7 -0
- office365/outlook/calendar/role_type.py +17 -0
- office365/outlook/calendar/schedule/information.py +5 -4
- office365/outlook/calendar/schedule/item.py +20 -1
- office365/outlook/calendar/sharing_message.py +2 -2
- office365/outlook/calendar/time_zone_base.py +3 -0
- office365/outlook/calendar/working_hours.py +17 -1
- office365/outlook/contacts/collection.py +39 -0
- office365/outlook/contacts/contact.py +21 -11
- office365/outlook/geo_coordinates.py +20 -0
- office365/outlook/item.py +5 -4
- office365/outlook/locale_info.py +3 -0
- office365/outlook/mail/automatic_replies_setting.py +14 -0
- office365/outlook/mail/folders/folder.py +52 -3
- office365/outlook/mail/folders/search.py +11 -0
- office365/outlook/mail/importance.py +1 -0
- office365/outlook/mail/item_body.py +3 -0
- office365/outlook/mail/location.py +27 -2
- office365/outlook/mail/location_constraint_item.py +5 -0
- office365/outlook/mail/mailbox_settings.py +13 -1
- office365/outlook/mail/messages/collection.py +7 -0
- office365/outlook/mail/messages/followup_flag.py +21 -0
- office365/outlook/mail/messages/internet_header.py +16 -0
- office365/outlook/mail/messages/message.py +184 -6
- office365/outlook/mail/messages/rules/__init__.py +0 -0
- office365/outlook/mail/messages/rules/actions.py +38 -0
- office365/outlook/mail/messages/rules/predicates.py +5 -0
- office365/outlook/mail/messages/rules/rule.py +32 -0
- office365/outlook/mail/patterned_recurrence.py +14 -1
- office365/outlook/mail/physical_address.py +5 -1
- office365/outlook/mail/recipient.py +3 -0
- office365/outlook/mail/recurrence_pattern.py +18 -1
- office365/outlook/mail/recurrence_range.py +16 -2
- office365/outlook/timezone_information.py +3 -0
- office365/reports/root.py +28 -1
- office365/reports/security/__init__.py +0 -0
- office365/reports/security/root.py +21 -0
- office365/reports/userregistration/__init__.py +0 -0
- office365/reports/userregistration/method_count.py +17 -0
- office365/reports/userregistration/method_summary.py +21 -0
- office365/runtime/auth/authentication_context.py +123 -25
- office365/runtime/auth/client_credential.py +2 -2
- office365/runtime/auth/providers/acs_token_provider.py +6 -3
- office365/runtime/auth/providers/saml_token_provider.py +10 -7
- office365/runtime/auth/token_response.py +3 -3
- office365/runtime/client_object_collection.py +12 -7
- office365/runtime/client_result.py +9 -0
- office365/runtime/client_runtime_context.py +10 -8
- office365/runtime/http/request_options.py +2 -1
- office365/runtime/odata/request.py +4 -4
- office365/runtime/paths/appid.py +2 -1
- office365/runtime/paths/entity.py +2 -2
- office365/{sharepoint/internal/paths/entity.py → runtime/paths/key.py} +5 -3
- office365/runtime/paths/resource_path.py +3 -0
- office365/runtime/types/event_handler.py +6 -0
- office365/search/external/__init__.py +0 -0
- office365/search/external/configuration.py +8 -0
- office365/search/external/connection.py +27 -0
- office365/{external → search/external}/external.py +1 -1
- office365/search/external/search_settings.py +5 -0
- office365/search/query.py +3 -1
- office365/search/request.py +3 -1
- office365/search/sharepoint_onedrive_options.py +3 -0
- office365/search/sort_property.py +9 -0
- office365/sharepoint/activities/client_request.py +4 -1
- office365/sharepoint/activities/logger.py +25 -0
- office365/sharepoint/activities/revision_info.py +9 -0
- office365/sharepoint/addtoonedrive/mount_point.py +25 -0
- office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
- office365/sharepoint/alerts/alert.py +31 -0
- office365/sharepoint/apps/license_collection.py +1 -2
- office365/sharepoint/changes/item.py +14 -0
- office365/sharepoint/client_context.py +91 -30
- office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
- office365/sharepoint/clientsidecomponent/identifier.py +3 -0
- office365/sharepoint/compliance/tag_info.py +17 -0
- office365/sharepoint/contenttypes/collection.py +6 -7
- office365/sharepoint/contenttypes/content_type.py +49 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
- office365/sharepoint/features/known_list.py +2 -0
- office365/sharepoint/fields/collection.py +70 -39
- office365/sharepoint/fields/computed.py +5 -2
- office365/sharepoint/fields/creation_information.py +5 -4
- office365/sharepoint/fields/field.py +73 -15
- office365/sharepoint/fields/user.py +3 -3
- office365/sharepoint/files/checked_out_file.py +3 -2
- office365/sharepoint/files/file.py +9 -4
- office365/sharepoint/files/versions/version.py +7 -9
- office365/sharepoint/folders/collection.py +2 -2
- office365/sharepoint/folders/coloring.py +39 -0
- office365/sharepoint/folders/coloring_information.py +15 -0
- office365/sharepoint/folders/folder.py +21 -10
- office365/sharepoint/forms/customization.py +8 -0
- office365/sharepoint/listitems/listitem.py +29 -10
- office365/sharepoint/lists/bloom_filter.py +0 -1
- office365/sharepoint/lists/creation_information.py +18 -4
- office365/sharepoint/lists/list.py +203 -27
- office365/sharepoint/lists/render_data_parameters.py +21 -1
- office365/sharepoint/lists/template_type.py +10 -0
- office365/sharepoint/navigation/configured_metadata_items.py +25 -1
- office365/sharepoint/navigation/metadata_settings.py +6 -4
- office365/sharepoint/permissions/irm/file_settings.py +43 -0
- office365/sharepoint/permissions/securable_object.py +5 -6
- office365/sharepoint/portal/sites/manager.py +5 -6
- office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
- office365/sharepoint/publishing/base_custom_property.py +8 -0
- office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
- office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
- office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
- office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
- office365/sharepoint/publishing/pages/collection.py +1 -1
- office365/sharepoint/publishing/pages/page.py +4 -1
- office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
- office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
- office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
- office365/sharepoint/search/query/auto_completion_match.py +3 -0
- office365/sharepoint/search/query/property_value.py +18 -0
- office365/sharepoint/search/request.py +16 -2
- office365/sharepoint/sharing/abilities.py +22 -0
- office365/sharepoint/sharing/direct_abilities.py +27 -0
- office365/sharepoint/sharing/link_abilities.py +9 -1
- office365/sharepoint/sharing/links/data.py +26 -1
- office365/sharepoint/sharing/links/info.py +1 -1
- office365/sharepoint/sharing/links/partial_success_response.py +5 -0
- office365/sharepoint/sharing/links/share_settings.py +24 -1
- office365/sharepoint/sharing/object_sharing_information.py +65 -2
- office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
- office365/sharepoint/sharing/object_sharing_settings.py +17 -4
- office365/sharepoint/sharing/principal.py +10 -0
- office365/sharepoint/sharing/securable_object_extensions.py +1 -17
- office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
- office365/sharepoint/sharing/user_sharing_result.py +18 -8
- office365/sharepoint/sitehealth/result.py +10 -0
- office365/sharepoint/sites/language.py +11 -1
- office365/sharepoint/sites/language_collection.py +1 -0
- office365/sharepoint/sites/site.py +42 -7
- office365/sharepoint/taxonomy/create_xml_parameters.py +22 -15
- office365/sharepoint/taxonomy/field.py +10 -8
- office365/sharepoint/taxonomy/groups/collection.py +8 -1
- office365/sharepoint/taxonomy/groups/group.py +26 -0
- office365/sharepoint/taxonomy/sets/collection.py +15 -0
- office365/sharepoint/taxonomy/sets/name.py +23 -0
- office365/sharepoint/taxonomy/sets/set.py +16 -1
- office365/sharepoint/taxonomy/stores/store.py +0 -8
- office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
- office365/sharepoint/tenant/administration/deny_add_and_customize_pages_status.py +3 -0
- office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
- office365/sharepoint/tenant/administration/sites/properties.py +12 -10
- office365/sharepoint/tenant/administration/tenant.py +2 -1
- office365/sharepoint/tenant/apps/information.py +3 -1
- office365/sharepoint/tenant/management/office365_tenant.py +14 -11
- office365/sharepoint/types/resource_path.py +3 -1
- office365/sharepoint/userprofiles/people_manager.py +0 -2
- office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
- office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
- office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
- office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
- office365/sharepoint/viva/site_manager.py +14 -0
- office365/sharepoint/webhooks/subscription_collection.py +5 -6
- office365/sharepoint/webparts/definition.py +1 -1
- office365/sharepoint/webparts/webpart.py +18 -4
- office365/sharepoint/webs/context_web_information.py +2 -4
- office365/sharepoint/webs/web.py +31 -12
- office365/sharepoint/workflowservices/manager.py +0 -2
- office365/subscriptions/collection.py +42 -0
- office365/subscriptions/subscription.py +120 -2
- office365/teams/apps/catalog.py +23 -0
- office365/teams/associated_info.py +12 -0
- office365/teams/channels/channel.py +2 -3
- office365/teams/channels/collection.py +1 -1
- office365/teams/channels/iIdentity.py +5 -0
- office365/teams/chats/chat.py +12 -2
- office365/teams/chats/collection.py +1 -2
- office365/teams/chats/messages/__init__.py +0 -0
- office365/teams/chats/messages/info.py +14 -0
- office365/teams/chats/{message.py → messages/message.py} +18 -3
- office365/teams/info.py +20 -0
- office365/teams/members/aad_user_conversation.py +2 -2
- office365/teams/members/conversation_collection.py +3 -3
- office365/teams/schedule/change_request.py +4 -2
- office365/teams/schedule/change_tracked_entity.py +11 -2
- office365/teams/summary.py +15 -0
- office365/teams/tabs/configuration.py +12 -1
- office365/teams/tabs/tab.py +0 -1
- office365/teams/team.py +34 -1
- office365/teams/teamwork/__init__.py +0 -0
- office365/teams/teamwork/activity_topic.py +5 -0
- office365/teams/teamwork/tags/__init__.py +0 -0
- office365/teams/teamwork/tags/identity.py +6 -0
- office365/teams/teamwork/tags/member.py +5 -0
- office365/teams/teamwork/tags/tag.py +15 -0
- office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
- office365/todo/attachments/session.py +34 -0
- office365/todo/linked_resource.py +10 -1
- office365/todo/tasks/task.py +4 -0
- office365/directory/identities/protection_root.py +0 -5
- office365/directory/rbac/application.py +0 -18
- office365/directory/rbac/unified_role_assignment.py +0 -8
- office365/external/connection.py +0 -5
- office365/intune/devices/management.py +0 -35
- office365/onedrive/internal/queries/download_content.py +0 -26
- office365/onedrive/internal/queries/upload_content.py +0 -23
- office365/outlook/mail/messages/message_rule.py +0 -15
- office365/runtime/auth/providers/oauth_token_provider.py +0 -25
- office365/teams/team_info.py +0 -6
- {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.4.2.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
- /office365/{directory/rbac → booking}/__init__.py +0 -0
- /office365/directory/{roles → protection}/__init__.py +0 -0
- /office365/{external → directory/protection/riskyusers}/__init__.py +0 -0
- /office365/{teams/messages → directory/rolemanagement}/__init__.py +0 -0
- /office365/outlook/calendar/{time_slot.py → meetingtimes/time_slot.py} +0 -0
- /office365/teams/chats/{message_attachment.py → messages/attachment.py} +0 -0
- /office365/teams/{member_settings.py → members/settings.py} +0 -0
- /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
|
@@ -38,35 +38,53 @@ class FieldCollection(BaseEntityCollection):
|
|
|
38
38
|
description=description,
|
|
39
39
|
field_type_kind=FieldType.URL))
|
|
40
40
|
|
|
41
|
-
def add_lookup_field(self, title,
|
|
41
|
+
def add_lookup_field(self, title, lookup_list, lookup_field_name, allow_multiple_values=False):
|
|
42
42
|
"""
|
|
43
43
|
Creates a Lookup field
|
|
44
44
|
|
|
45
|
-
:param bool allow_multiple_values:
|
|
46
|
-
:param str lookup_field_name:
|
|
47
|
-
|
|
48
|
-
:param str
|
|
45
|
+
:param bool allow_multiple_values: Flag determines whether to create multi lookup field or not
|
|
46
|
+
:param str lookup_field_name: Specifies the name of the field in the other data source when creating
|
|
47
|
+
a lookup field
|
|
48
|
+
:param str or office365.sharepoint.lists.list.List lookup_list: Lookup List object or identifier
|
|
49
|
+
:param str title: Specifies the display name of the field.
|
|
49
50
|
"""
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
return_type = Field(self.context)
|
|
52
|
+
|
|
53
|
+
def _add_lookup_field(lookup_list_id):
|
|
54
|
+
"""
|
|
55
|
+
:type lookup_list_id: str
|
|
56
|
+
"""
|
|
57
|
+
if allow_multiple_values:
|
|
58
|
+
field_schema = '''
|
|
59
|
+
<Field Type="LookupMulti" Mult="TRUE" DisplayName="{title}" Required="FALSE" Hidden="TRUE" \
|
|
60
|
+
ShowField="{lookup_field_name}" List="{{{lookup_list_id}}}" StaticName="{title}" Name="{title}">
|
|
61
|
+
</Field>
|
|
62
|
+
'''.format(title=title, lookup_field_name=lookup_field_name, lookup_list_id=lookup_list_id)
|
|
63
|
+
self.create_field_as_xml(field_schema, return_type=return_type)
|
|
64
|
+
else:
|
|
65
|
+
self.add_field(FieldCreationInformation(title=title,
|
|
66
|
+
lookup_list_id=lookup_list_id,
|
|
67
|
+
lookup_field_name=lookup_field_name,
|
|
68
|
+
field_type_kind=FieldType.Lookup),
|
|
69
|
+
return_type=return_type)
|
|
70
|
+
|
|
71
|
+
from office365.sharepoint.lists.list import List
|
|
72
|
+
if isinstance(lookup_list, List):
|
|
73
|
+
|
|
74
|
+
def _lookup_list_loaded():
|
|
75
|
+
_add_lookup_field(lookup_list.id)
|
|
76
|
+
lookup_list.ensure_property("Id", _lookup_list_loaded)
|
|
57
77
|
else:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
lookup_field_name=lookup_field_name,
|
|
61
|
-
field_type_kind=FieldType.Lookup))
|
|
78
|
+
_add_lookup_field(lookup_list)
|
|
79
|
+
return return_type
|
|
62
80
|
|
|
63
81
|
def add_choice_field(self, title, values, multiple_values=False):
|
|
64
82
|
"""
|
|
65
|
-
|
|
83
|
+
Creates a Choice field
|
|
66
84
|
|
|
67
85
|
:param bool multiple_values:
|
|
68
86
|
:param list[str] values:
|
|
69
|
-
:param str title:
|
|
87
|
+
:param str title: Specifies the display name of the field.
|
|
70
88
|
"""
|
|
71
89
|
fld_type = FieldType.MultiChoice if multiple_values else FieldType.Choice
|
|
72
90
|
create_field_info = FieldCreationInformation(title, fld_type)
|
|
@@ -77,7 +95,7 @@ class FieldCollection(BaseEntityCollection):
|
|
|
77
95
|
"""
|
|
78
96
|
Creates a User field
|
|
79
97
|
|
|
80
|
-
:param str title:
|
|
98
|
+
:param str title: Specifies the display name of the field
|
|
81
99
|
"""
|
|
82
100
|
return self.add_field(FieldCreationInformation(title, FieldType.User))
|
|
83
101
|
|
|
@@ -90,23 +108,24 @@ class FieldCollection(BaseEntityCollection):
|
|
|
90
108
|
"""
|
|
91
109
|
return self.add_field(FieldCreationInformation(title, FieldType.Text))
|
|
92
110
|
|
|
93
|
-
def add_dependent_lookup_field(self, display_name,
|
|
94
|
-
"""Adds a secondary lookup field to a field (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
111
|
+
def add_dependent_lookup_field(self, display_name, primary_lookup_field_id, show_field):
|
|
112
|
+
"""Adds a secondary lookup field to a field collection (target).
|
|
113
|
+
Args:
|
|
114
|
+
display_name (str): title of the added field in the target FieldCollection.
|
|
115
|
+
primary_lookup_field_id (str): ID of the main lookup-field in the target to associate the dependent lookup field with.
|
|
116
|
+
show_field (str): name of the field from the source list to include data from.
|
|
117
|
+
Returns:
|
|
118
|
+
Field: reference to the SP.Field that was added.
|
|
101
119
|
"""
|
|
102
120
|
return_type = Field(self.context)
|
|
103
121
|
self.add_child(return_type)
|
|
104
122
|
parameters = {
|
|
105
123
|
"displayName": display_name,
|
|
106
|
-
"
|
|
107
|
-
"
|
|
124
|
+
"primaryLookupFieldId": primary_lookup_field_id,
|
|
125
|
+
"showField": show_field
|
|
108
126
|
}
|
|
109
|
-
qry = ServiceOperationQuery(self, "AddDependentLookupField", None, parameters,
|
|
127
|
+
qry = ServiceOperationQuery(self, "AddDependentLookupField", None, parameters,
|
|
128
|
+
None, return_type)
|
|
110
129
|
self.context.add_query(qry)
|
|
111
130
|
return return_type
|
|
112
131
|
|
|
@@ -121,41 +140,53 @@ class FieldCollection(BaseEntityCollection):
|
|
|
121
140
|
self.context.add_query(qry)
|
|
122
141
|
return return_type
|
|
123
142
|
|
|
124
|
-
def add_field(self, parameters):
|
|
143
|
+
def add_field(self, parameters, return_type=None):
|
|
125
144
|
"""Adds a fields to the fields collection.
|
|
126
145
|
|
|
127
146
|
:type parameters: office365.sharepoint.fields.creation_information.FieldCreationInformation
|
|
147
|
+
:param Field or None return_type: Return type
|
|
128
148
|
"""
|
|
129
|
-
return_type
|
|
149
|
+
if return_type is None:
|
|
150
|
+
return_type = Field(self.context)
|
|
130
151
|
self.add_child(return_type)
|
|
131
152
|
payload = {"parameters": parameters}
|
|
132
|
-
qry = ServiceOperationQuery(self, "AddField", None, payload, None,
|
|
153
|
+
qry = ServiceOperationQuery(self, "AddField", None, payload, None,
|
|
154
|
+
return_type)
|
|
133
155
|
self.context.add_query(qry)
|
|
134
156
|
return return_type
|
|
135
157
|
|
|
136
|
-
def create_taxonomy_field(self, name, term_set):
|
|
158
|
+
def create_taxonomy_field(self, name, term_set, allow_multiple_values=False):
|
|
137
159
|
"""
|
|
138
160
|
Creates a Taxonomy field
|
|
139
161
|
|
|
140
162
|
:param str name: Field name
|
|
141
163
|
:param str or TermSet term_set: TermSet identifier or object
|
|
164
|
+
:param bool allow_multiple_values: Specifies whether the column will allow more than one value
|
|
142
165
|
"""
|
|
143
|
-
|
|
144
|
-
return_type = TaxonomyField(self.context)
|
|
166
|
+
return_type = TaxonomyField(self.context)
|
|
145
167
|
|
|
168
|
+
if isinstance(term_set, TermSet):
|
|
146
169
|
def _term_set_loaded():
|
|
147
|
-
TaxonomyField.create(self, name, term_set.id,
|
|
170
|
+
TaxonomyField.create(self, name, term_set.id, None, allow_multiple_values,
|
|
171
|
+
return_type=return_type)
|
|
172
|
+
|
|
148
173
|
term_set.ensure_property("id", _term_set_loaded)
|
|
149
174
|
return return_type
|
|
150
175
|
else:
|
|
151
|
-
|
|
176
|
+
|
|
177
|
+
def _term_store_loaded(term_store):
|
|
178
|
+
TaxonomyField.create(self, name, term_set, term_store.id, allow_multiple_values,
|
|
179
|
+
return_type=return_type)
|
|
180
|
+
|
|
181
|
+
self.context.load(self.context.taxonomy.term_store, after_loaded=_term_store_loaded)
|
|
182
|
+
return return_type
|
|
152
183
|
|
|
153
184
|
def create_field_as_xml(self, schema_xml, return_type=None):
|
|
154
185
|
"""
|
|
155
186
|
Creates a field based on the values defined in the parameters input parameter.
|
|
156
187
|
|
|
157
188
|
:param str schema_xml: Specifies the schema that defines the field
|
|
158
|
-
:
|
|
189
|
+
:param Field or None return_type: Return type
|
|
159
190
|
"""
|
|
160
191
|
if return_type is None:
|
|
161
192
|
return_type = Field(self.context)
|
|
@@ -2,8 +2,11 @@ from office365.sharepoint.fields.field import Field
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class FieldComputed(Field):
|
|
5
|
-
"""
|
|
6
|
-
|
|
5
|
+
"""
|
|
6
|
+
Specifies a computed field.
|
|
7
|
+
|
|
8
|
+
A field that can perform data manipulation and display functions by using the contents of other fields.
|
|
9
|
+
"""
|
|
7
10
|
|
|
8
11
|
@property
|
|
9
12
|
def enable_lookup(self):
|
|
@@ -15,10 +15,11 @@ class FieldCreationInformation(ClientValue):
|
|
|
15
15
|
:param str lookup_web_id: Specifies the identifier of the site (2) that contains the list that is the
|
|
16
16
|
source for the field (2) value.
|
|
17
17
|
:param bool required: Specifies whether the field (2) requires a value.
|
|
18
|
-
:param str lookup_field_name:
|
|
19
|
-
|
|
20
|
-
:param str
|
|
21
|
-
:param
|
|
18
|
+
:param str lookup_field_name: Specifies the name of the field in the other data source when creating
|
|
19
|
+
a lookup field.
|
|
20
|
+
:param str lookup_list_id: A CSOM GUID that specifies the target list for the lookup field.
|
|
21
|
+
:param str title: Specifies the display name of the field.
|
|
22
|
+
:param int field_type_kind: Specifies the type of the field.
|
|
22
23
|
:type description: str or None
|
|
23
24
|
:param str formula:
|
|
24
25
|
:param list[str] or None choices:
|
|
@@ -69,7 +69,8 @@ class Field(BaseEntity):
|
|
|
69
69
|
|
|
70
70
|
def enable_index(self):
|
|
71
71
|
"""
|
|
72
|
-
|
|
72
|
+
Enables the index for a field
|
|
73
|
+
An index speeds up queries on the indexed fields as well as sorting and grouping operations
|
|
73
74
|
"""
|
|
74
75
|
return_type = ClientResult(self.context)
|
|
75
76
|
qry = ServiceOperationQuery(self, "enableIndex", None, None, None, return_type)
|
|
@@ -78,7 +79,7 @@ class Field(BaseEntity):
|
|
|
78
79
|
|
|
79
80
|
def disable_index(self):
|
|
80
81
|
"""
|
|
81
|
-
|
|
82
|
+
Disables the index for a field
|
|
82
83
|
"""
|
|
83
84
|
return_type = ClientResult(self.context)
|
|
84
85
|
qry = ServiceOperationQuery(self, "disableIndex", None, None, None, return_type)
|
|
@@ -120,6 +121,14 @@ class Field(BaseEntity):
|
|
|
120
121
|
"""
|
|
121
122
|
return self.properties.get('Id', None)
|
|
122
123
|
|
|
124
|
+
@property
|
|
125
|
+
def auto_indexed(self):
|
|
126
|
+
"""
|
|
127
|
+
Gets a Boolean value that specifies whether the field is auto-indexed.
|
|
128
|
+
:rtype: str or None
|
|
129
|
+
"""
|
|
130
|
+
return self.properties.get('AutoIndexed', None)
|
|
131
|
+
|
|
123
132
|
@property
|
|
124
133
|
def default_formula(self):
|
|
125
134
|
"""
|
|
@@ -166,16 +175,16 @@ class Field(BaseEntity):
|
|
|
166
175
|
|
|
167
176
|
@title.setter
|
|
168
177
|
def title(self, val):
|
|
169
|
-
"""
|
|
170
|
-
|
|
178
|
+
"""
|
|
179
|
+
Sets a value that specifies the display name of the field.
|
|
171
180
|
:rtype: str or None
|
|
172
181
|
"""
|
|
173
182
|
self.set_property("Title", val)
|
|
174
183
|
|
|
175
184
|
@property
|
|
176
185
|
def group(self):
|
|
177
|
-
"""
|
|
178
|
-
|
|
186
|
+
"""
|
|
187
|
+
Gets a value that specifies the field group.
|
|
179
188
|
:rtype: str or None
|
|
180
189
|
"""
|
|
181
190
|
return self.properties.get('Group', None)
|
|
@@ -183,23 +192,22 @@ class Field(BaseEntity):
|
|
|
183
192
|
@group.setter
|
|
184
193
|
def group(self, val):
|
|
185
194
|
"""Sets a value that specifies the field group.
|
|
186
|
-
|
|
187
195
|
:rtype: str or None
|
|
188
196
|
"""
|
|
189
197
|
self.set_property("Group", val)
|
|
190
198
|
|
|
191
199
|
@property
|
|
192
200
|
def internal_name(self):
|
|
193
|
-
"""
|
|
194
|
-
|
|
201
|
+
"""
|
|
202
|
+
Gets a value that specifies the field internal name.
|
|
195
203
|
:rtype: str or None
|
|
196
204
|
"""
|
|
197
205
|
return self.properties.get('InternalName', None)
|
|
198
206
|
|
|
199
207
|
@property
|
|
200
208
|
def can_be_deleted(self):
|
|
201
|
-
"""
|
|
202
|
-
|
|
209
|
+
"""
|
|
210
|
+
Gets a value that specifies whether the field can be deleted
|
|
203
211
|
:rtype: bool or None
|
|
204
212
|
"""
|
|
205
213
|
return self.properties.get('CanBeDeleted', None)
|
|
@@ -218,12 +226,42 @@ class Field(BaseEntity):
|
|
|
218
226
|
"""
|
|
219
227
|
return self.properties.get('ClientSideComponentProperties', None)
|
|
220
228
|
|
|
229
|
+
@property
|
|
230
|
+
def client_validation_formula(self):
|
|
231
|
+
"""
|
|
232
|
+
:rtype: str or None
|
|
233
|
+
"""
|
|
234
|
+
return self.properties.get('ClientValidationFormula', None)
|
|
235
|
+
|
|
236
|
+
@property
|
|
237
|
+
def enforce_unique_values(self):
|
|
238
|
+
"""
|
|
239
|
+
Specifies whether the field enforces unique values.
|
|
240
|
+
:rtype: bool or None
|
|
241
|
+
"""
|
|
242
|
+
return self.properties.get('enforceUniqueValues', None)
|
|
243
|
+
|
|
244
|
+
@property
|
|
245
|
+
def filterable(self):
|
|
246
|
+
"""
|
|
247
|
+
Specifies whether list items in the list can be filtered by the field value.
|
|
248
|
+
:rtype: bool or None
|
|
249
|
+
"""
|
|
250
|
+
return self.properties.get('Filterable', None)
|
|
251
|
+
|
|
252
|
+
@property
|
|
253
|
+
def from_base_type(self):
|
|
254
|
+
"""
|
|
255
|
+
Gets a Boolean value that indicates whether the field derives from a base field type.
|
|
256
|
+
:rtype: bool or None
|
|
257
|
+
"""
|
|
258
|
+
return self.properties.get('FromBaseType', None)
|
|
259
|
+
|
|
221
260
|
@property
|
|
222
261
|
def js_link(self):
|
|
223
262
|
"""
|
|
224
263
|
When implemented in a derived class, gets or sets the name of an external JavaScript file that contains
|
|
225
264
|
any client rendering logic for fields of the derived type.
|
|
226
|
-
|
|
227
265
|
:rtype: str or None
|
|
228
266
|
"""
|
|
229
267
|
return self.properties.get('JSLink', None)
|
|
@@ -232,7 +270,6 @@ class Field(BaseEntity):
|
|
|
232
270
|
def hidden(self):
|
|
233
271
|
"""
|
|
234
272
|
Gets a value that specifies whether the field is hidden in list views and list forms.
|
|
235
|
-
|
|
236
273
|
:rtype: bool or None
|
|
237
274
|
"""
|
|
238
275
|
return self.properties.get('Hidden', None)
|
|
@@ -244,11 +281,26 @@ class Field(BaseEntity):
|
|
|
244
281
|
"""
|
|
245
282
|
self.set_property("Hidden", val)
|
|
246
283
|
|
|
284
|
+
@property
|
|
285
|
+
def no_crawl(self):
|
|
286
|
+
"""
|
|
287
|
+
Gets value that specifies whether the field can be crawled by a search engine.
|
|
288
|
+
:rtype: bool or None
|
|
289
|
+
"""
|
|
290
|
+
return self.properties.get('NoCrawl', None)
|
|
291
|
+
|
|
292
|
+
@property
|
|
293
|
+
def read_only_field(self):
|
|
294
|
+
"""
|
|
295
|
+
Specifies whether the value of the field is read-only.
|
|
296
|
+
:rtype: bool or None
|
|
297
|
+
"""
|
|
298
|
+
return self.properties.get('ReadOnlyField', None)
|
|
299
|
+
|
|
247
300
|
@property
|
|
248
301
|
def default_value(self):
|
|
249
302
|
"""
|
|
250
303
|
Gets a value that specifies the default value for the field.
|
|
251
|
-
|
|
252
304
|
:rtype: str or None
|
|
253
305
|
"""
|
|
254
306
|
return self.properties.get('DefaultValue', None)
|
|
@@ -260,11 +312,17 @@ class Field(BaseEntity):
|
|
|
260
312
|
"""
|
|
261
313
|
self.set_property("DefaultValue", val)
|
|
262
314
|
|
|
315
|
+
@property
|
|
316
|
+
def indexed(self):
|
|
317
|
+
"""
|
|
318
|
+
:rtype: str or None
|
|
319
|
+
"""
|
|
320
|
+
return self.properties.get('Indexed', None)
|
|
321
|
+
|
|
263
322
|
@property
|
|
264
323
|
def type_display_name(self):
|
|
265
324
|
"""
|
|
266
325
|
Gets a value that specifies the display name for the type of the field.
|
|
267
|
-
|
|
268
326
|
:rtype: str or None
|
|
269
327
|
"""
|
|
270
328
|
return self.properties.get('TypeDisplayName', None)
|
|
@@ -34,9 +34,9 @@ class FieldUser(FieldLookup):
|
|
|
34
34
|
|
|
35
35
|
@property
|
|
36
36
|
def selection_group(self):
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
"""
|
|
38
|
+
Gets a value that specifies the identifier of the SharePoint group whose members can be selected
|
|
39
|
+
as values of the field.
|
|
40
40
|
:rtype: int or None
|
|
41
41
|
"""
|
|
42
42
|
return self.properties.get('SelectionGroup', None)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
|
+
from office365.runtime.paths.key import KeyPath
|
|
2
3
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
4
|
from office365.sharepoint.base_entity import BaseEntity
|
|
4
|
-
from office365.sharepoint.internal.paths.entity import EntityPath
|
|
5
5
|
from office365.sharepoint.principal.users.user import User
|
|
6
6
|
|
|
7
7
|
|
|
@@ -44,4 +44,5 @@ class CheckedOutFile(BaseEntity):
|
|
|
44
44
|
super(CheckedOutFile, self).set_property(name, value, persist_changes)
|
|
45
45
|
# fallback: create a new resource path
|
|
46
46
|
if name == "CheckedOutById":
|
|
47
|
-
self._resource_path =
|
|
47
|
+
self._resource_path = KeyPath(value, self.parent_collection.resource_path)
|
|
48
|
+
return self
|
|
@@ -13,6 +13,7 @@ from office365.sharepoint.files.versions.event import FileVersionEvent
|
|
|
13
13
|
from office365.sharepoint.base_entity import BaseEntity
|
|
14
14
|
from office365.sharepoint.folders.folder import Folder
|
|
15
15
|
from office365.sharepoint.permissions.irm.effective_settings import EffectiveInformationRightsManagementSettings
|
|
16
|
+
from office365.sharepoint.permissions.irm.file_settings import InformationRightsManagementFileSettings
|
|
16
17
|
from office365.sharepoint.permissions.irm.settings import InformationRightsManagementSettings
|
|
17
18
|
from office365.sharepoint.principal.users.user import User
|
|
18
19
|
from office365.sharepoint.files.versions.collection import FileVersionCollection
|
|
@@ -131,18 +132,22 @@ class File(AbstractFile):
|
|
|
131
132
|
self.context.add_query(qry)
|
|
132
133
|
return return_type
|
|
133
134
|
|
|
134
|
-
def share_link(self, link_kind, expiration=None):
|
|
135
|
+
def share_link(self, link_kind, expiration=None, role=None, password=None):
|
|
135
136
|
"""Creates a tokenized sharing link for a file based on the specified parameters and optionally
|
|
136
137
|
sends an email to the people that are listed in the specified parameters.
|
|
137
138
|
|
|
138
139
|
:param int link_kind: The kind of the tokenized sharing link to be created/updated or retrieved.
|
|
139
|
-
:param datetime or None expiration: A date/time string for which the format conforms to the ISO 8601:2004(E)
|
|
140
|
+
:param datetime.datetime or None expiration: A date/time string for which the format conforms to the ISO 8601:2004(E)
|
|
140
141
|
complete representation for calendar date and time of day and which represents the time and date of expiry
|
|
141
142
|
for the tokenized sharing link. Both the minutes and hour value MUST be specified for the difference
|
|
142
143
|
between the local and UTC time. Midnight is represented as 00:00:00. A null value indicates no expiry.
|
|
143
144
|
This value is only applicable to tokenized sharing links that are anonymous access links.
|
|
145
|
+
:param int role: The role to be used for the tokenized sharing link. This is required for Flexible links
|
|
146
|
+
and ignored for all other kinds.
|
|
147
|
+
:param str password: Optional password value to apply to the tokenized sharing link,
|
|
148
|
+
if it can support password protection.
|
|
144
149
|
"""
|
|
145
|
-
return self.listItemAllFields.share_link(link_kind, expiration)
|
|
150
|
+
return self.listItemAllFields.share_link(link_kind, expiration, role, password)
|
|
146
151
|
|
|
147
152
|
def unshare_link(self, link_kind, share_id=None):
|
|
148
153
|
"""
|
|
@@ -676,7 +681,7 @@ class File(AbstractFile):
|
|
|
676
681
|
Returns the Information Rights Management (IRM) settings for the file.
|
|
677
682
|
"""
|
|
678
683
|
return self.properties.get('InformationRightsManagementSettings',
|
|
679
|
-
|
|
684
|
+
InformationRightsManagementFileSettings(self.context,
|
|
680
685
|
ResourcePath(
|
|
681
686
|
"InformationRightsManagementSettings",
|
|
682
687
|
self.resource_path)))
|
|
@@ -3,7 +3,7 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
3
3
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
4
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
5
5
|
from office365.sharepoint.base_entity import BaseEntity
|
|
6
|
-
from office365.
|
|
6
|
+
from office365.runtime.paths.key import KeyPath
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class FileVersion(BaseEntity):
|
|
@@ -15,15 +15,13 @@ class FileVersion(BaseEntity):
|
|
|
15
15
|
:type file_object: typing.IO
|
|
16
16
|
"""
|
|
17
17
|
def _file_version_loaded():
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def _process_response(response):
|
|
18
|
+
def _save_file(return_type):
|
|
21
19
|
"""
|
|
22
|
-
:type
|
|
20
|
+
:type return_type:ClientResult
|
|
23
21
|
"""
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
file_object.write(return_type.value)
|
|
23
|
+
self.open_binary_stream().after_execute(_save_file)
|
|
24
|
+
|
|
27
25
|
self.ensure_property("ID", _file_version_loaded)
|
|
28
26
|
return self
|
|
29
27
|
|
|
@@ -87,5 +85,5 @@ class FileVersion(BaseEntity):
|
|
|
87
85
|
super(FileVersion, self).set_property(key, value, persist_changes)
|
|
88
86
|
if self._resource_path is None:
|
|
89
87
|
if key == "ID":
|
|
90
|
-
self._resource_path =
|
|
88
|
+
self._resource_path = KeyPath(value, self.parent_collection.resource_path)
|
|
91
89
|
return self
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
from office365.runtime.paths.key import KeyPath
|
|
1
2
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
2
3
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
3
4
|
from office365.sharepoint.base_entity_collection import BaseEntityCollection
|
|
4
5
|
from office365.sharepoint.folders.folder import Folder
|
|
5
|
-
from office365.sharepoint.internal.paths.entity import EntityPath
|
|
6
6
|
from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
|
|
7
7
|
|
|
8
8
|
|
|
@@ -48,7 +48,7 @@ class FolderCollection(BaseEntityCollection):
|
|
|
48
48
|
|
|
49
49
|
:param str name: Specifies the Name of the folder.
|
|
50
50
|
"""
|
|
51
|
-
return_type = Folder(self.context,
|
|
51
|
+
return_type = Folder(self.context, KeyPath(name, self.resource_path))
|
|
52
52
|
self.add_child(return_type)
|
|
53
53
|
qry = ServiceOperationQuery(self, "Add", [name], None, None, return_type)
|
|
54
54
|
self.context.add_query(qry)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
|
+
from office365.sharepoint.base_entity import BaseEntity
|
|
3
|
+
from office365.sharepoint.folders.folder import Folder
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FolderColoring(BaseEntity):
|
|
7
|
+
""""""
|
|
8
|
+
|
|
9
|
+
def create_folder(self, decoded_url, ensure_unique_file_name=True, overwrite=True, coloring_information=None):
|
|
10
|
+
"""
|
|
11
|
+
:param str decoded_url:
|
|
12
|
+
:param bool ensure_unique_file_name:
|
|
13
|
+
:param bool overwrite:
|
|
14
|
+
:param FolderColoringInformation coloring_information:
|
|
15
|
+
"""
|
|
16
|
+
return_type = Folder(self.context)
|
|
17
|
+
|
|
18
|
+
payload = {
|
|
19
|
+
"DecodedUrl": decoded_url,
|
|
20
|
+
"EnsureUniqueFileName": ensure_unique_file_name,
|
|
21
|
+
"Overwrite": overwrite,
|
|
22
|
+
"coloringInformation": coloring_information
|
|
23
|
+
}
|
|
24
|
+
qry = ServiceOperationQuery(self, "CreateFolder", parameters_type=payload, return_type=return_type)
|
|
25
|
+
self.context.add_query(qry)
|
|
26
|
+
return return_type
|
|
27
|
+
|
|
28
|
+
def stamp_color(self, decoded_url, coloring_information):
|
|
29
|
+
"""
|
|
30
|
+
:param str decoded_url:
|
|
31
|
+
:param FolderColoringInformation coloring_information:
|
|
32
|
+
"""
|
|
33
|
+
payload = {
|
|
34
|
+
"DecodedUrl": decoded_url,
|
|
35
|
+
"coloringInformation": coloring_information
|
|
36
|
+
}
|
|
37
|
+
qry = ServiceOperationQuery(self, "StampColor", parameters_type=payload)
|
|
38
|
+
self.context.add_query(qry)
|
|
39
|
+
return self
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class FolderColoringInformation(ClientValue):
|
|
5
|
+
""""""
|
|
6
|
+
|
|
7
|
+
def __init__(self, color_hex=None, color_tag=None, emoji=None):
|
|
8
|
+
"""
|
|
9
|
+
:param str color_hex:
|
|
10
|
+
:param str color_tag:
|
|
11
|
+
:param str emoji:
|
|
12
|
+
"""
|
|
13
|
+
self.ColorHex = color_hex
|
|
14
|
+
self.ColorTag = color_tag
|
|
15
|
+
self.Emoji = emoji
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
1
3
|
from office365.runtime.client_result import ClientResult
|
|
2
4
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
3
5
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
@@ -132,18 +134,25 @@ class Folder(BaseEntity):
|
|
|
132
134
|
self.ensure_property("ServerRelativePath", _move_folder)
|
|
133
135
|
return return_type
|
|
134
136
|
|
|
135
|
-
def share_link(self, link_kind, expiration=None):
|
|
137
|
+
def share_link(self, link_kind, expiration=None, role=None, password=None):
|
|
136
138
|
"""Creates a tokenized sharing link for a folder based on the specified parameters and optionally
|
|
137
139
|
sends an email to the people that are listed in the specified parameters.
|
|
138
140
|
|
|
139
141
|
:param int link_kind: The kind of the tokenized sharing link to be created/updated or retrieved.
|
|
140
|
-
:param datetime or None expiration: A date/time string for which the format conforms to the ISO 8601:2004(E)
|
|
142
|
+
:param datetime.datetime or None expiration: A date/time string for which the format conforms to the ISO 8601:2004(E)
|
|
141
143
|
complete representation for calendar date and time of day and which represents the time and date of expiry
|
|
142
144
|
for the tokenized sharing link. Both the minutes and hour value MUST be specified for the difference
|
|
143
145
|
between the local and UTC time. Midnight is represented as 00:00:00. A null value indicates no expiry.
|
|
144
146
|
This value is only applicable to tokenized sharing links that are anonymous access links.
|
|
147
|
+
:param int role: The role to be used for the tokenized sharing link. This is required for Flexible links
|
|
148
|
+
and ignored for all other kinds.
|
|
149
|
+
:param str password: Optional password value to apply to the tokenized sharing link,
|
|
150
|
+
if it can support password protection.
|
|
145
151
|
"""
|
|
146
|
-
return self.list_item_all_fields.share_link(link_kind,
|
|
152
|
+
return self.list_item_all_fields.share_link(link_kind=link_kind,
|
|
153
|
+
expiration=expiration,
|
|
154
|
+
role=role,
|
|
155
|
+
password=password)
|
|
147
156
|
|
|
148
157
|
def unshare_link(self, link_kind, share_id=None):
|
|
149
158
|
"""
|
|
@@ -446,23 +455,24 @@ class Folder(BaseEntity):
|
|
|
446
455
|
|
|
447
456
|
@property
|
|
448
457
|
def time_created(self):
|
|
449
|
-
"""
|
|
450
|
-
|
|
458
|
+
"""
|
|
459
|
+
Gets when the folder was created in UTC.
|
|
451
460
|
:rtype: datetime or None
|
|
452
461
|
"""
|
|
453
|
-
return self.properties.get("TimeCreated",
|
|
462
|
+
return self.properties.get("TimeCreated", datetime.min)
|
|
454
463
|
|
|
455
464
|
@property
|
|
456
465
|
def serverRelativeUrl(self):
|
|
457
|
-
"""
|
|
458
|
-
|
|
466
|
+
"""
|
|
467
|
+
Gets the server-relative URL of the list folder.
|
|
459
468
|
:rtype: str or None
|
|
460
469
|
"""
|
|
461
470
|
return self.properties.get("ServerRelativeUrl", None)
|
|
462
471
|
|
|
463
472
|
@property
|
|
464
473
|
def server_relative_path(self):
|
|
465
|
-
"""
|
|
474
|
+
"""
|
|
475
|
+
Gets the server-relative Path of the list folder.
|
|
466
476
|
:rtype: SPResPath or None
|
|
467
477
|
"""
|
|
468
478
|
return self.properties.get("ServerRelativePath", SPResPath())
|
|
@@ -479,7 +489,8 @@ class Folder(BaseEntity):
|
|
|
479
489
|
"ListItemAllFields": self.list_item_all_fields,
|
|
480
490
|
"ParentFolder": self.parent_folder,
|
|
481
491
|
"ServerRelativePath": self.server_relative_path,
|
|
482
|
-
"StorageMetrics": self.storage_metrics
|
|
492
|
+
"StorageMetrics": self.storage_metrics,
|
|
493
|
+
"TimeCreated": self.time_created
|
|
483
494
|
}
|
|
484
495
|
default_value = property_mapping.get(name, None)
|
|
485
496
|
return super(Folder, self).get_property(name, default_value)
|