Skip to content

Commit 1c1b647

Browse files
feat(api): allow setting a custom name on a browser session at create time
1 parent 680e3bf commit 1c1b647

5 files changed

Lines changed: 41 additions & 3 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: 117
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-e6c711f0d29a7d956cc8ca621440da966c1f1575b1205d01328b1099edf1c517.yml
3-
openapi_spec_hash: c06e7e36de1c6f9b29b54a6e3dc08ee5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-e7925f5cb9626a47fd24470851ff4149c27bc89795f75e8641c618fff93a076c.yml
3+
openapi_spec_hash: 955d4bf81e9838b0732c0e52716a2030
44
config_hash: 36159c262d293fbeacf513ab600a1729

src/resources/browser-pools.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,11 @@ export interface BrowserPoolAcquireResponse {
355355
*/
356356
kiosk_mode?: boolean;
357357

358+
/**
359+
* Human-readable name of the browser session, if one was set at creation.
360+
*/
361+
name?: string;
362+
358363
/**
359364
* Browser pool this session was acquired from, if any.
360365
*/

src/resources/browsers/browsers.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ export interface BrowserCreateResponse {
389389
*/
390390
kiosk_mode?: boolean;
391391

392+
/**
393+
* Human-readable name of the browser session, if one was set at creation.
394+
*/
395+
name?: string;
396+
392397
/**
393398
* Browser pool this session was acquired from, if any.
394399
*/
@@ -510,6 +515,11 @@ export interface BrowserRetrieveResponse {
510515
*/
511516
kiosk_mode?: boolean;
512517

518+
/**
519+
* Human-readable name of the browser session, if one was set at creation.
520+
*/
521+
name?: string;
522+
513523
/**
514524
* Browser pool this session was acquired from, if any.
515525
*/
@@ -631,6 +641,11 @@ export interface BrowserUpdateResponse {
631641
*/
632642
kiosk_mode?: boolean;
633643

644+
/**
645+
* Human-readable name of the browser session, if one was set at creation.
646+
*/
647+
name?: string;
648+
634649
/**
635650
* Browser pool this session was acquired from, if any.
636651
*/
@@ -752,6 +767,11 @@ export interface BrowserListResponse {
752767
*/
753768
kiosk_mode?: boolean;
754769

770+
/**
771+
* Human-readable name of the browser session, if one was set at creation.
772+
*/
773+
name?: string;
774+
755775
/**
756776
* Browser pool this session was acquired from, if any.
757777
*/
@@ -865,6 +885,13 @@ export interface BrowserCreateParams {
865885
*/
866886
kiosk_mode?: boolean;
867887

888+
/**
889+
* Optional human-readable name for the browser session, used to find it later in
890+
* the dashboard. Must be unique among active sessions within the project. Set at
891+
* creation time only.
892+
*/
893+
name?: string;
894+
868895
/**
869896
* Profile selection for the browser session. Provide either id or name. If
870897
* specified, the matching profile will be loaded into the browser session.
@@ -1040,7 +1067,7 @@ export interface BrowserListParams extends OffsetPaginationParams {
10401067
include_deleted?: boolean;
10411068

10421069
/**
1043-
* Search browsers by session ID, profile ID, proxy ID, or pool name.
1070+
* Search browsers by name, session ID, profile ID, proxy ID, or pool name.
10441071
*/
10451072
query?: string;
10461073

src/resources/invocations.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@ export namespace InvocationListBrowsersResponse {
488488
*/
489489
kiosk_mode?: boolean;
490490

491+
/**
492+
* Human-readable name of the browser session, if one was set at creation.
493+
*/
494+
name?: string;
495+
491496
/**
492497
* Browser pool this session was acquired from, if any.
493498
*/

tests/api-resources/browsers/browsers.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ describe('resource browsers', () => {
3232
headless: false,
3333
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
3434
kiosk_mode: true,
35+
name: 'amazon-scrape-1',
3536
profile: {
3637
id: 'id',
3738
name: 'name',

0 commit comments

Comments
 (0)