diff --git a/.codegen.json b/.codegen.json index bdafad51..4d2943c0 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "7c01dda", "specHash": "2bd751f", "version": "4.5.0" } +{ "engineHash": "02fdae4", "specHash": "74a1e4a", "version": "4.5.0" } diff --git a/box_sdk_gen/managers/trashed_items.py b/box_sdk_gen/managers/trashed_items.py index 242cd2ed..0b255117 100644 --- a/box_sdk_gen/managers/trashed_items.py +++ b/box_sdk_gen/managers/trashed_items.py @@ -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. diff --git a/box_sdk_gen/schemas/__init__.py b/box_sdk_gen/schemas/__init__.py index 5ed9f1f5..d43309f4 100644 --- a/box_sdk_gen/schemas/__init__.py +++ b/box_sdk_gen/schemas/__init__.py @@ -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 * @@ -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 * @@ -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 * diff --git a/box_sdk_gen/schemas/ai_single_agent_response_full.py b/box_sdk_gen/schemas/ai_single_agent_response_full.py index 1898fd5e..9086422a 100644 --- a/box_sdk_gen/schemas/ai_single_agent_response_full.py +++ b/box_sdk_gen/schemas/ai_single_agent_response_full.py @@ -28,6 +28,8 @@ class AiSingleAgentResponseFull(AiSingleAgentResponse): + _discriminator = 'type', {'ai_agent'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/comment.py b/box_sdk_gen/schemas/comment.py index a67ba328..de123786 100644 --- a/box_sdk_gen/schemas/comment.py +++ b/box_sdk_gen/schemas/comment.py @@ -29,6 +29,8 @@ def __init__( class Comment(CommentBase): + _discriminator = 'type', {'comment'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/comment_full.py b/box_sdk_gen/schemas/comment_full.py index 1b3b7b69..fcd69960 100644 --- a/box_sdk_gen/schemas/comment_full.py +++ b/box_sdk_gen/schemas/comment_full.py @@ -16,6 +16,8 @@ class CommentFull(Comment): + _discriminator = 'type', {'comment'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/conflict_error.py b/box_sdk_gen/schemas/conflict_error.py index 4ac1341c..a35298c4 100644 --- a/box_sdk_gen/schemas/conflict_error.py +++ b/box_sdk_gen/schemas/conflict_error.py @@ -28,6 +28,8 @@ def __init__(self, *, conflicts: Optional[List[FileConflict]] = None, **kwargs): class ConflictError(ClientError): + _discriminator = 'type', {'error'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/file.py b/box_sdk_gen/schemas/file.py index 2e9344e8..5eaacca2 100644 --- a/box_sdk_gen/schemas/file.py +++ b/box_sdk_gen/schemas/file.py @@ -175,6 +175,8 @@ class FileItemStatusField(str, Enum): class File(FileMini): + _discriminator = 'type', {'file'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/file_conflict.py b/box_sdk_gen/schemas/file_conflict.py index 5e88917f..32c99b40 100644 --- a/box_sdk_gen/schemas/file_conflict.py +++ b/box_sdk_gen/schemas/file_conflict.py @@ -12,6 +12,8 @@ class FileConflict(FileMini): + _discriminator = 'type', {'file'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/file_full.py b/box_sdk_gen/schemas/file_full.py index 3396821d..c9535978 100644 --- a/box_sdk_gen/schemas/file_full.py +++ b/box_sdk_gen/schemas/file_full.py @@ -414,6 +414,8 @@ class FileFullSharedLinkPermissionOptionsField(str, Enum): class FileFull(File): + _discriminator = 'type', {'file'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/file_mini.py b/box_sdk_gen/schemas/file_mini.py index c8b72f4e..39f09365 100644 --- a/box_sdk_gen/schemas/file_mini.py +++ b/box_sdk_gen/schemas/file_mini.py @@ -20,6 +20,7 @@ class FileMini(FileBase): 'sha1': 'sha_1', **FileBase._json_to_fields_mapping, } + _discriminator = 'type', {'file'} def __init__( self, diff --git a/box_sdk_gen/schemas/file_version.py b/box_sdk_gen/schemas/file_version.py index 3b213fb0..cb0c31ff 100644 --- a/box_sdk_gen/schemas/file_version.py +++ b/box_sdk_gen/schemas/file_version.py @@ -14,6 +14,8 @@ class FileVersion(FileVersionMini): + _discriminator = 'type', {'file_version'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/file_version_full.py b/box_sdk_gen/schemas/file_version_full.py index 7d778bd3..da5cc447 100644 --- a/box_sdk_gen/schemas/file_version_full.py +++ b/box_sdk_gen/schemas/file_version_full.py @@ -16,6 +16,8 @@ class FileVersionFull(FileVersion): + _discriminator = 'type', {'file_version'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/file_version_mini.py b/box_sdk_gen/schemas/file_version_mini.py index d4c03e4c..6a8fed8e 100644 --- a/box_sdk_gen/schemas/file_version_mini.py +++ b/box_sdk_gen/schemas/file_version_mini.py @@ -18,6 +18,7 @@ class FileVersionMini(FileVersionBase): 'sha1': 'sha_1', **FileVersionBase._json_to_fields_mapping, } + _discriminator = 'type', {'file_version'} def __init__( self, diff --git a/box_sdk_gen/schemas/folder.py b/box_sdk_gen/schemas/folder.py index a0330bec..87118100 100644 --- a/box_sdk_gen/schemas/folder.py +++ b/box_sdk_gen/schemas/folder.py @@ -209,6 +209,8 @@ class FolderItemStatusField(str, Enum): class Folder(FolderMini): + _discriminator = 'type', {'folder'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/folder_full.py b/box_sdk_gen/schemas/folder_full.py index b2594ff1..734d8ef9 100644 --- a/box_sdk_gen/schemas/folder_full.py +++ b/box_sdk_gen/schemas/folder_full.py @@ -157,6 +157,8 @@ def __init__( class FolderFull(Folder): + _discriminator = 'type', {'folder'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/folder_mini.py b/box_sdk_gen/schemas/folder_mini.py index 1e7d71a1..7339ceab 100644 --- a/box_sdk_gen/schemas/folder_mini.py +++ b/box_sdk_gen/schemas/folder_mini.py @@ -8,6 +8,8 @@ class FolderMini(FolderBase): + _discriminator = 'type', {'folder'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/group.py b/box_sdk_gen/schemas/group.py index fbb2fdc8..f2ff7299 100644 --- a/box_sdk_gen/schemas/group.py +++ b/box_sdk_gen/schemas/group.py @@ -14,6 +14,8 @@ class Group(GroupMini): + _discriminator = 'type', {'group'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/group_full.py b/box_sdk_gen/schemas/group_full.py index c0503abf..0dfcf75e 100644 --- a/box_sdk_gen/schemas/group_full.py +++ b/box_sdk_gen/schemas/group_full.py @@ -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, diff --git a/box_sdk_gen/schemas/group_mini.py b/box_sdk_gen/schemas/group_mini.py index a0557186..80b14b32 100644 --- a/box_sdk_gen/schemas/group_mini.py +++ b/box_sdk_gen/schemas/group_mini.py @@ -15,6 +15,8 @@ class GroupMiniGroupTypeField(str, Enum): class GroupMini(GroupBase): + _discriminator = 'type', {'group'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/integration_mapping.py b/box_sdk_gen/schemas/integration_mapping.py index be4efb56..8e38ffce 100644 --- a/box_sdk_gen/schemas/integration_mapping.py +++ b/box_sdk_gen/schemas/integration_mapping.py @@ -28,6 +28,8 @@ class IntegrationMappingIntegrationTypeField(str, Enum): class IntegrationMapping(IntegrationMappingBase): + _discriminator = 'type', {'integration_mapping'} + def __init__( self, partner_item: IntegrationMappingPartnerItemSlack, diff --git a/box_sdk_gen/schemas/integration_mapping_teams.py b/box_sdk_gen/schemas/integration_mapping_teams.py index d4df1faf..3c1dfc4f 100644 --- a/box_sdk_gen/schemas/integration_mapping_teams.py +++ b/box_sdk_gen/schemas/integration_mapping_teams.py @@ -22,6 +22,8 @@ class IntegrationMappingTeamsIntegrationTypeField(str, Enum): class IntegrationMappingTeams(IntegrationMappingBase): + _discriminator = 'type', {'integration_mapping'} + def __init__( self, partner_item: IntegrationMappingPartnerItemTeams, diff --git a/box_sdk_gen/schemas/legal_hold_policy.py b/box_sdk_gen/schemas/legal_hold_policy.py index f3e85921..84763fb3 100644 --- a/box_sdk_gen/schemas/legal_hold_policy.py +++ b/box_sdk_gen/schemas/legal_hold_policy.py @@ -58,6 +58,8 @@ def __init__( class LegalHoldPolicy(LegalHoldPolicyMini): + _discriminator = 'type', {'legal_hold_policy'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/legal_hold_policy_assigned_item.py b/box_sdk_gen/schemas/legal_hold_policy_assigned_item.py index b1c95018..77479f9a 100644 --- a/box_sdk_gen/schemas/legal_hold_policy_assigned_item.py +++ b/box_sdk_gen/schemas/legal_hold_policy_assigned_item.py @@ -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 diff --git a/box_sdk_gen/schemas/legal_hold_policy_assignment.py b/box_sdk_gen/schemas/legal_hold_policy_assignment.py index 3b00d1af..b8221d9c 100644 --- a/box_sdk_gen/schemas/legal_hold_policy_assignment.py +++ b/box_sdk_gen/schemas/legal_hold_policy_assignment.py @@ -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, ) @@ -28,6 +22,8 @@ class LegalHoldPolicyAssignment(LegalHoldPolicyAssignmentBase): + _discriminator = 'type', {'legal_hold_policy_assignment'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/retention_policy.py b/box_sdk_gen/schemas/retention_policy.py index 91f88409..0b7b929a 100644 --- a/box_sdk_gen/schemas/retention_policy.py +++ b/box_sdk_gen/schemas/retention_policy.py @@ -62,6 +62,8 @@ def __init__( class RetentionPolicy(RetentionPolicyMini): + _discriminator = 'type', {'retention_policy'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/retention_policy_mini.py b/box_sdk_gen/schemas/retention_policy_mini.py index ff8ad0b2..1980630e 100644 --- a/box_sdk_gen/schemas/retention_policy_mini.py +++ b/box_sdk_gen/schemas/retention_policy_mini.py @@ -15,6 +15,8 @@ class RetentionPolicyMiniDispositionActionField(str, Enum): class RetentionPolicyMini(RetentionPolicyBase): + _discriminator = 'type', {'retention_policy'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/shield_information_barrier_report.py b/box_sdk_gen/schemas/shield_information_barrier_report.py index 4701838e..b45403a8 100644 --- a/box_sdk_gen/schemas/shield_information_barrier_report.py +++ b/box_sdk_gen/schemas/shield_information_barrier_report.py @@ -33,6 +33,8 @@ class ShieldInformationBarrierReportStatusField(str, Enum): class ShieldInformationBarrierReport(ShieldInformationBarrierReportBase): + _discriminator = 'type', {'shield_information_barrier_report'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_member.py b/box_sdk_gen/schemas/shield_information_barrier_segment_member.py index 0a037bc8..74fa40d3 100644 --- a/box_sdk_gen/schemas/shield_information_barrier_segment_member.py +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_member.py @@ -60,6 +60,8 @@ def __init__( class ShieldInformationBarrierSegmentMember(ShieldInformationBarrierSegmentMemberMini): + _discriminator = 'type', {'shield_information_barrier_segment_member'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py b/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py index ef416af8..6ea3facc 100644 --- a/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py @@ -16,6 +16,8 @@ class ShieldInformationBarrierSegmentMemberMini( ShieldInformationBarrierSegmentMemberBase ): + _discriminator = 'type', {'shield_information_barrier_segment_member'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py index 2715bcb3..62b91b62 100644 --- a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py @@ -34,6 +34,8 @@ class ShieldInformationBarrierSegmentRestriction( ShieldInformationBarrierSegmentRestrictionMini ): + _discriminator = 'type', {'shield_information_barrier_segment_restriction'} + def __init__( self, shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py index a84864fe..659d5ff6 100644 --- a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py @@ -80,6 +80,8 @@ def __init__( class ShieldInformationBarrierSegmentRestrictionMini( ShieldInformationBarrierSegmentRestrictionBase ): + _discriminator = 'type', {'shield_information_barrier_segment_restriction'} + def __init__( self, shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, diff --git a/box_sdk_gen/schemas/sign_request.py b/box_sdk_gen/schemas/sign_request.py index d07c8ec4..d8e052fa 100644 --- a/box_sdk_gen/schemas/sign_request.py +++ b/box_sdk_gen/schemas/sign_request.py @@ -64,6 +64,8 @@ def __init__( class SignRequest(SignRequestBase): + _discriminator = 'type', {'sign-request'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/sign_request_signer_input.py b/box_sdk_gen/schemas/sign_request_signer_input.py index 8218fbca..ffb7b1a1 100644 --- a/box_sdk_gen/schemas/sign_request_signer_input.py +++ b/box_sdk_gen/schemas/sign_request_signer_input.py @@ -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, diff --git a/box_sdk_gen/schemas/storage_policy.py b/box_sdk_gen/schemas/storage_policy.py index eb5e1cf3..541fb36a 100644 --- a/box_sdk_gen/schemas/storage_policy.py +++ b/box_sdk_gen/schemas/storage_policy.py @@ -8,6 +8,8 @@ class StoragePolicy(StoragePolicyMini): + _discriminator = 'type', {'storage_policy'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/template_signer_input.py b/box_sdk_gen/schemas/template_signer_input.py index 845999bc..fafc085e 100644 --- a/box_sdk_gen/schemas/template_signer_input.py +++ b/box_sdk_gen/schemas/template_signer_input.py @@ -120,6 +120,16 @@ def __init__( class TemplateSignerInput(SignRequestPrefillTag): + _discriminator = 'type', { + 'signature', + 'date', + 'text', + 'checkbox', + 'attachment', + 'radio', + 'dropdown', + } + def __init__( self, page_index: int, diff --git a/box_sdk_gen/schemas/terms_of_service.py b/box_sdk_gen/schemas/terms_of_service.py index f36ac992..55e47b01 100644 --- a/box_sdk_gen/schemas/terms_of_service.py +++ b/box_sdk_gen/schemas/terms_of_service.py @@ -53,6 +53,8 @@ class TermsOfServiceTosTypeField(str, Enum): class TermsOfService(TermsOfServiceBase): + _discriminator = 'type', {'terms_of_service'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/user.py b/box_sdk_gen/schemas/user.py index 8e98fec9..d21d62bb 100644 --- a/box_sdk_gen/schemas/user.py +++ b/box_sdk_gen/schemas/user.py @@ -42,6 +42,8 @@ def __init__( class User(UserMini): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/user_collaborations.py b/box_sdk_gen/schemas/user_collaborations.py index 848ce597..056d1d02 100644 --- a/box_sdk_gen/schemas/user_collaborations.py +++ b/box_sdk_gen/schemas/user_collaborations.py @@ -8,6 +8,8 @@ class UserCollaborations(UserBase): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/user_full.py b/box_sdk_gen/schemas/user_full.py index 6ae220de..e67367c4 100644 --- a/box_sdk_gen/schemas/user_full.py +++ b/box_sdk_gen/schemas/user_full.py @@ -61,6 +61,8 @@ def __init__( class UserFull(User): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/user_integration_mappings.py b/box_sdk_gen/schemas/user_integration_mappings.py index 8e14d80f..326b43fe 100644 --- a/box_sdk_gen/schemas/user_integration_mappings.py +++ b/box_sdk_gen/schemas/user_integration_mappings.py @@ -8,6 +8,8 @@ class UserIntegrationMappings(UserBase): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/user_mini.py b/box_sdk_gen/schemas/user_mini.py index e53d185b..738781fb 100644 --- a/box_sdk_gen/schemas/user_mini.py +++ b/box_sdk_gen/schemas/user_mini.py @@ -8,6 +8,8 @@ class UserMini(UserBase): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/v2025_r0/doc_gen_job_full_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/doc_gen_job_full_v2025_r0.py index 003e192b..59647623 100644 --- a/box_sdk_gen/schemas/v2025_r0/doc_gen_job_full_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/doc_gen_job_full_v2025_r0.py @@ -32,6 +32,8 @@ class DocGenJobFullV2025R0(DocGenJobV2025R0): + _discriminator = 'type', {'docgen_job'} + def __init__( self, created_by: UserBaseV2025R0, diff --git a/box_sdk_gen/schemas/v2025_r0/doc_gen_job_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/doc_gen_job_v2025_r0.py index dd1134d1..f1fbdadc 100644 --- a/box_sdk_gen/schemas/v2025_r0/doc_gen_job_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/doc_gen_job_v2025_r0.py @@ -30,6 +30,8 @@ class DocGenJobV2025R0StatusField(str, Enum): class DocGenJobV2025R0(DocGenJobBaseV2025R0): + _discriminator = 'type', {'docgen_job'} + def __init__( self, batch: DocGenBatchBaseV2025R0, diff --git a/box_sdk_gen/schemas/v2025_r0/group_mini_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/group_mini_v2025_r0.py index 965e5e51..3e0bf110 100644 --- a/box_sdk_gen/schemas/v2025_r0/group_mini_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/group_mini_v2025_r0.py @@ -15,6 +15,8 @@ class GroupMiniV2025R0GroupTypeField(str, Enum): class GroupMiniV2025R0(GroupBaseV2025R0): + _discriminator = 'type', {'group'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/v2025_r0/hub_collaboration_user_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/hub_collaboration_user_v2025_r0.py index cff4046c..f6563c88 100644 --- a/box_sdk_gen/schemas/v2025_r0/hub_collaboration_user_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/hub_collaboration_user_v2025_r0.py @@ -8,6 +8,8 @@ class HubCollaborationUserV2025R0(UserBaseV2025R0): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/v2025_r0/hub_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/hub_v2025_r0.py index e2559bba..3c77dc73 100644 --- a/box_sdk_gen/schemas/v2025_r0/hub_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/hub_v2025_r0.py @@ -12,6 +12,8 @@ class HubV2025R0(HubBaseV2025R0): + _discriminator = 'type', {'hubs'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/v2025_r0/user_mini_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/user_mini_v2025_r0.py index f9ef2188..aa2a2b49 100644 --- a/box_sdk_gen/schemas/v2025_r0/user_mini_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/user_mini_v2025_r0.py @@ -8,6 +8,8 @@ class UserMiniV2025R0(UserBaseV2025R0): + _discriminator = 'type', {'user'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/web_link.py b/box_sdk_gen/schemas/web_link.py index c85512f4..744df7c5 100644 --- a/box_sdk_gen/schemas/web_link.py +++ b/box_sdk_gen/schemas/web_link.py @@ -173,6 +173,8 @@ class WebLinkItemStatusField(str, Enum): class WebLink(WebLinkMini): + _discriminator = 'type', {'web_link'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/web_link_mini.py b/box_sdk_gen/schemas/web_link_mini.py index 8beb6585..fd887b10 100644 --- a/box_sdk_gen/schemas/web_link_mini.py +++ b/box_sdk_gen/schemas/web_link_mini.py @@ -8,6 +8,8 @@ class WebLinkMini(WebLinkBase): + _discriminator = 'type', {'web_link'} + def __init__( self, id: str, diff --git a/box_sdk_gen/schemas/webhook.py b/box_sdk_gen/schemas/webhook.py index 8163c7ee..a2fddb15 100644 --- a/box_sdk_gen/schemas/webhook.py +++ b/box_sdk_gen/schemas/webhook.py @@ -64,6 +64,8 @@ class WebhookTriggersField(str, Enum): class Webhook(WebhookMini): + _discriminator = 'type', {'webhook'} + def __init__( self, *, diff --git a/box_sdk_gen/schemas/workflow.py b/box_sdk_gen/schemas/workflow.py index 2d5ecc39..71606c42 100644 --- a/box_sdk_gen/schemas/workflow.py +++ b/box_sdk_gen/schemas/workflow.py @@ -259,6 +259,8 @@ def __init__( class Workflow(WorkflowMini): + _discriminator = 'type', {'workflow'} + def __init__( self, *, diff --git a/docs/box_sdk_gen/trashed_items.md b/docs/box_sdk_gen/trashed_items.md index 22b41a27..c2ca2e9d 100644 --- a/docs/box_sdk_gen/trashed_items.md +++ b/docs/box_sdk_gen/trashed_items.md @@ -14,6 +14,8 @@ attributes that are not returned by default. This endpoint defaults to use offset-based pagination, yet also supports 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`. + This operation is performed by calling function `get_trashed_items`. See the endpoint docs at