Office365-REST-Python-Client 2.5.12__py3-none-any.whl → 2.5.14__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.
Files changed (201) hide show
  1. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/RECORD +199 -107
  3. office365/backuprestore/root.py +39 -0
  4. office365/backuprestore/service_status.py +5 -0
  5. office365/booking/business/business.py +13 -0
  6. office365/booking/business/collection.py +8 -4
  7. office365/booking/solutions/root.py +14 -1
  8. office365/communications/callrecords/collection.py +42 -0
  9. office365/communications/callrecords/direct_routing_log_row.py +5 -0
  10. office365/communications/cloud_communications.py +2 -3
  11. office365/directory/applications/application.py +33 -2
  12. office365/directory/applications/optional_claim.py +5 -0
  13. office365/directory/applications/optional_claims.py +16 -0
  14. office365/directory/applications/required_resource_access.py +23 -0
  15. office365/directory/applications/resource_access.py +26 -0
  16. office365/directory/authentication/conditions/event_listener.py +9 -0
  17. office365/directory/authentication/methods/details.py +29 -0
  18. office365/directory/authentication/methods/root.py +8 -0
  19. office365/directory/device_local_credential_info.py +21 -0
  20. office365/directory/identities/container.py +18 -0
  21. office365/directory/permissions/scope.py +15 -3
  22. office365/directory/policies/authentication_flows.py +8 -0
  23. office365/directory/policies/authentication_strength.py +21 -0
  24. office365/directory/policies/root.py +17 -0
  25. office365/directory/policies/unified_role_management.py +7 -0
  26. office365/directory/policies/update_allowed_combinations_result.py +5 -0
  27. office365/directory/protection/policy/__init__.py +0 -0
  28. office365/directory/protection/policy/base.py +24 -0
  29. office365/directory/protection/policy/one_drive_for_business.py +10 -0
  30. office365/directory/security/alerts/evidence.py +2 -1
  31. office365/directory/security/alerts/malware_evidence.py +5 -0
  32. office365/directory/security/alerts/process_evidence.py +5 -0
  33. office365/directory/security/attacksimulations/user.py +5 -0
  34. office365/directory/security/attacksimulations/user_coverage.py +3 -0
  35. office365/directory/security/attacksimulations/users/details.py +12 -0
  36. office365/directory/serviceprincipals/service_principal.py +118 -18
  37. office365/directory/users/user.py +23 -3
  38. office365/graph_client.py +3 -1
  39. office365/intune/devices/management/management.py +26 -0
  40. office365/intune/devices/management/terms_and_conditions.py +10 -0
  41. office365/intune/devices/management/virtual_endpoint.py +8 -0
  42. office365/onedrive/driveitems/driveItem.py +1 -1
  43. office365/onedrive/driveitems/retention_label.py +33 -0
  44. office365/onedrive/driveitems/retention_label_settings.py +7 -0
  45. office365/onedrive/sitepages/base.py +3 -0
  46. office365/onedrive/sitepages/collection.py +12 -0
  47. office365/onedrive/sitepages/site_page.py +9 -9
  48. office365/onedrive/sites/archival_details.py +5 -0
  49. office365/onedrive/sites/site_collection.py +10 -1
  50. office365/onedrive/workbooks/functions/functions.py +23 -0
  51. office365/partners/__init__.py +0 -0
  52. office365/partners/billing/__init__.py +0 -0
  53. office365/planner/tasks/check_list_item.py +5 -1
  54. office365/runtime/client_object.py +24 -8
  55. office365/runtime/client_object_collection.py +4 -4
  56. office365/runtime/client_result.py +21 -2
  57. office365/runtime/client_value.py +1 -1
  58. office365/runtime/csom/request.py +11 -0
  59. office365/runtime/odata/v4/batch_request.py +12 -15
  60. office365/runtime/types/exceptions.py +18 -0
  61. office365/search/acronym.py +10 -0
  62. office365/search/aggregation_option.py +6 -0
  63. office365/search/answer.py +9 -0
  64. office365/search/entity.py +67 -14
  65. office365/search/entity_type.py +28 -0
  66. office365/search/request.py +32 -3
  67. office365/sharepoint/apps/access_requests.py +5 -0
  68. office365/sharepoint/apps/context_site.py +41 -0
  69. office365/sharepoint/apps/management/__init__.py +0 -0
  70. office365/sharepoint/apps/management/principal_info.py +9 -0
  71. office365/sharepoint/authpolicy/events/collection.py +39 -0
  72. office365/sharepoint/authpolicy/events/{auth_event.py → event.py} +1 -0
  73. office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +9 -0
  74. office365/sharepoint/brandcenter/__init__.py +0 -0
  75. office365/sharepoint/brandcenter/brand_center.py +9 -0
  76. office365/sharepoint/brandcenter/configuration.py +5 -0
  77. office365/sharepoint/changes/change.py +1 -3
  78. office365/sharepoint/changes/collection.py +3 -0
  79. office365/sharepoint/changes/folder.py +6 -0
  80. office365/sharepoint/changes/group.py +3 -0
  81. office365/sharepoint/changes/list.py +13 -0
  82. office365/sharepoint/changes/view.py +25 -0
  83. office365/sharepoint/client_context.py +19 -1
  84. office365/sharepoint/contenttypes/fieldlinks/collection.py +3 -0
  85. office365/sharepoint/copilot/__init__.py +0 -0
  86. office365/sharepoint/copilot/file_collection.py +27 -0
  87. office365/sharepoint/copilot/file_collection_query_result.py +10 -0
  88. office365/sharepoint/copilot/list_item_extensions.py +5 -0
  89. office365/sharepoint/directory/provider/alternate_id_data.py +5 -0
  90. office365/sharepoint/directory/provider/notification.py +8 -0
  91. office365/sharepoint/directory/provider/object_changes.py +5 -0
  92. office365/sharepoint/directory/provider/object_data.py +26 -3
  93. office365/sharepoint/directory/provider/provider.py +1 -0
  94. office365/sharepoint/directory/provider/session_data.py +9 -0
  95. office365/sharepoint/documentmanagement/document_id.py +28 -3
  96. office365/sharepoint/files/file.py +11 -4
  97. office365/sharepoint/files/versions/event.py +9 -0
  98. office365/sharepoint/flows/permissions.py +30 -0
  99. office365/sharepoint/listhome/favorite_item.py +9 -0
  100. office365/sharepoint/listitems/listitem.py +79 -4
  101. office365/sharepoint/listitems/update_parameters.py +4 -1
  102. office365/sharepoint/lists/data_parameters.py +5 -0
  103. office365/sharepoint/lists/exporter.py +73 -0
  104. office365/sharepoint/lists/list.py +157 -7
  105. office365/sharepoint/lists/render_data_parameters.py +31 -0
  106. office365/sharepoint/lists/version_policy_manager.py +5 -0
  107. office365/sharepoint/logger/log_export.py +2 -0
  108. office365/sharepoint/migration/copy_migration_options.py +5 -0
  109. office365/sharepoint/migrationcenter/service/performance/data.py +5 -5
  110. office365/sharepoint/multigeo/services.py +24 -0
  111. office365/sharepoint/navigation/menu_node.py +43 -1
  112. office365/sharepoint/navigation/node_collection.py +1 -1
  113. office365/sharepoint/oauth/token.py +22 -0
  114. office365/sharepoint/oauth/token_response.py +5 -0
  115. office365/sharepoint/portal/groups/site_manager.py +32 -0
  116. office365/sharepoint/portal/project/__init__.py +9 -0
  117. office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
  118. office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
  119. office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
  120. office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
  121. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
  122. office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
  123. office365/sharepoint/publishing/pages/campaign_publication.py +10 -0
  124. office365/sharepoint/publishing/pages/coauth_state.py +8 -0
  125. office365/sharepoint/publishing/pages/page.py +11 -0
  126. office365/sharepoint/publishing/pages/stream_content.py +9 -0
  127. office365/sharepoint/publishing/pages/stream_data.py +8 -0
  128. office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
  129. office365/sharepoint/request.py +3 -0
  130. office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
  131. office365/sharepoint/search/ranking_labeling.py +1 -0
  132. office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
  133. office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
  134. office365/sharepoint/search/reports/abandonedqueries/item.py +5 -0
  135. office365/sharepoint/search/reports/noresult/__init__.py +0 -0
  136. office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
  137. office365/sharepoint/search/reports/top_queries.py +7 -0
  138. office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
  139. office365/sharepoint/search/reports/topqueries/data.py +9 -0
  140. office365/sharepoint/search/reports/topqueries/item.py +15 -0
  141. office365/sharepoint/search/scs_endpoint.py +9 -0
  142. office365/sharepoint/securestore/target_application.py +10 -0
  143. office365/sharepoint/sharing/document_manager.py +3 -3
  144. office365/sharepoint/sharing/inherited_from.py +5 -0
  145. office365/sharepoint/sharing/internal/__init__.py +0 -0
  146. office365/sharepoint/sharing/internal/sharing_restrictions.py +22 -0
  147. office365/sharepoint/sharing/internal/types.py +17 -0
  148. office365/sharepoint/sharing/link_info.py +24 -0
  149. office365/sharepoint/sharing/result.py +21 -0
  150. office365/sharepoint/sites/html_field_security_setting.py +5 -0
  151. office365/sharepoint/sites/site.py +39 -1
  152. office365/sharepoint/sites/version_policy_manager.py +33 -0
  153. office365/sharepoint/sitescripts/metadata.py +28 -3
  154. office365/sharepoint/sitescripts/utility.py +17 -0
  155. office365/sharepoint/smartcache/__init__.py +0 -0
  156. office365/sharepoint/smartcache/item.py +9 -0
  157. office365/sharepoint/tenant/administration/app_billing_properties.py +21 -0
  158. office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
  159. office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
  160. office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
  161. office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
  162. office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
  163. office365/sharepoint/tenant/administration/internal/{permission_grant.py → appservice/permission_request.py} +4 -2
  164. office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
  165. office365/sharepoint/tenant/administration/policies/__init__.py +0 -0
  166. office365/sharepoint/tenant/administration/policies/definition.py +5 -0
  167. office365/sharepoint/tenant/administration/settings_service.py +12 -1
  168. office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
  169. office365/sharepoint/tenant/administration/sites/properties.py +45 -0
  170. office365/sharepoint/tenant/administration/tenant.py +124 -4
  171. office365/sharepoint/tenant/administration/types.py +29 -1
  172. office365/sharepoint/tenant/cdn_api.py +3 -1
  173. office365/sharepoint/tenant/management/office365_tenant.py +2 -0
  174. office365/sharepoint/tenant/settings.py +10 -0
  175. office365/sharepoint/utilities/utility.py +6 -0
  176. office365/sharepoint/utilities/wopi_host.py +45 -0
  177. office365/sharepoint/viva/connections_page.py +8 -0
  178. office365/sharepoint/viva/dashboard_configuration.py +8 -0
  179. office365/sharepoint/viva/employee_engagement.py +39 -1
  180. office365/sharepoint/viva/resource_get_endpoint.py +8 -0
  181. office365/sharepoint/viva/resource_link.py +8 -0
  182. office365/sharepoint/webs/information.py +66 -1
  183. office365/sharepoint/webs/regional_settings.py +38 -0
  184. office365/sharepoint/webs/templates/__init__.py +0 -0
  185. office365/sharepoint/webs/time_zone.py +1 -1
  186. office365/sharepoint/webs/web.py +114 -0
  187. office365/sharepoint/workflow/definition.py +5 -0
  188. office365/sharepoint/workflow/task.py +5 -0
  189. office365/sharepoint/workflowservices/deployment_service.py +23 -0
  190. office365/subscriptions/collection.py +16 -0
  191. office365/teams/members/settings.py +2 -2
  192. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
  193. office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
  194. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/LICENSE +0 -0
  195. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/WHEEL +0 -0
  196. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.14.dist-info}/top_level.txt +0 -0
  197. /office365/{sharepoint/userprofiles/sharedwithme → backuprestore}/__init__.py +0 -0
  198. /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
  199. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
  200. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
  201. /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
@@ -0,0 +1,45 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+ from office365.sharepoint.client_context import ClientContext
5
+ from office365.sharepoint.entity import Entity
6
+
7
+
8
+ class WopiHostUtility(Entity):
9
+ """ """
10
+
11
+ @staticmethod
12
+ def generate_file_bundle(context):
13
+ # type: (ClientContext) -> ClientResult[str]
14
+ """ """
15
+ return_type = ClientResult(context)
16
+ qry = ServiceOperationQuery(
17
+ WopiHostUtility(context),
18
+ "GenerateFileBundle",
19
+ None,
20
+ None,
21
+ None,
22
+ return_type,
23
+ True,
24
+ )
25
+ context.add_query(qry)
26
+ return return_type
27
+
28
+ @staticmethod
29
+ def get_wopi_origins(context):
30
+ return_type = ClientResult(context, ClientValueCollection(str))
31
+ qry = ServiceOperationQuery(
32
+ WopiHostUtility(context),
33
+ "GetWopiOrigins",
34
+ None,
35
+ None,
36
+ None,
37
+ return_type,
38
+ True,
39
+ )
40
+ context.add_query(qry)
41
+ return return_type
42
+
43
+ @property
44
+ def entity_type_name(self):
45
+ return "SP.Utilities.WopiHostUtility"
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class VivaConnectionsPage(Entity):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.EmployeeEngagement.VivaConnectionsPage"
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class DashboardConfiguration(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.EmployeeEngagement.DashboardConfiguration"
@@ -4,6 +4,8 @@ from office365.runtime.queries.function import FunctionQuery
4
4
  from office365.runtime.queries.service_operation import ServiceOperationQuery
5
5
  from office365.sharepoint.entity import Entity
6
6
  from office365.sharepoint.viva.app_configuration import AppConfiguration
7
+ from office365.sharepoint.viva.connections_page import VivaConnectionsPage
8
+ from office365.sharepoint.viva.dashboard_configuration import DashboardConfiguration
7
9
  from office365.sharepoint.viva.home import VivaHome
8
10
 
9
11
 
@@ -18,13 +20,31 @@ class EmployeeEngagement(Entity):
18
20
  :param str override_language_code:
19
21
  """
20
22
  return_type = ClientResult(self.context, str())
21
- payload = {"return return_type": override_language_code}
23
+ payload = {"override_language_code": override_language_code}
22
24
  qry = ServiceOperationQuery(
23
25
  self, "DashboardContent", None, payload, None, return_type
24
26
  )
25
27
  self.context.add_query(qry)
26
28
  return return_type
27
29
 
30
+ def full_dashboard_content(
31
+ self, canvas_as_json=None, include_personalization_data=None
32
+ ):
33
+ """
34
+ :param bool canvas_as_json:
35
+ :param bool include_personalization_data:
36
+ """
37
+ return_type = ClientResult(self.context, DashboardConfiguration())
38
+ payload = {
39
+ "canvasAsJson": canvas_as_json,
40
+ "includePersonalizationData": include_personalization_data,
41
+ }
42
+ qry = ServiceOperationQuery(
43
+ self, "FullDashboardContent", None, payload, None, return_type
44
+ )
45
+ self.context.add_query(qry)
46
+ return return_type
47
+
28
48
  def viva_home_configuration(self):
29
49
  return_type = ClientResult(self.context, {})
30
50
  qry = FunctionQuery(self, "VivaHomeConfiguration", None, return_type)
@@ -45,3 +65,21 @@ class EmployeeEngagement(Entity):
45
65
  self.context, ResourcePath("AppConfiguration", self.resource_path)
46
66
  ),
47
67
  )
68
+
69
+ @property
70
+ def viva_connections_page(self):
71
+ return self.properties.get(
72
+ "VivaConnectionsPage",
73
+ VivaConnectionsPage(
74
+ self.context, ResourcePath("VivaConnectionsPage", self.resource_path)
75
+ ),
76
+ )
77
+
78
+ def get_property(self, name, default_value=None):
79
+ if default_value is None:
80
+ property_mapping = {
81
+ "AppConfiguration": self.app_configuration,
82
+ "VivaConnectionsPage": self.viva_connections_page,
83
+ }
84
+ default_value = property_mapping.get(name, None)
85
+ return super(EmployeeEngagement, self).get_property(name, default_value)
@@ -0,0 +1,8 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class VivaResourceGetEndpoint(Entity):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.EmployeeEngagement.VivaResourceGetEndpoint"
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class VivaResourceLink(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ return "Microsoft.SharePoint.EmployeeEngagement.ResourceLink"
@@ -1,7 +1,72 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
1
4
  from office365.sharepoint.entity import Entity
2
5
 
3
6
 
4
7
  class WebInformation(Entity):
5
8
  """Specifies metadata about a site"""
6
9
 
7
- pass
10
+ def __repr__(self):
11
+ return self.server_relative_url or self.entity_type_name
12
+
13
+ @property
14
+ def configuration(self):
15
+ # type: () -> Optional[str]
16
+ """Specifies the identifier (ID) of the site definition configuration that was used to create the site"""
17
+ return self.properties.get("Configuration", None)
18
+
19
+ @property
20
+ def created(self):
21
+ # type: () -> Optional[datetime]
22
+ """Specifies when the site (2) was created."""
23
+ return self.properties.get("Created", datetime.min)
24
+
25
+ @property
26
+ def description(self):
27
+ # type: () -> Optional[str]
28
+ """Specifies the description for the site"""
29
+ return self.properties.get("Description", None)
30
+
31
+ @property
32
+ def id(self):
33
+ # type: () -> Optional[str]
34
+ """Specifies the site identifier for the site"""
35
+ return self.properties.get("Id", None)
36
+
37
+ @property
38
+ def language(self):
39
+ # type: () -> Optional[int]
40
+ """Specifies the language code identifier (LCID) for the language that is used on the site"""
41
+ return self.properties.get("Language", None)
42
+
43
+ @property
44
+ def last_item_modified_date(self):
45
+ # type: () -> Optional[datetime]
46
+ """Gets the date and time that an item was last modified in the site by a non-system update.
47
+ A non-system update is a change to a list item that is visible to end users."""
48
+ return self.properties.get("LastItemModifiedDate", datetime.min)
49
+
50
+ @property
51
+ def server_relative_url(self):
52
+ # type: () -> Optional[str]
53
+ """Specifies the server-relative URL of the site"""
54
+ return self.properties.get("ServerRelativeUrl", None)
55
+
56
+ @property
57
+ def title(self):
58
+ # type: () -> Optional[str]
59
+ """Specifies the title for the site. Its length MUST be equal to or less than 255."""
60
+ return self.properties.get("Title", None)
61
+
62
+ @property
63
+ def web_template(self):
64
+ # type: () -> Optional[str]
65
+ """Specifies the name of the site template that was used to create the site."""
66
+ return self.properties.get("WebTemplate", None)
67
+
68
+ @property
69
+ def web_template_id(self):
70
+ # type: () -> Optional[int]
71
+ """Specifies the identifier of the site template that was used to create the site"""
72
+ return self.properties.get("WebTemplateId", None)
@@ -102,6 +102,44 @@ class RegionalSettings(Entity):
102
102
  """Gets the locale identifier in use on the server."""
103
103
  return self.properties.get("LocaleId", None)
104
104
 
105
+ @property
106
+ def negative_sign(self):
107
+ # type: () -> Optional[str]
108
+ """ """
109
+ return self.properties.get("NegativeSign", None)
110
+
111
+ @property
112
+ def neg_number_mode(self):
113
+ # type: () -> Optional[int]
114
+ """Specifies the negative number mode that is used for displaying negative numbers in calculated fields
115
+ based on the locale of the server."""
116
+ return self.properties.get("NegNumberMode", None)
117
+
118
+ @property
119
+ def pm(self):
120
+ # type: () -> Optional[str]
121
+ """Specifies the string that is used to represent time after noon on the site"""
122
+ return self.properties.get("PM", None)
123
+
124
+ @property
125
+ def positive_sign(self):
126
+ # type: () -> Optional[str]
127
+ """Specifies the symbol that is used to represent a positive number on the site"""
128
+ return self.properties.get("PositiveSign", None)
129
+
130
+ @property
131
+ def show_weeks(self):
132
+ # type: () -> Optional[bool]
133
+ """Specifies whether to display the week number in day or week views of a calendar."""
134
+ return self.properties.get("ShowWeeks", None)
135
+
136
+ @property
137
+ def thousand_separator(self):
138
+ # type: () -> Optional[str]
139
+ """Specifies the symbol that is used to separate thousands for numbers on the site. For example,
140
+ if the symbol is "," the number 123456789 would appear as "123,456,789"."""
141
+ return self.properties.get("ThousandSeparator", None)
142
+
105
143
  @property
106
144
  def work_days(self):
107
145
  # type: () -> Optional[int]
File without changes
@@ -44,7 +44,7 @@ class TimeZone(Entity):
44
44
  return self.properties.get("Information", TimeZoneInformation())
45
45
 
46
46
 
47
- class TimeZoneCollection(EntityCollection):
47
+ class TimeZoneCollection(EntityCollection[TimeZone]):
48
48
  """TimeZone collection"""
49
49
 
50
50
  def __init__(self, context, resource_path=None):
@@ -6,6 +6,7 @@ from office365.runtime.client_result import ClientResult
6
6
  from office365.runtime.client_value_collection import ClientValueCollection
7
7
  from office365.runtime.paths.resource_path import ResourcePath
8
8
  from office365.runtime.paths.service_operation import ServiceOperationPath
9
+ from office365.runtime.queries.client_query import ClientQuery
9
10
  from office365.runtime.queries.service_operation import ServiceOperationQuery
10
11
  from office365.runtime.types.collections import StringCollection
11
12
  from office365.sharepoint.activities.entity import SPActivityEntity
@@ -42,6 +43,7 @@ from office365.sharepoint.flows.synchronization_result import FlowSynchronizatio
42
43
  from office365.sharepoint.folders.collection import FolderCollection
43
44
  from office365.sharepoint.folders.folder import Folder
44
45
  from office365.sharepoint.internal.paths.web import WebPath
46
+ from office365.sharepoint.largeoperation.operation import SPLargeOperation
45
47
  from office365.sharepoint.listitems.listitem import ListItem
46
48
  from office365.sharepoint.lists.collection import ListCollection
47
49
  from office365.sharepoint.lists.creation_information import ListCreationInformation
@@ -50,6 +52,7 @@ from office365.sharepoint.lists.document_library_information import (
50
52
  )
51
53
  from office365.sharepoint.lists.get_parameters import GetListsParameters
52
54
  from office365.sharepoint.lists.list import List
55
+ from office365.sharepoint.lists.render_data_parameters import RenderListDataParameters
53
56
  from office365.sharepoint.lists.template_collection import ListTemplateCollection
54
57
  from office365.sharepoint.lists.template_type import ListTemplateType
55
58
  from office365.sharepoint.marketplace.corporatecuratedgallery.available_addins_response import (
@@ -158,6 +161,7 @@ class Web(SecurableObject):
158
161
  return return_type
159
162
 
160
163
  def add_cross_farm_message(self, message):
164
+ # type: (str) -> ClientResult[bool]
161
165
  """
162
166
  :param str message:
163
167
  """
@@ -169,6 +173,30 @@ class Web(SecurableObject):
169
173
  self.context.add_query(qry)
170
174
  return return_type
171
175
 
176
+ def get_access_request_list(self):
177
+ """ """
178
+ return_type = List(self.context)
179
+ self.lists.add_child(return_type)
180
+
181
+ def _get_access_request_list():
182
+ return_type.set_property("Url", self.access_request_list_url)
183
+
184
+ self.ensure_properties(["AccessRequestListUrl"], _get_access_request_list)
185
+ return return_type
186
+
187
+ def get_document_by_doc_id(self, doc_id):
188
+ """ """
189
+ return_type = ClientResult(self.context)
190
+ qry = ClientQuery(self.context, return_type=return_type)
191
+
192
+ def _construct_request(request):
193
+ request.url = "{0}/_layouts/15/DocIdRedir.aspx?ID={1}".format(
194
+ self.context.base_url, doc_id
195
+ )
196
+
197
+ self.context.add_query(qry).before_query_execute(_construct_request)
198
+ return return_type
199
+
172
200
  def get_site_script(
173
201
  self,
174
202
  include_branding=True,
@@ -210,6 +238,50 @@ class Web(SecurableObject):
210
238
  self.context.add_query(qry)
211
239
  return return_type
212
240
 
241
+ def get_list_data_as_stream(self, path, view_xml=None):
242
+ """Returns list data from the specified list url and for the specified query parameters.
243
+
244
+ :param str path: A string that contains the site-relative URL for a list, for example, /Lists/Announcements.
245
+ :param str view_xml:
246
+ """
247
+ if view_xml is None:
248
+ view_xml = "<View><Query></Query></View>"
249
+ return_type = ClientResult(self.context, dict())
250
+
251
+ def _get_list_data_as_stream():
252
+ list_abs_url = self.url + path
253
+ parameters = RenderListDataParameters(view_xml=view_xml)
254
+ List.get_list_data_as_stream(
255
+ self.context, list_abs_url, parameters, return_type=return_type
256
+ )
257
+
258
+ self.ensure_property("Url", _get_list_data_as_stream)
259
+ return return_type
260
+
261
+ def get_onedrive_list_data_as_stream(self, view_xml=None):
262
+ """Returns list data from the specified list url and for the specified query parameters.
263
+
264
+ :param str view_xml:
265
+ """
266
+ if view_xml is None:
267
+ view_xml = "<View><Query></Query></View>"
268
+ return List.get_onedrive_list_data_as_stream(self.context, view_xml)
269
+
270
+ def get_list_operation(self, list_id, operation_id):
271
+ # type: (str, str) -> SPLargeOperation
272
+ """ """
273
+ return_type = SPLargeOperation(self.context)
274
+ qry = ServiceOperationQuery(
275
+ self,
276
+ "GetListOperation",
277
+ None,
278
+ {"listId": list_id, "operationId": operation_id},
279
+ None,
280
+ return_type,
281
+ )
282
+ self.context.add_query(qry)
283
+ return return_type
284
+
213
285
  def get_push_notification_subscriber(self, device_app_instance_id):
214
286
  """
215
287
  Specifies the push notification subscriber over the site for the specified device app instance identifier.
@@ -1246,6 +1318,7 @@ class Web(SecurableObject):
1246
1318
  display_format=DateTimeFieldFormatType.DateTime,
1247
1319
  calendar_type=CalendarType.None_,
1248
1320
  ):
1321
+ # type: (str, int, int) -> ClientResult[str]
1249
1322
  """
1250
1323
  Returns parsed DateTime value.
1251
1324
 
@@ -1916,6 +1989,7 @@ class Web(SecurableObject):
1916
1989
  @property
1917
1990
  def access_request_list_url(self):
1918
1991
  # type: () -> Optional[str]
1992
+ """Gets the URL of the access request list to the current site"""
1919
1993
  return self.properties.get("AccessRequestListUrl", None)
1920
1994
 
1921
1995
  @property
@@ -2311,9 +2385,49 @@ class Web(SecurableObject):
2311
2385
 
2312
2386
  @property
2313
2387
  def recycle_bin_enabled(self):
2388
+ # type: () -> Optional[bool]
2314
2389
  """Specifies whether the Recycle Bin is enabled."""
2315
2390
  return self.properties.get("RecycleBinEnabled", None)
2316
2391
 
2392
+ @property
2393
+ def related_hub_site_ids(self):
2394
+ # type: () -> Optional[str]
2395
+ """ """
2396
+ return self.properties.get("RelatedHubSiteIds", None)
2397
+
2398
+ @property
2399
+ def request_access_email(self):
2400
+ # type: () -> Optional[str]
2401
+ """Gets the e-mail address to which requests for access are sent."""
2402
+ return self.properties.get("RequestAccessEmail", None)
2403
+
2404
+ @property
2405
+ def save_site_as_template_enabled(self):
2406
+ # type: () -> Optional[bool]
2407
+ """Specifies if the site (2) can be saved as a site template.
2408
+
2409
+ A feature that creates content which is not compatible for a site template can set this value to false to
2410
+ stop users of this site (2) from generating an invalid site template.
2411
+
2412
+ A feature ought to never set this value to true when it is deactivated or at any other time since another
2413
+ feature might have created content that is not compatible in a site template.
2414
+
2415
+ Setting this value to false, if it was true, will result in a site template that is not supported.
2416
+ """
2417
+ return self.properties.get("SaveSiteAsTemplateEnabled", None)
2418
+
2419
+ @property
2420
+ def search_box_in_navbar(self):
2421
+ # type: () -> Optional[int]
2422
+ """Gets the e-mail address to which requests for access are sent."""
2423
+ return self.properties.get("SearchBoxInNavBar", None)
2424
+
2425
+ @property
2426
+ def search_box_placeholder_text(self):
2427
+ # type: () -> Optional[str]
2428
+ """Gets the placeholder text in SharePoint online search box for a given (sub) site."""
2429
+ return self.properties.get("SearchBoxPlaceholderText", None)
2430
+
2317
2431
  @property
2318
2432
  def navigation(self):
2319
2433
  """Specifies the navigation structure on the site (2), including the Quick Launch area and the link bar."""
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class WorkflowDefinition(Entity):
5
+ """Represents a workflow definition and associated properties."""
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.listitems.listitem import ListItem
2
+
3
+
4
+ class SPWorkflowTask(ListItem):
5
+ """ """
@@ -1,9 +1,32 @@
1
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
1
2
  from office365.sharepoint.entity import Entity
3
+ from office365.sharepoint.entity_collection import EntityCollection
4
+ from office365.sharepoint.workflow.definition import WorkflowDefinition
2
5
 
3
6
 
4
7
  class WorkflowDeploymentService(Entity):
5
8
  """"""
6
9
 
10
+ def get_definition(self, definition_id):
11
+ """Returns a WorkflowDefinition from the workflow store."""
12
+ return_type = WorkflowDefinition(self.context)
13
+ payload = {"definitionId": definition_id}
14
+ qry = ServiceOperationQuery(
15
+ self, "GetDefinition", None, payload, None, return_type
16
+ )
17
+ self.context.add_query(qry)
18
+ return return_type
19
+
20
+ def enumerate_definitions(self, published_only=False):
21
+ """Returns the WorkflowDefinition objects from the workflow store that match the specified parameters."""
22
+ return_type = EntityCollection(self.context, WorkflowDefinition)
23
+ payload = {"publishedOnly": published_only}
24
+ qry = ServiceOperationQuery(
25
+ self, "EnumerateDefinitions", None, payload, None, return_type
26
+ )
27
+ self.context.add_query(qry)
28
+ return return_type
29
+
7
30
  @property
8
31
  def entity_type_name(self):
9
32
  return "SP.WorkflowServices.WorkflowDeploymentService"
@@ -17,6 +17,9 @@ class SubscriptionCollection(EntityCollection[Subscription]):
17
17
  expiration,
18
18
  client_state=None,
19
19
  latest_supported_tls_version=None,
20
+ include_resource_data=None,
21
+ encryption_certificate=None,
22
+ encryption_certificate_id=None,
20
23
  ):
21
24
  """
22
25
  Subscribes a listener application to receive change notifications when the requested type of changes occur
@@ -34,6 +37,16 @@ class SubscriptionCollection(EntityCollection[Subscription]):
34
37
  :param str latest_supported_tls_version: Specifies the latest version of Transport Layer Security (TLS) that
35
38
  the notification endpoint, specified by notificationUrl, supports.
36
39
  The possible values are: v1_0, v1_1, v1_2, v1_3.
40
+ :param bool include_resource_data: Indicates whether the resource data for the resource that generated the
41
+ change notification should be included in the payload of the notification.
42
+ :param str encryption_certificate: Specifies the public key certificate which contains only the public key
43
+ that Microsoft Graph uses to encrypt the resource data it returns to your app. For security, Microsoft
44
+ Graph encrypts the resource data returned in a rich notification. You must provide a public encryption
45
+ key as part of creating the subscription.
46
+ :param str encryption_certificate_id: Specifies the identifier of the certificate used to encrypt the content
47
+ of the change notification. Use this ID to match in each change notification, which certificate to use
48
+ for decryption.
49
+ :return: Subscription
37
50
  """
38
51
  return_type = Subscription(self.context)
39
52
  self.add_child(return_type)
@@ -44,6 +57,9 @@ class SubscriptionCollection(EntityCollection[Subscription]):
44
57
  "expirationDateTime": expiration.isoformat() + "Z",
45
58
  "clientState": client_state,
46
59
  "latestSupportedTlsVersion": latest_supported_tls_version,
60
+ "includeResourceData": include_resource_data,
61
+ "encryptionCertificate": encryption_certificate,
62
+ "encryptionCertificateId": encryption_certificate_id,
47
63
  }
48
64
  qry = CreateEntityQuery(self, payload, return_type)
49
65
  self.context.add_query(qry)
@@ -5,9 +5,9 @@ class TeamMemberSettings(ClientValue):
5
5
  """Settings to configure whether members can perform certain actions, for example, create channels and add bots,
6
6
  in the team."""
7
7
 
8
- def __init__(self):
8
+ def __init__(self, allow_create_update_channels=None):
9
9
  super(TeamMemberSettings, self).__init__()
10
- self.allowCreateUpdateChannels = True
10
+ self.allowCreateUpdateChannels = allow_create_update_channels
11
11
  self.allowDeleteChannels = True
12
12
  self.allowAddRemoveApps = True
13
13
  self.allowCreateUpdateRemoveTabs = True
@@ -1,11 +0,0 @@
1
- from office365.sharepoint.entity import Entity
2
-
3
-
4
- class DocumentsSharedWithGroup(Entity):
5
- """
6
- Provides methods for working with a list that shares documents with a SharePoint Group on the user's personal site.
7
- """
8
-
9
- @property
10
- def entity_type_name(self):
11
- return "Microsoft.SharePoint.Portal.UserProfiles.DocumentsSharedWithGroup"
@@ -1,23 +0,0 @@
1
- from office365.runtime.paths.resource_path import ResourcePath
2
- from office365.runtime.queries.service_operation import ServiceOperationQuery
3
- from office365.sharepoint.entity import Entity
4
-
5
-
6
- class SPOWebAppServicePrincipal(Entity):
7
- def __init__(self, context):
8
- stat_path = ResourcePath(
9
- "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal"
10
- )
11
- super(SPOWebAppServicePrincipal, self).__init__(context, stat_path)
12
-
13
- def update_spfx_client_secret(self, secret_value):
14
- """
15
- :param str secret_value:
16
- """
17
- payload = {"secretValue": secret_value}
18
- qry = ServiceOperationQuery(self, "UpdateSpfxClientSecret", None, payload)
19
- self.context.add_query(qry)
20
-
21
- @property
22
- def entity_type_name(self):
23
- return "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal"