Office365-REST-Python-Client 2.5.6__py3-none-any.whl → 2.5.7__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.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +5 -5
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +85 -58
- office365/directory/administrative_unit.py +9 -2
- office365/directory/applications/roles/collection.py +5 -1
- office365/directory/applications/roles/role.py +1 -1
- office365/directory/audit/provisioning/object_summary.py +30 -1
- office365/directory/authentication/methods/fido.py +8 -0
- office365/directory/authentication/methods/password.py +23 -0
- office365/directory/custom_security_attribute_definition.py +7 -0
- office365/directory/device_local_credential_info.py +6 -0
- office365/directory/directory.py +40 -12
- office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
- office365/directory/identitygovernance/termsofuse/agreement_acceptance.py +8 -0
- office365/directory/identitygovernance/userconsent/request_collection.py +1 -1
- office365/directory/insights/resource_reference.py +1 -1
- office365/directory/policies/device_registration.py +6 -0
- office365/directory/policies/root.py +13 -0
- office365/directory/security/threatintelligence/article_indicator.py +7 -0
- office365/directory/serviceprincipals/service_principal.py +3 -8
- office365/directory/synchronization/schema.py +16 -0
- office365/directory/users/user.py +23 -0
- office365/onedrive/driveitems/driveItem.py +74 -6
- office365/onedrive/lists/list.py +1 -1
- office365/onedrive/sitepages/__init__.py +0 -0
- office365/onedrive/sitepages/base.py +29 -0
- office365/onedrive/sitepages/canvas_layout.py +43 -0
- office365/onedrive/sitepages/collection.py +32 -0
- office365/onedrive/sitepages/horizontal_section.py +23 -0
- office365/onedrive/sitepages/horizontal_section_column.py +27 -0
- office365/onedrive/sitepages/site_page.py +116 -0
- office365/onedrive/sitepages/title_area.py +13 -0
- office365/onedrive/sitepages/vertical_section.py +27 -0
- office365/onedrive/sitepages/web_part.py +5 -0
- office365/onedrive/sites/site.py +10 -0
- office365/onedrive/workbooks/charts/data_labels.py +13 -1
- office365/onedrive/workbooks/tables/sort.py +5 -0
- office365/onedrive/workbooks/tables/table.py +57 -0
- office365/onedrive/workbooks/worksheets/protection.py +20 -1
- office365/onedrive/workbooks/worksheets/protection_options.py +7 -0
- office365/outlook/calendar/calendar.py +1 -3
- office365/outlook/calendar/events/event.py +45 -0
- office365/outlook/calendar/response_status.py +11 -0
- office365/outlook/calendar/rooms/room.py +14 -0
- office365/outlook/mail/automatic_replies_mailtips.py +5 -0
- office365/outlook/mail/conversation.py +1 -3
- office365/outlook/mail/folders/folder.py +1 -3
- office365/outlook/mail/tips.py +17 -0
- office365/planner/plans/plan.py +11 -1
- office365/reports/root.py +33 -0
- office365/runtime/auth/authentication_context.py +12 -2
- office365/runtime/odata/json_format.py +3 -2
- office365/runtime/odata/request.py +12 -2
- office365/runtime/queries/upload_session.py +5 -0
- office365/sharepoint/alerts/collection.py +2 -1
- office365/sharepoint/attachments/attachment.py +3 -9
- office365/sharepoint/client_context.py +4 -2
- office365/sharepoint/contenttypes/content_type.py +13 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +1 -1
- office365/sharepoint/directory/helper.py +2 -0
- office365/sharepoint/fields/collection.py +4 -3
- office365/sharepoint/folders/folder.py +1 -3
- office365/sharepoint/migrationcenter/deploy_status.py +5 -0
- office365/sharepoint/migrationcenter/service/performance/__init__.py +0 -0
- office365/sharepoint/migrationcenter/service/performance/dashboard_data.py +9 -0
- office365/sharepoint/migrationcenter/service/performance/data.py +7 -0
- office365/sharepoint/migrationcenter/service/performance/entity_data.py +5 -0
- office365/sharepoint/principal/principal.py +2 -4
- office365/sharepoint/recyclebin/item.py +107 -7
- office365/sharepoint/sharing/information.py +9 -0
- office365/sharepoint/sharing/link_info.py +6 -0
- office365/sharepoint/sharing/permission_collection.py +18 -0
- office365/sharepoint/sites/script_safe_domain.py +5 -0
- office365/sharepoint/sites/site.py +10 -4
- office365/sharepoint/taxonomy/field_value.py +1 -1
- office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
- office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
- office365/sharepoint/webs/information_collection.py +1 -1
- office365/sharepoint/webs/regional_settings.py +71 -0
- office365/sharepoint/webs/web.py +10 -5
- office365/teams/apps/catalog.py +1 -0
- office365/teams/chats/chat.py +4 -0
- office365/teams/schedule/schedule.py +6 -2
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from office365.entity_collection import EntityCollection
|
|
4
|
+
from office365.onedrive.sitepages.base import BaseSitePage
|
|
5
|
+
from office365.onedrive.sitepages.canvas_layout import CanvasLayout
|
|
6
|
+
from office365.onedrive.sitepages.title_area import TitleArea
|
|
7
|
+
from office365.onedrive.sitepages.web_part import WebPart
|
|
8
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
9
|
+
from office365.runtime.queries.function import FunctionQuery
|
|
10
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SitePage(BaseSitePage):
|
|
14
|
+
"""This resource represents a page in the sitePages list. It contains the title, layout, and a collection of
|
|
15
|
+
webParts."""
|
|
16
|
+
|
|
17
|
+
def get_web_parts_by_position(
|
|
18
|
+
self, webPartIndex, horizontalSectionId, isInVerticalSection, columnId
|
|
19
|
+
):
|
|
20
|
+
"""
|
|
21
|
+
Get a collection of webPart by providing webPartPosition information.
|
|
22
|
+
|
|
23
|
+
:param float webPartIndex: Index of the current WebPart. Represents the order of WebPart in this column or
|
|
24
|
+
section. Only works if either columnId or isInVerticalSection is provided.
|
|
25
|
+
:param float horizontalSectionId: Indicate the horizontal section where the WebPart located in.
|
|
26
|
+
:param bool isInVerticalSection: Indicate whether the WebPart located in the vertical section.
|
|
27
|
+
:param float columnId: Indicate the identifier of the column where the WebPart located in. Only works
|
|
28
|
+
if horizontalSectionId is provided.
|
|
29
|
+
"""
|
|
30
|
+
params = {
|
|
31
|
+
"webPartIndex": webPartIndex,
|
|
32
|
+
"horizontalSectionId": horizontalSectionId,
|
|
33
|
+
"isInverticalSection": isInVerticalSection,
|
|
34
|
+
"columnId": columnId,
|
|
35
|
+
}
|
|
36
|
+
return_type = EntityCollection(
|
|
37
|
+
self.context, WebPart, ResourcePath("webParts", self.resource_path)
|
|
38
|
+
)
|
|
39
|
+
qry = FunctionQuery(self, "getWebPartsByPosition", params, return_type)
|
|
40
|
+
self.context.add_query(qry)
|
|
41
|
+
return return_type
|
|
42
|
+
|
|
43
|
+
def publish(self):
|
|
44
|
+
"""
|
|
45
|
+
Publish the latest version of a sitePage resource, which makes the version of the page available to all users.
|
|
46
|
+
If the page is checked out, check in the page and publish it. If the page is checked out to the caller
|
|
47
|
+
of this API, the page is automatically checked in and then published.
|
|
48
|
+
|
|
49
|
+
If a page approval flow has been activated in the page library, the page is not published until the approval
|
|
50
|
+
flow is completed.
|
|
51
|
+
"""
|
|
52
|
+
qry = ServiceOperationQuery(self, "publish")
|
|
53
|
+
self.context.add_query(qry)
|
|
54
|
+
return self
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def promotion_kind(self):
|
|
58
|
+
# type: () -> Optional[str]
|
|
59
|
+
"""Indicates the promotion kind of the sitePage."""
|
|
60
|
+
return self.properties.get("promotionKind", None)
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def show_comments(self):
|
|
64
|
+
# type: () -> Optional[bool]
|
|
65
|
+
"""Determines whether or not to show comments at the bottom of the page."""
|
|
66
|
+
return self.properties.get("showComments", None)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def show_recommended_pages(self):
|
|
70
|
+
# type: () -> Optional[bool]
|
|
71
|
+
"""Determines whether or not to show recommended pages at the bottom of the page."""
|
|
72
|
+
return self.properties.get("showRecommendedPages", None)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def thumbnail_web_url(self):
|
|
76
|
+
# type: () -> Optional[str]
|
|
77
|
+
"""Indicates the promotion kind of the sitePage."""
|
|
78
|
+
return self.properties.get("thumbnailWebUrl", None)
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def title_area(self):
|
|
82
|
+
# type: () -> Optional[str]
|
|
83
|
+
"""Title area on the SharePoint page."""
|
|
84
|
+
return self.properties.get("titleArea", TitleArea())
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def canvas_layout(self):
|
|
88
|
+
# type: () -> CanvasLayout
|
|
89
|
+
"""The default termStore under this site."""
|
|
90
|
+
return self.properties.get(
|
|
91
|
+
"canvasLayout",
|
|
92
|
+
CanvasLayout(
|
|
93
|
+
self.context, ResourcePath("canvasLayout", self.resource_path)
|
|
94
|
+
),
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def web_parts(self):
|
|
99
|
+
# type: () -> EntityCollection[WebPart]
|
|
100
|
+
"""Collection of webparts on the SharePoint page."""
|
|
101
|
+
return self.properties.get(
|
|
102
|
+
"webParts",
|
|
103
|
+
EntityCollection(
|
|
104
|
+
self.context, WebPart, ResourcePath("webParts", self.resource_path)
|
|
105
|
+
),
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def get_property(self, name, default_value=None):
|
|
109
|
+
if default_value is None:
|
|
110
|
+
property_mapping = {
|
|
111
|
+
"canvasLayout": self.canvas_layout,
|
|
112
|
+
"titleArea": self.title_area,
|
|
113
|
+
"webParts": self.web_parts,
|
|
114
|
+
}
|
|
115
|
+
default_value = property_mapping.get(name, None)
|
|
116
|
+
return super(SitePage, self).get_property(name, default_value)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class TitleArea(ClientValue):
|
|
5
|
+
"""Represents the title area of a given SharePoint page."""
|
|
6
|
+
|
|
7
|
+
def __init__(self, alternativeText=None, enableGradientEffect=None):
|
|
8
|
+
"""
|
|
9
|
+
:param str alternativeText: Alternative text on the title area.
|
|
10
|
+
:param bool enableGradientEffect: Indicates whether the title area has a gradient effect enabled.
|
|
11
|
+
"""
|
|
12
|
+
self.alternativeText = alternativeText
|
|
13
|
+
self.enableGradientEffect = enableGradientEffect
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.entity_collection import EntityCollection
|
|
3
|
+
from office365.onedrive.sitepages.web_part import WebPart
|
|
4
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class VerticalSection(Entity):
|
|
8
|
+
"""Represents the vertical section in a given SharePoint page."""
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def web_parts(self):
|
|
12
|
+
# type: () -> EntityCollection[WebPart]
|
|
13
|
+
"""The set of web parts in this section."""
|
|
14
|
+
return self.properties.get(
|
|
15
|
+
"webParts",
|
|
16
|
+
EntityCollection(
|
|
17
|
+
self.context, WebPart, ResourcePath("webParts", self.resource_path)
|
|
18
|
+
),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def get_property(self, name, default_value=None):
|
|
22
|
+
if default_value is None:
|
|
23
|
+
property_mapping = {
|
|
24
|
+
"webParts": self.web_parts,
|
|
25
|
+
}
|
|
26
|
+
default_value = property_mapping.get(name, None)
|
|
27
|
+
return super(VerticalSection, self).get_property(name, default_value)
|
office365/onedrive/sites/site.py
CHANGED
|
@@ -13,6 +13,7 @@ from office365.onedrive.lists.collection import ListCollection
|
|
|
13
13
|
from office365.onedrive.operations.rich_long_running import RichLongRunningOperation
|
|
14
14
|
from office365.onedrive.permissions.collection import PermissionCollection
|
|
15
15
|
from office365.onedrive.sharepoint_ids import SharePointIds
|
|
16
|
+
from office365.onedrive.sitepages.collection import SitePageCollection
|
|
16
17
|
from office365.onedrive.sites.site_collection import SiteCollection
|
|
17
18
|
from office365.onedrive.termstore.store import Store
|
|
18
19
|
from office365.onenote.onenote import Onenote
|
|
@@ -224,6 +225,15 @@ class Site(BaseItem):
|
|
|
224
225
|
Onenote(self.context, ResourcePath("onenote", self.resource_path)),
|
|
225
226
|
)
|
|
226
227
|
|
|
228
|
+
@property
|
|
229
|
+
def pages(self):
|
|
230
|
+
# type: () -> SitePageCollection
|
|
231
|
+
"""The collection of site pages under this site."""
|
|
232
|
+
return self.properties.get(
|
|
233
|
+
"pages",
|
|
234
|
+
SitePageCollection(self.context, ResourcePath("pages", self.resource_path)),
|
|
235
|
+
)
|
|
236
|
+
|
|
227
237
|
@property
|
|
228
238
|
def term_store(self):
|
|
229
239
|
# type: () -> Store
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class WorkbookChartDataLabels(Entity):
|
|
5
7
|
"""Represents a collection of all the data labels on a chart point."""
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
@property
|
|
10
|
+
def position(self):
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""DataLabelPosition value that represents the position of the data label."""
|
|
13
|
+
return self.properties.get("position", None)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def separator(self):
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""String representing the separator used for the data labels on a chart."""
|
|
19
|
+
return self.properties.get("separator", None)
|
|
@@ -8,6 +8,7 @@ from office365.onedrive.workbooks.tables.columns.collection import (
|
|
|
8
8
|
from office365.onedrive.workbooks.tables.rows.collection import (
|
|
9
9
|
WorkbookTableRowCollection,
|
|
10
10
|
)
|
|
11
|
+
from office365.onedrive.workbooks.tables.sort import WorkbookTableSort
|
|
11
12
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
12
13
|
from office365.runtime.queries.function import FunctionQuery
|
|
13
14
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
@@ -56,12 +57,59 @@ class WorkbookTable(Entity):
|
|
|
56
57
|
self.context.add_query(qry)
|
|
57
58
|
return self
|
|
58
59
|
|
|
60
|
+
@property
|
|
61
|
+
def highlight_first_column(self):
|
|
62
|
+
# type: () -> Optional[bool]
|
|
63
|
+
"""Indicates whether the first column contains special formatting."""
|
|
64
|
+
return self.properties.get("highlightFirstColumn", None)
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def highlight_last_column(self):
|
|
68
|
+
# type: () -> Optional[bool]
|
|
69
|
+
"""Indicates whether the last column contains special formatting."""
|
|
70
|
+
return self.properties.get("highlightLastColumn", None)
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def legacy_id(self):
|
|
74
|
+
# type: () -> Optional[str]
|
|
75
|
+
"""Legacy Id used in older Excel clients. The value of the identifier remains the same even when the table
|
|
76
|
+
is renamed. This property should be interpreted as an opaque string value and shouldn't be parsed to any
|
|
77
|
+
other type."""
|
|
78
|
+
return self.properties.get("legacyId", None)
|
|
79
|
+
|
|
59
80
|
@property
|
|
60
81
|
def name(self):
|
|
61
82
|
# type: () -> Optional[str]
|
|
62
83
|
"""Name of the table."""
|
|
63
84
|
return self.properties.get("name", None)
|
|
64
85
|
|
|
86
|
+
@property
|
|
87
|
+
def show_banded_columns(self):
|
|
88
|
+
# type: () -> Optional[bool]
|
|
89
|
+
"""Indicates whether the columns show banded formatting in which odd columns are highlighted differently
|
|
90
|
+
from even ones to make reading the table easier."""
|
|
91
|
+
return self.properties.get("showBandedColumns", None)
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def show_banded_rows(self):
|
|
95
|
+
# type: () -> Optional[bool]
|
|
96
|
+
"""Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even
|
|
97
|
+
ones to make reading the table easier."""
|
|
98
|
+
return self.properties.get("showBandedRows", None)
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def show_filter_button(self):
|
|
102
|
+
# type: () -> Optional[bool]
|
|
103
|
+
"""Indicates whether the filter buttons are visible at the top of each column header. Setting this is only
|
|
104
|
+
allowed if the table contains a header row."""
|
|
105
|
+
return self.properties.get("showFilterButton", None)
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def show_headers(self):
|
|
109
|
+
# type: () -> Optional[bool]
|
|
110
|
+
"""Indicates whether the header row is visible or not. This value can be set to show or remove the header row"""
|
|
111
|
+
return self.properties.get("showHeaders", None)
|
|
112
|
+
|
|
65
113
|
@property
|
|
66
114
|
def columns(self):
|
|
67
115
|
# type: () -> WorkbookTableColumnCollection
|
|
@@ -84,6 +132,15 @@ class WorkbookTable(Entity):
|
|
|
84
132
|
),
|
|
85
133
|
)
|
|
86
134
|
|
|
135
|
+
@property
|
|
136
|
+
def sort(self):
|
|
137
|
+
# type: () -> WorkbookTableSort
|
|
138
|
+
"""Represents the sorting for the table."""
|
|
139
|
+
return self.properties.get(
|
|
140
|
+
"sort",
|
|
141
|
+
WorkbookTableSort(self.context, ResourcePath("sort", self.resource_path)),
|
|
142
|
+
)
|
|
143
|
+
|
|
87
144
|
@property
|
|
88
145
|
def worksheet(self):
|
|
89
146
|
"""The worksheet containing the current table."""
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.onedrive.workbooks.worksheets.protection_options import (
|
|
3
|
+
WorkbookWorksheetProtectionOptions,
|
|
4
|
+
)
|
|
5
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
class WorkbookWorksheetProtection(Entity):
|
|
5
9
|
"""Represents the protection of a sheet object."""
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
def protect(self, options=None):
|
|
12
|
+
"""Protect a worksheet. It throws if the worksheet has been protected."""
|
|
13
|
+
qry = ServiceOperationQuery(self, "protect", parameters_type=options)
|
|
14
|
+
self.context.add_query(qry)
|
|
15
|
+
return self
|
|
16
|
+
|
|
17
|
+
def unprotect(self):
|
|
18
|
+
"""Unprotect a worksheet"""
|
|
19
|
+
qry = ServiceOperationQuery(self, "unprotect")
|
|
20
|
+
self.context.add_query(qry)
|
|
21
|
+
return self
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def options(self):
|
|
25
|
+
""" """
|
|
26
|
+
return self.properties.get("options", WorkbookWorksheetProtectionOptions())
|
|
@@ -3,3 +3,10 @@ from office365.runtime.client_value import ClientValue
|
|
|
3
3
|
|
|
4
4
|
class WorkbookWorksheetProtectionOptions(ClientValue):
|
|
5
5
|
"""Represents the protection of a sheet object."""
|
|
6
|
+
|
|
7
|
+
def __init__(
|
|
8
|
+
self, allowAutoFilter=None, allowDeleteColumns=None, allowDeleteRows=None
|
|
9
|
+
):
|
|
10
|
+
self.allowAutoFilter = allowAutoFilter
|
|
11
|
+
self.allowDeleteColumns = allowDeleteColumns
|
|
12
|
+
self.allowDeleteRows = allowDeleteRows
|
|
@@ -8,6 +8,7 @@ from office365.directory.extensions.extension import Extension
|
|
|
8
8
|
from office365.entity_collection import EntityCollection
|
|
9
9
|
from office365.outlook.calendar.attendees.attendee import Attendee
|
|
10
10
|
from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
|
|
11
|
+
from office365.outlook.calendar.response_status import ResponseStatus
|
|
11
12
|
from office365.outlook.item import OutlookItem
|
|
12
13
|
from office365.outlook.mail.attachments.collection import AttachmentCollection
|
|
13
14
|
from office365.outlook.mail.item_body import ItemBody
|
|
@@ -195,6 +196,30 @@ class Event(OutlookItem):
|
|
|
195
196
|
"""The preview of the message associated with the event. It is in text format."""
|
|
196
197
|
return self.properties.get("bodyPreview", None)
|
|
197
198
|
|
|
199
|
+
@property
|
|
200
|
+
def reminder_minutes_before_start(self):
|
|
201
|
+
# type: () -> Optional[int]
|
|
202
|
+
"""The number of minutes before the event start time that the reminder alert occurs."""
|
|
203
|
+
return self.properties.get("reminderMinutesBeforeStart", None)
|
|
204
|
+
|
|
205
|
+
@property
|
|
206
|
+
def response_requested(self):
|
|
207
|
+
# type: () -> Optional[bool]
|
|
208
|
+
"""Default is true, which represents the organizer would like an invitee to send a response to the event."""
|
|
209
|
+
return self.properties.get("responseRequested", None)
|
|
210
|
+
|
|
211
|
+
@property
|
|
212
|
+
def response_status(self):
|
|
213
|
+
# type: () -> Optional[str]
|
|
214
|
+
"""Indicates the type of response sent in response to an event message."""
|
|
215
|
+
return self.properties.get("responseStatus", ResponseStatus())
|
|
216
|
+
|
|
217
|
+
@property
|
|
218
|
+
def series_master_id(self):
|
|
219
|
+
# type: () -> Optional[str]
|
|
220
|
+
"""The ID for the recurring series master item, if this event is part of a recurring series."""
|
|
221
|
+
return self.properties.get("seriesMasterId", None)
|
|
222
|
+
|
|
198
223
|
@property
|
|
199
224
|
def subject(self):
|
|
200
225
|
# type: () -> Optional[str]
|
|
@@ -212,6 +237,26 @@ class Event(OutlookItem):
|
|
|
212
237
|
"""The location of the event."""
|
|
213
238
|
return self.properties.get("location", Location())
|
|
214
239
|
|
|
240
|
+
@property
|
|
241
|
+
def transaction_id(self):
|
|
242
|
+
# type: () -> Optional[str]
|
|
243
|
+
"""
|
|
244
|
+
A custom identifier specified by a client app for the server to avoid redundant POST operations in case of
|
|
245
|
+
client retries to create the same event. This is useful when low network connectivity causes the client to
|
|
246
|
+
time out before receiving a response from the server for the client's prior create-event request.
|
|
247
|
+
After you set transactionId when creating an event, you cannot change transactionId in a subsequent update.
|
|
248
|
+
This property is only returned in a response payload if an app has set it
|
|
249
|
+
"""
|
|
250
|
+
return self.properties.get("transactionId", None)
|
|
251
|
+
|
|
252
|
+
@property
|
|
253
|
+
def type(self):
|
|
254
|
+
# type: () -> Optional[str]
|
|
255
|
+
"""
|
|
256
|
+
The event type. Possible values are: singleInstance, occurrence, exception, seriesMaster
|
|
257
|
+
"""
|
|
258
|
+
return self.properties.get("type", None)
|
|
259
|
+
|
|
215
260
|
@property
|
|
216
261
|
def web_link(self):
|
|
217
262
|
# type: () -> Optional[str]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from office365.runtime.client_value import ClientValue
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ResponseStatus(ClientValue):
|
|
5
|
+
"""Represents the response status of an attendee or organizer for a meeting request."""
|
|
6
|
+
|
|
7
|
+
def __init__(self, response=None):
|
|
8
|
+
"""
|
|
9
|
+
:type response: str
|
|
10
|
+
"""
|
|
11
|
+
self.response = response
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.outlook.calendar.place import Place
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,3 +8,15 @@ class Room(Place):
|
|
|
6
8
|
Represents a room in a tenant.
|
|
7
9
|
In Exchange Online, each room is associated with a room mailbox. Derived from place.
|
|
8
10
|
"""
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def audio_device_name(self):
|
|
14
|
+
# type: () -> Optional[str]
|
|
15
|
+
"""Specifies the name of the audio device in the room."""
|
|
16
|
+
return self.properties.get("audioDeviceName", None)
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def building(self):
|
|
20
|
+
# type: () -> Optional[str]
|
|
21
|
+
"""Specifies the building name or building number that the room is in."""
|
|
22
|
+
return self.properties.get("building", None)
|
|
@@ -49,9 +49,7 @@ class Conversation(Entity):
|
|
|
49
49
|
|
|
50
50
|
@property
|
|
51
51
|
def unique_senders(self):
|
|
52
|
-
"""
|
|
53
|
-
All the users that sent a message to this Conversation.
|
|
54
|
-
"""
|
|
52
|
+
"""All the users that sent a message to this Conversation."""
|
|
55
53
|
return self.properties.get("uniqueSenders", StringCollection())
|
|
56
54
|
|
|
57
55
|
@property
|
|
@@ -86,9 +86,7 @@ class MailFolder(Entity):
|
|
|
86
86
|
@property
|
|
87
87
|
def parent_folder_id(self):
|
|
88
88
|
# type: () -> Optional[str]
|
|
89
|
-
"""
|
|
90
|
-
The unique identifier for the mailFolder's parent mailFolder.
|
|
91
|
-
"""
|
|
89
|
+
"""The unique identifier for the mailFolder's parent mailFolder."""
|
|
92
90
|
return self.properties.get("parentFolderId", None)
|
|
93
91
|
|
|
94
92
|
@property
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from office365.outlook.mail.automatic_replies_mailtips import AutomaticRepliesMailTips
|
|
2
|
+
from office365.runtime.client_value import ClientValue
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class MailTips(ClientValue):
|
|
6
|
+
"""Informative messages about a recipient, that are displayed to users while they're composing a message.
|
|
7
|
+
For example, an out-of-office message as an automatic reply for a message recipient.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
def __init__(self, automaticReplies=AutomaticRepliesMailTips(), customMailTip=None):
|
|
11
|
+
"""
|
|
12
|
+
:param AutomaticRepliesMailTips automaticReplies: Mail tips for automatic reply if it has been set up by
|
|
13
|
+
the recipient.
|
|
14
|
+
:param str customMailTip: A custom mail tip that can be set on the recipient's mailbox.
|
|
15
|
+
"""
|
|
16
|
+
self.automaticReplies = automaticReplies
|
|
17
|
+
self.customMailTip = customMailTip
|
office365/planner/plans/plan.py
CHANGED
|
@@ -7,6 +7,7 @@ from office365.planner.buckets.bucket import PlannerBucket
|
|
|
7
7
|
from office365.planner.plans.container import PlannerPlanContainer
|
|
8
8
|
from office365.planner.plans.details import PlannerPlanDetails
|
|
9
9
|
from office365.planner.tasks.task import PlannerTask
|
|
10
|
+
from office365.runtime.http.request_options import RequestOptions
|
|
10
11
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
11
12
|
|
|
12
13
|
|
|
@@ -18,11 +19,20 @@ class PlannerPlan(Entity):
|
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
21
|
def __str__(self):
|
|
21
|
-
return self.title
|
|
22
|
+
return self.title or self.entity_type_name
|
|
22
23
|
|
|
23
24
|
def __repr__(self):
|
|
24
25
|
return self.id or self.entity_type_name
|
|
25
26
|
|
|
27
|
+
def delete_object(self):
|
|
28
|
+
def _construct_request(request):
|
|
29
|
+
# type: (RequestOptions) -> None
|
|
30
|
+
request.set_header("If-Match", self.properties.get("__etag"))
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
super(PlannerPlan, self).delete_object().before_execute(_construct_request)
|
|
34
|
+
)
|
|
35
|
+
|
|
26
36
|
@property
|
|
27
37
|
def container(self):
|
|
28
38
|
"""Identity of the user, device, or application which created the plan."""
|
office365/reports/root.py
CHANGED
|
@@ -11,6 +11,17 @@ from office365.runtime.queries.function import FunctionQuery
|
|
|
11
11
|
class ReportRoot(Entity):
|
|
12
12
|
"""Represents a container for Azure Active Directory (Azure AD) reporting resources."""
|
|
13
13
|
|
|
14
|
+
def device_configuration_device_activity(self):
|
|
15
|
+
"""
|
|
16
|
+
Metadata for the device configuration device activity report
|
|
17
|
+
"""
|
|
18
|
+
return_type = ClientResult(self.context, Report())
|
|
19
|
+
qry = FunctionQuery(
|
|
20
|
+
self, "deviceConfigurationDeviceActivity", None, return_type
|
|
21
|
+
)
|
|
22
|
+
self.context.add_query(qry)
|
|
23
|
+
return return_type
|
|
24
|
+
|
|
14
25
|
def device_configuration_user_activity(self):
|
|
15
26
|
"""
|
|
16
27
|
Metadata for the device configuration user activity report
|
|
@@ -20,6 +31,15 @@ class ReportRoot(Entity):
|
|
|
20
31
|
self.context.add_query(qry)
|
|
21
32
|
return return_type
|
|
22
33
|
|
|
34
|
+
def managed_device_enrollment_failure_details(self):
|
|
35
|
+
""" """
|
|
36
|
+
return_type = ClientResult(self.context, Report())
|
|
37
|
+
qry = FunctionQuery(
|
|
38
|
+
self, "managedDeviceEnrollmentFailureDetails", None, return_type
|
|
39
|
+
)
|
|
40
|
+
self.context.add_query(qry)
|
|
41
|
+
return return_type
|
|
42
|
+
|
|
23
43
|
def managed_device_enrollment_top_failures(self, period=None):
|
|
24
44
|
"""
|
|
25
45
|
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
|
|
@@ -188,6 +208,19 @@ class ReportRoot(Entity):
|
|
|
188
208
|
self.context.add_query(qry)
|
|
189
209
|
return qry.return_type
|
|
190
210
|
|
|
211
|
+
def get_mailbox_usage_quota_status_mailbox_counts(self, period):
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
:param str period: Specifies the length of time over which the report is aggregated.
|
|
215
|
+
The supported values for {period_value} are: D7, D30, D90, and D180. These values follow the format
|
|
216
|
+
Dn where n represents the number of days over which the report is aggregated. Required.
|
|
217
|
+
"""
|
|
218
|
+
qry = create_report_query(
|
|
219
|
+
self, "getMailboxUsageQuotaStatusMailboxCounts", period
|
|
220
|
+
)
|
|
221
|
+
self.context.add_query(qry)
|
|
222
|
+
return qry.return_type
|
|
223
|
+
|
|
191
224
|
def get_sharepoint_activity_pages(self, period):
|
|
192
225
|
"""
|
|
193
226
|
Get the number of unique pages visited by users.
|
|
@@ -47,6 +47,7 @@ class AuthenticationContext(object):
|
|
|
47
47
|
cert_path=None,
|
|
48
48
|
private_key=None,
|
|
49
49
|
scopes=None,
|
|
50
|
+
passphrase=None,
|
|
50
51
|
):
|
|
51
52
|
"""Initializes a client to acquire a token via certificate credentials
|
|
52
53
|
|
|
@@ -56,6 +57,7 @@ class AuthenticationContext(object):
|
|
|
56
57
|
:param str or None cert_path: Path to A PEM encoded certificate private key.
|
|
57
58
|
:param str or None private_key: A PEM encoded certificate private key.
|
|
58
59
|
:param list[str] or None scopes: Scopes requested to access a protected API (a resource)
|
|
60
|
+
:param str passphrase: Passphrase if the private_key is encrypted
|
|
59
61
|
"""
|
|
60
62
|
if scopes is None:
|
|
61
63
|
resource = get_absolute_url(self.url)
|
|
@@ -70,7 +72,11 @@ class AuthenticationContext(object):
|
|
|
70
72
|
|
|
71
73
|
def _acquire_token():
|
|
72
74
|
authority_url = "https://login.microsoftonline.com/{0}".format(tenant)
|
|
73
|
-
credentials = {
|
|
75
|
+
credentials = {
|
|
76
|
+
"thumbprint": thumbprint,
|
|
77
|
+
"private_key": private_key,
|
|
78
|
+
"passphrase": passphrase,
|
|
79
|
+
}
|
|
74
80
|
import msal
|
|
75
81
|
|
|
76
82
|
app = msal.ConfidentialClientApplication(
|
|
@@ -187,7 +193,11 @@ class AuthenticationContext(object):
|
|
|
187
193
|
browser_mode = kwargs.get("browser_mode", False)
|
|
188
194
|
environment = kwargs.get("environment")
|
|
189
195
|
provider = SamlTokenProvider(
|
|
190
|
-
self.url,
|
|
196
|
+
self.url,
|
|
197
|
+
credentials.userName,
|
|
198
|
+
credentials.password,
|
|
199
|
+
browser_mode,
|
|
200
|
+
environment,
|
|
191
201
|
)
|
|
192
202
|
else:
|
|
193
203
|
raise ValueError("Unknown credential type")
|
|
@@ -4,9 +4,10 @@ from abc import ABCMeta
|
|
|
4
4
|
class ODataJsonFormat(object):
|
|
5
5
|
"""OData JSON format"""
|
|
6
6
|
|
|
7
|
-
def __init__(self, metadata_level=None):
|
|
8
|
-
# type: (str) -> None
|
|
7
|
+
def __init__(self, metadata_level=None, etag=None):
|
|
8
|
+
# type: (str, str) -> None
|
|
9
9
|
self.metadata_level = metadata_level
|
|
10
|
+
self.etag = etag
|
|
10
11
|
|
|
11
12
|
__metaclass__ = ABCMeta
|
|
12
13
|
|