From 33e0f3b3c12d947386da5723fca43a87ef9934cf Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 18 Nov 2026 09:05:40 -0800 Subject: [PATCH 1/3] docs: publish ai_session docs (AGNTPLAT-3186) (box/box-openapi#630) --- .codegen.json | 2 +- box_sdk_gen/client.py | 5 + box_sdk_gen/managers/__init__.py | 2 + box_sdk_gen/managers/ai_sessions.py | 222 ++++++++++++++++++ box_sdk_gen/managers/sign_requests.py | 2 +- box_sdk_gen/schemas/sign_request.py | 2 +- box_sdk_gen/schemas/sign_request_base.py | 2 +- .../schemas/sign_request_create_request.py | 2 +- box_sdk_gen/schemas/v2026_r0/__init__.py | 4 + .../schemas/v2026_r0/ai_session_v2026_r0.py | 72 ++++++ .../schemas/v2026_r0/ai_sessions_v2026_r0.py | 34 +++ docs/README.md | 1 + docs/ai_sessions.md | 82 +++++++ docs/sign_requests.md | 2 +- 14 files changed, 428 insertions(+), 6 deletions(-) create mode 100644 box_sdk_gen/managers/ai_sessions.py create mode 100644 box_sdk_gen/schemas/v2026_r0/ai_session_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/ai_sessions_v2026_r0.py create mode 100644 docs/ai_sessions.md diff --git a/.codegen.json b/.codegen.json index 78cb2640..02be90dd 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "0d1694f", "specHash": "7f8494a", "version": "10.19.0" } +{ "engineHash": "0d1694f", "specHash": "7cec401", "version": "10.19.0" } diff --git a/box_sdk_gen/client.py b/box_sdk_gen/client.py index 8bd2a0dc..038a7cbb 100644 --- a/box_sdk_gen/client.py +++ b/box_sdk_gen/client.py @@ -204,6 +204,8 @@ from box_sdk_gen.managers.shuttle import ShuttleManager +from box_sdk_gen.managers.ai_sessions import AiSessionsManager + from box_sdk_gen.networking.auth import Authentication from box_sdk_gen.networking.network import NetworkSession @@ -489,6 +491,9 @@ def __init__( self.shuttle = ShuttleManager( auth=self.auth, network_session=self.network_session ) + self.ai_sessions = AiSessionsManager( + auth=self.auth, network_session=self.network_session + ) def make_request(self, fetch_options: FetchOptions) -> FetchResponse: """ diff --git a/box_sdk_gen/managers/__init__.py b/box_sdk_gen/managers/__init__.py index ceffc281..0e513db0 100644 --- a/box_sdk_gen/managers/__init__.py +++ b/box_sdk_gen/managers/__init__.py @@ -173,3 +173,5 @@ from box_sdk_gen.managers.query import * from box_sdk_gen.managers.shuttle import * + +from box_sdk_gen.managers.ai_sessions import * diff --git a/box_sdk_gen/managers/ai_sessions.py b/box_sdk_gen/managers/ai_sessions.py new file mode 100644 index 00000000..4e16d702 --- /dev/null +++ b/box_sdk_gen/managers/ai_sessions.py @@ -0,0 +1,222 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from typing import Dict + +from box_sdk_gen.internal.utils import to_string + +from box_sdk_gen.serialization.json import deserialize + +from box_sdk_gen.networking.fetch_options import ResponseFormat + +from box_sdk_gen.schemas.v2026_r0.ai_sessions_v2026_r0 import AiSessionsV2026R0 + +from box_sdk_gen.schemas.v2026_r0.client_error_v2026_r0 import ClientErrorV2026R0 + +from box_sdk_gen.parameters.v2026_r0.box_version_header_v2026_r0 import ( + BoxVersionHeaderV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.networking.auth import Authentication + +from box_sdk_gen.networking.network import NetworkSession + +from box_sdk_gen.networking.fetch_options import FetchOptions + +from box_sdk_gen.networking.fetch_response import FetchResponse + +from box_sdk_gen.internal.utils import prepare_params + +from box_sdk_gen.internal.utils import to_string + +from box_sdk_gen.internal.utils import ByteStream + +from box_sdk_gen.serialization.json import sd_to_json + +from box_sdk_gen.serialization.json import SerializedData + + +class GetAiSessionsV2026R0Source(str, Enum): + API = 'api' + + +class GetAiSessionsV2026R0Sort(str, Enum): + CREATED_AT = 'created_at' + UPDATED_AT = 'updated_at' + NAME = 'name' + + +class GetAiSessionsV2026R0Direction(str, Enum): + ASC = 'asc' + DESC = 'desc' + + +class AiSessionsManager: + def __init__( + self, + *, + auth: Optional[Authentication] = None, + network_session: Optional[NetworkSession] = None + ): + if network_session is None: + network_session = NetworkSession() + self.auth = auth + self.network_session = network_session + + def get_ai_sessions_v2026_r0( + self, + source: GetAiSessionsV2026R0Source, + *, + marker: Optional[str] = None, + sort: Optional[GetAiSessionsV2026R0Sort] = None, + direction: Optional[GetAiSessionsV2026R0Direction] = None, + limit: Optional[int] = None, + client_ids: Optional[List[str]] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> AiSessionsV2026R0: + """ + Returns a marker-paginated list of the AI sessions that the authenticated + + user can read and that were created through the Box public API. Entries are + + + ordered by `sort` and `direction`, defaulting to `updated_at` descending so + + + the most recently active session appears first. + + + The access token must have both the `ai.readwrite` and `root_readwrite` + + + scopes. + + + A page may contain fewer than `limit` entries while further pages remain. + + + Treat a non-null `next_marker` as the only signal that more results exist. + + :param source: Restricts the list to AI sessions with this origin. The only supported + value is `api`. + :type source: GetAiSessionsV2026R0Source + :param marker: The position marker at which to begin returning results, as returned in + `next_marker` by the previous page. Omit it for the first page. All other + parameters must match the request that returned the marker., defaults to None + :type marker: Optional[str], optional + :param sort: The field to sort results by. Possible values are `created_at`, + `updated_at`, and `name`. Default is `updated_at`, which advances on each + turn of session activity., defaults to None + :type sort: Optional[GetAiSessionsV2026R0Sort], optional + :param direction: The direction to sort results in, either ascending (`asc`) or + descending (`desc`). Default is `desc`., defaults to None + :type direction: Optional[GetAiSessionsV2026R0Direction], optional + :param limit: The maximum number of AI sessions to return per page. The maximum is + `100`; larger values are treated as `100`. The server may return fewer + entries than requested., defaults to None + :type limit: Optional[int], optional + :param client_ids: A comma-separated list of OAuth client IDs. Restricts the list to AI + sessions created by any of these applications. Client IDs that match no + application are ignored, so the response is an empty list if none of them + match. Empty entries are ignored, and an empty value is treated as if the + parameter were not provided., defaults to None + :type client_ids: Optional[List[str]], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, 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 = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'source': to_string(source), + 'marker': to_string(marker), + 'sort': to_string(sort), + 'direction': to_string(direction), + 'limit': to_string(limit), + 'client_ids': to_string(client_ids), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/ai_sessions'] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, AiSessionsV2026R0) + + def delete_ai_session_by_id_v2026_r0( + self, + ai_session_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Deletes an AI session created through the Box public API, together with its + + agent tasks. The session's agent-generated files and uploaded files are + + + moved to the trash. Files attached as sources from elsewhere in Box are not + + + affected. Deleting a session does not stop a running task or notify the + + + agent. + + + The access token must have both the `ai.readwrite` and `root_readwrite` + + + scopes. + + :param ai_session_id: The unique identifier of the AI session. This is the same value returned as + `id` by the list endpoint and used as the A2A `contextId`. + Example: "23489723" + :type ai_session_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, 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 = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/ai_sessions/', + to_string(ai_session_id), + ] + ), + method='DELETE', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None diff --git a/box_sdk_gen/managers/sign_requests.py b/box_sdk_gen/managers/sign_requests.py index a9bd8975..2eee70c8 100644 --- a/box_sdk_gen/managers/sign_requests.py +++ b/box_sdk_gen/managers/sign_requests.py @@ -299,7 +299,7 @@ def create_sign_request( :type are_text_signatures_enabled: Optional[bool], optional :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None :type email_subject: Union[Optional[str], NullValue], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None :type email_message: Union[Optional[str], NullValue], optional :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None :type are_reminders_enabled: Optional[bool], optional diff --git a/box_sdk_gen/schemas/sign_request.py b/box_sdk_gen/schemas/sign_request.py index 1cdf3503..c9a725ce 100644 --- a/box_sdk_gen/schemas/sign_request.py +++ b/box_sdk_gen/schemas/sign_request.py @@ -155,7 +155,7 @@ def __init__( :type are_text_signatures_enabled: Optional[bool], optional :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None :type email_subject: Optional[str], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None :type email_message: Optional[str], optional :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None :type are_reminders_enabled: Optional[bool], optional diff --git a/box_sdk_gen/schemas/sign_request_base.py b/box_sdk_gen/schemas/sign_request_base.py index abad716d..0c34d7e0 100644 --- a/box_sdk_gen/schemas/sign_request_base.py +++ b/box_sdk_gen/schemas/sign_request_base.py @@ -40,7 +40,7 @@ def __init__( :type are_text_signatures_enabled: Optional[bool], optional :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None :type email_subject: Optional[str], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None :type email_message: Optional[str], optional :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None :type are_reminders_enabled: Optional[bool], optional diff --git a/box_sdk_gen/schemas/sign_request_create_request.py b/box_sdk_gen/schemas/sign_request_create_request.py index a1d53a5c..8836ef61 100644 --- a/box_sdk_gen/schemas/sign_request_create_request.py +++ b/box_sdk_gen/schemas/sign_request_create_request.py @@ -71,7 +71,7 @@ def __init__( :type are_text_signatures_enabled: Optional[bool], optional :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None :type email_subject: Optional[str], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None :type email_message: Optional[str], optional :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None :type are_reminders_enabled: Optional[bool], optional diff --git a/box_sdk_gen/schemas/v2026_r0/__init__.py b/box_sdk_gen/schemas/v2026_r0/__init__.py index ae356c86..c5e3905f 100644 --- a/box_sdk_gen/schemas/v2026_r0/__init__.py +++ b/box_sdk_gen/schemas/v2026_r0/__init__.py @@ -191,3 +191,7 @@ from box_sdk_gen.schemas.v2026_r0.shuttle_run_v2026_r0 import * from box_sdk_gen.schemas.v2026_r0.shuttle_runs_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.ai_session_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.ai_sessions_v2026_r0 import * diff --git a/box_sdk_gen/schemas/v2026_r0/ai_session_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/ai_session_v2026_r0.py new file mode 100644 index 00000000..846a1dc9 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/ai_session_v2026_r0.py @@ -0,0 +1,72 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.user_base_v2026_r0 import UserBaseV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class AiSessionV2026R0TypeField(str, Enum): + AI_SESSION = 'ai_session' + + +class AiSessionV2026R0SourceField(str, Enum): + API = 'api' + + +class AiSessionV2026R0(BaseObject): + _discriminator = 'type', {'ai_session'} + + def __init__( + self, + id: str, + created_by: UserBaseV2026R0, + updated_by: UserBaseV2026R0, + created_at: DateTime, + updated_at: DateTime, + *, + type: AiSessionV2026R0TypeField = AiSessionV2026R0TypeField.AI_SESSION, + name: Optional[str] = None, + source: AiSessionV2026R0SourceField = AiSessionV2026R0SourceField.API, + client_id: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for the AI session. This is also the A2A + `contextId` for the conversation. Treat the value as opaque. + :type id: str + :param created_at: The date and time when the AI session was created. + :type created_at: DateTime + :param updated_at: The date and time when the AI session was last updated. It advances on + each turn of session activity, so it also serves as the most recently + used ordering. + :type updated_at: DateTime + :param type: The value is always `ai_session`., defaults to AiSessionV2026R0TypeField.AI_SESSION + :type type: AiSessionV2026R0TypeField, optional + :param name: The display name of the AI session. Sessions created through the A2A API + are named automatically. The value is `null` only when no name was + recorded., defaults to None + :type name: Optional[str], optional + :param source: The origin of the AI session. Currently always `api`. New values + may be added, so clients must tolerate values they do not recognize., defaults to AiSessionV2026R0SourceField.API + :type source: AiSessionV2026R0SourceField, optional + :param client_id: The OAuth client ID of the application that created the AI session, as + shown in the Developer Console. The value is `null` if the application is + not known., defaults to None + :type client_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.created_by = created_by + self.updated_by = updated_by + self.created_at = created_at + self.updated_at = updated_at + self.type = type + self.name = name + self.source = source + self.client_id = client_id diff --git a/box_sdk_gen/schemas/v2026_r0/ai_sessions_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/ai_sessions_v2026_r0.py new file mode 100644 index 00000000..f72457da --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/ai_sessions_v2026_r0.py @@ -0,0 +1,34 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.ai_session_v2026_r0 import AiSessionV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + + +class AiSessionsV2026R0(BaseObject): + def __init__( + self, + entries: List[AiSessionV2026R0], + limit: int, + *, + next_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of AI sessions. The list is empty when there are no results. + :type entries: List[AiSessionV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API. + :type limit: int + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker diff --git a/docs/README.md b/docs/README.md index 0a73477d..d6f26d26 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,6 +14,7 @@ General explanations of the available functionality and examples of how to use the SDK are available by topic: - [Ai](ai.md) +- [Ai sessions](ai_sessions.md) - [Ai studio](ai_studio.md) - [App item associations](app_item_associations.md) - [Archives](archives.md) diff --git a/docs/ai_sessions.md b/docs/ai_sessions.md new file mode 100644 index 00000000..41517d57 --- /dev/null +++ b/docs/ai_sessions.md @@ -0,0 +1,82 @@ +# AiSessionsManager + +- [List AI sessions](#list-ai-sessions) +- [Delete AI session](#delete-ai-session) + +## List AI sessions + +Returns a marker-paginated list of the AI sessions that the authenticated +user can read and that were created through the Box public API. Entries are +ordered by `sort` and `direction`, defaulting to `updated_at` descending so +the most recently active session appears first. + +The access token must have both the `ai.readwrite` and `root_readwrite` +scopes. + +A page may contain fewer than `limit` entries while further pages remain. +Treat a non-null `next_marker` as the only signal that more results exist. + +This operation is performed by calling function `get_ai_sessions_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-ai-sessions/). + +_Currently we don't have an example for calling `get_ai_sessions_v2026_r0` in integration tests_ + +### Arguments + +- source `GetAiSessionsV2026R0Source` + - Restricts the list to AI sessions with this origin. The only supported value is `api`. +- marker `Optional[str]` + - The position marker at which to begin returning results, as returned in `next_marker` by the previous page. Omit it for the first page. All other parameters must match the request that returned the marker. +- sort `Optional[GetAiSessionsV2026R0Sort]` + - The field to sort results by. Possible values are `created_at`, `updated_at`, and `name`. Default is `updated_at`, which advances on each turn of session activity. +- direction `Optional[GetAiSessionsV2026R0Direction]` + - The direction to sort results in, either ascending (`asc`) or descending (`desc`). Default is `desc`. +- limit `Optional[int]` + - The maximum number of AI sessions to return per page. The maximum is `100`; larger values are treated as `100`. The server may return fewer entries than requested. +- client_ids `Optional[List[str]]` + - A comma-separated list of OAuth client IDs. Restricts the list to AI sessions created by any of these applications. Client IDs that match no application are ignored, so the response is an empty list if none of them match. Empty entries are ignored, and an empty value is treated as if the parameter were not provided. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `AiSessionsV2026R0`. + +Returns a paginated list of AI sessions. + +## Delete AI session + +Deletes an AI session created through the Box public API, together with its +agent tasks. The session's agent-generated files and uploaded files are +moved to the trash. Files attached as sources from elsewhere in Box are not +affected. Deleting a session does not stop a running task or notify the +agent. + +The access token must have both the `ai.readwrite` and `root_readwrite` +scopes. + +This operation is performed by calling function `delete_ai_session_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-ai-sessions-id/). + +_Currently we don't have an example for calling `delete_ai_session_by_id_v2026_r0` in integration tests_ + +### Arguments + +- ai_session_id `str` + - The unique identifier of the AI session. This is the same value returned as `id` by the list endpoint and used as the A2A `contextId`. Example: "23489723" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +Returns an empty response when the AI session was successfully deleted. diff --git a/docs/sign_requests.md b/docs/sign_requests.md index cd248116..b98c8c12 100644 --- a/docs/sign_requests.md +++ b/docs/sign_requests.md @@ -192,7 +192,7 @@ client.sign_requests.create_sign_request( - email_subject `Optional[str]` - Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used. - email_message `Optional[str]` - - Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used. + - Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used. - are_reminders_enabled `Optional[bool]` - Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers. - name `Optional[str]` From 1eec51b16e1760d13bc475283537a77dae73c9c6 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 23 Nov 2026 03:05:14 -0800 Subject: [PATCH 2/3] docs: rename search deleted_user_ids to deleter_user_ids (box/box-openapi#631) --- .codegen.json | 2 +- box_sdk_gen/managers/search.py | 8 ++++---- box_sdk_gen/networking/version.py | 2 +- docs/search.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.codegen.json b/.codegen.json index 02be90dd..21d58429 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "0d1694f", "specHash": "7cec401", "version": "10.19.0" } +{ "engineHash": "0d1694f", "specHash": "58bd93b", "version": "10.19.0" } diff --git a/box_sdk_gen/managers/search.py b/box_sdk_gen/managers/search.py index c24c9ae8..bd650418 100644 --- a/box_sdk_gen/managers/search.py +++ b/box_sdk_gen/managers/search.py @@ -275,7 +275,7 @@ def search_for_content( include_recent_shared_links: Optional[bool] = None, fields: Optional[List[str]] = None, offset: Optional[int] = None, - deleted_user_ids: Optional[List[str]] = None, + deleter_user_ids: Optional[List[str]] = None, deleted_at_range: Optional[List[str]] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> SearchResultsResponse: @@ -489,7 +489,7 @@ def search_for_content( exceeding 10000 will be rejected with a 400 response., defaults to None :type offset: Optional[int], optional - :param deleted_user_ids: Limits the search results to items that were deleted by the given + :param deleter_user_ids: Limits the search results to items that were deleted by the given list of users, defined as a list of comma separated user IDs. The `trash_content` parameter needs to be set to `trashed_only`. @@ -503,7 +503,7 @@ def search_for_content( any of the users, an empty result set is returned. Data available from 2023-02-01 onwards., defaults to None - :type deleted_user_ids: Optional[List[str]], optional + :type deleter_user_ids: Optional[List[str]], optional :param deleted_at_range: Limits the search results to any items deleted within a given date range. @@ -548,7 +548,7 @@ def search_for_content( 'include_recent_shared_links': to_string(include_recent_shared_links), 'fields': to_string(fields), 'offset': to_string(offset), - 'deleted_user_ids': to_string(deleted_user_ids), + 'deleter_user_ids': to_string(deleter_user_ids), 'deleted_at_range': to_string(deleted_at_range), } ) diff --git a/box_sdk_gen/networking/version.py b/box_sdk_gen/networking/version.py index e044f774..9b4f21e7 100644 --- a/box_sdk_gen/networking/version.py +++ b/box_sdk_gen/networking/version.py @@ -1 +1 @@ -__version__ = '10.20.0' +__version__ = '10.19.0' diff --git a/docs/search.md b/docs/search.md index a199c2f1..9de8ef01 100644 --- a/docs/search.md +++ b/docs/search.md @@ -130,7 +130,7 @@ client.search.search_for_content( - 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. Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested. - 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. -- deleted_user_ids `Optional[List[str]]` +- deleter_user_ids `Optional[List[str]]` - Limits the search results to items that were deleted by the given list of users, defined as a list of comma separated user IDs. The `trash_content` parameter needs to be set to `trashed_only`. If searching in trash is not performed, an empty result set is returned. The items need to be owned or shared with the currently authenticated user for them to show up in the search results. If the user does not have access to any files owned by any of the users, an empty result set is returned. Data available from 2023-02-01 onwards. - deleted_at_range `Optional[List[str]]` - Limits the search results to any items deleted within a given date range. Date ranges are defined as comma separated RFC3339 timestamps. If the start date is omitted (`2014-05-17T13:35:01-07:00`), anything deleted before the end date will be returned. If the end date is omitted (`2014-05-15T13:35:01-07:00`), the current date will be used as the end date instead. The `trash_content` parameter needs to be set to `trashed_only`. If searching in trash is not performed, then an empty result is returned. Data available from 2023-02-01 onwards. From 59427cb54eab6845ec96ff3aa0cd30b42a68d3e6 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 24 Nov 2026 03:08:54 -0800 Subject: [PATCH 3/3] chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 21d58429..72f519d4 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "0d1694f", "specHash": "58bd93b", "version": "10.19.0" } +{ "engineHash": "a47eb7a", "specHash": "58bd93b", "version": "10.19.0" }