From 80c6a90fe505b72971718c4fc1e99e5a7c3530b7 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 21 Jan 2026 10:12:09 -0800 Subject: [PATCH 1/2] feat: Add watermarking permissions and sources information (box/box-openapi#579) --- .codegen.json | 2 +- src/sdk-gen/schemas/fileFull.ts | 58 +++++++++++++++++++++++++++++-- src/sdk-gen/schemas/folderFull.ts | 54 +++++++++++++++++++++++++++- 3 files changed, 110 insertions(+), 4 deletions(-) diff --git a/.codegen.json b/.codegen.json index 2172d8a2..cf0d80df 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "3e11b6f", "specHash": "425a724", "version": "4.3.0" } +{ "engineHash": "3e11b6f", "specHash": "4beaa19", "version": "4.3.0" } diff --git a/src/sdk-gen/schemas/fileFull.ts b/src/sdk-gen/schemas/fileFull.ts index e3caba86..83c97cec 100644 --- a/src/sdk-gen/schemas/fileFull.ts +++ b/src/sdk-gen/schemas/fileFull.ts @@ -87,6 +87,9 @@ export interface FileFullPermissionsField { * Specifies if the user view annotations placed by themselves * on this file. */ readonly canViewAnnotationsSelf: boolean; + /** + * Specifies if the user can apply a watermark to this file. */ + readonly canApplyWatermark?: boolean; readonly rawData?: SerializedData; } export type FileFullLockTypeField = 'lock'; @@ -147,6 +150,12 @@ export interface FileFullWatermarkInfoField { /** * Specifies if this item has a watermark applied. */ readonly isWatermarked?: boolean; + /** + * Specifies if the watermark is inherited from any parent folder in the hierarchy. */ + readonly isWatermarkInherited?: boolean; + /** + * Specifies if the watermark is enforced by an access policy. */ + readonly isWatermarkedByAccessPolicy?: boolean; readonly rawData?: SerializedData; } export type FileFullAllowedInviteeRolesField = @@ -390,6 +399,7 @@ export function serializeFileFullPermissionsField( ['can_upload']: val.canUpload, ['can_view_annotations_all']: val.canViewAnnotationsAll, ['can_view_annotations_self']: val.canViewAnnotationsSelf, + ['can_apply_watermark']: val.canApplyWatermark, }; } export function deserializeFileFullPermissionsField( @@ -556,6 +566,17 @@ export function deserializeFileFullPermissionsField( }); } const canViewAnnotationsSelf: boolean = val.can_view_annotations_self; + if ( + !(val.can_apply_watermark == void 0) && + !sdIsBoolean(val.can_apply_watermark) + ) { + throw new BoxSdkError({ + message: + 'Expecting boolean for "can_apply_watermark" of type "FileFullPermissionsField"', + }); + } + const canApplyWatermark: undefined | boolean = + val.can_apply_watermark == void 0 ? void 0 : val.can_apply_watermark; return { canDelete: canDelete, canDownload: canDownload, @@ -569,6 +590,7 @@ export function deserializeFileFullPermissionsField( canUpload: canUpload, canViewAnnotationsAll: canViewAnnotationsAll, canViewAnnotationsSelf: canViewAnnotationsSelf, + canApplyWatermark: canApplyWatermark, } satisfies FileFullPermissionsField; } export function serializeFileFullLockTypeField( @@ -791,7 +813,11 @@ export function deserializeFileFullExpiringEmbedLinkField( export function serializeFileFullWatermarkInfoField( val: FileFullWatermarkInfoField ): SerializedData { - return { ['is_watermarked']: val.isWatermarked }; + return { + ['is_watermarked']: val.isWatermarked, + ['is_watermark_inherited']: val.isWatermarkInherited, + ['is_watermarked_by_access_policy']: val.isWatermarkedByAccessPolicy, + }; } export function deserializeFileFullWatermarkInfoField( val: SerializedData @@ -809,7 +835,35 @@ export function deserializeFileFullWatermarkInfoField( } const isWatermarked: undefined | boolean = val.is_watermarked == void 0 ? void 0 : val.is_watermarked; - return { isWatermarked: isWatermarked } satisfies FileFullWatermarkInfoField; + if ( + !(val.is_watermark_inherited == void 0) && + !sdIsBoolean(val.is_watermark_inherited) + ) { + throw new BoxSdkError({ + message: + 'Expecting boolean for "is_watermark_inherited" of type "FileFullWatermarkInfoField"', + }); + } + const isWatermarkInherited: undefined | boolean = + val.is_watermark_inherited == void 0 ? void 0 : val.is_watermark_inherited; + if ( + !(val.is_watermarked_by_access_policy == void 0) && + !sdIsBoolean(val.is_watermarked_by_access_policy) + ) { + throw new BoxSdkError({ + message: + 'Expecting boolean for "is_watermarked_by_access_policy" of type "FileFullWatermarkInfoField"', + }); + } + const isWatermarkedByAccessPolicy: undefined | boolean = + val.is_watermarked_by_access_policy == void 0 + ? void 0 + : val.is_watermarked_by_access_policy; + return { + isWatermarked: isWatermarked, + isWatermarkInherited: isWatermarkInherited, + isWatermarkedByAccessPolicy: isWatermarkedByAccessPolicy, + } satisfies FileFullWatermarkInfoField; } export function serializeFileFullAllowedInviteeRolesField( val: FileFullAllowedInviteeRolesField diff --git a/src/sdk-gen/schemas/folderFull.ts b/src/sdk-gen/schemas/folderFull.ts index 6ce7cdae..e7b4c8b3 100644 --- a/src/sdk-gen/schemas/folderFull.ts +++ b/src/sdk-gen/schemas/folderFull.ts @@ -73,6 +73,9 @@ export interface FolderFullPermissionsField { /** * Specifies if the user can upload into this folder. */ readonly canUpload: boolean; + /** + * Specifies if the user can apply a watermark to this folder and its contents. */ + readonly canApplyWatermark?: boolean; readonly rawData?: SerializedData; } export interface FolderFullMetadataField { @@ -101,6 +104,12 @@ export interface FolderFullWatermarkInfoField { /** * Specifies if this item has a watermark applied. */ readonly isWatermarked?: boolean; + /** + * Specifies if the watermark is inherited from any parent folder in the hierarchy. */ + readonly isWatermarkInherited?: boolean; + /** + * Specifies if the watermark is enforced by an access policy. */ + readonly isWatermarkedByAccessPolicy?: boolean; readonly rawData?: SerializedData; } export interface FolderFullClassificationField { @@ -218,6 +227,7 @@ export function serializeFolderFullPermissionsField( ['can_set_share_access']: val.canSetShareAccess, ['can_share']: val.canShare, ['can_upload']: val.canUpload, + ['can_apply_watermark']: val.canApplyWatermark, }; } export function deserializeFolderFullPermissionsField( @@ -319,6 +329,17 @@ export function deserializeFolderFullPermissionsField( }); } const canUpload: boolean = val.can_upload; + if ( + !(val.can_apply_watermark == void 0) && + !sdIsBoolean(val.can_apply_watermark) + ) { + throw new BoxSdkError({ + message: + 'Expecting boolean for "can_apply_watermark" of type "FolderFullPermissionsField"', + }); + } + const canApplyWatermark: undefined | boolean = + val.can_apply_watermark == void 0 ? void 0 : val.can_apply_watermark; return { canDelete: canDelete, canDownload: canDownload, @@ -327,6 +348,7 @@ export function deserializeFolderFullPermissionsField( canSetShareAccess: canSetShareAccess, canShare: canShare, canUpload: canUpload, + canApplyWatermark: canApplyWatermark, } satisfies FolderFullPermissionsField; } export function serializeFolderFullMetadataField( @@ -443,7 +465,11 @@ export function deserializeFolderFullAllowedInviteeRolesField( export function serializeFolderFullWatermarkInfoField( val: FolderFullWatermarkInfoField ): SerializedData { - return { ['is_watermarked']: val.isWatermarked }; + return { + ['is_watermarked']: val.isWatermarked, + ['is_watermark_inherited']: val.isWatermarkInherited, + ['is_watermarked_by_access_policy']: val.isWatermarkedByAccessPolicy, + }; } export function deserializeFolderFullWatermarkInfoField( val: SerializedData @@ -461,8 +487,34 @@ export function deserializeFolderFullWatermarkInfoField( } const isWatermarked: undefined | boolean = val.is_watermarked == void 0 ? void 0 : val.is_watermarked; + if ( + !(val.is_watermark_inherited == void 0) && + !sdIsBoolean(val.is_watermark_inherited) + ) { + throw new BoxSdkError({ + message: + 'Expecting boolean for "is_watermark_inherited" of type "FolderFullWatermarkInfoField"', + }); + } + const isWatermarkInherited: undefined | boolean = + val.is_watermark_inherited == void 0 ? void 0 : val.is_watermark_inherited; + if ( + !(val.is_watermarked_by_access_policy == void 0) && + !sdIsBoolean(val.is_watermarked_by_access_policy) + ) { + throw new BoxSdkError({ + message: + 'Expecting boolean for "is_watermarked_by_access_policy" of type "FolderFullWatermarkInfoField"', + }); + } + const isWatermarkedByAccessPolicy: undefined | boolean = + val.is_watermarked_by_access_policy == void 0 + ? void 0 + : val.is_watermarked_by_access_policy; return { isWatermarked: isWatermarked, + isWatermarkInherited: isWatermarkInherited, + isWatermarkedByAccessPolicy: isWatermarkedByAccessPolicy, } satisfies FolderFullWatermarkInfoField; } export function serializeFolderFullClassificationField( From 98913a82dc22406668b6fc34d75c754cf00154a6 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 21 Jan 2026 10:15:27 -0800 Subject: [PATCH 2/2] fix: add missing tag to API resources (box/box-openapi#580) --- .codegen.json | 2 +- docs/sdk-gen/authorization.md | 2 +- docs/sdk-gen/comments.md | 2 +- docs/sdk-gen/events.md | 4 ++-- docs/sdk-gen/fileVersions.md | 2 +- docs/sdk-gen/files.md | 6 +++--- docs/sdk-gen/folders.md | 10 +++++----- docs/sdk-gen/users.md | 4 ++-- src/sdk-gen/managers/authorization.ts | 2 +- src/sdk-gen/managers/events.ts | 4 ++-- src/sdk-gen/managers/folders.ts | 2 +- src/sdk-gen/managers/users.ts | 4 ++-- src/sdk-gen/schemas/realtimeServer.ts | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.codegen.json b/.codegen.json index cf0d80df..b495eef1 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "3e11b6f", "specHash": "4beaa19", "version": "4.3.0" } +{ "engineHash": "3e11b6f", "specHash": "ad08e8c", "version": "4.3.0" } diff --git a/docs/sdk-gen/authorization.md b/docs/sdk-gen/authorization.md index 5f4ef517..57c2becd 100644 --- a/docs/sdk-gen/authorization.md +++ b/docs/sdk-gen/authorization.md @@ -46,7 +46,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/sdk-gen/comments.md b/docs/sdk-gen/comments.md index 4a5d3bda..4bf643d8 100644 --- a/docs/sdk-gen/comments.md +++ b/docs/sdk-gen/comments.md @@ -155,7 +155,7 @@ 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/sdk-gen/events.md b/docs/sdk-gen/events.md index 652f3ac4..0d68b3ce 100644 --- a/docs/sdk-gen/events.md +++ b/docs/sdk-gen/events.md @@ -8,7 +8,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 @@ -23,7 +23,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/sdk-gen/fileVersions.md b/docs/sdk-gen/fileVersions.md index bde0e4a4..a7880d97 100644 --- a/docs/sdk-gen/fileVersions.md +++ b/docs/sdk-gen/fileVersions.md @@ -72,7 +72,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. diff --git a/docs/sdk-gen/files.md b/docs/sdk-gen/files.md index 1cbfb1f0..d543b071 100644 --- a/docs/sdk-gen/files.md +++ b/docs/sdk-gen/files.md @@ -37,7 +37,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. @@ -71,7 +71,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. @@ -140,7 +140,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. diff --git a/docs/sdk-gen/folders.md b/docs/sdk-gen/folders.md index 6a3b161b..f09ed2a5 100644 --- a/docs/sdk-gen/folders.md +++ b/docs/sdk-gen/folders.md @@ -52,7 +52,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. @@ -86,7 +86,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 @@ -132,7 +132,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 `getFolderItems`. @@ -188,7 +188,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. @@ -225,7 +225,7 @@ 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/sdk-gen/users.md b/docs/sdk-gen/users.md index c59862f0..8d5ba6da 100644 --- a/docs/sdk-gen/users.md +++ b/docs/sdk-gen/users.md @@ -154,8 +154,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. diff --git a/src/sdk-gen/managers/authorization.ts b/src/sdk-gen/managers/authorization.ts index 152f0425..22238d40 100644 --- a/src/sdk-gen/managers/authorization.ts +++ b/src/sdk-gen/managers/authorization.ts @@ -320,7 +320,7 @@ export class AuthorizationManager { * 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/src/sdk-gen/managers/events.ts b/src/sdk-gen/managers/events.ts index 33b42123..f1c6c7d1 100644 --- a/src/sdk-gen/managers/events.ts +++ b/src/sdk-gen/managers/events.ts @@ -471,7 +471,7 @@ export class EventsManager { } /** * 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 @@ -486,7 +486,7 @@ export class EventsManager { * 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/src/sdk-gen/managers/folders.ts b/src/sdk-gen/managers/folders.ts index 018721d8..44d893bd 100644 --- a/src/sdk-gen/managers/folders.ts +++ b/src/sdk-gen/managers/folders.ts @@ -1159,7 +1159,7 @@ export class FoldersManager { * 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. * @param {string} folderId The unique identifier that represent a folder. The ID for any folder can be determined diff --git a/src/sdk-gen/managers/users.ts b/src/sdk-gen/managers/users.ts index b414921b..cf05c49d 100644 --- a/src/sdk-gen/managers/users.ts +++ b/src/sdk-gen/managers/users.ts @@ -287,7 +287,7 @@ export interface CreateUserRequestBody { readonly role?: CreateUserRequestBodyRoleField; /** * The language of the user, formatted in modified version of the - * [ISO 639-1](/guides/api-calls/language-codes) format. */ + * [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format. */ readonly language?: string; /** * Whether the user can use Box Sync. */ @@ -479,7 +479,7 @@ export interface UpdateUserByIdRequestBody { readonly role?: UpdateUserByIdRequestBodyRoleField; /** * The language of the user, formatted in modified version of the - * [ISO 639-1](/guides/api-calls/language-codes) format. */ + * [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format. */ readonly language?: string; /** * Whether the user can use Box Sync. */ diff --git a/src/sdk-gen/schemas/realtimeServer.ts b/src/sdk-gen/schemas/realtimeServer.ts index 80a63637..52894e31 100644 --- a/src/sdk-gen/schemas/realtimeServer.ts +++ b/src/sdk-gen/schemas/realtimeServer.ts @@ -19,7 +19,7 @@ export interface RealtimeServer { /** * 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). */ + * getting a [new list of server](https://developer.box.com/reference/options-events). */ readonly maxRetries?: string; /** * The maximum number of seconds without a response