Office365-REST-Python-Client 2.5.4__py3-none-any.whl → 2.5.6__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.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/METADATA +2 -2
- {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/RECORD +224 -204
- office365/booking/business/business.py +5 -3
- office365/booking/virtualevents/__init__.py +0 -0
- office365/booking/virtualevents/root.py +5 -0
- office365/communications/calls/participant.py +4 -5
- office365/directory/applications/application.py +3 -3
- office365/directory/applications/roles/assignment_collection.py +1 -1
- office365/directory/applications/roles/collection.py +2 -2
- 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/strength_root.py +5 -0
- office365/directory/certificates/auth_configuration.py +1 -3
- office365/directory/extensions/extended_property.py +4 -4
- office365/directory/extensions/open_type.py +4 -4
- 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/base.py +7 -5
- office365/directory/identities/providers/builtin_identity.py +3 -2
- office365/directory/identities/providers/saml_or_wsfed.py +4 -5
- office365/directory/identities/providers/social_identity.py +5 -3
- office365/directory/identities/userflows/b2x/user_flow.py +6 -5
- office365/directory/identities/userflows/language_configuration.py +10 -7
- 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/key_credential.py +3 -0
- office365/directory/licenses/assignment_state.py +26 -2
- office365/directory/licenses/details.py +8 -6
- 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/permission_grant.py +2 -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/serviceprincipals/service_principal.py +3 -4
- office365/directory/synchronization/synchronization.py +2 -0
- office365/directory/users/activities/history_item.py +3 -2
- office365/directory/users/user.py +37 -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 +9 -10
- office365/onedrive/files/hashes.py +5 -0
- office365/onedrive/lists/collection.py +2 -2
- 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/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/comments/comment.py +7 -6
- 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/worksheets/collection.py +0 -6
- office365/onedrive/workbooks/worksheets/protection.py +2 -0
- office365/onedrive/workbooks/worksheets/worksheet.py +30 -2
- office365/onenote/notebooks/collection.py +0 -1
- office365/outlook/calendar/events/event.py +24 -46
- office365/outlook/calendar/permissions/permission.py +7 -7
- office365/outlook/calendar/place.py +5 -3
- office365/outlook/mail/attachments/collection.py +6 -1
- office365/outlook/mail/attachments/file.py +9 -16
- office365/outlook/mail/messages/message.py +1 -1
- office365/planner/user.py +3 -7
- office365/reports/root.py +50 -4
- office365/runtime/auth/providers/acs_token_provider.py +10 -7
- office365/runtime/auth/sts_profile.py +0 -1
- office365/runtime/client_object.py +21 -17
- office365/runtime/client_object_collection.py +9 -24
- office365/runtime/client_request_exception.py +1 -3
- office365/runtime/client_result.py +11 -14
- office365/runtime/client_runtime_context.py +20 -32
- office365/runtime/odata/json_format.py +4 -7
- office365/runtime/odata/request.py +3 -3
- office365/runtime/odata/v3/batch_request.py +17 -31
- office365/runtime/odata/v4/batch_request.py +13 -21
- office365/runtime/queries/batch.py +5 -11
- office365/runtime/queries/function.py +5 -6
- 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/alert.py +8 -12
- 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 +20 -20
- 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/fieldlinks/collection.py +4 -6
- office365/sharepoint/contenttypes/fieldlinks/field_link.py +14 -22
- 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 +3 -6
- office365/sharepoint/features/definitions/definition.py +6 -3
- office365/sharepoint/fields/calculated.py +8 -14
- office365/sharepoint/fields/collection.py +42 -10
- 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/checked_out_file.py +4 -3
- office365/sharepoint/files/collection.py +17 -15
- office365/sharepoint/files/file.py +33 -27
- 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 +26 -30
- 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 +9 -11
- office365/sharepoint/lists/bloom_filter.py +5 -7
- office365/sharepoint/lists/creatables_info.py +5 -6
- office365/sharepoint/lists/list.py +25 -10
- 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/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/portal/sites/manager.py +4 -3
- 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/sharing/object_sharing_settings.py +24 -46
- 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/site.py +7 -16
- office365/sharepoint/taxonomy/field.py +32 -21
- 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/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/modernize_homepage_result.py +4 -3
- office365/sharepoint/webs/regional_settings.py +9 -17
- office365/sharepoint/webs/template.py +18 -18
- office365/sharepoint/webs/theme_info.py +6 -6
- office365/sharepoint/webs/web.py +16 -23
- office365/teams/members/aad_user_conversation.py +4 -4
- office365/teams/operations/async_operation.py +5 -7
- office365/runtime/paths/item.py +0 -8
- {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.4.dist-info → Office365_REST_Python_Client-2.5.6.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,14 +8,12 @@ class LongRunningOperation(Entity):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def resource_location(self):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""URI of the resource that the operation is performed on."""
|
|
12
13
|
return self.properties.get("resourceLocation", None)
|
|
13
14
|
|
|
14
15
|
@property
|
|
15
16
|
def status_detail(self):
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"""
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""Details about the status of the operation."""
|
|
19
19
|
return self.properties.get("statusDetail", None)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.onedrive.operations.long_running import LongRunningOperation
|
|
2
4
|
|
|
3
5
|
|
|
@@ -6,7 +8,6 @@ class RichLongRunningOperation(LongRunningOperation):
|
|
|
6
8
|
|
|
7
9
|
@property
|
|
8
10
|
def resource_id(self):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"""
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""The unique identifier for the result."""
|
|
12
13
|
return self.properties.get("resourceId", None)
|
|
@@ -69,19 +69,6 @@ class PermissionCollection(EntityCollection[Permission]):
|
|
|
69
69
|
identity.ensure_properties(["displayName"], _add)
|
|
70
70
|
return return_type
|
|
71
71
|
|
|
72
|
-
def delete(self, roles, identity):
|
|
73
|
-
# type: (list[str], Application|User|Group|Device) -> Permission
|
|
74
|
-
"""Deletes the permission."""
|
|
75
|
-
|
|
76
|
-
def _delete(col):
|
|
77
|
-
pass
|
|
78
|
-
|
|
79
|
-
def _identity_loaded():
|
|
80
|
-
self.get_all(page_loaded=_delete)
|
|
81
|
-
|
|
82
|
-
identity.ensure_property("id", _identity_loaded)
|
|
83
|
-
return self
|
|
84
|
-
|
|
85
72
|
def delete_all(self):
|
|
86
73
|
"""Remove all access to resource"""
|
|
87
74
|
|
|
@@ -90,5 +77,5 @@ class PermissionCollection(EntityCollection[Permission]):
|
|
|
90
77
|
for permission in return_type:
|
|
91
78
|
permission.delete_object()
|
|
92
79
|
|
|
93
|
-
self.
|
|
80
|
+
self.get().after_execute(_after_loaded)
|
|
94
81
|
return self
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.runtime.types.collections import StringCollection
|
|
3
5
|
|
|
@@ -26,26 +28,24 @@ class SharepointSettings(Entity):
|
|
|
26
28
|
|
|
27
29
|
@property
|
|
28
30
|
def site_creation_default_managed_path(self):
|
|
31
|
+
# type: () -> Optional[str]
|
|
29
32
|
"""
|
|
30
33
|
The value of the team site managed path. This is the path under which new team sites will be created.
|
|
31
|
-
:rtype: str
|
|
32
34
|
"""
|
|
33
35
|
return self.properties.get("siteCreationDefaultManagedPath", None)
|
|
34
36
|
|
|
35
37
|
@property
|
|
36
38
|
def site_creation_default_storage_limit_in_mb(self):
|
|
37
|
-
|
|
38
|
-
The default storage quota for a new site upon creation. Measured in megabytes (MB).
|
|
39
|
-
:rtype: int
|
|
40
|
-
"""
|
|
39
|
+
# type: () -> Optional[int]
|
|
40
|
+
"""The default storage quota for a new site upon creation. Measured in megabytes (MB)."""
|
|
41
41
|
return self.properties.get("siteCreationDefaultStorageLimitInMB", None)
|
|
42
42
|
|
|
43
43
|
@property
|
|
44
44
|
def tenant_default_timezone(self):
|
|
45
|
+
# type: () -> Optional[str]
|
|
45
46
|
"""
|
|
46
47
|
The default timezone of a tenant for newly created sites. For a list of possible values,
|
|
47
48
|
see SPRegionalSettings.TimeZones property.
|
|
48
|
-
:rtype: str
|
|
49
49
|
"""
|
|
50
50
|
return self.properties.get("tenantDefaultTimezone", None)
|
|
51
51
|
|
|
@@ -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,3 +1,5 @@
|
|
|
1
|
+
from typing import AnyStr, Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.entity_collection import EntityCollection
|
|
3
5
|
from office365.onedrive.workbooks.comments.reply import WorkbookCommentReply
|
|
@@ -9,20 +11,19 @@ class WorkbookComment(Entity):
|
|
|
9
11
|
|
|
10
12
|
@property
|
|
11
13
|
def content(self):
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"""
|
|
14
|
+
# type: () -> Optional[AnyStr]
|
|
15
|
+
"""The content of comment."""
|
|
15
16
|
return self.properties.get("content", None)
|
|
16
17
|
|
|
17
18
|
@property
|
|
18
19
|
def content_type(self):
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"""
|
|
20
|
+
# type: () -> Optional[str]
|
|
21
|
+
"""Indicates the type for the comment."""
|
|
22
22
|
return self.properties.get("contentType", None)
|
|
23
23
|
|
|
24
24
|
@property
|
|
25
25
|
def replies(self):
|
|
26
|
+
# type: () -> EntityCollection[WorkbookCommentReply]
|
|
26
27
|
""""""
|
|
27
28
|
return self.properties.get(
|
|
28
29
|
"replies",
|
|
@@ -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
|
|
@@ -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.
|
|
@@ -4,12 +4,14 @@ from office365.entity import Entity
|
|
|
4
4
|
from office365.entity_collection import EntityCollection
|
|
5
5
|
from office365.onedrive.workbooks.charts.chart import WorkbookChart
|
|
6
6
|
from office365.onedrive.workbooks.names.named_item import WorkbookNamedItem
|
|
7
|
+
from office365.onedrive.workbooks.ranges.range import WorkbookRange
|
|
7
8
|
from office365.onedrive.workbooks.tables.collection import WorkbookTableCollection
|
|
8
9
|
from office365.onedrive.workbooks.tables.pivot_table import WorkbookPivotTable
|
|
9
10
|
from office365.onedrive.workbooks.worksheets.protection import (
|
|
10
11
|
WorkbookWorksheetProtection,
|
|
11
12
|
)
|
|
12
13
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
14
|
+
from office365.runtime.queries.function import FunctionQuery
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
class WorkbookWorksheet(Entity):
|
|
@@ -18,10 +20,36 @@ class WorkbookWorksheet(Entity):
|
|
|
18
20
|
"""
|
|
19
21
|
|
|
20
22
|
def __repr__(self):
|
|
21
|
-
return self.name
|
|
23
|
+
return self.name or self.entity_type_name
|
|
22
24
|
|
|
23
25
|
def __str__(self):
|
|
24
|
-
return self.name
|
|
26
|
+
return self.name or self.entity_type_name
|
|
27
|
+
|
|
28
|
+
def cell(self, row, column):
|
|
29
|
+
"""Gets the range object containing the single cell based on row and column numbers.
|
|
30
|
+
The cell can be outside the bounds of its parent range, so long as it's stays within the worksheet grid.
|
|
31
|
+
:param int row: Row number of the cell to be retrieved. Zero-indexed.
|
|
32
|
+
:param int column: Column number of the cell to be retrieved. Zero-indexed.
|
|
33
|
+
"""
|
|
34
|
+
return_type = WorkbookRange(
|
|
35
|
+
self.context, ResourcePath("range", self.resource_path)
|
|
36
|
+
)
|
|
37
|
+
params = {"row": row, "column": column}
|
|
38
|
+
qry = FunctionQuery(self, "cell", method_params=params, return_type=return_type)
|
|
39
|
+
self.context.add_query(qry)
|
|
40
|
+
return return_type
|
|
41
|
+
|
|
42
|
+
def range(self, address=None):
|
|
43
|
+
"""Gets the range object specified by the address or name."""
|
|
44
|
+
return_type = WorkbookRange(
|
|
45
|
+
self.context, ResourcePath("range", self.resource_path)
|
|
46
|
+
)
|
|
47
|
+
params = {"address": address}
|
|
48
|
+
qry = FunctionQuery(
|
|
49
|
+
self, "range", method_params=params, return_type=return_type
|
|
50
|
+
)
|
|
51
|
+
self.context.add_query(qry)
|
|
52
|
+
return return_type
|
|
25
53
|
|
|
26
54
|
@property
|
|
27
55
|
def charts(self):
|
|
@@ -18,7 +18,6 @@ class NotebookCollection(EntityCollection[Notebook]):
|
|
|
18
18
|
|
|
19
19
|
:param str display_name: Name for the notebook. Notebook names must be unique. The name cannot contain more
|
|
20
20
|
than 128 characters or contain the following characters: ?*/:<>|'"
|
|
21
|
-
:rtype: Notebook
|
|
22
21
|
"""
|
|
23
22
|
return super(NotebookCollection, self).add(displayName=display_name)
|
|
24
23
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from office365.delta_collection import DeltaCollection
|
|
4
3
|
from office365.directory.extensions.extended_property import (
|
|
5
4
|
MultiValueLegacyExtendedProperty,
|
|
6
5
|
SingleValueLegacyExtendedProperty,
|
|
@@ -9,7 +8,6 @@ from office365.directory.extensions.extension import Extension
|
|
|
9
8
|
from office365.entity_collection import EntityCollection
|
|
10
9
|
from office365.outlook.calendar.attendees.attendee import Attendee
|
|
11
10
|
from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
|
|
12
|
-
from office365.outlook.calendar.email_address import EmailAddress
|
|
13
11
|
from office365.outlook.item import OutlookItem
|
|
14
12
|
from office365.outlook.mail.attachments.collection import AttachmentCollection
|
|
15
13
|
from office365.outlook.mail.item_body import ItemBody
|
|
@@ -74,70 +72,62 @@ class Event(OutlookItem):
|
|
|
74
72
|
return self
|
|
75
73
|
|
|
76
74
|
def dismiss_reminder(self):
|
|
77
|
-
"""
|
|
78
|
-
Dismiss a reminder that has been triggered for an event in a user calendar.
|
|
79
|
-
"""
|
|
75
|
+
"""Dismiss a reminder that has been triggered for an event in a user calendar."""
|
|
80
76
|
qry = ServiceOperationQuery(self, "dismissReminder")
|
|
81
77
|
self.context.add_query(qry)
|
|
82
78
|
return self
|
|
83
79
|
|
|
84
80
|
@property
|
|
85
81
|
def allow_new_time_proposals(self):
|
|
82
|
+
# type: () -> Optional[bool]
|
|
86
83
|
"""
|
|
87
84
|
true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false.
|
|
88
85
|
Optional. Default is true.
|
|
89
|
-
:rtype: bool or None
|
|
90
86
|
"""
|
|
91
87
|
return self.properties.get("allowNewTimeProposals", None)
|
|
92
88
|
|
|
93
89
|
@property
|
|
94
90
|
def has_attachments(self):
|
|
95
|
-
|
|
96
|
-
Set to true if the event has attachments.
|
|
97
|
-
:rtype: bool or None
|
|
98
|
-
"""
|
|
91
|
+
# type: () -> Optional[bool]
|
|
92
|
+
"""Set to true if the event has attachments."""
|
|
99
93
|
return self.properties.get("hasAttachments", None)
|
|
100
94
|
|
|
101
95
|
@property
|
|
102
96
|
def hide_attendees(self):
|
|
97
|
+
# type: () -> Optional[bool]
|
|
103
98
|
"""
|
|
104
99
|
When set to true, each attendee only sees themselves in the meeting request and meeting Tracking list.
|
|
105
100
|
Default is false.
|
|
106
|
-
:rtype: bool or None
|
|
107
101
|
"""
|
|
108
102
|
return self.properties.get("hideAttendees", None)
|
|
109
103
|
|
|
110
104
|
@property
|
|
111
105
|
def ical_uid(self):
|
|
106
|
+
# type: () -> Optional[str]
|
|
112
107
|
"""
|
|
113
108
|
A unique identifier for an event across calendars. This ID is different for each occurrence in a recurring
|
|
114
|
-
series.
|
|
115
|
-
:rtype: str or None
|
|
109
|
+
series.
|
|
116
110
|
"""
|
|
117
111
|
return self.properties.get("iCalUId", None)
|
|
118
112
|
|
|
119
113
|
@property
|
|
120
114
|
def importance(self):
|
|
121
|
-
|
|
122
|
-
The importance of the event. The possible values are: low, normal, high.
|
|
123
|
-
:rtype: str
|
|
124
|
-
"""
|
|
115
|
+
# type: () -> Optional[str]
|
|
116
|
+
"""The importance of the event. The possible values are: low, normal, high."""
|
|
125
117
|
return self.properties.get("importance", None)
|
|
126
118
|
|
|
127
119
|
@property
|
|
128
120
|
def is_all_day(self):
|
|
121
|
+
# type: () -> Optional[bool]
|
|
129
122
|
"""
|
|
130
123
|
Set to true if the event lasts all day. If true, regardless of whether it's a single-day or multi-day event,
|
|
131
124
|
start and end time must be set to midnight and be in the same time zone.
|
|
132
|
-
:rtype: bool or None
|
|
133
125
|
"""
|
|
134
126
|
return self.properties.get("isAllDay", None)
|
|
135
127
|
|
|
136
128
|
@property
|
|
137
129
|
def start(self):
|
|
138
|
-
"""
|
|
139
|
-
The date, time, and time zone that the event starts. By default, the start time is in UTC.
|
|
140
|
-
"""
|
|
130
|
+
"""The date, time, and time zone that the event starts. By default, the start time is in UTC."""
|
|
141
131
|
return self.properties.get("start", DateTimeTimeZone())
|
|
142
132
|
|
|
143
133
|
@start.setter
|
|
@@ -151,9 +141,7 @@ class Event(OutlookItem):
|
|
|
151
141
|
|
|
152
142
|
@property
|
|
153
143
|
def end(self):
|
|
154
|
-
"""
|
|
155
|
-
The date, time, and time zone that the event starts. By default, the start time is in UTC.
|
|
156
|
-
"""
|
|
144
|
+
"""The date, time, and time zone that the event starts. By default, the start time is in UTC."""
|
|
157
145
|
return self.properties.get("end", DateTimeTimeZone())
|
|
158
146
|
|
|
159
147
|
@end.setter
|
|
@@ -167,6 +155,7 @@ class Event(OutlookItem):
|
|
|
167
155
|
|
|
168
156
|
@property
|
|
169
157
|
def single_value_extended_properties(self):
|
|
158
|
+
# type: () -> EntityCollection[SingleValueLegacyExtendedProperty]
|
|
170
159
|
"""The collection of single-value extended properties defined for the event."""
|
|
171
160
|
return self.properties.get(
|
|
172
161
|
"singleValueExtendedProperties",
|
|
@@ -179,6 +168,7 @@ class Event(OutlookItem):
|
|
|
179
168
|
|
|
180
169
|
@property
|
|
181
170
|
def multi_value_extended_properties(self):
|
|
171
|
+
# type: () -> EntityCollection[MultiValueLegacyExtendedProperty]
|
|
182
172
|
"""The collection of multi-value extended properties defined for the event."""
|
|
183
173
|
return self.properties.get(
|
|
184
174
|
"multiValueExtendedProperties",
|
|
@@ -191,51 +181,40 @@ class Event(OutlookItem):
|
|
|
191
181
|
|
|
192
182
|
@property
|
|
193
183
|
def body(self):
|
|
194
|
-
"""
|
|
195
|
-
The body of the message associated with the event. It can be in HTML or text format.
|
|
196
|
-
"""
|
|
184
|
+
"""The body of the message associated with the event. It can be in HTML or text format."""
|
|
197
185
|
return self.properties.get("body", ItemBody())
|
|
198
186
|
|
|
199
187
|
@body.setter
|
|
200
188
|
def body(self, value):
|
|
201
|
-
"""
|
|
202
|
-
Sets The body of the message associated with the event. It can be in HTML or text format.
|
|
203
|
-
"""
|
|
189
|
+
"""Sets The body of the message associated with the event. It can be in HTML or text format."""
|
|
204
190
|
self.set_property("body", ItemBody(value, "HTML"))
|
|
205
191
|
|
|
206
192
|
@property
|
|
207
193
|
def body_preview(self):
|
|
208
|
-
|
|
209
|
-
The preview of the message associated with the event. It is in text format.
|
|
210
|
-
:rtype: str or None
|
|
211
|
-
"""
|
|
194
|
+
# type: () -> Optional[str]
|
|
195
|
+
"""The preview of the message associated with the event. It is in text format."""
|
|
212
196
|
return self.properties.get("bodyPreview", None)
|
|
213
197
|
|
|
214
198
|
@property
|
|
215
199
|
def subject(self):
|
|
216
200
|
# type: () -> Optional[str]
|
|
217
|
-
"""
|
|
218
|
-
The text of the event's subject line.
|
|
219
|
-
"""
|
|
201
|
+
"""The text of the event's subject line."""
|
|
220
202
|
return self.properties.get("subject", None)
|
|
221
203
|
|
|
222
204
|
@subject.setter
|
|
223
205
|
def subject(self, value):
|
|
224
|
-
|
|
225
|
-
Sets The text of the event's subject line.
|
|
226
|
-
:type: str or None
|
|
227
|
-
"""
|
|
206
|
+
# type: (str) -> None
|
|
207
|
+
"""Sets The text of the event's subject line."""
|
|
228
208
|
self.set_property("subject", value)
|
|
229
209
|
|
|
230
210
|
@property
|
|
231
211
|
def location(self):
|
|
232
|
-
"""
|
|
233
|
-
The location of the event.
|
|
234
|
-
"""
|
|
212
|
+
"""The location of the event."""
|
|
235
213
|
return self.properties.get("location", Location())
|
|
236
214
|
|
|
237
215
|
@property
|
|
238
216
|
def web_link(self):
|
|
217
|
+
# type: () -> Optional[str]
|
|
239
218
|
"""
|
|
240
219
|
The URL to open the event in Outlook on the web.
|
|
241
220
|
|
|
@@ -243,8 +222,6 @@ class Event(OutlookItem):
|
|
|
243
222
|
on the web prompts you to sign in.
|
|
244
223
|
|
|
245
224
|
This URL cannot be accessed from within an iFrame.
|
|
246
|
-
|
|
247
|
-
:rtype: str or None
|
|
248
225
|
"""
|
|
249
226
|
return self.properties.get("webLink", None)
|
|
250
227
|
|
|
@@ -275,6 +252,7 @@ class Event(OutlookItem):
|
|
|
275
252
|
|
|
276
253
|
@property
|
|
277
254
|
def extensions(self):
|
|
255
|
+
# type: () -> EntityCollection[Extension]
|
|
278
256
|
"""The collection of open extensions defined for the event. Nullable."""
|
|
279
257
|
return self.properties.get(
|
|
280
258
|
"extensions",
|
|
@@ -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):
|