Skip to content

Commit 0fa2fa3

Browse files
feat: Honor managed auth browser regions
Stainless-Generated-From: 8b6a7fa50a5a17f5627f4278907725ea8d3993b5
1 parent 39ffff8 commit 0fa2fa3

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

src/kernel/types/auth/managed_auth_browser_config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import Optional
4+
from typing_extensions import Literal
45

56
from ..._models import BaseModel
67
from ..browser_proxy_config import BrowserProxyConfig
@@ -108,6 +109,14 @@ class ManagedAuthBrowserConfig(BaseModel):
108109
preserve or inherit the connection default.
109110
"""
110111

112+
region: Optional[Literal["us-east", "eu-west", "ap-southeast"]] = None
113+
"""Browser region.
114+
115+
Omit on create to use us-east, on update to keep the current region, or on login
116+
to inherit it. Login overrides apply only to that login. Non-default regions
117+
require an eligible plan and organization access.
118+
"""
119+
111120
stealth: Optional[bool] = None
112121
"""Whether managed auth browser sessions use stealth mode.
113122

src/kernel/types/auth/managed_auth_browser_config_param.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Optional
6-
from typing_extensions import TypedDict
6+
from typing_extensions import Literal, TypedDict
77

88
from ..browser_proxy_config_param import BrowserProxyConfigParam
99
from ..browsers.browser_telemetry_categories_config_param import BrowserTelemetryCategoriesConfigParam
@@ -110,6 +110,14 @@ class ManagedAuthBrowserConfigParam(TypedDict, total=False):
110110
preserve or inherit the connection default.
111111
"""
112112

113+
region: Literal["us-east", "eu-west", "ap-southeast"]
114+
"""Browser region.
115+
116+
Omit on create to use us-east, on update to keep the current region, or on login
117+
to inherit it. Login overrides apply only to that login. Non-default regions
118+
require an eligible plan and organization access.
119+
"""
120+
113121
stealth: bool
114122
"""Whether managed auth browser sessions use stealth mode.
115123

tests/api_resources/auth/test_connections.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def test_method_create_with_all_params(self, client: Kernel) -> None:
4646
"mode": "direct",
4747
"name": "x",
4848
},
49+
"region": "us-east",
4950
"stealth": False,
5051
"telemetry": {
5152
"browser": {
@@ -211,6 +212,7 @@ def test_method_update_with_all_params(self, client: Kernel) -> None:
211212
"mode": "direct",
212213
"name": "x",
213214
},
215+
"region": "us-east",
214216
"stealth": False,
215217
"telemetry": {
216218
"browser": {
@@ -461,6 +463,7 @@ def test_method_login_with_all_params(self, client: Kernel) -> None:
461463
"mode": "direct",
462464
"name": "x",
463465
},
466+
"region": "us-east",
464467
"stealth": False,
465468
"telemetry": {
466469
"browser": {
@@ -705,6 +708,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) ->
705708
"mode": "direct",
706709
"name": "x",
707710
},
711+
"region": "us-east",
708712
"stealth": False,
709713
"telemetry": {
710714
"browser": {
@@ -870,6 +874,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) ->
870874
"mode": "direct",
871875
"name": "x",
872876
},
877+
"region": "us-east",
873878
"stealth": False,
874879
"telemetry": {
875880
"browser": {
@@ -1120,6 +1125,7 @@ async def test_method_login_with_all_params(self, async_client: AsyncKernel) ->
11201125
"mode": "direct",
11211126
"name": "x",
11221127
},
1128+
"region": "us-east",
11231129
"stealth": False,
11241130
"telemetry": {
11251131
"browser": {

0 commit comments

Comments
 (0)