Office365-REST-Python-Client 2.5.6__py3-none-any.whl → 2.5.8__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 (147) hide show
  1. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/METADATA +5 -5
  2. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/RECORD +147 -96
  3. office365/communications/onlinemeetings/online_meeting.py +30 -3
  4. office365/communications/onlinemeetings/recordings/__init__.py +0 -0
  5. office365/communications/onlinemeetings/recordings/call.py +5 -0
  6. office365/communications/onlinemeetings/transcripts/__init__.py +0 -0
  7. office365/directory/administrative_unit.py +9 -2
  8. office365/directory/applications/roles/collection.py +5 -1
  9. office365/directory/applications/roles/role.py +1 -1
  10. office365/directory/audit/provisioning/object_summary.py +30 -1
  11. office365/directory/authentication/methods/fido.py +8 -0
  12. office365/directory/authentication/methods/password.py +23 -0
  13. office365/directory/custom_security_attribute_definition.py +7 -0
  14. office365/directory/device_local_credential_info.py +6 -0
  15. office365/directory/directory.py +40 -12
  16. office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
  17. office365/directory/identitygovernance/entitlementmanagement/entitlement_management.py +7 -0
  18. office365/directory/identitygovernance/governance.py +16 -0
  19. office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
  20. office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
  21. office365/directory/insights/resource_reference.py +1 -1
  22. office365/directory/policies/device_registration.py +6 -0
  23. office365/directory/policies/root.py +13 -0
  24. office365/directory/security/threatintelligence/article_indicator.py +7 -0
  25. office365/directory/serviceprincipals/service_principal.py +109 -25
  26. office365/directory/synchronization/schema.py +16 -0
  27. office365/directory/users/user.py +23 -0
  28. office365/graph_client.py +8 -0
  29. office365/onedrive/driveitems/driveItem.py +86 -6
  30. office365/onedrive/driveitems/retention_label.py +25 -0
  31. office365/onedrive/lists/list.py +1 -1
  32. office365/onedrive/sitepages/__init__.py +0 -0
  33. office365/onedrive/sitepages/base.py +29 -0
  34. office365/onedrive/sitepages/canvas_layout.py +43 -0
  35. office365/onedrive/sitepages/collection.py +32 -0
  36. office365/onedrive/sitepages/horizontal_section.py +23 -0
  37. office365/onedrive/sitepages/horizontal_section_column.py +27 -0
  38. office365/onedrive/sitepages/site_page.py +116 -0
  39. office365/onedrive/sitepages/title_area.py +13 -0
  40. office365/onedrive/sitepages/vertical_section.py +27 -0
  41. office365/onedrive/sitepages/web_part.py +5 -0
  42. office365/onedrive/sites/site.py +10 -0
  43. office365/onedrive/workbooks/charts/chart.py +13 -0
  44. office365/onedrive/workbooks/charts/data_labels.py +13 -1
  45. office365/onedrive/workbooks/icon.py +5 -0
  46. office365/onedrive/workbooks/names/named_item.py +6 -0
  47. office365/onedrive/workbooks/ranges/font.py +5 -0
  48. office365/onedrive/workbooks/ranges/format.py +60 -0
  49. office365/onedrive/workbooks/ranges/range.py +12 -0
  50. office365/onedrive/workbooks/ranges/reference.py +6 -0
  51. office365/onedrive/workbooks/sort_field.py +26 -0
  52. office365/onedrive/workbooks/tables/pivot_table_collection.py +16 -0
  53. office365/onedrive/workbooks/tables/sort.py +5 -0
  54. office365/onedrive/workbooks/tables/table.py +57 -0
  55. office365/onedrive/workbooks/worksheets/protection.py +20 -1
  56. office365/onedrive/workbooks/worksheets/protection_options.py +10 -0
  57. office365/onedrive/workbooks/worksheets/worksheet.py +5 -4
  58. office365/outlook/calendar/calendar.py +1 -3
  59. office365/outlook/calendar/events/event.py +45 -0
  60. office365/outlook/calendar/response_status.py +11 -0
  61. office365/outlook/calendar/rooms/room.py +14 -0
  62. office365/outlook/mail/automatic_replies_mailtips.py +5 -0
  63. office365/outlook/mail/conversation.py +1 -3
  64. office365/outlook/mail/folders/folder.py +1 -3
  65. office365/outlook/mail/tips.py +17 -0
  66. office365/planner/plans/plan.py +11 -1
  67. office365/reports/root.py +33 -0
  68. office365/runtime/auth/authentication_context.py +12 -2
  69. office365/runtime/odata/json_format.py +3 -2
  70. office365/runtime/odata/request.py +12 -2
  71. office365/runtime/queries/upload_session.py +5 -0
  72. office365/sharepoint/activities/action_facet.py +17 -0
  73. office365/sharepoint/activities/client_request.py +4 -0
  74. office365/sharepoint/activities/client_response.py +8 -0
  75. office365/sharepoint/activities/entity.py +10 -0
  76. office365/sharepoint/activities/facets/delete.py +1 -0
  77. office365/sharepoint/activities/facets/get_mention.py +10 -0
  78. office365/sharepoint/activities/facets/in_doc.py +4 -0
  79. office365/sharepoint/activities/facets/move.py +14 -0
  80. office365/sharepoint/activities/facets/point_in_time_restore.py +9 -0
  81. office365/sharepoint/activities/facets/revision_set.py +9 -0
  82. office365/sharepoint/activities/facets/task_completed.py +9 -0
  83. office365/sharepoint/activities/facets/version.py +12 -0
  84. office365/sharepoint/activities/identity_item.py +16 -1
  85. office365/sharepoint/alerts/collection.py +2 -1
  86. office365/sharepoint/attachments/attachment.py +6 -9
  87. office365/sharepoint/attachments/collection.py +25 -3
  88. office365/sharepoint/client_context.py +33 -2
  89. office365/sharepoint/comments/collection.py +1 -1
  90. office365/sharepoint/compliance/store_proxy.py +43 -0
  91. office365/sharepoint/contenttypes/content_type.py +13 -1
  92. office365/sharepoint/contenttypes/fieldlinks/collection.py +1 -1
  93. office365/sharepoint/directory/helper.py +2 -0
  94. office365/sharepoint/directory/provider/alternate_id_data.py +9 -0
  95. office365/sharepoint/directory/provider/notification.py +15 -0
  96. office365/sharepoint/directory/provider/object_data.py +14 -0
  97. office365/sharepoint/directory/provider/provider.py +13 -0
  98. office365/sharepoint/entity.py +15 -0
  99. office365/sharepoint/features/collection.py +2 -0
  100. office365/sharepoint/fields/collection.py +4 -3
  101. office365/sharepoint/fields/user_value.py +1 -1
  102. office365/sharepoint/folders/folder.py +3 -5
  103. office365/sharepoint/migrationcenter/deploy_status.py +5 -0
  104. office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
  105. office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
  106. office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
  107. office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
  108. office365/sharepoint/multigeo/move_job_entity_data.py +9 -0
  109. office365/sharepoint/multigeo/site_move_job_entity_data.py +9 -0
  110. office365/sharepoint/multigeo/user_personal_site_location.py +9 -0
  111. office365/sharepoint/permissions/securable_object.py +2 -0
  112. office365/sharepoint/principal/principal.py +2 -4
  113. office365/sharepoint/recyclebin/item.py +107 -7
  114. office365/sharepoint/sharing/information.py +9 -0
  115. office365/sharepoint/sharing/link_info.py +6 -0
  116. office365/sharepoint/sharing/object_sharing_information.py +2 -0
  117. office365/sharepoint/sharing/permission_collection.py +18 -0
  118. office365/sharepoint/sharing/shared_document_info.py +9 -0
  119. office365/sharepoint/sites/script_safe_domain.py +5 -0
  120. office365/sharepoint/sites/site.py +10 -4
  121. office365/sharepoint/sites/version_policy_manager.py +7 -0
  122. office365/sharepoint/taxonomy/field_value.py +1 -1
  123. office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
  124. office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
  125. office365/sharepoint/tenant/administration/secondary_administrators_info.py +5 -0
  126. office365/sharepoint/tenant/administration/tenant.py +14 -0
  127. office365/sharepoint/tenant/cdn_api.py +16 -0
  128. office365/sharepoint/tenant/management/externalusers/results/get.py +4 -0
  129. office365/sharepoint/tenant/management/office365_tenant.py +14 -0
  130. office365/sharepoint/ui/applicationpages/peoplepicker/web_service_interface.py +39 -33
  131. office365/sharepoint/userprofiles/cross_geo_sync.py +37 -0
  132. office365/sharepoint/userprofiles/cross_geo_sync_user_data_batch.py +5 -0
  133. office365/sharepoint/userprofiles/followed_content.py +15 -0
  134. office365/sharepoint/userprofiles/people_manager.py +23 -10
  135. office365/sharepoint/userprofiles/person_properties.py +7 -0
  136. office365/sharepoint/userprofiles/user_profile.py +4 -6
  137. office365/sharepoint/views/view.py +2 -0
  138. office365/sharepoint/webs/information_collection.py +1 -1
  139. office365/sharepoint/webs/regional_settings.py +71 -0
  140. office365/sharepoint/webs/web.py +53 -5
  141. office365/sharepoint/workflowservices/deployment_service.py +9 -0
  142. office365/teams/apps/catalog.py +1 -0
  143. office365/teams/chats/chat.py +4 -0
  144. office365/teams/schedule/schedule.py +6 -2
  145. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/LICENSE +0 -0
  146. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/WHEEL +0 -0
  147. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/top_level.txt +0 -0
@@ -9,7 +9,7 @@ class FieldUserValue(FieldLookupValue):
9
9
 
10
10
  @staticmethod
11
11
  def from_user(user):
12
- # type: (User) -> FieldUserValue
12
+ # type: (User) -> "FieldUserValue"
13
13
  """
14
14
  Initialize field value from User
15
15
  :param User user: User object
@@ -554,9 +554,7 @@ class Folder(Entity):
554
554
  @property
555
555
  def time_created(self):
556
556
  # type: () -> Optional[datetime]
557
- """
558
- Gets when the folder was created in UTC.
559
- """
557
+ """Gets when the folder was created in UTC."""
560
558
  return self.properties.get("TimeCreated", datetime.min)
561
559
 
562
560
  @property
@@ -573,8 +571,8 @@ class Folder(Entity):
573
571
 
574
572
  @property
575
573
  def property_ref_name(self):
576
- # type: () -> str
577
- return "ServerRelativeUrl"
574
+ # type: () -> Optional[str]
575
+ return None
578
576
 
579
577
  def get_property(self, name, default_value=None):
580
578
  if default_value is None:
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class MigrationCenterDeployStatus(Entity):
5
+ """"""
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class PerformanceDashboardData(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.MigrationCenter.Service.PerformanceDashboardData"
@@ -0,0 +1,7 @@
1
+ from office365.sharepoint.migrationcenter.service.performance.entity_data import (
2
+ MigrationPerformanceEntityData,
3
+ )
4
+
5
+
6
+ class PerformanceData(MigrationPerformanceEntityData):
7
+ """"""
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class MigrationPerformanceEntityData(Entity):
5
+ """"""
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class MoveJobEntityData(Entity):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.MultiGeo.Service.MoveJobEntityData"
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.multigeo.move_job_entity_data import MoveJobEntityData
2
+
3
+
4
+ class SiteMoveJobEntityData(MoveJobEntityData):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.MultiGeo.Service.SiteMoveJobEntityData"
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class UserPersonalSiteLocation(Entity):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.Online.SharePoint.MultiGeo.Service.UserPersonalSiteLocation"
@@ -162,6 +162,7 @@ class SecurableObject(Entity):
162
162
 
163
163
  @property
164
164
  def first_unique_ancestor_securable_object(self):
165
+ # type: () -> SecurableObject
165
166
  """Specifies the object where role assignments for this object are defined"""
166
167
  return self.properties.get(
167
168
  "FirstUniqueAncestorSecurableObject",
@@ -173,6 +174,7 @@ class SecurableObject(Entity):
173
174
 
174
175
  @property
175
176
  def role_assignments(self):
177
+ # type: () -> RoleAssignmentCollection
176
178
  """The role assignments for the securable object."""
177
179
  return self.properties.get(
178
180
  "RoleAssignments",
@@ -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,16 +1,22 @@
1
- from typing import Optional
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", None)
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 = ServiceOperationPath(
67
- "GetById", [value], self._parent_collection.resource_path
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,
@@ -0,0 +1,6 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class LinkInfo(ClientValue):
5
+ """This class provides metadata for the tokenized sharing link including settings details, inheritance status,
6
+ and an optional array of members."""
@@ -241,6 +241,7 @@ class ObjectSharingInformation(Entity):
241
241
 
242
242
  @property
243
243
  def sharing_links(self):
244
+ # type: () -> ClientValueCollection[SharingLinkInfo]
244
245
  """Indicates the collection of all available sharing links for the securable object."""
245
246
  return self.properties.get(
246
247
  "SharingLinks", ClientValueCollection(SharingLinkInfo)
@@ -248,6 +249,7 @@ class ObjectSharingInformation(Entity):
248
249
 
249
250
  @property
250
251
  def shared_with_users_collection(self):
252
+ # type: () -> EntityCollection[ObjectSharingInformationUser]
251
253
  """A collection of shared with users."""
252
254
  return self.properties.get(
253
255
  "SharedWithUsersCollection",
@@ -1,4 +1,7 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.sharing.link_info import LinkInfo
4
+ from office365.sharepoint.utilities.principal_info import PrincipalInfo
2
5
 
3
6
 
4
7
  class PermissionCollection(ClientValue):
@@ -9,6 +12,21 @@ class PermissionCollection(ClientValue):
9
12
  implicit access.
10
13
  """
11
14
 
15
+ def __init__(
16
+ self, hasInheritedLinks=None, links=None, principals=None, siteAdmins=None
17
+ ):
18
+ """
19
+ :param bool hasInheritedLinks:
20
+ :param list[LinkInfo] links: The List of tokenized sharing links with their LinkInfo objects.
21
+ :param list[PrincipalInfo] principals: The List of Principals with their roles on this list item.
22
+ :param list[PrincipalInfo] siteAdmins: The List of Principals who are Site Admins. This property is returned
23
+ only if the caller is an Auditor.
24
+ """
25
+ self.hasInheritedLinks = hasInheritedLinks
26
+ self.links = ClientValueCollection(LinkInfo, links)
27
+ self.principals = ClientValueCollection(PrincipalInfo, principals)
28
+ self.siteAdmins = ClientValueCollection(PrincipalInfo, siteAdmins)
29
+
12
30
  @property
13
31
  def entity_type_name(self):
14
32
  return "SP.Sharing.PermissionCollection"
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.sharepoint.entity import Entity
2
4
  from office365.sharepoint.sharing.principal import Principal
3
5
 
@@ -7,6 +9,7 @@ class SharedDocumentInfo(Entity):
7
9
 
8
10
  @property
9
11
  def activity(self):
12
+ # type: () -> Optional[str]
10
13
  """"""
11
14
  return self.properties.get("Activity", None)
12
15
 
@@ -15,6 +18,12 @@ class SharedDocumentInfo(Entity):
15
18
  """"""
16
19
  return self.properties.get("Author", Principal())
17
20
 
21
+ @property
22
+ def caller_stack(self):
23
+ # type: () -> Optional[str]
24
+ """"""
25
+ return self.properties.get("CallerStack", None)
26
+
18
27
  @property
19
28
  def entity_type_name(self):
20
29
  return "SP.Sharing.SharedDocumentInfo"
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class ScriptSafeDomain(Entity):
5
+ """"""
@@ -219,7 +219,9 @@ class Site(Entity):
219
219
  specified in the orderBy parameter. A value of true indicates ascending order, and a value of false
220
220
  indicates descending order.
221
221
  """
222
- return_type = RecycleBinItemCollection(self.context)
222
+ return_type = RecycleBinItemCollection(
223
+ self.context, self.recycle_bin.resource_path
224
+ )
223
225
  payload = {"rowLimit": row_limit, "isAscending": is_ascending}
224
226
  qry = ServiceOperationQuery(
225
227
  self, "GetRecycleBinItems", None, payload, None, return_type
@@ -228,9 +230,7 @@ class Site(Entity):
228
230
  return return_type
229
231
 
230
232
  def get_site_administrators(self):
231
- """
232
- Gets site collection administrators
233
- """
233
+ """Gets site collection administrators"""
234
234
  return_type = ClientResult(
235
235
  self.context, ClientValueCollection(SiteAdministratorsInfo)
236
236
  )
@@ -521,6 +521,12 @@ class Site(Entity):
521
521
  """
522
522
  return self.properties.get("CanUpgrade", None)
523
523
 
524
+ @property
525
+ def channel_group_id(self):
526
+ # type: () -> Optional[str]
527
+ """ """
528
+ return self.properties.get("ChannelGroupId", None)
529
+
524
530
  @property
525
531
  def classification(self):
526
532
  # type: () -> Optional[str]
@@ -1,5 +1,12 @@
1
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
1
2
  from office365.sharepoint.entity import Entity
2
3
 
3
4
 
4
5
  class SiteVersionPolicyManager(Entity):
5
6
  """"""
7
+
8
+ def set_auto_expiration(self):
9
+ """"""
10
+ qry = ServiceOperationQuery(self, "SetAutoExpiration")
11
+ self.context.add_query(qry)
12
+ return self
@@ -25,7 +25,7 @@ class TaxonomyFieldValue(ClientValue):
25
25
  return "SP.Taxonomy.TaxonomyFieldValue"
26
26
 
27
27
 
28
- class TaxonomyFieldValueCollection(ClientValueCollection):
28
+ class TaxonomyFieldValueCollection(ClientValueCollection[TaxonomyFieldValue]):
29
29
  """Represents the multi-value object for the taxonomy column."""
30
30
 
31
31
  def __init__(self, initial_values):
@@ -0,0 +1,8 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class PowerAppsEnvironmentContext(ClientValue):
5
+ @property
6
+ def entity_type_name(self):
7
+ # type: () -> str
8
+ return "Microsoft.Online.SharePoint.TenantAdministration.PowerAppsEnvironmentContext"
@@ -13,3 +13,8 @@ class SecondaryAdministratorsInfo(ClientValue):
13
13
  self.email = email
14
14
  self.loginName = loginName
15
15
  self.userPrincipalName = userPrincipalName
16
+
17
+ @property
18
+ def entity_type_name(self):
19
+ # type: () -> str
20
+ return "Microsoft.Online.SharePoint.TenantAdministration.SecondaryAdministratorsInfo"
@@ -587,6 +587,14 @@ class Tenant(Entity):
587
587
  self.context.add_query(qry)
588
588
  return return_type
589
589
 
590
+ @property
591
+ def admin_settings(self):
592
+ from office365.sharepoint.tenant.administration.settings_service import (
593
+ TenantAdminSettingsService,
594
+ )
595
+
596
+ return TenantAdminSettingsService(self.context)
597
+
590
598
  @property
591
599
  def ai_builder_enabled(self):
592
600
  # type: () -> Optional[str]
@@ -656,6 +664,12 @@ class Tenant(Entity):
656
664
  ),
657
665
  )
658
666
 
667
+ @property
668
+ def cdn_api(self):
669
+ from office365.sharepoint.tenant.cdn_api import TenantCdnApi
670
+
671
+ return TenantCdnApi(self.context)
672
+
659
673
  @property
660
674
  def syntex_billing_subscription_settings(self):
661
675
  """"""
@@ -1,5 +1,9 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.client_value_collection import ClientValueCollection
1
3
  from office365.runtime.paths.resource_path import ResourcePath
4
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
2
5
  from office365.sharepoint.entity import Entity
6
+ from office365.sharepoint.tenant.cdn_url import TenantCdnUrl
3
7
 
4
8
 
5
9
  class TenantCdnApi(Entity):
@@ -8,6 +12,18 @@ class TenantCdnApi(Entity):
8
12
  context, ResourcePath("Microsoft.SharePoint.TenantCdn.TenantCdnApi")
9
13
  )
10
14
 
15
+ def get_cdn_urls(self, items=None):
16
+ """"""
17
+ payload = {
18
+ "items": items,
19
+ }
20
+ return_type = ClientResult(self.context, ClientValueCollection(TenantCdnUrl))
21
+ qry = ServiceOperationQuery(
22
+ self, "GetCdnUrls", None, payload, None, return_type
23
+ )
24
+ self.context.add_query(qry)
25
+ return return_type
26
+
11
27
  @property
12
28
  def entity_type_name(self):
13
29
  return "Microsoft.SharePoint.TenantCdn.TenantCdnApi"
@@ -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
  from office365.sharepoint.tenant.management.externalusers.collection import (
@@ -8,10 +10,12 @@ from office365.sharepoint.tenant.management.externalusers.collection import (
8
10
  class GetExternalUsersResults(Entity):
9
11
  @property
10
12
  def total_user_count(self):
13
+ # type: () -> Optional[int]
11
14
  return self.properties.get("TotalUserCount", None)
12
15
 
13
16
  @property
14
17
  def user_collection_position(self):
18
+ # type: () -> Optional[int]
15
19
  return self.properties.get("UserCollectionPosition", None)
16
20
 
17
21
  @property
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.client_object_collection import ClientObjectCollection
2
4
  from office365.runtime.client_result import ClientResult
3
5
  from office365.runtime.client_value_collection import ClientValueCollection
@@ -29,8 +31,19 @@ class Office365Tenant(Entity):
29
31
  )
30
32
  super(Office365Tenant, self).__init__(context, static_path)
31
33
 
34
+ @property
35
+ def addressbar_link_permission(self):
36
+ # type: () -> Optional[int]
37
+ return self.properties.get("AddressbarLinkPermission", None)
38
+
39
+ @property
40
+ def allow_comments_text_on_email_enabled(self):
41
+ # type: () -> Optional[bool]
42
+ return self.properties.get("AllowCommentsTextOnEmailEnabled", None)
43
+
32
44
  @property
33
45
  def allow_editing(self):
46
+ # type: () -> Optional[bool]
34
47
  return self.properties.get("AllowEditing", None)
35
48
 
36
49
  @property
@@ -62,6 +75,7 @@ class Office365Tenant(Entity):
62
75
 
63
76
  def disable_sharing_for_non_owners_of_site(self, site_url):
64
77
  """
78
+ Disables Sharing For Non Owners
65
79
  :param str site_url:
66
80
  """
67
81
  payload = {"siteUrl": site_url}