Skip to content

Commit b341bdb

Browse files
feat(api): api update
1 parent 3af093a commit b341bdb

5 files changed

Lines changed: 20 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 39
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-4b22ad455f8bb416a7cd29beefa7d45a3de48382232ba24503867bb6c56da90f.yml
3-
openapi_spec_hash: 98fd3141a41b0270cb651858bc202e78
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-f51ce05f6128dcdd6b500492869910d3a43737c66d0bc13c3f2e67f42362605c.yml
3+
openapi_spec_hash: c573fb6f26d5fb14eaf92e0a107323ec
44
config_hash: dce4dea59023b0a00890fa654fbfffb4

src/steel/resources/sessions/sessions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def create(
8585
debug_config: session_create_params.DebugConfig | Omit = omit,
8686
device_config: session_create_params.DeviceConfig | Omit = omit,
8787
dimensions: session_create_params.Dimensions | Omit = omit,
88+
experimental_features: SequenceNotStr[str] | Omit = omit,
8889
extension_ids: SequenceNotStr[str] | Omit = omit,
8990
headless: bool | Omit = omit,
9091
is_selenium: bool | Omit = omit,
@@ -126,6 +127,8 @@ def create(
126127
127128
dimensions: Viewport and browser window dimensions for the session
128129
130+
experimental_features: Enable experimental features for the session.
131+
129132
extension_ids: Array of extension IDs to install in the session. Use ['all_ext'] to install all
130133
uploaded extensions.
131134
@@ -183,6 +186,7 @@ def create(
183186
"debug_config": debug_config,
184187
"device_config": device_config,
185188
"dimensions": dimensions,
189+
"experimental_features": experimental_features,
186190
"extension_ids": extension_ids,
187191
"headless": headless,
188192
"is_selenium": is_selenium,
@@ -888,6 +892,7 @@ async def create(
888892
debug_config: session_create_params.DebugConfig | Omit = omit,
889893
device_config: session_create_params.DeviceConfig | Omit = omit,
890894
dimensions: session_create_params.Dimensions | Omit = omit,
895+
experimental_features: SequenceNotStr[str] | Omit = omit,
891896
extension_ids: SequenceNotStr[str] | Omit = omit,
892897
headless: bool | Omit = omit,
893898
is_selenium: bool | Omit = omit,
@@ -929,6 +934,8 @@ async def create(
929934
930935
dimensions: Viewport and browser window dimensions for the session
931936
937+
experimental_features: Enable experimental features for the session.
938+
932939
extension_ids: Array of extension IDs to install in the session. Use ['all_ext'] to install all
933940
uploaded extensions.
934941
@@ -986,6 +993,7 @@ async def create(
986993
"debug_config": debug_config,
987994
"device_config": device_config,
988995
"dimensions": dimensions,
996+
"experimental_features": experimental_features,
989997
"extension_ids": extension_ids,
990998
"headless": headless,
991999
"is_selenium": is_selenium,

src/steel/types/session_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class SessionCreateParams(TypedDict, total=False):
5858
dimensions: Dimensions
5959
"""Viewport and browser window dimensions for the session"""
6060

61+
experimental_features: Annotated[SequenceNotStr[str], PropertyInfo(alias="experimentalFeatures")]
62+
"""Enable experimental features for the session."""
63+
6164
extension_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="extensionIds")]
6265
"""Array of extension IDs to install in the session.
6366

src/steel/types/sessionslist.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,8 @@ class Sessionslist(BaseModel):
177177
sessions: List[Session]
178178
"""List of browser sessions"""
179179

180-
total_count: int = FieldInfo(alias="totalCount")
181-
"""Total number of sessions matching the query"""
180+
total_count: Optional[int] = FieldInfo(alias="totalCount", default=None)
181+
"""Total number of sessions matching the query.
182+
183+
Only included for filtered queries (e.g. status=live).
184+
"""

tests/api_resources/test_sessions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def test_method_create_with_all_params(self, client: Steel) -> None:
5252
"height": -9007199254740991,
5353
"width": -9007199254740991,
5454
},
55+
experimental_features=["string"],
5556
extension_ids=["string"],
5657
headless=True,
5758
is_selenium=True,
@@ -923,6 +924,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncSteel) ->
923924
"height": -9007199254740991,
924925
"width": -9007199254740991,
925926
},
927+
experimental_features=["string"],
926928
extension_ids=["string"],
927929
headless=True,
928930
is_selenium=True,

0 commit comments

Comments
 (0)