diff --git a/.codegen.json b/.codegen.json index 871c0b89..183f4913 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "7c01dda", "specHash": "2bd751f", "version": "10.5.0" } +{ "engineHash": "7c01dda", "specHash": "74a1e4a", "version": "10.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/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..55892fff 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, ) diff --git a/docs/trashed_items.md b/docs/trashed_items.md index 22b41a27..c2ca2e9d 100644 --- a/docs/trashed_items.md +++ b/docs/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