From 543507accc03cb88aa6d09a1c7b89d18dbbc10f8 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 21 Jan 2026 10:18:54 -0800 Subject: [PATCH 1/2] 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): From 8451a5e592a99f3c88baa69d834364fcdfadf642 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 21 Jan 2026 10:21:32 -0800 Subject: [PATCH 2/2] fix: add missing tag to API resources (box/box-openapi#580) --- .codegen.json | 2 +- box_sdk_gen/managers/authorization.py | 2 +- box_sdk_gen/managers/events.py | 4 ++-- box_sdk_gen/managers/folders.py | 2 +- box_sdk_gen/managers/users.py | 4 ++-- box_sdk_gen/schemas/realtime_server.py | 2 +- box_sdk_gen/schemas/user.py | 2 +- box_sdk_gen/schemas/user_full.py | 2 +- docs/authorization.md | 2 +- docs/comments.md | 2 +- docs/events.md | 4 ++-- docs/file_versions.md | 2 +- docs/files.md | 6 +++--- docs/folders.md | 10 +++++----- docs/users.md | 8 ++++---- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.codegen.json b/.codegen.json index 09a90978c..66004b28c 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "3e11b6f", "specHash": "4beaa19", "version": "10.3.0" } +{ "engineHash": "3e11b6f", "specHash": "ad08e8c", "version": "10.3.0" } diff --git a/box_sdk_gen/managers/authorization.py b/box_sdk_gen/managers/authorization.py index 7bcb2af9c..e03ae65e5 100644 --- a/box_sdk_gen/managers/authorization.py +++ b/box_sdk_gen/managers/authorization.py @@ -218,7 +218,7 @@ def request_access_token( operations you will begin by requesting authentication from the - [authorize](#get-authorize) endpoint and Box will send you an + [authorize](https://developer.box.com/reference/get-authorize) endpoint and Box will send you an authorization code. diff --git a/box_sdk_gen/managers/events.py b/box_sdk_gen/managers/events.py index 1ccd76a85..e929f8d83 100644 --- a/box_sdk_gen/managers/events.py +++ b/box_sdk_gen/managers/events.py @@ -420,7 +420,7 @@ def get_events_with_long_polling( """ Returns a list of real-time servers that can be used for long-polling updates - to the [event stream](#get-events). + to the [event stream](https://developer.box.com/reference/get-events). Long polling is the concept where a HTTP request is kept open until the @@ -453,7 +453,7 @@ def get_events_with_long_polling( it only serves as a prompt to take further action such as sending a - request to the [events endpoint](#get-events) with the last known + request to the [events endpoint](https://developer.box.com/reference/get-events) with the last known `stream_position`. diff --git a/box_sdk_gen/managers/folders.py b/box_sdk_gen/managers/folders.py index f7b3e2c3f..3f6c67dfe 100644 --- a/box_sdk_gen/managers/folders.py +++ b/box_sdk_gen/managers/folders.py @@ -689,7 +689,7 @@ def get_folder_items( To request more information about the folder itself, like its size, - use the [Get a folder](#get-folders-id) endpoint instead. + use the [Get a folder](https://developer.box.com/reference/get-folders-id) endpoint instead. :param folder_id: The unique identifier that represent a folder. diff --git a/box_sdk_gen/managers/users.py b/box_sdk_gen/managers/users.py index 0bc8a85da..69549f8cc 100644 --- a/box_sdk_gen/managers/users.py +++ b/box_sdk_gen/managers/users.py @@ -262,7 +262,7 @@ def create_user( :param role: The user’s enterprise role., defaults to None :type role: Optional[CreateUserRole], optional :param language: The language of the user, formatted in modified version of the - [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None + [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None :type language: Optional[str], optional :param is_sync_enabled: Whether the user can use Box Sync., defaults to None :type is_sync_enabled: Optional[bool], optional @@ -535,7 +535,7 @@ def update_user_by_id( :param role: The user’s enterprise role., defaults to None :type role: Optional[UpdateUserByIdRole], optional :param language: The language of the user, formatted in modified version of the - [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None + [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None :type language: Optional[str], optional :param is_sync_enabled: Whether the user can use Box Sync., defaults to None :type is_sync_enabled: Optional[bool], optional diff --git a/box_sdk_gen/schemas/realtime_server.py b/box_sdk_gen/schemas/realtime_server.py index f8228268e..b9198d27e 100644 --- a/box_sdk_gen/schemas/realtime_server.py +++ b/box_sdk_gen/schemas/realtime_server.py @@ -25,7 +25,7 @@ def __init__( :type ttl: Optional[str], optional :param max_retries: The maximum number of retries this server will allow before a new long poll should be started by - getting a [new list of server](#options-events)., defaults to None + getting a [new list of server](https://developer.box.com/reference/options-events)., defaults to None :type max_retries: Optional[str], optional :param retry_timeout: The maximum number of seconds without a response after which you should retry the long poll connection. diff --git a/box_sdk_gen/schemas/user.py b/box_sdk_gen/schemas/user.py index 58eb548fc..8e98fec97 100644 --- a/box_sdk_gen/schemas/user.py +++ b/box_sdk_gen/schemas/user.py @@ -72,7 +72,7 @@ def __init__( :param modified_at: When the user object was last modified., defaults to None :type modified_at: Optional[DateTime], optional :param language: The language of the user, formatted in modified version of the - [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None + [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None :type language: Optional[str], optional :param timezone: The user's timezone., defaults to None :type timezone: Optional[str], optional diff --git a/box_sdk_gen/schemas/user_full.py b/box_sdk_gen/schemas/user_full.py index b35ae441f..6ae220de1 100644 --- a/box_sdk_gen/schemas/user_full.py +++ b/box_sdk_gen/schemas/user_full.py @@ -133,7 +133,7 @@ def __init__( :param modified_at: When the user object was last modified., defaults to None :type modified_at: Optional[DateTime], optional :param language: The language of the user, formatted in modified version of the - [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None + [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None :type language: Optional[str], optional :param timezone: The user's timezone., defaults to None :type timezone: Optional[str], optional diff --git a/docs/authorization.md b/docs/authorization.md index 65da2275c..2fb961360 100644 --- a/docs/authorization.md +++ b/docs/authorization.md @@ -51,7 +51,7 @@ authorization code or a server-side JWT assertion. An Access Token is a string that enables Box to verify that a request belongs to an authorized session. In the normal order of operations you will begin by requesting authentication from the -[authorize](#get-authorize) endpoint and Box will send you an +[authorize](https://developer.box.com/reference/get-authorize) endpoint and Box will send you an authorization code. You will then send this code to this endpoint to exchange it for diff --git a/docs/comments.md b/docs/comments.md index b5434eee3..cddc33ac9 100644 --- a/docs/comments.md +++ b/docs/comments.md @@ -170,5 +170,5 @@ This function returns a value of type `CommentFull`. Returns the newly created comment object. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. diff --git a/docs/events.md b/docs/events.md index 7e4e45cfd..80a656e42 100644 --- a/docs/events.md +++ b/docs/events.md @@ -7,7 +7,7 @@ ## Get events long poll endpoint Returns a list of real-time servers that can be used for long-polling updates -to the [event stream](#get-events). +to the [event stream](https://developer.box.com/reference/get-events). Long polling is the concept where a HTTP request is kept open until the server sends a response, then repeating the process over and over to receive @@ -22,7 +22,7 @@ URLs. Next, make a long poll request to any of the provided URLs. When an event occurs in monitored account a response with the value `new_change` will be sent. The response contains no other details as it only serves as a prompt to take further action such as sending a -request to the [events endpoint](#get-events) with the last known +request to the [events endpoint](https://developer.box.com/reference/get-events) with the last known `stream_position`. After the server sends this response it closes the connection. You must now diff --git a/docs/file_versions.md b/docs/file_versions.md index b217d2af5..f9c13063f 100644 --- a/docs/file_versions.md +++ b/docs/file_versions.md @@ -78,7 +78,7 @@ This function returns a value of type `FileVersionFull`. Returns a specific version of a file. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. ## Remove file version diff --git a/docs/files.md b/docs/files.md index 664f051b5..5698c052d 100644 --- a/docs/files.md +++ b/docs/files.md @@ -46,7 +46,7 @@ This function returns a value of type `FileFull`. Returns a file object. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. ## Update file @@ -101,7 +101,7 @@ This function returns a value of type `FileFull`. Returns a file object. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. ## Delete file @@ -176,7 +176,7 @@ This function returns a value of type `FileFull`. Returns a new file object representing the copied file. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. ## Get file thumbnail URL diff --git a/docs/folders.md b/docs/folders.md index b79664416..7c210a50b 100644 --- a/docs/folders.md +++ b/docs/folders.md @@ -65,7 +65,7 @@ To fetch more items within the folder, use the [Get items in a folder](https://developer.box.com/reference/get-folders-id-items)) endpoint. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. ## Update folder @@ -123,7 +123,7 @@ This function returns a value of type `FolderFull`. Returns a folder object for the updated folder Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. If the user is moving folders with a large number of items in all of @@ -171,7 +171,7 @@ Retrieves a page of items in a folder. These items can be files, folders, and web links. To request more information about the folder itself, like its size, -use the [Get a folder](#get-folders-id) endpoint instead. +use the [Get a folder](https://developer.box.com/reference/get-folders-id) endpoint instead. This operation is performed by calling function `get_folder_items`. @@ -249,7 +249,7 @@ This function returns a value of type `FolderFull`. Returns a folder object. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. ## Copy folder @@ -291,5 +291,5 @@ This function returns a value of type `FolderFull`. Returns a new folder object representing the copied folder. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request +[fields](#parameter-fields) query parameter to explicitly request any specific fields. diff --git a/docs/users.md b/docs/users.md index 45eaa9eb7..725d9d912 100644 --- a/docs/users.md +++ b/docs/users.md @@ -82,7 +82,7 @@ client.users.create_user(user_name, login=user_login, is_platform_access_only=Tr - role `Optional[CreateUserRole]` - The user’s enterprise role. - language `Optional[str]` - - The language of the user, formatted in modified version of the [ISO 639-1](/guides/api-calls/language-codes) format. + - The language of the user, formatted in modified version of the [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format. - is_sync_enabled `Optional[bool]` - Whether the user can use Box Sync. - job_title `Optional[str]` @@ -198,8 +198,8 @@ This function returns a value of type `UserFull`. Returns a single user object. Not all available fields are returned by default. Use the -[fields](#param-fields) query parameter to explicitly request -any specific fields using the [fields](#get-users-id--request--fields) +[fields](#parameter-fields) query parameter to explicitly request +any specific fields using the [fields](#parameter-fields) parameter. ## Update user @@ -234,7 +234,7 @@ client.users.update_user_by_id(user.id, name=updated_user_name) - role `Optional[UpdateUserByIdRole]` - The user’s enterprise role. - language `Optional[str]` - - The language of the user, formatted in modified version of the [ISO 639-1](/guides/api-calls/language-codes) format. + - The language of the user, formatted in modified version of the [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format. - is_sync_enabled `Optional[bool]` - Whether the user can use Box Sync. - job_title `Optional[str]`