@@ -28,7 +28,7 @@ export class Sessions extends APIResource {
28
28
/**
29
29
* Session
30
30
*/
31
- retrieve ( id : string , options ?: Core . RequestOptions ) : Core . APIPromise < Session > {
31
+ retrieve ( id : string , options ?: Core . RequestOptions ) : Core . APIPromise < SessionRetrieveResponse > {
32
32
return this . _client . get ( `/v1/sessions/${ id } ` , options ) ;
33
33
}
34
34
@@ -217,6 +217,78 @@ export interface SessionCreateResponse {
217
217
userMetadata ?: Record < string , unknown > ;
218
218
}
219
219
220
+ export interface SessionRetrieveResponse {
221
+ id : string ;
222
+
223
+ createdAt : string ;
224
+
225
+ expiresAt : string ;
226
+
227
+ /**
228
+ * Indicates if the Session was created to be kept alive upon disconnections
229
+ */
230
+ keepAlive : boolean ;
231
+
232
+ /**
233
+ * The Project ID linked to the Session.
234
+ */
235
+ projectId : string ;
236
+
237
+ /**
238
+ * Bytes used via the [Proxy](/features/stealth-mode#proxies-and-residential-ips)
239
+ */
240
+ proxyBytes : number ;
241
+
242
+ /**
243
+ * The region where the Session is running.
244
+ */
245
+ region : 'us-west-2' | 'us-east-1' | 'eu-central-1' | 'ap-southeast-1' ;
246
+
247
+ startedAt : string ;
248
+
249
+ status : 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED' ;
250
+
251
+ updatedAt : string ;
252
+
253
+ /**
254
+ * CPU used by the Session
255
+ */
256
+ avgCpuUsage ?: number ;
257
+
258
+ /**
259
+ * WebSocket URL to connect to the Session.
260
+ */
261
+ connectUrl ?: string ;
262
+
263
+ /**
264
+ * Optional. The Context linked to the Session.
265
+ */
266
+ contextId ?: string ;
267
+
268
+ endedAt ?: string ;
269
+
270
+ /**
271
+ * Memory used by the Session
272
+ */
273
+ memoryUsage ?: number ;
274
+
275
+ /**
276
+ * HTTP URL to connect to the Session.
277
+ */
278
+ seleniumRemoteUrl ?: string ;
279
+
280
+ /**
281
+ * Signing key to use when connecting to the Session via HTTP.
282
+ */
283
+ signingKey ?: string ;
284
+
285
+ /**
286
+ * Arbitrary user metadata to attach to the session. To learn more about user
287
+ * metadata, see [User Metadata](/features/sessions#user-metadata).
288
+ */
289
+ userMetadata ?: Record < string , unknown > ;
290
+ }
291
+
220
292
export type SessionListResponse = Array < Session > ;
221
293
222
294
export interface SessionCreateParams {
@@ -473,6 +545,7 @@ export declare namespace Sessions {
473
545
type Session as Session ,
474
546
type SessionLiveURLs as SessionLiveURLs ,
475
547
type SessionCreateResponse as SessionCreateResponse ,
548
+ type SessionRetrieveResponse as SessionRetrieveResponse ,
476
549
type SessionListResponse as SessionListResponse ,
477
550
type SessionCreateParams as SessionCreateParams ,
478
551
type SessionUpdateParams as SessionUpdateParams ,
0 commit comments