Office365-REST-Python-Client 2.6.0__py3-none-any.whl → 2.6.2__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 (234) hide show
  1. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +20 -29
  2. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +233 -156
  3. office365/admin/people_settings.py +16 -0
  4. office365/admin/sharepoint_settings.py +50 -1
  5. office365/admin/sharing_capabilities.py +2 -0
  6. office365/communications/calls/participant.py +6 -0
  7. office365/communications/onlinemeetings/broadcast_settings.py +5 -0
  8. office365/communications/onlinemeetings/collection.py +29 -0
  9. office365/communications/onlinemeetings/online_meeting.py +1 -1
  10. office365/communications/onlinemeetings/recordings/call.py +5 -0
  11. office365/communications/onlinemeetings/restricted.py +5 -0
  12. office365/directory/applications/collection.py +11 -0
  13. office365/directory/audit/directory.py +31 -0
  14. office365/directory/audit/signins/signin.py +14 -0
  15. office365/directory/audit/target_resource.py +5 -0
  16. office365/directory/authentication/conditions/conditions.py +5 -1
  17. office365/directory/datapolicy/operation.py +39 -0
  18. office365/directory/directory.py +13 -0
  19. office365/directory/identitygovernance/accessreview/instance.py +29 -0
  20. office365/directory/identitygovernance/accessreview/stage.py +13 -0
  21. office365/directory/identitygovernance/accessreview/stages.py +11 -0
  22. office365/directory/identitygovernance/appconsent/request.py +9 -0
  23. office365/directory/identitygovernance/privilegedaccess/group.py +1 -1
  24. office365/directory/identitygovernance/privilegedaccess/schedule/__init__.py +0 -0
  25. office365/directory/identitygovernance/privilegedaccess/{group_assignment_schedule_instance.py → schedule/group_assignment_instance.py} +1 -1
  26. office365/directory/identitygovernance/privilegedaccess/schedule/schedule.py +6 -0
  27. office365/directory/insights/trending.py +25 -0
  28. office365/directory/licenses/assignment_state.py +5 -5
  29. office365/directory/licenses/details.py +6 -0
  30. office365/directory/permissions/scoped_role_membership.py +8 -0
  31. office365/directory/policies/applied_conditional_access.py +31 -0
  32. office365/directory/policies/feature_rollout.py +24 -0
  33. office365/directory/protection/information.py +73 -2
  34. office365/directory/protection/riskyusers/collection.py +1 -1
  35. office365/directory/protection/threatassessment/requests/__init__.py +0 -0
  36. office365/directory/protection/threatassessment/{email_file_request.py → requests/email_file.py} +9 -1
  37. office365/directory/protection/threatassessment/requests/file.py +10 -0
  38. office365/directory/protection/threatassessment/{mail_request.py → requests/mail.py} +1 -1
  39. office365/directory/protection/threatassessment/requests/url.py +9 -0
  40. office365/directory/rolemanagement/app_scope.py +14 -0
  41. office365/directory/rolemanagement/application.py +3 -2
  42. office365/directory/rolemanagement/role.py +15 -0
  43. office365/directory/rolemanagement/unifiedrole/__init__.py +0 -0
  44. office365/directory/rolemanagement/{unified_role_assignment.py → unifiedrole/assignment.py} +37 -1
  45. office365/directory/rolemanagement/{unified_role_definition.py → unifiedrole/definition.py} +6 -1
  46. office365/directory/security/alerts/file_security_state.py +5 -0
  47. office365/directory/security/attacksimulations/automation.py +8 -0
  48. office365/directory/security/attacksimulations/automation_run.py +8 -0
  49. office365/directory/security/attacksimulations/repeat_offender.py +7 -0
  50. office365/directory/security/attacksimulations/report.py +2 -2
  51. office365/directory/security/attacksimulations/user.py +5 -0
  52. office365/directory/security/incidents/incident.py +6 -1
  53. office365/directory/security/security.py +5 -0
  54. office365/directory/subscriptions/__init__.py +0 -0
  55. office365/directory/subscriptions/company.py +7 -0
  56. office365/directory/synchronization/progress.py +12 -0
  57. office365/directory/users/activities/activity.py +10 -1
  58. office365/directory/users/settings.py +51 -1
  59. office365/directory/users/storage.py +5 -0
  60. office365/directory/users/user.py +114 -3
  61. office365/entity_collection.py +21 -0
  62. office365/onedrive/contenttypes/collection.py +2 -0
  63. office365/onedrive/driveitems/driveItem.py +3 -2
  64. office365/onedrive/driveitems/publication_facet.py +6 -1
  65. office365/onedrive/filestorage/container.py +22 -0
  66. office365/onedrive/filestorage/container_collection.py +37 -0
  67. office365/onedrive/filestorage/file_storage.py +4 -4
  68. office365/onedrive/listitems/collection.py +38 -0
  69. office365/onedrive/lists/list.py +3 -5
  70. office365/onedrive/sitepages/base.py +8 -0
  71. office365/onedrive/sitepages/collection.py +8 -2
  72. office365/onedrive/sitepages/site_page.py +13 -2
  73. office365/onedrive/sites/site.py +1 -1
  74. office365/onedrive/workbooks/charts/title.py +12 -0
  75. office365/onedrive/workbooks/charts/title_format.py +5 -0
  76. office365/onedrive/workbooks/functions/functions.py +16 -0
  77. office365/onedrive/workbooks/ranges/border.py +30 -0
  78. office365/onedrive/workbooks/ranges/font.py +39 -0
  79. office365/onedrive/workbooks/ranges/range.py +6 -0
  80. office365/onedrive/workbooks/worksheets/protection_options.py +34 -5
  81. office365/outlook/calendar/events/event.py +57 -0
  82. office365/outlook/mail/automatic_replies_mailtips.py +20 -0
  83. office365/outlook/mail/folders/folder.py +3 -4
  84. office365/outlook/mail/messages/message.py +21 -4
  85. office365/outlook/mail/messages/rules/collection.py +26 -0
  86. office365/outlook/mail/tips/__init__.py +0 -0
  87. office365/outlook/mail/tips/error.py +5 -0
  88. office365/outlook/mail/tips/tips.py +41 -0
  89. office365/outlook/people/__init__.py +0 -0
  90. office365/outlook/people/profile_card_property.py +15 -0
  91. office365/outlook/person.py +7 -0
  92. office365/planner/category_descriptions.py +6 -0
  93. office365/planner/external_references.py +7 -0
  94. office365/planner/planner.py +4 -4
  95. office365/planner/plans/container.py +12 -0
  96. office365/planner/plans/details.py +31 -0
  97. office365/planner/tasks/collection.py +37 -0
  98. office365/planner/tasks/task.py +24 -0
  99. office365/planner/tasks/task_details.py +34 -1
  100. office365/planner/user_ids.py +8 -0
  101. office365/reports/internal/queries/create_report_query.py +12 -3
  102. office365/reports/root.py +61 -2
  103. office365/runtime/auth/authentication_context.py +10 -1
  104. office365/runtime/auth/providers/saml_token_provider.py +5 -13
  105. office365/runtime/auth/sts_profile.py +35 -18
  106. office365/runtime/client_object.py +1 -1
  107. office365/runtime/client_object_collection.py +3 -5
  108. office365/runtime/client_result.py +3 -3
  109. office365/runtime/client_runtime_context.py +2 -2
  110. office365/runtime/odata/json_format.py +14 -3
  111. office365/runtime/odata/request.py +1 -3
  112. office365/runtime/odata/v3/json_light_format.py +18 -0
  113. office365/runtime/odata/v4/json_format.py +19 -0
  114. office365/runtime/queries/client_query.py +13 -8
  115. office365/runtime/queries/create_entity.py +7 -5
  116. office365/runtime/queries/delete_entity.py +6 -2
  117. office365/runtime/queries/function.py +3 -4
  118. office365/runtime/queries/read_entity.py +3 -5
  119. office365/runtime/queries/service_operation.py +2 -7
  120. office365/search/acronyms/__init__.py +0 -0
  121. office365/search/answer.py +35 -0
  122. office365/search/bookmarks/__init__.py +0 -0
  123. office365/search/bookmarks/bookmark.py +7 -0
  124. office365/search/entity.py +81 -2
  125. office365/search/entity_type.py +6 -1
  126. office365/search/external/item.py +5 -0
  127. office365/search/identity_set.py +11 -0
  128. office365/search/qnas/__init__.py +0 -0
  129. office365/search/qnas/qna.py +9 -0
  130. office365/sharepoint/activities/client_response.py +2 -2
  131. office365/sharepoint/apps/launcher.py +9 -0
  132. office365/sharepoint/brandcenter/brand_center.py +26 -0
  133. office365/sharepoint/client_context.py +19 -1
  134. office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
  135. office365/sharepoint/compliance/store_proxy.py +75 -0
  136. office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
  137. office365/sharepoint/copilot/file_metadata.py +5 -0
  138. office365/sharepoint/fields/builtin_field_id.py +8 -0
  139. office365/sharepoint/files/collection.py +10 -0
  140. office365/sharepoint/files/file.py +24 -3
  141. office365/sharepoint/listitems/listitem.py +61 -3
  142. office365/sharepoint/lists/exporter.py +1 -0
  143. office365/sharepoint/lists/list.py +37 -3
  144. office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
  145. office365/sharepoint/migrationcenter/common/task.py +8 -0
  146. office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
  147. office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
  148. office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
  149. office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
  150. office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
  151. office365/sharepoint/migrationcenter/service/services.py +13 -1
  152. office365/sharepoint/migrationcenter/service/teams.py +11 -0
  153. office365/sharepoint/navigation/node.py +7 -16
  154. office365/sharepoint/policy/license_utilities.py +1 -0
  155. office365/sharepoint/portal/groups/creation_context.py +11 -0
  156. office365/sharepoint/portal/groups/service.py +1 -1
  157. office365/sharepoint/portal/groups/site_manager.py +1 -1
  158. office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
  159. office365/sharepoint/publishing/pages/3d/types.py +5 -0
  160. office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
  161. office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
  162. office365/sharepoint/publishing/pages/campaign/types.py +18 -0
  163. office365/sharepoint/publishing/pages/coauth_state.py +20 -0
  164. office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
  165. office365/sharepoint/publishing/pages/metadata.py +0 -10
  166. office365/sharepoint/publishing/pages/page.py +29 -0
  167. office365/sharepoint/publishing/pages/service.py +27 -6
  168. office365/sharepoint/publishing/pages/topics/collection.py +1 -1
  169. office365/sharepoint/request.py +6 -2
  170. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
  171. office365/sharepoint/sharing/access_request_settings.py +18 -0
  172. office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
  173. office365/sharepoint/sharing/information.py +2 -0
  174. office365/sharepoint/sharing/links/partial_success_response.py +4 -0
  175. office365/sharepoint/sites/azure_container_Info.py +4 -1
  176. office365/sharepoint/sites/brand_center_configuration.py +5 -0
  177. office365/sharepoint/sites/manager/__init__.py +0 -0
  178. office365/sharepoint/sites/manager/service.py +34 -0
  179. office365/sharepoint/sites/manager/types.py +5 -0
  180. office365/sharepoint/sites/site.py +54 -0
  181. office365/sharepoint/sites/themes.py +5 -0
  182. office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
  183. office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
  184. office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
  185. office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
  186. office365/sharepoint/tenant/administration/group.py +34 -0
  187. office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
  188. office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
  189. office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
  190. office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
  191. office365/sharepoint/tenant/administration/tenant.py +182 -5
  192. office365/sharepoint/userprofiles/people_manager.py +3 -1
  193. office365/sharepoint/utilities/utility.py +16 -0
  194. office365/sharepoint/webparts/definition.py +26 -0
  195. office365/sharepoint/webparts/limited_manager.py +53 -0
  196. office365/sharepoint/webparts/webpart.py +47 -0
  197. office365/sharepoint/webs/regional_settings.py +27 -0
  198. office365/sharepoint/webs/web.py +20 -1
  199. office365/teams/apps/app.py +17 -0
  200. office365/teams/apps/authorization.py +16 -0
  201. office365/teams/apps/permission_set.py +14 -0
  202. office365/teams/apps/resource_specific_permission.py +5 -0
  203. office365/teams/chats/chat.py +60 -0
  204. office365/teams/chats/messages/message.py +17 -0
  205. office365/teams/chats/type.py +13 -0
  206. office365/teams/chats/viewpoint.py +5 -0
  207. office365/teams/fun_settings.py +14 -2
  208. office365/teams/info.py +1 -1
  209. office365/teams/schedule/entity.py +3 -0
  210. office365/teams/schedule/shifts/item.py +1 -0
  211. office365/teams/schedule/shifts/offer/request.py +41 -1
  212. office365/teams/teamwork/activity_topic.py +5 -0
  213. office365/teams/teamwork/online_meeting_info.py +21 -0
  214. office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
  215. office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
  216. office365/teams/teamwork/user.py +48 -1
  217. office365/teams/teamwork/user_identity.py +5 -0
  218. office365/teams/viva/community.py +13 -0
  219. office365/teams/viva/employee_experience.py +27 -0
  220. office365/teams/viva/employee_experience_user.py +16 -0
  221. office365/teams/viva/learning/courses/self_initiated.py +5 -0
  222. office365/todo/attachments/task_file.py +3 -0
  223. office365/todo/checklist_item.py +11 -0
  224. office365/todo/tasks/list.py +11 -0
  225. office365/todo/tasks/task.py +31 -0
  226. office365/outlook/mail/tips.py +0 -17
  227. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
  228. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
  229. {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
  230. /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
  231. /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
  232. /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
  233. /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
  234. /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
@@ -8,6 +8,17 @@ class WebPartDefinition(Entity):
8
8
  """Represents a Web Part on a Web Part Page. Provides operations for moving, deleting, and changing the state of
9
9
  the Web Part."""
10
10
 
11
+ def close_web_part(self):
12
+ """
13
+ Closes the Web Part. If the Web Part is already closed, this method does nothing.
14
+
15
+ If the current user does not have permissions to modify the Web Part,
16
+ the server MUST ignore the call to this method.
17
+ """
18
+ qry = ServiceOperationQuery(self, "CloseWebPart")
19
+ self.context.add_query(qry)
20
+ return self
21
+
11
22
  def delete_web_part(self):
12
23
  """
13
24
  Deletes the Web Part from the page.
@@ -18,6 +29,21 @@ class WebPartDefinition(Entity):
18
29
  self.context.add_query(qry)
19
30
  return self
20
31
 
32
+ def save_web_part_changes(self):
33
+ """
34
+ Saves changes to the Web Part made by using other properties and methods on the WebPartDefinition object (1).
35
+
36
+ If the current user does not have permissions to modify the Web Part,
37
+ the protocol server MUST ignore the call to this method.
38
+ """
39
+ qry = ServiceOperationQuery(self, "SaveWebPartChanges")
40
+ self.context.add_query(qry)
41
+ return self
42
+
43
+ @property
44
+ def id(self):
45
+ return self.properties.get("Id", None)
46
+
21
47
  @property
22
48
  def web_part(self):
23
49
  """The WebPart object, as specified in section 3.2.5.148, associated with this WebPartDefinition.
@@ -1,5 +1,8 @@
1
+ from office365.runtime.client_result import ClientResult
1
2
  from office365.runtime.paths.resource_path import ResourcePath
3
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
2
4
  from office365.sharepoint.entity import Entity
5
+ from office365.sharepoint.webparts.definition import WebPartDefinition
3
6
  from office365.sharepoint.webparts.definition_collection import (
4
7
  WebPartDefinitionCollection,
5
8
  )
@@ -9,6 +12,56 @@ class LimitedWebPartManager(Entity):
9
12
  """Provides operations to access and modify the existing Web Parts on a Web Part Page, and add new ones
10
13
  to the Web Part Page."""
11
14
 
15
+ def export_web_part(self, web_part):
16
+ # type: (str or WebPartDefinition) -> ClientResult[str]
17
+ """Exports the specified Web Part, given its ID.
18
+ :param str or WebPartDefinition web_part: The WebPartDefinition or Id of the Web Part to export.
19
+ """
20
+ return_type = ClientResult(self.context, str())
21
+ self.web_parts.add_child(return_type)
22
+
23
+ def _export_web_part(web_part_id):
24
+ # type: (str) -> None
25
+ params = {"webPartId": web_part_id}
26
+ qry = ServiceOperationQuery(
27
+ self, "ExportWebPart", params, None, None, return_type
28
+ )
29
+ self.context.add_query(qry)
30
+
31
+ if isinstance(web_part, WebPartDefinition):
32
+
33
+ def _web_part_loaded():
34
+ _export_web_part(web_part.id)
35
+
36
+ web_part.ensure_property("Id", _web_part_loaded)
37
+ else:
38
+ _export_web_part(web_part)
39
+
40
+ return return_type
41
+
42
+ def import_web_part(self, web_part_xml):
43
+ """
44
+ Imports a Web Part from a string in the .dwp format as specified in [MS-WPPS] section 2.2.4.2,
45
+ or the .webpart format as specified in [MS-WPPS] section 2.2.3.1.
46
+ After importing, the Web Part is not added to a Web Part Page. To add a Web Part to a Web Part Page,
47
+ use AddWebPart, supplying the object (1) returned by this method.
48
+ A reference to the added SP.WebParts.WebPartDefinition is returned.
49
+
50
+ When Scope is User, the current user MUST have permissions to add and delete personalized Web Parts.
51
+ When Scope is Shared, the current user MUST have permissions to customize pages.
52
+
53
+ :param str web_part_xml: The Web Part markup to import.
54
+ """
55
+ return_type = WebPartDefinition(self.context)
56
+ self.web_parts.add_child(return_type)
57
+ payload = {"webPartXml": web_part_xml}
58
+ qry = ServiceOperationQuery(
59
+ self, "ImportWebPart", None, payload, None, return_type
60
+ )
61
+ self.context.add_query(qry)
62
+ return return_type
63
+
64
+ @property
12
65
  def web_parts(self):
13
66
  """A collection of the Web Parts on the Web Part Page available to the current user based
14
67
  on the current user’s permissions."""
@@ -9,6 +9,53 @@ class WebPart(Entity):
9
9
  It has a standard property schema and displays that content in a cohesive unit on a webpage. See also Web Parts Page
10
10
  """
11
11
 
12
+ def __str__(self):
13
+ return self.title or self.entity_type_name
14
+
15
+ @property
16
+ def export_mode(self):
17
+ # type: () -> Optional[int]
18
+ """
19
+ Gets or sets the export mode of a Web Part.
20
+ """
21
+ return self.properties.get("ExportMode", None)
22
+
23
+ @property
24
+ def hidden(self):
25
+ # type: () -> Optional[bool]
26
+ """
27
+ Specifies whether a Web Part is displayed on a Web Part Page.
28
+
29
+ If "true", the Web Part MUST be hidden. Web Parts that are hidden MUST NOT be displayed on the page to
30
+ the end user, but SHOULD still participate normally in the rendering of the page. The default value is "false".
31
+ """
32
+ return self.properties.get("Hidden", None)
33
+
34
+ @property
35
+ def title(self):
36
+ # type: () -> Optional[str]
37
+ """
38
+ Specifies the title of a Web Part.
39
+
40
+ If this property is set to NULL, the title of the Web Part MUST instead be reset to its default value if one
41
+ is specified in the Web Part's definition.
42
+ """
43
+ return self.properties.get("Title", None)
44
+
45
+ @property
46
+ def title_url(self):
47
+ # type: () -> Optional[str]
48
+ """
49
+ Specifies a URL to the supplemental information about a Web Part.
50
+
51
+ If this property is set to NULL, the title URL of the Web Part MUST instead be reset to its default value
52
+ if one is specified in the Web Part's definition.
53
+
54
+ The value of this property SHOULD be a valid URL, but the protocol server MAY accept other strings
55
+ without validating them.
56
+ """
57
+ return self.properties.get("TitleUrl", None)
58
+
12
59
  @property
13
60
  def zone_index(self):
14
61
  # type: () -> Optional[int]
@@ -96,6 +96,33 @@ class RegionalSettings(Entity):
96
96
  Specifies which week of a year is considered the first week."""
97
97
  return self.properties.get("FirstWeekOfYear", None)
98
98
 
99
+ @property
100
+ def is_east_asia(self):
101
+ # type: () -> Optional[bool]
102
+ """Returns "true" if the web locale is an East Asia locale; "false" otherwise."""
103
+ return self.properties.get("IsEastAsia", None)
104
+
105
+ @property
106
+ def is_right_to_left(self):
107
+ # type: () -> Optional[bool]
108
+ """Specifies whether the site uses a right-to-left language. If it uses a right-to-left language,
109
+ this value MUST be "true". Otherwise, this value MUST be "false"."""
110
+ return self.properties.get("IsRightToLeft", None)
111
+
112
+ @property
113
+ def is_ui_right_to_left(self):
114
+ # type: () -> Optional[bool]
115
+ """Specifies whether the UI of the site (2) uses a right-to-left language. If it uses a right-to-left language,
116
+ this value MUST be "true". Otherwise, this value MUST be "false"."""
117
+ return self.properties.get("IsUIRightToLeft", None)
118
+
119
+ @property
120
+ def list_separator(self):
121
+ # type: () -> Optional[str]
122
+ """Specifies the separator that is used for lists on the server. For example, if the separator is ",",
123
+ items in a list will appear as "1,2,3,4"."""
124
+ return self.properties.get("ListSeparator", None)
125
+
99
126
  @property
100
127
  def locale_id(self):
101
128
  # type: () -> Optional[int]
@@ -190,6 +190,20 @@ class Web(SecurableObject):
190
190
  self.ensure_properties(["AccessRequestListUrl"], _get_access_request_list)
191
191
  return return_type
192
192
 
193
+ def get_adaptive_card_extensions(self, include_errors=None, project=None):
194
+ payload = {
195
+ "includeErrors": include_errors,
196
+ "project": project,
197
+ }
198
+ return_type = ClientResult(
199
+ self.context, ClientValueCollection(SPClientSideComponentQueryResult)
200
+ )
201
+ qry = ServiceOperationQuery(
202
+ self, "GetAdaptiveCardExtensions", None, payload, None, return_type
203
+ )
204
+ self.context.add_query(qry)
205
+ return return_type
206
+
193
207
  def get_document_by_doc_id(self, doc_id):
194
208
  """ """
195
209
  return_type = ClientResult(self.context)
@@ -252,7 +266,7 @@ class Web(SecurableObject):
252
266
  """
253
267
  if view_xml is None:
254
268
  view_xml = "<View><Query></Query></View>"
255
- return_type = ClientResult(self.context, dict())
269
+ return_type = ClientResult(self.context, {})
256
270
 
257
271
  def _get_list_data_as_stream():
258
272
  list_abs_url = self.url + path
@@ -947,6 +961,7 @@ class Web(SecurableObject):
947
961
  return return_type
948
962
 
949
963
  def get_file_by_server_relative_url(self, server_relative_url):
964
+ # type: (str) -> File
950
965
  """
951
966
  Returns the file object located at the specified server-relative URL, for example:
952
967
  - "/sites/MySite/Shared Documents/MyDocument.docx"
@@ -964,6 +979,7 @@ class Web(SecurableObject):
964
979
  )
965
980
 
966
981
  def get_file_by_server_relative_path(self, path):
982
+ # type: (str) -> File
967
983
  """Returns the file object located at the specified server-relative path, for example:
968
984
  - "/sites/MySite/Shared Documents/MyDocument.docx"
969
985
  - "Shared Documents/MyDocument.docx"
@@ -981,6 +997,7 @@ class Web(SecurableObject):
981
997
  )
982
998
 
983
999
  def get_folder_by_server_relative_url(self, url):
1000
+ # type: (str) -> Folder
984
1001
  """Returns the folder object located at the specified server-relative URL.
985
1002
 
986
1003
  :param str url: Specifies the server-relative URL for the folder.
@@ -994,6 +1011,7 @@ class Web(SecurableObject):
994
1011
  )
995
1012
 
996
1013
  def get_folder_by_server_relative_path(self, decoded_url):
1014
+ # type: (str) -> Folder
997
1015
  """Returns the folder object located at the specified server-relative URL, for example:
998
1016
  - "/sites/MySite/Shared Documents"
999
1017
  - "Shared Documents"
@@ -2673,6 +2691,7 @@ class Web(SecurableObject):
2673
2691
  "SiteGroups": self.site_groups,
2674
2692
  "SiteUsers": self.site_users,
2675
2693
  "SiteUserInfoList": self.site_user_info_list,
2694
+ "SupportedUILanguageIds": self.supported_ui_language_ids,
2676
2695
  "TenantAppCatalog": self.tenant_app_catalog,
2677
2696
  "TitleResource": self.title_resource,
2678
2697
  "UserCustomActions": self.user_custom_actions,
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.entity import Entity
2
4
  from office365.entity_collection import EntityCollection
3
5
  from office365.runtime.paths.resource_path import ResourcePath
@@ -7,6 +9,21 @@ from office365.teams.apps.definition import TeamsAppDefinition
7
9
  class TeamsApp(Entity):
8
10
  """Represents an app in the Microsoft Teams app catalog."""
9
11
 
12
+ def __str__(self):
13
+ return self.display_name or self.entity_type_name
14
+
15
+ @property
16
+ def display_name(self):
17
+ # type: () -> Optional[str]
18
+ """The title of the TeamsApp."""
19
+ return self.properties.get("displayName", None)
20
+
21
+ @property
22
+ def distribution_method(self):
23
+ # type: () -> Optional[str]
24
+ """The title of the TeamsApp."""
25
+ return self.properties.get("distributionMethod", None)
26
+
10
27
  @property
11
28
  def app_definitions(self):
12
29
  # type: () -> EntityCollection[TeamsAppDefinition]
@@ -0,0 +1,16 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.teams.apps.permission_set import TeamsAppPermissionSet
3
+
4
+
5
+ class TeamsAppAuthorization(ClientValue):
6
+ """The authorization details of a teamsApp."""
7
+
8
+ def __init__(
9
+ self, client_app_id=None, required_permission_set=TeamsAppPermissionSet()
10
+ ):
11
+ """
12
+ :param str client_app_id: The registration ID of the Microsoft Entra app ID associated with the teamsApp.
13
+ :param TeamsAppPermissionSet required_permission_set: Set of permissions required by the teamsApp.
14
+ """
15
+ self.clientAppId = client_app_id
16
+ self.requiredPermissionSet = required_permission_set
@@ -0,0 +1,14 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.teams.apps.resource_specific_permission import (
4
+ TeamsAppResourceSpecificPermission,
5
+ )
6
+
7
+
8
+ class TeamsAppPermissionSet(ClientValue):
9
+ """Set of required/granted permissions that can be associated with a Teams app."""
10
+
11
+ def __init__(self, resource_specific_permissions=None):
12
+ self.resourceSpecificPermissions = ClientValueCollection(
13
+ TeamsAppResourceSpecificPermission, resource_specific_permissions
14
+ )
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TeamsAppResourceSpecificPermission(ClientValue):
5
+ """Represents the resource-specific permission associated with a teamsApp."""
@@ -1,24 +1,81 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
1
4
  from office365.entity import Entity
2
5
  from office365.entity_collection import EntityCollection
3
6
  from office365.runtime.paths.resource_path import ResourcePath
4
7
  from office365.teams.apps.installation import TeamsAppInstallation
5
8
  from office365.teams.chats.messages.info import ChatMessageInfo
6
9
  from office365.teams.chats.messages.message import ChatMessage
10
+ from office365.teams.chats.viewpoint import ChatViewpoint
7
11
  from office365.teams.members.conversation_collection import ConversationMemberCollection
8
12
  from office365.teams.operations.async_operation import TeamsAsyncOperation
9
13
  from office365.teams.tabs.tab import TeamsTab
14
+ from office365.teams.teamwork.online_meeting_info import TeamworkOnlineMeetingInfo
10
15
 
11
16
 
12
17
  class Chat(Entity):
13
18
  """A chat is a collection of chatMessages between one or more participants. Participants can be users or apps."""
14
19
 
20
+ @property
21
+ def chat_type(self):
22
+ # type: () -> Optional[str]
23
+ """Specifies the type of chat. Possible values are: group, oneOnOne, meeting, unknownFutureValue."""
24
+ return self.properties.get("chatType", None)
25
+
26
+ @property
27
+ def created_datetime(self):
28
+ """Date and time at which the chat was created."""
29
+ return self.properties.get("createdDateTime", datetime.min)
30
+
31
+ @property
32
+ def is_hidden_for_all_members(self):
33
+ # type: () -> Optional[bool]
34
+ """Indicates whether the chat is hidden for all its members."""
35
+ return self.properties.get("isHiddenForAllMembers", None)
36
+
37
+ @property
38
+ def last_updated_datetime(self):
39
+ # type: () -> Optional[datetime]
40
+ """Date and time at which the chat was renamed or the list of members was last changed."""
41
+ return self.properties.get("lastUpdatedDateTime", datetime.min)
42
+
43
+ @property
44
+ def online_meeting_info(self):
45
+ # type: () -> TeamworkOnlineMeetingInfo
46
+ """Represents details about an online meeting. If the chat isn't associated with an online meeting,
47
+ the property is empty. Read-only."""
48
+ return self.properties.get("onlineMeetingInfo", TeamworkOnlineMeetingInfo())
49
+
50
+ @property
51
+ def tenant_id(self):
52
+ # type: () -> Optional[str]
53
+ """The identifier of the tenant in which the chat was created. Read-only."""
54
+ return self.properties.get("tenantId", None)
55
+
15
56
  @property
16
57
  def topic(self):
58
+ # type: () -> Optional[str]
17
59
  """(Optional) Subject or topic for the chat. Only available for group chats."""
18
60
  return self.properties.get("topic", None)
19
61
 
62
+ @property
63
+ def viewpoint(self):
64
+ # type: () -> ChatViewpoint
65
+ """Represents caller-specific information about the chat, such as the last message read date and time.
66
+ This property is populated only when the request is made in a delegated context.
67
+ """
68
+ return self.properties.get("viewpoint", ChatViewpoint())
69
+
70
+ @property
71
+ def web_url(self):
72
+ # type: () -> Optional[str]
73
+ """The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed."""
74
+ return self.properties.get("webUrl", None)
75
+
20
76
  @property
21
77
  def installed_apps(self):
78
+ # type: () -> EntityCollection[TeamsAppInstallation]
22
79
  """A collection of all the apps in the chat. Nullable."""
23
80
  return self.properties.get(
24
81
  "installedApps",
@@ -90,8 +147,11 @@ class Chat(Entity):
90
147
  def get_property(self, name, default_value=None):
91
148
  if default_value is None:
92
149
  property_mapping = {
150
+ "createdDateTime": self.created_datetime,
93
151
  "installedApps": self.installed_apps,
94
152
  "lastMessagePreview": self.last_message_preview,
153
+ "lastUpdatedDateTime": self.last_updated_datetime,
154
+ "onlineMeetingInfo": self.online_meeting_info,
95
155
  }
96
156
  default_value = property_mapping.get(name, None)
97
157
  return super(Chat, self).get_property(name, default_value)
@@ -49,6 +49,23 @@ class ChatMessage(Entity):
49
49
  ),
50
50
  )
51
51
 
52
+ @property
53
+ def subject(self):
54
+ # type: () -> Optional[str]
55
+ """
56
+ The subject of the chat message, in plaintext.
57
+ """
58
+ return self.properties.get("subject", None)
59
+
60
+ @property
61
+ def summary(self):
62
+ # type: () -> Optional[str]
63
+ """
64
+ Summary text of the chat message that could be used for push notifications and summary views or
65
+ fall back views. Only applies to channel chat messages, not chat messages in a chat.
66
+ """
67
+ return self.properties.get("summary", None)
68
+
52
69
  @property
53
70
  def web_url(self):
54
71
  # type: () -> Optional[str]
@@ -0,0 +1,13 @@
1
+ class ChatType:
2
+
3
+ oneOnOne = "oneOnOne"
4
+ """Indicates that the chat is a 1:1 chat. The roster size is fixed for this type of chat; members can't be
5
+ removed/added."""
6
+
7
+ group = "group"
8
+ """Indicates that the chat is a group chat. The roster size (of at least two people) can be updated for this
9
+ type of chat. Members can be removed/added later."""
10
+
11
+ meeting = "meeting"
12
+ """Indicates that the chat is associated with an online meeting. This type of chat is only created as
13
+ part of the creation of an online meeting."""
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class ChatViewpoint(ClientValue):
5
+ """"""
@@ -4,9 +4,21 @@ from office365.runtime.client_value import ClientValue
4
4
  class TeamFunSettings(ClientValue):
5
5
  """Settings to configure use of Giphy, memes, and stickers in the team."""
6
6
 
7
- def __init__(self, allow_giphy=True):
7
+ def __init__(
8
+ self,
9
+ allow_custom_memes=None,
10
+ allow_giphy=None,
11
+ allow_stickers_and_memes=None,
12
+ giphy_content_rating=None,
13
+ ):
8
14
  """
9
- :param bool allow_giphy:
15
+ :param bool allow_custom_memes: f set to true, enables users to include custom memes.
16
+ :param bool allow_giphy: If set to true, enables Giphy use.
17
+ :param bool allow_stickers_and_memes: If set to true, enables users to include stickers and memes.
18
+ :param str giphy_content_rating: Giphy content rating. Possible values are: moderate, strict.
10
19
  """
11
20
  super(TeamFunSettings, self).__init__()
21
+ self.allowCustomMemes = allow_custom_memes
12
22
  self.allowGiphy = allow_giphy
23
+ self.allowStickersAndMemes = allow_stickers_and_memes
24
+ self.giphyContentRating = giphy_content_rating
office365/teams/info.py CHANGED
@@ -8,7 +8,7 @@ class TeamInfo(Entity):
8
8
  """Represents a team with basic information."""
9
9
 
10
10
  def __str__(self):
11
- return self.display_name
11
+ return self.display_name or self.entity_type_name
12
12
 
13
13
  @property
14
14
  def display_name(self):
@@ -3,3 +3,6 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class ScheduleEntity(ClientValue):
5
5
  """"""
6
+
7
+ def __init__(self, end_datetime=None):
8
+ self.endDateTime = end_datetime
@@ -12,5 +12,6 @@ class ShiftItem(ScheduleEntity):
12
12
  :param list[ShiftActivity] activities: An incremental part of a shift which can cover details of when and
13
13
  where an employee is during their shift. For example, an assignment or a scheduled break or lunch.
14
14
  """
15
+ super(ShiftItem, self).__init__()
15
16
  self.displayName = display_name
16
17
  self.activities = ClientValueCollection(ShiftActivity, activities)
@@ -1,7 +1,47 @@
1
+ from datetime import datetime
2
+ from typing import Optional
3
+
1
4
  from office365.teams.schedule.change_request import ScheduleChangeRequest
2
5
 
3
6
 
4
7
  class OfferShiftRequest(ScheduleChangeRequest):
5
8
  """Represents a request to offer a shift to another user in the team."""
6
9
 
7
- pass
10
+ @property
11
+ def recipient_action_datetime(self):
12
+ """
13
+ The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
14
+ """
15
+ return self.properties.get("recipientActionDateTime", datetime.min)
16
+
17
+ @property
18
+ def recipient_action_message(self):
19
+ # type: () -> Optional[str]
20
+ """
21
+ Custom message sent by recipient of the offer shift request.
22
+ """
23
+ return self.properties.get("recipientActionMessage", None)
24
+
25
+ @property
26
+ def recipient_user_id(self):
27
+ # type: () -> Optional[str]
28
+ """
29
+ User ID of the recipient of the offer shift request.
30
+ """
31
+ return self.properties.get("recipientUserId", None)
32
+
33
+ @property
34
+ def sender_shift_id(self):
35
+ # type: () -> Optional[str]
36
+ """
37
+ User ID of the sender of the offer shift request.
38
+ """
39
+ return self.properties.get("senderShiftId", None)
40
+
41
+ def get_property(self, name, default_value=None):
42
+ if default_value is None:
43
+ property_mapping = {
44
+ "recipientActionDateTime": self.recipient_action_datetime,
45
+ }
46
+ default_value = property_mapping.get(name, None)
47
+ return super(OfferShiftRequest, self).get_property(name, default_value)
@@ -3,3 +3,8 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class TeamworkActivityTopic(ClientValue):
5
5
  """Represents the topic of an activity feed notification."""
6
+
7
+ def __init__(self, source=None, value=None, web_url=None):
8
+ self.source = source
9
+ self.value = value
10
+ self.webUrl = web_url
@@ -0,0 +1,21 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.teams.teamwork.user_identity import TeamworkUserIdentity
3
+
4
+
5
+ class TeamworkOnlineMeetingInfo(ClientValue):
6
+ """Represents details about an online meeting in Microsoft Teams."""
7
+
8
+ def __init__(
9
+ self,
10
+ calendar_event_id=None,
11
+ join_web_url=None,
12
+ organizer=TeamworkUserIdentity(),
13
+ ):
14
+ """
15
+ :param calendar_event_id: The identifier of the calendar event associated with the meeting.
16
+ :param join_web_url: The URL that users click to join or uniquely identify the meeting.
17
+ :param organizer: The organizer associated with the meeting.
18
+ """
19
+ self.calendarEventId = calendar_event_id
20
+ self.joinWebUrl = join_web_url
21
+ self.organizer = organizer
File without changes
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class UserSolutionRoot(Entity):
5
+ """Represents an identifier that relates a user to the working time schedule triggers."""