Office365-REST-Python-Client 2.5.6__py3-none-any.whl → 2.5.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +5 -5
  2. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +85 -58
  3. office365/directory/administrative_unit.py +9 -2
  4. office365/directory/applications/roles/collection.py +5 -1
  5. office365/directory/applications/roles/role.py +1 -1
  6. office365/directory/audit/provisioning/object_summary.py +30 -1
  7. office365/directory/authentication/methods/fido.py +8 -0
  8. office365/directory/authentication/methods/password.py +23 -0
  9. office365/directory/custom_security_attribute_definition.py +7 -0
  10. office365/directory/device_local_credential_info.py +6 -0
  11. office365/directory/directory.py +40 -12
  12. office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
  13. office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
  14. office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
  15. office365/directory/insights/resource_reference.py +1 -1
  16. office365/directory/policies/device_registration.py +6 -0
  17. office365/directory/policies/root.py +13 -0
  18. office365/directory/security/threatintelligence/article_indicator.py +7 -0
  19. office365/directory/serviceprincipals/service_principal.py +3 -8
  20. office365/directory/synchronization/schema.py +16 -0
  21. office365/directory/users/user.py +23 -0
  22. office365/onedrive/driveitems/driveItem.py +74 -6
  23. office365/onedrive/lists/list.py +1 -1
  24. office365/onedrive/sitepages/__init__.py +0 -0
  25. office365/onedrive/sitepages/base.py +29 -0
  26. office365/onedrive/sitepages/canvas_layout.py +43 -0
  27. office365/onedrive/sitepages/collection.py +32 -0
  28. office365/onedrive/sitepages/horizontal_section.py +23 -0
  29. office365/onedrive/sitepages/horizontal_section_column.py +27 -0
  30. office365/onedrive/sitepages/site_page.py +116 -0
  31. office365/onedrive/sitepages/title_area.py +13 -0
  32. office365/onedrive/sitepages/vertical_section.py +27 -0
  33. office365/onedrive/sitepages/web_part.py +5 -0
  34. office365/onedrive/sites/site.py +10 -0
  35. office365/onedrive/workbooks/charts/data_labels.py +13 -1
  36. office365/onedrive/workbooks/tables/sort.py +5 -0
  37. office365/onedrive/workbooks/tables/table.py +57 -0
  38. office365/onedrive/workbooks/worksheets/protection.py +20 -1
  39. office365/onedrive/workbooks/worksheets/protection_options.py +7 -0
  40. office365/outlook/calendar/calendar.py +1 -3
  41. office365/outlook/calendar/events/event.py +45 -0
  42. office365/outlook/calendar/response_status.py +11 -0
  43. office365/outlook/calendar/rooms/room.py +14 -0
  44. office365/outlook/mail/automatic_replies_mailtips.py +5 -0
  45. office365/outlook/mail/conversation.py +1 -3
  46. office365/outlook/mail/folders/folder.py +1 -3
  47. office365/outlook/mail/tips.py +17 -0
  48. office365/planner/plans/plan.py +11 -1
  49. office365/reports/root.py +33 -0
  50. office365/runtime/auth/authentication_context.py +12 -2
  51. office365/runtime/odata/json_format.py +3 -2
  52. office365/runtime/odata/request.py +12 -2
  53. office365/runtime/queries/upload_session.py +5 -0
  54. office365/sharepoint/alerts/collection.py +2 -1
  55. office365/sharepoint/attachments/attachment.py +3 -9
  56. office365/sharepoint/client_context.py +4 -2
  57. office365/sharepoint/contenttypes/content_type.py +13 -1
  58. office365/sharepoint/contenttypes/fieldlinks/collection.py +1 -1
  59. office365/sharepoint/directory/helper.py +2 -0
  60. office365/sharepoint/fields/collection.py +4 -3
  61. office365/sharepoint/folders/folder.py +1 -3
  62. office365/sharepoint/migrationcenter/deploy_status.py +5 -0
  63. office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
  64. office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
  65. office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
  66. office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
  67. office365/sharepoint/principal/principal.py +2 -4
  68. office365/sharepoint/recyclebin/item.py +107 -7
  69. office365/sharepoint/sharing/information.py +9 -0
  70. office365/sharepoint/sharing/link_info.py +6 -0
  71. office365/sharepoint/sharing/permission_collection.py +18 -0
  72. office365/sharepoint/sites/script_safe_domain.py +5 -0
  73. office365/sharepoint/sites/site.py +10 -4
  74. office365/sharepoint/taxonomy/field_value.py +1 -1
  75. office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
  76. office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
  77. office365/sharepoint/webs/information_collection.py +1 -1
  78. office365/sharepoint/webs/regional_settings.py +71 -0
  79. office365/sharepoint/webs/web.py +10 -5
  80. office365/teams/apps/catalog.py +1 -0
  81. office365/teams/chats/chat.py +4 -0
  82. office365/teams/schedule/schedule.py +6 -2
  83. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
  84. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
  85. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
@@ -25,7 +25,7 @@ class ODataRequest(ClientRequest):
25
25
  """Creates OData request"""
26
26
  super(ODataRequest, self).__init__()
27
27
  self._default_json_format = json_format
28
- self.beforeExecute += self._ensure_json_format
28
+ self.beforeExecute += self._ensure_http_headers
29
29
 
30
30
  @property
31
31
  def json_format(self):
@@ -111,6 +111,8 @@ class ODataRequest(ClientRequest):
111
111
  k: v for k, v in self._next_property(value, json_format)
112
112
  }
113
113
  yield name, value
114
+ elif name == "@odata.etag":
115
+ yield "__etag", value
114
116
  else:
115
117
  yield "__value", json
116
118
  elif json is not None:
@@ -142,8 +144,16 @@ class ODataRequest(ClientRequest):
142
144
  json = {query.parameters_name: json}
143
145
  return json
144
146
 
145
- def _ensure_json_format(self, request):
147
+ def _ensure_http_headers(self, request):
146
148
  # type: (RequestOptions) -> None
149
+ """
150
+ Ensures that HTTP Header Fields are specified in the OData request, namely:
151
+ - The Content-Type header
152
+ - Accept request-header field
153
+ - The If-Match request-header field (optional)
154
+ """
147
155
  media_type = self.json_format.media_type
148
156
  request.ensure_header("Content-Type", media_type)
149
157
  request.ensure_header("Accept", media_type)
158
+ if self.json_format.etag is not None:
159
+ request.ensure_header("If-Match", self.json_format.etag)
@@ -4,6 +4,11 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
4
 
5
5
 
6
6
  class UploadSessionQuery(ServiceOperationQuery):
7
+ """
8
+ The UploadSession query provides information about how to upload large files to OneDrive, OneDrive for
9
+ Business, or SharePoint document libraries
10
+ """
11
+
7
12
  def __init__(self, binding_type, parameters_type):
8
13
  super(UploadSessionQuery, self).__init__(
9
14
  binding_type, "createUploadSession", None, parameters_type
@@ -5,7 +5,7 @@ from office365.sharepoint.alerts.alert import Alert
5
5
  from office365.sharepoint.entity_collection import EntityCollection
6
6
 
7
7
 
8
- class AlertCollection(EntityCollection):
8
+ class AlertCollection(EntityCollection[Alert]):
9
9
  """Content Type resource collection"""
10
10
 
11
11
  def __init__(self, context, resource_path=None):
@@ -26,6 +26,7 @@ class AlertCollection(EntityCollection):
26
26
  return return_type
27
27
 
28
28
  def contains(self, id_alert):
29
+ # type: (str) -> ClientResult[bool]
29
30
  """
30
31
  Returns true if the given alert exists in the alert collection. False otherwise.
31
32
 
@@ -76,16 +76,12 @@ class Attachment(Entity):
76
76
  @property
77
77
  def file_name(self):
78
78
  # type: () -> Optional[str]
79
- """
80
- Specifies the file name of the list item attachment.
81
- """
79
+ """Specifies the file name of the list item attachment."""
82
80
  return self.properties.get("FileName", None)
83
81
 
84
82
  @property
85
83
  def file_name_as_path(self):
86
- """
87
- The file name of the attachment as a SP.ResourcePath.
88
- """
84
+ """The file name of the attachment as a SP.ResourcePath."""
89
85
  return self.properties.get("FileNameAsPath", SPResPath())
90
86
 
91
87
  @property
@@ -96,9 +92,7 @@ class Attachment(Entity):
96
92
 
97
93
  @property
98
94
  def server_relative_path(self):
99
- """
100
- The server-relative-path of the attachment.
101
- """
95
+ """The server-relative-path of the attachment."""
102
96
  return self.properties.get("ServerRelativePath", SPResPath())
103
97
 
104
98
  @property
@@ -82,8 +82,9 @@ class ClientContext(ClientRuntimeContext):
82
82
  cert_path=None,
83
83
  private_key=None,
84
84
  scopes=None,
85
+ passphrase=None,
85
86
  ):
86
- # type: (str, str, str, Optional[str], Optional[str], Optional[List[str]]) -> Self
87
+ # type: (str, str, str, Optional[str], Optional[str], Optional[List[str]], Optional[str]) -> Self
87
88
  """
88
89
  Creates authenticated SharePoint context via certificate credentials
89
90
 
@@ -93,9 +94,10 @@ class ClientContext(ClientRuntimeContext):
93
94
  :param str thumbprint: Hex encoded thumbprint of the certificate.
94
95
  :param str client_id: The OAuth client id of the calling application.
95
96
  :param list[str] or None scopes: Scopes requested to access a protected API (a resource)
97
+ :param str passphrase: Passphrase if the private_key is encrypted
96
98
  """
97
99
  self.authentication_context.with_client_certificate(
98
- tenant, client_id, thumbprint, cert_path, private_key, scopes
100
+ tenant, client_id, thumbprint, cert_path, private_key, scopes, passphrase
99
101
  )
100
102
  return self
101
103
 
@@ -20,7 +20,7 @@ class ContentType(Entity):
20
20
  """
21
21
 
22
22
  def __str__(self):
23
- return self.name
23
+ return self.name or self.entity_type_name
24
24
 
25
25
  def __repr__(self):
26
26
  return self.string_id or str(self.id) or self.entity_type_name
@@ -111,6 +111,12 @@ class ContentType(Entity):
111
111
  """
112
112
  return self.properties.get("Id", ContentTypeId())
113
113
 
114
+ @property
115
+ def scope(self):
116
+ # type: () -> Optional[str]
117
+ """Specifies a server-relative path to the content type scope of the content type."""
118
+ return self.properties.get("Scope", None)
119
+
114
120
  @property
115
121
  def sealed(self):
116
122
  # type: () -> Optional[bool]
@@ -142,6 +148,12 @@ class ContentType(Entity):
142
148
  item forms"""
143
149
  return self.properties.get("NewFormClientSideComponentProperties", None)
144
150
 
151
+ @property
152
+ def new_form_url(self):
153
+ # type: () -> Optional[str]
154
+ """Specifies the URL of a custom new form to use for list items that have been assigned the content type."""
155
+ return self.properties.get("NewFormUrl", None)
156
+
145
157
  @property
146
158
  def description(self):
147
159
  # type: () -> Optional[str]
@@ -7,7 +7,7 @@ from office365.sharepoint.entity_collection import EntityCollection
7
7
  from office365.sharepoint.fields.field import Field
8
8
 
9
9
 
10
- class FieldLinkCollection(EntityCollection):
10
+ class FieldLinkCollection(EntityCollection[FieldLink]):
11
11
  """Specifies a Collection for field links."""
12
12
 
13
13
  def __init__(self, context, resource_path=None):
@@ -1,6 +1,7 @@
1
1
  from office365.runtime.client_result import ClientResult
2
2
  from office365.runtime.paths.resource_path import ResourcePath
3
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+ from office365.sharepoint.client_context import ClientContext
4
5
  from office365.sharepoint.directory.members_info import MembersInfo
5
6
  from office365.sharepoint.directory.membership_result import MembershipResult
6
7
  from office365.sharepoint.directory.my_groups_result import MyGroupsResult
@@ -32,6 +33,7 @@ class SPHelper(Entity):
32
33
 
33
34
  @staticmethod
34
35
  def check_site_availability(context, site_url):
36
+ # type: (ClientContext, str) -> ClientResult[bool]
35
37
  """
36
38
  :param str site_url: Site Url
37
39
  :param office365.sharepoint.client_context.ClientContext context: SharePoint context
@@ -13,6 +13,7 @@ from office365.sharepoint.fields.number import FieldNumber
13
13
  from office365.sharepoint.fields.text import FieldText
14
14
  from office365.sharepoint.fields.type import FieldType
15
15
  from office365.sharepoint.fields.url import FieldUrl
16
+ from office365.sharepoint.fields.user import FieldUser
16
17
  from office365.sharepoint.fields.xmlSchemaFieldCreationInformation import (
17
18
  XmlSchemaFieldCreationInformation,
18
19
  )
@@ -123,13 +124,12 @@ class FieldCollection(EntityCollection[Field]):
123
124
  :param str title: Specifies the display name of the field.
124
125
  """
125
126
  from office365.sharepoint.fields.lookup import FieldLookup
127
+ from office365.sharepoint.lists.list import List # noqa
126
128
 
127
129
  return_type = FieldLookup(self.context)
128
130
 
129
131
  def _add_lookup_field(lookup_list_id):
130
- """
131
- :type lookup_list_id: str
132
- """
132
+ # type: (str) -> None
133
133
  if allow_multiple_values:
134
134
  field_schema = """
135
135
  <Field Type="LookupMulti" Mult="TRUE" DisplayName="{title}" Required="FALSE" Hidden="TRUE" \
@@ -176,6 +176,7 @@ class FieldCollection(EntityCollection[Field]):
176
176
  return self.add_field(create_field_info)
177
177
 
178
178
  def add_user_field(self, title):
179
+ # type: (str) -> FieldUser
179
180
  """
180
181
  Creates a User field
181
182
 
@@ -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
@@ -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
+ """"""
@@ -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."""
@@ -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"
@@ -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]
@@ -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"
@@ -3,7 +3,7 @@ from office365.sharepoint.entity_collection import EntityCollection
3
3
  from office365.sharepoint.webs.information import WebInformation
4
4
 
5
5
 
6
- class WebInformationCollection(EntityCollection):
6
+ class WebInformationCollection(EntityCollection[WebInformation]):
7
7
  """Specifies a collection of objects containing metadata about a site"""
8
8
 
9
9
  def __init__(self, context, resource_path=None):