Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "7c01dda", "specHash": "2bd751f", "version": "10.5.0" }
{ "engineHash": "02fdae4", "specHash": "74a1e4a", "version": "10.5.0" }
3 changes: 3 additions & 0 deletions box_sdk_gen/managers/trashed_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def get_trashed_items(

marker-based pagination using the `marker` parameter.


The number of entries returned may be less than `total_count`. For example, if a user deletes items from a shared folder and is later removed as a collaborator, those deleted items will no longer appear in this endpoint’s results, even though they are still included in `total_count`.

:param fields: A comma-separated list of attributes to include in the
response. This can be used to request fields that are
not normally returned in a standard response.
Expand Down
20 changes: 10 additions & 10 deletions box_sdk_gen/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@

from box_sdk_gen.schemas.legal_hold_policy_mini import *

from box_sdk_gen.schemas.legal_hold_policy_assigned_item import *

from box_sdk_gen.schemas.legal_hold_policy_assignment_base import *

from box_sdk_gen.schemas.metadata_base import *
Expand Down Expand Up @@ -414,6 +416,14 @@

from box_sdk_gen.schemas.retention_policies import *

from box_sdk_gen.schemas.legal_hold_policy_assignment import *

from box_sdk_gen.schemas.legal_hold_policy_assignments import *

from box_sdk_gen.schemas.file_version_legal_hold import *

from box_sdk_gen.schemas.file_version_legal_holds import *

from box_sdk_gen.schemas.legal_hold_policy import *

from box_sdk_gen.schemas.legal_hold_policies import *
Expand Down Expand Up @@ -520,16 +530,6 @@

from box_sdk_gen.schemas.folder import *

from box_sdk_gen.schemas.legal_hold_policy_assigned_item import *

from box_sdk_gen.schemas.legal_hold_policy_assignment import *

from box_sdk_gen.schemas.legal_hold_policy_assignments import *

from box_sdk_gen.schemas.file_version_legal_hold import *

from box_sdk_gen.schemas.file_version_legal_holds import *

from box_sdk_gen.schemas.folder_full import *

from box_sdk_gen.schemas.search_result_with_shared_link_item import *
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/ai_single_agent_response_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@


class AiSingleAgentResponseFull(AiSingleAgentResponse):
_discriminator = 'type', {'ai_agent'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def __init__(


class Comment(CommentBase):
_discriminator = 'type', {'comment'}

def __init__(
self,
*,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/comment_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@


class CommentFull(Comment):
_discriminator = 'type', {'comment'}

def __init__(
self,
*,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/conflict_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __init__(self, *, conflicts: Optional[List[FileConflict]] = None, **kwargs):


class ConflictError(ClientError):
_discriminator = 'type', {'error'}

def __init__(
self,
*,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ class FileItemStatusField(str, Enum):


class File(FileMini):
_discriminator = 'type', {'file'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/file_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@


class FileConflict(FileMini):
_discriminator = 'type', {'file'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/file_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ class FileFullSharedLinkPermissionOptionsField(str, Enum):


class FileFull(File):
_discriminator = 'type', {'file'}

def __init__(
self,
id: str,
Expand Down
1 change: 1 addition & 0 deletions box_sdk_gen/schemas/file_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class FileMini(FileBase):
'sha1': 'sha_1',
**FileBase._json_to_fields_mapping,
}
_discriminator = 'type', {'file'}

def __init__(
self,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/file_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@


class FileVersion(FileVersionMini):
_discriminator = 'type', {'file_version'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/file_version_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@


class FileVersionFull(FileVersion):
_discriminator = 'type', {'file_version'}

def __init__(
self,
id: str,
Expand Down
1 change: 1 addition & 0 deletions box_sdk_gen/schemas/file_version_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class FileVersionMini(FileVersionBase):
'sha1': 'sha_1',
**FileVersionBase._json_to_fields_mapping,
}
_discriminator = 'type', {'file_version'}

def __init__(
self,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ class FolderItemStatusField(str, Enum):


class Folder(FolderMini):
_discriminator = 'type', {'folder'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/folder_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def __init__(


class FolderFull(Folder):
_discriminator = 'type', {'folder'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/folder_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@


class FolderMini(FolderBase):
_discriminator = 'type', {'folder'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@


class Group(GroupMini):
_discriminator = 'type', {'group'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/group_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def __init__(self, *, can_invite_as_collaborator: Optional[bool] = None, **kwarg


class GroupFull(Group):
_discriminator = 'type', {'group'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/group_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class GroupMiniGroupTypeField(str, Enum):


class GroupMini(GroupBase):
_discriminator = 'type', {'group'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/integration_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class IntegrationMappingIntegrationTypeField(str, Enum):


class IntegrationMapping(IntegrationMappingBase):
_discriminator = 'type', {'integration_mapping'}

def __init__(
self,
partner_item: IntegrationMappingPartnerItemSlack,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/integration_mapping_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class IntegrationMappingTeamsIntegrationTypeField(str, Enum):


class IntegrationMappingTeams(IntegrationMappingBase):
_discriminator = 'type', {'integration_mapping'}

def __init__(
self,
partner_item: IntegrationMappingPartnerItemTeams,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/legal_hold_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def __init__(


class LegalHoldPolicy(LegalHoldPolicyMini):
_discriminator = 'type', {'legal_hold_policy'}

def __init__(
self,
id: str,
Expand Down
37 changes: 31 additions & 6 deletions box_sdk_gen/schemas/legal_hold_policy_assigned_item.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
from typing import Union
from enum import Enum

from box_sdk_gen.schemas.file import File
from box_sdk_gen.internal.base_object import BaseObject

from box_sdk_gen.schemas.folder import Folder
from box_sdk_gen.box.errors import BoxSDKError

from box_sdk_gen.schemas.web_link import WebLink

from box_sdk_gen.box.errors import BoxSDKError
class LegalHoldPolicyAssignedItemTypeField(str, Enum):
FILE = 'file'
FILE_VERSION = 'file_version'
FOLDER = 'folder'
USER = 'user'
OWNERSHIP = 'ownership'
INTERACTIONS = 'interactions'


class LegalHoldPolicyAssignedItem(BaseObject):
_discriminator = 'type', {
'file',
'file_version',
'folder',
'user',
'ownership',
'interactions',
}

LegalHoldPolicyAssignedItem = Union[File, Folder, WebLink]
def __init__(self, type: LegalHoldPolicyAssignedItemTypeField, id: str, **kwargs):
"""
:param type: The type of item the policy is assigned to.
:type type: LegalHoldPolicyAssignedItemTypeField
:param id: The ID of the item the policy is assigned to.
:type id: str
"""
super().__init__(**kwargs)
self.type = type
self.id = id
8 changes: 2 additions & 6 deletions box_sdk_gen/schemas/legal_hold_policy_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
LegalHoldPolicyAssignmentBaseTypeField,
)

from box_sdk_gen.schemas.file import File

from box_sdk_gen.schemas.folder import Folder

from box_sdk_gen.schemas.web_link import WebLink

from box_sdk_gen.schemas.legal_hold_policy_assignment_base import (
LegalHoldPolicyAssignmentBase,
)
Expand All @@ -28,6 +22,8 @@


class LegalHoldPolicyAssignment(LegalHoldPolicyAssignmentBase):
_discriminator = 'type', {'legal_hold_policy_assignment'}

def __init__(
self,
*,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/retention_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def __init__(


class RetentionPolicy(RetentionPolicyMini):
_discriminator = 'type', {'retention_policy'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/retention_policy_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class RetentionPolicyMiniDispositionActionField(str, Enum):


class RetentionPolicyMini(RetentionPolicyBase):
_discriminator = 'type', {'retention_policy'}

def __init__(
self,
id: str,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/shield_information_barrier_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class ShieldInformationBarrierReportStatusField(str, Enum):


class ShieldInformationBarrierReport(ShieldInformationBarrierReportBase):
_discriminator = 'type', {'shield_information_barrier_report'}

def __init__(
self,
*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def __init__(


class ShieldInformationBarrierSegmentMember(ShieldInformationBarrierSegmentMemberMini):
_discriminator = 'type', {'shield_information_barrier_segment_member'}

def __init__(
self,
*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
class ShieldInformationBarrierSegmentMemberMini(
ShieldInformationBarrierSegmentMemberBase
):
_discriminator = 'type', {'shield_information_barrier_segment_member'}

def __init__(
self,
*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
class ShieldInformationBarrierSegmentRestriction(
ShieldInformationBarrierSegmentRestrictionMini
):
_discriminator = 'type', {'shield_information_barrier_segment_restriction'}

def __init__(
self,
shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def __init__(
class ShieldInformationBarrierSegmentRestrictionMini(
ShieldInformationBarrierSegmentRestrictionBase
):
_discriminator = 'type', {'shield_information_barrier_segment_restriction'}

def __init__(
self,
shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/sign_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __init__(


class SignRequest(SignRequestBase):
_discriminator = 'type', {'sign-request'}

def __init__(
self,
*,
Expand Down
9 changes: 9 additions & 0 deletions box_sdk_gen/schemas/sign_request_signer_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ class SignRequestSignerInputContentTypeField(str, Enum):


class SignRequestSignerInput(SignRequestPrefillTag):
_discriminator = 'type', {
'signature',
'date',
'text',
'checkbox',
'radio',
'dropdown',
}

def __init__(
self,
page_index: int,
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/storage_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@


class StoragePolicy(StoragePolicyMini):
_discriminator = 'type', {'storage_policy'}

def __init__(
self,
id: str,
Expand Down
Loading
Loading