Office365-REST-Python-Client 2.5.5__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.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/METADATA +6 -6
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/RECORD +269 -222
- office365/booking/virtualevents/__init__.py +0 -0
- office365/booking/virtualevents/root.py +5 -0
- office365/communications/calls/participant.py +4 -5
- office365/directory/administrative_unit.py +9 -2
- office365/directory/applications/application.py +3 -3
- office365/directory/applications/roles/assignment_collection.py +1 -1
- office365/directory/applications/roles/collection.py +6 -2
- office365/directory/applications/roles/role.py +1 -1
- office365/directory/audit/provisioning/object_summary.py +30 -1
- office365/directory/authentication/method_configuration.py +9 -0
- office365/directory/authentication/method_mode_detail.py +8 -0
- office365/directory/authentication/method_target.py +5 -0
- office365/directory/authentication/methods/fido.py +8 -0
- office365/directory/authentication/methods/password.py +23 -0
- office365/directory/authentication/strength_root.py +5 -0
- office365/directory/certificates/auth_configuration.py +1 -3
- 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/groups/group.py +2 -6
- office365/directory/identities/conditional_access_root.py +10 -1
- office365/directory/identities/container.py +3 -9
- office365/directory/identities/providers/builtin_identity.py +3 -2
- office365/directory/identities/providers/saml_or_wsfed.py +4 -5
- office365/directory/identitygovernance/appconsent/request_collection.py +1 -1
- office365/directory/identitygovernance/governance.py +14 -3
- office365/directory/identitygovernance/privilegedaccess/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/root.py +5 -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/key_credential.py +3 -0
- office365/directory/licenses/assignment_state.py +26 -2
- office365/directory/licenses/details.py +4 -3
- office365/directory/licenses/subscribed_sku.py +8 -10
- office365/directory/object_collection.py +40 -25
- office365/directory/password_credential.py +3 -0
- office365/directory/permissions/default_user_role.py +5 -0
- office365/directory/permissions/grants/condition_set.py +4 -2
- office365/directory/permissions/grants/oauth2.py +7 -10
- office365/directory/policies/authorization.py +50 -3
- office365/directory/policies/device_registration.py +6 -0
- office365/directory/policies/permission_grant.py +2 -0
- office365/directory/policies/root.py +13 -0
- office365/directory/profile_photo.py +6 -6
- office365/directory/protection/riskyusers/risky_user.py +4 -4
- office365/directory/rolemanagement/resource_action.py +10 -0
- office365/directory/rolemanagement/role_permission.py +10 -0
- office365/directory/security/alerts/alert.py +5 -7
- office365/directory/security/attacksimulations/landing_page.py +5 -0
- office365/directory/security/attacksimulations/operation.py +5 -0
- office365/directory/security/attacksimulations/report.py +8 -1
- office365/directory/security/attacksimulations/root.py +33 -0
- office365/directory/security/attacksimulations/users/__init__.py +0 -0
- office365/directory/security/attacksimulations/users/details.py +5 -0
- office365/directory/security/hunting_query_results.py +5 -0
- office365/directory/security/incidents/incident.py +8 -13
- office365/directory/security/security.py +20 -3
- office365/directory/security/threatintelligence/article_indicator.py +7 -0
- office365/directory/serviceprincipals/service_principal.py +6 -12
- office365/directory/synchronization/schema.py +16 -0
- office365/directory/synchronization/synchronization.py +2 -0
- office365/directory/users/activities/history_item.py +3 -2
- office365/directory/users/user.py +60 -10
- office365/entity_collection.py +3 -2
- office365/graph_client.py +58 -30
- office365/intune/audit/event.py +1 -3
- office365/intune/audit/event_collection.py +1 -1
- office365/intune/devices/alternative_security_id.py +4 -0
- office365/intune/devices/collection.py +57 -0
- office365/intune/devices/device.py +38 -10
- office365/intune/devices/management/management.py +12 -0
- office365/intune/organizations/organization.py +1 -0
- office365/onedrive/analytics/item_activity_stat.py +9 -0
- office365/onedrive/analytics/item_analytics.py +1 -0
- office365/onedrive/contenttypes/content_type.py +4 -12
- office365/onedrive/driveitems/driveItem.py +76 -7
- office365/onedrive/files/hashes.py +5 -0
- office365/onedrive/lists/collection.py +2 -2
- office365/onedrive/lists/list.py +1 -1
- office365/onedrive/operations/long_running.py +6 -6
- office365/onedrive/operations/rich_long_running.py +4 -3
- office365/onedrive/permissions/collection.py +1 -14
- office365/onedrive/sharepoint_settings.py +6 -6
- 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/sites/sites_with_root.py +1 -3
- office365/onedrive/termstore/store.py +2 -4
- office365/onedrive/termstore/terms/collection.py +1 -2
- office365/onedrive/workbooks/charts/data_labels.py +13 -1
- office365/onedrive/workbooks/filter.py +9 -0
- office365/onedrive/workbooks/filter_criteria.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +6 -3
- office365/onedrive/workbooks/functions/result.py +2 -0
- office365/onedrive/workbooks/operations/workbook.py +7 -10
- office365/onedrive/workbooks/tables/pivot_table.py +9 -9
- office365/onedrive/workbooks/tables/sort.py +5 -0
- office365/onedrive/workbooks/tables/table.py +57 -0
- office365/onedrive/workbooks/worksheets/collection.py +0 -6
- office365/onedrive/workbooks/worksheets/protection.py +22 -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/permissions/permission.py +7 -7
- office365/outlook/calendar/place.py +5 -3
- office365/outlook/calendar/response_status.py +11 -0
- office365/outlook/calendar/rooms/room.py +14 -0
- office365/outlook/mail/attachments/collection.py +6 -1
- 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/messages/message.py +1 -1
- office365/outlook/mail/tips.py +17 -0
- office365/planner/plans/plan.py +11 -1
- office365/reports/root.py +83 -4
- office365/runtime/auth/authentication_context.py +12 -2
- office365/runtime/auth/providers/acs_token_provider.py +10 -7
- office365/runtime/auth/sts_profile.py +0 -1
- office365/runtime/client_object.py +18 -14
- office365/runtime/client_object_collection.py +8 -23
- office365/runtime/client_request_exception.py +1 -3
- office365/runtime/client_result.py +11 -14
- office365/runtime/client_runtime_context.py +11 -21
- office365/runtime/odata/json_format.py +7 -9
- office365/runtime/odata/request.py +12 -2
- office365/runtime/odata/v3/batch_request.py +7 -15
- office365/runtime/odata/v4/batch_request.py +13 -21
- office365/runtime/queries/upload_session.py +5 -0
- office365/runtime/types/event_handler.py +1 -1
- office365/search/entity.py +3 -2
- office365/sharepoint/activities/facets/delete.py +1 -1
- office365/sharepoint/activities/tracked_item_service.py +2 -3
- office365/sharepoint/administration/web_application.py +8 -7
- office365/sharepoint/alerts/collection.py +2 -1
- office365/sharepoint/attachments/attachment.py +3 -9
- office365/sharepoint/audit/audit.py +3 -2
- office365/sharepoint/changes/alert.py +4 -3
- office365/sharepoint/changes/collection.py +7 -10
- office365/sharepoint/changes/content_type.py +4 -4
- office365/sharepoint/changes/field.py +4 -5
- office365/sharepoint/changes/item.py +34 -7
- office365/sharepoint/changes/list.py +4 -4
- office365/sharepoint/changes/user.py +5 -6
- office365/sharepoint/client_context.py +4 -2
- office365/sharepoint/clientsidecomponent/component_context_info.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/enabled.py +4 -3
- office365/sharepoint/contentcenter/machinelearning/hub.py +6 -6
- office365/sharepoint/contentcenter/machinelearning/models/collection.py +1 -1
- office365/sharepoint/contenttypes/content_type.py +13 -1
- office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -7
- office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
- office365/sharepoint/directory/helper.py +2 -0
- office365/sharepoint/entity.py +12 -5
- office365/sharepoint/entity_collection.py +1 -3
- office365/sharepoint/eventreceivers/definition.py +8 -12
- office365/sharepoint/features/collection.py +1 -2
- office365/sharepoint/features/definitions/definition.py +6 -3
- office365/sharepoint/fields/calculated.py +8 -14
- office365/sharepoint/fields/collection.py +46 -13
- office365/sharepoint/fields/computed.py +4 -5
- office365/sharepoint/fields/currency.py +7 -11
- office365/sharepoint/fields/date_time.py +4 -8
- office365/sharepoint/fields/field.py +6 -16
- office365/sharepoint/fields/lookup.py +11 -9
- office365/sharepoint/fields/multi_choice.py +8 -12
- office365/sharepoint/fields/multi_line_text.py +10 -14
- office365/sharepoint/fields/number.py +13 -26
- office365/sharepoint/fields/rating_scale.py +6 -10
- office365/sharepoint/fields/related_field.py +10 -17
- office365/sharepoint/fields/url.py +4 -5
- office365/sharepoint/fields/user.py +10 -9
- office365/sharepoint/files/collection.py +17 -15
- office365/sharepoint/files/file.py +30 -23
- office365/sharepoint/folders/collection.py +22 -5
- office365/sharepoint/folders/coloring.py +11 -9
- office365/sharepoint/folders/coloring_information.py +38 -0
- office365/sharepoint/folders/folder.py +23 -25
- office365/sharepoint/likes/liked_by_information.py +7 -10
- office365/sharepoint/likes/user_entity.py +6 -8
- office365/sharepoint/listitems/form_update_value.py +17 -1
- office365/sharepoint/listitems/listitem.py +2 -2
- office365/sharepoint/lists/bloom_filter.py +5 -7
- office365/sharepoint/lists/creatables_info.py +5 -6
- office365/sharepoint/lists/list.py +24 -9
- office365/sharepoint/lists/template.py +7 -4
- office365/sharepoint/lists/template_collection.py +2 -4
- office365/sharepoint/marketplace/app_metadata.py +14 -23
- office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +6 -8
- 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/navigation/node.py +5 -8
- office365/sharepoint/permissions/irm/effective_settings.py +6 -8
- office365/sharepoint/permissions/irm/file_settings.py +8 -6
- office365/sharepoint/permissions/irm/settings.py +25 -43
- office365/sharepoint/portal/groups/site_manager.py +6 -7
- office365/sharepoint/principal/principal.py +2 -4
- office365/sharepoint/publishing/embed_data_v1.py +8 -15
- office365/sharepoint/publishing/pages/campaign_publication.py +4 -3
- office365/sharepoint/publishing/primary_city_time.py +8 -9
- office365/sharepoint/publishing/video/service_discoverer.py +4 -3
- office365/sharepoint/pushnotifications/subscriber.py +11 -15
- 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_settings.py +24 -46
- office365/sharepoint/sharing/permission_collection.py +18 -0
- office365/sharepoint/sharing/permission_information.py +5 -5
- office365/sharepoint/sharing/result.py +1 -0
- office365/sharepoint/sitedesigns/run.py +4 -3
- office365/sharepoint/sites/script_safe_domain.py +5 -0
- office365/sharepoint/sites/site.py +17 -20
- office365/sharepoint/taxonomy/field.py +32 -21
- office365/sharepoint/taxonomy/field_value.py +1 -1
- office365/sharepoint/taxonomy/groups/group.py +12 -1
- office365/sharepoint/taxonomy/sets/set.py +6 -0
- office365/sharepoint/taxonomy/stores/store.py +4 -2
- office365/sharepoint/teams/channel.py +6 -6
- office365/sharepoint/tenant/administration/endpoints.py +4 -3
- office365/sharepoint/tenant/administration/hubsites/properties.py +4 -5
- office365/sharepoint/tenant/administration/powerapps/__init__.py +0 -0
- office365/sharepoint/tenant/administration/powerapps/environment_context.py +8 -0
- office365/sharepoint/tenant/administration/sites/properties.py +0 -1
- office365/sharepoint/tenant/administration/spo_operation.py +4 -4
- office365/sharepoint/tenant/administration/tenant.py +1 -0
- office365/sharepoint/tenant/insights/report.py +11 -0
- office365/sharepoint/tenant/insights/report_manager.py +5 -0
- office365/sharepoint/tenant/insights/report_metadata.py +5 -0
- office365/sharepoint/tenant/settings.py +4 -3
- office365/sharepoint/translation/sync_translator.py +3 -2
- office365/sharepoint/ui/applicationpages/peoplepicker/entity_information.py +4 -4
- office365/sharepoint/usercustomactions/action.py +12 -20
- office365/sharepoint/userprofiles/followed_content.py +6 -10
- office365/sharepoint/userprofiles/people_manager.py +0 -1
- office365/sharepoint/userprofiles/person_properties.py +14 -30
- office365/sharepoint/userprofiles/personal_cache.py +4 -3
- office365/sharepoint/userprofiles/properties_for_user.py +4 -5
- office365/sharepoint/userprofiles/sharedwithme/document.py +12 -21
- office365/sharepoint/utilities/move_copy_util.py +19 -19
- office365/sharepoint/utilities/upload_status.py +7 -10
- office365/sharepoint/views/field_collection.py +9 -14
- office365/sharepoint/views/view.py +43 -64
- office365/sharepoint/webhooks/subscription.py +11 -19
- office365/sharepoint/webparts/webpart.py +3 -1
- office365/sharepoint/webs/information_collection.py +1 -1
- office365/sharepoint/webs/modernize_homepage_result.py +4 -3
- office365/sharepoint/webs/regional_settings.py +79 -16
- office365/sharepoint/webs/template.py +3 -5
- office365/sharepoint/webs/web.py +24 -25
- office365/teams/apps/catalog.py +1 -0
- office365/teams/chats/chat.py +4 -0
- office365/teams/operations/async_operation.py +5 -7
- office365/teams/schedule/schedule.py +6 -2
- office365/runtime/paths/item.py +0 -8
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.5.dist-info → Office365_REST_Python_Client-2.5.7.dist-info}/top_level.txt +0 -0
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
|
|
@@ -15,9 +15,7 @@ class SitesWithRoot(EntityCollection[Site]):
|
|
|
15
15
|
super(SitesWithRoot, self).__init__(context, Site, resource_path)
|
|
16
16
|
|
|
17
17
|
def get_all_sites(self):
|
|
18
|
-
"""
|
|
19
|
-
List root sites across geographies in an organization.
|
|
20
|
-
"""
|
|
18
|
+
"""List root sites across geographies in an organization."""
|
|
21
19
|
return_type = SitesWithRoot(self.context)
|
|
22
20
|
qry = FunctionQuery(self, "getAllSites", return_type=return_type)
|
|
23
21
|
self.context.add_query(qry)
|
|
@@ -3,7 +3,6 @@ from typing import Optional
|
|
|
3
3
|
from office365.entity import Entity
|
|
4
4
|
from office365.entity_collection import EntityCollection
|
|
5
5
|
from office365.onedrive.termstore.groups.collection import GroupCollection
|
|
6
|
-
from office365.onedrive.termstore.groups.group import Group
|
|
7
6
|
from office365.onedrive.termstore.sets.collection import SetCollection
|
|
8
7
|
from office365.onedrive.termstore.sets.set import Set
|
|
9
8
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -23,10 +22,9 @@ class Store(Entity):
|
|
|
23
22
|
|
|
24
23
|
def _groups_loaded(groups):
|
|
25
24
|
# type: (GroupCollection) -> None
|
|
26
|
-
for
|
|
27
|
-
self.context.load(g.sets, after_loaded=_sets_loaded)
|
|
25
|
+
[grp.sets.get().after_execute(_sets_loaded) for grp in groups]
|
|
28
26
|
|
|
29
|
-
self.
|
|
27
|
+
self.groups.get().after_execute(_groups_loaded)
|
|
30
28
|
|
|
31
29
|
return return_type
|
|
32
30
|
|
|
@@ -5,7 +5,7 @@ from office365.runtime.client_value_collection import ClientValueCollection
|
|
|
5
5
|
from office365.runtime.queries.create_entity import CreateEntityQuery
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class TermCollection(EntityCollection):
|
|
8
|
+
class TermCollection(EntityCollection[Term]):
|
|
9
9
|
def __init__(self, context, resource_path=None, parent_set=None):
|
|
10
10
|
"""
|
|
11
11
|
:param office365.onedrive.termstore.sets.set.Set parent_set: The parent set that contains the term
|
|
@@ -17,7 +17,6 @@ class TermCollection(EntityCollection):
|
|
|
17
17
|
"""Create a new term object.
|
|
18
18
|
|
|
19
19
|
:param str label: The name of the label.
|
|
20
|
-
:rtype: Term
|
|
21
20
|
"""
|
|
22
21
|
return_type = Term(self.context)
|
|
23
22
|
self.add_child(return_type)
|
|
@@ -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)
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
4
|
+
from office365.onedrive.workbooks.filter_criteria import WorkbookFilterCriteria
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
class WorkbookFilter(Entity):
|
|
5
8
|
"""Manages the filtering of a table's column."""
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def criteria(self):
|
|
12
|
+
# type: () -> Optional[WorkbookFilterCriteria]
|
|
13
|
+
"""The currently applied filter on the given column."""
|
|
14
|
+
return self.properties.get("criteria", WorkbookFilterCriteria())
|
|
@@ -3,3 +3,8 @@ from office365.runtime.client_value import ClientValue
|
|
|
3
3
|
|
|
4
4
|
class WorkbookFilterCriteria(ClientValue):
|
|
5
5
|
"""Represents the filtering criteria applied to a column."""
|
|
6
|
+
|
|
7
|
+
def __init__(self, operator=None, values=None):
|
|
8
|
+
""" """
|
|
9
|
+
self.operator = operator
|
|
10
|
+
self.values = values
|
|
@@ -48,11 +48,14 @@ class WorkbookFunctions(Entity):
|
|
|
48
48
|
def days(self, start_date, end_date):
|
|
49
49
|
"""Returns the number of days between two dates.
|
|
50
50
|
|
|
51
|
-
:param datetime start_date: Two dates between which you want to know the number of days.
|
|
52
|
-
:param datetime end_date: Two dates between which you want to know the number of days.
|
|
51
|
+
:param datetime.datetime start_date: Two dates between which you want to know the number of days.
|
|
52
|
+
:param datetime.datetime end_date: Two dates between which you want to know the number of days.
|
|
53
53
|
"""
|
|
54
54
|
return_type = WorkbookFunctionResult(self.context)
|
|
55
|
-
payload = {
|
|
55
|
+
payload = {
|
|
56
|
+
"startDate": start_date.isoformat() + "Z",
|
|
57
|
+
"endDate": end_date.isoformat() + "Z",
|
|
58
|
+
}
|
|
56
59
|
qry = ServiceOperationQuery(self, "days", None, payload, None, return_type)
|
|
57
60
|
self.context.add_query(qry)
|
|
58
61
|
return return_type
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.onedrive.workbooks.operations.error import WorkbookOperationError
|
|
3
5
|
|
|
@@ -7,22 +9,17 @@ class WorkbookOperation(Entity):
|
|
|
7
9
|
|
|
8
10
|
@property
|
|
9
11
|
def error(self):
|
|
10
|
-
"""
|
|
11
|
-
The error returned by the operation.
|
|
12
|
-
"""
|
|
12
|
+
"""The error returned by the operation."""
|
|
13
13
|
return self.properties.get("error", WorkbookOperationError())
|
|
14
14
|
|
|
15
15
|
@property
|
|
16
16
|
def resource_location(self):
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"""
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""The resource URI for the result."""
|
|
20
19
|
return self.properties.get("resourceLocation", None)
|
|
21
20
|
|
|
22
21
|
@property
|
|
23
22
|
def status(self):
|
|
24
|
-
|
|
25
|
-
The current status of the operation. Possible values are: NotStarted, Running, Completed, Failed.
|
|
26
|
-
:rtype: str or None
|
|
27
|
-
"""
|
|
23
|
+
# type: () -> Optional[str]
|
|
24
|
+
"""The current status of the operation. Possible values are: NotStarted, Running, Completed, Failed."""
|
|
28
25
|
return self.properties.get("status", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
3
5
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
@@ -6,27 +8,25 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
6
8
|
class WorkbookPivotTable(Entity):
|
|
7
9
|
"""Represents an Excel PivotTable."""
|
|
8
10
|
|
|
11
|
+
def __str__(self):
|
|
12
|
+
return self.name or self.entity_type_name
|
|
13
|
+
|
|
9
14
|
def refresh(self):
|
|
10
|
-
"""
|
|
11
|
-
Refreshes the PivotTable.
|
|
12
|
-
"""
|
|
15
|
+
"""Refreshes the PivotTable."""
|
|
13
16
|
qry = ServiceOperationQuery(self, "refresh")
|
|
14
17
|
self.context.add_query(qry)
|
|
15
18
|
return self
|
|
16
19
|
|
|
17
20
|
def refresh_all(self):
|
|
18
|
-
"""
|
|
19
|
-
Refreshes the PivotTable within a given worksheet.
|
|
20
|
-
"""
|
|
21
|
+
"""Refreshes the PivotTable within a given worksheet."""
|
|
21
22
|
qry = ServiceOperationQuery(self, "refreshAll")
|
|
22
23
|
self.context.add_query(qry)
|
|
23
24
|
return self
|
|
24
25
|
|
|
25
26
|
@property
|
|
26
27
|
def name(self):
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"""
|
|
28
|
+
# type: () -> Optional[str]
|
|
29
|
+
"""Name of the PivotTable."""
|
|
30
30
|
return self.properties.get("Name", None)
|
|
31
31
|
|
|
32
32
|
@property
|
|
@@ -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."""
|
|
@@ -9,12 +9,6 @@ class WorkbookWorksheetCollection(EntityCollection[WorkbookWorksheet]):
|
|
|
9
9
|
context, WorkbookWorksheet, resource_path
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
-
def __getitem__(self, id_or_name):
|
|
13
|
-
"""
|
|
14
|
-
:rtype: WorkbookWorksheet
|
|
15
|
-
"""
|
|
16
|
-
return super(WorkbookWorksheetCollection, self).__getitem__(id_or_name)
|
|
17
|
-
|
|
18
12
|
def add(self, name=None):
|
|
19
13
|
"""
|
|
20
14
|
Adds a new worksheet to the workbook. The worksheet will be added at the end of existing worksheets.
|
|
@@ -1,5 +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."""
|
|
10
|
+
|
|
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]
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.outlook.calendar.email_address import EmailAddress
|
|
3
5
|
from office365.runtime.types.collections import StringCollection
|
|
@@ -37,28 +39,26 @@ class CalendarPermission(Entity):
|
|
|
37
39
|
|
|
38
40
|
@property
|
|
39
41
|
def is_inside_organization(self):
|
|
42
|
+
# type: () -> Optional[bool]
|
|
40
43
|
"""
|
|
41
|
-
True if the user in context (sharee or delegate) is inside the same organization as the calendar owner
|
|
42
|
-
:rtype: bool or None
|
|
44
|
+
True if the user in context (sharee or delegate) is inside the same organization as the calendar owner
|
|
43
45
|
"""
|
|
44
46
|
return self.properties.get("isInsideOrganization", None)
|
|
45
47
|
|
|
46
48
|
@property
|
|
47
49
|
def is_removable(self):
|
|
50
|
+
# type: () -> Optional[bool]
|
|
48
51
|
"""
|
|
49
52
|
True if the user can be removed from the list of sharees or delegates for the specified calendar,
|
|
50
53
|
false otherwise. The "My organization" user determines the permissions other people within your organization
|
|
51
54
|
have to the given calendar. You cannot remove "My organization" as a sharee to a calendar.
|
|
52
|
-
:rtype: bool or None
|
|
53
55
|
"""
|
|
54
56
|
return self.properties.get("isRemovable", None)
|
|
55
57
|
|
|
56
58
|
@property
|
|
57
59
|
def role(self):
|
|
58
|
-
|
|
59
|
-
Current permission level of the calendar sharee or delegate.
|
|
60
|
-
:rtype: str or None
|
|
61
|
-
"""
|
|
60
|
+
# type: () -> Optional[str]
|
|
61
|
+
"""Current permission level of the calendar sharee or delegate."""
|
|
62
62
|
return self.properties.get("role", None)
|
|
63
63
|
|
|
64
64
|
def get_property(self, name, default_value=None):
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.outlook.mail.physical_address import PhysicalAddress
|
|
3
5
|
|
|
@@ -8,9 +10,8 @@ class Place(Entity):
|
|
|
8
10
|
|
|
9
11
|
@property
|
|
10
12
|
def display_name(self):
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"""
|
|
13
|
+
# type: () -> Optional[str]
|
|
14
|
+
"""The name associated with the place."""
|
|
14
15
|
return self.properties.get("displayName", None)
|
|
15
16
|
|
|
16
17
|
@property
|
|
@@ -20,5 +21,6 @@ class Place(Entity):
|
|
|
20
21
|
|
|
21
22
|
@property
|
|
22
23
|
def phone(self):
|
|
24
|
+
# type: () -> Optional[str]
|
|
23
25
|
"""The phone number of the place."""
|
|
24
26
|
return self.properties.get("phone", None)
|
|
@@ -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)
|
|
@@ -4,7 +4,10 @@ import requests
|
|
|
4
4
|
|
|
5
5
|
from office365.entity_collection import EntityCollection
|
|
6
6
|
from office365.outlook.mail.attachments.attachment import Attachment
|
|
7
|
+
from office365.runtime.client_result import ClientResult
|
|
7
8
|
from office365.runtime.compat import parse_query_string
|
|
9
|
+
from office365.runtime.http.request_options import RequestOptions
|
|
10
|
+
from office365.runtime.odata.v4.upload_session import UploadSession
|
|
8
11
|
from office365.runtime.odata.v4.upload_session_request import UploadSessionRequest
|
|
9
12
|
from office365.runtime.queries.upload_session import UploadSessionQuery
|
|
10
13
|
|
|
@@ -60,13 +63,15 @@ class AttachmentCollection(EntityCollection[Attachment]):
|
|
|
60
63
|
self, {"AttachmentItem": AttachmentItem.create_file(source_path)}
|
|
61
64
|
)
|
|
62
65
|
|
|
63
|
-
def _start_upload():
|
|
66
|
+
def _start_upload(result):
|
|
67
|
+
# type: (ClientResult[UploadSession]) -> None
|
|
64
68
|
with open(source_path, "rb") as local_file:
|
|
65
69
|
session_request = UploadSessionRequest(
|
|
66
70
|
local_file, chunk_size, chunk_uploaded
|
|
67
71
|
)
|
|
68
72
|
|
|
69
73
|
def _construct_request(request):
|
|
74
|
+
# type: (RequestOptions) -> None
|
|
70
75
|
auth_token = parse_query_string(request.url, "authtoken")
|
|
71
76
|
request.set_header("Authorization", "Bearer {0}".format(auth_token))
|
|
72
77
|
|
|
@@ -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
|
|
@@ -103,7 +103,7 @@ class Message(OutlookItem):
|
|
|
103
103
|
if a file that's smaller than 3 MB, then add_file_attachment method is utilized
|
|
104
104
|
|
|
105
105
|
:param str file_path:
|
|
106
|
-
:param ()->None chunk_uploaded: Upload action
|
|
106
|
+
:param (int)->None chunk_uploaded: Upload action
|
|
107
107
|
"""
|
|
108
108
|
max_upload_chunk = 1000000 * 3
|
|
109
109
|
file_size = os.stat(file_path).st_size
|
|
@@ -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
|