Office365-REST-Python-Client 2.4.3__py3-none-any.whl → 2.4.4__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 (255) hide show
  1. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +8 -7
  2. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +254 -162
  3. office365/base_item.py +26 -4
  4. office365/communications/calls/invitation_participant_info.py +17 -1
  5. office365/communications/calls/options.py +9 -0
  6. office365/communications/onlinemeetings/provider_type.py +3 -0
  7. office365/communications/presences/presence.py +14 -0
  8. office365/communications/presences/status_message.py +12 -0
  9. office365/directory/audit/signins/activity.py +31 -0
  10. office365/directory/audit/signins/location.py +17 -0
  11. office365/directory/audit/signins/signin.py +25 -0
  12. office365/directory/authentication/authentication.py +9 -0
  13. office365/directory/authentication/methods/details.py +18 -0
  14. office365/directory/authentication/methods/email.py +16 -0
  15. office365/directory/authentication/methods/root.py +10 -0
  16. office365/directory/certificates/authority.py +6 -1
  17. office365/directory/extensions/extended_property.py +8 -1
  18. office365/directory/extensions/extension_property.py +0 -3
  19. office365/directory/extensions/open_type.py +8 -0
  20. office365/directory/groups/group.py +2 -1
  21. office365/directory/identities/governance.py +2 -0
  22. office365/directory/insights/shared.py +15 -1
  23. office365/directory/insights/usage_details.py +16 -0
  24. office365/directory/insights/used.py +7 -0
  25. office365/directory/licenses/assigned_plan.py +14 -2
  26. office365/directory/licenses/service_plan_info.py +4 -0
  27. office365/directory/licenses/subscribed_sku.py +26 -0
  28. office365/directory/licenses/units_detail.py +11 -0
  29. office365/directory/permissions/email_identity.py +5 -0
  30. office365/directory/permissions/grants/condition_set.py +26 -0
  31. office365/directory/permissions/grants/resource_specific.py +21 -0
  32. office365/directory/policies/authentication_flows.py +9 -0
  33. office365/directory/policies/authentication_strength.py +10 -0
  34. office365/directory/policies/authorization.py +8 -0
  35. office365/directory/policies/cross_tenant_access.py +5 -0
  36. office365/directory/policies/root.py +35 -2
  37. office365/directory/rolemanagement/template.py +8 -0
  38. office365/directory/rolemanagement/unified_role_assignment.py +37 -0
  39. office365/directory/security/alerts/alert.py +21 -0
  40. office365/directory/security/alerts/history_state.py +5 -0
  41. office365/directory/security/attacksimulations/automation.py +21 -0
  42. office365/directory/security/attacksimulations/automation_run.py +5 -0
  43. office365/directory/security/attacksimulations/repeat_offender.py +6 -0
  44. office365/directory/security/attacksimulations/root.py +26 -0
  45. office365/directory/security/attacksimulations/simulation.py +17 -0
  46. office365/directory/security/cases/ediscovery.py +6 -0
  47. office365/directory/security/cases/root.py +22 -0
  48. office365/directory/security/incidents/incident.py +67 -0
  49. office365/directory/security/security.py +10 -1
  50. office365/directory/serviceprincipals/service_principal.py +88 -3
  51. office365/directory/synchronization/job.py +16 -0
  52. office365/directory/synchronization/progress.py +5 -0
  53. office365/directory/synchronization/status.py +13 -0
  54. office365/directory/synchronization/synchronization.py +24 -0
  55. office365/directory/tenant_information.py +12 -0
  56. office365/directory/users/password_profile.py +15 -3
  57. office365/directory/users/user.py +136 -8
  58. office365/graph_client.py +28 -1
  59. office365/intune/audit/actor.py +5 -0
  60. office365/intune/audit/event.py +21 -25
  61. office365/intune/audit/event_collection.py +26 -0
  62. office365/intune/audit/property.py +5 -0
  63. office365/intune/audit/resource.py +11 -0
  64. office365/intune/brand.py +6 -0
  65. office365/intune/devices/compliance/__init__.py +0 -0
  66. office365/intune/devices/compliance/policy.py +6 -0
  67. office365/intune/devices/compliance/policy_state.py +5 -0
  68. office365/intune/devices/enrollment/__init__.py +0 -0
  69. office365/intune/devices/enrollment/configuration.py +25 -0
  70. office365/intune/devices/enrollment/configuration_assignment.py +5 -0
  71. office365/intune/devices/enrollment/limit_configuration.py +5 -0
  72. office365/intune/devices/managed.py +28 -3
  73. office365/intune/devices/management/__init__.py +0 -0
  74. office365/intune/devices/management/management.py +69 -0
  75. office365/intune/devices/management/reports/__init__.py +0 -0
  76. office365/intune/devices/management/reports/reports.py +5 -0
  77. office365/intune/devices/management/settings.py +18 -0
  78. office365/intune/organizations/branding.py +15 -0
  79. office365/intune/organizations/organization.py +14 -0
  80. office365/intune/printing/base.py +11 -0
  81. office365/intune/printing/capabilities.py +5 -0
  82. office365/intune/printing/connectors/__init__.py +0 -0
  83. office365/intune/printing/connectors/connector.py +6 -0
  84. office365/intune/printing/operations/__init__.py +0 -0
  85. office365/intune/printing/print.py +24 -0
  86. office365/intune/printing/printer.py +6 -0
  87. office365/intune/printing/services/__init__.py +0 -0
  88. office365/intune/printing/services/endpoint.py +5 -0
  89. office365/intune/printing/services/service.py +17 -0
  90. office365/intune/printing/share.py +5 -0
  91. office365/intune/printing/shares/__init__.py +0 -0
  92. office365/intune/printing/taskdefinitions/__init__.py +0 -0
  93. office365/intune/provisioned_plan.py +5 -1
  94. office365/intune/servicecommunications/issues/issue.py +15 -0
  95. office365/intune/vpp_token.py +10 -0
  96. office365/onedrive/columns/content_approval_status.py +5 -0
  97. office365/onedrive/columns/datetime.py +15 -0
  98. office365/onedrive/columns/definition.py +49 -3
  99. office365/onedrive/columns/definition_collection.py +17 -6
  100. office365/onedrive/columns/types.py +13 -0
  101. office365/onedrive/driveitems/audio.py +12 -1
  102. office365/onedrive/driveitems/driveItem.py +66 -15
  103. office365/onedrive/driveitems/image.py +8 -1
  104. office365/onedrive/driveitems/remote_item.py +19 -4
  105. office365/onedrive/drives/recipient.py +4 -0
  106. office365/onedrive/files/system_info.py +8 -6
  107. office365/onedrive/lists/collection.py +11 -5
  108. office365/onedrive/lists/list.py +13 -5
  109. office365/onedrive/operations/pending.py +13 -0
  110. office365/onedrive/operations/pending_content_update.py +5 -0
  111. office365/onedrive/permissions/collection.py +1 -1
  112. office365/onedrive/sensitivitylabels/__init__.py +0 -0
  113. office365/onedrive/sensitivitylabels/assignment.py +17 -0
  114. office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
  115. office365/onedrive/sensitivitylabels/extract_result.py +13 -0
  116. office365/onedrive/sharepoint_settings.py +25 -0
  117. office365/outlook/calendar/calendar.py +116 -5
  118. office365/outlook/calendar/dateTimeTimeZone.py +3 -0
  119. office365/outlook/calendar/email_address.py +7 -0
  120. office365/outlook/calendar/events/event.py +0 -4
  121. office365/outlook/calendar/events/reminder.py +22 -3
  122. office365/outlook/calendar/group.py +0 -2
  123. office365/outlook/calendar/location_constraint.py +16 -1
  124. office365/outlook/calendar/permissions/__init__.py +0 -0
  125. office365/outlook/calendar/permissions/collection.py +24 -0
  126. office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
  127. office365/outlook/calendar/role_type.py +17 -0
  128. office365/outlook/calendar/sharing_message.py +2 -2
  129. office365/outlook/calendar/time_zone_base.py +3 -0
  130. office365/outlook/calendar/working_hours.py +17 -1
  131. office365/outlook/contacts/collection.py +39 -0
  132. office365/outlook/contacts/contact.py +21 -11
  133. office365/outlook/geo_coordinates.py +20 -0
  134. office365/outlook/item.py +5 -2
  135. office365/outlook/locale_info.py +3 -0
  136. office365/outlook/mail/folders/folder.py +51 -2
  137. office365/outlook/mail/folders/search.py +11 -0
  138. office365/outlook/mail/importance.py +1 -0
  139. office365/outlook/mail/item_body.py +3 -0
  140. office365/outlook/mail/location.py +27 -2
  141. office365/outlook/mail/location_constraint_item.py +5 -0
  142. office365/outlook/mail/messages/collection.py +7 -0
  143. office365/outlook/mail/messages/followup_flag.py +21 -0
  144. office365/outlook/mail/messages/internet_header.py +16 -0
  145. office365/outlook/mail/messages/message.py +183 -4
  146. office365/outlook/mail/messages/rules/actions.py +33 -0
  147. office365/outlook/mail/patterned_recurrence.py +14 -1
  148. office365/outlook/mail/physical_address.py +5 -1
  149. office365/outlook/mail/recipient.py +3 -0
  150. office365/outlook/mail/recurrence_pattern.py +18 -1
  151. office365/outlook/mail/recurrence_range.py +16 -2
  152. office365/reports/root.py +19 -1
  153. office365/reports/security/__init__.py +0 -0
  154. office365/reports/security/root.py +21 -0
  155. office365/reports/userregistration/__init__.py +0 -0
  156. office365/reports/userregistration/method_count.py +17 -0
  157. office365/reports/userregistration/method_summary.py +21 -0
  158. office365/sharepoint/activities/logger.py +25 -0
  159. office365/sharepoint/addtoonedrive/mount_point.py +25 -0
  160. office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
  161. office365/sharepoint/alerts/alert.py +31 -0
  162. office365/sharepoint/changes/item.py +14 -0
  163. office365/sharepoint/client_context.py +6 -0
  164. office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
  165. office365/sharepoint/clientsidecomponent/identifier.py +3 -0
  166. office365/sharepoint/compliance/tag_info.py +17 -0
  167. office365/sharepoint/contenttypes/content_type.py +42 -0
  168. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
  169. office365/sharepoint/features/known_list.py +2 -0
  170. office365/sharepoint/fields/collection.py +60 -41
  171. office365/sharepoint/fields/creation_information.py +5 -4
  172. office365/sharepoint/fields/field.py +73 -15
  173. office365/sharepoint/fields/user.py +3 -3
  174. office365/sharepoint/files/file.py +9 -4
  175. office365/sharepoint/folders/coloring.py +39 -0
  176. office365/sharepoint/folders/coloring_information.py +15 -0
  177. office365/sharepoint/folders/folder.py +21 -10
  178. office365/sharepoint/forms/customization.py +8 -0
  179. office365/sharepoint/listitems/listitem.py +10 -3
  180. office365/sharepoint/lists/bloom_filter.py +0 -1
  181. office365/sharepoint/lists/creation_information.py +18 -4
  182. office365/sharepoint/lists/list.py +199 -24
  183. office365/sharepoint/lists/render_data_parameters.py +21 -1
  184. office365/sharepoint/navigation/configured_metadata_items.py +25 -1
  185. office365/sharepoint/navigation/metadata_settings.py +6 -4
  186. office365/sharepoint/permissions/irm/file_settings.py +43 -0
  187. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
  188. office365/sharepoint/publishing/base_custom_property.py +8 -0
  189. office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
  190. office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
  191. office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
  192. office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
  193. office365/sharepoint/publishing/pages/page.py +4 -1
  194. office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
  195. office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
  196. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
  197. office365/sharepoint/search/query/auto_completion_match.py +3 -0
  198. office365/sharepoint/search/query/property_value.py +18 -0
  199. office365/sharepoint/search/request.py +16 -2
  200. office365/sharepoint/sharing/abilities.py +22 -0
  201. office365/sharepoint/sharing/direct_abilities.py +27 -0
  202. office365/sharepoint/sharing/link_abilities.py +9 -1
  203. office365/sharepoint/sharing/links/data.py +26 -1
  204. office365/sharepoint/sharing/links/info.py +1 -1
  205. office365/sharepoint/sharing/links/partial_success_response.py +5 -0
  206. office365/sharepoint/sharing/links/share_settings.py +24 -1
  207. office365/sharepoint/sharing/object_sharing_information.py +65 -2
  208. office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
  209. office365/sharepoint/sharing/object_sharing_settings.py +17 -4
  210. office365/sharepoint/sharing/principal.py +10 -0
  211. office365/sharepoint/sharing/securable_object_extensions.py +1 -17
  212. office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
  213. office365/sharepoint/sharing/user_sharing_result.py +18 -8
  214. office365/sharepoint/sitehealth/result.py +10 -0
  215. office365/sharepoint/sites/language.py +11 -1
  216. office365/sharepoint/sites/language_collection.py +1 -0
  217. office365/sharepoint/sites/site.py +34 -6
  218. office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
  219. office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
  220. office365/sharepoint/tenant/administration/tenant.py +1 -0
  221. office365/sharepoint/tenant/apps/information.py +3 -1
  222. office365/sharepoint/tenant/management/office365_tenant.py +0 -1
  223. office365/sharepoint/types/resource_path.py +3 -1
  224. office365/sharepoint/userprofiles/people_manager.py +0 -2
  225. office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
  226. office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
  227. office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
  228. office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
  229. office365/sharepoint/webs/web.py +2 -3
  230. office365/subscriptions/collection.py +12 -6
  231. office365/subscriptions/subscription.py +119 -1
  232. office365/teams/channels/iIdentity.py +5 -0
  233. office365/teams/chats/collection.py +1 -2
  234. office365/teams/chats/messages/info.py +9 -0
  235. office365/teams/chats/messages/message.py +17 -2
  236. office365/teams/members/aad_user_conversation.py +2 -2
  237. office365/teams/members/conversation_collection.py +3 -3
  238. office365/teams/schedule/change_tracked_entity.py +11 -2
  239. office365/teams/tabs/configuration.py +12 -1
  240. office365/teams/tabs/tab.py +0 -1
  241. office365/teams/team.py +23 -1
  242. office365/teams/teamwork/__init__.py +0 -0
  243. office365/teams/teamwork/activity_topic.py +5 -0
  244. office365/teams/teamwork/tags/__init__.py +0 -0
  245. office365/teams/teamwork/tags/member.py +5 -0
  246. office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
  247. office365/intune/devices/management.py +0 -35
  248. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
  249. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
  250. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
  251. /office365/{teams/messages → directory/security/cases}/__init__.py +0 -0
  252. /office365/{teams/tags → directory/synchronization}/__init__.py +0 -0
  253. /office365/teams/{tags → teamwork/tags}/identity.py +0 -0
  254. /office365/teams/{tags → teamwork/tags}/tag.py +0 -0
  255. /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
@@ -86,8 +86,6 @@ class Event(OutlookItem):
86
86
  def start(self):
87
87
  """
88
88
  The date, time, and time zone that the event starts. By default, the start time is in UTC.
89
-
90
- :rtype: DateTimeTimeZone
91
89
  """
92
90
  return self.properties.get("start", DateTimeTimeZone())
93
91
 
@@ -104,8 +102,6 @@ class Event(OutlookItem):
104
102
  def end(self):
105
103
  """
106
104
  The date, time, and time zone that the event starts. By default, the start time is in UTC.
107
-
108
- :rtype: DateTimeTimeZone
109
105
  """
110
106
  return self.properties.get("end", DateTimeTimeZone())
111
107
 
@@ -1,15 +1,34 @@
1
+ from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
2
+ from office365.outlook.mail.location import Location
1
3
  from office365.runtime.client_value import ClientValue
2
4
 
3
5
 
4
6
  class Reminder(ClientValue):
5
7
  """A reminder for an event in a user calendar."""
6
8
 
7
- def __init__(self, event_id=None, event_location=None):
9
+ def __init__(self, change_key=None, event_end_time=DateTimeTimeZone(), event_id=None, event_location=Location(),
10
+ event_start_time=DateTimeTimeZone(), event_subject=None, event_web_link=None,
11
+ reminder_fire_time=DateTimeTimeZone()):
8
12
  """
9
-
13
+ :param str change_key: Identifies the version of the reminder. Every time the reminder is changed, changeKey
14
+ changes as well. This allows Exchange to apply changes to the correct version of the object.
15
+ :param DateTimeTimeZone event_end_time: The date, time and time zone that the event ends.
10
16
  :param str event_id: The unique ID of the event. Read only.
11
- :param str event_location:
17
+ :param Location event_location: The location of the event.
18
+ :param DateTimeTimeZone event_start_time: The date, time, and time zone that the event starts.
19
+ :param str event_subject: The text of the event's subject line.
20
+ :param str event_web_link: The URL to open the event in Outlook on the web.
21
+ The event will open in the browser if you are logged in to your mailbox via Outlook on the web.
22
+ You will be prompted to login if you are not already logged in with the browser.
23
+ This URL cannot be accessed from within an iFrame.
24
+ :param DateTimeTimeZone reminder_fire_time: The date, time, and time zone that the reminder is set to occur.
12
25
  """
13
26
  super(Reminder, self).__init__()
27
+ self.changeKey = change_key
28
+ self.eventStartTime = event_start_time
29
+ self.eventEndTime = event_end_time
14
30
  self.eventId = event_id
15
31
  self.eventLocation = event_location
32
+ self.eventSubject = event_subject
33
+ self.eventWebLink = event_web_link
34
+ self.reminderFireTime = reminder_fire_time
@@ -13,7 +13,6 @@ class CalendarGroup(Entity):
13
13
  def name(self):
14
14
  """
15
15
  The group name.
16
-
17
16
  :rtype: str
18
17
  """
19
18
  return self.properties.get("name", None)
@@ -22,7 +21,6 @@ class CalendarGroup(Entity):
22
21
  def class_id(self):
23
22
  """
24
23
  The class identifier
25
-
26
24
  :rtype: str
27
25
  """
28
26
  return self.properties.get("classId", None)
@@ -1,6 +1,21 @@
1
+ from office365.outlook.mail.location_constraint_item import LocationConstraintItem
1
2
  from office365.runtime.client_value import ClientValue
3
+ from office365.runtime.client_value_collection import ClientValueCollection
2
4
 
3
5
 
4
6
  class LocationConstraint(ClientValue):
5
7
  """The conditions stated by a client for the location of a meeting."""
6
- pass
8
+
9
+ def __init__(self, is_required=None, locations=None, suggest_location=None):
10
+ """
11
+ :param bool is_required: The client requests the service to include in the response a meeting location
12
+ for the meeting. If this is true and all the resources are busy, findMeetingTimes will not return any
13
+ meeting time suggestions. If this is false and all the resources are busy, findMeetingTimes would still
14
+ look for meeting times without locations.
15
+ :param list[LocationConstraintItem] locations: Constraint information for one or more locations that the client
16
+ requests for the meeting
17
+ :param bool suggest_location: The client requests the service to suggest one or more meeting locations.
18
+ """
19
+ self.isRequired = is_required
20
+ self.locations = ClientValueCollection(LocationConstraintItem, locations)
21
+ self.suggestLocation = suggest_location
File without changes
@@ -0,0 +1,24 @@
1
+ from office365.entity_collection import EntityCollection
2
+ from office365.outlook.calendar.email_address import EmailAddress
3
+ from office365.outlook.calendar.permissions.permission import CalendarPermission
4
+
5
+
6
+ class CalendarPermissionCollection(EntityCollection):
7
+
8
+ def __init__(self, context, resource_path=None):
9
+ super(CalendarPermissionCollection, self).__init__(context, CalendarPermission, resource_path)
10
+
11
+ def add(self, email_address, role):
12
+ """
13
+ Create a calendarPermission resource to specify the identity and role of the user with whom the specified
14
+ calendar is being shared or delegated.
15
+ :param str or EmailAddress email_address: Represents a sharee or delegate who has access to the calendar.
16
+ :param str role: Permission level of the calendar sharee or delegate
17
+ """
18
+ if not isinstance(email_address, EmailAddress):
19
+ email_address = EmailAddress(email_address)
20
+ props = {
21
+ "emailAddress": email_address,
22
+ "role": str(role)
23
+ }
24
+ return super(CalendarPermissionCollection, self).add(**props)
@@ -1,5 +1,6 @@
1
1
  from office365.entity import Entity
2
2
  from office365.outlook.calendar.email_address import EmailAddress
3
+ from office365.runtime.types.collections import StringCollection
3
4
 
4
5
 
5
6
  class CalendarPermission(Entity):
@@ -15,9 +16,17 @@ class CalendarPermission(Entity):
15
16
  the permissions of a sharee or delegate. You cannot update the allowedRoles, emailAddress, isInsideOrganization,
16
17
  or isRemovable property. To change these properties, you should delete the corresponding calendarPermission
17
18
  object and create another sharee or delegate in an Outlook client.
18
-
19
19
  """
20
20
 
21
+ @property
22
+ def allowed_roles(self):
23
+ """
24
+ List of allowed sharing or delegating permission levels for the calendar.
25
+ Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess,
26
+ delegateWithPrivateEventAccess, custom.
27
+ """
28
+ return self.properties.get("allowedRoles", StringCollection())
29
+
21
30
  @property
22
31
  def email_address(self):
23
32
  """
@@ -26,13 +35,37 @@ class CalendarPermission(Entity):
26
35
  """
27
36
  return self.properties.get("emailAddress", EmailAddress())
28
37
 
38
+ @property
39
+ def is_inside_organization(self):
40
+ """
41
+ True if the user in context (sharee or delegate) is inside the same organization as the calendar owner.
42
+ :rtype: bool or None
43
+ """
44
+ return self.properties.get("isInsideOrganization", None)
45
+
29
46
  @property
30
47
  def is_removable(self):
31
48
  """
32
49
  True if the user can be removed from the list of sharees or delegates for the specified calendar,
33
50
  false otherwise. The "My organization" user determines the permissions other people within your organization
34
51
  have to the given calendar. You cannot remove "My organization" as a sharee to a calendar.
35
-
36
52
  :rtype: bool or None
37
53
  """
38
54
  return self.properties.get("isRemovable", None)
55
+
56
+ @property
57
+ def role(self):
58
+ """
59
+ Current permission level of the calendar sharee or delegate.
60
+ :rtype: str or None
61
+ """
62
+ return self.properties.get("role", None)
63
+
64
+ def get_property(self, name, default_value=None):
65
+ if default_value is None:
66
+ property_mapping = {
67
+ "allowedRoles": self.allowed_roles,
68
+ "emailAddress": self.email_address
69
+ }
70
+ default_value = property_mapping.get(name, None)
71
+ return super(CalendarPermission, self).get_property(name, default_value)
@@ -11,3 +11,20 @@ class CalendarRoleType:
11
11
 
12
12
  limitedRead = 2
13
13
  """User is a sharee who can view free/busy status, and titles and locations of the events on the calendar."""
14
+
15
+ read = 3
16
+ """User is a sharee who can view all the details of the events on the calendar, except for the owner's private
17
+ events."""
18
+
19
+ write = 4
20
+ """User is a sharee who can view all the details (except for private events) and edit events on the calendar."""
21
+
22
+ delegateWithoutPrivateEventAccess = 5
23
+ """User is a delegate who has write access but cannot view information of the owner's private events on the
24
+ calendar."""
25
+
26
+ delegateWithPrivateEventAccess = 6
27
+ """User is a delegate who has write access and can view information of the owner's private events on the calendar"""
28
+
29
+ custom = 7
30
+ """User has custom permissions to the calendar."""
@@ -1,5 +1,5 @@
1
- from office365.entity import Entity
1
+ from office365.outlook.mail.messages.message import Message
2
2
 
3
3
 
4
- class CalendarSharingMessage(Entity):
4
+ class CalendarSharingMessage(Message):
5
5
  """"""
@@ -10,3 +10,6 @@ class TimeZoneBase(ClientValue):
10
10
  "Hawaii-Aleutian Standard Time", or "Customized Time Zone" for a custom time zone.
11
11
  """
12
12
  self.name = name
13
+
14
+ def __repr__(self):
15
+ return self.name
@@ -1,14 +1,30 @@
1
1
  from office365.outlook.calendar.time_zone_base import TimeZoneBase
2
2
  from office365.runtime.client_value import ClientValue
3
+ from office365.runtime.types.collections import StringCollection
3
4
 
4
5
 
5
6
  class WorkingHours(ClientValue):
6
7
  """
7
8
  Represents the days of the week and hours in a specific time zone that the user works.
9
+
10
+ Having access to a user's working hours is useful in scenarios that handle activity or resource planning.
11
+ You can get and set the working hours of a user as part of the user's mailbox settings.
12
+
13
+ You can choose to set a time zone for your working hours differently from the time zone you have set on your
14
+ Outlook client. This can be useful in cases like when you travel to a different time zone than you usually work in.
15
+ You can set the Outlook client to the destination time zone so that Outlook time values are displayed in local
16
+ time while you are there. When other people request work meetings with you in your usual place of work,
17
+ they can still respect your working hours in the appropriate time zone.
8
18
  """
9
19
 
10
- def __init__(self, timezone=TimeZoneBase()):
20
+ def __init__(self, days_of_week=None, end_time=None, start_time=None, timezone=TimeZoneBase()):
11
21
  """
22
+ :param list[str] days_of_week: The days of the week on which the user works.
12
23
  :param TimeZoneBase timezone: The time zone to which the working hours apply.
24
+ :param str end_time: The time of the day that the user stops working.
25
+ :param str start_time: The time of the day that the user starts working.
13
26
  """
27
+ self.daysOfWeek = StringCollection(days_of_week)
14
28
  self.timeZone = timezone
29
+ self.endTime = end_time
30
+ self.startTime = start_time
@@ -0,0 +1,39 @@
1
+ from office365.delta_collection import DeltaCollection
2
+ from office365.outlook.calendar.email_address import EmailAddress
3
+ from office365.outlook.contacts.contact import Contact
4
+ from office365.runtime.client_value_collection import ClientValueCollection
5
+ from office365.runtime.types.collections import StringCollection
6
+
7
+
8
+ class ContactCollection(DeltaCollection):
9
+
10
+ def __init__(self, context, resource_path=None):
11
+ super(ContactCollection, self).__init__(context, Contact, resource_path)
12
+
13
+ def add(self, given_name, surname, email_address=None, business_phone=None, **kwargs):
14
+ """
15
+ Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder.
16
+ :param str given_name: The contact's given name.
17
+ :param str surname: The contact's surname.
18
+ :param str email_address: Default email address
19
+ :param str business_phone: Default contact's business phone number.
20
+ :rtype: Contact
21
+ """
22
+ def _create_email_address(address):
23
+ return EmailAddress(address, "{0} {1}".format(given_name, surname))
24
+
25
+ kwargs["givenName"] = given_name
26
+ kwargs["surname"] = surname
27
+ if email_address:
28
+ kwargs["emailAddresses"] = ClientValueCollection(EmailAddress,
29
+ [_create_email_address(email_address)])
30
+ if business_phone:
31
+ kwargs["businessPhones"] = StringCollection([business_phone])
32
+ return super(ContactCollection, self).add(**kwargs)
33
+
34
+ def __getitem__(self, key):
35
+ """
36
+ :param int or str key: Contact identifier or index
37
+ :rtype: Contact
38
+ """
39
+ return super(ContactCollection, self).__getitem__(key)
@@ -8,16 +8,32 @@ from office365.outlook.item import OutlookItem
8
8
  from office365.outlook.mail.physical_address import PhysicalAddress
9
9
  from office365.runtime.client_value_collection import ClientValueCollection
10
10
  from office365.runtime.paths.resource_path import ResourcePath
11
+ from office365.runtime.types.collections import StringCollection
11
12
 
12
13
 
13
14
  class Contact(OutlookItem):
14
15
  """User's contact."""
15
16
 
17
+ @property
18
+ def business_phones(self):
19
+ """The contact's business phone numbers."""
20
+ return self.properties.setdefault("businessPhones", StringCollection())
21
+
22
+ @property
23
+ def display_name(self):
24
+ """
25
+ The contact's display name. You can specify the display name in a create or update operation.
26
+ Note that later updates to other properties may cause an automatically generated value to overwrite the
27
+ displayName value you have specified. To preserve a pre-existing value, always include it as displayName
28
+ in an update operation.
29
+ :rtype: str or None
30
+ """
31
+ return self.properties.get('displayName', None)
32
+
16
33
  @property
17
34
  def manager(self):
18
35
  """
19
36
  The name of the contact's manager.
20
-
21
37
  :rtype: str or None
22
38
  """
23
39
  return self.properties.get("manager", None)
@@ -26,7 +42,6 @@ class Contact(OutlookItem):
26
42
  def manager(self, value):
27
43
  """
28
44
  Sets name of the contact's manager.
29
-
30
45
  :type value: str
31
46
  """
32
47
  self.set_property("manager", value)
@@ -49,20 +64,13 @@ class Contact(OutlookItem):
49
64
 
50
65
  @property
51
66
  def home_address(self):
67
+ """The contact's home address."""
52
68
  return self.properties.get("homeAddress", PhysicalAddress())
53
69
 
54
70
  @property
55
71
  def email_addresses(self):
56
72
  """The contact's email addresses."""
57
- return self.properties.get("emailAddresses", ClientValueCollection(EmailAddress))
58
-
59
- @email_addresses.setter
60
- def email_addresses(self, value):
61
- """Sets contact's email addresses.
62
-
63
- :type value: list[str]
64
- """
65
- self.set_property("emailAddresses", value)
73
+ return self.properties.setdefault("emailAddresses", ClientValueCollection(EmailAddress))
66
74
 
67
75
  @property
68
76
  def extensions(self):
@@ -94,7 +102,9 @@ class Contact(OutlookItem):
94
102
  def get_property(self, name, default_value=None):
95
103
  if default_value is None:
96
104
  property_mapping = {
105
+ "businessPhones": self.business_phones,
97
106
  "emailAddresses": self.email_addresses,
107
+ "homeAddress": self.home_address,
98
108
  "multiValueExtendedProperties": self.multi_value_extended_properties,
99
109
  "singleValueExtendedProperties": self.single_value_extended_properties
100
110
  }
@@ -0,0 +1,20 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class OutlookGeoCoordinates(ClientValue):
5
+ """The geographic coordinates, elevation, and their degree of accuracy for a physical location."""
6
+
7
+ def __init__(self, accuracy=None, altitude=None, altitude_accuracy=None, latitude=None, longitude = None):
8
+ """
9
+ :param float accuracy: The accuracy of the latitude and longitude. As an example, the accuracy can be measured
10
+ in meters, such as the latitude and longitude are accurate to within 50 meters.
11
+ :param float altitude: The altitude of the location.
12
+ :param float altitude_accuracy: The accuracy of the altitude.
13
+ :param float latitude: The latitude of the location.
14
+ :param float longitude: The longitude of the location.
15
+ """
16
+ self.accuracy = accuracy
17
+ self.altitude = altitude
18
+ self.altitudeAccuracy = altitude_accuracy
19
+ self.latitude = latitude
20
+ self.longitude = longitude
office365/outlook/item.py CHANGED
@@ -8,8 +8,11 @@ class OutlookItem(Entity):
8
8
 
9
9
  @property
10
10
  def change_key(self):
11
- """Identifies the version of the item. Every time the item is changed, changeKey changes as well.
12
- This allows Exchange to apply changes to the correct version of the object. """
11
+ """
12
+ Identifies the version of the item. Every time the item is changed, changeKey changes as well.
13
+ This allows Exchange to apply changes to the correct version of the object.
14
+ :rtype: str
15
+ """
13
16
  return self.properties.get('ChangeKey', None)
14
17
 
15
18
  @property
@@ -14,3 +14,6 @@ class LocaleInfo(ClientValue):
14
14
  """
15
15
  self.displayName = display_name
16
16
  self.locale = locale
17
+
18
+ def __repr__(self):
19
+ return self.locale
@@ -5,26 +5,74 @@ from office365.entity_collection import EntityCollection
5
5
  from office365.outlook.mail.messages.collection import MessageCollection
6
6
  from office365.outlook.mail.messages.rules.rule import MessageRule
7
7
  from office365.runtime.paths.resource_path import ResourcePath
8
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
8
9
 
9
10
 
10
11
  class MailFolder(Entity):
11
12
  """A mail folder in a user's mailbox, such as Inbox and Drafts. Mail folders can contain messages,
12
13
  other Outlook items, and child mail folders."""
13
14
 
15
+ def copy(self, destination_id):
16
+ """
17
+ Copy a mailfolder and its contents to another mailfolder.
18
+ :param str destination_id: The folder ID, or a well-known folder name. For a list of supported well-known folder
19
+ names, see mailFolder resource type.
20
+ """
21
+ return_type = MailFolder(self.context)
22
+ payload = {"DestinationId": destination_id}
23
+ qry = ServiceOperationQuery(self, "copy", None, payload, None, return_type)
24
+ self.context.add_query(qry)
25
+ return return_type
26
+
27
+ @property
28
+ def child_folder_count(self):
29
+ """
30
+ The number of immediate child mailFolders in the current mailFolder.
31
+ :rtype: int or None
32
+ """
33
+ return self.properties.get("childFolderCount", None)
34
+
14
35
  @property
15
36
  def display_name(self):
16
37
  """
17
38
  The name of the Mail folder
18
-
19
39
  :rtype: str or None
20
40
  """
21
41
  return self.properties.get("displayName", None)
22
42
 
43
+ @property
44
+ def is_hidden(self):
45
+ """
46
+ Indicates whether the mailFolder is hidden. This property can be set only when creating the folder.
47
+ Find more information in Hidden mail folders.
48
+ :rtype: bool or None
49
+ """
50
+ return self.properties.get("isHidden", None)
51
+
52
+ @property
53
+ def parent_folder_id(self):
54
+ """
55
+ The unique identifier for the mailFolder's parent mailFolder.
56
+ :rtype: str or None
57
+ """
58
+ return self.properties.get('parentFolderId', None)
59
+
23
60
  @property
24
61
  def total_item_count(self):
25
- """The number of items in the mailFolder."""
62
+ """
63
+ The number of items in the mailFolder.
64
+ :rtype: int
65
+ """
26
66
  return self.properties.get("totalItemCount", None)
27
67
 
68
+ @property
69
+ def unread_item_count(self):
70
+ """
71
+ The number of items in the mailFolder marked as unread.
72
+ :rtype: int
73
+ """
74
+ return self.properties.get("unreadItemCount", None)
75
+
28
76
  @property
29
77
  def child_folders(self):
30
78
  """The collection of child folders in the mailFolder. """
@@ -34,6 +82,7 @@ class MailFolder(Entity):
34
82
 
35
83
  @property
36
84
  def message_rules(self):
85
+ """"""
37
86
  return self.properties.get('messageRules',
38
87
  EntityCollection(self.context, MessageRule,
39
88
  ResourcePath("messageRules", self.resource_path)))
@@ -0,0 +1,11 @@
1
+ from office365.outlook.mail.folders.folder import MailFolder
2
+
3
+
4
+ class MailSearchFolder(MailFolder):
5
+ """
6
+ A mailSearchFolder is a virtual folder in the user's mailbox that contains all the email items
7
+ matching specified search criteria. mailSearchFolder inherits from mailFolder.
8
+ Search folders can be created in any folder in a user's Exchange Online mailbox. However, for a search folder
9
+ to appear in Outlook, Outlook for the web, or Outlook Live, the folder must be created in the
10
+ WellKnownFolderName.SearchFolders folder.
11
+ """
@@ -1,4 +1,5 @@
1
1
  class Importance:
2
+ """The importance of the message"""
2
3
  def __init__(self):
3
4
  pass
4
5
 
@@ -13,3 +13,6 @@ class ItemBody(ClientValue):
13
13
  super(ItemBody, self).__init__()
14
14
  self.content = content
15
15
  self.contentType = content_type
16
+
17
+ def __repr__(self):
18
+ return self.content
@@ -1,12 +1,37 @@
1
+ from office365.outlook.geo_coordinates import OutlookGeoCoordinates
2
+ from office365.outlook.mail.physical_address import PhysicalAddress
1
3
  from office365.runtime.client_value import ClientValue
4
+ from office365.runtime.client_value_collection import ClientValueCollection
2
5
 
3
6
 
4
7
  class Location(ClientValue):
5
- """Represents location information of an event."""
8
+ """
9
+ Represents location information of an event.
6
10
 
7
- def __init__(self, display_name=None):
11
+ There are multiple ways to create events in a calendar, for example, through an app using the create event REST API,
12
+ or manually using the Outlook user interface. When you create an event using the user interface, you can specify
13
+ the location as plain text (for example, "Harry's Bar"), or from the rooms list provided by Outlook,
14
+ Bing Autosuggest, or Bing local search.
15
+ """
16
+
17
+ def __init__(self, address=PhysicalAddress(), coordinates=None, display_name=None, location_email_address=None,
18
+ location_type=None, location_uri=None, unique_id=None, unique_id_type=None):
8
19
  """
20
+ :param PhysicalAddress address: The street address of the location.
21
+ :param list[OutlookGeoCoordinates] coordinates:
9
22
  :param str display_name: The name associated with the location.
23
+ :param str location_email_address: Optional email address of the location.
24
+ :param str location_type: The type of location.
25
+ :param str location_uri: Optional URI representing the location.
26
+ :param str unique_id: For internal use only.
27
+ :param str unique_id_type: For internal use only.
10
28
  """
11
29
  super(Location, self).__init__()
30
+ self.address = address
31
+ self.coordinates = ClientValueCollection(OutlookGeoCoordinates, coordinates)
12
32
  self.displayName = display_name
33
+ self.locationEmailAddress = location_email_address
34
+ self.locationType = location_type
35
+ self.locationUri = location_uri
36
+ self.uniqueId = unique_id
37
+ self.uniqueIdType = unique_id_type
@@ -0,0 +1,5 @@
1
+ from office365.outlook.mail.location import Location
2
+
3
+
4
+ class LocationConstraintItem(Location):
5
+ """The conditions stated by a client for the location of a meeting."""
@@ -10,6 +10,13 @@ class MessageCollection(DeltaCollection):
10
10
  def __init__(self, context, resource_path=None):
11
11
  super(MessageCollection, self).__init__(context, Message, resource_path)
12
12
 
13
+ def __getitem__(self, key):
14
+ """
15
+ :param int or str key: Message identifier oo index
16
+ :rtype: Message
17
+ """
18
+ return super(MessageCollection, self).__getitem__(key)
19
+
13
20
  def add(self, subject=None, body=None, to_recipients=None, **kwargs):
14
21
  """
15
22
  Create a draft of a new message in either JSON or MIME format.
@@ -0,0 +1,21 @@
1
+ from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
2
+ from office365.runtime.client_value import ClientValue
3
+
4
+
5
+ class FollowupFlag(ClientValue):
6
+ """Allows setting a flag in an item for the user to follow up on later."""
7
+
8
+ def __init__(self, completed_datetime=DateTimeTimeZone(), due_datetime=DateTimeTimeZone(),
9
+ flag_status=None, start_datetime=DateTimeTimeZone()):
10
+ """
11
+ :param DateTimeTimeZone completed_datetime: The date and time that the follow-up was finished.
12
+ :param DateTimeTimeZone due_datetime: The date and time that the follow up is to be finished.
13
+ Note: To set the due date, you must also specify the startDateTime; otherwise, you will
14
+ get a 400 Bad Request response.
15
+ :param str flag_status: The status for follow-up for an item.
16
+ :param DateTimeTimeZone start_datetime: The date and time that the follow-up is to begin.
17
+ """
18
+ self.completedDateTime = completed_datetime
19
+ self.dueDateTime = due_datetime
20
+ self.flagStatus = flag_status
21
+ self.startDateTime = start_datetime
@@ -0,0 +1,16 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class InternetMessageHeader(ClientValue):
5
+ """
6
+ A key-value pair that represents an Internet message header, as defined by RFC5322, that provides details of the
7
+ network path taken by a message from the sender to the recipient.
8
+ """
9
+
10
+ def __init__(self, name=None, value=None):
11
+ """
12
+ :param str name: Represents the key in a key-value pair.
13
+ :param str value:The value in a key-value pair.
14
+ """
15
+ self.name = name
16
+ self.value = value