From 60667a125cd51b9683baa90935ec926d3fb79d2c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 11 Feb 2026 02:10:14 -0800 Subject: [PATCH] feat: add signer language, cancel sign request reason (box/box-openapi#584) --- .codegen.json | 2 +- box_sdk_gen/managers/folders.py | 12 ++++++------ box_sdk_gen/managers/sign_requests.py | 12 ++++++++++-- box_sdk_gen/schemas/__init__.py | 2 ++ .../schemas/ai_extract_structured_response.py | 2 +- .../schemas/sign_request_cancel_request.py | 15 +++++++++++++++ box_sdk_gen/schemas/sign_request_create_signer.py | 5 +++++ box_sdk_gen/schemas/sign_request_signer.py | 5 +++++ docs/box_sdk_gen/folders.md | 4 ++-- docs/box_sdk_gen/sign_requests.md | 2 ++ 10 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 box_sdk_gen/schemas/sign_request_cancel_request.py diff --git a/.codegen.json b/.codegen.json index 3924e07be..15546d47a 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "bfb97cc", "specHash": "ccdb456", "version": "4.3.0" } +{ "engineHash": "bfb97cc", "specHash": "77eac4b", "version": "4.3.0" } diff --git a/box_sdk_gen/managers/folders.py b/box_sdk_gen/managers/folders.py index 3f6c67dfe..fc55bef41 100644 --- a/box_sdk_gen/managers/folders.py +++ b/box_sdk_gen/managers/folders.py @@ -377,9 +377,10 @@ def get_folder_by_id( :type direction: Optional[GetFolderByIdDirection], optional :param offset: The offset of the item at which to begin the response. - Queries with offset parameter value - exceeding 10000 will be rejected - with a 400 response., defaults to None + Offset-based pagination is not guaranteed to work reliably for high offset values and may fail for large datasets. In + those cases, reduce the number of items in the folder (for example, by + restructuring the folder into smaller subfolders) before retrying the + request., defaults to None :type offset: Optional[int], optional :param limit: The maximum number of items to return per page., defaults to None :type limit: Optional[int], optional @@ -733,9 +734,8 @@ def get_folder_items( :type marker: Optional[str], optional :param offset: The offset of the item at which to begin the response. - Queries with offset parameter value - exceeding 10000 will be rejected - with a 400 response., defaults to None + Offset-based pagination is not guaranteed to work reliably for high offset values and may fail for large datasets. In + those cases, use marker-based pagination by setting `usemarker` to `true`., defaults to None :type offset: Optional[int], optional :param limit: The maximum number of items to return per page., defaults to None :type limit: Optional[int], optional diff --git a/box_sdk_gen/managers/sign_requests.py b/box_sdk_gen/managers/sign_requests.py index 75e4cf0e4..09e00bf54 100644 --- a/box_sdk_gen/managers/sign_requests.py +++ b/box_sdk_gen/managers/sign_requests.py @@ -6,6 +6,8 @@ from box_sdk_gen.internal.utils import to_string +from box_sdk_gen.serialization.json import serialize + from box_sdk_gen.serialization.json import deserialize from typing import List @@ -14,8 +16,6 @@ from typing import Union -from box_sdk_gen.serialization.json import serialize - from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.file_base import FileBase @@ -30,6 +30,8 @@ from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.sign_request_cancel_request import SignRequestCancelRequest + from box_sdk_gen.schemas.sign_requests import SignRequests from box_sdk_gen.schemas.sign_request_create_request import SignRequestCreateRequest @@ -77,6 +79,7 @@ def cancel_sign_request( self, sign_request_id: str, *, + reason: Optional[str] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> SignRequest: """ @@ -84,11 +87,14 @@ def cancel_sign_request( :param sign_request_id: The ID of the signature request. Example: "33243242" :type sign_request_id: str + :param reason: An optional reason for cancelling the sign request., defaults to None + :type reason: Optional[str], optional :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None :type extra_headers: Optional[Dict[str, Optional[str]]], optional """ if extra_headers is None: extra_headers = {} + request_body: Dict = {'reason': reason} headers_map: Dict[str, str] = prepare_params({**extra_headers}) response: FetchResponse = self.network_session.network_client.fetch( FetchOptions( @@ -102,6 +108,8 @@ def cancel_sign_request( ), method='POST', headers=headers_map, + data=serialize(request_body) if not request_body == None else None, + content_type='application/json', response_format=ResponseFormat.JSON, auth=self.auth, network_session=self.network_session, diff --git a/box_sdk_gen/schemas/__init__.py b/box_sdk_gen/schemas/__init__.py index 023aac177..a4132c26b 100644 --- a/box_sdk_gen/schemas/__init__.py +++ b/box_sdk_gen/schemas/__init__.py @@ -274,6 +274,8 @@ from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_mini import * +from box_sdk_gen.schemas.sign_request_cancel_request import * + from box_sdk_gen.schemas.sign_request_create_signer import * from box_sdk_gen.schemas.sign_request_prefill_tag import * diff --git a/box_sdk_gen/schemas/ai_extract_structured_response.py b/box_sdk_gen/schemas/ai_extract_structured_response.py index 5c5e7dc05..d583e50b7 100644 --- a/box_sdk_gen/schemas/ai_extract_structured_response.py +++ b/box_sdk_gen/schemas/ai_extract_structured_response.py @@ -27,7 +27,7 @@ def __init__( :type created_at: DateTime :param completion_reason: The reason the response finishes., defaults to None :type completion_reason: Optional[str], optional - :param confidence_score: The confidence score numeric values for each extracted field as a JSON dictionary. This can be empty if no field could be extracted., defaults to None + :param confidence_score: The confidence score levels and numeric values for each extracted field as a JSON dictionary. This can be empty if no field could be extracted., defaults to None :type confidence_score: Optional[Dict], optional """ super().__init__(**kwargs) diff --git a/box_sdk_gen/schemas/sign_request_cancel_request.py b/box_sdk_gen/schemas/sign_request_cancel_request.py new file mode 100644 index 000000000..f7de1a575 --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_cancel_request.py @@ -0,0 +1,15 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class SignRequestCancelRequest(BaseObject): + def __init__(self, *, reason: Optional[str] = None, **kwargs): + """ + :param reason: An optional reason for cancelling the sign request., defaults to None + :type reason: Optional[str], optional + """ + super().__init__(**kwargs) + self.reason = reason diff --git a/box_sdk_gen/schemas/sign_request_create_signer.py b/box_sdk_gen/schemas/sign_request_create_signer.py index ed62e5cb1..4c5563488 100644 --- a/box_sdk_gen/schemas/sign_request_create_signer.py +++ b/box_sdk_gen/schemas/sign_request_create_signer.py @@ -29,6 +29,7 @@ def __init__( password: Optional[str] = None, signer_group_id: Optional[str] = None, suppress_notifications: Optional[bool] = None, + language: Optional[str] = None, **kwargs ): """ @@ -82,6 +83,9 @@ def __init__( :type signer_group_id: Optional[str], optional :param suppress_notifications: If true, no emails about the sign request will be sent., defaults to None :type suppress_notifications: Optional[bool], optional + :param language: The language of the user, formatted in modified version of the + [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None + :type language: Optional[str], optional """ super().__init__(**kwargs) self.email = email @@ -96,3 +100,4 @@ def __init__( self.password = password self.signer_group_id = signer_group_id self.suppress_notifications = suppress_notifications + self.language = language diff --git a/box_sdk_gen/schemas/sign_request_signer.py b/box_sdk_gen/schemas/sign_request_signer.py index 21e927bf9..35b708261 100644 --- a/box_sdk_gen/schemas/sign_request_signer.py +++ b/box_sdk_gen/schemas/sign_request_signer.py @@ -75,6 +75,7 @@ def __init__( password: Optional[str] = None, signer_group_id: Optional[str] = None, suppress_notifications: Optional[bool] = None, + language: Optional[str] = None, **kwargs ): """ @@ -143,6 +144,9 @@ def __init__( :type signer_group_id: Optional[str], optional :param suppress_notifications: If true, no emails about the sign request will be sent., defaults to None :type suppress_notifications: Optional[bool], optional + :param language: The language of the user, formatted in modified version of the + [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None + :type language: Optional[str], optional """ super().__init__( email=email, @@ -157,6 +161,7 @@ def __init__( password=password, signer_group_id=signer_group_id, suppress_notifications=suppress_notifications, + language=language, **kwargs ) self.has_viewed_document = has_viewed_document diff --git a/docs/box_sdk_gen/folders.md b/docs/box_sdk_gen/folders.md index 3bf0067bc..d5aca9125 100644 --- a/docs/box_sdk_gen/folders.md +++ b/docs/box_sdk_gen/folders.md @@ -42,7 +42,7 @@ client.folders.get_folder_by_id('0') - direction `Optional[GetFolderByIdDirection]` - The direction to sort results in. This can be either in alphabetical ascending (`ASC`) or descending (`DESC`) order. - offset `Optional[int]` - - The offset of the item at which to begin the response. Queries with offset parameter value exceeding 10000 will be rejected with a 400 response. + - The offset of the item at which to begin the response. Offset-based pagination is not guaranteed to work reliably for high offset values and may fail for large datasets. In those cases, reduce the number of items in the folder (for example, by restructuring the folder into smaller subfolders) before retrying the request. - limit `Optional[int]` - The maximum number of items to return per page. - if_none_match `Optional[str]` @@ -193,7 +193,7 @@ client.folders.get_folder_items(folder_origin.id) - marker `Optional[str]` - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. - offset `Optional[int]` - - The offset of the item at which to begin the response. Queries with offset parameter value exceeding 10000 will be rejected with a 400 response. + - The offset of the item at which to begin the response. Offset-based pagination is not guaranteed to work reliably for high offset values and may fail for large datasets. In those cases, use marker-based pagination by setting `usemarker` to `true`. - limit `Optional[int]` - The maximum number of items to return per page. - sort `Optional[GetFolderItemsSort]` diff --git a/docs/box_sdk_gen/sign_requests.md b/docs/box_sdk_gen/sign_requests.md index bd51bb19c..121d1f93d 100644 --- a/docs/box_sdk_gen/sign_requests.md +++ b/docs/box_sdk_gen/sign_requests.md @@ -25,6 +25,8 @@ client.sign_requests.cancel_sign_request(created_sign_request.id) - sign_request_id `str` - The ID of the signature request. Example: "33243242" +- reason `Optional[str]` + - An optional reason for cancelling the sign request. - extra_headers `Optional[Dict[str, Optional[str]]]` - Extra headers that will be included in the HTTP request.