Office365-REST-Python-Client 2.5.6__py3-none-any.whl → 2.5.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/METADATA +5 -5
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/RECORD +147 -96
- office365/communications/onlinemeetings/online_meeting.py +30 -3
- office365/communications/onlinemeetings/recordings/__init__.py +0 -0
- office365/communications/onlinemeetings/recordings/call.py +5 -0
- office365/communications/onlinemeetings/transcripts/__init__.py +0 -0
- 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/entitlementmanagement/entitlement_management.py +7 -0
- office365/directory/identitygovernance/governance.py +16 -0
- 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 +109 -25
- office365/directory/synchronization/schema.py +16 -0
- office365/directory/users/user.py +23 -0
- office365/graph_client.py +8 -0
- office365/onedrive/driveitems/driveItem.py +86 -6
- office365/onedrive/driveitems/retention_label.py +25 -0
- 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/chart.py +13 -0
- office365/onedrive/workbooks/charts/data_labels.py +13 -1
- office365/onedrive/workbooks/icon.py +5 -0
- office365/onedrive/workbooks/names/named_item.py +6 -0
- office365/onedrive/workbooks/ranges/font.py +5 -0
- office365/onedrive/workbooks/ranges/format.py +60 -0
- office365/onedrive/workbooks/ranges/range.py +12 -0
- office365/onedrive/workbooks/ranges/reference.py +6 -0
- office365/onedrive/workbooks/sort_field.py +26 -0
- office365/onedrive/workbooks/tables/pivot_table_collection.py +16 -0
- 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 +10 -0
- office365/onedrive/workbooks/worksheets/worksheet.py +5 -4
- 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/activities/action_facet.py +17 -0
- office365/sharepoint/activities/client_request.py +4 -0
- office365/sharepoint/activities/client_response.py +8 -0
- office365/sharepoint/activities/entity.py +10 -0
- office365/sharepoint/activities/facets/delete.py +1 -0
- office365/sharepoint/activities/facets/get_mention.py +10 -0
- office365/sharepoint/activities/facets/in_doc.py +4 -0
- office365/sharepoint/activities/facets/move.py +14 -0
- office365/sharepoint/activities/facets/point_in_time_restore.py +9 -0
- office365/sharepoint/activities/facets/revision_set.py +9 -0
- office365/sharepoint/activities/facets/task_completed.py +9 -0
- office365/sharepoint/activities/facets/version.py +12 -0
- office365/sharepoint/activities/identity_item.py +16 -1
- office365/sharepoint/alerts/collection.py +2 -1
- office365/sharepoint/attachments/attachment.py +6 -9
- office365/sharepoint/attachments/collection.py +25 -3
- office365/sharepoint/client_context.py +33 -2
- office365/sharepoint/comments/collection.py +1 -1
- office365/sharepoint/compliance/store_proxy.py +43 -0
- 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/directory/provider/alternate_id_data.py +9 -0
- office365/sharepoint/directory/provider/notification.py +15 -0
- office365/sharepoint/directory/provider/object_data.py +14 -0
- office365/sharepoint/directory/provider/provider.py +13 -0
- office365/sharepoint/entity.py +15 -0
- office365/sharepoint/features/collection.py +2 -0
- office365/sharepoint/fields/collection.py +4 -3
- office365/sharepoint/fields/user_value.py +1 -1
- office365/sharepoint/folders/folder.py +3 -5
- 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/multigeo/move_job_entity_data.py +9 -0
- office365/sharepoint/multigeo/site_move_job_entity_data.py +9 -0
- office365/sharepoint/multigeo/user_personal_site_location.py +9 -0
- office365/sharepoint/permissions/securable_object.py +2 -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/object_sharing_information.py +2 -0
- office365/sharepoint/sharing/permission_collection.py +18 -0
- office365/sharepoint/sharing/shared_document_info.py +9 -0
- office365/sharepoint/sites/script_safe_domain.py +5 -0
- office365/sharepoint/sites/site.py +10 -4
- office365/sharepoint/sites/version_policy_manager.py +7 -0
- 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/tenant/administration/secondary_administrators_info.py +5 -0
- office365/sharepoint/tenant/administration/tenant.py +14 -0
- office365/sharepoint/tenant/cdn_api.py +16 -0
- office365/sharepoint/tenant/management/externalusers/results/get.py +4 -0
- office365/sharepoint/tenant/management/office365_tenant.py +14 -0
- office365/sharepoint/ui/applicationpages/peoplepicker/web_service_interface.py +39 -33
- office365/sharepoint/userprofiles/cross_geo_sync.py +37 -0
- office365/sharepoint/userprofiles/cross_geo_sync_user_data_batch.py +5 -0
- office365/sharepoint/userprofiles/followed_content.py +15 -0
- office365/sharepoint/userprofiles/people_manager.py +23 -10
- office365/sharepoint/userprofiles/person_properties.py +7 -0
- office365/sharepoint/userprofiles/user_profile.py +4 -6
- office365/sharepoint/views/view.py +2 -0
- office365/sharepoint/webs/information_collection.py +1 -1
- office365/sharepoint/webs/regional_settings.py +71 -0
- office365/sharepoint/webs/web.py +53 -5
- office365/sharepoint/workflowservices/deployment_service.py +9 -0
- 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.8.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.6.dist-info → Office365_REST_Python_Client-2.5.8.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
4
|
+
from office365.entity_collection import EntityCollection
|
|
5
|
+
from office365.onedrive.workbooks.ranges.border import WorkbookRangeBorder
|
|
2
6
|
from office365.onedrive.workbooks.ranges.fill import WorkbookRangeFill
|
|
7
|
+
from office365.onedrive.workbooks.ranges.font import WorkbookRangeFont
|
|
3
8
|
from office365.onedrive.workbooks.ranges.format_protection import (
|
|
4
9
|
WorkbookFormatProtection,
|
|
5
10
|
)
|
|
@@ -9,6 +14,53 @@ from office365.runtime.paths.resource_path import ResourcePath
|
|
|
9
14
|
class WorkbookRangeFormat(Entity):
|
|
10
15
|
"""A format object encapsulating the range's font, fill, borders, alignment, and other properties."""
|
|
11
16
|
|
|
17
|
+
@property
|
|
18
|
+
def column_width(self):
|
|
19
|
+
# type: () -> Optional[float]
|
|
20
|
+
"""Gets or sets the width of all columns within the range. If the column widths aren't uniform,
|
|
21
|
+
null will be returned."""
|
|
22
|
+
return self.properties.get("columnWidth", None)
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def horizontal_alignment(self):
|
|
26
|
+
# type: () -> Optional[str]
|
|
27
|
+
"""Represents the horizontal alignment for the specified object"""
|
|
28
|
+
return self.properties.get("horizontalAlignment", None)
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def row_height(self):
|
|
32
|
+
# type: () -> Optional[float]
|
|
33
|
+
"""Gets or sets the height of all rows in the range. If the row heights aren't uniform null will be returned."""
|
|
34
|
+
return self.properties.get("rowHeight", None)
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def vertical_alignment(self):
|
|
38
|
+
# type: () -> Optional[str]
|
|
39
|
+
"""Represents the vertical alignment for the specified object.
|
|
40
|
+
Possible values are: Top, Center, Bottom, Justify, Distributed."""
|
|
41
|
+
return self.properties.get("verticalAlignment", None)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def wrap_text(self):
|
|
45
|
+
# type: () -> Optional[bool]
|
|
46
|
+
"""Indicates if Excel wraps the text in the object.
|
|
47
|
+
A null value indicates that the entire range doesn't have uniform wrap setting
|
|
48
|
+
"""
|
|
49
|
+
return self.properties.get("wrapText", None)
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def borders(self):
|
|
53
|
+
# type: () -> EntityCollection[WorkbookRangeBorder]
|
|
54
|
+
"""Collection of border objects that apply to the overall range selected."""
|
|
55
|
+
return self.properties.get(
|
|
56
|
+
"borders",
|
|
57
|
+
EntityCollection(
|
|
58
|
+
self.context,
|
|
59
|
+
WorkbookRangeBorder,
|
|
60
|
+
ResourcePath("borders", self.resource_path),
|
|
61
|
+
),
|
|
62
|
+
)
|
|
63
|
+
|
|
12
64
|
@property
|
|
13
65
|
def fill(self):
|
|
14
66
|
"""Returns the fill object defined on the overall range"""
|
|
@@ -17,6 +69,14 @@ class WorkbookRangeFormat(Entity):
|
|
|
17
69
|
WorkbookRangeFill(self.context, ResourcePath("fill", self.resource_path)),
|
|
18
70
|
)
|
|
19
71
|
|
|
72
|
+
@property
|
|
73
|
+
def font(self):
|
|
74
|
+
"""Returns the font object defined on the overall range selected"""
|
|
75
|
+
return self.properties.get(
|
|
76
|
+
"font",
|
|
77
|
+
WorkbookRangeFont(self.context, ResourcePath("font", self.resource_path)),
|
|
78
|
+
)
|
|
79
|
+
|
|
20
80
|
@property
|
|
21
81
|
def protection(self):
|
|
22
82
|
"""Returns the format protection object for a range"""
|
|
@@ -82,6 +82,18 @@ class WorkbookRange(Entity):
|
|
|
82
82
|
"""Represents the total number of columns in the range. Read-only."""
|
|
83
83
|
return self.properties.get("columnCount", None)
|
|
84
84
|
|
|
85
|
+
@property
|
|
86
|
+
def column_hidden(self):
|
|
87
|
+
# type: () -> Optional[bool]
|
|
88
|
+
"""Represents if all columns of the current range are hidden."""
|
|
89
|
+
return self.properties.get("columnHidden", None)
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def column_index(self):
|
|
93
|
+
# type: () -> Optional[int]
|
|
94
|
+
"""Represents the column number of the first cell in the range. Zero-indexed. Read-only."""
|
|
95
|
+
return self.properties.get("columnIndex", None)
|
|
96
|
+
|
|
85
97
|
@property
|
|
86
98
|
def format(self):
|
|
87
99
|
"""Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties"""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from office365.onedrive.workbooks.icon import WorkbookIcon
|
|
2
|
+
from office365.runtime.client_value import ClientValue
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class WorkbookSortField(ClientValue):
|
|
6
|
+
"""Represents a condition in a sorting operation."""
|
|
7
|
+
|
|
8
|
+
def __init__(
|
|
9
|
+
self, ascending=None, color=None, dataOption=None, icon=WorkbookIcon(), key=None
|
|
10
|
+
):
|
|
11
|
+
"""
|
|
12
|
+
:param bool ascending: Represents whether the sorting is done in an ascending fashion.
|
|
13
|
+
:param str color: Represents the color that is the target of the condition if the sorting is on font
|
|
14
|
+
or cell color.
|
|
15
|
+
:param str dataOption: Represents additional sorting options for this field.
|
|
16
|
+
Possible values are: Normal, TextAsNumber.
|
|
17
|
+
:param WorkbookIcon icon: Represents the icon that is the target of the condition if the sorting
|
|
18
|
+
is on the cell's icon.
|
|
19
|
+
:param str key: Represents the column (or row, depending on the sort orientation) that the condition is on.
|
|
20
|
+
Represented as an offset from the first column (or row).
|
|
21
|
+
"""
|
|
22
|
+
self.ascending = ascending
|
|
23
|
+
self.color = color
|
|
24
|
+
self.dataOption = dataOption
|
|
25
|
+
self.icon = icon
|
|
26
|
+
self.key = key
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from office365.entity_collection import EntityCollection
|
|
2
|
+
from office365.onedrive.workbooks.tables.pivot_table import WorkbookPivotTable
|
|
3
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class WorkbookPivotTableCollection(EntityCollection[WorkbookPivotTable]):
|
|
7
|
+
def __init__(self, context, resource_path=None):
|
|
8
|
+
super(WorkbookPivotTableCollection, self).__init__(
|
|
9
|
+
context, WorkbookPivotTable, resource_path
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
def refresh_all(self):
|
|
13
|
+
"""Refreshes the PivotTable."""
|
|
14
|
+
qry = ServiceOperationQuery(self, "refreshAll")
|
|
15
|
+
self.context.add_query(qry)
|
|
16
|
+
return self
|
|
@@ -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,13 @@ 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
|
+
"""
|
|
11
|
+
:param bool allowAutoFilter:
|
|
12
|
+
"""
|
|
13
|
+
self.allowAutoFilter = allowAutoFilter
|
|
14
|
+
self.allowDeleteColumns = allowDeleteColumns
|
|
15
|
+
self.allowDeleteRows = allowDeleteRows
|
|
@@ -6,7 +6,9 @@ from office365.onedrive.workbooks.charts.chart import WorkbookChart
|
|
|
6
6
|
from office365.onedrive.workbooks.names.named_item import WorkbookNamedItem
|
|
7
7
|
from office365.onedrive.workbooks.ranges.range import WorkbookRange
|
|
8
8
|
from office365.onedrive.workbooks.tables.collection import WorkbookTableCollection
|
|
9
|
-
from office365.onedrive.workbooks.tables.
|
|
9
|
+
from office365.onedrive.workbooks.tables.pivot_table_collection import (
|
|
10
|
+
WorkbookPivotTableCollection,
|
|
11
|
+
)
|
|
10
12
|
from office365.onedrive.workbooks.worksheets.protection import (
|
|
11
13
|
WorkbookWorksheetProtection,
|
|
12
14
|
)
|
|
@@ -94,13 +96,12 @@ class WorkbookWorksheet(Entity):
|
|
|
94
96
|
|
|
95
97
|
@property
|
|
96
98
|
def pivot_tables(self):
|
|
97
|
-
# type: () ->
|
|
99
|
+
# type: () -> WorkbookPivotTableCollection
|
|
98
100
|
"""Collection of PivotTables that are part of the worksheet."""
|
|
99
101
|
return self.properties.get(
|
|
100
102
|
"pivotTables",
|
|
101
|
-
|
|
103
|
+
WorkbookPivotTableCollection(
|
|
102
104
|
self.context,
|
|
103
|
-
WorkbookPivotTable,
|
|
104
105
|
ResourcePath("pivotTables", self.resource_path),
|
|
105
106
|
),
|
|
106
107
|
)
|
|
@@ -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
|
|
|
@@ -25,7 +25,7 @@ class ODataRequest(ClientRequest):
|
|
|
25
25
|
"""Creates OData request"""
|
|
26
26
|
super(ODataRequest, self).__init__()
|
|
27
27
|
self._default_json_format = json_format
|
|
28
|
-
self.beforeExecute += self.
|
|
28
|
+
self.beforeExecute += self._ensure_http_headers
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def json_format(self):
|
|
@@ -111,6 +111,8 @@ class ODataRequest(ClientRequest):
|
|
|
111
111
|
k: v for k, v in self._next_property(value, json_format)
|
|
112
112
|
}
|
|
113
113
|
yield name, value
|
|
114
|
+
elif name == "@odata.etag":
|
|
115
|
+
yield "__etag", value
|
|
114
116
|
else:
|
|
115
117
|
yield "__value", json
|
|
116
118
|
elif json is not None:
|
|
@@ -142,8 +144,16 @@ class ODataRequest(ClientRequest):
|
|
|
142
144
|
json = {query.parameters_name: json}
|
|
143
145
|
return json
|
|
144
146
|
|
|
145
|
-
def
|
|
147
|
+
def _ensure_http_headers(self, request):
|
|
146
148
|
# type: (RequestOptions) -> None
|
|
149
|
+
"""
|
|
150
|
+
Ensures that HTTP Header Fields are specified in the OData request, namely:
|
|
151
|
+
- The Content-Type header
|
|
152
|
+
- Accept request-header field
|
|
153
|
+
- The If-Match request-header field (optional)
|
|
154
|
+
"""
|
|
147
155
|
media_type = self.json_format.media_type
|
|
148
156
|
request.ensure_header("Content-Type", media_type)
|
|
149
157
|
request.ensure_header("Accept", media_type)
|
|
158
|
+
if self.json_format.etag is not None:
|
|
159
|
+
request.ensure_header("If-Match", self.json_format.etag)
|
|
@@ -4,6 +4,11 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class UploadSessionQuery(ServiceOperationQuery):
|
|
7
|
+
"""
|
|
8
|
+
The UploadSession query provides information about how to upload large files to OneDrive, OneDrive for
|
|
9
|
+
Business, or SharePoint document libraries
|
|
10
|
+
"""
|
|
11
|
+
|
|
7
12
|
def __init__(self, binding_type, parameters_type):
|
|
8
13
|
super(UploadSessionQuery, self).__init__(
|
|
9
14
|
binding_type, "createUploadSession", None, parameters_type
|