-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsessions.ts
More file actions
53 lines (42 loc) · 1.21 KB
/
Copy pathsessions.ts
File metadata and controls
53 lines (42 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
export class Sessions extends APIResource {
/**
* Lists all your currently active sessions.
*
* @example
* ```ts
* const sessionListResponse =
* await client.codeInterpreter.sessions.list();
* ```
*/
list(options?: RequestOptions): APIPromise<SessionListResponse> {
return this._client.get('/tci/sessions', options);
}
}
export interface SessionListResponse {
data?: SessionListResponse.Data;
errors?: Array<string | { [key: string]: unknown }>;
}
export namespace SessionListResponse {
export interface Data {
sessions: Array<Data.Session>;
}
export namespace Data {
export interface Session {
/**
* Session Identifier. Used to make follow-up calls.
*/
id: string;
execute_count: number;
expires_at: string;
last_execute_at: string;
started_at: string;
}
}
}
export declare namespace Sessions {
export { type SessionListResponse as SessionListResponse };
}