diff --git a/.codegen.json b/.codegen.json index 150862d2..7ef7e419 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "b98d1dc", "specHash": "cf21406", "version": "4.0.0" } +{ "engineHash": "4421f42", "specHash": "1715587", "version": "4.0.0" } diff --git a/box_sdk_gen/managers/enterprise_configurations.py b/box_sdk_gen/managers/enterprise_configurations.py index 56c09e02..9fccb461 100644 --- a/box_sdk_gen/managers/enterprise_configurations.py +++ b/box_sdk_gen/managers/enterprise_configurations.py @@ -1,5 +1,7 @@ from typing import Optional +from typing import List + from typing import Dict from box_sdk_gen.internal.utils import to_string @@ -54,7 +56,7 @@ def __init__( def get_enterprise_configuration_by_id_v2025_r0( self, enterprise_id: str, - categories: str, + categories: List[str], *, box_version: BoxVersionHeaderV2025R0 = BoxVersionHeaderV2025R0._2025_0, extra_headers: Optional[Dict[str, Optional[str]]] = None @@ -64,9 +66,9 @@ def get_enterprise_configuration_by_id_v2025_r0( :param enterprise_id: The ID of the enterprise. Example: "3442311" :type enterprise_id: str - :param categories: The comma-delimited list of the enterprise configuration categories. + :param categories: A comma-separated list of the enterprise configuration categories. Allowed values: `security`, `content_and_sharing`, `user_settings`, `shield`. - :type categories: str + :type categories: List[str] :param box_version: Version header., defaults to BoxVersionHeaderV2025R0._2025_0 :type box_version: BoxVersionHeaderV2025R0, optional :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None diff --git a/box_sdk_gen/networking/retries.py b/box_sdk_gen/networking/retries.py index 4d9c6c25..82772f71 100644 --- a/box_sdk_gen/networking/retries.py +++ b/box_sdk_gen/networking/retries.py @@ -59,7 +59,11 @@ def should_retry( is_successful: bool = ( fetch_response.status >= 200 and fetch_response.status < 400 ) - retry_after_header: Optional[str] = fetch_response.headers.get('Retry-After') + retry_after_header: Optional[str] = ( + fetch_response.headers.get('Retry-After') + if 'Retry-After' in fetch_response.headers + else None + ) is_accepted_with_retry_after: bool = ( fetch_response.status == 202 and not retry_after_header == None ) diff --git a/box_sdk_gen/schemas/v2025_r0/__init__.py b/box_sdk_gen/schemas/v2025_r0/__init__.py index ed524c99..64d7b89b 100644 --- a/box_sdk_gen/schemas/v2025_r0/__init__.py +++ b/box_sdk_gen/schemas/v2025_r0/__init__.py @@ -6,8 +6,6 @@ from box_sdk_gen.schemas.v2025_r0.collaboration_permissions_v2025_r0 import * -from box_sdk_gen.schemas.v2025_r0.collaboration_restriction_v2025_r0 import * - from box_sdk_gen.schemas.v2025_r0.custom_session_duration_group_item_v2025_r0 import * from box_sdk_gen.schemas.v2025_r0.doc_gen_batch_base_v2025_r0 import * diff --git a/box_sdk_gen/schemas/v2025_r0/enterprise_configuration_content_and_sharing_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/enterprise_configuration_content_and_sharing_v2025_r0.py index 0fe0cfaa..06ae2a64 100644 --- a/box_sdk_gen/schemas/v2025_r0/enterprise_configuration_content_and_sharing_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/enterprise_configuration_content_and_sharing_v2025_r0.py @@ -2,8 +2,6 @@ from typing import List -from enum import Enum - from box_sdk_gen.internal.base_object import BaseObject from box_sdk_gen.schemas.v2025_r0.enterprise_feature_settings_item_v2025_r0 import ( @@ -30,10 +28,6 @@ CollaborationPermissionsV2025R0, ) -from box_sdk_gen.schemas.v2025_r0.collaboration_restriction_v2025_r0 import ( - CollaborationRestrictionV2025R0, -) - from box_sdk_gen.schemas.v2025_r0.list_user_v2025_r0 import ListUserV2025R0 from box_sdk_gen.schemas.v2025_r0.enterprise_configuration_item_integer_v2025_r0 import ( @@ -85,7 +79,7 @@ class EnterpriseConfigurationContentAndSharingV2025R0CollaborationRestrictionsFi def __init__( self, *, - value: Optional[List[CollaborationRestrictionV2025R0]] = None, + value: Optional[List[str]] = None, is_used: Optional[bool] = None, **kwargs ): @@ -97,30 +91,15 @@ def __init__( self.value = value -class EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusFieldValueField( - str, Enum -): - ENABLE_EXTERNAL_COLLABORATION = 'enable_external_collaboration' - LIMIT_COLLABORATION_TO_ALLOWLISTED_DOMAINS = ( - 'limit_collaboration_to_allowlisted_domains' - ) - - class EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusField( EnterpriseConfigurationItemV2025R0 ): def __init__( - self, - *, - value: Optional[ - EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusFieldValueField - ] = None, - is_used: Optional[bool] = None, - **kwargs + self, *, value: Optional[str] = None, is_used: Optional[bool] = None, **kwargs ): """ :param value: The external collaboration status., defaults to None - :type value: Optional[EnterpriseConfigurationContentAndSharingV2025R0ExternalCollaborationStatusFieldValueField], optional + :type value: Optional[str], optional :param is_used: Indicates whether a configuration is used for a given enterprise., defaults to None :type is_used: Optional[bool], optional """ diff --git a/docs/box_sdk_gen/enterprise_configurations.md b/docs/box_sdk_gen/enterprise_configurations.md index 39c32159..751ae4d0 100644 --- a/docs/box_sdk_gen/enterprise_configurations.md +++ b/docs/box_sdk_gen/enterprise_configurations.md @@ -17,8 +17,8 @@ _Currently we don't have an example for calling `get_enterprise_configuration_by - enterprise_id `str` - The ID of the enterprise. Example: "3442311" -- categories `str` - - The comma-delimited list of the enterprise configuration categories. Allowed values: `security`, `content_and_sharing`, `user_settings`, `shield`. +- categories `List[str]` + - A comma-separated list of the enterprise configuration categories. Allowed values: `security`, `content_and_sharing`, `user_settings`, `shield`. - box_version `BoxVersionHeaderV2025R0` - Version header. - extra_headers `Optional[Dict[str, Optional[str]]]`