From 543507accc03cb88aa6d09a1c7b89d18dbbc10f8 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 21 Jan 2026 10:18:54 -0800 Subject: [PATCH] feat: Add watermarking permissions and sources information (box/box-openapi#579) --- .codegen.json | 2 +- box_sdk_gen/schemas/file_full.py | 24 +++++++++++++++++++++--- box_sdk_gen/schemas/folder_full.py | 24 +++++++++++++++++++++--- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.codegen.json b/.codegen.json index 95e1c618b..09a90978c 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "3e11b6f", "specHash": "425a724", "version": "10.3.0" } +{ "engineHash": "3e11b6f", "specHash": "4beaa19", "version": "10.3.0" } diff --git a/box_sdk_gen/schemas/file_full.py b/box_sdk_gen/schemas/file_full.py index 615fac845..3396821d6 100644 --- a/box_sdk_gen/schemas/file_full.py +++ b/box_sdk_gen/schemas/file_full.py @@ -1,9 +1,9 @@ +from typing import Optional + from box_sdk_gen.internal.base_object import BaseObject from enum import Enum -from typing import Optional - from typing import List from box_sdk_gen.schemas.file_base import FileBaseTypeField @@ -50,6 +50,8 @@ def __init__( can_upload: bool, can_view_annotations_all: bool, can_view_annotations_self: bool, + *, + can_apply_watermark: Optional[bool] = None, **kwargs ): """ @@ -82,6 +84,8 @@ def __init__( :param can_view_annotations_self: Specifies if the user view annotations placed by themselves on this file. :type can_view_annotations_self: bool + :param can_apply_watermark: Specifies if the user can apply a watermark to this file., defaults to None + :type can_apply_watermark: Optional[bool], optional """ super().__init__(**kwargs) self.can_delete = can_delete @@ -96,6 +100,7 @@ def __init__( self.can_upload = can_upload self.can_view_annotations_all = can_view_annotations_all self.can_view_annotations_self = can_view_annotations_self + self.can_apply_watermark = can_apply_watermark class FileFullLockTypeField(str, Enum): @@ -190,13 +195,26 @@ def __init__( class FileFullWatermarkInfoField(BaseObject): - def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs): + def __init__( + self, + *, + is_watermarked: Optional[bool] = None, + is_watermark_inherited: Optional[bool] = None, + is_watermarked_by_access_policy: Optional[bool] = None, + **kwargs + ): """ :param is_watermarked: Specifies if this item has a watermark applied., defaults to None :type is_watermarked: Optional[bool], optional + :param is_watermark_inherited: Specifies if the watermark is inherited from any parent folder in the hierarchy., defaults to None + :type is_watermark_inherited: Optional[bool], optional + :param is_watermarked_by_access_policy: Specifies if the watermark is enforced by an access policy., defaults to None + :type is_watermarked_by_access_policy: Optional[bool], optional """ super().__init__(**kwargs) self.is_watermarked = is_watermarked + self.is_watermark_inherited = is_watermark_inherited + self.is_watermarked_by_access_policy = is_watermarked_by_access_policy class FileFullAllowedInviteeRolesField(str, Enum): diff --git a/box_sdk_gen/schemas/folder_full.py b/box_sdk_gen/schemas/folder_full.py index dff8b9f69..b2594ff12 100644 --- a/box_sdk_gen/schemas/folder_full.py +++ b/box_sdk_gen/schemas/folder_full.py @@ -1,9 +1,9 @@ from enum import Enum -from box_sdk_gen.internal.base_object import BaseObject - from typing import Optional +from box_sdk_gen.internal.base_object import BaseObject + from typing import List from box_sdk_gen.schemas.folder_base import FolderBaseTypeField @@ -49,6 +49,8 @@ def __init__( can_set_share_access: bool, can_share: bool, can_upload: bool, + *, + can_apply_watermark: Optional[bool] = None, **kwargs ): """ @@ -70,6 +72,8 @@ def __init__( :type can_share: bool :param can_upload: Specifies if the user can upload into this folder. :type can_upload: bool + :param can_apply_watermark: Specifies if the user can apply a watermark to this folder and its contents., defaults to None + :type can_apply_watermark: Optional[bool], optional """ super().__init__(**kwargs) self.can_delete = can_delete @@ -79,6 +83,7 @@ def __init__( self.can_set_share_access = can_set_share_access self.can_share = can_share self.can_upload = can_upload + self.can_apply_watermark = can_apply_watermark class FolderFullMetadataField(BaseObject): @@ -104,13 +109,26 @@ class FolderFullAllowedInviteeRolesField(str, Enum): class FolderFullWatermarkInfoField(BaseObject): - def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs): + def __init__( + self, + *, + is_watermarked: Optional[bool] = None, + is_watermark_inherited: Optional[bool] = None, + is_watermarked_by_access_policy: Optional[bool] = None, + **kwargs + ): """ :param is_watermarked: Specifies if this item has a watermark applied., defaults to None :type is_watermarked: Optional[bool], optional + :param is_watermark_inherited: Specifies if the watermark is inherited from any parent folder in the hierarchy., defaults to None + :type is_watermark_inherited: Optional[bool], optional + :param is_watermarked_by_access_policy: Specifies if the watermark is enforced by an access policy., defaults to None + :type is_watermarked_by_access_policy: Optional[bool], optional """ super().__init__(**kwargs) self.is_watermarked = is_watermarked + self.is_watermark_inherited = is_watermark_inherited + self.is_watermarked_by_access_policy = is_watermarked_by_access_policy class FolderFullClassificationField(BaseObject):