Office365-REST-Python-Client 2.6.1__py3-none-any.whl → 2.6.2__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.
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +1 -1
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +232 -155
- office365/admin/people_settings.py +16 -0
- office365/admin/sharepoint_settings.py +50 -1
- office365/admin/sharing_capabilities.py +2 -0
- office365/communications/calls/participant.py +6 -0
- office365/communications/onlinemeetings/broadcast_settings.py +5 -0
- office365/communications/onlinemeetings/collection.py +29 -0
- office365/communications/onlinemeetings/online_meeting.py +1 -1
- office365/communications/onlinemeetings/recordings/call.py +5 -0
- office365/communications/onlinemeetings/restricted.py +5 -0
- office365/directory/applications/collection.py +11 -0
- office365/directory/audit/directory.py +31 -0
- office365/directory/audit/signins/signin.py +14 -0
- office365/directory/audit/target_resource.py +5 -0
- office365/directory/authentication/conditions/conditions.py +5 -1
- office365/directory/datapolicy/operation.py +39 -0
- office365/directory/directory.py +13 -0
- office365/directory/identitygovernance/accessreview/instance.py +29 -0
- office365/directory/identitygovernance/accessreview/stage.py +13 -0
- office365/directory/identitygovernance/accessreview/stages.py +11 -0
- office365/directory/identitygovernance/appconsent/request.py +9 -0
- office365/directory/identitygovernance/privilegedaccess/group.py +1 -1
- office365/directory/identitygovernance/privilegedaccess/schedule/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/{group_assignment_schedule_instance.py → schedule/group_assignment_instance.py} +1 -1
- office365/directory/identitygovernance/privilegedaccess/schedule/schedule.py +6 -0
- office365/directory/insights/trending.py +25 -0
- office365/directory/licenses/assignment_state.py +5 -5
- office365/directory/licenses/details.py +6 -0
- office365/directory/permissions/scoped_role_membership.py +8 -0
- office365/directory/policies/applied_conditional_access.py +31 -0
- office365/directory/policies/feature_rollout.py +24 -0
- office365/directory/protection/information.py +73 -2
- office365/directory/protection/riskyusers/collection.py +1 -1
- office365/directory/protection/threatassessment/requests/__init__.py +0 -0
- office365/directory/protection/threatassessment/{email_file_request.py → requests/email_file.py} +9 -1
- office365/directory/protection/threatassessment/requests/file.py +10 -0
- office365/directory/protection/threatassessment/{mail_request.py → requests/mail.py} +1 -1
- office365/directory/protection/threatassessment/requests/url.py +9 -0
- office365/directory/rolemanagement/app_scope.py +14 -0
- office365/directory/rolemanagement/application.py +3 -2
- office365/directory/rolemanagement/role.py +15 -0
- office365/directory/rolemanagement/unifiedrole/__init__.py +0 -0
- office365/directory/rolemanagement/{unified_role_assignment.py → unifiedrole/assignment.py} +37 -1
- office365/directory/rolemanagement/{unified_role_definition.py → unifiedrole/definition.py} +6 -1
- office365/directory/security/alerts/file_security_state.py +5 -0
- office365/directory/security/attacksimulations/automation.py +8 -0
- office365/directory/security/attacksimulations/automation_run.py +8 -0
- office365/directory/security/attacksimulations/repeat_offender.py +7 -0
- office365/directory/security/attacksimulations/report.py +2 -2
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/incidents/incident.py +6 -1
- office365/directory/security/security.py +5 -0
- office365/directory/subscriptions/__init__.py +0 -0
- office365/directory/subscriptions/company.py +7 -0
- office365/directory/synchronization/progress.py +12 -0
- office365/directory/users/activities/activity.py +10 -1
- office365/directory/users/settings.py +51 -1
- office365/directory/users/storage.py +5 -0
- office365/directory/users/user.py +114 -3
- office365/entity_collection.py +21 -0
- office365/onedrive/contenttypes/collection.py +2 -0
- office365/onedrive/driveitems/driveItem.py +3 -2
- office365/onedrive/driveitems/publication_facet.py +6 -1
- office365/onedrive/filestorage/container.py +22 -0
- office365/onedrive/filestorage/container_collection.py +37 -0
- office365/onedrive/filestorage/file_storage.py +4 -4
- office365/onedrive/listitems/collection.py +38 -0
- office365/onedrive/lists/list.py +3 -5
- office365/onedrive/sitepages/base.py +8 -0
- office365/onedrive/sitepages/collection.py +8 -2
- office365/onedrive/sitepages/site_page.py +13 -2
- office365/onedrive/sites/site.py +1 -1
- office365/onedrive/workbooks/charts/title.py +12 -0
- office365/onedrive/workbooks/charts/title_format.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +16 -0
- office365/onedrive/workbooks/ranges/border.py +30 -0
- office365/onedrive/workbooks/ranges/font.py +39 -0
- office365/onedrive/workbooks/ranges/range.py +6 -0
- office365/onedrive/workbooks/worksheets/protection_options.py +34 -5
- office365/outlook/calendar/events/event.py +57 -0
- office365/outlook/mail/automatic_replies_mailtips.py +20 -0
- office365/outlook/mail/folders/folder.py +3 -4
- office365/outlook/mail/messages/message.py +21 -4
- office365/outlook/mail/messages/rules/collection.py +26 -0
- office365/outlook/mail/tips/__init__.py +0 -0
- office365/outlook/mail/tips/error.py +5 -0
- office365/outlook/mail/tips/tips.py +41 -0
- office365/outlook/people/__init__.py +0 -0
- office365/outlook/people/profile_card_property.py +15 -0
- office365/outlook/person.py +7 -0
- office365/planner/category_descriptions.py +6 -0
- office365/planner/external_references.py +7 -0
- office365/planner/planner.py +4 -4
- office365/planner/plans/container.py +12 -0
- office365/planner/plans/details.py +31 -0
- office365/planner/tasks/collection.py +37 -0
- office365/planner/tasks/task.py +24 -0
- office365/planner/tasks/task_details.py +34 -1
- office365/planner/user_ids.py +8 -0
- office365/reports/internal/queries/create_report_query.py +12 -3
- office365/reports/root.py +61 -2
- office365/runtime/auth/authentication_context.py +10 -1
- office365/runtime/auth/sts_profile.py +3 -1
- office365/runtime/client_object.py +1 -1
- office365/runtime/client_object_collection.py +3 -5
- office365/runtime/client_result.py +3 -3
- office365/runtime/client_runtime_context.py +2 -2
- office365/runtime/odata/json_format.py +14 -3
- office365/runtime/odata/request.py +1 -3
- office365/runtime/odata/v3/json_light_format.py +18 -0
- office365/runtime/odata/v4/json_format.py +19 -0
- office365/runtime/queries/client_query.py +13 -8
- office365/runtime/queries/create_entity.py +7 -5
- office365/runtime/queries/delete_entity.py +6 -2
- office365/runtime/queries/function.py +3 -4
- office365/runtime/queries/read_entity.py +3 -5
- office365/runtime/queries/service_operation.py +2 -7
- office365/search/acronyms/__init__.py +0 -0
- office365/search/answer.py +35 -0
- office365/search/bookmarks/__init__.py +0 -0
- office365/search/bookmarks/bookmark.py +7 -0
- office365/search/entity.py +81 -2
- office365/search/entity_type.py +6 -1
- office365/search/external/item.py +5 -0
- office365/search/identity_set.py +11 -0
- office365/search/qnas/__init__.py +0 -0
- office365/search/qnas/qna.py +9 -0
- office365/sharepoint/activities/client_response.py +2 -2
- office365/sharepoint/apps/launcher.py +9 -0
- office365/sharepoint/brandcenter/brand_center.py +26 -0
- office365/sharepoint/client_context.py +19 -1
- office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
- office365/sharepoint/compliance/store_proxy.py +75 -0
- office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
- office365/sharepoint/copilot/file_metadata.py +5 -0
- office365/sharepoint/fields/builtin_field_id.py +8 -0
- office365/sharepoint/files/collection.py +10 -0
- office365/sharepoint/files/file.py +24 -3
- office365/sharepoint/listitems/listitem.py +61 -3
- office365/sharepoint/lists/exporter.py +1 -0
- office365/sharepoint/lists/list.py +37 -3
- office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
- office365/sharepoint/migrationcenter/common/task.py +8 -0
- office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
- office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
- office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
- office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
- office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
- office365/sharepoint/migrationcenter/service/services.py +13 -1
- office365/sharepoint/migrationcenter/service/teams.py +11 -0
- office365/sharepoint/navigation/node.py +7 -16
- office365/sharepoint/policy/license_utilities.py +1 -0
- office365/sharepoint/portal/groups/creation_context.py +11 -0
- office365/sharepoint/portal/groups/service.py +1 -1
- office365/sharepoint/portal/groups/site_manager.py +1 -1
- office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
- office365/sharepoint/publishing/pages/3d/types.py +5 -0
- office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
- office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
- office365/sharepoint/publishing/pages/campaign/types.py +18 -0
- office365/sharepoint/publishing/pages/coauth_state.py +20 -0
- office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
- office365/sharepoint/publishing/pages/metadata.py +0 -10
- office365/sharepoint/publishing/pages/page.py +29 -0
- office365/sharepoint/publishing/pages/service.py +27 -6
- office365/sharepoint/publishing/pages/topics/collection.py +1 -1
- office365/sharepoint/request.py +5 -1
- office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
- office365/sharepoint/sharing/access_request_settings.py +18 -0
- office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
- office365/sharepoint/sharing/information.py +2 -0
- office365/sharepoint/sharing/links/partial_success_response.py +4 -0
- office365/sharepoint/sites/azure_container_Info.py +4 -1
- office365/sharepoint/sites/brand_center_configuration.py +5 -0
- office365/sharepoint/sites/manager/__init__.py +0 -0
- office365/sharepoint/sites/manager/service.py +34 -0
- office365/sharepoint/sites/manager/types.py +5 -0
- office365/sharepoint/sites/site.py +54 -0
- office365/sharepoint/sites/themes.py +5 -0
- office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
- office365/sharepoint/tenant/administration/group.py +34 -0
- office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
- office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
- office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
- office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
- office365/sharepoint/tenant/administration/tenant.py +182 -5
- office365/sharepoint/userprofiles/people_manager.py +3 -1
- office365/sharepoint/utilities/utility.py +16 -0
- office365/sharepoint/webparts/definition.py +26 -0
- office365/sharepoint/webparts/limited_manager.py +53 -0
- office365/sharepoint/webparts/webpart.py +47 -0
- office365/sharepoint/webs/regional_settings.py +27 -0
- office365/sharepoint/webs/web.py +20 -1
- office365/teams/apps/app.py +17 -0
- office365/teams/apps/authorization.py +16 -0
- office365/teams/apps/permission_set.py +14 -0
- office365/teams/apps/resource_specific_permission.py +5 -0
- office365/teams/chats/chat.py +60 -0
- office365/teams/chats/messages/message.py +17 -0
- office365/teams/chats/type.py +13 -0
- office365/teams/chats/viewpoint.py +5 -0
- office365/teams/fun_settings.py +14 -2
- office365/teams/info.py +1 -1
- office365/teams/schedule/entity.py +3 -0
- office365/teams/schedule/shifts/item.py +1 -0
- office365/teams/schedule/shifts/offer/request.py +41 -1
- office365/teams/teamwork/activity_topic.py +5 -0
- office365/teams/teamwork/online_meeting_info.py +21 -0
- office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
- office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
- office365/teams/teamwork/user.py +48 -1
- office365/teams/teamwork/user_identity.py +5 -0
- office365/teams/viva/community.py +13 -0
- office365/teams/viva/employee_experience.py +27 -0
- office365/teams/viva/employee_experience_user.py +16 -0
- office365/teams/viva/learning/courses/self_initiated.py +5 -0
- office365/todo/attachments/task_file.py +3 -0
- office365/todo/checklist_item.py +11 -0
- office365/todo/tasks/list.py +11 -0
- office365/todo/tasks/task.py +31 -0
- office365/outlook/mail/tips.py +0 -17
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.6.1.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
- /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
- /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
- /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
- /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
- /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
|
@@ -120,6 +120,12 @@ class WorkbookRange(Entity):
|
|
|
120
120
|
"""Represents the column number of the first cell in the range. Zero-indexed. Read-only."""
|
|
121
121
|
return self.properties.get("columnIndex", None)
|
|
122
122
|
|
|
123
|
+
@property
|
|
124
|
+
def row_index(self):
|
|
125
|
+
# type: () -> Optional[int]
|
|
126
|
+
"""Returns the row number of the first cell in the range. Zero-indexed. Read-only."""
|
|
127
|
+
return self.properties.get("rowIndex", None)
|
|
128
|
+
|
|
123
129
|
@property
|
|
124
130
|
def format(self):
|
|
125
131
|
"""Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties"""
|
|
@@ -5,11 +5,40 @@ class WorkbookWorksheetProtectionOptions(ClientValue):
|
|
|
5
5
|
"""Represents the protection of a sheet object."""
|
|
6
6
|
|
|
7
7
|
def __init__(
|
|
8
|
-
self,
|
|
8
|
+
self,
|
|
9
|
+
allow_auto_filter=None,
|
|
10
|
+
allow_delete_columns=None,
|
|
11
|
+
allow_delete_rows=None,
|
|
12
|
+
allow_format_cells=None,
|
|
13
|
+
allow_format_columns=None,
|
|
14
|
+
allow_format_rows=None,
|
|
15
|
+
allow_insert_columns=None,
|
|
16
|
+
allow_insert_hyperlinks=None,
|
|
17
|
+
allow_insert_rows=None,
|
|
18
|
+
allow_pivot_tables=None,
|
|
19
|
+
allow_sort=None,
|
|
9
20
|
):
|
|
10
21
|
"""
|
|
11
|
-
:param bool
|
|
22
|
+
:param bool allow_auto_filter: Represents the worksheet protection option of allowing using auto filter feature.
|
|
23
|
+
:param bool allow_delete_columns: Represents the worksheet protection option of allowing deleting columns.
|
|
24
|
+
:param bool allow_delete_rows: Represents the worksheet protection option of allowing deleting rows.
|
|
25
|
+
:param bool allow_format_cells: Represents the worksheet protection option of allowing formatting cells.
|
|
26
|
+
:param bool allow_format_columns: Represents the worksheet protection option of allowing formatting columns.
|
|
27
|
+
:param bool allow_format_rows: Represents the worksheet protection option of allowing formatting rows.
|
|
28
|
+
:param bool allow_insert_columns: Represents the worksheet protection option of allowing inserting columns.
|
|
29
|
+
:param bool allow_insert_hyperlinks: Represents the worksheet protection option of allowing inserting hyperlinks.
|
|
30
|
+
:param bool allow_insert_rows: Represents the worksheet protection option of allowing inserting rows.
|
|
31
|
+
:param bool allow_pivot_tables: Represents the worksheet protection option of allowing using pivot table feature.
|
|
32
|
+
:param bool allow_sort: Represents the worksheet protection option of allowing sorting.
|
|
12
33
|
"""
|
|
13
|
-
self.allowAutoFilter =
|
|
14
|
-
self.allowDeleteColumns =
|
|
15
|
-
self.allowDeleteRows =
|
|
34
|
+
self.allowAutoFilter = allow_auto_filter
|
|
35
|
+
self.allowDeleteColumns = allow_delete_columns
|
|
36
|
+
self.allowDeleteRows = allow_delete_rows
|
|
37
|
+
self.allowFormatCells = allow_format_cells
|
|
38
|
+
self.allowFormatColumns = allow_format_columns
|
|
39
|
+
self.allowFormatRows = allow_format_rows
|
|
40
|
+
self.allowInsertColumns = allow_insert_columns
|
|
41
|
+
self.allowInsertHyperlinks = allow_insert_hyperlinks
|
|
42
|
+
self.allowInsertRows = allow_insert_rows
|
|
43
|
+
self.allowPivotTables = allow_pivot_tables
|
|
44
|
+
self.allowSort = allow_sort
|
|
@@ -78,6 +78,16 @@ class Event(OutlookItem):
|
|
|
78
78
|
self.context.add_query(qry)
|
|
79
79
|
return self
|
|
80
80
|
|
|
81
|
+
def permanent_delete(self):
|
|
82
|
+
"""
|
|
83
|
+
Permanently delete an event and place it in the purges folder in the dumpster in the user's mailbox.
|
|
84
|
+
Email clients such as outlook or outlook on the web can't access permanently deleted items.
|
|
85
|
+
Unless there's a hold set on the mailbox, the items are permanently deleted after a set period of time.
|
|
86
|
+
"""
|
|
87
|
+
qry = ServiceOperationQuery(self, "permanentDelete")
|
|
88
|
+
self.context.add_query(qry)
|
|
89
|
+
return self
|
|
90
|
+
|
|
81
91
|
@property
|
|
82
92
|
def allow_new_time_proposals(self):
|
|
83
93
|
# type: () -> Optional[bool]
|
|
@@ -126,6 +136,53 @@ class Event(OutlookItem):
|
|
|
126
136
|
"""
|
|
127
137
|
return self.properties.get("isAllDay", None)
|
|
128
138
|
|
|
139
|
+
@property
|
|
140
|
+
def is_cancelled(self):
|
|
141
|
+
# type: () -> Optional[bool]
|
|
142
|
+
"""
|
|
143
|
+
Set to true if the event has been canceled.
|
|
144
|
+
"""
|
|
145
|
+
return self.properties.get("isCancelled", None)
|
|
146
|
+
|
|
147
|
+
@property
|
|
148
|
+
def is_draft(self):
|
|
149
|
+
# type: () -> Optional[bool]
|
|
150
|
+
"""
|
|
151
|
+
Set to true if the user has updated the meeting in Outlook but hasn't sent the updates to attendees.
|
|
152
|
+
Set to false if all changes are sent, or if the event is an appointment without any attendees.
|
|
153
|
+
"""
|
|
154
|
+
return self.properties.get("isDraft", None)
|
|
155
|
+
|
|
156
|
+
@property
|
|
157
|
+
def is_online_meeting(self):
|
|
158
|
+
# type: () -> Optional[bool]
|
|
159
|
+
"""
|
|
160
|
+
True if this event has online meeting information
|
|
161
|
+
(that is, onlineMeeting points to an onlineMeetingInfo resource), false otherwise.
|
|
162
|
+
Default is false (onlineMeeting is null). Optional.
|
|
163
|
+
After you set isOnlineMeeting to true, Microsoft Graph initializes onlineMeeting.
|
|
164
|
+
Subsequently, Outlook ignores any further changes to isOnlineMeeting, and the meeting remains available online.
|
|
165
|
+
"""
|
|
166
|
+
return self.properties.get("isOnlineMeeting", None)
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def is_organizer(self):
|
|
170
|
+
# type: () -> Optional[bool]
|
|
171
|
+
"""
|
|
172
|
+
Set to true if the calendar owner (specified by the owner property of the calendar) is the organizer of
|
|
173
|
+
the event (specified by the organizer property of the event). It also applies if a delegate organized the
|
|
174
|
+
event on behalf of the owner.
|
|
175
|
+
"""
|
|
176
|
+
return self.properties.get("isOrganizer", None)
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
def is_reminder_on(self):
|
|
180
|
+
# type: () -> Optional[bool]
|
|
181
|
+
"""
|
|
182
|
+
Set to true if an alert is set to remind the user of the event.
|
|
183
|
+
"""
|
|
184
|
+
return self.properties.get("isReminderOn", None)
|
|
185
|
+
|
|
129
186
|
@property
|
|
130
187
|
def start(self):
|
|
131
188
|
"""The date, time, and time zone that the event starts. By default, the start time is in UTC."""
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
|
|
2
|
+
from office365.outlook.locale_info import LocaleInfo
|
|
1
3
|
from office365.runtime.client_value import ClientValue
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class AutomaticRepliesMailTips(ClientValue):
|
|
5
7
|
"""MailTips about any automatic replies that have been set up on a mailbox."""
|
|
8
|
+
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
message=None,
|
|
12
|
+
message_language=LocaleInfo(),
|
|
13
|
+
scheduled_end_time=DateTimeTimeZone(),
|
|
14
|
+
scheduled_start_time=DateTimeTimeZone(),
|
|
15
|
+
):
|
|
16
|
+
"""
|
|
17
|
+
:param string message: The automatic reply message.
|
|
18
|
+
:param LocaleInfo message_language: The language that the automatic reply message is in.
|
|
19
|
+
:param datetime scheduled_end_time: The date and time that automatic replies are set to end.
|
|
20
|
+
:param datetime scheduled_start_time: The date and time that automatic replies are set to begin.
|
|
21
|
+
"""
|
|
22
|
+
self.message = message
|
|
23
|
+
self.messageLanguage = message_language
|
|
24
|
+
self.scheduledEndTime = scheduled_end_time
|
|
25
|
+
self.scheduledStartTime = scheduled_start_time
|
|
@@ -7,7 +7,7 @@ from office365.directory.extensions.extended_property import (
|
|
|
7
7
|
from office365.entity import Entity
|
|
8
8
|
from office365.entity_collection import EntityCollection
|
|
9
9
|
from office365.outlook.mail.messages.collection import MessageCollection
|
|
10
|
-
from office365.outlook.mail.messages.rules.
|
|
10
|
+
from office365.outlook.mail.messages.rules.collection import MessageRuleCollection
|
|
11
11
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
12
12
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
13
13
|
|
|
@@ -116,13 +116,12 @@ class MailFolder(Entity):
|
|
|
116
116
|
|
|
117
117
|
@property
|
|
118
118
|
def message_rules(self):
|
|
119
|
-
# type: () ->
|
|
119
|
+
# type: () -> MessageRuleCollection
|
|
120
120
|
""""""
|
|
121
121
|
return self.properties.get(
|
|
122
122
|
"messageRules",
|
|
123
|
-
|
|
123
|
+
MessageRuleCollection(
|
|
124
124
|
self.context,
|
|
125
|
-
MessageRule,
|
|
126
125
|
ResourcePath("messageRules", self.resource_path),
|
|
127
126
|
),
|
|
128
127
|
)
|
|
@@ -258,11 +258,22 @@ class Message(OutlookItem):
|
|
|
258
258
|
|
|
259
259
|
@body.setter
|
|
260
260
|
def body(self, value):
|
|
261
|
-
# type: (str|ItemBody) -> None
|
|
261
|
+
# type: (str|ItemBody|tuple) -> None
|
|
262
262
|
"""Sets the body of the message. It can be in HTML or text format."""
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
263
|
+
content_type = "Text" # Default content type
|
|
264
|
+
if isinstance(value, tuple):
|
|
265
|
+
if len(value) != 2:
|
|
266
|
+
raise ValueError("value must be a tuple of (content, content_type)")
|
|
267
|
+
content, content_type = value
|
|
268
|
+
else:
|
|
269
|
+
content = value
|
|
270
|
+
if isinstance(content, ItemBody):
|
|
271
|
+
self.set_property("body", content)
|
|
272
|
+
return
|
|
273
|
+
if content_type.lower() not in ["text", "html"]:
|
|
274
|
+
raise ValueError("content_type must be either 'Text' or 'HTML'")
|
|
275
|
+
item_body = ItemBody(content=content, content_type=content_type)
|
|
276
|
+
self.set_property("body", item_body)
|
|
266
277
|
|
|
267
278
|
@property
|
|
268
279
|
def body_preview(self):
|
|
@@ -407,6 +418,12 @@ class Message(OutlookItem):
|
|
|
407
418
|
"ccRecipients", ClientValueCollection(Recipient)
|
|
408
419
|
)
|
|
409
420
|
|
|
421
|
+
@property
|
|
422
|
+
def reply_to(self):
|
|
423
|
+
"""The replyTo: recipients for the reply to the message."""
|
|
424
|
+
self._persist_changes("replyTo")
|
|
425
|
+
return self.properties.setdefault("replyTo", ClientValueCollection(Recipient))
|
|
426
|
+
|
|
410
427
|
@property
|
|
411
428
|
def sender(self):
|
|
412
429
|
"""The account that is actually used to generate the message. In most cases, this value is the same as the
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from office365.entity_collection import EntityCollection
|
|
2
|
+
from office365.outlook.mail.messages.rules.rule import MessageRule
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class MessageRuleCollection(EntityCollection[MessageRule]):
|
|
6
|
+
def __init__(self, context, resource_path=None):
|
|
7
|
+
super(MessageRuleCollection, self).__init__(context, MessageRule, resource_path)
|
|
8
|
+
|
|
9
|
+
def add(self, display_name, sequence, actions, **kwargs):
|
|
10
|
+
"""
|
|
11
|
+
Create a messageRule object by specifying a set of conditions and actions.
|
|
12
|
+
Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions.
|
|
13
|
+
This API is available in the following national cloud deployments.
|
|
14
|
+
|
|
15
|
+
:param str display_name: The display name of the rule.
|
|
16
|
+
:param int sequence: Indicates the order in which the rule is executed, among other rules.
|
|
17
|
+
:param MessageRuleActions actions: Actions to be taken on a message when the corresponding conditions,
|
|
18
|
+
if any, are fulfilled.
|
|
19
|
+
"""
|
|
20
|
+
props = {
|
|
21
|
+
"displayName": display_name,
|
|
22
|
+
"sequence": sequence,
|
|
23
|
+
"actions": actions.to_json(),
|
|
24
|
+
**kwargs,
|
|
25
|
+
}
|
|
26
|
+
return super(MessageRuleCollection, self).add(**props)
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from office365.outlook.calendar.email_address import EmailAddress
|
|
2
|
+
from office365.outlook.mail.automatic_replies_mailtips import AutomaticRepliesMailTips
|
|
3
|
+
from office365.outlook.mail.tips.error import MailTipsError
|
|
4
|
+
from office365.runtime.client_value import ClientValue
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class MailTips(ClientValue):
|
|
8
|
+
"""Informative messages about a recipient, that are displayed to users while they're composing a message.
|
|
9
|
+
For example, an out-of-office message as an automatic reply for a message recipient.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
automatic_replies=AutomaticRepliesMailTips(),
|
|
15
|
+
custom_mail_tip=None,
|
|
16
|
+
delivery_restricted=None,
|
|
17
|
+
email_address=EmailAddress(),
|
|
18
|
+
error=MailTipsError(),
|
|
19
|
+
external_member_count=None,
|
|
20
|
+
is_moderated=None,
|
|
21
|
+
):
|
|
22
|
+
"""
|
|
23
|
+
:param AutomaticRepliesMailTips automatic_replies: Mail tips for automatic reply if it has been set up by
|
|
24
|
+
the recipient.
|
|
25
|
+
:param str custom_mail_tip: A custom mail tip that can be set on the recipient's mailbox.
|
|
26
|
+
:param bool delivery_restricted: Whether the recipient is delivery restricted.
|
|
27
|
+
:param EmailAddress email_address: Email address for the recipient.
|
|
28
|
+
:param MailTipsError error: Error raised when an error occurs.
|
|
29
|
+
:param int external_member_count: The number of external members if the recipient is a distribution list.
|
|
30
|
+
:param bool is_moderated: Whether sending messages to the recipient requires approval. For example,
|
|
31
|
+
if the recipient is a large distribution list and a moderator has been set up to approve messages sent
|
|
32
|
+
to that distribution list, or if sending messages to a recipient requires approval
|
|
33
|
+
of the recipient's manager.
|
|
34
|
+
"""
|
|
35
|
+
self.automaticReplies = automatic_replies
|
|
36
|
+
self.customMailTip = custom_mail_tip
|
|
37
|
+
self.deliveryRestricted = delivery_restricted
|
|
38
|
+
self.emailAddress = email_address
|
|
39
|
+
self.error = error
|
|
40
|
+
self.externalMemberCount = external_member_count
|
|
41
|
+
self.isModerated = is_moderated
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProfileCardProperty(Entity):
|
|
5
|
+
"""
|
|
6
|
+
Represents an attribute of a user on the Microsoft 365 profile card for an organization to surface in a shared,
|
|
7
|
+
people experience.
|
|
8
|
+
|
|
9
|
+
The attribute can be an Microsoft Entra ID built-in attribute, such as Alias or UserPrincipalName,
|
|
10
|
+
or it can be a custom attribute. For a custom attribute, an administrator can define an en-us default display name
|
|
11
|
+
String and a set of alternative translations for the languages supported in their organization.
|
|
12
|
+
|
|
13
|
+
For more information about how to add properties to the profile card for an organization, see Add or remove
|
|
14
|
+
custom attributes on a profile card using the profile card API.
|
|
15
|
+
"""
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Person(Entity):
|
|
5
|
+
"""Represents an aggregation of information about a person from across mail and contacts.
|
|
6
|
+
People can be local contacts or your organization's directory, and people from recent communications
|
|
7
|
+
(such as email)."""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PlannerCategoryDescriptions(ClientValue):
|
|
5
|
+
"""Represents the descriptive labels for the categories that have been defined for a plan.
|
|
6
|
+
It belongs to the plan details object. There can be up to 25 categories defined."""
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PlannerExternalReferences(ClientValue):
|
|
5
|
+
"""The plannerExternalReferences resource represents the collection of references on a task. This is an Open Type.
|
|
6
|
+
It's part of the task details object. The value in the property-value pair is the externalReference object.
|
|
7
|
+
"""
|
office365/planner/planner.py
CHANGED
|
@@ -2,7 +2,7 @@ from office365.entity import Entity
|
|
|
2
2
|
from office365.entity_collection import EntityCollection
|
|
3
3
|
from office365.planner.buckets.bucket import PlannerBucket
|
|
4
4
|
from office365.planner.plans.collection import PlannerPlanCollection
|
|
5
|
-
from office365.planner.tasks.
|
|
5
|
+
from office365.planner.tasks.collection import PlannerTaskCollection
|
|
6
6
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,12 +25,12 @@ class Planner(Entity):
|
|
|
25
25
|
|
|
26
26
|
@property
|
|
27
27
|
def tasks(self):
|
|
28
|
-
# type: () ->
|
|
28
|
+
# type: () -> PlannerTaskCollection
|
|
29
29
|
"""Returns the plannerTasks assigned to the user."""
|
|
30
30
|
return self.properties.get(
|
|
31
31
|
"tasks",
|
|
32
|
-
|
|
33
|
-
self.context,
|
|
32
|
+
PlannerTaskCollection(
|
|
33
|
+
self.context, ResourcePath("tasks", self.resource_path)
|
|
34
34
|
),
|
|
35
35
|
)
|
|
36
36
|
|
|
@@ -9,3 +9,15 @@ class PlannerPlanContainer(ClientValue):
|
|
|
9
9
|
the contained plans are also deleted. The properties of the plannerPlanContainer cannot be changed after the plan
|
|
10
10
|
is created.
|
|
11
11
|
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, container_id=None, type_=None, url=None):
|
|
14
|
+
"""
|
|
15
|
+
:param str container_id: The identifier of the resource that contains the plan
|
|
16
|
+
:param str type_: The type of the resource that contains the plan. For supported types, see the previous
|
|
17
|
+
table. Possible values are: group, unknownFutureValue, roster. Use the Prefer: include-unknown-enum-members
|
|
18
|
+
request header to get the following value in this evolvable enum: roster.
|
|
19
|
+
:param str url: The full canonical URL of the container.
|
|
20
|
+
"""
|
|
21
|
+
self.containerId = container_id
|
|
22
|
+
self.type = type_
|
|
23
|
+
self.url = url
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.planner.category_descriptions import PlannerCategoryDescriptions
|
|
3
|
+
from office365.planner.user_ids import PlannerUserIds
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class PlannerPlanDetails(Entity):
|
|
@@ -6,3 +8,32 @@ class PlannerPlanDetails(Entity):
|
|
|
6
8
|
The plannerPlanDetails resource represents the additional information about a plan.
|
|
7
9
|
Each plan object has a details object.
|
|
8
10
|
"""
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def category_descriptions(self):
|
|
14
|
+
# type: () -> PlannerCategoryDescriptions
|
|
15
|
+
"""
|
|
16
|
+
An object that specifies the descriptions of the 25 categories that can be associated with tasks in the plan.
|
|
17
|
+
"""
|
|
18
|
+
return self.properties.get(
|
|
19
|
+
"categoryDescriptions", PlannerCategoryDescriptions()
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def shared_with(self):
|
|
24
|
+
# type: () -> PlannerUserIds
|
|
25
|
+
"""
|
|
26
|
+
Set of user IDs that this plan is shared with. If you're using Microsoft 365 groups, use the Groups
|
|
27
|
+
API to manage group membership to share the group's plan. You can also add existing members of the group to
|
|
28
|
+
this collection, although it isn't required for them to access the plan owned by the group.
|
|
29
|
+
"""
|
|
30
|
+
return self.properties.get("sharedWith", PlannerUserIds())
|
|
31
|
+
|
|
32
|
+
def get_property(self, name, default_value=None):
|
|
33
|
+
if default_value is None:
|
|
34
|
+
property_mapping = {
|
|
35
|
+
"categoryDescriptions": self.category_descriptions,
|
|
36
|
+
"sharedWith": self.shared_with,
|
|
37
|
+
}
|
|
38
|
+
default_value = property_mapping.get(name, None)
|
|
39
|
+
return super(PlannerPlanDetails, self).get_property(name, default_value)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from office365.entity_collection import EntityCollection
|
|
2
|
+
from office365.planner.plans.plan import PlannerPlan
|
|
3
|
+
from office365.planner.tasks.task import PlannerTask
|
|
4
|
+
from office365.runtime.queries.create_entity import CreateEntityQuery
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class PlannerTaskCollection(EntityCollection[PlannerTask]):
|
|
8
|
+
def __init__(self, context, resource_path=None):
|
|
9
|
+
super(PlannerTaskCollection, self).__init__(context, PlannerTask, resource_path)
|
|
10
|
+
|
|
11
|
+
def add(self, title, plan, bucket=None):
|
|
12
|
+
"""
|
|
13
|
+
Create a new plannerTask.
|
|
14
|
+
|
|
15
|
+
:param str title: Task title
|
|
16
|
+
:param str|PlannerPlan plan: Plan identifier or Plan object
|
|
17
|
+
:param str|PlannerBucket bucket: Bucket identifier or Plan object
|
|
18
|
+
"""
|
|
19
|
+
return_type = PlannerTask(self.context)
|
|
20
|
+
self.add_child(return_type)
|
|
21
|
+
|
|
22
|
+
def _add(plan_id):
|
|
23
|
+
# type: (str) -> None
|
|
24
|
+
payload = {"title": title, "planId": plan_id, "bucketId": bucket}
|
|
25
|
+
qry = CreateEntityQuery(self, payload, return_type)
|
|
26
|
+
self.context.add_query(qry)
|
|
27
|
+
|
|
28
|
+
if isinstance(plan, PlannerPlan):
|
|
29
|
+
|
|
30
|
+
def _parent_loaded():
|
|
31
|
+
_add(plan.id)
|
|
32
|
+
|
|
33
|
+
plan.ensure_property("id", _parent_loaded)
|
|
34
|
+
else:
|
|
35
|
+
_add(plan)
|
|
36
|
+
|
|
37
|
+
return return_type
|
office365/planner/tasks/task.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from office365.directory.permissions.identity_set import IdentitySet
|
|
1
4
|
from office365.entity import Entity
|
|
2
5
|
from office365.planner.tasks.task_details import PlannerTaskDetails
|
|
3
6
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -11,6 +14,18 @@ class PlannerTask(Entity):
|
|
|
11
14
|
See overview for more information regarding relationships between group, plan and task.
|
|
12
15
|
"""
|
|
13
16
|
|
|
17
|
+
@property
|
|
18
|
+
def created_by(self):
|
|
19
|
+
"""Identity of the user that created the task."""
|
|
20
|
+
return self.properties.get("createdBy", IdentitySet())
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def created_datetime(self):
|
|
24
|
+
"""
|
|
25
|
+
Date and time at which the task is created.
|
|
26
|
+
"""
|
|
27
|
+
return self.properties.get("createdDateTime", datetime.min)
|
|
28
|
+
|
|
14
29
|
@property
|
|
15
30
|
def title(self):
|
|
16
31
|
"""Required. Title of the task."""
|
|
@@ -25,3 +40,12 @@ class PlannerTask(Entity):
|
|
|
25
40
|
self.context, ResourcePath("details", self.resource_path)
|
|
26
41
|
),
|
|
27
42
|
)
|
|
43
|
+
|
|
44
|
+
def get_property(self, name, default_value=None):
|
|
45
|
+
if default_value is None:
|
|
46
|
+
property_mapping = {
|
|
47
|
+
"createdBy": self.created_by,
|
|
48
|
+
"createdDateTime": self.created_datetime,
|
|
49
|
+
}
|
|
50
|
+
default_value = property_mapping.get(name, None)
|
|
51
|
+
return super(PlannerTask, self).get_property(name, default_value)
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
4
|
+
from office365.planner.external_references import PlannerExternalReferences
|
|
5
|
+
from office365.planner.tasks.check_list_items import PlannerChecklistItems
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
class PlannerTaskDetails(Entity):
|
|
@@ -7,4 +11,33 @@ class PlannerTaskDetails(Entity):
|
|
|
7
11
|
Each task object has a details object.
|
|
8
12
|
"""
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
@property
|
|
15
|
+
def checklist(self):
|
|
16
|
+
# type: () -> PlannerChecklistItems
|
|
17
|
+
"""
|
|
18
|
+
The collection of checklist items on the task.
|
|
19
|
+
"""
|
|
20
|
+
return self.properties.get("checklist", PlannerChecklistItems())
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def description(self):
|
|
24
|
+
# type: () -> Optional[str]
|
|
25
|
+
"""Description of the task."""
|
|
26
|
+
return self.properties.get("description", None)
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def preview_type(self):
|
|
30
|
+
# type: () -> Optional[str]
|
|
31
|
+
"""This sets the type of preview that shows up on the task.
|
|
32
|
+
The possible values are: automatic, noPreview, checklist, description, reference.
|
|
33
|
+
When set to automatic the displayed preview is chosen by the app viewing the task.
|
|
34
|
+
"""
|
|
35
|
+
return self.properties.get("previewType", None)
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def references(self):
|
|
39
|
+
# type: () -> PlannerExternalReferences
|
|
40
|
+
"""
|
|
41
|
+
The collection of references on the task.
|
|
42
|
+
"""
|
|
43
|
+
return self.properties.get("references", PlannerExternalReferences())
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PlannerUserIds(ClientValue):
|
|
5
|
+
"""The plannerUserIds resource represents the list of users IDs that a plan is shared with, and is an Open Type.
|
|
6
|
+
If you're using Microsoft 365 groups, use the Groups API to manage group membership to share the group's plan.
|
|
7
|
+
You can also add existing members of the group to this collection though it isn't required for them to access
|
|
8
|
+
the plan owned by the group."""
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
1
3
|
from office365.reports.report import Report
|
|
2
4
|
from office365.runtime.client_result import ClientResult
|
|
3
5
|
from office365.runtime.queries.function import FunctionQuery
|
|
4
6
|
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from office365.reports.root import ReportRoot
|
|
9
|
+
|
|
5
10
|
|
|
6
|
-
def create_report_query(report_root, report_name, period=None):
|
|
11
|
+
def create_report_query(report_root, report_name, period=None, return_stream=False):
|
|
7
12
|
"""
|
|
8
13
|
Construct Report query
|
|
9
14
|
|
|
10
|
-
:param
|
|
15
|
+
:param ReportRoot report_root: Report container
|
|
11
16
|
:param str report_name: Report name
|
|
12
17
|
:param str period: Specifies the length of time over which the report is aggregated.
|
|
13
18
|
The supported values for {period_value} are: D7, D30, D90, and D180. These values follow the format
|
|
14
19
|
Dn where n represents the number of days over which the report is aggregated. Required.
|
|
20
|
+
:param bool return_stream: If true, return a stream of report data.
|
|
15
21
|
"""
|
|
16
22
|
params = {
|
|
17
23
|
"period": period,
|
|
18
24
|
}
|
|
19
|
-
|
|
25
|
+
if return_stream:
|
|
26
|
+
return_type = ClientResult(report_root.context, bytes())
|
|
27
|
+
else:
|
|
28
|
+
return_type = ClientResult(report_root.context, Report())
|
|
20
29
|
return FunctionQuery(report_root, report_name, params, return_type)
|