Office365-REST-Python-Client 2.5.8__py3-none-any.whl → 2.5.10__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 (65) hide show
  1. {Office365_REST_Python_Client-2.5.8.dist-info → Office365_REST_Python_Client-2.5.10.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.8.dist-info → Office365_REST_Python_Client-2.5.10.dist-info}/RECORD +65 -48
  3. office365/onedrive/driveitems/driveItem.py +40 -6
  4. office365/onedrive/internal/paths/url.py +14 -0
  5. office365/onedrive/sitepages/horizontal_section_column.py +1 -1
  6. office365/onedrive/sitepages/site_page.py +1 -1
  7. office365/onedrive/sitepages/vertical_section.py +1 -1
  8. office365/onedrive/sitepages/webparts/__init__.py +0 -0
  9. office365/onedrive/sitepages/webparts/standard.py +5 -0
  10. office365/onedrive/sitepages/webparts/text.py +5 -0
  11. office365/runtime/client_object.py +4 -3
  12. office365/runtime/client_request.py +1 -1
  13. office365/runtime/client_runtime_context.py +3 -3
  14. office365/runtime/paths/resource_path.py +3 -0
  15. office365/sharepoint/alerts/collection.py +12 -0
  16. office365/sharepoint/attachments/collection.py +1 -1
  17. office365/sharepoint/businessdata/infrastructure/securestore/connection_settings.py +23 -1
  18. office365/sharepoint/directory/membership_result.py +5 -0
  19. office365/sharepoint/entity.py +5 -0
  20. office365/sharepoint/fields/date_time.py +18 -0
  21. office365/sharepoint/fields/lookup.py +20 -0
  22. office365/sharepoint/fields/multi_line_text.py +25 -0
  23. office365/sharepoint/fields/rating_scale.py +2 -5
  24. office365/sharepoint/files/collection.py +6 -5
  25. office365/sharepoint/files/versions/version.py +7 -0
  26. office365/sharepoint/lists/list.py +3 -2
  27. office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +12 -0
  28. office365/sharepoint/migrationcenter/service/performance/data.py +38 -0
  29. office365/sharepoint/migrationcenter/service/performance/throughput_data.py +9 -0
  30. office365/sharepoint/migrationcenter/service/services.py +22 -0
  31. office365/sharepoint/multigeo/api_versions.py +28 -0
  32. office365/sharepoint/multigeo/services.py +39 -0
  33. office365/sharepoint/multigeo/tenant_information.py +9 -0
  34. office365/sharepoint/publishing/portal_health_details.py +10 -0
  35. office365/sharepoint/publishing/portal_health_status.py +8 -1
  36. office365/sharepoint/search/service.py +5 -3
  37. office365/sharepoint/sharing/permission_collection.py +8 -1
  38. office365/sharepoint/sharing/shared_document_info.py +19 -0
  39. office365/sharepoint/sitehealth/summary.py +20 -0
  40. office365/sharepoint/sites/site.py +12 -0
  41. office365/sharepoint/tenant/administration/container_properties.py +17 -0
  42. office365/sharepoint/tenant/administration/group.py +17 -0
  43. office365/sharepoint/tenant/administration/powerapps/environment.py +31 -0
  44. office365/sharepoint/tenant/administration/recent_admin_action_report.py +14 -0
  45. office365/sharepoint/tenant/administration/recent_admin_action_report_payload.py +10 -0
  46. office365/sharepoint/tenant/administration/siteinfo_for_site_picker.py +5 -1
  47. office365/sharepoint/tenant/administration/sites/creation_default_storage_quota.py +5 -0
  48. office365/sharepoint/tenant/administration/sites/creation_source.py +16 -1
  49. office365/sharepoint/tenant/administration/sites/properties_collection.py +2 -0
  50. office365/sharepoint/tenant/administration/sites/state_properties.py +14 -0
  51. office365/sharepoint/tenant/administration/tenant.py +42 -1
  52. office365/sharepoint/tenant/management/office365_tenant.py +18 -0
  53. office365/sharepoint/types/resource_path.py +1 -1
  54. office365/sharepoint/userprofiles/profile_loader.py +1 -3
  55. office365/sharepoint/userprofiles/user_profile.py +80 -6
  56. office365/sharepoint/views/view.py +1 -1
  57. office365/sharepoint/views/visualization/__init__.py +0 -0
  58. office365/sharepoint/views/visualization/field.py +14 -0
  59. office365/sharepoint/views/visualization/style_set.py +5 -0
  60. office365/sharepoint/workflow/manager.py +5 -0
  61. {Office365_REST_Python_Client-2.5.8.dist-info → Office365_REST_Python_Client-2.5.10.dist-info}/LICENSE +0 -0
  62. {Office365_REST_Python_Client-2.5.8.dist-info → Office365_REST_Python_Client-2.5.10.dist-info}/WHEEL +0 -0
  63. {Office365_REST_Python_Client-2.5.8.dist-info → Office365_REST_Python_Client-2.5.10.dist-info}/top_level.txt +0 -0
  64. /office365/onedrive/sitepages/{web_part.py → webparts/web_part.py} +0 -0
  65. /office365/sharepoint/views/{visualization.py → visualization/visualization.py} +0 -0
@@ -0,0 +1,31 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class PowerAppsEnvironment(ClientValue):
5
+ """ """
6
+
7
+ def __init__(
8
+ self,
9
+ AllocatedAICredits=None,
10
+ DisplayName=None,
11
+ IsDefault=None,
12
+ Name=None,
13
+ PurchasedAICredits=None,
14
+ ):
15
+ # type: (float, str, bool, str, float) -> None
16
+ self.AllocatedAICredits = AllocatedAICredits
17
+ self.DisplayName = DisplayName
18
+ self.IsDefault = IsDefault
19
+ self.Name = Name
20
+ self.PurchasedAICredits = PurchasedAICredits
21
+
22
+ def __str__(self):
23
+ return self.DisplayName or self.entity_type_name
24
+
25
+ def __repr__(self):
26
+ return self.Name or self.entity_type_name
27
+
28
+ @property
29
+ def entity_type_name(self):
30
+ # type: () -> str
31
+ return "Microsoft.Online.SharePoint.TenantAdministration.PowerAppsEnvironment"
@@ -0,0 +1,14 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class RecentAdminActionReport(ClientValue):
5
+ """ """
6
+
7
+ def __init__(self, actions=None, createdByEmail=None):
8
+ # type: (str, str) -> None
9
+ self.actions = actions
10
+ self.createdByEmail = createdByEmail
11
+
12
+ @property
13
+ def entity_type_name(self):
14
+ return "Microsoft.SharePoint.Administration.TenantAdmin.RecentAdminActionReport"
@@ -0,0 +1,10 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class RecentAdminActionReportPayload(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ # type: () -> str
10
+ return "Microsoft.Online.SharePoint.TenantAdministration.RecentAdminActionReportPayload"
@@ -2,8 +2,12 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class SiteInfoForSitePicker(ClientValue):
5
- def __init__(self, site_name=None):
5
+ def __init__(self, Error=None, site_id=None, site_name=None, Url=None):
6
+ # type: (str, str, str, str) -> None
7
+ self.Error = Error
8
+ self.SiteId = site_id
6
9
  self.SiteName = site_name
10
+ self.Url = Url
7
11
 
8
12
  @property
9
13
  def entity_type_name(self):
@@ -2,6 +2,11 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class SiteCreationDefaultStorageQuota(ClientValue):
5
+ def __init__(self, IsReadOnly=None, Value=None):
6
+ # type: (bool, int) -> None
7
+ self.IsReadOnly = IsReadOnly
8
+ self.Value = Value
9
+
5
10
  @property
6
11
  def entity_type_name(self):
7
12
  return "Microsoft.Online.SharePoint.TenantAdministration.SiteCreationDefaultStorageQuota"
@@ -1,3 +1,6 @@
1
+ from datetime import datetime
2
+ from typing import List
3
+
1
4
  from office365.runtime.client_value import ClientValue
2
5
  from office365.runtime.client_value_collection import ClientValueCollection
3
6
  from office365.sharepoint.tenant.administration.sites.creation_data import (
@@ -6,10 +9,22 @@ from office365.sharepoint.tenant.administration.sites.creation_data import (
6
9
 
7
10
 
8
11
  class SiteCreationSource(ClientValue):
9
- def __init__(self, site_creation_data=None):
12
+ def __init__(
13
+ self,
14
+ IsSyncThresholdLimitReached=None,
15
+ LastRefreshTimeStamp=None,
16
+ site_creation_data=None,
17
+ SyncThresholdLimit=None,
18
+ TotalSitesCount=None,
19
+ ):
20
+ # type: (bool, datetime, List[SiteCreationData], int, int) -> None
21
+ self.IsSyncThresholdLimitReached = IsSyncThresholdLimitReached
22
+ self.LastRefreshTimeStamp = LastRefreshTimeStamp
10
23
  self.SiteCreationData = ClientValueCollection(
11
24
  SiteCreationData, site_creation_data
12
25
  )
26
+ self.SyncThresholdLimit = SyncThresholdLimit
27
+ self.TotalSitesCount = TotalSitesCount
13
28
 
14
29
  @property
15
30
  def entity_type_name(self):
@@ -37,6 +37,8 @@ class SitePropertiesCollection(EntityCollection[SiteProperties]):
37
37
 
38
38
  def get_site_state_properties(self, site_id):
39
39
  """
40
+ Gets site state properties.
41
+
40
42
  :param str site_id: Site identifier
41
43
  """
42
44
  return_type = ClientResult(self.context, SiteStateProperties())
@@ -2,6 +2,20 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class SiteStateProperties(ClientValue):
5
+ def __init__(
6
+ self,
7
+ GroupSiteRelationship=None,
8
+ IsArchived=None,
9
+ IsSiteOnHold=None,
10
+ LockState=None,
11
+ ):
12
+ # type: (int, bool, bool, int) -> None
13
+ super(SiteStateProperties, self).__init__()
14
+ self.GroupSiteRelationship = GroupSiteRelationship
15
+ self.IsArchived = IsArchived
16
+ self.IsSiteOnHold = IsSiteOnHold
17
+ self.LockState = LockState
18
+
5
19
  @property
6
20
  def entity_type_name(self):
7
21
  return "Microsoft.Online.SharePoint.TenantAdministration.SiteStateProperties"
@@ -34,6 +34,15 @@ from office365.sharepoint.tenant.administration.insights.onedrive_site_sharing i
34
34
  from office365.sharepoint.tenant.administration.insights.top_files_sharing import (
35
35
  TopFilesSharingInsights,
36
36
  )
37
+ from office365.sharepoint.tenant.administration.powerapps.environment import (
38
+ PowerAppsEnvironment,
39
+ )
40
+ from office365.sharepoint.tenant.administration.recent_admin_action_report import (
41
+ RecentAdminActionReport,
42
+ )
43
+ from office365.sharepoint.tenant.administration.recent_admin_action_report_payload import (
44
+ RecentAdminActionReportPayload,
45
+ )
37
46
  from office365.sharepoint.tenant.administration.secondary_administrators_fields_data import (
38
47
  SecondaryAdministratorsFieldsData,
39
48
  )
@@ -75,6 +84,16 @@ class Tenant(Entity):
75
84
  )
76
85
  super(Tenant, self).__init__(context, static_path)
77
86
 
87
+ def add_recent_admin_action_report(self):
88
+ """"""
89
+ return_type = ClientResult(self.context, RecentAdminActionReport())
90
+ payload = {"payload": RecentAdminActionReportPayload()}
91
+ qry = ServiceOperationQuery(
92
+ self, "AddRecentAdminActionReport", None, payload, None, return_type
93
+ )
94
+ self.context.add_query(qry)
95
+ return return_type
96
+
78
97
  def get_corporate_catalog_site(self):
79
98
  """Retrieves Corporate Catalog Site"""
80
99
  settings = TenantSettings.current(self.context)
@@ -281,13 +300,25 @@ class Tenant(Entity):
281
300
 
282
301
  def get_lock_state_by_id(self, site_id):
283
302
  """
284
- :param str site_id:
303
+ :param str site_id: The GUID to uniquely identify a SharePoint site
285
304
  """
286
305
  return self.sites.get_lock_state_by_id(site_id)
287
306
 
288
307
  def hub_sites(self, site_url):
289
308
  pass
290
309
 
310
+ def get_power_apps_environments(self):
311
+ """ """
312
+ return_type = ClientResult(
313
+ self.context,
314
+ ClientValueCollection(PowerAppsEnvironment),
315
+ )
316
+ qry = ServiceOperationQuery(
317
+ self, "GetPowerAppsEnvironments", None, None, None, return_type
318
+ )
319
+ self.context.add_query(qry)
320
+ return return_type
321
+
291
322
  def check_tenant_intune_license(self):
292
323
  """
293
324
  Checks whether a tenant has the Intune license.
@@ -589,12 +620,22 @@ class Tenant(Entity):
589
620
 
590
621
  @property
591
622
  def admin_settings(self):
623
+ """ """
592
624
  from office365.sharepoint.tenant.administration.settings_service import (
593
625
  TenantAdminSettingsService,
594
626
  )
595
627
 
596
628
  return TenantAdminSettingsService(self.context)
597
629
 
630
+ @property
631
+ def migration_center(self):
632
+ """ """
633
+ from office365.sharepoint.migrationcenter.service.services import (
634
+ MigrationCenterServices,
635
+ )
636
+
637
+ return MigrationCenterServices(self.context)
638
+
598
639
  @property
599
640
  def ai_builder_enabled(self):
600
641
  # type: () -> Optional[str]
@@ -1,5 +1,7 @@
1
1
  from typing import Optional
2
2
 
3
+ from typing_extensions import Self
4
+
3
5
  from office365.runtime.client_object_collection import ClientObjectCollection
4
6
  from office365.runtime.client_result import ClientResult
5
7
  from office365.runtime.client_value_collection import ClientValueCollection
@@ -104,6 +106,22 @@ class Office365Tenant(Entity):
104
106
  self.context.add_query(qry)
105
107
  return return_type
106
108
 
109
+ def set_block_download_file_type_policy_data(
110
+ self, blockDownloadFileTypePolicy, fileTypeIds, excludedBlockDownloadGroupIds
111
+ ):
112
+ # type: (bool, list[int], list[str]) -> Self
113
+ """"""
114
+ payload = {
115
+ "blockDownloadFileTypePolicy": blockDownloadFileTypePolicy,
116
+ "fileTypeIds": fileTypeIds,
117
+ "excludedBlockDownloadGroupIds": excludedBlockDownloadGroupIds,
118
+ }
119
+ qry = ServiceOperationQuery(
120
+ self, "SetBlockDownloadFileTypePolicyData", None, payload
121
+ )
122
+ self.context.add_query(qry)
123
+ return self
124
+
107
125
  def set_tenant_cdn_enabled(self, cdn_type, is_enabled):
108
126
  """
109
127
  Enables or disables Public content delivery network (CDN) or Private CDN on the tenant level.
@@ -44,7 +44,7 @@ class ResourcePath(ClientValue):
44
44
  return "SP.ResourcePath"
45
45
 
46
46
  def __str__(self):
47
- return self.DecodedUrl
47
+ return self.DecodedUrl or ""
48
48
 
49
49
  def __repr__(self):
50
50
  return self.DecodedUrl or self.entity_type_name
@@ -47,9 +47,7 @@ class ProfileLoader(ClientObject):
47
47
  return return_type
48
48
 
49
49
  def get_user_profile(self):
50
- """
51
- The GetUserProfile method returns the user profile for the current user.
52
- """
50
+ """The GetUserProfile method returns the user profile for the current user."""
53
51
  result = UserProfile(
54
52
  self.context, ResourcePath("GetUserProfile", self.resource_path)
55
53
  )
@@ -1,3 +1,4 @@
1
+ from datetime import datetime
1
2
  from typing import Optional
2
3
 
3
4
  from office365.runtime.client_result import ClientResult
@@ -12,6 +13,12 @@ class UserProfile(Entity):
12
13
  """The UserProfile class stores the profile of the individual user, which includes properties such
13
14
  as the user's account name, preferred name, and email address."""
14
15
 
16
+ def __str__(self):
17
+ return self.display_name or self.entity_type_name
18
+
19
+ def __repr__(self):
20
+ return self.account_name or self.entity_type_name
21
+
15
22
  @property
16
23
  def account_name(self):
17
24
  # type: () -> Optional[str]
@@ -25,19 +32,85 @@ class UserProfile(Entity):
25
32
  return self.properties.get("DisplayName", None)
26
33
 
27
34
  @property
28
- def my_site_host_url(self):
35
+ def follow_personal_site_url(self):
29
36
  # type: () -> Optional[str]
37
+ """The FollowPersonalSiteUrl property specifies the URL to allow the current user to create a personal site.
38
+ If there is no hybrid & cross-geo setting, it will return the same value as UrlToCreatePersonalSite,
39
+ otherwise a URL to allow the current user to create a personal site on the remote host.
30
40
  """
31
- Specifies the URL for the personal site of the current user.
32
- """
41
+ return self.properties.get("FollowPersonalSiteUrl", None)
42
+
43
+ @property
44
+ def is_default_document_library_blocked(self):
45
+ # type: () -> Optional[bool]
46
+ """If true, indicates that the access of the user to the default document library in the user’s OneDrive
47
+ is blocked."""
48
+ return self.properties.get("IsDefaultDocumentLibraryBlocked", None)
49
+
50
+ @property
51
+ def is_people_list_public(self):
52
+ # type: () -> Optional[bool]
53
+ """Specifies whether the list of people that the user is following is public."""
54
+ return self.properties.get("IsPeopleListPublic", None)
55
+
56
+ @property
57
+ def is_privacy_setting_on(self):
58
+ # type: () -> Optional[bool]
59
+ """Specifies whether the privacy setting has been set for the site."""
60
+ return self.properties.get("IsPrivacySettingOn", None)
61
+
62
+ @property
63
+ def is_self(self):
64
+ # type: () -> Optional[bool]
65
+ """Specifies whether the user profile is for the current user."""
66
+ return self.properties.get("IsSelf", None)
67
+
68
+ @property
69
+ def job_title(self):
70
+ # type: () -> Optional[str]
71
+ """Specifies the job title of the user."""
72
+ return self.properties.get("JobTitle", None)
73
+
74
+ @property
75
+ def my_site_first_run_experience(self):
76
+ # type: () -> Optional[int]
77
+ """Specifies the personal site First Run flag of the user."""
78
+ return self.properties.get("MySiteFirstRunExperience", None)
79
+
80
+ @property
81
+ def my_site_host_url(self):
82
+ # type: () -> Optional[str]
83
+ """Specifies the URL for the personal site of the current user."""
33
84
  return self.properties.get("MySiteHostUrl", None)
34
85
 
86
+ @property
87
+ def o15_first_run_experience(self):
88
+ # type: () -> Optional[int]
89
+ """Specifies the First Run flag of the user."""
90
+ return self.properties.get("O15FirstRunExperience", None)
91
+
92
+ @property
93
+ def personal_site_capabilities(self):
94
+ # type: () -> Optional[int]
95
+ """The PersonalSiteCapabilities property specifies attributes of the user's personal site."""
96
+ return self.properties.get("PersonalSiteCapabilities", None)
97
+
98
+ @property
99
+ def personal_site_first_creation_error(self):
100
+ # type: () -> Optional[str]
101
+ """Specifies the failure for the personal site first creation attempt."""
102
+ return self.properties.get("PersonalSiteFirstCreationError", None)
103
+
104
+ @property
105
+ def personal_site_first_creation_time(self):
106
+ # type: () -> Optional[datetime]
107
+ """Specifies the time for the personal site first creation attempt."""
108
+ return self.properties.get("PersonalSiteFirstCreationTime", datetime.min)
109
+
35
110
  @property
36
111
  def public_url(self):
37
112
  # type: () -> Optional[str]
38
- """
39
- Specifies the public URL for the personal site of the current user.
40
- """
113
+ """Specifies the public URL for the personal site of the current user."""
41
114
  return self.properties.get("PublicUrl", None)
42
115
 
43
116
  @property
@@ -120,6 +193,7 @@ class UserProfile(Entity):
120
193
  property_mapping = {
121
194
  "FollowedContent": self.followed_content,
122
195
  "PersonalSite": self.personal_site,
196
+ "PersonalSiteFirstCreationTime": self.personal_site_first_creation_time,
123
197
  }
124
198
  default_value = property_mapping.get(name, None)
125
199
  return super(UserProfile, self).get_property(name, default_value)
@@ -9,7 +9,7 @@ from office365.sharepoint.listitems.caml.query import CamlQuery
9
9
  from office365.sharepoint.listitems.collection import ListItemCollection
10
10
  from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
11
11
  from office365.sharepoint.views.field_collection import ViewFieldCollection
12
- from office365.sharepoint.views.visualization import Visualization
12
+ from office365.sharepoint.views.visualization.visualization import Visualization
13
13
 
14
14
  if TYPE_CHECKING:
15
15
  from office365.sharepoint.views.collection import ViewCollection
File without changes
@@ -0,0 +1,14 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class VisualizationField(ClientValue):
5
+ """Contains CSS properties relating to how an individual field is layed out relative to it's container."""
6
+
7
+ def __init__(self, InternalName=None, Style=None):
8
+ """
9
+ :param str InternalName: A Property which will specify which set of sub-elements to apply this set of
10
+ CSS properties on.
11
+ :param str Style: CSS properties in serialized JSON format.
12
+ """
13
+ self.InternalName = InternalName
14
+ self.Style = Style
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class VisualizationStyleSet(ClientValue):
5
+ """Microsoft.SharePoint.Client.VisualizationStyleSet is not applicable."""
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class SPWorkflowManager(Entity):
5
+ """"""