Office365-REST-Python-Client 2.5.5__py3-none-any.whl → 2.5.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +6 -6
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +269 -222
- office365/booking/virtualevents/__init__.py +0 -0
- office365/booking/virtualevents/root.py +5 -0
- office365/communications/calls/participant.py +4 -5
- office365/directory/administrative_unit.py +9 -2
- office365/directory/applications/application.py +3 -3
- office365/directory/applications/roles/assignment_collection.py +1 -1
- office365/directory/applications/roles/collection.py +6 -2
- office365/directory/applications/roles/role.py +1 -1
- office365/directory/audit/provisioning/object_summary.py +30 -1
- office365/directory/authentication/method_configuration.py +9 -0
- office365/directory/authentication/method_mode_detail.py +8 -0
- office365/directory/authentication/method_target.py +5 -0
- office365/directory/authentication/methods/fido.py +8 -0
- office365/directory/authentication/methods/password.py +23 -0
- office365/directory/authentication/strength_root.py +5 -0
- office365/directory/certificates/auth_configuration.py +1 -3
- office365/directory/custom_security_attribute_definition.py +7 -0
- office365/directory/device_local_credential_info.py +6 -0
- office365/directory/directory.py +40 -12
- office365/directory/groups/group.py +2 -6
- office365/directory/identities/conditional_access_root.py +10 -1
- office365/directory/identities/container.py +3 -9
- office365/directory/identities/providers/builtin_identity.py +3 -2
- office365/directory/identities/providers/saml_or_wsfed.py +4 -5
- office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
- office365/directory/identitygovernance/governance.py +14 -3
- office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/root.py +5 -0
- office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
- office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
- office365/directory/insights/resource_reference.py +1 -1
- office365/directory/key_credential.py +3 -0
- office365/directory/licenses/assignment_state.py +26 -2
- office365/directory/licenses/details.py +4 -3
- office365/directory/licenses/subscribed_sku.py +8 -10
- office365/directory/object_collection.py +40 -25
- office365/directory/password_credential.py +3 -0
- office365/directory/permissions/default_user_role.py +5 -0
- office365/directory/permissions/grants/condition_set.py +4 -2
- office365/directory/permissions/grants/oauth2.py +7 -10
- office365/directory/policies/authorization.py +50 -3
- office365/directory/policies/device_registration.py +6 -0
- office365/directory/policies/permission_grant.py +2 -0
- office365/directory/policies/root.py +13 -0
- office365/directory/profile_photo.py +6 -6
- office365/directory/protection/riskyusers/risky_user.py +4 -4
- office365/directory/rolemanagement/resource_action.py +10 -0
- office365/directory/rolemanagement/role_permission.py +10 -0
- office365/directory/security/alerts/alert.py +5 -7
- office365/directory/security/attacksimulations/landing_page.py +5 -0
- office365/directory/security/attacksimulations/operation.py +5 -0
- office365/directory/security/attacksimulations/report.py +8 -1
- office365/directory/security/attacksimulations/root.py +33 -0
- office365/directory/security/attacksimulations/users/__init__.py +0 -0
- office365/directory/security/attacksimulations/users/details.py +5 -0
- office365/directory/security/hunting_query_results.py +5 -0
- office365/directory/security/incidents/incident.py +8 -13
- office365/directory/security/security.py +20 -3
- office365/directory/security/threatintelligence/article_indicator.py +7 -0
- office365/directory/serviceprincipals/service_principal.py +6 -12
- office365/directory/synchronization/schema.py +16 -0
- office365/directory/synchronization/synchronization.py +2 -0
- office365/directory/users/activities/history_item.py +3 -2
- office365/directory/users/user.py +60 -10
- office365/entity_collection.py +3 -2
- office365/graph_client.py +58 -30
- office365/intune/audit/event.py +1 -3
- office365/intune/audit/event_collection.py +1 -1
- office365/intune/devices/alternative_security_id.py +4 -0
- office365/intune/devices/collection.py +57 -0
- office365/intune/devices/device.py +38 -10
- office365/intune/devices/management/management.py +12 -0
- office365/intune/organizations/organization.py +1 -0
- office365/onedrive/analytics/item_activity_stat.py +9 -0
- office365/onedrive/analytics/item_analytics.py +1 -0
- office365/onedrive/contenttypes/content_type.py +4 -12
- office365/onedrive/driveitems/driveItem.py +76 -7
- office365/onedrive/files/hashes.py +5 -0
- office365/onedrive/lists/collection.py +2 -2
- office365/onedrive/lists/list.py +1 -1
- office365/onedrive/operations/long_running.py +6 -6
- office365/onedrive/operations/rich_long_running.py +4 -3
- office365/onedrive/permissions/collection.py +1 -14
- office365/onedrive/sharepoint_settings.py +6 -6
- office365/onedrive/sitepages/__init__.py +0 -0
- office365/onedrive/sitepages/base.py +29 -0
- office365/onedrive/sitepages/canvas_layout.py +43 -0
- office365/onedrive/sitepages/collection.py +32 -0
- office365/onedrive/sitepages/horizontal_section.py +23 -0
- office365/onedrive/sitepages/horizontal_section_column.py +27 -0
- office365/onedrive/sitepages/site_page.py +116 -0
- office365/onedrive/sitepages/title_area.py +13 -0
- office365/onedrive/sitepages/vertical_section.py +27 -0
- office365/onedrive/sitepages/web_part.py +5 -0
- office365/onedrive/sites/site.py +10 -0
- office365/onedrive/sites/sites_with_root.py +1 -3
- office365/onedrive/termstore/store.py +2 -4
- office365/onedrive/termstore/terms/collection.py +1 -2
- office365/onedrive/workbooks/charts/data_labels.py +13 -1
- office365/onedrive/workbooks/filter.py +9 -0
- office365/onedrive/workbooks/filter_criteria.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +6 -3
- office365/onedrive/workbooks/functions/result.py +2 -0
- office365/onedrive/workbooks/operations/workbook.py +7 -10
- office365/onedrive/workbooks/tables/pivot_table.py +9 -9
- office365/onedrive/workbooks/tables/sort.py +5 -0
- office365/onedrive/workbooks/tables/table.py +57 -0
- office365/onedrive/workbooks/worksheets/collection.py +0 -6
- office365/onedrive/workbooks/worksheets/protection.py +22 -1
- office365/onedrive/workbooks/worksheets/protection_options.py +7 -0
- office365/outlook/calendar/calendar.py +1 -3
- office365/outlook/calendar/events/event.py +45 -0
- office365/outlook/calendar/permissions/permission.py +7 -7
- office365/outlook/calendar/place.py +5 -3
- office365/outlook/calendar/response_status.py +11 -0
- office365/outlook/calendar/rooms/room.py +14 -0
- office365/outlook/mail/attachments/collection.py +6 -1
- office365/outlook/mail/automatic_replies_mailtips.py +5 -0
- office365/outlook/mail/conversation.py +1 -3
- office365/outlook/mail/folders/folder.py +1 -3
- office365/outlook/mail/messages/message.py +1 -1
- office365/outlook/mail/tips.py +17 -0
- office365/planner/plans/plan.py +11 -1
- office365/reports/root.py +83 -4
- office365/runtime/auth/authentication_context.py +12 -2
- office365/runtime/auth/providers/acs_token_provider.py +10 -7
- office365/runtime/auth/sts_profile.py +0 -1
- office365/runtime/client_object.py +18 -14
- office365/runtime/client_object_collection.py +8 -23
- office365/runtime/client_request_exception.py +1 -3
- office365/runtime/client_result.py +11 -14
- office365/runtime/client_runtime_context.py +11 -21
- office365/runtime/odata/json_format.py +7 -9
- office365/runtime/odata/request.py +12 -2
- office365/runtime/odata/v3/batch_request.py +7 -15
- office365/runtime/odata/v4/batch_request.py +13 -21
- office365/runtime/queries/upload_session.py +5 -0
- office365/runtime/types/event_handler.py +1 -1
- office365/search/entity.py +3 -2
- office365/sharepoint/activities/facets/delete.py +1 -1
- office365/sharepoint/activities/tracked_item_service.py +2 -3
- office365/sharepoint/administration/web_application.py +8 -7
- office365/sharepoint/alerts/collection.py +2 -1
- office365/sharepoint/attachments/attachment.py +3 -9
- office365/sharepoint/audit/audit.py +3 -2
- office365/sharepoint/changes/alert.py +4 -3
- office365/sharepoint/changes/collection.py +7 -10
- office365/sharepoint/changes/content_type.py +4 -4
- office365/sharepoint/changes/field.py +4 -5
- office365/sharepoint/changes/item.py +34 -7
- office365/sharepoint/changes/list.py +4 -4
- office365/sharepoint/changes/user.py +5 -6
- office365/sharepoint/client_context.py +4 -2
- office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
- office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
- office365/sharepoint/contenttypes/content_type.py +13 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -7
- office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
- office365/sharepoint/directory/helper.py +2 -0
- office365/sharepoint/entity.py +12 -5
- office365/sharepoint/entity_collection.py +1 -3
- office365/sharepoint/eventreceivers/definition.py +8 -12
- office365/sharepoint/features/collection.py +1 -2
- office365/sharepoint/features/definitions/definition.py +6 -3
- office365/sharepoint/fields/calculated.py +8 -14
- office365/sharepoint/fields/collection.py +46 -13
- office365/sharepoint/fields/computed.py +4 -5
- office365/sharepoint/fields/currency.py +7 -11
- office365/sharepoint/fields/date_time.py +4 -8
- office365/sharepoint/fields/field.py +6 -16
- office365/sharepoint/fields/lookup.py +11 -9
- office365/sharepoint/fields/multi_choice.py +8 -12
- office365/sharepoint/fields/multi_line_text.py +10 -14
- office365/sharepoint/fields/number.py +13 -26
- office365/sharepoint/fields/rating_scale.py +6 -10
- office365/sharepoint/fields/related_field.py +10 -17
- office365/sharepoint/fields/url.py +4 -5
- office365/sharepoint/fields/user.py +10 -9
- office365/sharepoint/files/collection.py +17 -15
- office365/sharepoint/files/file.py +30 -23
- office365/sharepoint/folders/collection.py +22 -5
- office365/sharepoint/folders/coloring.py +11 -9
- office365/sharepoint/folders/coloring_information.py +38 -0
- office365/sharepoint/folders/folder.py +23 -25
- office365/sharepoint/likes/liked_by_information.py +7 -10
- office365/sharepoint/likes/user_entity.py +6 -8
- office365/sharepoint/listitems/form_update_value.py +17 -1
- office365/sharepoint/listitems/listitem.py +2 -2
- office365/sharepoint/lists/bloom_filter.py +5 -7
- office365/sharepoint/lists/creatables_info.py +5 -6
- office365/sharepoint/lists/list.py +24 -9
- office365/sharepoint/lists/template.py +7 -4
- office365/sharepoint/lists/template_collection.py +2 -4
- office365/sharepoint/marketplace/app_metadata.py +14 -23
- office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
- office365/sharepoint/migrationcenter/deploy_status.py +5 -0
- office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
- office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
- office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
- office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
- office365/sharepoint/navigation/node.py +5 -8
- office365/sharepoint/permissions/irm/effective_settings.py +6 -8
- office365/sharepoint/permissions/irm/file_settings.py +8 -6
- office365/sharepoint/permissions/irm/settings.py +25 -43
- office365/sharepoint/portal/groups/site_manager.py +6 -7
- office365/sharepoint/principal/principal.py +2 -4
- office365/sharepoint/publishing/embed_data_v1.py +8 -15
- office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
- office365/sharepoint/publishing/primary_city_time.py +8 -9
- office365/sharepoint/publishing/video/service_discoverer.py +4 -3
- office365/sharepoint/pushnotifications/subscriber.py +11 -15
- office365/sharepoint/recyclebin/item.py +107 -7
- office365/sharepoint/sharing/information.py +9 -0
- office365/sharepoint/sharing/link_info.py +6 -0
- office365/sharepoint/sharing/object_sharing_settings.py +24 -46
- office365/sharepoint/sharing/permission_collection.py +18 -0
- office365/sharepoint/sharing/permission_information.py +5 -5
- office365/sharepoint/sharing/result.py +1 -0
- office365/sharepoint/sitedesigns/run.py +4 -3
- office365/sharepoint/sites/script_safe_domain.py +5 -0
- office365/sharepoint/sites/site.py +17 -20
- office365/sharepoint/taxonomy/field.py +32 -21
- office365/sharepoint/taxonomy/field_value.py +1 -1
- office365/sharepoint/taxonomy/groups/group.py +12 -1
- office365/sharepoint/taxonomy/sets/set.py +6 -0
- office365/sharepoint/taxonomy/stores/store.py +4 -2
- office365/sharepoint/teams/channel.py +6 -6
- office365/sharepoint/tenant/administration/endpoints.py +4 -3
- office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
- office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
- office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
- office365/sharepoint/tenant/administration/sites/properties.py +0 -1
- office365/sharepoint/tenant/administration/spo_operation.py +4 -4
- office365/sharepoint/tenant/administration/tenant.py +1 -0
- office365/sharepoint/tenant/insights/report.py +11 -0
- office365/sharepoint/tenant/insights/report_manager.py +5 -0
- office365/sharepoint/tenant/insights/report_metadata.py +5 -0
- office365/sharepoint/tenant/settings.py +4 -3
- office365/sharepoint/translation/sync_translator.py +3 -2
- office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
- office365/sharepoint/usercustomactions/action.py +12 -20
- office365/sharepoint/userprofiles/followed_content.py +6 -10
- office365/sharepoint/userprofiles/people_manager.py +0 -1
- office365/sharepoint/userprofiles/person_properties.py +14 -30
- office365/sharepoint/userprofiles/personal_cache.py +4 -3
- office365/sharepoint/userprofiles/properties_for_user.py +4 -5
- office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
- office365/sharepoint/utilities/move_copy_util.py +19 -19
- office365/sharepoint/utilities/upload_status.py +7 -10
- office365/sharepoint/views/field_collection.py +9 -14
- office365/sharepoint/views/view.py +43 -64
- office365/sharepoint/webhooks/subscription.py +11 -19
- office365/sharepoint/webparts/webpart.py +3 -1
- office365/sharepoint/webs/information_collection.py +1 -1
- office365/sharepoint/webs/modernize_homepage_result.py +4 -3
- office365/sharepoint/webs/regional_settings.py +79 -16
- office365/sharepoint/webs/template.py +3 -5
- office365/sharepoint/webs/web.py +24 -25
- office365/teams/apps/catalog.py +1 -0
- office365/teams/chats/chat.py +4 -0
- office365/teams/operations/async_operation.py +5 -7
- office365/teams/schedule/schedule.py +6 -2
- office365/runtime/paths/item.py +0 -8
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import datetime
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from office365.sharepoint.entity import Entity
|
|
4
5
|
|
|
@@ -8,46 +9,41 @@ class InformationRightsManagementSettings(Entity):
|
|
|
8
9
|
|
|
9
10
|
@property
|
|
10
11
|
def allow_print(self):
|
|
11
|
-
|
|
12
|
-
Specifies whether a user can print the downloaded document.
|
|
13
|
-
:rtype: bool or None
|
|
14
|
-
"""
|
|
12
|
+
# type: () -> Optional[bool]
|
|
13
|
+
"""Specifies whether a user can print the downloaded document."""
|
|
15
14
|
return self.properties.get("AllowPrint", None)
|
|
16
15
|
|
|
17
16
|
@property
|
|
18
17
|
def allow_script(self):
|
|
18
|
+
# type: () -> Optional[bool]
|
|
19
19
|
"""
|
|
20
20
|
Specifies whether a user can run scripts on the downloaded document.
|
|
21
|
-
:rtype: bool or None
|
|
22
21
|
"""
|
|
23
22
|
return self.properties.get("AllowScript", None)
|
|
24
23
|
|
|
25
24
|
@property
|
|
26
25
|
def allow_write_copy(self):
|
|
26
|
+
# type: () -> Optional[bool]
|
|
27
27
|
"""
|
|
28
28
|
Specifies whether a user can write in a copy of the downloaded document.
|
|
29
|
-
:rtype: bool or None
|
|
30
29
|
"""
|
|
31
30
|
return self.properties.get("AllowWriteCopy", None)
|
|
32
31
|
|
|
33
32
|
@property
|
|
34
33
|
def disable_document_browser_view(self):
|
|
35
|
-
|
|
36
|
-
Specifies whether a user can write in a copy of the downloaded document.
|
|
37
|
-
:rtype: bool or None
|
|
38
|
-
"""
|
|
34
|
+
# type: () -> Optional[bool]
|
|
35
|
+
"""Specifies whether a user can write in a copy of the downloaded document."""
|
|
39
36
|
return self.properties.get("DisableDocumentBrowserView", None)
|
|
40
37
|
|
|
41
38
|
@property
|
|
42
39
|
def document_access_expire_days(self):
|
|
43
|
-
|
|
44
|
-
Specifies the number of days after which the downloaded document will expire.
|
|
45
|
-
:rtype: int or None
|
|
46
|
-
"""
|
|
40
|
+
# type: () -> Optional[int]
|
|
41
|
+
"""Specifies the number of days after which the downloaded document will expire."""
|
|
47
42
|
return self.properties.get("DocumentAccessExpireDays", None)
|
|
48
43
|
|
|
49
44
|
@property
|
|
50
45
|
def document_library_protection_expire_date(self):
|
|
46
|
+
# type: () -> Optional[datetime.datetime]
|
|
51
47
|
"""
|
|
52
48
|
Specifies the date on which the Information Rights Management (IRM) protection of this document library will
|
|
53
49
|
stop.
|
|
@@ -58,66 +54,52 @@ class InformationRightsManagementSettings(Entity):
|
|
|
58
54
|
|
|
59
55
|
@property
|
|
60
56
|
def enable_document_access_expire(self):
|
|
61
|
-
|
|
62
|
-
Specifies whether the downloaded document will expire.
|
|
63
|
-
:rtype: int or None
|
|
64
|
-
"""
|
|
57
|
+
# type: () -> Optional[bool]
|
|
58
|
+
"""Specifies whether the downloaded document will expire."""
|
|
65
59
|
return self.properties.get("EnableDocumentAccessExpire", None)
|
|
66
60
|
|
|
67
61
|
@property
|
|
68
62
|
def enable_group_protection(self):
|
|
69
|
-
|
|
70
|
-
Specifies whether the permission of the downloaded document is applicable to a group.
|
|
71
|
-
:rtype: int or None
|
|
72
|
-
"""
|
|
63
|
+
# type: () -> Optional[bool]
|
|
64
|
+
"""Specifies whether the permission of the downloaded document is applicable to a group."""
|
|
73
65
|
return self.properties.get("EnableGroupProtection", None)
|
|
74
66
|
|
|
75
67
|
@property
|
|
76
68
|
def enable_license_cache_expire(self):
|
|
77
|
-
|
|
78
|
-
Specifies whether a user MUST verify his or her credentials after certain intervals.
|
|
79
|
-
:rtype: int or None
|
|
80
|
-
"""
|
|
69
|
+
# type: () -> Optional[int]
|
|
70
|
+
"""Specifies whether a user MUST verify his or her credentials after certain intervals."""
|
|
81
71
|
return self.properties.get("EnableLicenseCacheExpire", None)
|
|
82
72
|
|
|
83
73
|
@property
|
|
84
74
|
def policy_title(self):
|
|
85
|
-
|
|
86
|
-
Specifies the permission policy title.
|
|
87
|
-
:rtype: str or None
|
|
88
|
-
"""
|
|
75
|
+
# type: () -> Optional[str]
|
|
76
|
+
"""Specifies the permission policy title."""
|
|
89
77
|
return self.properties.get("PolicyTitle", None)
|
|
90
78
|
|
|
91
79
|
@property
|
|
92
80
|
def policy_description(self):
|
|
93
|
-
|
|
94
|
-
Specifies the permission policy description.
|
|
95
|
-
:rtype: str or None
|
|
96
|
-
"""
|
|
81
|
+
# type: () -> Optional[str]
|
|
82
|
+
"""Specifies the permission policy description."""
|
|
97
83
|
return self.properties.get("PolicyDescription", None)
|
|
98
84
|
|
|
99
85
|
@property
|
|
100
86
|
def group_name(self):
|
|
101
|
-
|
|
102
|
-
Specifies the group name (email address) that the permission is also applicable to.
|
|
103
|
-
:rtype: str or None
|
|
104
|
-
"""
|
|
87
|
+
# type: () -> Optional[str]
|
|
88
|
+
"""Specifies the group name (email address) that the permission is also applicable to."""
|
|
105
89
|
return self.properties.get("GroupName", None)
|
|
106
90
|
|
|
107
91
|
@property
|
|
108
92
|
def license_cache_expire_days(self):
|
|
93
|
+
# type: () -> Optional[int]
|
|
109
94
|
"""
|
|
110
95
|
Specifies the number of days that the Information Rights Management (IRM) license can be cached by the
|
|
111
96
|
application to open the downloaded document. When these elapse, the application will connect to the IRM
|
|
112
97
|
server to validate the license.
|
|
113
|
-
:rtype: int or None
|
|
114
98
|
"""
|
|
115
99
|
return self.properties.get("LicenseCacheExpireDays", None)
|
|
116
100
|
|
|
117
101
|
@property
|
|
118
102
|
def template_id(self):
|
|
119
|
-
|
|
120
|
-
Gets or sets the ID of the RMS template that will be applied to the file or library.
|
|
121
|
-
:rtype: str or None
|
|
122
|
-
"""
|
|
103
|
+
# type: () -> Optional[str]
|
|
104
|
+
"""Gets or sets the ID of the RMS template that will be applied to the file or library."""
|
|
123
105
|
return self.properties.get("TemplateId", None)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from office365.runtime.client_object import ClientObject
|
|
2
2
|
from office365.runtime.client_result import ClientResult
|
|
3
3
|
from office365.runtime.http.http_method import HttpMethod
|
|
4
|
+
from office365.runtime.http.request_options import RequestOptions
|
|
4
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
5
6
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
6
7
|
from office365.sharepoint.portal.groups.creation_context import GroupCreationContext
|
|
@@ -98,21 +99,19 @@ class GroupSiteManager(ClientObject):
|
|
|
98
99
|
return return_type
|
|
99
100
|
|
|
100
101
|
def get_status(self, group_id):
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
:type group_id: str
|
|
104
|
-
"""
|
|
102
|
+
# type: (str) -> ClientResult[GroupSiteInfo]
|
|
103
|
+
"""Get the status of a SharePoint site"""
|
|
105
104
|
return_type = ClientResult(self.context, GroupSiteInfo())
|
|
106
105
|
qry = ServiceOperationQuery(
|
|
107
106
|
self, "GetSiteStatus", None, {"groupId": group_id}, None, return_type
|
|
108
107
|
)
|
|
109
|
-
self.context.add_query(qry)
|
|
110
108
|
|
|
111
|
-
def
|
|
109
|
+
def _construct_request(request):
|
|
110
|
+
# type: (RequestOptions) -> None
|
|
112
111
|
request.method = HttpMethod.Get
|
|
113
112
|
request.url += "?groupId='{0}'".format(group_id)
|
|
114
113
|
|
|
115
|
-
self.context.before_execute(
|
|
114
|
+
self.context.add_query(qry).before_execute(_construct_request)
|
|
116
115
|
return return_type
|
|
117
116
|
|
|
118
117
|
def get_current_user_joined_teams(
|
|
@@ -8,7 +8,7 @@ class Principal(Entity):
|
|
|
8
8
|
"""Represents a user or group that can be assigned permissions to control security."""
|
|
9
9
|
|
|
10
10
|
def __str__(self):
|
|
11
|
-
return self.title
|
|
11
|
+
return self.title or self.entity_type_name
|
|
12
12
|
|
|
13
13
|
def __repr__(self):
|
|
14
14
|
return self.user_principal_name or self.id or self.entity_type_name
|
|
@@ -28,9 +28,7 @@ class Principal(Entity):
|
|
|
28
28
|
@title.setter
|
|
29
29
|
def title(self, value):
|
|
30
30
|
# type: (str) -> None
|
|
31
|
-
"""
|
|
32
|
-
Sets a value that specifies the name of the principal.
|
|
33
|
-
"""
|
|
31
|
+
"""Sets a value that specifies the name of the principal."""
|
|
34
32
|
self.set_property("Title", value)
|
|
35
33
|
|
|
36
34
|
@property
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
@@ -5,25 +7,16 @@ class EmbedDataV1(Entity):
|
|
|
5
7
|
"""Represents embedded meta data of the page."""
|
|
6
8
|
|
|
7
9
|
def url(self):
|
|
8
|
-
|
|
9
|
-
The URL of the page.
|
|
10
|
-
|
|
11
|
-
:rtype: str
|
|
12
|
-
"""
|
|
10
|
+
# type: () -> Optional[str]
|
|
11
|
+
"""The URL of the page."""
|
|
13
12
|
return self.properties.get("Url", None)
|
|
14
13
|
|
|
15
14
|
def video_id(self):
|
|
16
|
-
|
|
17
|
-
If the page represents a video, the value will be video id.
|
|
18
|
-
|
|
19
|
-
:rtype: str
|
|
20
|
-
"""
|
|
15
|
+
# type: () -> Optional[str]
|
|
16
|
+
"""If the page represents a video, the value will be video id."""
|
|
21
17
|
return self.properties.get("VideoId", None)
|
|
22
18
|
|
|
23
19
|
def web_id(self):
|
|
24
|
-
|
|
25
|
-
If the page belongs to website, the value will be website id, otherwise the value will be empty.
|
|
26
|
-
|
|
27
|
-
:rtype: str
|
|
28
|
-
"""
|
|
20
|
+
# type: () -> Optional[str]
|
|
21
|
+
"""If the page belongs to website, the value will be website id, otherwise the value will be empty."""
|
|
29
22
|
return self.properties.get("WebId", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
4
|
from office365.sharepoint.publishing.highlights_info import HighlightsInfo
|
|
3
5
|
from office365.sharepoint.publishing.pages.page import SitePage
|
|
@@ -15,9 +17,8 @@ class CampaignPublication(SitePage):
|
|
|
15
17
|
|
|
16
18
|
@property
|
|
17
19
|
def email_endpoint(self):
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"""
|
|
20
|
+
# type: () -> Optional[str]
|
|
21
|
+
""""""
|
|
21
22
|
return self.properties.get("EmailEndpoint", None)
|
|
22
23
|
|
|
23
24
|
@property
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.sharepoint.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,21 +8,18 @@ class PrimaryCityTime(Entity):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def location(self):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
""" """
|
|
12
13
|
return self.properties.get("Location", None)
|
|
13
14
|
|
|
14
15
|
@property
|
|
15
16
|
def time(self):
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"""
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
""""""
|
|
19
19
|
return self.properties.get("Time", None)
|
|
20
20
|
|
|
21
21
|
@property
|
|
22
22
|
def utc_offset(self):
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"""
|
|
23
|
+
# type: () -> Optional[str]
|
|
24
|
+
""""""
|
|
26
25
|
return self.properties.get("UtcOffset", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
4
|
from office365.sharepoint.entity import Entity
|
|
3
5
|
|
|
@@ -10,7 +12,6 @@ class VideoServiceDiscoverer(Entity):
|
|
|
10
12
|
|
|
11
13
|
@property
|
|
12
14
|
def video_portal_url(self):
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"""
|
|
15
|
+
# type: () -> Optional[str]
|
|
16
|
+
""" """
|
|
16
17
|
return self.properties.get("VideoPortalUrl", None)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import datetime
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
5
|
from office365.sharepoint.entity import Entity
|
|
@@ -9,42 +10,37 @@ class PushNotificationSubscriber(Entity):
|
|
|
9
10
|
|
|
10
11
|
@property
|
|
11
12
|
def custom_args(self):
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"""
|
|
13
|
+
# type: () -> Optional[str]
|
|
14
|
+
"""Gets the custom arguments specified by the app."""
|
|
15
15
|
return self.properties.get("CustomArgs", None)
|
|
16
16
|
|
|
17
17
|
@property
|
|
18
18
|
def service_token(self):
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"""
|
|
19
|
+
# type: () -> Optional[str]
|
|
20
|
+
"""Specifies the delivery channel URI for push notifications. It must not be null. It must not be empty."""
|
|
22
21
|
return self.properties.get("ServiceToken", None)
|
|
23
22
|
|
|
24
23
|
@service_token.setter
|
|
25
24
|
def service_token(self, value):
|
|
26
|
-
|
|
27
|
-
Specifies the delivery channel URI for push notifications. It must not be null. It must not be empty.
|
|
28
|
-
|
|
29
|
-
:type value: str
|
|
30
|
-
"""
|
|
25
|
+
# type: (str) -> None
|
|
26
|
+
"""Specifies the delivery channel URI for push notifications. It must not be null. It must not be empty."""
|
|
31
27
|
self.set_property("ServiceToken", value)
|
|
32
28
|
|
|
33
29
|
@property
|
|
34
30
|
def device_app_instance_id(self):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
:rtype: str
|
|
38
|
-
"""
|
|
31
|
+
# type: () -> Optional[str]
|
|
32
|
+
"""Specifies a device app instance identifier."""
|
|
39
33
|
return self.properties.get("DeviceAppInstanceId", None)
|
|
40
34
|
|
|
41
35
|
@property
|
|
42
36
|
def last_modified_time_stamp(self):
|
|
37
|
+
# type: () -> Optional[datetime.datetime]
|
|
43
38
|
"""Specifies the time and date when the subscriber was last updated."""
|
|
44
39
|
return self.properties.get("LastModifiedTimeStamp", datetime.datetime.min)
|
|
45
40
|
|
|
46
41
|
@property
|
|
47
42
|
def registration_time_stamp(self):
|
|
43
|
+
# type: () -> Optional[datetime.datetime]
|
|
48
44
|
"""Specifies the time and date when the subscriber registered for push notifications."""
|
|
49
45
|
return self.properties.get("RegistrationTimeStamp", datetime.datetime.min)
|
|
50
46
|
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
from
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Optional
|
|
2
3
|
|
|
3
4
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
|
-
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
5
|
-
from office365.runtime.paths.v3.entity import EntityPath
|
|
6
5
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
7
6
|
from office365.sharepoint.entity import Entity
|
|
8
7
|
from office365.sharepoint.principal.users.user import User
|
|
8
|
+
from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from office365.sharepoint.recyclebin.item_collection import RecycleBinItemCollection
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
class RecycleBinItem(Entity):
|
|
12
15
|
"""Represents a Recycle Bin item in the Recycle Bin of a site or a site collection."""
|
|
13
16
|
|
|
17
|
+
def __str__(self):
|
|
18
|
+
return self.title or self.entity_type_name
|
|
19
|
+
|
|
14
20
|
def restore(self):
|
|
15
21
|
"""Restores the Recycle Bin item to its original location."""
|
|
16
22
|
qry = ServiceOperationQuery(self, "Restore")
|
|
@@ -26,17 +32,95 @@ class RecycleBinItem(Entity):
|
|
|
26
32
|
self.context.add_query(qry)
|
|
27
33
|
return self
|
|
28
34
|
|
|
35
|
+
@property
|
|
36
|
+
def author_email(self):
|
|
37
|
+
# type: () -> Optional[str]
|
|
38
|
+
"""Gets the email address of the user who originally created the Recycle Bin item."""
|
|
39
|
+
return self.properties.get("AuthorEmail", None)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def author_name(self):
|
|
43
|
+
# type: () -> Optional[str]
|
|
44
|
+
"""Gets the user display name of the user who originally created the Recycle Bin item."""
|
|
45
|
+
return self.properties.get("AuthorName", None)
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def deleted_by_email(self):
|
|
49
|
+
# type: () -> Optional[str]
|
|
50
|
+
"""Gets the email address of the user who deleted the Recycle Bin item."""
|
|
51
|
+
return self.properties.get("DeletedByEmail", None)
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def deleted_by_name(self):
|
|
55
|
+
# type: () -> Optional[str]
|
|
56
|
+
"""Gets the user display name of the user who deleted the Recycle Bin item."""
|
|
57
|
+
return self.properties.get("DeletedByName", None)
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def deleted_date_local_formatted(self):
|
|
61
|
+
# type: () -> Optional[str]
|
|
62
|
+
"""
|
|
63
|
+
Specifies when, in the default time zone for the current site,
|
|
64
|
+
the Recycle Bin item was moved to the Recycle Bin.
|
|
65
|
+
"""
|
|
66
|
+
return self.properties.get("DeletedDateLocalFormatted", None)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def dir_name(self):
|
|
70
|
+
# type: () -> Optional[str]
|
|
71
|
+
"""
|
|
72
|
+
Specifies the site-relative URL of the list or folder that originally contained the Recycle Bin item.
|
|
73
|
+
"""
|
|
74
|
+
return self.properties.get("DirName", None)
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def dir_name_path(self):
|
|
78
|
+
# type: () -> Optional[SPResPath]
|
|
79
|
+
"""Returns the site relative path of the list or folder that originally contained the Recycle Bin item."""
|
|
80
|
+
return self.properties.get("DirNamePath", SPResPath())
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def item_state(self):
|
|
84
|
+
# type: () -> Optional[int]
|
|
85
|
+
"""Specifies the Recycle Bin stage of the Recycle Bin item."""
|
|
86
|
+
return self.properties.get("ItemState", None)
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def item_type(self):
|
|
90
|
+
# type: () -> Optional[int]
|
|
91
|
+
"""Specifies the type of the Recycle Bin item."""
|
|
92
|
+
return self.properties.get("ItemType", None)
|
|
93
|
+
|
|
29
94
|
@property
|
|
30
95
|
def id(self):
|
|
96
|
+
# type: () -> Optional[str]
|
|
31
97
|
"""Gets a value that specifies the identifier of the Recycle Bin item."""
|
|
32
98
|
return self.properties.get("Id", None)
|
|
33
99
|
|
|
100
|
+
@property
|
|
101
|
+
def leaf_name(self):
|
|
102
|
+
# type: () -> Optional[str]
|
|
103
|
+
"""Specifies the leaf name of the Recycle Bin item."""
|
|
104
|
+
return self.properties.get("LeafName", None)
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def leaf_name_path(self):
|
|
108
|
+
# type: () -> Optional[SPResPath]
|
|
109
|
+
"""Returns the leaf name path of the Recycle Bin item."""
|
|
110
|
+
return self.properties.get("LeafNamePath", SPResPath())
|
|
111
|
+
|
|
34
112
|
@property
|
|
35
113
|
def size(self):
|
|
36
114
|
# type: () -> Optional[int]
|
|
37
115
|
"""Gets a value that specifies the size of the Recycle Bin item in bytes."""
|
|
38
116
|
return self.properties.get("Size", None)
|
|
39
117
|
|
|
118
|
+
@property
|
|
119
|
+
def title(self):
|
|
120
|
+
# type: () -> Optional[str]
|
|
121
|
+
"""Specifies the title of the Recycle Bin item."""
|
|
122
|
+
return self.properties.get("Title", None)
|
|
123
|
+
|
|
40
124
|
@property
|
|
41
125
|
def author(self):
|
|
42
126
|
"""Gets a value that specifies the user who created the Recycle Bin item."""
|
|
@@ -55,7 +139,23 @@ class RecycleBinItem(Entity):
|
|
|
55
139
|
@property
|
|
56
140
|
def deleted_date(self):
|
|
57
141
|
"""Gets a value that specifies when the Recycle Bin item was moved to the Recycle Bin."""
|
|
58
|
-
return self.properties.get("DeletedDate",
|
|
142
|
+
return self.properties.get("DeletedDate", datetime.min)
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def parent_collection(self):
|
|
146
|
+
# type: () -> RecycleBinItemCollection
|
|
147
|
+
return self._parent_collection
|
|
148
|
+
|
|
149
|
+
def get_property(self, name, default_value=None):
|
|
150
|
+
if default_value is None:
|
|
151
|
+
property_mapping = {
|
|
152
|
+
"DeletedBy": self.deleted_by,
|
|
153
|
+
"DeletedDate": self.deleted_date,
|
|
154
|
+
"DirNamePath": self.dir_name_path,
|
|
155
|
+
"LeafNamePath": self.leaf_name_path,
|
|
156
|
+
}
|
|
157
|
+
default_value = property_mapping.get(name, None)
|
|
158
|
+
return super(RecycleBinItem, self).get_property(name, default_value)
|
|
59
159
|
|
|
60
160
|
def set_property(self, name, value, persist_changes=True):
|
|
61
161
|
super(RecycleBinItem, self).set_property(name, value, persist_changes)
|
|
@@ -63,8 +163,8 @@ class RecycleBinItem(Entity):
|
|
|
63
163
|
|
|
64
164
|
if name == "Id":
|
|
65
165
|
if self._resource_path is None:
|
|
66
|
-
self._resource_path =
|
|
67
|
-
|
|
68
|
-
)
|
|
166
|
+
self._resource_path = self.parent_collection.get_by_id(
|
|
167
|
+
value
|
|
168
|
+
).resource_path
|
|
69
169
|
else:
|
|
70
170
|
self._resource_path.patch(value)
|
|
@@ -5,6 +5,7 @@ from office365.sharepoint.sharing.access_request_settings import AccessRequestSe
|
|
|
5
5
|
from office365.sharepoint.sharing.links.default_templates_collection import (
|
|
6
6
|
SharingLinkDefaultTemplatesCollection,
|
|
7
7
|
)
|
|
8
|
+
from office365.sharepoint.sharing.permission_collection import PermissionCollection
|
|
8
9
|
from office365.sharepoint.sharing.picker_settings import PickerSettings
|
|
9
10
|
|
|
10
11
|
|
|
@@ -21,6 +22,13 @@ class SharingInformation(Entity):
|
|
|
21
22
|
"""
|
|
22
23
|
return self.properties.get("accessRequestSettings", AccessRequestSettings())
|
|
23
24
|
|
|
25
|
+
@property
|
|
26
|
+
def permissions_information(self):
|
|
27
|
+
"""
|
|
28
|
+
The PermissionCollection that are on the list item. It contains a collection of PrincipalInfo and LinkInfo.
|
|
29
|
+
"""
|
|
30
|
+
return self.properties.get("permissionsInformation", PermissionCollection())
|
|
31
|
+
|
|
24
32
|
@property
|
|
25
33
|
def picker_settings(self):
|
|
26
34
|
"""PickerSettings used by the PeoplePicker Control."""
|
|
@@ -49,6 +57,7 @@ class SharingInformation(Entity):
|
|
|
49
57
|
if default_value is None:
|
|
50
58
|
property_mapping = {
|
|
51
59
|
"accessRequestSettings": self.access_request_settings,
|
|
60
|
+
"permissionsInformation": self.permissions_information,
|
|
52
61
|
"pickerSettings": self.picker_settings,
|
|
53
62
|
"sharingAbilities": self.sharing_abilities,
|
|
54
63
|
"sharingLinkTemplates": self.sharing_link_templates,
|