Office365-REST-Python-Client 2.5.6__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 (147) hide show
  1. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/METADATA +5 -5
  2. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/RECORD +147 -96
  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/administrative_unit.py +9 -2
  8. office365/directory/applications/roles/collection.py +5 -1
  9. office365/directory/applications/roles/role.py +1 -1
  10. office365/directory/audit/provisioning/object_summary.py +30 -1
  11. office365/directory/authentication/methods/fido.py +8 -0
  12. office365/directory/authentication/methods/password.py +23 -0
  13. office365/directory/custom_security_attribute_definition.py +7 -0
  14. office365/directory/device_local_credential_info.py +6 -0
  15. office365/directory/directory.py +40 -12
  16. office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
  17. office365/directory/identitygovernance/entitlementmanagement/entitlement_management.py +7 -0
  18. office365/directory/identitygovernance/governance.py +16 -0
  19. office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
  20. office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
  21. office365/directory/insights/resource_reference.py +1 -1
  22. office365/directory/policies/device_registration.py +6 -0
  23. office365/directory/policies/root.py +13 -0
  24. office365/directory/security/threatintelligence/article_indicator.py +7 -0
  25. office365/directory/serviceprincipals/service_principal.py +109 -25
  26. office365/directory/synchronization/schema.py +16 -0
  27. office365/directory/users/user.py +23 -0
  28. office365/graph_client.py +8 -0
  29. office365/onedrive/driveitems/driveItem.py +86 -6
  30. office365/onedrive/driveitems/retention_label.py +25 -0
  31. office365/onedrive/lists/list.py +1 -1
  32. office365/onedrive/sitepages/__init__.py +0 -0
  33. office365/onedrive/sitepages/base.py +29 -0
  34. office365/onedrive/sitepages/canvas_layout.py +43 -0
  35. office365/onedrive/sitepages/collection.py +32 -0
  36. office365/onedrive/sitepages/horizontal_section.py +23 -0
  37. office365/onedrive/sitepages/horizontal_section_column.py +27 -0
  38. office365/onedrive/sitepages/site_page.py +116 -0
  39. office365/onedrive/sitepages/title_area.py +13 -0
  40. office365/onedrive/sitepages/vertical_section.py +27 -0
  41. office365/onedrive/sitepages/web_part.py +5 -0
  42. office365/onedrive/sites/site.py +10 -0
  43. office365/onedrive/workbooks/charts/chart.py +13 -0
  44. office365/onedrive/workbooks/charts/data_labels.py +13 -1
  45. office365/onedrive/workbooks/icon.py +5 -0
  46. office365/onedrive/workbooks/names/named_item.py +6 -0
  47. office365/onedrive/workbooks/ranges/font.py +5 -0
  48. office365/onedrive/workbooks/ranges/format.py +60 -0
  49. office365/onedrive/workbooks/ranges/range.py +12 -0
  50. office365/onedrive/workbooks/ranges/reference.py +6 -0
  51. office365/onedrive/workbooks/sort_field.py +26 -0
  52. office365/onedrive/workbooks/tables/pivot_table_collection.py +16 -0
  53. office365/onedrive/workbooks/tables/sort.py +5 -0
  54. office365/onedrive/workbooks/tables/table.py +57 -0
  55. office365/onedrive/workbooks/worksheets/protection.py +20 -1
  56. office365/onedrive/workbooks/worksheets/protection_options.py +10 -0
  57. office365/onedrive/workbooks/worksheets/worksheet.py +5 -4
  58. office365/outlook/calendar/calendar.py +1 -3
  59. office365/outlook/calendar/events/event.py +45 -0
  60. office365/outlook/calendar/response_status.py +11 -0
  61. office365/outlook/calendar/rooms/room.py +14 -0
  62. office365/outlook/mail/automatic_replies_mailtips.py +5 -0
  63. office365/outlook/mail/conversation.py +1 -3
  64. office365/outlook/mail/folders/folder.py +1 -3
  65. office365/outlook/mail/tips.py +17 -0
  66. office365/planner/plans/plan.py +11 -1
  67. office365/reports/root.py +33 -0
  68. office365/runtime/auth/authentication_context.py +12 -2
  69. office365/runtime/odata/json_format.py +3 -2
  70. office365/runtime/odata/request.py +12 -2
  71. office365/runtime/queries/upload_session.py +5 -0
  72. office365/sharepoint/activities/action_facet.py +17 -0
  73. office365/sharepoint/activities/client_request.py +4 -0
  74. office365/sharepoint/activities/client_response.py +8 -0
  75. office365/sharepoint/activities/entity.py +10 -0
  76. office365/sharepoint/activities/facets/delete.py +1 -0
  77. office365/sharepoint/activities/facets/get_mention.py +10 -0
  78. office365/sharepoint/activities/facets/in_doc.py +4 -0
  79. office365/sharepoint/activities/facets/move.py +14 -0
  80. office365/sharepoint/activities/facets/point_in_time_restore.py +9 -0
  81. office365/sharepoint/activities/facets/revision_set.py +9 -0
  82. office365/sharepoint/activities/facets/task_completed.py +9 -0
  83. office365/sharepoint/activities/facets/version.py +12 -0
  84. office365/sharepoint/activities/identity_item.py +16 -1
  85. office365/sharepoint/alerts/collection.py +2 -1
  86. office365/sharepoint/attachments/attachment.py +6 -9
  87. office365/sharepoint/attachments/collection.py +25 -3
  88. office365/sharepoint/client_context.py +33 -2
  89. office365/sharepoint/comments/collection.py +1 -1
  90. office365/sharepoint/compliance/store_proxy.py +43 -0
  91. office365/sharepoint/contenttypes/content_type.py +13 -1
  92. office365/sharepoint/contenttypes/fieldlinks/collection.py +1 -1
  93. office365/sharepoint/directory/helper.py +2 -0
  94. office365/sharepoint/directory/provider/alternate_id_data.py +9 -0
  95. office365/sharepoint/directory/provider/notification.py +15 -0
  96. office365/sharepoint/directory/provider/object_data.py +14 -0
  97. office365/sharepoint/directory/provider/provider.py +13 -0
  98. office365/sharepoint/entity.py +15 -0
  99. office365/sharepoint/features/collection.py +2 -0
  100. office365/sharepoint/fields/collection.py +4 -3
  101. office365/sharepoint/fields/user_value.py +1 -1
  102. office365/sharepoint/folders/folder.py +3 -5
  103. office365/sharepoint/migrationcenter/deploy_status.py +5 -0
  104. office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
  105. office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
  106. office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
  107. office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
  108. office365/sharepoint/multigeo/move_job_entity_data.py +9 -0
  109. office365/sharepoint/multigeo/site_move_job_entity_data.py +9 -0
  110. office365/sharepoint/multigeo/user_personal_site_location.py +9 -0
  111. office365/sharepoint/permissions/securable_object.py +2 -0
  112. office365/sharepoint/principal/principal.py +2 -4
  113. office365/sharepoint/recyclebin/item.py +107 -7
  114. office365/sharepoint/sharing/information.py +9 -0
  115. office365/sharepoint/sharing/link_info.py +6 -0
  116. office365/sharepoint/sharing/object_sharing_information.py +2 -0
  117. office365/sharepoint/sharing/permission_collection.py +18 -0
  118. office365/sharepoint/sharing/shared_document_info.py +9 -0
  119. office365/sharepoint/sites/script_safe_domain.py +5 -0
  120. office365/sharepoint/sites/site.py +10 -4
  121. office365/sharepoint/sites/version_policy_manager.py +7 -0
  122. office365/sharepoint/taxonomy/field_value.py +1 -1
  123. office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
  124. office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
  125. office365/sharepoint/tenant/administration/secondary_administrators_info.py +5 -0
  126. office365/sharepoint/tenant/administration/tenant.py +14 -0
  127. office365/sharepoint/tenant/cdn_api.py +16 -0
  128. office365/sharepoint/tenant/management/externalusers/results/get.py +4 -0
  129. office365/sharepoint/tenant/management/office365_tenant.py +14 -0
  130. office365/sharepoint/ui/applicationpages/peoplepicker/web_service_interface.py +39 -33
  131. office365/sharepoint/userprofiles/cross_geo_sync.py +37 -0
  132. office365/sharepoint/userprofiles/cross_geo_sync_user_data_batch.py +5 -0
  133. office365/sharepoint/userprofiles/followed_content.py +15 -0
  134. office365/sharepoint/userprofiles/people_manager.py +23 -10
  135. office365/sharepoint/userprofiles/person_properties.py +7 -0
  136. office365/sharepoint/userprofiles/user_profile.py +4 -6
  137. office365/sharepoint/views/view.py +2 -0
  138. office365/sharepoint/webs/information_collection.py +1 -1
  139. office365/sharepoint/webs/regional_settings.py +71 -0
  140. office365/sharepoint/webs/web.py +53 -5
  141. office365/sharepoint/workflowservices/deployment_service.py +9 -0
  142. office365/teams/apps/catalog.py +1 -0
  143. office365/teams/chats/chat.py +4 -0
  144. office365/teams/schedule/schedule.py +6 -2
  145. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/LICENSE +0 -0
  146. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/WHEEL +0 -0
  147. {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/top_level.txt +0 -0
@@ -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"
@@ -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
 
@@ -3,7 +3,7 @@ from office365.sharepoint.entity_collection import EntityCollection
3
3
  from office365.sharepoint.webs.information import WebInformation
4
4
 
5
5
 
6
- class WebInformationCollection(EntityCollection):
6
+ class WebInformationCollection(EntityCollection[WebInformation]):
7
7
  """Specifies a collection of objects containing metadata about a site"""
8
8
 
9
9
  def __init__(self, context, resource_path=None):
@@ -9,6 +9,30 @@ from office365.sharepoint.webs.time_zone import TimeZone, TimeZoneCollection
9
9
  class RegionalSettings(Entity):
10
10
  """Represents regional settings that are used on the server that is running SharePoint Server."""
11
11
 
12
+ @property
13
+ def adjust_hijri_days(self):
14
+ # type: () -> Optional[int]
15
+ """Specifies the number of days to extend or reduce the current month in Hijri calendars on the site"""
16
+ return self.properties.get("AdjustHijriDays", None)
17
+
18
+ @property
19
+ def alternate_calendar_type(self):
20
+ # type: () -> Optional[int]
21
+ """Gets an alternate calendar type that is used on the site"""
22
+ return self.properties.get("AlternateCalendarType", None)
23
+
24
+ @property
25
+ def am(self):
26
+ # type: () -> Optional[str]
27
+ """Specifies the string that is used to represent time before midday on the site"""
28
+ return self.properties.get("AM", None)
29
+
30
+ @property
31
+ def calendar_type(self):
32
+ # type: () -> Optional[int]
33
+ """Specifies the calendar type that SHOULD be used when processing date values on the site"""
34
+ return self.properties.get("CalendarType", None)
35
+
12
36
  @property
13
37
  def collation(self):
14
38
  # type: () -> Optional[int]
@@ -19,12 +43,59 @@ class RegionalSettings(Entity):
19
43
  """
20
44
  return self.properties.get("Collation", None)
21
45
 
46
+ @property
47
+ def collation_lcid(self):
48
+ # type: () -> Optional[int]
49
+ """Gets the language code identifier (LCID) for the collation rules that are used on the site"""
50
+ return self.properties.get("CollationLCID", None)
51
+
22
52
  @property
23
53
  def date_format(self):
24
54
  # type: () -> Optional[int]
25
55
  """Gets the date format that is used on the server."""
26
56
  return self.properties.get("DateFormat", None)
27
57
 
58
+ @property
59
+ def date_separator(self):
60
+ # type: () -> Optional[str]
61
+ """Gets the separator that is used for dates on the server."""
62
+ return self.properties.get("DateSeparator", None)
63
+
64
+ @property
65
+ def decimal_separator(self):
66
+ # type: () -> Optional[str]
67
+ """Gets the separator that is used for decimals on the server."""
68
+ return self.properties.get("DecimalSeparator", None)
69
+
70
+ @property
71
+ def digit_grouping(self):
72
+ # type: () -> Optional[str]
73
+ """Gets the separator that is used in grouping digits."""
74
+ return self.properties.get("DigitGrouping", None)
75
+
76
+ @property
77
+ def first_day_of_week(self):
78
+ # type: () -> Optional[int]
79
+ """Specifies the first day of the week used in calendars on the server.
80
+ The possible values are specified in the following table:
81
+
82
+ - 0 Sunday
83
+ - 1 Monday
84
+ - 2 Tuesday
85
+ - 3 Wednesday
86
+ - 4 Thursday
87
+ - 5 Friday
88
+ - 6 Saturday
89
+ """
90
+ return self.properties.get("FirstDayOfWeek", None)
91
+
92
+ @property
93
+ def first_week_of_year(self):
94
+ # type: () -> Optional[int]
95
+ """Specifies the first week of the year used in calendars on the server.
96
+ Specifies which week of a year is considered the first week."""
97
+ return self.properties.get("FirstWeekOfYear", None)
98
+
28
99
  @property
29
100
  def locale_id(self):
30
101
  # type: () -> Optional[int]
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  import datetime
3
- from typing import AnyStr, Optional
3
+ from typing import TYPE_CHECKING, AnyStr, Optional
4
4
 
5
5
  from office365.runtime.client_result import ClientResult
6
6
  from office365.runtime.client_value_collection import ClientValueCollection
@@ -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 (
@@ -106,6 +107,9 @@ from office365.sharepoint.webs.regional_settings import RegionalSettings
106
107
  from office365.sharepoint.webs.template_collection import WebTemplateCollection
107
108
  from office365.sharepoint.webs.theme_info import ThemeInfo
108
109
 
110
+ if TYPE_CHECKING:
111
+ from office365.sharepoint.client_context import ClientContext
112
+
109
113
 
110
114
  class Web(SecurableObject):
111
115
  """
@@ -549,7 +553,9 @@ class Web(SecurableObject):
549
553
  :param int order_by: the column by which to order the Recycle Bin query.
550
554
  :param int item_state: Recycle Bin stage of items to return in the query.
551
555
  """
552
- return_type = RecycleBinItemCollection(self.context)
556
+ return_type = RecycleBinItemCollection(
557
+ self.context, self.recycle_bin.resource_path
558
+ )
553
559
  payload = {
554
560
  "rowLimit": row_limit,
555
561
  "isAscending": is_ascending,
@@ -651,15 +657,14 @@ class Web(SecurableObject):
651
657
  return return_type
652
658
 
653
659
  def get_sharing_link_data(self, link_url):
660
+ # type: (str) -> ClientResult[SharingLinkData]
654
661
  """
655
662
  This method determines basic information about the supplied link URL, including limited data about the object
656
663
  the link URL refers to and any additional sharing link data if the link URL is a tokenized sharing link
657
664
 
658
665
  :param str link_url: A URL that is either a tokenized sharing link or a canonical URL for a document
659
666
  """
660
- return_type = ClientResult(
661
- self.context, SharingLinkData()
662
- ) # type: ClientResult[SharingLinkData]
667
+ return_type = ClientResult(self.context, SharingLinkData())
663
668
  payload = {"linkUrl": link_url}
664
669
  qry = ServiceOperationQuery(
665
670
  self, "GetSharingLinkData", None, payload, None, return_type
@@ -669,6 +674,7 @@ class Web(SecurableObject):
669
674
 
670
675
  @staticmethod
671
676
  def get_context_web_theme_data(context):
677
+ # type: (ClientContext) -> ClientResult[str]
672
678
  """
673
679
  Get ThemeData for the context web.
674
680
 
@@ -1853,12 +1859,52 @@ class Web(SecurableObject):
1853
1859
  # type: () -> Optional[bool]
1854
1860
  return self.properties.get("CustomSiteActionsDisabled", None)
1855
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
+
1856
1890
  @property
1857
1891
  def id(self):
1858
1892
  # type: () -> Optional[str]
1859
1893
  """Specifies the site identifier for the site"""
1860
1894
  return self.properties.get("Id", None)
1861
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
+
1862
1908
  @property
1863
1909
  def access_requests_list(self):
1864
1910
  """"""
@@ -2416,9 +2462,11 @@ class Web(SecurableObject):
2416
2462
  "ClientWebParts": self.client_web_parts,
2417
2463
  "CurrentUser": self.current_user,
2418
2464
  "DescriptionResource": self.description_resource,
2465
+ "DescriptionTranslations": self.description_translations,
2419
2466
  "EffectiveBasePermissions": self.effective_base_permissions,
2420
2467
  "EventReceivers": self.event_receivers,
2421
2468
  "HostedApps": self.hosted_apps,
2469
+ "LastItemModifiedDate": self.last_item_modified_date,
2422
2470
  "ListTemplates": self.list_templates,
2423
2471
  "MultilingualSettings": self.multilingual_settings,
2424
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"
@@ -9,6 +9,7 @@ class AppCatalogs(Entity):
9
9
 
10
10
  @property
11
11
  def teams_apps(self):
12
+ # type: () -> EntityCollection[TeamsApp]
12
13
  """List apps from the Microsoft Teams app catalog."""
13
14
  return self.properties.get(
14
15
  "teamsApps",
@@ -41,6 +41,7 @@ class Chat(Entity):
41
41
 
42
42
  @property
43
43
  def members(self):
44
+ # type: () -> ConversationMemberCollection
44
45
  """A collection of membership records associated with the chat."""
45
46
  return self.properties.setdefault(
46
47
  "members",
@@ -51,6 +52,7 @@ class Chat(Entity):
51
52
 
52
53
  @property
53
54
  def messages(self):
55
+ # type: () -> EntityCollection[ChatMessage]
54
56
  """A collection of all the messages in the chat. Nullable."""
55
57
  return self.properties.get(
56
58
  "messages",
@@ -61,6 +63,7 @@ class Chat(Entity):
61
63
 
62
64
  @property
63
65
  def operations(self):
66
+ # type: () -> EntityCollection[TeamsAsyncOperation]
64
67
  """
65
68
  A collection of all the Teams async operations that ran or are running on the chat. Nullable.
66
69
  """
@@ -75,6 +78,7 @@ class Chat(Entity):
75
78
 
76
79
  @property
77
80
  def tabs(self):
81
+ # type: () -> EntityCollection[TeamsTab]
78
82
  """A collection of all the tabs in the chat."""
79
83
  return self.properties.get(
80
84
  "tabs",
@@ -22,6 +22,7 @@ class Schedule(Entity):
22
22
 
23
23
  @property
24
24
  def open_shift_change_requests(self):
25
+ # type: () -> EntityCollection[OpenShiftChangeRequest]
25
26
  """The shifts in the shifts."""
26
27
  return self.properties.get(
27
28
  "openShiftChangeRequests",
@@ -34,6 +35,7 @@ class Schedule(Entity):
34
35
 
35
36
  @property
36
37
  def shifts(self):
38
+ # type: () -> EntityCollection[Shift]
37
39
  """The shifts in the shifts."""
38
40
  return self.properties.get(
39
41
  "shifts",
@@ -43,7 +45,8 @@ class Schedule(Entity):
43
45
  )
44
46
 
45
47
  @property
46
- def scheduling_group(self):
48
+ def scheduling_groups(self):
49
+ # type: () -> EntityCollection[SchedulingGroup]
47
50
  """The logical grouping of users in the shifts (usually by role)."""
48
51
  return self.properties.get(
49
52
  "schedulingGroups",
@@ -56,6 +59,7 @@ class Schedule(Entity):
56
59
 
57
60
  @property
58
61
  def time_off_reasons(self):
62
+ # type: () -> EntityCollection[TimeOffReason]
59
63
  """The set of reasons for a time off in the schedule."""
60
64
  return self.properties.get(
61
65
  "timeOffReasons",
@@ -70,7 +74,7 @@ class Schedule(Entity):
70
74
  if default_value is None:
71
75
  property_mapping = {
72
76
  "openShiftChangeRequests": self.open_shift_change_requests,
73
- "schedulingGroups": self.scheduling_group,
77
+ "schedulingGroups": self.scheduling_groups,
74
78
  "timeOffReasons": self.time_off_reasons,
75
79
  }
76
80
  default_value = property_mapping.get(name, None)