Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8df9cc8

Browse files
stainless-app[bot]stainless-bot
authored andcommittedOct 29, 2024·
feat(api): api update (#19)
1 parent db4d419 commit 8df9cc8

File tree

3 files changed

+74
-3
lines changed

3 files changed

+74
-3
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-873c7106986f864ce293afcccbe32239bc102bb7c1d27acfeafaca3b3e819ee3.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-b341dd9d5bb77c4f217b94b186763e730fd798fbb773a5e90bb4e2a8d4a2c822.yml

‎src/resources/sessions/sessions.ts

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ export interface SessionCreateParams {
229229
* Proxy configuration. Can be true for default proxy, or an array of proxy
230230
* configurations.
231231
*/
232-
proxies?: unknown;
232+
proxies?:
233+
| boolean
234+
| Array<SessionCreateParams.BrowserbaseProxyConfig | SessionCreateParams.ExternalProxyConfig>;
233235

234236
/**
235237
* The region where the Session should run.
@@ -339,6 +341,75 @@ export namespace SessionCreateParams {
339341
width?: number;
340342
}
341343
}
344+
345+
export interface BrowserbaseProxyConfig {
346+
/**
347+
* Type of proxy. Always use 'browserbase' for the Browserbase managed proxy
348+
* network.
349+
*/
350+
type: 'browserbase';
351+
352+
/**
353+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
354+
* domains. Optional.
355+
*/
356+
domainPattern?: string;
357+
358+
/**
359+
* Configuration for geolocation
360+
*/
361+
geolocation?: BrowserbaseProxyConfig.Geolocation;
362+
}
363+
364+
export namespace BrowserbaseProxyConfig {
365+
/**
366+
* Configuration for geolocation
367+
*/
368+
export interface Geolocation {
369+
/**
370+
* Country code in ISO 3166-1 alpha-2 format
371+
*/
372+
country: string;
373+
374+
/**
375+
* Name of the city. Use spaces for multi-word city names. Optional.
376+
*/
377+
city?: string;
378+
379+
/**
380+
* US state code (2 characters). Must also specify US as the country. Optional.
381+
*/
382+
state?: string;
383+
}
384+
}
385+
386+
export interface ExternalProxyConfig {
387+
/**
388+
* Server URL for external proxy. Required.
389+
*/
390+
server: string;
391+
392+
/**
393+
* Type of proxy. Always 'external' for this config.
394+
*/
395+
type: 'external';
396+
397+
/**
398+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
399+
* domains. Optional.
400+
*/
401+
domainPattern?: string;
402+
403+
/**
404+
* Password for external proxy authentication. Optional.
405+
*/
406+
password?: string;
407+
408+
/**
409+
* Username for external proxy authentication. Optional.
410+
*/
411+
username?: string;
412+
}
342413
}
343414

344415
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
region: 'us-west-2',
4747
timeout: 60,
4848
});

0 commit comments

Comments
 (0)
Please sign in to comment.