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
@@ -17,6 +17,7 @@ from office365.directory.password_credential import PasswordCredential
17
17
  from office365.directory.permissions.grants.oauth2 import OAuth2PermissionGrant
18
18
  from office365.directory.permissions.scope import PermissionScope
19
19
  from office365.directory.synchronization.synchronization import Synchronization
20
+ from office365.directory.users.user import User
20
21
  from office365.runtime.client_result import ClientResult
21
22
  from office365.runtime.client_value_collection import ClientValueCollection
22
23
  from office365.runtime.paths.appid import AppIdPath
@@ -101,7 +102,82 @@ class ServicePrincipal(DirectoryObject):
101
102
  self.context.add_query(qry)
102
103
  return return_type
103
104
 
104
- def grant(self, app, app_role):
105
+ def _ensure_client_service_principal(self, app, action):
106
+ if isinstance(app, Application):
107
+
108
+ def _after():
109
+ action(app)
110
+
111
+ app.ensure_property("id", _after)
112
+ else:
113
+ self.context.service_principals.get_by_app(app).get().after_execute(action)
114
+
115
+ def grant_delegated(self, app, principal, scope):
116
+ # type: (Application|str, User|str, AppRole|str) -> Self
117
+ """Grants a delegated permission to the client service principal on behalf of a user"""
118
+
119
+ def _grant_delegated(principal_id, client_id):
120
+ # type: (str, str) -> None
121
+ self.context.oauth2_permission_grants.add(
122
+ clientId=client_id,
123
+ consentType="Principal",
124
+ resourceId=self.id,
125
+ principalId=principal_id,
126
+ scope=scope,
127
+ )
128
+
129
+ def _ensure_app(principal_id):
130
+ def _after(return_type):
131
+ _grant_delegated(principal_id, return_type.id)
132
+
133
+ self._ensure_client_service_principal(app, _after)
134
+
135
+ def _ensure_principal():
136
+ if isinstance(principal, User):
137
+
138
+ def _after():
139
+ _ensure_app(principal.id)
140
+
141
+ principal.ensure_property("id", _after)
142
+ else:
143
+ _ensure_app(principal)
144
+
145
+ self.ensure_property("id", _ensure_principal)
146
+ return self
147
+
148
+ def revoke_delegated(self, app, principal, scope):
149
+ # type: (Application|str, User|str, AppRole|str) -> Self
150
+ """"""
151
+
152
+ def _revoke(app_id, principal_id):
153
+ # type: (str, str) -> None
154
+
155
+ def _after(return_type):
156
+ pass
157
+
158
+ query_text = "clientId eq '{0}' and principalId eq '{1}'".format(
159
+ app_id, principal_id
160
+ )
161
+ # query_text = "clientId eq '{0}'".format(app_id)
162
+ self.context.oauth2_permission_grants.filter(
163
+ query_text
164
+ ).get().after_execute(_after)
165
+
166
+ def _ensure_principal(return_type):
167
+ if isinstance(principal, User):
168
+
169
+ def _after():
170
+ _revoke(principal.id, return_type.id)
171
+
172
+ principal.ensure_property("id", _after)
173
+ else:
174
+ _revoke(principal, return_type.id)
175
+
176
+ self._ensure_client_service_principal(app, _ensure_principal)
177
+ # self.ensure_property("id", _ensure_principal)
178
+ return self
179
+
180
+ def grant_application(self, app, app_role):
105
181
  # type: (Application|str, AppRole|str) -> Self
106
182
  """
107
183
  Grants an app role assignment to a client service principal
@@ -109,41 +185,54 @@ class ServicePrincipal(DirectoryObject):
109
185
  :param AppRole or str app_role: AppRole object or name
110
186
  """
111
187
 
112
- def _grant(principal):
113
- # type: ("ServicePrincipal") -> None
188
+ def _grant(principal_id, app_role_id):
189
+ # type: (str, str) -> None
114
190
  self.app_role_assigned_to.add(
115
- principalId=principal.id, resourceId=self.id, appRoleId=app_role.id
191
+ principalId=principal_id, resourceId=self.id, appRoleId=app_role_id
116
192
  )
117
193
 
118
- def _ensure_principal():
119
- self.context.service_principals.get_by_app(app).get().after_execute(_grant)
194
+ def _ensure_resource():
195
+ def _after(return_type):
196
+ if isinstance(app_role, AppRole):
197
+ _grant(return_type.id, app_role.id)
198
+ else:
199
+ _grant(return_type.id, self.app_roles[app_role].id)
120
200
 
121
- self.ensure_property("id", _ensure_principal)
201
+ self.context.service_principals.get_by_app(app).get().after_execute(_after)
202
+
203
+ self.ensure_properties(["id", "appRoles"], _ensure_resource)
122
204
  return self
123
205
 
124
- def revoke(self, app, app_role):
206
+ def revoke_application(self, app, app_role):
125
207
  # type: (Application|str, AppRole|str) -> Self
126
208
  """Revokes an app role assignment from a client service principal"""
127
209
 
128
- def _revoke(principal):
129
- # type: ("ServicePrincipal") -> None
130
- app_role_assigned_to_ids = [
131
- item.id
210
+ def _revoke(principal_id, app_role_id):
211
+ # type: (str, str) -> None
212
+ app_role_to_revoke = [
213
+ item
132
214
  for item in self.app_role_assigned_to
133
- if item.principal_id == principal.id and item.app_role_id == app_role.id
215
+ # if item.principal_id == principal_id and item.app_role_id == app_role_id
216
+ if item.principal_id == principal_id
134
217
  ]
135
- if len(app_role_assigned_to_ids) > 0:
136
- self.app_role_assigned_to[app_role_assigned_to_ids[0]].delete_object()
218
+ if len(app_role_to_revoke) > 0:
219
+ self.app_role_assigned_to[app_role_to_revoke[0].id].delete_object()
137
220
 
138
- def _ensure_resource(principal):
139
- self.ensure_properties(["id", "appRoleAssignedTo"], _revoke, principal)
221
+ def _ensure_app_role(principal):
222
+ # type: ("ServicePrincipal") -> None
223
+ if isinstance(app_role, AppRole):
224
+ _revoke(principal.id, app_role.id)
225
+ else:
226
+ _revoke(principal.id, self.app_roles[app_role].id)
140
227
 
141
228
  def _ensure_principal():
142
- self.context.service_principals.get_by_app(app).get().after_execute(
143
- _ensure_resource
144
- )
229
+ self.context.service_principals.get_by_app(app).select(
230
+ ["id"]
231
+ ).get().after_execute(_ensure_app_role)
145
232
 
146
- self.ensure_property("id", _ensure_principal)
233
+ self.ensure_properties(
234
+ ["id", "appId", "appRoles", "appRoleAssignedTo"], _ensure_principal
235
+ )
147
236
  return self
148
237
 
149
238
  def remove_password(self, key_id):
office365/graph_client.py CHANGED
@@ -25,6 +25,7 @@ from office365.directory.internal.paths.me import MePath
25
25
  from office365.directory.invitations.collection import InvitationCollection
26
26
  from office365.directory.licenses.subscribed_sku import SubscribedSku
27
27
  from office365.directory.object_collection import DirectoryObjectCollection
28
+ from office365.directory.permissions.grants.oauth2 import OAuth2PermissionGrant
28
29
  from office365.directory.permissions.grants.resource_specific import (
29
30
  ResourceSpecificPermissionGrant,
30
31
  )
@@ -516,6 +517,13 @@ class GraphClient(ClientRuntimeContext):
516
517
  """Gets all places in a tenant"""
517
518
  return EntityCollection(self, Place, ResourcePath("places"))
518
519
 
520
+ @property
521
+ def oauth2_permission_grants(self):
522
+ """Permission grants container"""
523
+ return DeltaCollection(
524
+ self, OAuth2PermissionGrant, ResourcePath("oauth2PermissionGrants")
525
+ )
526
+
519
527
  @property
520
528
  def room_lists(self):
521
529
  """Gets all the room lists in a tenant"""
@@ -22,6 +22,7 @@ from office365.onedrive.driveitems.item_preview_info import ItemPreviewInfo
22
22
  from office365.onedrive.driveitems.photo import Photo
23
23
  from office365.onedrive.driveitems.publication_facet import PublicationFacet
24
24
  from office365.onedrive.driveitems.remote_item import RemoteItem
25
+ from office365.onedrive.driveitems.retention_label import ItemRetentionLabel
25
26
  from office365.onedrive.driveitems.special_folder import SpecialFolder
26
27
  from office365.onedrive.driveitems.thumbnail_set import ThumbnailSet
27
28
  from office365.onedrive.driveitems.uploadable_properties import (
@@ -785,6 +786,17 @@ class DriveItem(BaseItem):
785
786
  ),
786
787
  )
787
788
 
789
+ @property
790
+ def retention_label(self):
791
+ # type: () -> ItemRetentionLabel
792
+ """Information about retention label and settings enforced on the driveItem."""
793
+ return self.properties.get(
794
+ "retentionLabel",
795
+ ItemRetentionLabel(
796
+ self.context, ResourcePath("retentionLabel", self.resource_path)
797
+ ),
798
+ )
799
+
788
800
  @property
789
801
  def publication(self):
790
802
  # type: () -> PublicationFacet
@@ -0,0 +1,25 @@
1
+ from typing import Optional
2
+
3
+ from office365.directory.permissions.identity_set import IdentitySet
4
+ from office365.entity import Entity
5
+
6
+
7
+ class ItemRetentionLabel(Entity):
8
+ """
9
+ Groups retention and compliance-related properties on an item into a single structure.
10
+ Currently, supported only for driveItem.
11
+ """
12
+
13
+ @property
14
+ def is_label_applied_explicitly(self):
15
+ # type: () -> Optional[bool]
16
+ """Specifies whether the label is applied explicitly on the item.
17
+ True indicates that the label is applied explicitly; otherwise, the label is inherited from its parent.
18
+ Read-only."""
19
+ return self.properties.get("isLabelAppliedExplicitly", None)
20
+
21
+ @property
22
+ def label_applied_by(self):
23
+ # type: () -> Optional[IdentitySet]
24
+ """Identity of the user who applied the label. Read-only."""
25
+ return self.properties.get("labelAppliedBy", IdentitySet())
@@ -2,11 +2,24 @@ from office365.entity import Entity
2
2
  from office365.onedrive.workbooks.charts.axes import WorkbookChartAxes
3
3
  from office365.onedrive.workbooks.charts.data_labels import WorkbookChartDataLabels
4
4
  from office365.runtime.paths.resource_path import ResourcePath
5
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
5
6
 
6
7
 
7
8
  class WorkbookChart(Entity):
8
9
  """Represents a chart object in a workbook."""
9
10
 
11
+ def set_position(self, startCell, endCell):
12
+ """Positions the chart relative to cells on the worksheet.
13
+ :param str startCell: The start cell. It is where the chart is moved to. The start cell is the top-left or
14
+ top-right cell, depending on the user's right-to-left display settings.
15
+ :param str endCell: The end cell. If specified, the chart's width and height is set to fully cover up
16
+ this cell/range.
17
+ """
18
+ payload = {"startCell": startCell, "endCell": endCell}
19
+ qry = ServiceOperationQuery(self, "setPosition", None, payload)
20
+ self.context.add_query(qry)
21
+ return self
22
+
10
23
  @property
11
24
  def axes(self):
12
25
  """Represents chart axes."""
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class WorkbookIcon(ClientValue):
5
+ """Represents a cell icon."""
@@ -33,6 +33,12 @@ class WorkbookNamedItem(Entity):
33
33
  """Represents the comment associated with this name."""
34
34
  return self.properties.get("comment", None)
35
35
 
36
+ @property
37
+ def scope(self):
38
+ # type: () -> Optional[str]
39
+ """Indicates whether the name is scoped to the workbook or to a specific worksheet."""
40
+ return self.properties.get("scope", None)
41
+
36
42
  @property
37
43
  def worksheet(self):
38
44
  """Returns the worksheet on which the named item is scoped to. Available only if the item is scoped
@@ -0,0 +1,5 @@
1
+ from office365.entity import Entity
2
+
3
+
4
+ class WorkbookRangeFont(Entity):
5
+ """This object represents the font attributes (font name, font size, color, etc.) for an object."""
@@ -1,5 +1,10 @@
1
+ from typing import Optional
2
+
1
3
  from office365.entity import Entity
4
+ from office365.entity_collection import EntityCollection
5
+ from office365.onedrive.workbooks.ranges.border import WorkbookRangeBorder
2
6
  from office365.onedrive.workbooks.ranges.fill import WorkbookRangeFill
7
+ from office365.onedrive.workbooks.ranges.font import WorkbookRangeFont
3
8
  from office365.onedrive.workbooks.ranges.format_protection import (
4
9
  WorkbookFormatProtection,
5
10
  )
@@ -9,6 +14,53 @@ from office365.runtime.paths.resource_path import ResourcePath
9
14
  class WorkbookRangeFormat(Entity):
10
15
  """A format object encapsulating the range's font, fill, borders, alignment, and other properties."""
11
16
 
17
+ @property
18
+ def column_width(self):
19
+ # type: () -> Optional[float]
20
+ """Gets or sets the width of all columns within the range. If the column widths aren't uniform,
21
+ null will be returned."""
22
+ return self.properties.get("columnWidth", None)
23
+
24
+ @property
25
+ def horizontal_alignment(self):
26
+ # type: () -> Optional[str]
27
+ """Represents the horizontal alignment for the specified object"""
28
+ return self.properties.get("horizontalAlignment", None)
29
+
30
+ @property
31
+ def row_height(self):
32
+ # type: () -> Optional[float]
33
+ """Gets or sets the height of all rows in the range. If the row heights aren't uniform null will be returned."""
34
+ return self.properties.get("rowHeight", None)
35
+
36
+ @property
37
+ def vertical_alignment(self):
38
+ # type: () -> Optional[str]
39
+ """Represents the vertical alignment for the specified object.
40
+ Possible values are: Top, Center, Bottom, Justify, Distributed."""
41
+ return self.properties.get("verticalAlignment", None)
42
+
43
+ @property
44
+ def wrap_text(self):
45
+ # type: () -> Optional[bool]
46
+ """Indicates if Excel wraps the text in the object.
47
+ A null value indicates that the entire range doesn't have uniform wrap setting
48
+ """
49
+ return self.properties.get("wrapText", None)
50
+
51
+ @property
52
+ def borders(self):
53
+ # type: () -> EntityCollection[WorkbookRangeBorder]
54
+ """Collection of border objects that apply to the overall range selected."""
55
+ return self.properties.get(
56
+ "borders",
57
+ EntityCollection(
58
+ self.context,
59
+ WorkbookRangeBorder,
60
+ ResourcePath("borders", self.resource_path),
61
+ ),
62
+ )
63
+
12
64
  @property
13
65
  def fill(self):
14
66
  """Returns the fill object defined on the overall range"""
@@ -17,6 +69,14 @@ class WorkbookRangeFormat(Entity):
17
69
  WorkbookRangeFill(self.context, ResourcePath("fill", self.resource_path)),
18
70
  )
19
71
 
72
+ @property
73
+ def font(self):
74
+ """Returns the font object defined on the overall range selected"""
75
+ return self.properties.get(
76
+ "font",
77
+ WorkbookRangeFont(self.context, ResourcePath("font", self.resource_path)),
78
+ )
79
+
20
80
  @property
21
81
  def protection(self):
22
82
  """Returns the format protection object for a range"""
@@ -82,6 +82,18 @@ class WorkbookRange(Entity):
82
82
  """Represents the total number of columns in the range. Read-only."""
83
83
  return self.properties.get("columnCount", None)
84
84
 
85
+ @property
86
+ def column_hidden(self):
87
+ # type: () -> Optional[bool]
88
+ """Represents if all columns of the current range are hidden."""
89
+ return self.properties.get("columnHidden", None)
90
+
91
+ @property
92
+ def column_index(self):
93
+ # type: () -> Optional[int]
94
+ """Represents the column number of the first cell in the range. Zero-indexed. Read-only."""
95
+ return self.properties.get("columnIndex", None)
96
+
85
97
  @property
86
98
  def format(self):
87
99
  """Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties"""
@@ -3,3 +3,9 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class WorkbookRangeReference(ClientValue):
5
5
  """"""
6
+
7
+ def __init__(self, address=None):
8
+ """
9
+ :param str address:
10
+ """
11
+ self.address = address
@@ -0,0 +1,26 @@
1
+ from office365.onedrive.workbooks.icon import WorkbookIcon
2
+ from office365.runtime.client_value import ClientValue
3
+
4
+
5
+ class WorkbookSortField(ClientValue):
6
+ """Represents a condition in a sorting operation."""
7
+
8
+ def __init__(
9
+ self, ascending=None, color=None, dataOption=None, icon=WorkbookIcon(), key=None
10
+ ):
11
+ """
12
+ :param bool ascending: Represents whether the sorting is done in an ascending fashion.
13
+ :param str color: Represents the color that is the target of the condition if the sorting is on font
14
+ or cell color.
15
+ :param str dataOption: Represents additional sorting options for this field.
16
+ Possible values are: Normal, TextAsNumber.
17
+ :param WorkbookIcon icon: Represents the icon that is the target of the condition if the sorting
18
+ is on the cell's icon.
19
+ :param str key: Represents the column (or row, depending on the sort orientation) that the condition is on.
20
+ Represented as an offset from the first column (or row).
21
+ """
22
+ self.ascending = ascending
23
+ self.color = color
24
+ self.dataOption = dataOption
25
+ self.icon = icon
26
+ self.key = key
@@ -0,0 +1,16 @@
1
+ from office365.entity_collection import EntityCollection
2
+ from office365.onedrive.workbooks.tables.pivot_table import WorkbookPivotTable
3
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+
5
+
6
+ class WorkbookPivotTableCollection(EntityCollection[WorkbookPivotTable]):
7
+ def __init__(self, context, resource_path=None):
8
+ super(WorkbookPivotTableCollection, self).__init__(
9
+ context, WorkbookPivotTable, resource_path
10
+ )
11
+
12
+ def refresh_all(self):
13
+ """Refreshes the PivotTable."""
14
+ qry = ServiceOperationQuery(self, "refreshAll")
15
+ self.context.add_query(qry)
16
+ return self
@@ -7,6 +7,9 @@ class WorkbookWorksheetProtectionOptions(ClientValue):
7
7
  def __init__(
8
8
  self, allowAutoFilter=None, allowDeleteColumns=None, allowDeleteRows=None
9
9
  ):
10
+ """
11
+ :param bool allowAutoFilter:
12
+ """
10
13
  self.allowAutoFilter = allowAutoFilter
11
14
  self.allowDeleteColumns = allowDeleteColumns
12
15
  self.allowDeleteRows = allowDeleteRows
@@ -6,7 +6,9 @@ from office365.onedrive.workbooks.charts.chart import WorkbookChart
6
6
  from office365.onedrive.workbooks.names.named_item import WorkbookNamedItem
7
7
  from office365.onedrive.workbooks.ranges.range import WorkbookRange
8
8
  from office365.onedrive.workbooks.tables.collection import WorkbookTableCollection
9
- from office365.onedrive.workbooks.tables.pivot_table import WorkbookPivotTable
9
+ from office365.onedrive.workbooks.tables.pivot_table_collection import (
10
+ WorkbookPivotTableCollection,
11
+ )
10
12
  from office365.onedrive.workbooks.worksheets.protection import (
11
13
  WorkbookWorksheetProtection,
12
14
  )
@@ -94,13 +96,12 @@ class WorkbookWorksheet(Entity):
94
96
 
95
97
  @property
96
98
  def pivot_tables(self):
97
- # type: () -> EntityCollection[WorkbookPivotTable]
99
+ # type: () -> WorkbookPivotTableCollection
98
100
  """Collection of PivotTables that are part of the worksheet."""
99
101
  return self.properties.get(
100
102
  "pivotTables",
101
- EntityCollection(
103
+ WorkbookPivotTableCollection(
102
104
  self.context,
103
- WorkbookPivotTable,
104
105
  ResourcePath("pivotTables", self.resource_path),
105
106
  ),
106
107
  )
@@ -7,8 +7,15 @@ from office365.sharepoint.activities.facets.delete import DeleteFacet
7
7
  from office365.sharepoint.activities.facets.discard_checkout import DiscardCheckoutFacet
8
8
  from office365.sharepoint.activities.facets.edit import EditFacet
9
9
  from office365.sharepoint.activities.facets.get_comment import GetCommentFacet
10
+ from office365.sharepoint.activities.facets.get_mention import GetMentionFacet
11
+ from office365.sharepoint.activities.facets.move import MoveFacet
12
+ from office365.sharepoint.activities.facets.point_in_time_restore import (
13
+ PointInTimeRestoreFacet,
14
+ )
10
15
  from office365.sharepoint.activities.facets.rename import RenameFacet
11
16
  from office365.sharepoint.activities.facets.sharing import SharingFacet
17
+ from office365.sharepoint.activities.facets.task_completed import TaskCompletedFacet
18
+ from office365.sharepoint.activities.facets.version import VersionFacet
12
19
 
13
20
 
14
21
  class ActionFacet(ClientValue):
@@ -22,8 +29,13 @@ class ActionFacet(ClientValue):
22
29
  delete=DeleteFacet(),
23
30
  discard_checkout=DiscardCheckoutFacet(),
24
31
  edit=EditFacet(),
32
+ mention=GetMentionFacet(),
33
+ move=MoveFacet(),
34
+ pointInTimeRestore=PointInTimeRestoreFacet(),
25
35
  rename=RenameFacet(),
26
36
  share=SharingFacet(),
37
+ taskCompleted=TaskCompletedFacet(),
38
+ version=VersionFacet(),
27
39
  ):
28
40
  """
29
41
  :param AddToOneDriveFacet add_to_one_drive:
@@ -42,8 +54,13 @@ class ActionFacet(ClientValue):
42
54
  self.delete = delete
43
55
  self.discardCheckout = discard_checkout
44
56
  self.edit = edit
57
+ self.mention = mention
58
+ self.move = move
59
+ self.pointInTimeRestore = pointInTimeRestore
45
60
  self.rename = rename
46
61
  self.share = share
62
+ self.taskCompleted = taskCompleted
63
+ self.version = version
47
64
 
48
65
  def __repr__(self):
49
66
  return self.facet_type
@@ -1,7 +1,11 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.sharepoint.activities.facets.revision_set import RevisionSetFacet
2
3
 
3
4
 
4
5
  class ActivityClientRequest(ClientValue):
6
+ def __init__(self, revisionSet=RevisionSetFacet()):
7
+ self.revisionSet = revisionSet
8
+
5
9
  @property
6
10
  def entity_type_name(self):
7
11
  return "Microsoft.SharePoint.Activities.ActivityClientRequest"
@@ -4,6 +4,14 @@ from office365.runtime.client_value import ClientValue
4
4
  class ActivityClientResponse(ClientValue):
5
5
  """"""
6
6
 
7
+ def __init__(self, id_, message=None, serverId=None, status=None):
8
+ # type: (str, str, str, int) -> None
9
+ """ """
10
+ self.id = id_
11
+ self.message = message
12
+ self.serverId = serverId
13
+ self.status = status
14
+
7
15
  @property
8
16
  def entity_type_name(self):
9
17
  return "Microsoft.SharePoint.Activities.ActivityClientResponse"
@@ -34,6 +34,16 @@ class SPActivityEntity(Entity):
34
34
  def times(self):
35
35
  return self.properties.get("times", ActivityTimeFacet())
36
36
 
37
+ @property
38
+ def property_ref_name(self):
39
+ return "id"
40
+
37
41
  @property
38
42
  def entity_type_name(self):
39
43
  return "Microsoft.SharePoint.Activities.SPActivityEntity"
44
+
45
+ def set_property(self, name, value, persist_changes=True):
46
+ super(SPActivityEntity, self).set_property(name, value, persist_changes)
47
+ if name == self.property_ref_name:
48
+ self._resource_path.patch(value)
49
+ return self
@@ -5,6 +5,7 @@ class DeleteFacet(ClientValue):
5
5
  """"""
6
6
 
7
7
  def __init__(self, name=None):
8
+ # type: (str) -> None
8
9
  self.name = name
9
10
 
10
11
  @property
@@ -0,0 +1,10 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.activities.identity import ActivityIdentity
4
+
5
+
6
+ class GetMentionFacet(ClientValue):
7
+ """"""
8
+
9
+ def __init__(self, mentionees=None):
10
+ self.mentionees = ClientValueCollection(ActivityIdentity, mentionees)
@@ -4,6 +4,10 @@ from office365.runtime.client_value import ClientValue
4
4
  class InDocFacet(ClientValue):
5
5
  """"""
6
6
 
7
+ def __init__(self, contentId=None, navigationId=None):
8
+ self.contentId = contentId
9
+ self.navigationId = navigationId
10
+
7
11
  @property
8
12
  def entity_type_name(self):
9
13
  return "Microsoft.SharePoint.Activities.InDocFacet"
@@ -0,0 +1,14 @@
1
+ from office365.runtime.client_value import ClientValue
2
+ from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
3
+
4
+
5
+ class MoveFacet(ClientValue):
6
+ """"""
7
+
8
+ def __init__(self, from_=SPResPath(), to=SPResPath()):
9
+ self.from_ = from_
10
+ self.to = to
11
+
12
+ @property
13
+ def entity_type_name(self):
14
+ return "Microsoft.SharePoint.Activities.MoveFacet"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class PointInTimeRestoreFacet(ClientValue):
5
+ """"""
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Activities.PointInTimeRestoreFacet"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class RevisionSetFacet(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Activities.RevisionSetFacet"
@@ -0,0 +1,9 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TaskCompletedFacet(ClientValue):
5
+ """ """
6
+
7
+ @property
8
+ def entity_type_name(self):
9
+ return "Microsoft.SharePoint.Activities.TaskCompletedFacet"