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,37 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
3
+ from office365.sharepoint.client_context import ClientContext
4
+ from office365.sharepoint.entity import Entity
5
+ from office365.sharepoint.userprofiles.cross_geo_sync_user_data_batch import (
6
+ CrossGeoSyncUserDataBatch,
7
+ )
8
+
9
+
10
+ class CrossGeoSync(Entity):
11
+ """"""
12
+
13
+ @staticmethod
14
+ def read_full_changes_batch(context, targetInstanceId, lastRecordId, batchSize):
15
+ # type: (ClientContext, str, str, str) -> ClientResult[CrossGeoSyncUserDataBatch]
16
+ """ """
17
+ payload = {
18
+ "targetInstanceId": targetInstanceId,
19
+ "lastRecordId": lastRecordId,
20
+ "batchSize": batchSize,
21
+ }
22
+ return_type = ClientResult(context, CrossGeoSyncUserDataBatch())
23
+ qry = ServiceOperationQuery(
24
+ CrossGeoSync(context),
25
+ "ReadFullChangesBatch",
26
+ None,
27
+ payload,
28
+ None,
29
+ return_type,
30
+ is_static=True,
31
+ )
32
+ context.add_query(qry)
33
+ return return_type
34
+
35
+ @property
36
+ def entity_type_name(self):
37
+ return "SP.UserProfiles.CrossGeoSync"
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class CrossGeoSyncUserDataBatch(ClientValue):
5
+ """"""
@@ -25,6 +25,21 @@ class FollowedContent(Entity):
25
25
  self.context.add_query(qry)
26
26
  return return_type
27
27
 
28
+ def get_followed_status(self, url):
29
+ """
30
+ The GetFollowedStatus method retrieves the followed status of the specified document or site.
31
+ An item can be followed if the url parameter identifies a document or site that the current user has access to.
32
+
33
+ :param str url: URL that identifies the item
34
+ """
35
+ return_type = ClientResult(self.context, int())
36
+ payload = {"url": url}
37
+ qry = ServiceOperationQuery(
38
+ self, "GetFollowedStatus", None, payload, None, return_type
39
+ )
40
+ self.context.add_query(qry)
41
+ return return_type
42
+
28
43
  @property
29
44
  def followed_documents_url(self):
30
45
  # type: () -> Optional[str]
@@ -75,18 +75,30 @@ class PeopleManager(Entity):
75
75
  self.context.add_query(qry)
76
76
  return result
77
77
 
78
- def get_followers_for(self, account_name):
78
+ def get_followers_for(self, account):
79
+ # type: (str|User) -> EntityCollection[PersonProperties]
79
80
  """
80
81
  Gets the people who are following the specified user.
81
82
 
82
- :param str account_name: Account name of the specified user.
83
+ :param str|User account: Account name of the specified user.
83
84
  """
84
85
  return_type = EntityCollection(self.context, PersonProperties)
85
- params = {"accountName": account_name}
86
- qry = ServiceOperationQuery(
87
- self, "GetFollowersFor", params, None, None, return_type
88
- )
89
- self.context.add_query(qry)
86
+
87
+ def _get_followers_for(account_name):
88
+ params = {"accountName": account_name}
89
+ qry = ServiceOperationQuery(
90
+ self, "GetFollowersFor", params, None, None, return_type
91
+ )
92
+ self.context.add_query(qry)
93
+
94
+ if isinstance(account, User):
95
+
96
+ def _account_loaded():
97
+ _get_followers_for(account.login_name)
98
+
99
+ account.ensure_property("LoginName", _account_loaded)
100
+ else:
101
+ _get_followers_for(account)
90
102
  return return_type
91
103
 
92
104
  def get_user_information(self, account_name, site_id):
@@ -153,21 +165,22 @@ class PeopleManager(Entity):
153
165
  _ensure_user(user_or_name, _user_resolved)
154
166
  return return_type
155
167
 
156
- def get_properties_for(self, user_or_name):
168
+ def get_properties_for(self, account):
157
169
  """
158
170
  Gets user properties for the specified user.
159
- :param str or User user_or_name: Specifies the User object or its login name.
171
+ :param str or User account: Specifies the User object or its login name.
160
172
  """
161
173
  return_type = PersonProperties(self.context)
162
174
 
163
175
  def _get_properties_for_inner(account_name):
176
+ # type: (str) -> None
164
177
  params = {"accountName": account_name}
165
178
  qry = ServiceOperationQuery(
166
179
  self, "GetPropertiesFor", params, None, None, return_type
167
180
  )
168
181
  self.context.add_query(qry)
169
182
 
170
- _ensure_user(user_or_name, _get_properties_for_inner)
183
+ _ensure_user(account, _get_properties_for_inner)
171
184
  return return_type
172
185
 
173
186
  def get_default_document_library(
@@ -1,5 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
+ from office365.runtime.odata.type import ODataType
3
4
  from office365.runtime.types.collections import StringCollection
4
5
  from office365.sharepoint.entity import Entity
5
6
 
@@ -79,6 +80,12 @@ class PersonProperties(Entity):
79
80
  def entity_type_name(self):
80
81
  return "SP.UserProfiles.PersonProperties"
81
82
 
83
+ def set_property(self, k, v, persist_changes=True):
84
+ if k == "UserProfileProperties":
85
+ v = ODataType.parse_key_value_collection(v)
86
+ super(PersonProperties, self).set_property(k, v)
87
+ return self
88
+
82
89
  def get_property(self, name, default_value=None):
83
90
  if default_value is None:
84
91
  property_mapping = {
@@ -50,9 +50,8 @@ class UserProfile(Entity):
50
50
 
51
51
  @property
52
52
  def followed_content(self):
53
- """
54
- Gets a FollowedContent object for the user.
55
- """
53
+ # type: () -> FollowedContent
54
+ """Gets a FollowedContent object for the user."""
56
55
  return self.properties.get(
57
56
  "FollowedContent",
58
57
  FollowedContent(
@@ -62,9 +61,8 @@ class UserProfile(Entity):
62
61
 
63
62
  @property
64
63
  def personal_site(self):
65
- """
66
- The PersonalSite property specifies the user's personal site
67
- """
64
+ # type: () -> Site
65
+ """The PersonalSite property specifies the user's personal site"""
68
66
  return self.properties.get(
69
67
  "PersonalSite",
70
68
  Site(self.context, ResourcePath("PersonalSite", self.resource_path)),
@@ -172,6 +172,7 @@ class View(Entity):
172
172
 
173
173
  @property
174
174
  def view_fields(self):
175
+ # type: () -> ViewFieldCollection
175
176
  """Gets a value that specifies the collection of fields in the list view."""
176
177
  return self.properties.get(
177
178
  "ViewFields",
@@ -199,6 +200,7 @@ class View(Entity):
199
200
 
200
201
  @property
201
202
  def server_relative_path(self):
203
+ # type: () -> Optional[SPResPath]
202
204
  """Gets the server-relative Path of the View."""
203
205
  return self.properties.get("ServerRelativePath", SPResPath())
204
206
 
@@ -89,6 +89,7 @@ from office365.sharepoint.sitescripts.serialization_result import (
89
89
  SiteScriptSerializationResult,
90
90
  )
91
91
  from office365.sharepoint.sitescripts.utility import SiteScriptUtility
92
+ from office365.sharepoint.translation.resource_entry import SPResourceEntry
92
93
  from office365.sharepoint.translation.user_resource import UserResource
93
94
  from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
94
95
  from office365.sharepoint.ui.applicationpages.peoplepicker.web_service_interface import (
@@ -1858,12 +1859,52 @@ class Web(SecurableObject):
1858
1859
  # type: () -> Optional[bool]
1859
1860
  return self.properties.get("CustomSiteActionsDisabled", None)
1860
1861
 
1862
+ @property
1863
+ def description_translations(self):
1864
+ """"""
1865
+ return self.properties.get(
1866
+ "DescriptionTranslations", ClientValueCollection(SPResourceEntry)
1867
+ )
1868
+
1869
+ @property
1870
+ def design_package_id(self):
1871
+ # type: () -> Optional[str]
1872
+ """Gets or sets the ID of the Design Package used in this SP.Web.
1873
+
1874
+ A value of Guid.Empty will mean that the default Design Package will be used for this SP.Web.
1875
+ The default is determined by the SP.WebTemplate of this SP.Web."""
1876
+ return self.properties.get("DesignPackageId", None)
1877
+
1878
+ @property
1879
+ def disable_app_views(self):
1880
+ # type: () -> Optional[bool]
1881
+ """"""
1882
+ return self.properties.get("DisableAppViews", None)
1883
+
1884
+ @property
1885
+ def disable_flows(self):
1886
+ # type: () -> Optional[bool]
1887
+ """"""
1888
+ return self.properties.get("DisableFlows", None)
1889
+
1861
1890
  @property
1862
1891
  def id(self):
1863
1892
  # type: () -> Optional[str]
1864
1893
  """Specifies the site identifier for the site"""
1865
1894
  return self.properties.get("Id", None)
1866
1895
 
1896
+ @property
1897
+ def language(self):
1898
+ # type: () -> Optional[int]
1899
+ """Specifies the language code identifier (LCID) for the language that is used on the site"""
1900
+ return self.properties.get("Language", None)
1901
+
1902
+ @property
1903
+ def last_item_modified_date(self):
1904
+ # type: () -> Optional[int]
1905
+ """Specifies when an item was last modified in the site"""
1906
+ return self.properties.get("LastItemModifiedDate", datetime.datetime.min)
1907
+
1867
1908
  @property
1868
1909
  def access_requests_list(self):
1869
1910
  """"""
@@ -2421,9 +2462,11 @@ class Web(SecurableObject):
2421
2462
  "ClientWebParts": self.client_web_parts,
2422
2463
  "CurrentUser": self.current_user,
2423
2464
  "DescriptionResource": self.description_resource,
2465
+ "DescriptionTranslations": self.description_translations,
2424
2466
  "EffectiveBasePermissions": self.effective_base_permissions,
2425
2467
  "EventReceivers": self.event_receivers,
2426
2468
  "HostedApps": self.hosted_apps,
2469
+ "LastItemModifiedDate": self.last_item_modified_date,
2427
2470
  "ListTemplates": self.list_templates,
2428
2471
  "MultilingualSettings": self.multilingual_settings,
2429
2472
  "OneDriveSharedItems": self.onedrive_shared_items,
@@ -0,0 +1,9 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class WorkflowDeploymentService(Entity):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "SP.WorkflowServices.WorkflowDeploymentService"