Skip to content

Commit 2d845ff

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#8)
1 parent e1e4738 commit 2d845ff

File tree

4 files changed

+78
-66
lines changed

4 files changed

+78
-66
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-69e3c041b63edae61bddbb624edc185621be0ad4b1355395616ce08bc8d74ef9.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-0069ed71133ac7b0add07abd8562396c4b8e3c9a212e14a7586782eeed2ff373.yml

src/resources/extensions.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,9 @@ export class Extensions extends APIResource {
3333
export interface Extension {
3434
id: string;
3535

36-
created_at: string;
36+
createdAt: string;
3737

38-
fileName: string;
39-
40-
/**
41-
* The Project ID linked to the uploaded Extension.
42-
*/
43-
projectId: string;
44-
45-
updated_at: string;
38+
updatedAt: string;
4639
}
4740

4841
export interface ExtensionCreateParams {

src/resources/sessions/sessions.ts

Lines changed: 74 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -62,61 +62,9 @@ export class Sessions extends APIResource {
6262
export interface Session {
6363
id: string;
6464

65-
created_at: string;
65+
createdAt: string;
6666

67-
expires_at: string;
68-
69-
/**
70-
* Indicates if the Session was created to be kept alive upon disconnections
71-
*/
72-
keep_alive: boolean;
73-
74-
/**
75-
* The Project ID linked to the Session.
76-
*/
77-
project_id: string;
78-
79-
/**
80-
* Bytes used via the [Proxy](/features/stealth-mode#proxies-and-residential-ips)
81-
*/
82-
proxyBytes: number;
83-
84-
region: string;
85-
86-
started_at: string;
87-
88-
status: 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED';
89-
90-
updated_at: string;
91-
92-
/**
93-
* CPU used by the Session
94-
*/
95-
avg_cpu_usage?: number;
96-
97-
connectUrl?: string;
98-
99-
/**
100-
* Optional. The Context linked to the Session.
101-
*/
102-
context_id?: string;
103-
104-
ended_at?: string;
105-
106-
is_idle?: boolean;
107-
108-
/**
109-
* Memory used by the Session
110-
*/
111-
memory_usage?: number;
112-
113-
seleniumRemoteUrl?: string;
114-
115-
signingKey?: string;
116-
117-
viewport_height?: number;
118-
119-
viewport_width?: number;
67+
updatedAt: string;
12068
}
12169

12270
export interface SessionLiveURLs {
@@ -172,7 +120,9 @@ export interface SessionCreateParams {
172120
* Proxy configuration. Can be true for default proxy, or an array of proxy
173121
* configurations.
174122
*/
175-
proxies?: unknown | boolean;
123+
proxies?:
124+
| boolean
125+
| Array<SessionCreateParams.BrowserbaseProxyConfig | SessionCreateParams.ExternalProxyConfig>;
176126

177127
/**
178128
* Duration in seconds after which the session will automatically end. Defaults to
@@ -277,6 +227,75 @@ export namespace SessionCreateParams {
277227
width?: number;
278228
}
279229
}
230+
231+
export interface BrowserbaseProxyConfig {
232+
/**
233+
* Type of proxy. Always use 'browserbase' for the Browserbase managed proxy
234+
* network.
235+
*/
236+
type: 'browserbase';
237+
238+
/**
239+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
240+
* domains. Optional.
241+
*/
242+
domainPattern?: string;
243+
244+
/**
245+
* Configuration for geolocation
246+
*/
247+
geolocation?: BrowserbaseProxyConfig.Geolocation;
248+
}
249+
250+
export namespace BrowserbaseProxyConfig {
251+
/**
252+
* Configuration for geolocation
253+
*/
254+
export interface Geolocation {
255+
/**
256+
* Country code in ISO 3166-1 alpha-2 format
257+
*/
258+
country: string;
259+
260+
/**
261+
* Name of the city. Use spaces for multi-word city names. Optional.
262+
*/
263+
city?: string;
264+
265+
/**
266+
* US state code (2 characters). Must also specify US as the country. Optional.
267+
*/
268+
state?: string;
269+
}
270+
}
271+
272+
export interface ExternalProxyConfig {
273+
/**
274+
* Server URL for external proxy. Required.
275+
*/
276+
server: string;
277+
278+
/**
279+
* Type of proxy. Always 'external' for this config.
280+
*/
281+
type: 'external';
282+
283+
/**
284+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
285+
* domains. Optional.
286+
*/
287+
domainPattern?: string;
288+
289+
/**
290+
* Password for external proxy authentication. Optional.
291+
*/
292+
password?: string;
293+
294+
/**
295+
* Username for external proxy authentication. Optional.
296+
*/
297+
username?: string;
298+
}
280299
}
281300

282301
export interface SessionUpdateParams {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('resource sessions', () => {
4242
},
4343
extensionId: 'extensionId',
4444
keepAlive: true,
45-
proxies: {},
45+
proxies: true,
4646
timeout: 60,
4747
});
4848
});

0 commit comments

Comments
 (0)