-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlogs.ts
More file actions
90 lines (76 loc) · 2.02 KB
/
logs.ts
File metadata and controls
90 lines (76 loc) · 2.02 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import { isRequestOptions } from '../../core';
import * as Core from '../../core';
export class Logs extends APIResource {
/**
* Get all logs from a running or completed Devbox.
*/
list(id: string, query?: LogListParams, options?: Core.RequestOptions): Core.APIPromise<DevboxLogsListView>;
list(id: string, options?: Core.RequestOptions): Core.APIPromise<DevboxLogsListView>;
list(
id: string,
query: LogListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<DevboxLogsListView> {
if (isRequestOptions(query)) {
return this.list(id, {}, query);
}
return this._client.get(`/v1/devboxes/${id}/logs`, { query, ...options });
}
}
export interface DevboxLogsListView {
/**
* List of logs for the given devbox.
*/
logs: Array<DevboxLogsListView.Log>;
}
export namespace DevboxLogsListView {
export interface Log {
/**
* Log line severity level.
*/
level: string;
/**
* The source of the log.
*/
source: 'setup_commands' | 'entrypoint' | 'exec' | 'files' | 'stats';
/**
* Time of log (Unix timestamp milliseconds).
*/
timestamp_ms: number;
/**
* The Command Executed
*/
cmd?: string | null;
/**
* Identifier of the associated command the log is sourced from.
*/
cmd_id?: string | null;
/**
* The Exit Code of the command
*/
exit_code?: number | null;
/**
* Log line message.
*/
message?: string | null;
/**
* The Shell name the cmd executed in.
*/
shell_name?: string | null;
}
}
export interface LogListParams {
/**
* ID of execution to filter logs by.
*/
execution_id?: string;
/**
* Shell Name to filter logs by.
*/
shell_name?: string;
}
export declare namespace Logs {
export { type DevboxLogsListView as DevboxLogsListView, type LogListParams as LogListParams };
}