@@ -62,61 +62,9 @@ export class Sessions extends APIResource {
62
62
export interface Session {
63
63
id : string ;
64
64
65
- created_at : string ;
65
+ createdAt : string ;
66
66
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 ;
120
68
}
121
69
122
70
export interface SessionLiveURLs {
@@ -172,7 +120,9 @@ export interface SessionCreateParams {
172
120
* Proxy configuration. Can be true for default proxy, or an array of proxy
173
121
* configurations.
174
122
*/
175
- proxies ?: unknown | boolean ;
123
+ proxies ?:
124
+ | boolean
125
+ | Array < SessionCreateParams . BrowserbaseProxyConfig | SessionCreateParams . ExternalProxyConfig > ;
176
126
177
127
/**
178
128
* Duration in seconds after which the session will automatically end. Defaults to
@@ -277,6 +227,75 @@ export namespace SessionCreateParams {
277
227
width ?: number ;
278
228
}
279
229
}
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
+ }
280
299
}
281
300
282
301
export interface SessionUpdateParams {
0 commit comments