-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshared.ts
More file actions
175 lines (150 loc) · 3.78 KB
/
shared.ts
File metadata and controls
175 lines (150 loc) · 3.78 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
/**
* An action available on the app
*/
export interface AppAction {
/**
* Name of the action
*/
name: string;
/**
* JSON Schema (draft-07) describing the expected input payload. Null if schema
* could not be automatically generated.
*/
input_schema?: { [key: string]: unknown } | null;
/**
* JSON Schema (draft-07) describing the expected output payload. Null if schema
* could not be automatically generated.
*/
output_schema?: { [key: string]: unknown } | null;
}
/**
* Extension selection for the browser session. Provide either id or name of an
* extension uploaded to Kernel.
*/
export interface BrowserExtension {
/**
* Extension ID to load for this browser session
*/
id?: string;
/**
* Extension name to load for this browser session (instead of id). Must be 1-255
* characters, using letters, numbers, dots, underscores, or hyphens.
*/
name?: string;
}
/**
* Profile selection for the browser session. Provide either id or name. If
* specified, the matching profile will be loaded into the browser session.
* Profiles must be created beforehand.
*/
export interface BrowserProfile {
/**
* Profile ID to load for this browser session
*/
id?: string;
/**
* Profile name to load for this browser session (instead of id). Must be 1-255
* characters, using letters, numbers, dots, underscores, or hyphens.
*/
name?: string;
/**
* If true, save changes made during the session back to the profile when the
* session ends.
*/
save_changes?: boolean;
}
/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
export interface BrowserViewport {
/**
* Browser window height in pixels.
*/
height: number;
/**
* Browser window width in pixels.
*/
width: number;
/**
* Display refresh rate in Hz. If omitted, automatically determined from width and
* height.
*/
refresh_rate?: number;
}
export interface ErrorDetail {
/**
* Lower-level error code providing more specific detail
*/
code?: string;
/**
* Further detail about the error
*/
message?: string;
}
/**
* An error event from the application.
*/
export interface ErrorEvent {
error: ErrorModel;
/**
* Event type identifier (always "error").
*/
event: 'error';
/**
* Time the error occurred.
*/
timestamp: string;
}
export interface ErrorModel {
/**
* Application-specific error code (machine-readable)
*/
code: string;
/**
* Human-readable error description for debugging
*/
message: string;
/**
* Additional error details (for multiple errors)
*/
details?: Array<ErrorDetail>;
inner_error?: ErrorDetail;
}
/**
* Heartbeat event sent periodically to keep SSE connection alive.
*/
export interface HeartbeatEvent {
/**
* Event type identifier (always "sse_heartbeat").
*/
event: 'sse_heartbeat';
/**
* Time the heartbeat was sent.
*/
timestamp: string;
}
/**
* A log entry from the application.
*/
export interface LogEvent {
/**
* Event type identifier (always "log").
*/
event: 'log';
/**
* Log message text.
*/
message: string;
/**
* Time the log entry was produced.
*/
timestamp: string;
}