Office365-REST-Python-Client 2.5.7__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 (74) hide show
  1. {Office365_REST_Python_Client-2.5.7.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.7.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/RECORD +74 -50
  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/identitygovernance/entitlementmanagement/entitlement_management.py +7 -0
  8. office365/directory/identitygovernance/governance.py +16 -0
  9. office365/directory/serviceprincipals/service_principal.py +110 -21
  10. office365/graph_client.py +8 -0
  11. office365/onedrive/driveitems/driveItem.py +12 -0
  12. office365/onedrive/driveitems/retention_label.py +25 -0
  13. office365/onedrive/workbooks/charts/chart.py +13 -0
  14. office365/onedrive/workbooks/icon.py +5 -0
  15. office365/onedrive/workbooks/names/named_item.py +6 -0
  16. office365/onedrive/workbooks/ranges/font.py +5 -0
  17. office365/onedrive/workbooks/ranges/format.py +60 -0
  18. office365/onedrive/workbooks/ranges/range.py +12 -0
  19. office365/onedrive/workbooks/ranges/reference.py +6 -0
  20. office365/onedrive/workbooks/sort_field.py +26 -0
  21. office365/onedrive/workbooks/tables/pivot_table_collection.py +16 -0
  22. office365/onedrive/workbooks/worksheets/protection_options.py +3 -0
  23. office365/onedrive/workbooks/worksheets/worksheet.py +5 -4
  24. office365/sharepoint/activities/action_facet.py +17 -0
  25. office365/sharepoint/activities/client_request.py +4 -0
  26. office365/sharepoint/activities/client_response.py +8 -0
  27. office365/sharepoint/activities/entity.py +10 -0
  28. office365/sharepoint/activities/facets/delete.py +1 -0
  29. office365/sharepoint/activities/facets/get_mention.py +10 -0
  30. office365/sharepoint/activities/facets/in_doc.py +4 -0
  31. office365/sharepoint/activities/facets/move.py +14 -0
  32. office365/sharepoint/activities/facets/point_in_time_restore.py +9 -0
  33. office365/sharepoint/activities/facets/revision_set.py +9 -0
  34. office365/sharepoint/activities/facets/task_completed.py +9 -0
  35. office365/sharepoint/activities/facets/version.py +12 -0
  36. office365/sharepoint/activities/identity_item.py +16 -1
  37. office365/sharepoint/attachments/attachment.py +3 -0
  38. office365/sharepoint/attachments/collection.py +25 -3
  39. office365/sharepoint/client_context.py +29 -0
  40. office365/sharepoint/comments/collection.py +1 -1
  41. office365/sharepoint/compliance/store_proxy.py +43 -0
  42. office365/sharepoint/directory/provider/alternate_id_data.py +9 -0
  43. office365/sharepoint/directory/provider/notification.py +15 -0
  44. office365/sharepoint/directory/provider/object_data.py +14 -0
  45. office365/sharepoint/directory/provider/provider.py +13 -0
  46. office365/sharepoint/entity.py +15 -0
  47. office365/sharepoint/features/collection.py +2 -0
  48. office365/sharepoint/fields/user_value.py +1 -1
  49. office365/sharepoint/folders/folder.py +2 -2
  50. office365/sharepoint/multigeo/move_job_entity_data.py +9 -0
  51. office365/sharepoint/multigeo/site_move_job_entity_data.py +9 -0
  52. office365/sharepoint/multigeo/user_personal_site_location.py +9 -0
  53. office365/sharepoint/permissions/securable_object.py +2 -0
  54. office365/sharepoint/sharing/object_sharing_information.py +2 -0
  55. office365/sharepoint/sharing/shared_document_info.py +9 -0
  56. office365/sharepoint/sites/version_policy_manager.py +7 -0
  57. office365/sharepoint/tenant/administration/secondary_administrators_info.py +5 -0
  58. office365/sharepoint/tenant/administration/tenant.py +14 -0
  59. office365/sharepoint/tenant/cdn_api.py +16 -0
  60. office365/sharepoint/tenant/management/externalusers/results/get.py +4 -0
  61. office365/sharepoint/tenant/management/office365_tenant.py +14 -0
  62. office365/sharepoint/ui/applicationpages/peoplepicker/web_service_interface.py +39 -33
  63. office365/sharepoint/userprofiles/cross_geo_sync.py +37 -0
  64. office365/sharepoint/userprofiles/cross_geo_sync_user_data_batch.py +5 -0
  65. office365/sharepoint/userprofiles/followed_content.py +15 -0
  66. office365/sharepoint/userprofiles/people_manager.py +23 -10
  67. office365/sharepoint/userprofiles/person_properties.py +7 -0
  68. office365/sharepoint/userprofiles/user_profile.py +4 -6
  69. office365/sharepoint/views/view.py +2 -0
  70. office365/sharepoint/webs/web.py +43 -0
  71. office365/sharepoint/workflowservices/deployment_service.py +9 -0
  72. {Office365_REST_Python_Client-2.5.7.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/LICENSE +0 -0
  73. {Office365_REST_Python_Client-2.5.7.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/WHEEL +0 -0
  74. {Office365_REST_Python_Client-2.5.7.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,12 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class VersionFacet(ClientValue):
5
+ """"""
6
+
7
+ def __init__(self, fromVersion=None):
8
+ self.fromVersion = fromVersion
9
+
10
+ @property
11
+ def entity_type_name(self):
12
+ return "Microsoft.SharePoint.Activities.VersionFacet"
@@ -2,11 +2,26 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class ActivityIdentityItem(ClientValue):
5
- def __init__(self, client_id=None):
5
+ def __init__(
6
+ self,
7
+ client_id=None,
8
+ clientIdProvider=None,
9
+ displayName=None,
10
+ email=None,
11
+ userPrincipalName=None,
12
+ ):
6
13
  """
7
14
  :param str client_id:
15
+ :param str clientIdProvider:
16
+ :param str displayName:
17
+ :param str email:
18
+ :param str userPrincipalName:
8
19
  """
9
20
  self.clientId = client_id
21
+ self.clientIdProvider = clientIdProvider
22
+ self.displayName = displayName
23
+ self.email = email
24
+ self.userPrincipalName = userPrincipalName
10
25
 
11
26
  @property
12
27
  def entity_type_name(self):
@@ -10,6 +10,9 @@ from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
10
10
  class Attachment(Entity):
11
11
  """Represents an attachment file in a SharePoint List Item."""
12
12
 
13
+ def __repr__(self):
14
+ return self.server_relative_url or self.entity_type_name
15
+
13
16
  def download(self, file_object, use_path=True):
14
17
  """Download attachment file
15
18
 
@@ -1,4 +1,5 @@
1
- from typing import AnyStr
1
+ import os
2
+ from typing import IO, AnyStr
2
3
 
3
4
  from office365.runtime.paths.service_operation import ServiceOperationPath
4
5
  from office365.runtime.queries.service_operation import ServiceOperationQuery
@@ -55,14 +56,35 @@ class AttachmentCollection(EntityCollection[Attachment]):
55
56
  :param str content_stream: Stream containing the content of the attachment.
56
57
  """
57
58
  return_type = Attachment(self.context)
58
- payload = {"DecodedUrl": decoded_url, "contentStream": content_stream}
59
+ params = {"DecodedUrl": decoded_url}
59
60
  qry = ServiceOperationQuery(
60
- self, "AddUsingPath", None, payload, None, return_type
61
+ self, "AddUsingPath", params, content_stream, None, return_type
61
62
  )
62
63
  self.context.add_query(qry)
63
64
  self.add_child(return_type)
64
65
  return return_type
65
66
 
67
+ def delete_all(self):
68
+ """Deletes all attachments"""
69
+
70
+ def _delete_all(return_type):
71
+ # type: ("AttachmentCollection") -> None
72
+ [a.delete_object() for a in return_type]
73
+
74
+ self.get().after_execute(_delete_all)
75
+ return self
76
+
77
+ def upload(self, file, use_path=True):
78
+ # type: (IO, bool) -> Attachment
79
+ """
80
+ Uploads the attachment
81
+ """
82
+ info = AttachmentCreationInformation(os.path.basename(file.name), file.read())
83
+ if use_path:
84
+ return self.add_using_path(info.filename, info.content)
85
+ else:
86
+ return self.add(info)
87
+
66
88
  def get_by_filename(self, filename):
67
89
  """Retrieve Attachment file object by filename
68
90
 
@@ -410,6 +410,16 @@ class ClientContext(ClientRuntimeContext):
410
410
 
411
411
  return AnnouncementsController(self, ResourcePath("Announcements"))
412
412
 
413
+ @property
414
+ def client_people_picker(self):
415
+ """Query principals service alias"""
416
+
417
+ from office365.sharepoint.ui.applicationpages.peoplepicker.web_service_interface import (
418
+ ClientPeoplePickerWebServiceInterface,
419
+ )
420
+
421
+ return ClientPeoplePickerWebServiceInterface(self)
422
+
413
423
  @property
414
424
  def consumer_permissions(self):
415
425
  """Consumer permissions alias"""
@@ -431,6 +441,15 @@ class ClientContext(ClientRuntimeContext):
431
441
 
432
442
  return EmployeeEngagement(self)
433
443
 
444
+ @property
445
+ def directory_provider(self):
446
+ """Alias to SharePointDirectoryProvider"""
447
+ from office365.sharepoint.directory.provider.provider import (
448
+ SharePointDirectoryProvider,
449
+ )
450
+
451
+ return SharePointDirectoryProvider(self)
452
+
434
453
  @property
435
454
  def employee_experience(self):
436
455
  """Alias to EmployeeExperience"""
@@ -612,6 +631,16 @@ class ClientContext(ClientRuntimeContext):
612
631
 
613
632
  return SPHSite(self, ResourcePath("SPHSite"))
614
633
 
634
+ @property
635
+ def people_picker(self):
636
+ """Query principals service alias"""
637
+
638
+ from office365.sharepoint.ui.applicationpages.peoplepicker.web_service_interface import (
639
+ PeoplePickerWebServiceInterface,
640
+ )
641
+
642
+ return PeoplePickerWebServiceInterface(self)
643
+
615
644
  @property
616
645
  def publications(self):
617
646
  from office365.sharepoint.contentcenter.machinelearning.publications.publication import (
@@ -4,7 +4,7 @@ from office365.sharepoint.comments.comment import Comment
4
4
  from office365.sharepoint.entity_collection import EntityCollection
5
5
 
6
6
 
7
- class CommentCollection(EntityCollection):
7
+ class CommentCollection(EntityCollection[Comment]):
8
8
  def __init__(self, context, resource_path=None):
9
9
  super(CommentCollection, self).__init__(context, Comment, resource_path)
10
10
 
@@ -1,3 +1,5 @@
1
+ from typing import TYPE_CHECKING, Optional
2
+
1
3
  from office365.runtime.client_result import ClientResult
2
4
  from office365.runtime.client_value_collection import ClientValueCollection
3
5
  from office365.runtime.queries.service_operation import ServiceOperationQuery
@@ -5,8 +7,49 @@ from office365.runtime.types.collections import StringCollection
5
7
  from office365.sharepoint.compliance.tag import ComplianceTag
6
8
  from office365.sharepoint.entity import Entity
7
9
 
10
+ if TYPE_CHECKING:
11
+ from office365.sharepoint.client_context import ClientContext
12
+
8
13
 
9
14
  class SPPolicyStoreProxy(Entity):
15
+ @staticmethod
16
+ def check_site_is_deletable_by_id(context, site_id, return_type=None):
17
+ # type: (ClientContext, str, Optional[ClientResult[bool]]) -> ClientResult[bool]
18
+ """ """
19
+ if return_type is None:
20
+ return_type = ClientResult(context, bool())
21
+ payload = {"siteId": site_id}
22
+ qry = ServiceOperationQuery(
23
+ SPPolicyStoreProxy(context),
24
+ "CheckSiteIsDeletableById",
25
+ None,
26
+ payload,
27
+ None,
28
+ return_type,
29
+ True,
30
+ )
31
+ context.add_query(qry)
32
+ return return_type
33
+
34
+ @staticmethod
35
+ def is_site_deletable(context, site_url, return_type=None):
36
+ # type: (ClientContext, str, Optional[ClientResult[bool]]) -> ClientResult[bool]
37
+ """ """
38
+ if return_type is None:
39
+ return_type = ClientResult(context, bool())
40
+ payload = {"siteUrl": site_url}
41
+ qry = ServiceOperationQuery(
42
+ SPPolicyStoreProxy(context),
43
+ "IsSiteDeletable",
44
+ None,
45
+ payload,
46
+ None,
47
+ return_type,
48
+ True,
49
+ )
50
+ context.add_query(qry)
51
+ return return_type
52
+
10
53
  @staticmethod
11
54
  def get_available_tags_for_site(context, site_url, return_type=None):
12
55
  """
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class AlternateIdData(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "SP.Directory.Provider.AlternateIdData"
@@ -0,0 +1,15 @@
1
+ from office365.runtime.paths.resource_path import ResourcePath
2
+ from office365.sharepoint.entity import Entity
3
+
4
+
5
+ class DirectoryNotification(Entity):
6
+ """"""
7
+
8
+ def __init__(self, context, resource_path=None):
9
+ if resource_path is None:
10
+ resource_path = ResourcePath("SP.Directory.Provider.DirectoryNotification")
11
+ super(DirectoryNotification, self).__init__(context, resource_path)
12
+
13
+ @property
14
+ def entity_type_name(self):
15
+ return "SP.Directory.Provider.DirectoryNotification"
@@ -0,0 +1,14 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.sharepoint.directory.provider.alternate_id_data import AlternateIdData
3
+
4
+
5
+ class DirectoryObjectData(ClientValue):
6
+ """"""
7
+
8
+ def __init__(self, AlternateId=AlternateIdData(), Id=None):
9
+ self.AlternateId = AlternateId
10
+ self.Id = Id
11
+
12
+ @property
13
+ def entity_type_name(self):
14
+ return "SP.Directory.Provider.DirectoryObjectData"
@@ -1,4 +1,7 @@
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
4
+ from office365.sharepoint.directory.provider.object_data import DirectoryObjectData
2
5
  from office365.sharepoint.entity import Entity
3
6
 
4
7
 
@@ -10,6 +13,16 @@ class SharePointDirectoryProvider(Entity):
10
13
  )
11
14
  super(SharePointDirectoryProvider, self).__init__(context, resource_path)
12
15
 
16
+ def read_directory_object(self, data):
17
+ """"""
18
+ return_type = ClientResult(self.context, DirectoryObjectData())
19
+ payload = {"data": data}
20
+ qry = ServiceOperationQuery(
21
+ self, "ReadDirectoryObject", None, payload, None, return_type
22
+ )
23
+ self.context.add_query(qry)
24
+ return return_type
25
+
13
26
  @property
14
27
  def entity_type_name(self):
15
28
  return "SP.Directory.Provider.SharePointDirectoryProvider"
@@ -5,6 +5,7 @@ from typing_extensions import Self
5
5
  from office365.runtime.auth.client_credential import ClientCredential
6
6
  from office365.runtime.auth.user_credential import UserCredential
7
7
  from office365.runtime.client_object import ClientObject
8
+ from office365.runtime.paths.v3.entity import EntityPath
8
9
  from office365.runtime.queries.delete_entity import DeleteEntityQuery
9
10
  from office365.runtime.queries.update_entity import UpdateEntityQuery
10
11
 
@@ -53,3 +54,17 @@ class Entity(ClientObject):
53
54
  @property
54
55
  def property_ref_name(self):
55
56
  return "Id"
57
+
58
+ def set_property(self, name, value, persist_changes=True):
59
+ super(Entity, self).set_property(name, value, persist_changes)
60
+ if name == self.property_ref_name:
61
+ if self.resource_path is None:
62
+ if self.parent_collection:
63
+ self._resource_path = EntityPath(
64
+ value, self.parent_collection.resource_path
65
+ )
66
+ else:
67
+ pass
68
+ else:
69
+ self._resource_path.patch(value)
70
+ return self
@@ -11,6 +11,7 @@ class FeatureCollection(EntityCollection[Feature]):
11
11
  super(FeatureCollection, self).__init__(context, Feature, resource_path, parent)
12
12
 
13
13
  def add(self, feature_id, force, featdef_scope, verify_if_activated=False):
14
+ # type: (str, bool, int, bool) -> Feature
14
15
  """
15
16
  Adds the feature to the collection of activated features and returns the added feature.
16
17
 
@@ -43,6 +44,7 @@ class FeatureCollection(EntityCollection[Feature]):
43
44
  return return_type
44
45
 
45
46
  def get_by_id(self, feature_id):
47
+ # type: (str) -> Feature
46
48
  """Returns the feature for the given feature identifier. Returns NULL if no feature is available for the given
47
49
  feature identifier.
48
50
 
@@ -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
@@ -571,8 +571,8 @@ class Folder(Entity):
571
571
 
572
572
  @property
573
573
  def property_ref_name(self):
574
- # type: () -> str
575
- return "ServerRelativeUrl"
574
+ # type: () -> Optional[str]
575
+ return None
576
576
 
577
577
  def get_property(self, name, default_value=None):
578
578
  if default_value is None:
@@ -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",
@@ -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,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"
@@ -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
@@ -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}
@@ -16,39 +16,6 @@ from office365.sharepoint.ui.applicationpages.peoplepicker.query_parameters impo
16
16
  class ClientPeoplePickerWebServiceInterface(Entity):
17
17
  """Specifies an interface that can be used to query principals."""
18
18
 
19
- @staticmethod
20
- def get_search_results(
21
- context,
22
- search_pattern,
23
- provider_id=None,
24
- hierarchy_node_id=None,
25
- entity_types=None,
26
- ):
27
- """
28
- Specifies a JSON formatted CSOM String of principals found in the search.
29
-
30
- :type context: office365.sharepoint.client_context.ClientContext
31
- :param str search_pattern: Specifies a pattern used to search for principals.
32
- The value is implementation-specific.
33
- :param str provider_id: The identifier of a claims provider.
34
- :param str hierarchy_node_id: The identifier of a node in the hierarchy. The search MUST be conducted under
35
- this node.
36
- :param str entity_types: The type of principals to search for.
37
- """
38
- return_type = ClientResult(context, str())
39
- payload = {
40
- "searchPattern": search_pattern,
41
- "providerID": provider_id,
42
- "hierarchyNodeID": hierarchy_node_id,
43
- "entityTypes": entity_types,
44
- }
45
- svc = ClientPeoplePickerWebServiceInterface(context)
46
- qry = ServiceOperationQuery(
47
- svc, "GetSearchResults", None, payload, None, return_type, True
48
- )
49
- context.add_query(qry)
50
- return return_type
51
-
52
19
  @staticmethod
53
20
  def get_search_results_by_hierarchy(
54
21
  context,
@@ -167,3 +134,42 @@ class ClientPeoplePickerWebServiceInterface(Entity):
167
134
  @property
168
135
  def entity_type_name(self):
169
136
  return "SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface"
137
+
138
+
139
+ class PeoplePickerWebServiceInterface(Entity):
140
+ @staticmethod
141
+ def get_search_results(
142
+ context,
143
+ search_pattern,
144
+ provider_id=None,
145
+ hierarchy_node_id=None,
146
+ entity_types=None,
147
+ ):
148
+ """
149
+ Specifies a JSON formatted CSOM String of principals found in the search.
150
+
151
+ :type context: office365.sharepoint.client_context.ClientContext
152
+ :param str search_pattern: Specifies a pattern used to search for principals.
153
+ The value is implementation-specific.
154
+ :param str provider_id: The identifier of a claims provider.
155
+ :param str hierarchy_node_id: The identifier of a node in the hierarchy. The search MUST be conducted under
156
+ this node.
157
+ :param str entity_types: The type of principals to search for.
158
+ """
159
+ return_type = ClientResult(context, str())
160
+ payload = {
161
+ "searchPattern": search_pattern,
162
+ "providerID": provider_id,
163
+ "hierarchyNodeID": hierarchy_node_id,
164
+ "entityTypes": entity_types,
165
+ }
166
+ svc = PeoplePickerWebServiceInterface(context)
167
+ qry = ServiceOperationQuery(
168
+ svc, "GetSearchResults", None, payload, None, return_type, True
169
+ )
170
+ context.add_query(qry)
171
+ return return_type
172
+
173
+ @property
174
+ def entity_type_name(self):
175
+ return "SP.UI.ApplicationPages.PeoplePickerWebServiceInterface"