@distilled.cloud/daytona 0.0.0-placeholder → 1.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +34 -0
- package/lib/credentials.d.ts +46 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +67 -0
- package/lib/credentials.js.map +1 -0
- package/lib/endpoints.d.ts +15 -0
- package/lib/endpoints.d.ts.map +1 -0
- package/lib/endpoints.js +28 -0
- package/lib/endpoints.js.map +1 -0
- package/lib/errors.d.ts +53 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +30 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +30 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +10 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +10 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +75 -0
- package/lib/protocol.js.map +1 -0
- package/lib/response-validation.test.d.ts +4 -0
- package/lib/response-validation.test.d.ts.map +1 -0
- package/lib/response-validation.test.js +31 -0
- package/lib/response-validation.test.js.map +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +43 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/api_keys.d.ts +120 -0
- package/lib/services/api_keys.d.ts.map +1 -0
- package/lib/services/api_keys.js +126 -0
- package/lib/services/api_keys.js.map +1 -0
- package/lib/services/audit.d.ts +159 -0
- package/lib/services/audit.d.ts.map +1 -0
- package/lib/services/audit.js +126 -0
- package/lib/services/audit.js.map +1 -0
- package/lib/services/computer_use.d.ts +484 -0
- package/lib/services/computer_use.d.ts.map +1 -0
- package/lib/services/computer_use.js +672 -0
- package/lib/services/computer_use.js.map +1 -0
- package/lib/services/config.d.ts +138 -0
- package/lib/services/config.d.ts.map +1 -0
- package/lib/services/config.js +88 -0
- package/lib/services/config.js.map +1 -0
- package/lib/services/docker_registry.d.ts +126 -0
- package/lib/services/docker_registry.d.ts.map +1 -0
- package/lib/services/docker_registry.js +135 -0
- package/lib/services/docker_registry.js.map +1 -0
- package/lib/services/file_system.d.ts +203 -0
- package/lib/services/file_system.d.ts.map +1 -0
- package/lib/services/file_system.js +255 -0
- package/lib/services/file_system.js.map +1 -0
- package/lib/services/git.d.ts +338 -0
- package/lib/services/git.d.ts.map +1 -0
- package/lib/services/git.js +417 -0
- package/lib/services/git.js.map +1 -0
- package/lib/services/health.d.ts +41 -0
- package/lib/services/health.d.ts.map +1 -0
- package/lib/services/health.js +49 -0
- package/lib/services/health.js.map +1 -0
- package/lib/services/index.d.ts +31 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +32 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/info.d.ts +37 -0
- package/lib/services/info.d.ts.map +1 -0
- package/lib/services/info.js +55 -0
- package/lib/services/info.js.map +1 -0
- package/lib/services/interpreter.d.ts +56 -0
- package/lib/services/interpreter.d.ts.map +1 -0
- package/lib/services/interpreter.js +83 -0
- package/lib/services/interpreter.js.map +1 -0
- package/lib/services/jobs.d.ts +104 -0
- package/lib/services/jobs.d.ts.map +1 -0
- package/lib/services/jobs.js +94 -0
- package/lib/services/jobs.js.map +1 -0
- package/lib/services/lsp.d.ts +137 -0
- package/lib/services/lsp.d.ts.map +1 -0
- package/lib/services/lsp.js +160 -0
- package/lib/services/lsp.js.map +1 -0
- package/lib/services/object_storage.d.ts +31 -0
- package/lib/services/object_storage.d.ts.map +1 -0
- package/lib/services/object_storage.js +33 -0
- package/lib/services/object_storage.js.map +1 -0
- package/lib/services/organizations.d.ts +963 -0
- package/lib/services/organizations.d.ts.map +1 -0
- package/lib/services/organizations.js +1143 -0
- package/lib/services/organizations.js.map +1 -0
- package/lib/services/port.d.ts +29 -0
- package/lib/services/port.d.ts.map +1 -0
- package/lib/services/port.js +41 -0
- package/lib/services/port.js.map +1 -0
- package/lib/services/preview.d.ts +73 -0
- package/lib/services/preview.d.ts.map +1 -0
- package/lib/services/preview.js +125 -0
- package/lib/services/preview.js.map +1 -0
- package/lib/services/process.d.ts +329 -0
- package/lib/services/process.d.ts.map +1 -0
- package/lib/services/process.js +421 -0
- package/lib/services/process.js.map +1 -0
- package/lib/services/regions.d.ts +41 -0
- package/lib/services/regions.d.ts.map +1 -0
- package/lib/services/regions.js +36 -0
- package/lib/services/regions.js.map +1 -0
- package/lib/services/runners.d.ts +358 -0
- package/lib/services/runners.d.ts.map +1 -0
- package/lib/services/runners.js +316 -0
- package/lib/services/runners.js.map +1 -0
- package/lib/services/sandbox.d.ts +1276 -0
- package/lib/services/sandbox.d.ts.map +1 -0
- package/lib/services/sandbox.js +1218 -0
- package/lib/services/sandbox.js.map +1 -0
- package/lib/services/secret.d.ts +120 -0
- package/lib/services/secret.d.ts.map +1 -0
- package/lib/services/secret.js +113 -0
- package/lib/services/secret.js.map +1 -0
- package/lib/services/server.d.ts +44 -0
- package/lib/services/server.d.ts.map +1 -0
- package/lib/services/server.js +46 -0
- package/lib/services/server.js.map +1 -0
- package/lib/services/snapshots.d.ts +208 -0
- package/lib/services/snapshots.d.ts.map +1 -0
- package/lib/services/snapshots.js +189 -0
- package/lib/services/snapshots.js.map +1 -0
- package/lib/services/system.d.ts +24 -0
- package/lib/services/system.d.ts.map +1 -0
- package/lib/services/system.js +31 -0
- package/lib/services/system.js.map +1 -0
- package/lib/services/telemetry.d.ts +141 -0
- package/lib/services/telemetry.d.ts.map +1 -0
- package/lib/services/telemetry.js +165 -0
- package/lib/services/telemetry.js.map +1 -0
- package/lib/services/usage.d.ts +111 -0
- package/lib/services/usage.d.ts.map +1 -0
- package/lib/services/usage.js +146 -0
- package/lib/services/usage.js.map +1 -0
- package/lib/services/users.d.ts +125 -0
- package/lib/services/users.d.ts.map +1 -0
- package/lib/services/users.js +172 -0
- package/lib/services/users.js.map +1 -0
- package/lib/services/volumes.d.ts +83 -0
- package/lib/services/volumes.d.ts.map +1 -0
- package/lib/services/volumes.js +96 -0
- package/lib/services/volumes.js.map +1 -0
- package/lib/services/warm_pools.d.ts +79 -0
- package/lib/services/warm_pools.d.ts.map +1 -0
- package/lib/services/warm_pools.js +90 -0
- package/lib/services/warm_pools.js.map +1 -0
- package/lib/services/webhooks.d.ts +67 -0
- package/lib/services/webhooks.d.ts.map +1 -0
- package/lib/services/webhooks.js +103 -0
- package/lib/services/webhooks.js.map +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +11 -0
- package/lib/traits.js.map +1 -0
- package/package.json +78 -7
- package/src/credentials.ts +135 -0
- package/src/endpoints.ts +28 -0
- package/src/errors.ts +85 -0
- package/src/index.ts +33 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +108 -0
- package/src/response-validation.test.ts +45 -0
- package/src/retry.ts +74 -0
- package/src/services/api_keys.ts +378 -0
- package/src/services/audit.ts +416 -0
- package/src/services/computer_use.ts +1496 -0
- package/src/services/config.ts +256 -0
- package/src/services/docker_registry.ts +325 -0
- package/src/services/file_system.ts +575 -0
- package/src/services/git.ts +928 -0
- package/src/services/health.ts +116 -0
- package/src/services/index.ts +31 -0
- package/src/services/info.ts +116 -0
- package/src/services/interpreter.ts +182 -0
- package/src/services/jobs.ts +249 -0
- package/src/services/lsp.ts +367 -0
- package/src/services/object_storage.ts +75 -0
- package/src/services/organizations.ts +2712 -0
- package/src/services/port.ts +87 -0
- package/src/services/preview.ts +256 -0
- package/src/services/process.ts +948 -0
- package/src/services/regions.ts +90 -0
- package/src/services/runners.ts +811 -0
- package/src/services/sandbox.ts +3158 -0
- package/src/services/secret.ts +289 -0
- package/src/services/server.ts +111 -0
- package/src/services/snapshots.ts +508 -0
- package/src/services/system.ts +64 -0
- package/src/services/telemetry.ts +385 -0
- package/src/services/usage.ts +316 -0
- package/src/services/users.ts +380 -0
- package/src/services/volumes.ts +233 -0
- package/src/services/warm_pools.ts +209 -0
- package/src/services/webhooks.ts +214 -0
- package/src/traits.ts +44 -0
|
@@ -0,0 +1,948 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-daytona/specs/{openapi,toolbox-openapi,analytics-openapi}.json). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.ts";
|
|
5
|
+
import {
|
|
6
|
+
DaytonaProtocol,
|
|
7
|
+
type DaytonaOpError,
|
|
8
|
+
type DaytonaOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { UnknownDaytonaError } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { DaytonaOpError, DaytonaOpContext };
|
|
14
|
+
|
|
15
|
+
export interface ConnectPtySessionRequest {
|
|
16
|
+
/** PTY session ID */
|
|
17
|
+
sessionId: string;
|
|
18
|
+
}
|
|
19
|
+
export const ConnectPtySessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
20
|
+
S.Struct({
|
|
21
|
+
sessionId: S.String.pipe(T.Label()),
|
|
22
|
+
}).pipe(
|
|
23
|
+
T.Http({
|
|
24
|
+
method: "GET",
|
|
25
|
+
uri: "/process/pty/{sessionId}/connect",
|
|
26
|
+
code: 200,
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
).annotate({
|
|
30
|
+
identifier: "ConnectPtySessionRequest",
|
|
31
|
+
}) as any as S.Schema<ConnectPtySessionRequest>;
|
|
32
|
+
|
|
33
|
+
export interface ConnectPtySessionResponse {}
|
|
34
|
+
export const ConnectPtySessionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
35
|
+
S.Struct({}),
|
|
36
|
+
).annotate({
|
|
37
|
+
identifier: "ConnectPtySessionResponse",
|
|
38
|
+
}) as any as S.Schema<ConnectPtySessionResponse>;
|
|
39
|
+
|
|
40
|
+
export type CreatePtySessionRequestEnvsMap = {
|
|
41
|
+
[key: string]: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
export const CreatePtySessionRequestEnvsMap = /*@__PURE__*/ S.Record(
|
|
44
|
+
S.String,
|
|
45
|
+
S.String,
|
|
46
|
+
) as any as S.Schema<CreatePtySessionRequestEnvsMap>;
|
|
47
|
+
|
|
48
|
+
export interface CreatePtySessionRequest {
|
|
49
|
+
cols?: number;
|
|
50
|
+
cwd?: string;
|
|
51
|
+
envs?: CreatePtySessionRequestEnvsMap;
|
|
52
|
+
id?: string;
|
|
53
|
+
/** Don't start PTY until first client connects */
|
|
54
|
+
lazyStart?: boolean;
|
|
55
|
+
rows?: number;
|
|
56
|
+
}
|
|
57
|
+
export const CreatePtySessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
58
|
+
S.Struct({
|
|
59
|
+
cols: S.optional(S.Number),
|
|
60
|
+
cwd: S.optional(S.String),
|
|
61
|
+
envs: S.optional(CreatePtySessionRequestEnvsMap),
|
|
62
|
+
id: S.optional(S.String),
|
|
63
|
+
lazyStart: S.optional(S.Boolean),
|
|
64
|
+
rows: S.optional(S.Number),
|
|
65
|
+
}).pipe(T.Http({ method: "POST", uri: "/process/pty", code: 200 })),
|
|
66
|
+
).annotate({
|
|
67
|
+
identifier: "CreatePtySessionRequest",
|
|
68
|
+
}) as any as S.Schema<CreatePtySessionRequest>;
|
|
69
|
+
|
|
70
|
+
export interface PtyCreateResponse {
|
|
71
|
+
sessionId: string;
|
|
72
|
+
}
|
|
73
|
+
export const PtyCreateResponse = /*@__PURE__*/ S.suspend(() =>
|
|
74
|
+
S.Struct({
|
|
75
|
+
sessionId: S.String,
|
|
76
|
+
}),
|
|
77
|
+
).annotate({
|
|
78
|
+
identifier: "PtyCreateResponse",
|
|
79
|
+
}) as any as S.Schema<PtyCreateResponse>;
|
|
80
|
+
|
|
81
|
+
export interface CreateSessionRequest {
|
|
82
|
+
sessionId: string;
|
|
83
|
+
}
|
|
84
|
+
export const CreateSessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
85
|
+
S.Struct({
|
|
86
|
+
sessionId: S.String,
|
|
87
|
+
}).pipe(T.Http({ method: "POST", uri: "/process/session", code: 200 })),
|
|
88
|
+
).annotate({
|
|
89
|
+
identifier: "CreateSessionRequest",
|
|
90
|
+
}) as any as S.Schema<CreateSessionRequest>;
|
|
91
|
+
|
|
92
|
+
export interface CreateSessionResponse {}
|
|
93
|
+
export const CreateSessionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
94
|
+
S.Struct({}),
|
|
95
|
+
).annotate({
|
|
96
|
+
identifier: "CreateSessionResponse",
|
|
97
|
+
}) as any as S.Schema<CreateSessionResponse>;
|
|
98
|
+
|
|
99
|
+
export interface DeletePtySessionRequest {
|
|
100
|
+
/** PTY session ID */
|
|
101
|
+
sessionId: string;
|
|
102
|
+
}
|
|
103
|
+
export const DeletePtySessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
104
|
+
S.Struct({
|
|
105
|
+
sessionId: S.String.pipe(T.Label()),
|
|
106
|
+
}).pipe(
|
|
107
|
+
T.Http({ method: "DELETE", uri: "/process/pty/{sessionId}", code: 200 }),
|
|
108
|
+
),
|
|
109
|
+
).annotate({
|
|
110
|
+
identifier: "DeletePtySessionRequest",
|
|
111
|
+
}) as any as S.Schema<DeletePtySessionRequest>;
|
|
112
|
+
|
|
113
|
+
export type GinH = { [key: string]: unknown | undefined };
|
|
114
|
+
export const GinH = /*@__PURE__*/ S.Record(
|
|
115
|
+
S.String,
|
|
116
|
+
S.Unknown,
|
|
117
|
+
) as any as S.Schema<GinH>;
|
|
118
|
+
|
|
119
|
+
export type DeletePtySessionResponse = GinH;
|
|
120
|
+
export const DeletePtySessionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
121
|
+
GinH.pipe(T.RawResponseRoot()),
|
|
122
|
+
).annotate({
|
|
123
|
+
identifier: "DeletePtySessionResponse",
|
|
124
|
+
}) as any as S.Schema<DeletePtySessionResponse>;
|
|
125
|
+
|
|
126
|
+
export interface DeleteSessionRequest {
|
|
127
|
+
/** Session ID */
|
|
128
|
+
sessionId: string;
|
|
129
|
+
}
|
|
130
|
+
export const DeleteSessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
131
|
+
S.Struct({
|
|
132
|
+
sessionId: S.String.pipe(T.Label()),
|
|
133
|
+
}).pipe(
|
|
134
|
+
T.Http({
|
|
135
|
+
method: "DELETE",
|
|
136
|
+
uri: "/process/session/{sessionId}",
|
|
137
|
+
code: 200,
|
|
138
|
+
}),
|
|
139
|
+
),
|
|
140
|
+
).annotate({
|
|
141
|
+
identifier: "DeleteSessionRequest",
|
|
142
|
+
}) as any as S.Schema<DeleteSessionRequest>;
|
|
143
|
+
|
|
144
|
+
export interface DeleteSessionResponse {}
|
|
145
|
+
export const DeleteSessionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
146
|
+
S.Struct({}),
|
|
147
|
+
).annotate({
|
|
148
|
+
identifier: "DeleteSessionResponse",
|
|
149
|
+
}) as any as S.Schema<DeleteSessionResponse>;
|
|
150
|
+
|
|
151
|
+
/** Environment variables to set for the command */
|
|
152
|
+
export type ExecuteCommandRequestEnvsMap = {
|
|
153
|
+
[key: string]: string | undefined;
|
|
154
|
+
};
|
|
155
|
+
export const ExecuteCommandRequestEnvsMap = /*@__PURE__*/ S.Record(
|
|
156
|
+
S.String,
|
|
157
|
+
S.String,
|
|
158
|
+
) as any as S.Schema<ExecuteCommandRequestEnvsMap>;
|
|
159
|
+
|
|
160
|
+
export interface ExecuteCommandRequest {
|
|
161
|
+
command: string;
|
|
162
|
+
/** Current working directory */
|
|
163
|
+
cwd?: string;
|
|
164
|
+
/** Environment variables to set for the command */
|
|
165
|
+
envs?: ExecuteCommandRequestEnvsMap;
|
|
166
|
+
/** Timeout in seconds, defaults to 10 seconds */
|
|
167
|
+
timeout?: number;
|
|
168
|
+
}
|
|
169
|
+
export const ExecuteCommandRequest = /*@__PURE__*/ S.suspend(() =>
|
|
170
|
+
S.Struct({
|
|
171
|
+
command: S.String,
|
|
172
|
+
cwd: S.optional(S.String),
|
|
173
|
+
envs: S.optional(ExecuteCommandRequestEnvsMap),
|
|
174
|
+
timeout: S.optional(S.Number),
|
|
175
|
+
}).pipe(T.Http({ method: "POST", uri: "/process/execute", code: 200 })),
|
|
176
|
+
).annotate({
|
|
177
|
+
identifier: "ExecuteCommandRequest",
|
|
178
|
+
}) as any as S.Schema<ExecuteCommandRequest>;
|
|
179
|
+
|
|
180
|
+
export interface ExecuteResponse {
|
|
181
|
+
exitCode?: number;
|
|
182
|
+
result: string;
|
|
183
|
+
}
|
|
184
|
+
export const ExecuteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
185
|
+
S.Struct({
|
|
186
|
+
exitCode: S.optional(S.Number),
|
|
187
|
+
result: S.String,
|
|
188
|
+
}),
|
|
189
|
+
).annotate({
|
|
190
|
+
identifier: "ExecuteResponse",
|
|
191
|
+
}) as any as S.Schema<ExecuteResponse>;
|
|
192
|
+
|
|
193
|
+
export interface GetEntrypointLogsRequest {
|
|
194
|
+
/** Follow logs in real-time (WebSocket only) */
|
|
195
|
+
follow?: boolean;
|
|
196
|
+
}
|
|
197
|
+
export const GetEntrypointLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
198
|
+
S.Struct({
|
|
199
|
+
follow: S.optional(S.Boolean.pipe(T.Query())),
|
|
200
|
+
}).pipe(
|
|
201
|
+
T.Http({
|
|
202
|
+
method: "GET",
|
|
203
|
+
uri: "/process/session/entrypoint/logs",
|
|
204
|
+
code: 200,
|
|
205
|
+
}),
|
|
206
|
+
),
|
|
207
|
+
).annotate({
|
|
208
|
+
identifier: "GetEntrypointLogsRequest",
|
|
209
|
+
}) as any as S.Schema<GetEntrypointLogsRequest>;
|
|
210
|
+
|
|
211
|
+
export interface SessionCommandLogsResponse {
|
|
212
|
+
output: string;
|
|
213
|
+
stderr: string;
|
|
214
|
+
stdout: string;
|
|
215
|
+
}
|
|
216
|
+
export const SessionCommandLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
217
|
+
S.Struct({
|
|
218
|
+
output: S.String,
|
|
219
|
+
stderr: S.String,
|
|
220
|
+
stdout: S.String,
|
|
221
|
+
}),
|
|
222
|
+
).annotate({
|
|
223
|
+
identifier: "SessionCommandLogsResponse",
|
|
224
|
+
}) as any as S.Schema<SessionCommandLogsResponse>;
|
|
225
|
+
|
|
226
|
+
export interface GetEntrypointSessionRequest {}
|
|
227
|
+
export const GetEntrypointSessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
228
|
+
S.Struct({}).pipe(
|
|
229
|
+
T.Http({ method: "GET", uri: "/process/session/entrypoint", code: 200 }),
|
|
230
|
+
),
|
|
231
|
+
).annotate({
|
|
232
|
+
identifier: "GetEntrypointSessionRequest",
|
|
233
|
+
}) as any as S.Schema<GetEntrypointSessionRequest>;
|
|
234
|
+
|
|
235
|
+
export interface Command {
|
|
236
|
+
command: string;
|
|
237
|
+
exitCode?: number;
|
|
238
|
+
id: string;
|
|
239
|
+
}
|
|
240
|
+
export const Command = /*@__PURE__*/ S.suspend(() =>
|
|
241
|
+
S.Struct({
|
|
242
|
+
command: S.String,
|
|
243
|
+
exitCode: S.optional(S.Number),
|
|
244
|
+
id: S.String,
|
|
245
|
+
}),
|
|
246
|
+
).annotate({ identifier: "Command" }) as any as S.Schema<Command>;
|
|
247
|
+
|
|
248
|
+
export type SessionCommandsList = Array<Command>;
|
|
249
|
+
export const SessionCommandsList = /*@__PURE__*/ S.Array(
|
|
250
|
+
Command,
|
|
251
|
+
) as any as S.Schema<SessionCommandsList>;
|
|
252
|
+
|
|
253
|
+
export interface Session {
|
|
254
|
+
commands: SessionCommandsList;
|
|
255
|
+
sessionId: string;
|
|
256
|
+
}
|
|
257
|
+
export const Session = /*@__PURE__*/ S.suspend(() =>
|
|
258
|
+
S.Struct({
|
|
259
|
+
commands: SessionCommandsList,
|
|
260
|
+
sessionId: S.String,
|
|
261
|
+
}),
|
|
262
|
+
).annotate({ identifier: "Session" }) as any as S.Schema<Session>;
|
|
263
|
+
|
|
264
|
+
export interface GetPtySessionRequest {
|
|
265
|
+
/** PTY session ID */
|
|
266
|
+
sessionId: string;
|
|
267
|
+
}
|
|
268
|
+
export const GetPtySessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
269
|
+
S.Struct({
|
|
270
|
+
sessionId: S.String.pipe(T.Label()),
|
|
271
|
+
}).pipe(
|
|
272
|
+
T.Http({ method: "GET", uri: "/process/pty/{sessionId}", code: 200 }),
|
|
273
|
+
),
|
|
274
|
+
).annotate({
|
|
275
|
+
identifier: "GetPtySessionRequest",
|
|
276
|
+
}) as any as S.Schema<GetPtySessionRequest>;
|
|
277
|
+
|
|
278
|
+
export type PtySessionInfoEnvsMap = { [key: string]: string | undefined };
|
|
279
|
+
export const PtySessionInfoEnvsMap = /*@__PURE__*/ S.Record(
|
|
280
|
+
S.String,
|
|
281
|
+
S.String,
|
|
282
|
+
) as any as S.Schema<PtySessionInfoEnvsMap>;
|
|
283
|
+
|
|
284
|
+
export interface PtySessionInfo {
|
|
285
|
+
active: boolean;
|
|
286
|
+
cols: number;
|
|
287
|
+
createdAt: string;
|
|
288
|
+
cwd: string;
|
|
289
|
+
envs: PtySessionInfoEnvsMap;
|
|
290
|
+
id: string;
|
|
291
|
+
/** Whether this session uses lazy start */
|
|
292
|
+
lazyStart: boolean;
|
|
293
|
+
rows: number;
|
|
294
|
+
}
|
|
295
|
+
export const PtySessionInfo = /*@__PURE__*/ S.suspend(() =>
|
|
296
|
+
S.Struct({
|
|
297
|
+
active: S.Boolean,
|
|
298
|
+
cols: S.Number,
|
|
299
|
+
createdAt: S.String,
|
|
300
|
+
cwd: S.String,
|
|
301
|
+
envs: PtySessionInfoEnvsMap,
|
|
302
|
+
id: S.String,
|
|
303
|
+
lazyStart: S.Boolean,
|
|
304
|
+
rows: S.Number,
|
|
305
|
+
}),
|
|
306
|
+
).annotate({ identifier: "PtySessionInfo" }) as any as S.Schema<PtySessionInfo>;
|
|
307
|
+
|
|
308
|
+
export interface GetSessionRequest {
|
|
309
|
+
/** Session ID */
|
|
310
|
+
sessionId: string;
|
|
311
|
+
}
|
|
312
|
+
export const GetSessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
313
|
+
S.Struct({
|
|
314
|
+
sessionId: S.String.pipe(T.Label()),
|
|
315
|
+
}).pipe(
|
|
316
|
+
T.Http({ method: "GET", uri: "/process/session/{sessionId}", code: 200 }),
|
|
317
|
+
),
|
|
318
|
+
).annotate({
|
|
319
|
+
identifier: "GetSessionRequest",
|
|
320
|
+
}) as any as S.Schema<GetSessionRequest>;
|
|
321
|
+
|
|
322
|
+
export interface GetSessionCommandRequest {
|
|
323
|
+
/** Session ID */
|
|
324
|
+
sessionId: string;
|
|
325
|
+
/** Command ID */
|
|
326
|
+
commandId: string;
|
|
327
|
+
}
|
|
328
|
+
export const GetSessionCommandRequest = /*@__PURE__*/ S.suspend(() =>
|
|
329
|
+
S.Struct({
|
|
330
|
+
sessionId: S.String.pipe(T.Label()),
|
|
331
|
+
commandId: S.String.pipe(T.Label()),
|
|
332
|
+
}).pipe(
|
|
333
|
+
T.Http({
|
|
334
|
+
method: "GET",
|
|
335
|
+
uri: "/process/session/{sessionId}/command/{commandId}",
|
|
336
|
+
code: 200,
|
|
337
|
+
}),
|
|
338
|
+
),
|
|
339
|
+
).annotate({
|
|
340
|
+
identifier: "GetSessionCommandRequest",
|
|
341
|
+
}) as any as S.Schema<GetSessionCommandRequest>;
|
|
342
|
+
|
|
343
|
+
export interface GetSessionCommandLogsRequest {
|
|
344
|
+
/** Session ID */
|
|
345
|
+
sessionId: string;
|
|
346
|
+
/** Command ID */
|
|
347
|
+
commandId: string;
|
|
348
|
+
/** Follow logs in real-time (WebSocket only) */
|
|
349
|
+
follow?: boolean;
|
|
350
|
+
}
|
|
351
|
+
export const GetSessionCommandLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
352
|
+
S.Struct({
|
|
353
|
+
sessionId: S.String.pipe(T.Label()),
|
|
354
|
+
commandId: S.String.pipe(T.Label()),
|
|
355
|
+
follow: S.optional(S.Boolean.pipe(T.Query())),
|
|
356
|
+
}).pipe(
|
|
357
|
+
T.Http({
|
|
358
|
+
method: "GET",
|
|
359
|
+
uri: "/process/session/{sessionId}/command/{commandId}/logs",
|
|
360
|
+
code: 200,
|
|
361
|
+
}),
|
|
362
|
+
),
|
|
363
|
+
).annotate({
|
|
364
|
+
identifier: "GetSessionCommandLogsRequest",
|
|
365
|
+
}) as any as S.Schema<GetSessionCommandLogsRequest>;
|
|
366
|
+
|
|
367
|
+
export interface ListPtySessionsRequest {}
|
|
368
|
+
export const ListPtySessionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
369
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/process/pty", code: 200 })),
|
|
370
|
+
).annotate({
|
|
371
|
+
identifier: "ListPtySessionsRequest",
|
|
372
|
+
}) as any as S.Schema<ListPtySessionsRequest>;
|
|
373
|
+
|
|
374
|
+
export type PtyListResponseSessionsList = Array<PtySessionInfo>;
|
|
375
|
+
export const PtyListResponseSessionsList = /*@__PURE__*/ S.Array(
|
|
376
|
+
PtySessionInfo,
|
|
377
|
+
) as any as S.Schema<PtyListResponseSessionsList>;
|
|
378
|
+
|
|
379
|
+
export interface PtyListResponse {
|
|
380
|
+
sessions: PtyListResponseSessionsList;
|
|
381
|
+
}
|
|
382
|
+
export const PtyListResponse = /*@__PURE__*/ S.suspend(() =>
|
|
383
|
+
S.Struct({
|
|
384
|
+
sessions: PtyListResponseSessionsList,
|
|
385
|
+
}),
|
|
386
|
+
).annotate({
|
|
387
|
+
identifier: "PtyListResponse",
|
|
388
|
+
}) as any as S.Schema<PtyListResponse>;
|
|
389
|
+
|
|
390
|
+
export interface ListSessionsRequest {}
|
|
391
|
+
export const ListSessionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
392
|
+
S.Struct({}).pipe(
|
|
393
|
+
T.Http({ method: "GET", uri: "/process/session", code: 200 }),
|
|
394
|
+
),
|
|
395
|
+
).annotate({
|
|
396
|
+
identifier: "ListSessionsRequest",
|
|
397
|
+
}) as any as S.Schema<ListSessionsRequest>;
|
|
398
|
+
|
|
399
|
+
export type ListSessionsResponseBodyList = Array<Session>;
|
|
400
|
+
export const ListSessionsResponseBodyList = /*@__PURE__*/ S.Array(
|
|
401
|
+
Session,
|
|
402
|
+
) as any as S.Schema<ListSessionsResponseBodyList>;
|
|
403
|
+
|
|
404
|
+
export type ListSessionsResponse = ListSessionsResponseBodyList;
|
|
405
|
+
export const ListSessionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
406
|
+
ListSessionsResponseBodyList.pipe(T.RawResponseRoot()),
|
|
407
|
+
).annotate({
|
|
408
|
+
identifier: "ListSessionsResponse",
|
|
409
|
+
}) as any as S.Schema<ListSessionsResponse>;
|
|
410
|
+
|
|
411
|
+
export interface ResizePtySessionRequest {
|
|
412
|
+
/** PTY session ID */
|
|
413
|
+
sessionId: string;
|
|
414
|
+
cols: number;
|
|
415
|
+
rows: number;
|
|
416
|
+
}
|
|
417
|
+
export const ResizePtySessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
418
|
+
S.Struct({
|
|
419
|
+
sessionId: S.String.pipe(T.Label()),
|
|
420
|
+
cols: S.Number,
|
|
421
|
+
rows: S.Number,
|
|
422
|
+
}).pipe(
|
|
423
|
+
T.Http({
|
|
424
|
+
method: "POST",
|
|
425
|
+
uri: "/process/pty/{sessionId}/resize",
|
|
426
|
+
code: 200,
|
|
427
|
+
}),
|
|
428
|
+
),
|
|
429
|
+
).annotate({
|
|
430
|
+
identifier: "ResizePtySessionRequest",
|
|
431
|
+
}) as any as S.Schema<ResizePtySessionRequest>;
|
|
432
|
+
|
|
433
|
+
export type RunCodeRequestArgvList = Array<string>;
|
|
434
|
+
export const RunCodeRequestArgvList = /*@__PURE__*/ S.Array(
|
|
435
|
+
S.String,
|
|
436
|
+
) as any as S.Schema<RunCodeRequestArgvList>;
|
|
437
|
+
|
|
438
|
+
export type RunCodeRequestEnvsMap = { [key: string]: string | undefined };
|
|
439
|
+
export const RunCodeRequestEnvsMap = /*@__PURE__*/ S.Record(
|
|
440
|
+
S.String,
|
|
441
|
+
S.String,
|
|
442
|
+
) as any as S.Schema<RunCodeRequestEnvsMap>;
|
|
443
|
+
|
|
444
|
+
export interface RunCodeRequest {
|
|
445
|
+
argv?: RunCodeRequestArgvList;
|
|
446
|
+
code: string;
|
|
447
|
+
envs?: RunCodeRequestEnvsMap;
|
|
448
|
+
/** python, javascript, typescript */
|
|
449
|
+
language: string;
|
|
450
|
+
timeout?: number;
|
|
451
|
+
}
|
|
452
|
+
export const RunCodeRequest = /*@__PURE__*/ S.suspend(() =>
|
|
453
|
+
S.Struct({
|
|
454
|
+
argv: S.optional(RunCodeRequestArgvList),
|
|
455
|
+
code: S.String,
|
|
456
|
+
envs: S.optional(RunCodeRequestEnvsMap),
|
|
457
|
+
language: S.String,
|
|
458
|
+
timeout: S.optional(S.Number),
|
|
459
|
+
}).pipe(T.Http({ method: "POST", uri: "/process/code-run", code: 200 })),
|
|
460
|
+
).annotate({ identifier: "RunCodeRequest" }) as any as S.Schema<RunCodeRequest>;
|
|
461
|
+
|
|
462
|
+
export type ChartElementOutliersList = Array<number>;
|
|
463
|
+
export const ChartElementOutliersList = /*@__PURE__*/ S.Array(
|
|
464
|
+
S.Number,
|
|
465
|
+
) as any as S.Schema<ChartElementOutliersList>;
|
|
466
|
+
|
|
467
|
+
export type ChartElementPointsItemList = Array<number>;
|
|
468
|
+
export const ChartElementPointsItemList = /*@__PURE__*/ S.Array(
|
|
469
|
+
S.Number,
|
|
470
|
+
) as any as S.Schema<ChartElementPointsItemList>;
|
|
471
|
+
|
|
472
|
+
export type ChartElementPointsList = Array<ChartElementPointsItemList>;
|
|
473
|
+
export const ChartElementPointsList = /*@__PURE__*/ S.Array(
|
|
474
|
+
ChartElementPointsItemList,
|
|
475
|
+
) as any as S.Schema<ChartElementPointsList>;
|
|
476
|
+
|
|
477
|
+
export interface ChartElement {
|
|
478
|
+
angle?: number;
|
|
479
|
+
first_quartile?: number;
|
|
480
|
+
group?: string;
|
|
481
|
+
label?: string;
|
|
482
|
+
max?: number;
|
|
483
|
+
median?: number;
|
|
484
|
+
min?: number;
|
|
485
|
+
outliers?: ChartElementOutliersList;
|
|
486
|
+
png?: string;
|
|
487
|
+
points?: ChartElementPointsList;
|
|
488
|
+
radius?: number;
|
|
489
|
+
third_quartile?: number;
|
|
490
|
+
title?: string;
|
|
491
|
+
type?: string;
|
|
492
|
+
value?: string;
|
|
493
|
+
x_label?: string;
|
|
494
|
+
y_label?: string;
|
|
495
|
+
}
|
|
496
|
+
export const ChartElement = /*@__PURE__*/ S.suspend(() =>
|
|
497
|
+
S.Struct({
|
|
498
|
+
angle: S.optional(S.Number),
|
|
499
|
+
first_quartile: S.optional(S.Number),
|
|
500
|
+
group: S.optional(S.String),
|
|
501
|
+
label: S.optional(S.String),
|
|
502
|
+
max: S.optional(S.Number),
|
|
503
|
+
median: S.optional(S.Number),
|
|
504
|
+
min: S.optional(S.Number),
|
|
505
|
+
outliers: S.optional(ChartElementOutliersList),
|
|
506
|
+
png: S.optional(S.String),
|
|
507
|
+
points: S.optional(ChartElementPointsList),
|
|
508
|
+
radius: S.optional(S.Number),
|
|
509
|
+
third_quartile: S.optional(S.Number),
|
|
510
|
+
title: S.optional(S.String),
|
|
511
|
+
type: S.optional(S.String),
|
|
512
|
+
value: S.optional(S.String),
|
|
513
|
+
x_label: S.optional(S.String),
|
|
514
|
+
y_label: S.optional(S.String),
|
|
515
|
+
}),
|
|
516
|
+
).annotate({ identifier: "ChartElement" }) as any as S.Schema<ChartElement>;
|
|
517
|
+
|
|
518
|
+
export type ChartElementsList = Array<ChartElement>;
|
|
519
|
+
export const ChartElementsList = /*@__PURE__*/ S.Array(
|
|
520
|
+
ChartElement,
|
|
521
|
+
) as any as S.Schema<ChartElementsList>;
|
|
522
|
+
|
|
523
|
+
export type ChartXTickLabelsList = Array<string>;
|
|
524
|
+
export const ChartXTickLabelsList = /*@__PURE__*/ S.Array(
|
|
525
|
+
S.String,
|
|
526
|
+
) as any as S.Schema<ChartXTickLabelsList>;
|
|
527
|
+
|
|
528
|
+
export type ChartXTicksList = Array<number>;
|
|
529
|
+
export const ChartXTicksList = /*@__PURE__*/ S.Array(
|
|
530
|
+
S.Number,
|
|
531
|
+
) as any as S.Schema<ChartXTicksList>;
|
|
532
|
+
|
|
533
|
+
export type ChartYTickLabelsList = Array<string>;
|
|
534
|
+
export const ChartYTickLabelsList = /*@__PURE__*/ S.Array(
|
|
535
|
+
S.String,
|
|
536
|
+
) as any as S.Schema<ChartYTickLabelsList>;
|
|
537
|
+
|
|
538
|
+
export type ChartYTicksList = Array<number>;
|
|
539
|
+
export const ChartYTicksList = /*@__PURE__*/ S.Array(
|
|
540
|
+
S.Number,
|
|
541
|
+
) as any as S.Schema<ChartYTicksList>;
|
|
542
|
+
|
|
543
|
+
export interface Chart {
|
|
544
|
+
elements?: ChartElementsList;
|
|
545
|
+
png?: string;
|
|
546
|
+
title?: string;
|
|
547
|
+
type?: string;
|
|
548
|
+
x_label?: string;
|
|
549
|
+
x_scale?: string;
|
|
550
|
+
x_tick_labels?: ChartXTickLabelsList;
|
|
551
|
+
x_ticks?: ChartXTicksList;
|
|
552
|
+
y_label?: string;
|
|
553
|
+
y_scale?: string;
|
|
554
|
+
y_tick_labels?: ChartYTickLabelsList;
|
|
555
|
+
y_ticks?: ChartYTicksList;
|
|
556
|
+
}
|
|
557
|
+
export const Chart = /*@__PURE__*/ S.suspend(() =>
|
|
558
|
+
S.Struct({
|
|
559
|
+
elements: S.optional(ChartElementsList),
|
|
560
|
+
png: S.optional(S.String),
|
|
561
|
+
title: S.optional(S.String),
|
|
562
|
+
type: S.optional(S.String),
|
|
563
|
+
x_label: S.optional(S.String),
|
|
564
|
+
x_scale: S.optional(S.String),
|
|
565
|
+
x_tick_labels: S.optional(ChartXTickLabelsList),
|
|
566
|
+
x_ticks: S.optional(ChartXTicksList),
|
|
567
|
+
y_label: S.optional(S.String),
|
|
568
|
+
y_scale: S.optional(S.String),
|
|
569
|
+
y_tick_labels: S.optional(ChartYTickLabelsList),
|
|
570
|
+
y_ticks: S.optional(ChartYTicksList),
|
|
571
|
+
}),
|
|
572
|
+
).annotate({ identifier: "Chart" }) as any as S.Schema<Chart>;
|
|
573
|
+
|
|
574
|
+
export type CodeRunArtifactsChartsList = Array<Chart>;
|
|
575
|
+
export const CodeRunArtifactsChartsList = /*@__PURE__*/ S.Array(
|
|
576
|
+
Chart,
|
|
577
|
+
) as any as S.Schema<CodeRunArtifactsChartsList>;
|
|
578
|
+
|
|
579
|
+
export interface CodeRunArtifacts {
|
|
580
|
+
charts?: CodeRunArtifactsChartsList;
|
|
581
|
+
}
|
|
582
|
+
export const CodeRunArtifacts = /*@__PURE__*/ S.suspend(() =>
|
|
583
|
+
S.Struct({
|
|
584
|
+
charts: S.optional(CodeRunArtifactsChartsList),
|
|
585
|
+
}),
|
|
586
|
+
).annotate({
|
|
587
|
+
identifier: "CodeRunArtifacts",
|
|
588
|
+
}) as any as S.Schema<CodeRunArtifacts>;
|
|
589
|
+
|
|
590
|
+
export interface CodeRunResponse {
|
|
591
|
+
artifacts?: CodeRunArtifacts;
|
|
592
|
+
exitCode?: number;
|
|
593
|
+
result?: string;
|
|
594
|
+
}
|
|
595
|
+
export const CodeRunResponse = /*@__PURE__*/ S.suspend(() =>
|
|
596
|
+
S.Struct({
|
|
597
|
+
artifacts: S.optional(CodeRunArtifacts),
|
|
598
|
+
exitCode: S.optional(S.Number),
|
|
599
|
+
result: S.optional(S.String),
|
|
600
|
+
}),
|
|
601
|
+
).annotate({
|
|
602
|
+
identifier: "CodeRunResponse",
|
|
603
|
+
}) as any as S.Schema<CodeRunResponse>;
|
|
604
|
+
|
|
605
|
+
export interface SendInputRequest {
|
|
606
|
+
/** Session ID */
|
|
607
|
+
sessionId: string;
|
|
608
|
+
/** Command ID */
|
|
609
|
+
commandId: string;
|
|
610
|
+
data: string;
|
|
611
|
+
}
|
|
612
|
+
export const SendInputRequest = /*@__PURE__*/ S.suspend(() =>
|
|
613
|
+
S.Struct({
|
|
614
|
+
sessionId: S.String.pipe(T.Label()),
|
|
615
|
+
commandId: S.String.pipe(T.Label()),
|
|
616
|
+
data: S.String,
|
|
617
|
+
}).pipe(
|
|
618
|
+
T.Http({
|
|
619
|
+
method: "POST",
|
|
620
|
+
uri: "/process/session/{sessionId}/command/{commandId}/input",
|
|
621
|
+
code: 200,
|
|
622
|
+
}),
|
|
623
|
+
),
|
|
624
|
+
).annotate({
|
|
625
|
+
identifier: "SendInputRequest",
|
|
626
|
+
}) as any as S.Schema<SendInputRequest>;
|
|
627
|
+
|
|
628
|
+
export interface SendInputResponse {}
|
|
629
|
+
export const SendInputResponse = /*@__PURE__*/ S.suspend(() =>
|
|
630
|
+
S.Struct({}),
|
|
631
|
+
).annotate({
|
|
632
|
+
identifier: "SendInputResponse",
|
|
633
|
+
}) as any as S.Schema<SendInputResponse>;
|
|
634
|
+
|
|
635
|
+
export interface SessionExecuteCommandRequest {
|
|
636
|
+
/** Session ID */
|
|
637
|
+
sessionId: string;
|
|
638
|
+
async?: boolean;
|
|
639
|
+
command: string;
|
|
640
|
+
runAsync?: boolean;
|
|
641
|
+
suppressInputEcho?: boolean;
|
|
642
|
+
}
|
|
643
|
+
export const SessionExecuteCommandRequest = /*@__PURE__*/ S.suspend(() =>
|
|
644
|
+
S.Struct({
|
|
645
|
+
sessionId: S.String.pipe(T.Label()),
|
|
646
|
+
async: S.optional(S.Boolean),
|
|
647
|
+
command: S.String,
|
|
648
|
+
runAsync: S.optional(S.Boolean),
|
|
649
|
+
suppressInputEcho: S.optional(S.Boolean),
|
|
650
|
+
}).pipe(
|
|
651
|
+
T.Http({
|
|
652
|
+
method: "POST",
|
|
653
|
+
uri: "/process/session/{sessionId}/exec",
|
|
654
|
+
code: 200,
|
|
655
|
+
}),
|
|
656
|
+
),
|
|
657
|
+
).annotate({
|
|
658
|
+
identifier: "SessionExecuteCommandRequest",
|
|
659
|
+
}) as any as S.Schema<SessionExecuteCommandRequest>;
|
|
660
|
+
|
|
661
|
+
export interface SessionExecuteResponse {
|
|
662
|
+
cmdId: string;
|
|
663
|
+
exitCode?: number;
|
|
664
|
+
output?: string;
|
|
665
|
+
stderr?: string;
|
|
666
|
+
stdout?: string;
|
|
667
|
+
}
|
|
668
|
+
export const SessionExecuteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
669
|
+
S.Struct({
|
|
670
|
+
cmdId: S.String,
|
|
671
|
+
exitCode: S.optional(S.Number),
|
|
672
|
+
output: S.optional(S.String),
|
|
673
|
+
stderr: S.optional(S.String),
|
|
674
|
+
stdout: S.optional(S.String),
|
|
675
|
+
}),
|
|
676
|
+
).annotate({
|
|
677
|
+
identifier: "SessionExecuteResponse",
|
|
678
|
+
}) as any as S.Schema<SessionExecuteResponse>;
|
|
679
|
+
|
|
680
|
+
export type ConnectPtySessionError = DaytonaOpError;
|
|
681
|
+
/** Connect to PTY session via WebSocket Establish a WebSocket connection to interact with a pseudo-terminal session */
|
|
682
|
+
export const connectPtySession: API.OperationMethod<
|
|
683
|
+
ConnectPtySessionRequest,
|
|
684
|
+
ConnectPtySessionResponse,
|
|
685
|
+
ConnectPtySessionError,
|
|
686
|
+
DaytonaOpContext
|
|
687
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
688
|
+
input: ConnectPtySessionRequest,
|
|
689
|
+
output: ConnectPtySessionResponse,
|
|
690
|
+
errors: [UnknownDaytonaError],
|
|
691
|
+
protocol: DaytonaProtocol,
|
|
692
|
+
retry: Retry.Retry,
|
|
693
|
+
}));
|
|
694
|
+
|
|
695
|
+
export type CreatePtySessionError = DaytonaOpError;
|
|
696
|
+
/** Create a new PTY session Create a new pseudo-terminal session with specified configuration */
|
|
697
|
+
export const createPtySession: API.OperationMethod<
|
|
698
|
+
CreatePtySessionRequest,
|
|
699
|
+
PtyCreateResponse,
|
|
700
|
+
CreatePtySessionError,
|
|
701
|
+
DaytonaOpContext
|
|
702
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
703
|
+
input: CreatePtySessionRequest,
|
|
704
|
+
output: PtyCreateResponse,
|
|
705
|
+
errors: [UnknownDaytonaError],
|
|
706
|
+
protocol: DaytonaProtocol,
|
|
707
|
+
retry: Retry.Retry,
|
|
708
|
+
}));
|
|
709
|
+
|
|
710
|
+
export type CreateSessionError = DaytonaOpError;
|
|
711
|
+
/** Create a new session Create a new shell session for command execution */
|
|
712
|
+
export const createSession: API.OperationMethod<
|
|
713
|
+
CreateSessionRequest,
|
|
714
|
+
CreateSessionResponse,
|
|
715
|
+
CreateSessionError,
|
|
716
|
+
DaytonaOpContext
|
|
717
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
718
|
+
input: CreateSessionRequest,
|
|
719
|
+
output: CreateSessionResponse,
|
|
720
|
+
errors: [UnknownDaytonaError],
|
|
721
|
+
protocol: DaytonaProtocol,
|
|
722
|
+
retry: Retry.Retry,
|
|
723
|
+
}));
|
|
724
|
+
|
|
725
|
+
export type DeletePtySessionError = DaytonaOpError;
|
|
726
|
+
/** Delete a PTY session Delete a pseudo-terminal session and terminate its process */
|
|
727
|
+
export const deletePtySession: API.OperationMethod<
|
|
728
|
+
DeletePtySessionRequest,
|
|
729
|
+
DeletePtySessionResponse,
|
|
730
|
+
DeletePtySessionError,
|
|
731
|
+
DaytonaOpContext
|
|
732
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
733
|
+
input: DeletePtySessionRequest,
|
|
734
|
+
output: DeletePtySessionResponse,
|
|
735
|
+
errors: [UnknownDaytonaError],
|
|
736
|
+
protocol: DaytonaProtocol,
|
|
737
|
+
retry: Retry.Retry,
|
|
738
|
+
}));
|
|
739
|
+
|
|
740
|
+
export type DeleteSessionError = DaytonaOpError;
|
|
741
|
+
/** Delete a session Delete an existing shell session */
|
|
742
|
+
export const deleteSession: API.OperationMethod<
|
|
743
|
+
DeleteSessionRequest,
|
|
744
|
+
DeleteSessionResponse,
|
|
745
|
+
DeleteSessionError,
|
|
746
|
+
DaytonaOpContext
|
|
747
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
748
|
+
input: DeleteSessionRequest,
|
|
749
|
+
output: DeleteSessionResponse,
|
|
750
|
+
errors: [UnknownDaytonaError],
|
|
751
|
+
protocol: DaytonaProtocol,
|
|
752
|
+
retry: Retry.Retry,
|
|
753
|
+
}));
|
|
754
|
+
|
|
755
|
+
export type ExecuteCommandError = DaytonaOpError;
|
|
756
|
+
/** Execute a command Execute a shell command and return the output and exit code */
|
|
757
|
+
export const executeCommand: API.OperationMethod<
|
|
758
|
+
ExecuteCommandRequest,
|
|
759
|
+
ExecuteResponse,
|
|
760
|
+
ExecuteCommandError,
|
|
761
|
+
DaytonaOpContext
|
|
762
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
763
|
+
input: ExecuteCommandRequest,
|
|
764
|
+
output: ExecuteResponse,
|
|
765
|
+
errors: [UnknownDaytonaError],
|
|
766
|
+
protocol: DaytonaProtocol,
|
|
767
|
+
retry: Retry.Retry,
|
|
768
|
+
}));
|
|
769
|
+
|
|
770
|
+
export type GetEntrypointLogsError = DaytonaOpError;
|
|
771
|
+
/** Get entrypoint logs Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming. */
|
|
772
|
+
export const getEntrypointLogs: API.OperationMethod<
|
|
773
|
+
GetEntrypointLogsRequest,
|
|
774
|
+
SessionCommandLogsResponse,
|
|
775
|
+
GetEntrypointLogsError,
|
|
776
|
+
DaytonaOpContext
|
|
777
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
778
|
+
input: GetEntrypointLogsRequest,
|
|
779
|
+
output: SessionCommandLogsResponse,
|
|
780
|
+
errors: [UnknownDaytonaError],
|
|
781
|
+
protocol: DaytonaProtocol,
|
|
782
|
+
retry: Retry.Retry,
|
|
783
|
+
}));
|
|
784
|
+
|
|
785
|
+
export type GetEntrypointSessionError = DaytonaOpError;
|
|
786
|
+
/** Get entrypoint session details Get details of an entrypoint session including its commands */
|
|
787
|
+
export const getEntrypointSession: API.OperationMethod<
|
|
788
|
+
GetEntrypointSessionRequest,
|
|
789
|
+
Session,
|
|
790
|
+
GetEntrypointSessionError,
|
|
791
|
+
DaytonaOpContext
|
|
792
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
793
|
+
input: GetEntrypointSessionRequest,
|
|
794
|
+
output: Session,
|
|
795
|
+
errors: [UnknownDaytonaError],
|
|
796
|
+
protocol: DaytonaProtocol,
|
|
797
|
+
retry: Retry.Retry,
|
|
798
|
+
}));
|
|
799
|
+
|
|
800
|
+
export type GetPtySessionError = DaytonaOpError;
|
|
801
|
+
/** Get PTY session information Get detailed information about a specific pseudo-terminal session */
|
|
802
|
+
export const getPtySession: API.OperationMethod<
|
|
803
|
+
GetPtySessionRequest,
|
|
804
|
+
PtySessionInfo,
|
|
805
|
+
GetPtySessionError,
|
|
806
|
+
DaytonaOpContext
|
|
807
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
808
|
+
input: GetPtySessionRequest,
|
|
809
|
+
output: PtySessionInfo,
|
|
810
|
+
errors: [UnknownDaytonaError],
|
|
811
|
+
protocol: DaytonaProtocol,
|
|
812
|
+
retry: Retry.Retry,
|
|
813
|
+
}));
|
|
814
|
+
|
|
815
|
+
export type GetSessionError = DaytonaOpError;
|
|
816
|
+
/** Get session details Get details of a specific session including its commands */
|
|
817
|
+
export const getSession: API.OperationMethod<
|
|
818
|
+
GetSessionRequest,
|
|
819
|
+
Session,
|
|
820
|
+
GetSessionError,
|
|
821
|
+
DaytonaOpContext
|
|
822
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
823
|
+
input: GetSessionRequest,
|
|
824
|
+
output: Session,
|
|
825
|
+
errors: [UnknownDaytonaError],
|
|
826
|
+
protocol: DaytonaProtocol,
|
|
827
|
+
retry: Retry.Retry,
|
|
828
|
+
}));
|
|
829
|
+
|
|
830
|
+
export type GetSessionCommandError = DaytonaOpError;
|
|
831
|
+
/** Get session command details Get details of a specific command within a session */
|
|
832
|
+
export const getSessionCommand: API.OperationMethod<
|
|
833
|
+
GetSessionCommandRequest,
|
|
834
|
+
Command,
|
|
835
|
+
GetSessionCommandError,
|
|
836
|
+
DaytonaOpContext
|
|
837
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
838
|
+
input: GetSessionCommandRequest,
|
|
839
|
+
output: Command,
|
|
840
|
+
errors: [UnknownDaytonaError],
|
|
841
|
+
protocol: DaytonaProtocol,
|
|
842
|
+
retry: Retry.Retry,
|
|
843
|
+
}));
|
|
844
|
+
|
|
845
|
+
export type GetSessionCommandLogsError = DaytonaOpError;
|
|
846
|
+
/** Get session command logs Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming. */
|
|
847
|
+
export const getSessionCommandLogs: API.OperationMethod<
|
|
848
|
+
GetSessionCommandLogsRequest,
|
|
849
|
+
SessionCommandLogsResponse,
|
|
850
|
+
GetSessionCommandLogsError,
|
|
851
|
+
DaytonaOpContext
|
|
852
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
853
|
+
input: GetSessionCommandLogsRequest,
|
|
854
|
+
output: SessionCommandLogsResponse,
|
|
855
|
+
errors: [UnknownDaytonaError],
|
|
856
|
+
protocol: DaytonaProtocol,
|
|
857
|
+
retry: Retry.Retry,
|
|
858
|
+
}));
|
|
859
|
+
|
|
860
|
+
export type ListPtySessionsError = DaytonaOpError;
|
|
861
|
+
/** List all PTY sessions Get a list of all active pseudo-terminal sessions */
|
|
862
|
+
export const listPtySessions: API.OperationMethod<
|
|
863
|
+
ListPtySessionsRequest,
|
|
864
|
+
PtyListResponse,
|
|
865
|
+
ListPtySessionsError,
|
|
866
|
+
DaytonaOpContext
|
|
867
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
868
|
+
input: ListPtySessionsRequest,
|
|
869
|
+
output: PtyListResponse,
|
|
870
|
+
errors: [UnknownDaytonaError],
|
|
871
|
+
protocol: DaytonaProtocol,
|
|
872
|
+
retry: Retry.Retry,
|
|
873
|
+
}));
|
|
874
|
+
|
|
875
|
+
export type ListSessionsError = DaytonaOpError;
|
|
876
|
+
/** List all sessions Get a list of all active shell sessions */
|
|
877
|
+
export const listSessions: API.OperationMethod<
|
|
878
|
+
ListSessionsRequest,
|
|
879
|
+
ListSessionsResponse,
|
|
880
|
+
ListSessionsError,
|
|
881
|
+
DaytonaOpContext
|
|
882
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
883
|
+
input: ListSessionsRequest,
|
|
884
|
+
output: ListSessionsResponse,
|
|
885
|
+
errors: [UnknownDaytonaError],
|
|
886
|
+
protocol: DaytonaProtocol,
|
|
887
|
+
retry: Retry.Retry,
|
|
888
|
+
}));
|
|
889
|
+
|
|
890
|
+
export type ResizePtySessionError = DaytonaOpError;
|
|
891
|
+
/** Resize a PTY session Resize the terminal dimensions of a pseudo-terminal session */
|
|
892
|
+
export const resizePtySession: API.OperationMethod<
|
|
893
|
+
ResizePtySessionRequest,
|
|
894
|
+
PtySessionInfo,
|
|
895
|
+
ResizePtySessionError,
|
|
896
|
+
DaytonaOpContext
|
|
897
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
898
|
+
input: ResizePtySessionRequest,
|
|
899
|
+
output: PtySessionInfo,
|
|
900
|
+
errors: [UnknownDaytonaError],
|
|
901
|
+
protocol: DaytonaProtocol,
|
|
902
|
+
retry: Retry.Retry,
|
|
903
|
+
}));
|
|
904
|
+
|
|
905
|
+
export type RunCodeError = DaytonaOpError;
|
|
906
|
+
/** Execute code Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts */
|
|
907
|
+
export const runCode: API.OperationMethod<
|
|
908
|
+
RunCodeRequest,
|
|
909
|
+
CodeRunResponse,
|
|
910
|
+
RunCodeError,
|
|
911
|
+
DaytonaOpContext
|
|
912
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
913
|
+
input: RunCodeRequest,
|
|
914
|
+
output: CodeRunResponse,
|
|
915
|
+
errors: [UnknownDaytonaError],
|
|
916
|
+
protocol: DaytonaProtocol,
|
|
917
|
+
retry: Retry.Retry,
|
|
918
|
+
}));
|
|
919
|
+
|
|
920
|
+
export type SendInputError = DaytonaOpError;
|
|
921
|
+
/** Send input to command Send input data to a running command in a session for interactive execution */
|
|
922
|
+
export const sendInput: API.OperationMethod<
|
|
923
|
+
SendInputRequest,
|
|
924
|
+
SendInputResponse,
|
|
925
|
+
SendInputError,
|
|
926
|
+
DaytonaOpContext
|
|
927
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
928
|
+
input: SendInputRequest,
|
|
929
|
+
output: SendInputResponse,
|
|
930
|
+
errors: [UnknownDaytonaError],
|
|
931
|
+
protocol: DaytonaProtocol,
|
|
932
|
+
retry: Retry.Retry,
|
|
933
|
+
}));
|
|
934
|
+
|
|
935
|
+
export type SessionExecuteCommandError = DaytonaOpError;
|
|
936
|
+
/** Execute command in session Execute a command within an existing shell session */
|
|
937
|
+
export const sessionExecuteCommand: API.OperationMethod<
|
|
938
|
+
SessionExecuteCommandRequest,
|
|
939
|
+
SessionExecuteResponse,
|
|
940
|
+
SessionExecuteCommandError,
|
|
941
|
+
DaytonaOpContext
|
|
942
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
943
|
+
input: SessionExecuteCommandRequest,
|
|
944
|
+
output: SessionExecuteResponse,
|
|
945
|
+
errors: [UnknownDaytonaError],
|
|
946
|
+
protocol: DaytonaProtocol,
|
|
947
|
+
retry: Retry.Retry,
|
|
948
|
+
}));
|