Office365-REST-Python-Client 2.5.12__py3-none-any.whl → 2.5.13__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.
Files changed (86) hide show
  1. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/METADATA +1 -1
  2. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/RECORD +86 -51
  3. office365/backuprestore/__init__.py +0 -0
  4. office365/backuprestore/root.py +39 -0
  5. office365/backuprestore/service_status.py +5 -0
  6. office365/booking/solutions/root.py +14 -1
  7. office365/directory/applications/application.py +17 -0
  8. office365/directory/applications/optional_claim.py +5 -0
  9. office365/directory/applications/optional_claims.py +16 -0
  10. office365/directory/authentication/conditions/event_listener.py +9 -0
  11. office365/directory/device_local_credential_info.py +21 -0
  12. office365/directory/identities/container.py +18 -0
  13. office365/directory/policies/authentication_flows.py +8 -0
  14. office365/directory/policies/root.py +17 -0
  15. office365/directory/policies/unified_role_management.py +7 -0
  16. office365/directory/protection/policy/__init__.py +0 -0
  17. office365/directory/protection/policy/base.py +24 -0
  18. office365/directory/protection/policy/one_drive_for_business.py +10 -0
  19. office365/directory/security/attacksimulations/users/details.py +7 -0
  20. office365/directory/serviceprincipals/service_principal.py +65 -14
  21. office365/directory/users/user.py +23 -3
  22. office365/graph_client.py +3 -1
  23. office365/intune/devices/management/management.py +26 -0
  24. office365/intune/devices/management/terms_and_conditions.py +10 -0
  25. office365/intune/devices/management/virtual_endpoint.py +8 -0
  26. office365/runtime/client_object.py +9 -1
  27. office365/runtime/client_object_collection.py +2 -2
  28. office365/runtime/client_result.py +19 -2
  29. office365/runtime/odata/v4/batch_request.py +12 -15
  30. office365/sharepoint/apps/context_site.py +41 -0
  31. office365/sharepoint/authpolicy/events/collection.py +11 -0
  32. office365/sharepoint/authpolicy/events/{auth_event.py → event.py} +1 -0
  33. office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +5 -0
  34. office365/sharepoint/brandcenter/__init__.py +0 -0
  35. office365/sharepoint/brandcenter/brand_center.py +9 -0
  36. office365/sharepoint/brandcenter/configuration.py +5 -0
  37. office365/sharepoint/changes/change.py +1 -3
  38. office365/sharepoint/changes/collection.py +3 -0
  39. office365/sharepoint/changes/folder.py +6 -0
  40. office365/sharepoint/changes/group.py +3 -0
  41. office365/sharepoint/changes/list.py +13 -0
  42. office365/sharepoint/changes/view.py +25 -0
  43. office365/sharepoint/client_context.py +19 -1
  44. office365/sharepoint/contenttypes/fieldlinks/collection.py +3 -0
  45. office365/sharepoint/copilot/__init__.py +0 -0
  46. office365/sharepoint/copilot/file_collection.py +27 -0
  47. office365/sharepoint/copilot/file_collection_query_result.py +10 -0
  48. office365/sharepoint/copilot/list_item_extensions.py +5 -0
  49. office365/sharepoint/directory/provider/alternate_id_data.py +5 -0
  50. office365/sharepoint/directory/provider/notification.py +8 -0
  51. office365/sharepoint/directory/provider/object_changes.py +5 -0
  52. office365/sharepoint/directory/provider/object_data.py +26 -3
  53. office365/sharepoint/directory/provider/provider.py +1 -0
  54. office365/sharepoint/directory/provider/session_data.py +9 -0
  55. office365/sharepoint/lists/list.py +64 -1
  56. office365/sharepoint/logger/log_export.py +2 -0
  57. office365/sharepoint/migrationcenter/service/performance/data.py +5 -5
  58. office365/sharepoint/multigeo/services.py +24 -0
  59. office365/sharepoint/navigation/menu_node.py +43 -1
  60. office365/sharepoint/navigation/node_collection.py +1 -1
  61. office365/sharepoint/oauth/token.py +22 -0
  62. office365/sharepoint/oauth/token_response.py +5 -0
  63. office365/sharepoint/publishing/pages/campaign_publication.py +10 -0
  64. office365/sharepoint/securestore/target_application.py +2 -0
  65. office365/sharepoint/sharing/inherited_from.py +5 -0
  66. office365/sharepoint/sharing/internal/__init__.py +0 -0
  67. office365/sharepoint/sharing/internal/sharing_restrictions.py +22 -0
  68. office365/sharepoint/sharing/internal/types.py +17 -0
  69. office365/sharepoint/sharing/link_info.py +24 -0
  70. office365/sharepoint/sites/site.py +9 -0
  71. office365/sharepoint/sites/version_policy_manager.py +8 -0
  72. office365/sharepoint/tenant/administration/policies/__init__.py +0 -0
  73. office365/sharepoint/tenant/administration/policies/definition.py +5 -0
  74. office365/sharepoint/tenant/administration/settings_service.py +9 -1
  75. office365/sharepoint/tenant/administration/sites/properties.py +45 -0
  76. office365/sharepoint/tenant/administration/tenant.py +14 -0
  77. office365/sharepoint/tenant/administration/types.py +17 -1
  78. office365/sharepoint/utilities/wopi_host.py +45 -0
  79. office365/sharepoint/webs/regional_settings.py +6 -0
  80. office365/sharepoint/webs/web.py +56 -0
  81. office365/sharepoint/workflow/definition.py +5 -0
  82. office365/sharepoint/workflowservices/deployment_service.py +23 -0
  83. office365/teams/members/settings.py +2 -2
  84. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/LICENSE +0 -0
  85. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/WHEEL +0 -0
  86. {Office365_REST_Python_Client-2.5.12.dist-info → Office365_REST_Python_Client-2.5.13.dist-info}/top_level.txt +0 -0
File without changes
@@ -0,0 +1,22 @@
1
+ from office365.runtime.paths.resource_path import ResourcePath
2
+ from office365.sharepoint.entity import Entity
3
+ from office365.sharepoint.sharing.internal.types import CAnonymousLinkUseLimit
4
+
5
+
6
+ class SharingRestrictions(Entity):
7
+ """ """
8
+
9
+ def __init__(self, context):
10
+ static_path = ResourcePath(
11
+ "Microsoft.SharePoint.Sharing.Internal.SharingRestrictions"
12
+ )
13
+ super(SharingRestrictions, self).__init__(context, static_path)
14
+
15
+ @property
16
+ def anonymous_link_use_limit(self):
17
+ return self.properties.get("anonymousLinkUseLimit", CAnonymousLinkUseLimit())
18
+
19
+ @property
20
+ def entity_type_name(self):
21
+ # type: () -> str
22
+ return "Microsoft.SharePoint.Sharing.Internal.SharingRestrictions"
@@ -0,0 +1,17 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class CAnonymousLinkUseLimit(ClientValue):
5
+
6
+ @property
7
+ def entity_type_name(self):
8
+ # type: () -> str
9
+ return "Microsoft.SharePoint.Sharing.Internal.CAnonymousLinkUseLimit"
10
+
11
+
12
+ class CExternalSharingEnforcement(ClientValue):
13
+
14
+ @property
15
+ def entity_type_name(self):
16
+ # type: () -> str
17
+ return "Microsoft.SharePoint.Sharing.Internal.CExternalSharingEnforcement"
@@ -1,6 +1,30 @@
1
1
  from office365.runtime.client_value import ClientValue
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.sharepoint.sharing.inherited_from import InheritedFrom
4
+ from office365.sharepoint.sharing.links.info import SharingLinkInfo
5
+ from office365.sharepoint.sharing.principal import Principal
2
6
 
3
7
 
4
8
  class LinkInfo(ClientValue):
5
9
  """This class provides metadata for the tokenized sharing link including settings details, inheritance status,
6
10
  and an optional array of members."""
11
+
12
+ def __init__(
13
+ self,
14
+ inherited_from=InheritedFrom(),
15
+ is_inherited=None,
16
+ link_details=SharingLinkInfo(),
17
+ link_members=None,
18
+ link_status=None,
19
+ total_link_members_count=None,
20
+ ):
21
+ """
22
+ :param bool is_inherited: Boolean that indicates if the tokenized sharing link is present due to
23
+ inherited permissions from a parent object.
24
+ """
25
+ self.inherited_from = inherited_from
26
+ self.isInherited = is_inherited
27
+ self.linkDetails = link_details
28
+ self.linkMembers = ClientValueCollection(Principal, link_members)
29
+ self.linkStatus = link_status
30
+ self.totalLinkMembersCount = total_link_members_count
@@ -132,6 +132,15 @@ class Site(Entity):
132
132
  self.ensure_property("Url", _site_loaded)
133
133
  return return_type
134
134
 
135
+ def get_block_download_policy_for_files_data(self):
136
+ """ """
137
+ return_type = ClientResult(self.context, str())
138
+ qry = ServiceOperationQuery(
139
+ self, "GetBlockDownloadPolicyForFilesData", None, None, None, return_type
140
+ )
141
+ self.context.add_query(qry)
142
+ return return_type
143
+
135
144
  def get_migration_status(self):
136
145
  """"""
137
146
  return_type = EntityCollection(self.context, SPMigrationJobStatus)
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from office365.runtime.queries.service_operation import ServiceOperationQuery
2
4
  from office365.sharepoint.entity import Entity
3
5
 
@@ -5,6 +7,12 @@ from office365.sharepoint.entity import Entity
5
7
  class SiteVersionPolicyManager(Entity):
6
8
  """"""
7
9
 
10
+ @property
11
+ def major_version_limit(self):
12
+ # type: () -> Optional[int]
13
+ """ """
14
+ return self.properties.get("MajorVersionLimit", None)
15
+
8
16
  def set_auto_expiration(self):
9
17
  """"""
10
18
  qry = ServiceOperationQuery(self, "SetAutoExpiration")
@@ -0,0 +1,5 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class TenantAdminPolicyDefinition(ClientValue):
5
+ """ """
@@ -4,7 +4,10 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
4
  from office365.runtime.types.collections import StringCollection
5
5
  from office365.sharepoint.entity import Entity
6
6
  from office365.sharepoint.tenant.administration.smtp_server import SmtpServer
7
- from office365.sharepoint.tenant.administration.types import DisableGroupify
7
+ from office365.sharepoint.tenant.administration.types import (
8
+ AutoQuotaEnabled,
9
+ DisableGroupify,
10
+ )
8
11
 
9
12
 
10
13
  class TenantAdminSettingsService(Entity):
@@ -25,6 +28,11 @@ class TenantAdminSettingsService(Entity):
25
28
  self.context.add_query(qry)
26
29
  return return_type
27
30
 
31
+ @property
32
+ def auto_quota_enabled(self):
33
+ """"""
34
+ return self.properties.get("AutoQuotaEnabled", AutoQuotaEnabled())
35
+
28
36
  @property
29
37
  def available_managed_paths_for_site_creation(self):
30
38
  """"""
@@ -52,6 +52,50 @@ class SiteProperties(Entity):
52
52
  self._ensure_site_path(_update_ex)
53
53
  return return_type
54
54
 
55
+ @property
56
+ def allow_downloading_non_web_viewable_files(self):
57
+ # type: () -> Optional[bool]
58
+ """Specifies if non web viewable files can be downloaded."""
59
+ return self.properties.get("AllowDownloadingNonWebViewableFiles", None)
60
+
61
+ @property
62
+ def allow_editing(self):
63
+ # type: () -> Optional[bool]
64
+ """Prevents users from editing Office files in the browser and copying and pasting Office file contents
65
+ out of the browser window."""
66
+ return self.properties.get("AllowEditing", None)
67
+
68
+ @property
69
+ def allow_self_service_upgrade(self):
70
+ # type: () -> Optional[bool]
71
+ """Whether version to version upgrade is allowed on this site."""
72
+ return self.properties.get("AllowSelfServiceUpgrade", None)
73
+
74
+ @property
75
+ def anonymous_link_expiration_in_days(self):
76
+ # type: () -> Optional[int]
77
+ """Specifies all anonymous/anyone links that have been created
78
+ (or will be created) will expire after the set number of days."""
79
+ return self.properties.get("AnonymousLinkExpirationInDays", None)
80
+
81
+ @property
82
+ def apply_to_existing_document_libraries(self):
83
+ # type: () -> Optional[bool]
84
+ """Create a job to apply the version history limits setting to existing document libraries."""
85
+ return self.properties.get("ApplyToExistingDocumentLibraries", None)
86
+
87
+ @property
88
+ def apply_to_new_document_libraries(self):
89
+ # type: () -> Optional[bool]
90
+ """Gets site version policy for new document libraries."""
91
+ return self.properties.get("ApplyToNewDocumentLibraries", None)
92
+
93
+ @property
94
+ def archived_by(self):
95
+ # type: () -> Optional[str]
96
+ """Gets site version policy for new document libraries."""
97
+ return self.properties.get("ArchivedBy", None)
98
+
55
99
  @property
56
100
  def deny_add_and_customize_pages(self):
57
101
  # type: () -> Optional[int]
@@ -69,6 +113,7 @@ class SiteProperties(Entity):
69
113
  @property
70
114
  def owner_login_name(self):
71
115
  # type: () -> Optional[str]
116
+ """ """
72
117
  return self.properties.get("OwnerLoginName", None)
73
118
 
74
119
  @property
@@ -34,6 +34,9 @@ from office365.sharepoint.tenant.administration.insights.onedrive_site_sharing i
34
34
  from office365.sharepoint.tenant.administration.insights.top_files_sharing import (
35
35
  TopFilesSharingInsights,
36
36
  )
37
+ from office365.sharepoint.tenant.administration.policies.definition import (
38
+ TenantAdminPolicyDefinition,
39
+ )
37
40
  from office365.sharepoint.tenant.administration.powerapps.environment import (
38
41
  PowerAppsEnvironment,
39
42
  )
@@ -69,6 +72,7 @@ from office365.sharepoint.tenant.administration.spo_operation import SpoOperatio
69
72
  from office365.sharepoint.tenant.administration.syntex.billing_context import (
70
73
  SyntexBillingContext,
71
74
  )
75
+ from office365.sharepoint.tenant.administration.types import CreatePolicyRequest
72
76
  from office365.sharepoint.tenant.administration.webs.templates.collection import (
73
77
  SPOTenantWebTemplateCollection,
74
78
  )
@@ -522,6 +526,16 @@ class Tenant(Entity):
522
526
  self.context.add_query(qry)
523
527
  return self
524
528
 
529
+ def create_policy_definition(self):
530
+ """ """
531
+ return_type = ClientResult(self.context, TenantAdminPolicyDefinition())
532
+ payload = {"policyInputParameters": CreatePolicyRequest()}
533
+ qry = ServiceOperationQuery(
534
+ self, "CreatePolicyDefinition", None, payload, None, return_type
535
+ )
536
+ self.context.add_query(qry)
537
+ return return_type
538
+
525
539
  def create_site(self, url, owner, title=None):
526
540
  """Queues a site collection for creation with the specified properties.
527
541
 
@@ -2,4 +2,20 @@ from office365.runtime.client_value import ClientValue
2
2
 
3
3
 
4
4
  class DisableGroupify(ClientValue):
5
- """"""
5
+ """ """
6
+
7
+
8
+ class AutoQuotaEnabled(ClientValue):
9
+ """ """
10
+
11
+ def __init__(self, is_read_only=None, value=None):
12
+ self.IsReadOnly = is_read_only
13
+ self.Value = value
14
+
15
+
16
+ class CreatePolicyRequest(ClientValue):
17
+ """ """
18
+
19
+ def __init__(self, is_preview_run=None, policy_custom_name=None):
20
+ self.isPreviewRun = is_preview_run
21
+ self.policyCustomName = policy_custom_name
@@ -0,0 +1,45 @@
1
+ from office365.runtime.client_result import ClientResult
2
+ from office365.runtime.client_value_collection import ClientValueCollection
3
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
4
+ from office365.sharepoint.client_context import ClientContext
5
+ from office365.sharepoint.entity import Entity
6
+
7
+
8
+ class WopiHostUtility(Entity):
9
+ """ """
10
+
11
+ @staticmethod
12
+ def generate_file_bundle(context):
13
+ # type: (ClientContext) -> ClientResult[str]
14
+ """ """
15
+ return_type = ClientResult(context)
16
+ qry = ServiceOperationQuery(
17
+ WopiHostUtility(context),
18
+ "GenerateFileBundle",
19
+ None,
20
+ None,
21
+ None,
22
+ return_type,
23
+ True,
24
+ )
25
+ context.add_query(qry)
26
+ return return_type
27
+
28
+ @staticmethod
29
+ def get_wopi_origins(context):
30
+ return_type = ClientResult(context, ClientValueCollection(str))
31
+ qry = ServiceOperationQuery(
32
+ WopiHostUtility(context),
33
+ "GetWopiOrigins",
34
+ None,
35
+ None,
36
+ None,
37
+ return_type,
38
+ True,
39
+ )
40
+ context.add_query(qry)
41
+ return return_type
42
+
43
+ @property
44
+ def entity_type_name(self):
45
+ return "SP.Utilities.WopiHostUtility"
@@ -102,6 +102,12 @@ class RegionalSettings(Entity):
102
102
  """Gets the locale identifier in use on the server."""
103
103
  return self.properties.get("LocaleId", None)
104
104
 
105
+ @property
106
+ def negative_sign(self):
107
+ # type: () -> Optional[str]
108
+ """ """
109
+ return self.properties.get("NegativeSign", None)
110
+
105
111
  @property
106
112
  def work_days(self):
107
113
  # type: () -> Optional[int]
@@ -42,6 +42,7 @@ from office365.sharepoint.flows.synchronization_result import FlowSynchronizatio
42
42
  from office365.sharepoint.folders.collection import FolderCollection
43
43
  from office365.sharepoint.folders.folder import Folder
44
44
  from office365.sharepoint.internal.paths.web import WebPath
45
+ from office365.sharepoint.largeoperation.operation import SPLargeOperation
45
46
  from office365.sharepoint.listitems.listitem import ListItem
46
47
  from office365.sharepoint.lists.collection import ListCollection
47
48
  from office365.sharepoint.lists.creation_information import ListCreationInformation
@@ -210,6 +211,21 @@ class Web(SecurableObject):
210
211
  self.context.add_query(qry)
211
212
  return return_type
212
213
 
214
+ def get_list_operation(self, list_id, operation_id):
215
+ # type: (str, str) -> SPLargeOperation
216
+ """ """
217
+ return_type = SPLargeOperation(self.context)
218
+ qry = ServiceOperationQuery(
219
+ self,
220
+ "GetListOperation",
221
+ None,
222
+ {"listId": list_id, "operationId": operation_id},
223
+ None,
224
+ return_type,
225
+ )
226
+ self.context.add_query(qry)
227
+ return return_type
228
+
213
229
  def get_push_notification_subscriber(self, device_app_instance_id):
214
230
  """
215
231
  Specifies the push notification subscriber over the site for the specified device app instance identifier.
@@ -2311,9 +2327,49 @@ class Web(SecurableObject):
2311
2327
 
2312
2328
  @property
2313
2329
  def recycle_bin_enabled(self):
2330
+ # type: () -> Optional[bool]
2314
2331
  """Specifies whether the Recycle Bin is enabled."""
2315
2332
  return self.properties.get("RecycleBinEnabled", None)
2316
2333
 
2334
+ @property
2335
+ def related_hub_site_ids(self):
2336
+ # type: () -> Optional[str]
2337
+ """ """
2338
+ return self.properties.get("RelatedHubSiteIds", None)
2339
+
2340
+ @property
2341
+ def request_access_email(self):
2342
+ # type: () -> Optional[str]
2343
+ """Gets the e-mail address to which requests for access are sent."""
2344
+ return self.properties.get("RequestAccessEmail", None)
2345
+
2346
+ @property
2347
+ def save_site_as_template_enabled(self):
2348
+ # type: () -> Optional[bool]
2349
+ """Specifies if the site (2) can be saved as a site template.
2350
+
2351
+ A feature that creates content which is not compatible for a site template can set this value to false to
2352
+ stop users of this site (2) from generating an invalid site template.
2353
+
2354
+ A feature ought to never set this value to true when it is deactivated or at any other time since another
2355
+ feature might have created content that is not compatible in a site template.
2356
+
2357
+ Setting this value to false, if it was true, will result in a site template that is not supported.
2358
+ """
2359
+ return self.properties.get("SaveSiteAsTemplateEnabled", None)
2360
+
2361
+ @property
2362
+ def search_box_in_navbar(self):
2363
+ # type: () -> Optional[int]
2364
+ """Gets the e-mail address to which requests for access are sent."""
2365
+ return self.properties.get("SearchBoxInNavBar", None)
2366
+
2367
+ @property
2368
+ def search_box_placeholder_text(self):
2369
+ # type: () -> Optional[str]
2370
+ """Gets the placeholder text in SharePoint online search box for a given (sub) site."""
2371
+ return self.properties.get("SearchBoxPlaceholderText", None)
2372
+
2317
2373
  @property
2318
2374
  def navigation(self):
2319
2375
  """Specifies the navigation structure on the site (2), including the Quick Launch area and the link bar."""
@@ -0,0 +1,5 @@
1
+ from office365.sharepoint.entity import Entity
2
+
3
+
4
+ class WorkflowDefinition(Entity):
5
+ """Represents a workflow definition and associated properties."""
@@ -1,9 +1,32 @@
1
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
1
2
  from office365.sharepoint.entity import Entity
3
+ from office365.sharepoint.entity_collection import EntityCollection
4
+ from office365.sharepoint.workflow.definition import WorkflowDefinition
2
5
 
3
6
 
4
7
  class WorkflowDeploymentService(Entity):
5
8
  """"""
6
9
 
10
+ def get_definition(self, definition_id):
11
+ """Returns a WorkflowDefinition from the workflow store."""
12
+ return_type = WorkflowDefinition(self.context)
13
+ payload = {"definitionId": definition_id}
14
+ qry = ServiceOperationQuery(
15
+ self, "GetDefinition", None, payload, None, return_type
16
+ )
17
+ self.context.add_query(qry)
18
+ return return_type
19
+
20
+ def enumerate_definitions(self, published_only=False):
21
+ """Returns the WorkflowDefinition objects from the workflow store that match the specified parameters."""
22
+ return_type = EntityCollection(self.context, WorkflowDefinition)
23
+ payload = {"publishedOnly": published_only}
24
+ qry = ServiceOperationQuery(
25
+ self, "EnumerateDefinitions", None, payload, None, return_type
26
+ )
27
+ self.context.add_query(qry)
28
+ return return_type
29
+
7
30
  @property
8
31
  def entity_type_name(self):
9
32
  return "SP.WorkflowServices.WorkflowDeploymentService"
@@ -5,9 +5,9 @@ class TeamMemberSettings(ClientValue):
5
5
  """Settings to configure whether members can perform certain actions, for example, create channels and add bots,
6
6
  in the team."""
7
7
 
8
- def __init__(self):
8
+ def __init__(self, allow_create_update_channels=None):
9
9
  super(TeamMemberSettings, self).__init__()
10
- self.allowCreateUpdateChannels = True
10
+ self.allowCreateUpdateChannels = allow_create_update_channels
11
11
  self.allowDeleteChannels = True
12
12
  self.allowAddRemoveApps = True
13
13
  self.allowCreateUpdateRemoveTabs = True