Skip to content

Commit 657da45

Browse files
feat: Neil/kernel 1029 past session search
1 parent 6a629ee commit 657da45

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 101
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-fc4a441d80d9a26574ef8af390a0c76265f5d4190daf90a04b6b353b128bbd97.yml
3-
openapi_spec_hash: 192987649d3797c3a80e6ef201667b64
4-
config_hash: 8af430e19f4af86c05f2987241cae72f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-9462b3d8f055f8bda06da65583f5aa09a17d35254c5983796d8e84ebb3c62c47.yml
3+
openapi_spec_hash: 1914dd35b8e0e5a21ccec91eac2a616d
4+
config_hash: c6b88eea9a15840f26130eb8ed3b42a0

src/kernel/resources/browsers/browsers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def list(
329329
include_deleted: bool | Omit = omit,
330330
limit: int | Omit = omit,
331331
offset: int | Omit = omit,
332+
query: str | Omit = omit,
332333
status: Literal["active", "deleted", "all"] | Omit = omit,
333334
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
334335
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -350,6 +351,8 @@ def list(
350351
351352
offset: Number of results to skip. Defaults to 0.
352353
354+
query: Search browsers by session ID, profile ID, or proxy ID.
355+
353356
status: Filter sessions by status. "active" returns only active sessions (default),
354357
"deleted" returns only soft-deleted sessions, "all" returns both.
355358
@@ -374,6 +377,7 @@ def list(
374377
"include_deleted": include_deleted,
375378
"limit": limit,
376379
"offset": offset,
380+
"query": query,
377381
"status": status,
378382
},
379383
browser_list_params.BrowserListParams,
@@ -745,6 +749,7 @@ def list(
745749
include_deleted: bool | Omit = omit,
746750
limit: int | Omit = omit,
747751
offset: int | Omit = omit,
752+
query: str | Omit = omit,
748753
status: Literal["active", "deleted", "all"] | Omit = omit,
749754
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
750755
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -766,6 +771,8 @@ def list(
766771
767772
offset: Number of results to skip. Defaults to 0.
768773
774+
query: Search browsers by session ID, profile ID, or proxy ID.
775+
769776
status: Filter sessions by status. "active" returns only active sessions (default),
770777
"deleted" returns only soft-deleted sessions, "all" returns both.
771778
@@ -790,6 +797,7 @@ def list(
790797
"include_deleted": include_deleted,
791798
"limit": limit,
792799
"offset": offset,
800+
"query": query,
793801
"status": status,
794802
},
795803
browser_list_params.BrowserListParams,

src/kernel/types/browser_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class BrowserListParams(TypedDict, total=False):
2121
offset: int
2222
"""Number of results to skip. Defaults to 0."""
2323

24+
query: str
25+
"""Search browsers by session ID, profile ID, or proxy ID."""
26+
2427
status: Literal["active", "deleted", "all"]
2528
"""Filter sessions by status.
2629

tests/api_resources/test_browsers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def test_method_list_with_all_params(self, client: Kernel) -> None:
209209
include_deleted=True,
210210
limit=1,
211211
offset=0,
212+
query="query",
212213
status="active",
213214
)
214215
assert_matches_type(SyncOffsetPagination[BrowserListResponse], browser, path=["response"])
@@ -571,6 +572,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> N
571572
include_deleted=True,
572573
limit=1,
573574
offset=0,
575+
query="query",
574576
status="active",
575577
)
576578
assert_matches_type(AsyncOffsetPagination[BrowserListResponse], browser, path=["response"])

0 commit comments

Comments
 (0)