Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "b98d1dc", "specHash": "cf21406", "version": "4.0.0" }
{ "engineHash": "4421f42", "specHash": "1715587", "version": "4.0.0" }
8 changes: 5 additions & 3 deletions box_sdk_gen/managers/enterprise_configurations.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion box_sdk_gen/networking/retries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 0 additions & 2 deletions box_sdk_gen/schemas/v2025_r0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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 (
Expand Down Expand Up @@ -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
):
Expand All @@ -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
"""
Expand Down
4 changes: 2 additions & 2 deletions docs/box_sdk_gen/enterprise_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]]]`
Expand Down