-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OneDrive: introduced support for recyclebin types, workbooks namespac…
…e types update
- Loading branch information
Showing
23 changed files
with
200 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
office365/directory/protection/threatassessment/email_file_request.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Optional | ||
|
||
from office365.directory.protection.threatassessment.request import ThreatAssessmentRequest | ||
|
||
|
||
class EmailFileAssessmentRequest(ThreatAssessmentRequest): | ||
""" | ||
Represents a resource that creates and retrieves an email file threat assessment. | ||
The email file can be an .eml file type. | ||
""" | ||
|
||
@property | ||
def content_data(self): | ||
# type: () -> Optional[str] | ||
""" | ||
Base64 encoded .eml email file content. The file content can't fetch back because it isn't stored. | ||
""" | ||
return self.properties.get("contentData", None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from office365.onedrive.base_item import BaseItem | ||
|
||
|
||
class RecycleBinItem(BaseItem): | ||
"""Represents information about a deleted item in a recycleBin of a SharePoint site or a SharePoint | ||
Embedded fileStorageContainer.""" | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from office365.entity_collection import EntityCollection | ||
from office365.onedrive.base_item import BaseItem | ||
from office365.onedrive.recyclebin.item import RecycleBinItem | ||
from office365.onedrive.recyclebin.settings import RecycleBinSettings | ||
from office365.runtime.paths.resource_path import ResourcePath | ||
|
||
|
||
class RecycleBin(BaseItem): | ||
"""Represents a container for a collection of recycleBinItem resources in a SharePoint site or a | ||
SharePoint Embedded fileStorageContainer.""" | ||
|
||
@property | ||
def items(self): | ||
# type: () -> EntityCollection[RecycleBinItem] | ||
"""List of the recycleBinItems deleted by a user.""" | ||
return self.properties.setdefault( | ||
"items", | ||
EntityCollection( | ||
self.context, RecycleBinItem, ResourcePath("items", self.resource_path), self | ||
), | ||
) | ||
|
||
@property | ||
def settings(self): | ||
"""Settings for the recycleBin""" | ||
return self.properties.get("settings", RecycleBinSettings()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class RecycleBinSettings(ClientValue): | ||
"""Represents settings for the recycleBin resource type.""" | ||
|
||
def __init__(self, retention_period_override_days=None): | ||
""" | ||
:param int retention_period_override_days: Recycle bin retention period override in days for deleted content. | ||
The default value is 93; the value range is 7 to 180. The setting applies to newly deleted content only. | ||
Setting this property to null reverts to its default value. | ||
""" | ||
self.retentionPeriodOverrideDays = retention_period_override_days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.