From 0909f8de4e4061604a717988fbf559ccc9e95905 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 12 Nov 2026 06:12:35 -0800 Subject: [PATCH 1/2] 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 93448bd2..bc3614b6 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "0068c55", "specHash": "33e4656", "version": "4.20.0" } +{ "engineHash": "a327523", "specHash": "33e4656", "version": "4.20.0" } From 56c983b1e2b4fc41afc642f09e13bde115d314ad Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 12 Nov 2026 08:13:03 -0800 Subject: [PATCH 2/2] feat: support auto roll-in for invite creation (box/box-openapi#627) --- .codegen.json | 2 +- box_sdk_gen/managers/invites.py | 35 ++++++++++++++++++++++++++++----- box_sdk_gen/schemas/invite.py | 35 ++++++++++++++++++++++----------- docs/box_sdk_gen/invites.md | 16 +++++++++++---- 4 files changed, 66 insertions(+), 22 deletions(-) diff --git a/.codegen.json b/.codegen.json index bc3614b6..3756ad0f 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "a327523", "specHash": "33e4656", "version": "4.20.0" } +{ "engineHash": "a327523", "specHash": "0451786", "version": "4.20.0" } diff --git a/box_sdk_gen/managers/invites.py b/box_sdk_gen/managers/invites.py index 8ef30832..83765518 100644 --- a/box_sdk_gen/managers/invites.py +++ b/box_sdk_gen/managers/invites.py @@ -76,22 +76,38 @@ def create_invite( enterprise: CreateInviteEnterprise, actionable_by: CreateInviteActionableBy, *, + is_auto_roll_in_enabled: Optional[bool] = None, fields: Optional[List[str]] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> Invite: """ Invites an existing external user to join an enterprise. - The existing user can not be part of another enterprise and + The user must already have a Box account and cannot be - must already have a Box account. Once invited, the user will receive an + part of another enterprise. Once invited, the user receives - email and are prompted to accept the invitation within the + an email and is prompted to accept the invitation in - Box web application. + the Box web application. + + + If `is_auto_roll_in_enabled` is set to `true`, the user does not have to + + + accept the invitation and is added to the enterprise automatically after + + + 14 days. Only unmanaged users can be invited this way. An unmanaged user + + + is a free user whose email domain matches one of the enterprise's + + + domains. Availability depends on the enterprise's plan. This method requires the "Manage An Enterprise" scope enabled for @@ -103,6 +119,11 @@ def create_invite( :type enterprise: CreateInviteEnterprise :param actionable_by: The user to invite. :type actionable_by: CreateInviteActionableBy + :param is_auto_roll_in_enabled: If set to `true`, the user is added to the enterprise + automatically after 14 days instead of having to accept the + invite. Only unmanaged users can be invited this way. + Availability depends on the enterprise's plan., defaults to None + :type is_auto_roll_in_enabled: Optional[bool], optional :param fields: 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. @@ -118,7 +139,11 @@ def create_invite( """ if extra_headers is None: extra_headers = {} - request_body: Dict = {'enterprise': enterprise, 'actionable_by': actionable_by} + request_body: Dict = { + 'enterprise': enterprise, + 'actionable_by': actionable_by, + 'is_auto_roll_in_enabled': is_auto_roll_in_enabled, + } query_params_map: Dict[str, str] = prepare_params({'fields': to_string(fields)}) headers_map: Dict[str, str] = prepare_params({**extra_headers}) response: FetchResponse = self.network_session.network_client.fetch( diff --git a/box_sdk_gen/schemas/invite.py b/box_sdk_gen/schemas/invite.py index 28487d98..32a91842 100644 --- a/box_sdk_gen/schemas/invite.py +++ b/box_sdk_gen/schemas/invite.py @@ -58,21 +58,30 @@ def __init__( status: Optional[str] = None, created_at: Optional[DateTime] = None, modified_at: Optional[DateTime] = None, + auto_roll_in_at: Optional[DateTime] = None, + is_auto_roll_in: Optional[bool] = None, **kwargs ): """ - :param id: The unique identifier for this invite. - :type id: str - :param type: The value will always be `invite`., defaults to InviteTypeField.INVITE - :type type: InviteTypeField, optional - :param invited_to: A representation of a Box enterprise., defaults to None - :type invited_to: Optional[InviteInvitedToField], optional - :param status: The status of the invite., defaults to None - :type status: Optional[str], optional - :param created_at: When the invite was created., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the invite was modified., defaults to None - :type modified_at: Optional[DateTime], optional + :param id: The unique identifier for this invite. + :type id: str + :param type: The value will always be `invite`., defaults to InviteTypeField.INVITE + :type type: InviteTypeField, optional + :param invited_to: A representation of a Box enterprise., defaults to None + :type invited_to: Optional[InviteInvitedToField], optional + :param status: The status of the invite., defaults to None + :type status: Optional[str], optional + :param created_at: When the invite was created., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the invite was modified., defaults to None + :type modified_at: Optional[DateTime], optional + :param auto_roll_in_at: The date and time when the user is added to the enterprise + automatically, or `null` if the user has to accept the invite., defaults to None + :type auto_roll_in_at: Optional[DateTime], optional + :param is_auto_roll_in: Whether the user is added to the enterprise automatically, without + having to accept the invite. When `true`, `auto_roll_in_at` contains + the date and time of the roll-in., defaults to None + :type is_auto_roll_in: Optional[bool], optional """ super().__init__(**kwargs) self.id = id @@ -83,3 +92,5 @@ def __init__( self.status = status self.created_at = created_at self.modified_at = modified_at + self.auto_roll_in_at = auto_roll_in_at + self.is_auto_roll_in = is_auto_roll_in diff --git a/docs/box_sdk_gen/invites.md b/docs/box_sdk_gen/invites.md index 3da63a63..19986f2e 100644 --- a/docs/box_sdk_gen/invites.md +++ b/docs/box_sdk_gen/invites.md @@ -7,10 +7,16 @@ Invites an existing external user to join an enterprise. -The existing user can not be part of another enterprise and -must already have a Box account. Once invited, the user will receive an -email and are prompted to accept the invitation within the -Box web application. +The user must already have a Box account and cannot be +part of another enterprise. Once invited, the user receives +an email and is prompted to accept the invitation in +the Box web application. + +If `is_auto_roll_in_enabled` is set to `true`, the user does not have to +accept the invitation and is added to the enterprise automatically after +14 days. Only unmanaged users can be invited this way. An unmanaged user +is a free user whose email domain matches one of the enterprise's +domains. Availability depends on the enterprise's plan. This method requires the "Manage An Enterprise" scope enabled for the application, which can be enabled within the developer console. @@ -32,6 +38,8 @@ client.invites.create_invite(CreateInviteEnterprise(id=current_user.enterprise.i - The enterprise to invite the user to. - actionable_by `CreateInviteActionableBy` - The user to invite. +- is_auto_roll_in_enabled `Optional[bool]` + - If set to `true`, the user is added to the enterprise automatically after 14 days instead of having to accept the invite. Only unmanaged users can be invited this way. Availability depends on the enterprise's plan. - fields `Optional[List[str]]` - 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. - extra_headers `Optional[Dict[str, Optional[str]]]`